summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudio Saavedra <[email protected]>2010-12-23 00:13:09 +0200
committerraveit65 <[email protected]>2018-07-11 08:39:23 +0200
commit17e6cdbb2c64db060090e57c96e18da2fd6b7873 (patch)
treedf9f49c1fb37f91a1e9e60bf0cb81592320f9683
parent7dbd1b882441baf49c56592c164f4dc2a4e67107 (diff)
downloadeom-17e6cdbb2c64db060090e57c96e18da2fd6b7873.tar.bz2
eom-17e6cdbb2c64db060090e57c96e18da2fd6b7873.tar.xz
Replace gdk_spawn_command_line_on_screen()
with g_app_info_launch() origin commit: https://gitlab.gnome.org/GNOME/eog/commit/ec6c243 https://gitlab.gnome.org/GNOME/eog/commit/adc355d
-rw-r--r--src/eom-window.c38
1 files changed, 32 insertions, 6 deletions
diff --git a/src/eom-window.c b/src/eom-window.c
index 2ba22d4..bb8c6d9 100644
--- a/src/eom-window.c
+++ b/src/eom-window.c
@@ -2668,13 +2668,39 @@ static void
wallpaper_info_bar_response (GtkInfoBar *bar, gint response, EomWindow *window)
{
if (response == GTK_RESPONSE_YES) {
- GdkScreen *screen;
+ GAppInfo *app_info;
+ GError *error = NULL;
+
+ app_info = g_app_info_create_from_commandline ("mate-appearance-properties --show-page=background",
+ "mate-appearance-properties",
+ G_APP_INFO_CREATE_NONE,
+ &error);
+
+ if (error != NULL) {
+ g_warning ("%s%s", _("Error launching appearance preferences dialog: "),
+ error->message);
+ g_error_free (error);
+ error = NULL;
+ }
+
+ if (app_info != NULL) {
+ GdkAppLaunchContext *context;
+ GdkDisplay *display;
- screen = gtk_widget_get_screen (GTK_WIDGET (window));
- mate_gdk_spawn_command_line_on_screen (screen,
- "mate-appearance-properties"
- " --show-page=background",
- NULL);
+ display = gtk_widget_get_display (GTK_WIDGET (window));
+ context = gdk_display_get_app_launch_context (display);
+ g_app_info_launch (app_info, NULL, G_APP_LAUNCH_CONTEXT (context), &error);
+
+ if (error != NULL) {
+ g_warning ("%s%s", _("Error launching appearance preferences dialog: "),
+ error->message);
+ g_error_free (error);
+ error = NULL;
+ }
+
+ g_object_unref (context);
+ g_object_unref (app_info);
+ }
}
/* Close message area on every response */