summaryrefslogtreecommitdiff
path: root/src/gs-job.c
diff options
context:
space:
mode:
authorMartin Wimpress <[email protected]>2017-01-18 14:39:59 +0000
committerGitHub <[email protected]>2017-01-18 14:39:59 +0000
commit00b0f944837025b61bdffd893d4614ed1d5e7dde (patch)
tree41a3450d67f77f98b4b70392eec923ea54013cc0 /src/gs-job.c
parent2197434c213600c42b264602c4331eac7761db11 (diff)
parent5d4416aa5853de486e62ca97207ee1da4b35b199 (diff)
downloadmate-screensaver-00b0f944837025b61bdffd893d4614ed1d5e7dde.tar.bz2
mate-screensaver-00b0f944837025b61bdffd893d4614ed1d5e7dde.tar.xz
Merge pull request #110 from XRevan86/master
Avoid deprecated gdk_window_set_background functions
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 ()));