diff options
author | Marco Pesenti Gritti <marco@it.gnome.org> | 2003-08-12 03:26:24 +0800 |
---|---|---|
committer | Marco Pesenti Gritti <mpeseng@src.gnome.org> | 2003-08-12 03:26:24 +0800 |
commit | 1ae9e642b53c3668c4b74e0b043ee6cf861a2b11 (patch) | |
tree | e1b69cae65c218df1894dd800430f7769fb8fcdc /lib/egg/eggtoolbar.c | |
parent | f36ca5abdf24b9562532e8743e6069dcb85866f5 (diff) | |
download | gsoc2013-epiphany-1ae9e642b53c3668c4b74e0b043ee6cf861a2b11.tar gsoc2013-epiphany-1ae9e642b53c3668c4b74e0b043ee6cf861a2b11.tar.gz gsoc2013-epiphany-1ae9e642b53c3668c4b74e0b043ee6cf861a2b11.tar.bz2 gsoc2013-epiphany-1ae9e642b53c3668c4b74e0b043ee6cf861a2b11.tar.lz gsoc2013-epiphany-1ae9e642b53c3668c4b74e0b043ee6cf861a2b11.tar.xz gsoc2013-epiphany-1ae9e642b53c3668c4b74e0b043ee6cf861a2b11.tar.zst gsoc2013-epiphany-1ae9e642b53c3668c4b74e0b043ee6cf861a2b11.zip |
Respect priority text preference. Ported from gtk.
2003-08-11 Marco Pesenti Gritti <marco@it.gnome.org>
* lib/egg/egg-action.c: (egg_action_class_init), (egg_action_init),
(egg_action_set_property), (egg_action_get_property),
(egg_action_sync_important), (connect_proxy):
* lib/egg/egg-action.h:
* lib/egg/eggtoolbar.c: (toolbar_item_is_homogeneous),
(egg_toolbar_size_request), (get_item_size):
* lib/egg/eggtoolbutton.c: (egg_tool_button_property_notify),
(egg_tool_button_class_init), (egg_tool_button_construct_contents):
* lib/egg/eggtoolitem.c: (egg_tool_item_class_init),
(egg_tool_item_get_is_important), (egg_tool_item_set_is_important),
(egg_tool_item_set_property), (egg_tool_item_get_property):
* lib/egg/eggtoolitem.h:
* src/ephy-window.c: (setup_window):
* src/toolbar.c: (toolbar_setup_actions):
Respect priority text preference. Ported from gtk.
Diffstat (limited to 'lib/egg/eggtoolbar.c')
-rw-r--r-- | lib/egg/eggtoolbar.c | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/lib/egg/eggtoolbar.c b/lib/egg/eggtoolbar.c index 87e3fa592..dcad2f9f6 100644 --- a/lib/egg/eggtoolbar.c +++ b/lib/egg/eggtoolbar.c @@ -579,6 +579,25 @@ toolbar_item_visible (EggToolbar *toolbar, return FALSE; } +static gboolean +toolbar_item_is_homogeneous (EggToolbar *toolbar, + EggToolItem *item) +{ + gboolean result = FALSE; + + if (item->homogeneous && !EGG_IS_SEPARATOR_TOOL_ITEM (item)) + result = TRUE; + + if (item->is_important && + toolbar->style == GTK_TOOLBAR_BOTH_HORIZ && + toolbar->orientation == GTK_ORIENTATION_HORIZONTAL) + { + result = FALSE; + } + + return result; +} + static void egg_toolbar_set_property (GObject *object, guint prop_id, @@ -839,7 +858,7 @@ egg_toolbar_size_request (GtkWidget *widget, max_child_width = MAX (max_child_width, requisition.width); max_child_height = MAX (max_child_height, requisition.height); - if (EGG_TOOL_ITEM (item)->homogeneous && GTK_BIN (item)->child) + if (toolbar_item_is_homogeneous (toolbar, item) && GTK_BIN (item)->child) { max_homogeneous_child_width = MAX (max_homogeneous_child_width, requisition.width); max_homogeneous_child_height = MAX (max_homogeneous_child_height, requisition.height); @@ -965,14 +984,14 @@ get_item_size (EggToolbar *toolbar, if (toolbar->orientation == GTK_ORIENTATION_HORIZONTAL) { - if (item->homogeneous) + if (toolbar_item_is_homogeneous (toolbar, item)) return toolbar->button_maxw; else return requisition.width; } else { - if (item->homogeneous) + if (toolbar_item_is_homogeneous (toolbar, item)) return toolbar->button_maxh; else return requisition.height; |