Commit Graph

20153 Commits

Author SHA1 Message Date
Tristan Van Berkom
143660eff6 GtkCellView refactoring for extended layout
Added gtk_cell_view_get_desired_size_of_row() to report full
extended layout information for a said row, this obsoletes
gtk_cell_view_get_size_of_row(). Also make GtkCellView queue
a resize on itself when cell renderers are added/removed.
2010-04-08 18:46:19 -04:00
Tristan Van Berkom
b10f2fc001 Some extended layout fixes for GtkCellView
Fixed GtkCellView to use the new GtkExtendedCell interface to get
natural size from cells and factored out the old size_request() method.
2010-04-07 01:27:15 -04:00
Tristan Van Berkom
51ffd59884 Implement GtkExtendedLayout on GtkButton
GtkButton as a content type of widget needs to forward natural size information
to parent containers in order to be resized naturally.
2010-04-06 20:48:41 -04:00
Tristan Van Berkom
85a55b2921 Implement GtkExtendedLayout on Alignment
GtkAlignment is already using the height for width api to align
the child in the cases where space is available, but also needed
to implement the extended layout in order to reflect natural sizes
to parent widgets.
2010-04-06 20:47:15 -04:00
Tristan Van Berkom
388ad4090c Implemented GtkExtendedLayout on GtkViewport 2010-04-06 17:15:50 -04:00
Tristan Van Berkom
a17e12c87d Implement GtkExtendedCell on GtkCellRendererText 2010-04-06 03:05:52 -04:00
Tristan Van Berkom
59dafa77dc Use new gtk_tree_view_column_get_desired_size() 2010-04-06 03:05:20 -04:00
Tristan Van Berkom
3128bd0937 Added gtk_tree_view_column_get_desired_size() as its a corner case
that does not fall under the two categories.
2010-04-06 03:03:55 -04:00
Tristan Van Berkom
bb86e61171 Added GtkExtendedCell interface (last commit) 2010-04-06 03:03:03 -04:00
Tristan Van Berkom
7beb83cea4 Add new GtkExtendedCell interface
Added a new interface to extend layout information of GtkCellRenderers,
GtkCellRenderer is a prerequisite of GtkExtendedCellIface and provides
a base implementation of ->get_desired_size() with ->get_size().

Note that the api for GtkExtendedCell differs from GtkExtendedLayout
since the cells need to be passed an additional widget to calculate
sizes contextual to the widget/screen (fonts etc).
2010-04-06 02:59:21 -04:00
Tristan Van Berkom
8263633478 Remove gtk_widget_get_desired_size() 2010-04-06 02:56:20 -04:00
Tristan Van Berkom
68c38e0ffd Fixed classes to call gtk_extended_layout_get_desired_size_again()
The previous patch removes the ambiguous gtk_widget_get_desired_size().
2010-04-06 02:55:07 -04:00
Tristan Van Berkom
ef32192329 Call the ->get_desired_size() method directly on the vtable
This commit is a mistake, it should have been included with the last
commit.
2010-04-06 02:53:51 -04:00
Tristan Van Berkom
92309019e5 Make GtkWidget a prerequisite of extended layout
As it is not allowed to called gtk_extended_layout_get_desired_size()
on a GtkWidget directly; gtk_widget_get_desired_size() was really an
ambiguous api. This patch removes the added GtkWidget api, calls
the appropriate sizegroup code which in turn envokes the interface
vtable, this patch also accordingly makes GtkWidget a prerequisite
of GtkExtendedLayout (the api doesnt work for cell renderers anyway,
patch comming...).
2010-04-06 02:47:20 -04:00
Tristan Van Berkom
52eabce3c4 Revert "Implement extended layout for GtkBin"
This reverts commit 5e8045b14d.

Conflicts:

	gtk/gtkbin.c
2010-04-05 18:10:41 -04:00
Tristan Van Berkom
24ed2f8aa1 Fixed 2 bugs in gtk_box_size_allocate()
This commit fixes the loop to take into consideration the
child->padding that will be allocated to the child while calculating
full available size. Additionally it fixes the initial positioning
of child widgets when packed at the end (a special case because the
x position used starts from the end of the box).
2010-04-05 18:01:56 -04:00
Tristan Van Berkom
eb537a6773 Fixed do_size_request() to start with a 0 base requisition instead of -1 2010-04-05 17:57:06 -04:00
Tristan Van Berkom
4b1315cedc Changed initial values for requisition from -1 to 0.
When doing size-requests and get_natural_size() calls, use 0 as
the base value instead of -1, because size_request code assumes
that widget->requesition is initialized at 0.
2010-04-04 16:38:36 -04:00
Tristan Van Berkom
75b8f7d3ae Fixed GtkBox to not call get_desired_size() on a child when no child is present. 2010-04-04 16:37:06 -04:00
Tristan Van Berkom
1212f263c3 Making function private in gtktreeviewcolumn to pass the abi test. 2010-04-03 21:37:42 -04:00
Tristan Van Berkom
ae2c0b02c3 Refixed merge conflicts for GTK_WIDGET_MAPPED/GTK_WIDGET_VISIBLE 2010-04-03 21:35:18 -04:00
Tristan Van Berkom
5d83f5eba5 Fixed internal native layout algorythm wrt size-request singals/implementations.
Because "size-request" signal can be handled by signal connections as well
as by third party derived classes it is necessary to always fire the
"size-request" signal for every recalculation of the widget requisition,
now gtksizegroup.c:do_size_request() fires the signal first and allows it
to overflow the minimum/natural sizes returned by extended layout
implementations.

GtkWidget->get_natural_size() is now left assigning default -1 values to
ensure they both get overridden by the size-request handling.
2010-04-03 20:59:28 -04:00
Tristan Van Berkom
a33053db74 Fixed extended layout implementors to not call ->get_desired_size() directly
Getting the desired size of a GtkWidget must always be done with
gtk_widget_get_desired_size() and never with
gtk_extended_layout_get_desired_size() directly as the former passes
through size group logic and updates the widget->requisition cache.
2010-04-03 20:59:28 -04:00
Tristan Van Berkom
8413f22d90 Removed casing of GTK_IS_EXTENDED_LAYOUT() from GtkViewport. 2010-04-03 20:59:28 -04:00
Tristan Van Berkom
61fab15139 Fixed invalid pointer access in gtk_tree_view_column_get_desired_size() 2010-04-03 20:59:28 -04:00
Tristan Van Berkom
22de1a7c65 Partially fixed GtkTreeview for extended layout
Removed the size_request() handling on the class and calculate
minimum size from get_desired_size(); base the natural width on
either the minimum of column headers, or a greater natural request
of the columns renderers.
2010-04-03 20:59:28 -04:00
Tristan Van Berkom
a18af0b980 Applied Jan Arne Petersen's patch for GtkScrolledWindow
Applied patch to add height-for-width/width-for-height suppot
to GtkScrolledWindow plus modifications to use gtk_widget_get_desired_size()
to query children sized instead of directly calling the layout api, plus
removed the ->size_request() implementation interfering with the mess.
2010-04-03 20:59:28 -04:00
Tristan Van Berkom
894e887370 Fixed GtkCellRendererText invalid pointer access.
Fixed get_desired_size() to not access parameters when NULL and
also not to access priv->object if it hasnt yet been assigned.
2010-04-03 20:59:27 -04:00
Jan Arne Petersen
0fbdb3c73f Take extended layout into account in viewport
Make sure the right height is used in GtkViewPort.
2010-04-03 20:59:27 -04:00
Matthias Clasen
c4dec47536 Don't use gio-unix on win32
We only need gio-unix when building the x11 backend.
Reported by Yevgen Muntyan in bug 614540.
2010-04-03 20:59:27 -04:00
Inaki Larranaga Murgoitio
f48299c86e Updated Basque language 2010-04-03 20:59:27 -04:00
Inaki Larranaga Murgoitio
67eccabfca Updated Basque language 2010-04-03 20:59:27 -04:00
Inaki Larranaga Murgoitio
923e37e908 Updated Basque language 2010-04-03 20:59:27 -04:00
Kenneth Nielsen
829cfe21e1 Updated Danish translation 2010-04-03 20:59:26 -04:00
Runa Bhattacharjee
65a322c94d Updated Bengali India Translation 2010-04-03 20:59:26 -04:00
Runa Bhattacharjee
93df7c133e Updated Bengali India Translation 2010-04-03 20:59:26 -04:00
Jordi Serratosa
299cd7fec1 Fixes to Catalan translation 2010-04-03 20:59:26 -04:00
Tristan Van Berkom
523283bb36 Fixed possible devision by zero in size negotiations
Fixed GtkToolItemGroup to avoid deviding by zero when all children
are invisible or there are no children. bgo #613974.
2010-04-03 20:59:26 -04:00
Tristan Van Berkom
9fe9898045 Added missing default events in realize() implementations
Added gtk_widget_get_events() to the event masks declared by
GtkToolPalette & GtkToolItemGroup.
2010-04-03 20:59:26 -04:00
Tristan Van Berkom
96793999df Added missing break statement to mutator: gtk_tool_item_group_set_property() 2010-04-03 20:59:26 -04:00
Benjamin Otte
80efec2a8c Fix error case in filesystem model
We should not unref the model here, it might not even exist anymore.
Instead check if it exists and only use it if it does.
The unref was leftover from a previous fix in
ba9f53397f.

Spotted by Matthias Clasen in
https://bugzilla.gnome.org/show_bug.cgi?id=614099
2010-04-03 20:59:25 -04:00
David Planella
9441d96620 Updated Catalan translation with a couple of fixes 2010-04-03 20:59:25 -04:00
David Planella
0df8e5e3f0 Updated Catalan translation 2010-04-03 20:59:25 -04:00
Jamil Ahmed
a4a0019586 Updated Bengali translation 2010-04-03 20:59:25 -04:00
Christian Dywan
69b241c66d Fix a misspelling in gtk_cell_view_new_with_markup
This fixes bug 613887.
2010-04-03 20:59:25 -04:00
Ask H. Larsen
e8f9085426 Updated Danish translation 2010-04-03 20:59:25 -04:00
Maxim V. Dziumanenko
5559cbeb70 Updated Ukrainian translation 2010-04-03 20:59:25 -04:00
Maxim V. Dziumanenko
8e0088dcea Updated Ukrainian translation 2010-04-03 20:59:24 -04:00
Jamil Ahmed
839a347db1 Updated Bengali translation 2010-04-03 20:59:24 -04:00
Jamil Ahmed
b19d76a156 Updated Bengali translation 2010-04-03 20:59:24 -04:00