aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@gnome.org>2003-10-27 16:13:36 +0800
committerMarco Pesenti Gritti <marco@src.gnome.org>2003-10-27 16:13:36 +0800
commit32ccc668ac8e87ec9dd67b9d594a7fcf89381776 (patch)
treef8a4d9cd11393f1a3589f04c2363e4cd6b9d4093 /src
parent36dc5ffa3ccd419fa87677829f7e49556528ccb1 (diff)
downloadgsoc2013-epiphany-32ccc668ac8e87ec9dd67b9d594a7fcf89381776.tar
gsoc2013-epiphany-32ccc668ac8e87ec9dd67b9d594a7fcf89381776.tar.gz
gsoc2013-epiphany-32ccc668ac8e87ec9dd67b9d594a7fcf89381776.tar.bz2
gsoc2013-epiphany-32ccc668ac8e87ec9dd67b9d594a7fcf89381776.tar.lz
gsoc2013-epiphany-32ccc668ac8e87ec9dd67b9d594a7fcf89381776.tar.xz
gsoc2013-epiphany-32ccc668ac8e87ec9dd67b9d594a7fcf89381776.tar.zst
gsoc2013-epiphany-32ccc668ac8e87ec9dd67b9d594a7fcf89381776.zip
Fixup spinner when resetting the toolbar model. Update spinner on toolbar
2003-10-27 Marco Pesenti Gritti <marco@gnome.org> * lib/egg/egg-editable-toolbar.c: (create_dock), (set_fixed_style), (unset_fixed_style), (toolbar_changed_cb), (unparent_fixed), (update_fixed), (toolbar_removed_cb), (toolbars_clean), (egg_editable_toolbar_construct), (egg_editable_toolbar_init), (egg_editable_toolbar_finalize), (egg_editable_toolbar_set_fixed): * lib/egg/egg-editable-toolbar.h: * src/toolbar.c: (toolbar_style_sync), (create_spinner), (toolbar_init): Fixup spinner when resetting the toolbar model. Update spinner on toolbar style change. Fix a typo in toolbars creation that wa causing fs toolbar to be hidden.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/toolbar.c35
1 files changed, 31 insertions, 4 deletions
diff --git a/src/toolbar.c b/src/toolbar.c
index 77ec674c9..5ef026f72 100755
--- a/src/toolbar.c
+++ b/src/toolbar.c
@@ -523,6 +523,36 @@ toolbar_set_window (Toolbar *t, EphyWindow *window)
}
static void
+toolbar_style_sync (GtkToolbar *toolbar,
+ GtkToolbarStyle style,
+ GtkWidget *spinner)
+{
+ gboolean small;
+
+ small = (style != GTK_TOOLBAR_BOTH);
+
+ ephy_spinner_set_small_mode (EPHY_SPINNER (spinner), small);
+}
+
+static void
+create_spinner (Toolbar *t)
+{
+ GtkWidget *spinner;
+ GtkToolbar *toolbar;
+
+ spinner = ephy_spinner_new ();
+ gtk_widget_show (spinner);
+ t->priv->spinner = spinner;
+
+ toolbar = egg_editable_toolbar_set_fixed
+ (EGG_EDITABLE_TOOLBAR (t), spinner);
+
+ g_signal_connect (toolbar, "style_changed",
+ G_CALLBACK (toolbar_style_sync),
+ spinner);
+}
+
+static void
toolbar_init (Toolbar *t)
{
t->priv = EPHY_TOOLBAR_GET_PRIVATE (t);
@@ -532,10 +562,7 @@ toolbar_init (Toolbar *t)
t->priv->visibility = TRUE;
t->priv->updating_address = FALSE;
- t->priv->spinner = ephy_spinner_new ();
- gtk_widget_show (t->priv->spinner);
- egg_editable_toolbar_set_fixed (EGG_EDITABLE_TOOLBAR (t),
- t->priv->spinner);
+ create_spinner (t);
}
static void