summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZenWalker <[email protected]>2017-07-13 14:54:17 +0200
committerZenWalker <[email protected]>2017-07-13 14:54:17 +0200
commit9c1aa14602d524a1898ae15fa59a122c34787d30 (patch)
tree67cb602b5c41b0f6952869f662ec567bac9a4556
parent4c2ed0e7d7221b6ff7d570012f31bb76796cc38a (diff)
downloadpluma-9c1aa14602d524a1898ae15fa59a122c34787d30.tar.bz2
pluma-9c1aa14602d524a1898ae15fa59a122c34787d30.tar.xz
avoid deprecated gdk_display_get_screen and gdk_screen_get_number
-rw-r--r--pluma/pluma-app.c5
-rw-r--r--pluma/pluma.c6
-rw-r--r--pluma/smclient/eggdesktopfile.c8
3 files changed, 9 insertions, 10 deletions
diff --git a/pluma/pluma-app.c b/pluma/pluma-app.c
index 90ed1b64..0c5d9bc1 100644
--- a/pluma/pluma-app.c
+++ b/pluma/pluma-app.c
@@ -36,6 +36,7 @@
#include <unistd.h>
#include <glib/gi18n.h>
+#include <gdk/gdkx.h>
#include "pluma-app.h"
#include "pluma-prefs-manager-app.h"
@@ -649,12 +650,12 @@ is_in_viewport (PlumaWindow *window,
/* Check for screen and display match */
display = gdk_screen_get_display (screen);
cur_name = gdk_display_get_name (display);
- cur_n = gdk_screen_get_number (screen);
+ cur_n = gdk_x11_screen_get_screen_number (screen);
s = gtk_window_get_screen (GTK_WINDOW (window));
display = gdk_screen_get_display (s);
name = gdk_display_get_name (display);
- n = gdk_screen_get_number (s);
+ n = gdk_x11_screen_get_screen_number (s);
if (strcmp (cur_name, name) != 0 || cur_n != n)
return FALSE;
diff --git a/pluma/pluma.c b/pluma/pluma.c
index 05af17cd..532f6a4b 100644
--- a/pluma/pluma.c
+++ b/pluma/pluma.c
@@ -251,7 +251,6 @@ on_message_received (const char *message,
gint viewport_x;
gint viewport_y;
gchar *display_name;
- gint screen_number;
gint i;
PlumaApp *app;
PlumaWindow *window;
@@ -268,7 +267,6 @@ on_message_received (const char *message,
params = g_strsplit (commands[0], "\t", 6);
startup_timestamp = atoi (params[0]);
display_name = params[1];
- screen_number = atoi (params[2]);
workspace = atoi (params[3]);
viewport_x = atoi (params[4]);
viewport_y = atoi (params[5]);
@@ -281,7 +279,7 @@ on_message_received (const char *message,
goto out;
}
- screen = gdk_display_get_screen (display, screen_number);
+ screen = gdk_display_get_default_screen (display);
g_strfreev (params);
@@ -424,7 +422,7 @@ send_bacon_message (void)
display = gdk_screen_get_display (screen);
display_name = gdk_display_get_name (display);
- screen_number = gdk_screen_get_number (screen);
+ screen_number = gdk_x11_screen_get_screen_number (screen);
pluma_debug_message (DEBUG_APP, "Display: %s", display_name);
pluma_debug_message (DEBUG_APP, "Screen: %d", screen_number);
diff --git a/pluma/smclient/eggdesktopfile.c b/pluma/smclient/eggdesktopfile.c
index 384fd475..f7c231a8 100644
--- a/pluma/smclient/eggdesktopfile.c
+++ b/pluma/smclient/eggdesktopfile.c
@@ -1185,7 +1185,7 @@ egg_desktop_file_launchv (EggDesktopFile *desktop_file,
display = gdk_display_get_default ();
screen = gdk_display_get_default_screen (display);
}
- screen_num = gdk_screen_get_number (screen);
+ screen_num = gdk_x11_screen_get_screen_number (screen);
translated_documents = translate_document_list (desktop_file, documents);
docs = translated_documents;
@@ -1364,7 +1364,7 @@ egg_desktop_file_launch (EggDesktopFile *desktop_file,
EGG_DESKTOP_FILE_ERROR_NOT_LAUNCHABLE,
_("Can't pass document URIs to a 'Type=Link' desktop entry"));
return FALSE;
- }
+ }
if (!parse_link (desktop_file, &app_desktop_file, &documents, error))
return FALSE;
@@ -1483,10 +1483,10 @@ egg_set_desktop_file_without_defaults (const char *desktop_file_path)
/**
* egg_get_desktop_file:
- *
+ *
* Gets the application's #EggDesktopFile, as set by
* egg_set_desktop_file().
- *
+ *
* Return value: the #EggDesktopFile, or %NULL if it hasn't been set.
**/
EggDesktopFile *