aboutsummaryrefslogtreecommitdiffstats
path: root/lib/egg/egg-editable-toolbar.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-01-10 08:14:23 +0800
committerChristian Persch <chpe@src.gnome.org>2005-01-10 08:14:23 +0800
commit0db1c0f440d4388e7000eaa6aa2ea8e53776aded (patch)
tree1851d3f4ba438eb4f2771958eb26e6d0a5902b91 /lib/egg/egg-editable-toolbar.c
parentdb1d9c156dce000c86c7ea961ac55c9a46b48e8e (diff)
downloadgsoc2013-epiphany-0db1c0f440d4388e7000eaa6aa2ea8e53776aded.tar
gsoc2013-epiphany-0db1c0f440d4388e7000eaa6aa2ea8e53776aded.tar.gz
gsoc2013-epiphany-0db1c0f440d4388e7000eaa6aa2ea8e53776aded.tar.bz2
gsoc2013-epiphany-0db1c0f440d4388e7000eaa6aa2ea8e53776aded.tar.lz
gsoc2013-epiphany-0db1c0f440d4388e7000eaa6aa2ea8e53776aded.tar.xz
gsoc2013-epiphany-0db1c0f440d4388e7000eaa6aa2ea8e53776aded.tar.zst
gsoc2013-epiphany-0db1c0f440d4388e7000eaa6aa2ea8e53776aded.zip
Rename toolbar model flags to be more in line with GtkToolbarStyle.
2005-01-10 Christian Persch <chpe@cvs.gnome.org> * lib/egg/egg-editable-toolbar.c: (toolbar_changed_cb), (egg_editable_toolbar_construct): * lib/egg/egg-toolbars-model.c: (parse_toolbars): * lib/egg/egg-toolbars-model.h: Rename toolbar model flags to be more in line with GtkToolbarStyle.
Diffstat (limited to 'lib/egg/egg-editable-toolbar.c')
-rwxr-xr-xlib/egg/egg-editable-toolbar.c25
1 files changed, 10 insertions, 15 deletions
diff --git a/lib/egg/egg-editable-toolbar.c b/lib/egg/egg-editable-toolbar.c
index 381ed8670..72884e5f7 100755
--- a/lib/egg/egg-editable-toolbar.c
+++ b/lib/egg/egg-editable-toolbar.c
@@ -745,19 +745,19 @@ toolbar_changed_cb (EggToolbarsModel *model,
flags = egg_toolbars_model_get_flags (model, position);
toolbar = get_toolbar_nth (t, position);
- if (flags & EGG_TB_MODEL_ICONS_ONLY)
+ if (flags & EGG_TB_MODEL_ICONS)
{
style = GTK_TOOLBAR_ICONS;
}
- else if (flags & EGG_TB_MODEL_TEXT_ONLY)
+ else if (flags & EGG_TB_MODEL_TEXT)
{
style = GTK_TOOLBAR_TEXT;
}
- else if (flags & EGG_TB_MODEL_ICONS_TEXT)
+ else if (flags & EGG_TB_MODEL_BOTH)
{
style = GTK_TOOLBAR_BOTH;
}
- else if (flags & EGG_TB_MODEL_ICONS_TEXT_HORIZ)
+ else if (flags & EGG_TB_MODEL_BOTH_HORIZ)
{
style = GTK_TOOLBAR_BOTH_HORIZ;
}
@@ -905,22 +905,11 @@ egg_editable_toolbar_construct (EggEditableToolbar *t)
for (i = 0; i < n_toolbars; i++)
{
GtkWidget *toolbar, *dock;
- EggTbModelFlags flags;
dock = create_dock (t);
gtk_box_pack_start (GTK_BOX (t), dock, TRUE, TRUE, 0);
toolbar = get_toolbar_nth (t, i);
- flags = egg_toolbars_model_get_flags (model, i);
- if (flags & EGG_TB_MODEL_ICONS_ONLY)
- {
- gtk_toolbar_set_style (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_ICONS);
- if (i == 0 && t->priv->fixed_toolbar)
- {
- set_fixed_style (t, GTK_TOOLBAR_ICONS);
- }
- }
-
n_items = egg_toolbars_model_n_items (model, i);
for (l = 0; l < n_items; l++)
{
@@ -953,6 +942,12 @@ egg_editable_toolbar_construct (EggEditableToolbar *t)
}
update_fixed (t);
+
+ /* apply styles */
+ for (i = 0; i < n_toolbars; i ++)
+ {
+ toolbar_changed_cb (model, i, t);
+ }
}
static void