summaryrefslogtreecommitdiff
path: root/eel/eel-gnome-extensions.c
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@gnome.org>2010-12-26 16:20:00 +0100
committerCosimo Cecchi <cosimoc@gnome.org>2010-12-26 16:20:00 +0100
commitbd151c8174796c1c5b0b6466ef8a0e3a0e214054 (patch)
treebd921186a4eca7a07028fdd84fe38dedddd42eb3 /eel/eel-gnome-extensions.c
parent2ff006dd583f58ff2dd687f538e59757a8bd70c4 (diff)
downloadnautilus-bd151c8174796c1c5b0b6466ef8a0e3a0e214054.tar.gz
general: don't use deprecated gdk_app_launch_context_new()
Diffstat (limited to 'eel/eel-gnome-extensions.c')
-rw-r--r--eel/eel-gnome-extensions.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/eel/eel-gnome-extensions.c b/eel/eel-gnome-extensions.c
index fbe74378e..73e9378f2 100644
--- a/eel/eel-gnome-extensions.c
+++ b/eel/eel-gnome-extensions.c
@@ -144,7 +144,7 @@ get_terminal_command_prefix (gboolean for_command)
return command;
}
-char *
+static char *
eel_gnome_make_terminal_command (const char *command)
{
char *prefix, *quoted, *terminal_command;
@@ -168,6 +168,7 @@ eel_gnome_open_terminal_on_screen (const char *command,
GAppInfo *app;
GdkAppLaunchContext *ctx;
GError *error = NULL;
+ GdkDisplay *display;
command_line = eel_gnome_make_terminal_command (command);
if (command_line == NULL) {
@@ -178,7 +179,8 @@ eel_gnome_open_terminal_on_screen (const char *command,
app = g_app_info_create_from_commandline (command_line, NULL, 0, &error);
if (app != NULL && screen != NULL) {
- ctx = gdk_app_launch_context_new ();
+ display = gdk_screen_get_display (screen);
+ ctx = gdk_display_get_app_launch_context (display);
gdk_app_launch_context_set_screen (ctx, screen);
g_app_info_launch (app, NULL, G_APP_LAUNCH_CONTEXT (ctx), &error);
@@ -195,9 +197,3 @@ eel_gnome_open_terminal_on_screen (const char *command,
g_free (command_line);
}
-
-void
-eel_gnome_open_terminal (const char *command)
-{
- eel_gnome_open_terminal_on_screen (command, NULL);
-}