summaryrefslogtreecommitdiff
path: root/applets/fish
diff options
context:
space:
mode:
authorZenWalker <[email protected]>2017-08-02 01:01:14 +0200
committerZenWalker <[email protected]>2017-08-02 01:01:14 +0200
commite3e2e8775f5509ce2bb60dedb28347b29404fd47 (patch)
treecccbf75e34ad06e6d83b59fd3884fad7deb1f967 /applets/fish
parentd5fa1884a1bcd93235f36b06bcc00a4c3646554d (diff)
downloadmate-panel-e3e2e8775f5509ce2bb60dedb28347b29404fd47.tar.bz2
mate-panel-e3e2e8775f5509ce2bb60dedb28347b29404fd47.tar.xz
avoid deprecated gdk_screen_make_display_name
Diffstat (limited to 'applets/fish')
-rw-r--r--applets/fish/fish.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/applets/fish/fish.c b/applets/fish/fish.c
index dd06b9a4..37fbb13d 100644
--- a/applets/fish/fish.c
+++ b/applets/fish/fish.c
@@ -813,8 +813,9 @@ static void display_fortune_dialog(FishApplet* fish)
const char *charset;
int argc;
char **argv;
- GdkScreen *screen;
- char *display;
+ GdkDisplay *display;
+ GdkScreen *screen;
+ char *display_name;
/* if there is still a pipe, close it */
if (fish->source_id)
@@ -938,19 +939,20 @@ static void display_fortune_dialog(FishApplet* fish)
clear_fortune_text (fish);
screen = gtk_widget_get_screen (GTK_WIDGET (fish));
- display = gdk_screen_make_display_name (screen);
+ display = gdk_screen_get_display (screen);
+ display_name = g_strdup (gdk_display_get_name (display));
g_spawn_async_with_pipes (NULL, /* working directory */
argv,
NULL, /* envp */
G_SPAWN_SEARCH_PATH|G_SPAWN_STDERR_TO_DEV_NULL,
set_environment,
- &display,
+ &display_name,
NULL, /* child pid */
NULL, /* stdin */
&output,
NULL, /* stderr */
&error);
- g_free (display);
+ g_free (display_name);
if (error) {
char *message;