diff options
author | raveit65 <[email protected]> | 2017-07-30 15:44:37 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2017-08-05 15:02:54 +0200 |
commit | 892e3b55dcd9dc6385e26cebc43b4b39ddd33da7 (patch) | |
tree | 312934f1dba42b81d14a445dba78699b4932da26 | |
parent | 8498aff15a28ca9f3effd2d8ea048da8cc95f90f (diff) | |
download | mate-applets-892e3b55dcd9dc6385e26cebc43b4b39ddd33da7.tar.bz2 mate-applets-892e3b55dcd9dc6385e26cebc43b4b39ddd33da7.tar.xz |
stickynotes: don't use deprecated gtk_show_uri
-rw-r--r-- | stickynotes/stickynotes.c | 13 | ||||
-rw-r--r-- | stickynotes/stickynotes_applet_callbacks.c | 26 |
2 files changed, 30 insertions, 9 deletions
diff --git a/stickynotes/stickynotes.c b/stickynotes/stickynotes.c index 10428620..19ff0abb 100644 --- a/stickynotes/stickynotes.c +++ b/stickynotes/stickynotes.c @@ -375,10 +375,17 @@ static void response_cb (GtkWidget *dialog, gint id, gpointer data) { if (id == GTK_RESPONSE_HELP) +#if GTK_CHECK_VERSION (3, 22, 0) + gtk_show_uri_on_window (GTK_WINDOW (dialog), + "help:mate-stickynotes-applet/stickynotes-settings-individual", + gtk_get_current_event_time (), + NULL); +#else gtk_show_uri (gtk_widget_get_screen (GTK_WIDGET (dialog)), - "help:mate-stickynotes-applet/stickynotes-settings-individual", - gtk_get_current_event_time (), - NULL); + "help:mate-stickynotes-applet/stickynotes-settings-individual", + gtk_get_current_event_time (), + NULL); +#endif else if (id == GTK_RESPONSE_CLOSE) gtk_widget_hide (dialog); } diff --git a/stickynotes/stickynotes_applet_callbacks.c b/stickynotes/stickynotes_applet_callbacks.c index 1bee855f..5e47d4b9 100644 --- a/stickynotes/stickynotes_applet_callbacks.c +++ b/stickynotes/stickynotes_applet_callbacks.c @@ -335,10 +335,17 @@ void menu_preferences_cb(GtkAction *action, StickyNotesApplet *applet) void menu_help_cb(GtkAction *action, StickyNotesApplet *applet) { GError *error = NULL; +#if GTK_CHECK_VERSION (3, 22, 0) + gtk_show_uri_on_window (NULL, + "help:mate-stickynotes-applet", + gtk_get_current_event_time (), + &error); +#else gtk_show_uri (gtk_widget_get_screen (GTK_WIDGET (applet->w_applet)), - "help:mate-stickynotes-applet", - gtk_get_current_event_time (), - &error); + "help:mate-stickynotes-applet", + gtk_get_current_event_time (), + &error); +#endif if (error) { GtkWidget *dialog = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, _("There was an error displaying help: %s"), error->message); @@ -524,10 +531,17 @@ void preferences_response_cb(GtkWidget *dialog, gint response, gpointer data) { if (response == GTK_RESPONSE_HELP) { GError *error = NULL; +#if GTK_CHECK_VERSION (3, 22, 0) + gtk_show_uri_on_window (GTK_WINDOW (dialog), + "help:mate-stickynotes-applet/stickynotes-advanced-settings", + gtk_get_current_event_time (), + &error); +#else gtk_show_uri (gtk_widget_get_screen (GTK_WIDGET (dialog)), - "help:mate-stickynotes-applet/stickynotes-advanced-settings", - gtk_get_current_event_time (), - &error); + "help:mate-stickynotes-applet/stickynotes-advanced-settings", + gtk_get_current_event_time (), + &error); +#endif if (error) { dialog = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, _("There was an error displaying help: %s"), error->message); |