summaryrefslogtreecommitdiff
path: root/src/gs-job.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gs-job.c')
-rw-r--r--src/gs-job.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gs-job.c b/src/gs-job.c
index 009de4d..e0d4d3e 100644
--- a/src/gs-job.c
+++ b/src/gs-job.c
@@ -260,9 +260,10 @@ nice_process (int pid,
static GPtrArray *
get_env_vars (GtkWidget *widget)
{
- GPtrArray *env;
- char *str;
- int i;
+ GPtrArray *env;
+ const gchar *display_name;
+ gchar *str;
+ int i;
static const char *allowed_env_vars [] =
{
"PATH",
@@ -276,9 +277,8 @@ get_env_vars (GtkWidget *widget)
env = g_ptr_array_new ();
- str = gdk_screen_make_display_name (gtk_widget_get_screen (widget));
- g_ptr_array_add (env, g_strdup_printf ("DISPLAY=%s", str));
- g_free (str);
+ display_name = gdk_display_get_name (gtk_widget_get_display (widget));
+ g_ptr_array_add (env, g_strdup_printf ("DISPLAY=%s", display_name));
g_ptr_array_add (env, g_strdup_printf ("HOME=%s",
g_get_home_dir ()));