Branch: refs/heads/master Author: Colomban Wendling ban@herbesfolles.org Committer: Colomban Wendling ban@herbesfolles.org Date: Sun, 13 Jan 2013 15:02:42 UTC Commit: 33c9ae1967f3ae8cd5dc0dfc61277856c42eef04 https://github.com/geany/geany-plugins/commit/33c9ae1967f3ae8cd5dc0dfc612778...
Log Message: ----------- Merge branch 'wip/webhelper'
Modified Paths: -------------- webhelper/src/gwh-browser.c
Modified: webhelper/src/gwh-browser.c 18 files changed, 13 insertions(+), 5 deletions(-) =================================================================== @@ -76,6 +76,7 @@ struct _GwhBrowserPrivate GtkToolItem *item_reload; GtkToolItem *item_inspector;
+ GtkWidget *statusbar; gchar *hovered_link; };
@@ -647,6 +648,7 @@ static void inspector_set_detached (GwhBrowser *self, g_object_unref (self->priv->default_icon); } g_object_unref (self->priv->settings); + g_object_unref (self->priv->statusbar); g_free (self->priv->hovered_link);
G_OBJECT_CLASS (gwh_browser_parent_class)->finalize (object); @@ -892,8 +894,7 @@ static void inspector_set_detached (GwhBrowser *self, static guint id = 0;
if (id == 0) { - id = gtk_statusbar_get_context_id (GTK_STATUSBAR (ui_widgets.statusbar), - "gwh-browser-hovered-link"); + id = gtk_statusbar_get_context_id (statusbar, "gwh-browser-hovered-link"); }
return id; @@ -905,7 +906,7 @@ static void inspector_set_detached (GwhBrowser *self, gchar *uri, GwhBrowser *self) { - GtkStatusbar *statusbar = GTK_STATUSBAR (ui_widgets.statusbar); + GtkStatusbar *statusbar = GTK_STATUSBAR (self->priv->statusbar);
if (self->priv->hovered_link) { gtk_statusbar_pop (statusbar, get_statusbar_context_id (statusbar)); @@ -925,7 +926,7 @@ static void inspector_set_detached (GwhBrowser *self, GwhBrowser *self) { if (self->priv->hovered_link) { - GtkStatusbar *statusbar = GTK_STATUSBAR (ui_widgets.statusbar); + GtkStatusbar *statusbar = GTK_STATUSBAR (self->priv->statusbar);
gtk_statusbar_pop (statusbar, get_statusbar_context_id (statusbar)); } @@ -937,7 +938,7 @@ static void inspector_set_detached (GwhBrowser *self, GwhBrowser *self) { if (self->priv->hovered_link) { - GtkStatusbar *statusbar = GTK_STATUSBAR (ui_widgets.statusbar); + GtkStatusbar *statusbar = GTK_STATUSBAR (self->priv->statusbar);
gtk_statusbar_push (statusbar, get_statusbar_context_id (statusbar), self->priv->hovered_link); @@ -996,6 +997,13 @@ static void inspector_set_detached (GwhBrowser *self, : self->priv->paned), self->priv->inspector_view);
+ self->priv->statusbar = ui_lookup_widget (geany->main_widgets->window, "statusbar"); + if (self->priv->statusbar) { + g_object_ref (self->priv->statusbar); + } else { + /* in the unlikely case we can't get the Geany statusbar, fake one */ + self->priv->statusbar = gtk_statusbar_new (); + } self->priv->hovered_link = NULL;
g_signal_connect (self, "notify::orientation",
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
plugins-commits@lists.geany.org