Branch: refs/heads/master Author: Matthew Brush matt@geany.org Committer: Matthew Brush matt@geany.org Date: Sun, 05 Aug 2012 14:34:36 Commit: 113437406cfe18bbdb640dcf7d1da22658eae4b5 https://github.com/geany/geany-plugins/commit/113437406cfe18bbdb640dcf7d1da2...
Log Message: ----------- devhelp: Fix using some functions from API newer than dependency
Modified Paths: -------------- devhelp/src/dhp-object.c devhelp/src/dhp-settings.c
Modified: devhelp/src/dhp-object.c 13 files changed, 12 insertions(+), 1 deletions(-) =================================================================== @@ -562,8 +562,15 @@ DevhelpPlugin *devhelp_plugin_new(void) */ const gchar *devhelp_plugin_get_webview_uri(DevhelpPlugin *self) { + WebKitWebFrame *frame; + g_return_val_if_fail(DEVHELP_IS_PLUGIN(self), NULL); - return webkit_web_view_get_uri(WEBKIT_WEB_VIEW(self->priv->webview)); + + frame = webkit_web_view_get_main_frame(WEBKIT_WEB_VIEW(self->priv->webview)); + if (frame) + return webkit_web_frame_get_uri(WEBKIT_WEB_FRAME(frame)); + else + return NULL; }
@@ -1026,7 +1033,11 @@ gboolean devhelp_plugin_get_have_man_prog(DevhelpPlugin *self) gboolean devhelp_plugin_get_devhelp_sidebar_visible(DevhelpPlugin *self) { g_return_val_if_fail(DEVHELP_IS_PLUGIN(self), FALSE); +#if GTK_CHECK_VERSION(2,18,0) return gtk_widget_get_visible(self->priv->sb_notebook); +#else + return GTK_WIDGET_VISIBLE(self->priv->sb_notebook); +#endif }
Modified: devhelp/src/dhp-settings.c 8 files changed, 7 insertions(+), 1 deletions(-) =================================================================== @@ -309,7 +309,13 @@ void devhelp_plugin_store_settings(DevhelpPlugin *self, const gchar *filename) g_key_file_set_boolean(kf, "doc_providers", "man_pages", self->priv->use_man); g_key_file_set_boolean(kf, "doc_providers", "codesearch", self->priv->use_codesearch);
- g_key_file_set_boolean(kf, "devhelp", "show_devhelp_sidebar", gtk_widget_get_visible(self->priv->sb_notebook)); + g_key_file_set_boolean(kf, "devhelp", "show_devhelp_sidebar", +#if GTK_CHECK_VERSION(2,18,0) + gtk_widget_get_visible(self->priv->sb_notebook) +#else + GTK_WIDGET_VISIBLE(self->priv->sb_notebook) +#endif + ); g_key_file_set_boolean(kf, "devhelp", "set_sidebar_tabs_bottom", devhelp_plugin_get_sidebar_tabs_bottom(self)); g_key_file_set_boolean(kf, "devhelp", "focus_sidebar_on_search", self->priv->focus_sidebar_on_search);
@@ Diff output truncated at 100000 characters. @@
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: TBD).