diff options
author | ZenWalker <[email protected]> | 2017-07-22 01:13:14 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2017-08-03 10:28:24 +0200 |
commit | da4ee916b749bdb1baa1f66c828f884392f8086d (patch) | |
tree | 20e577c986a6ced656a31ff46ce8914f518c4bf3 | |
parent | 2dd0cfd83a29b5a9897d250996fd6b1658dee617 (diff) | |
download | atril-da4ee916b749bdb1baa1f66c828f884392f8086d.tar.bz2 atril-da4ee916b749bdb1baa1f66c828f884392f8086d.tar.xz |
avoid deprecated gdk_display_get_screen and gdk_display_get_n_screens
-rw-r--r-- | shell/ev-application.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/shell/ev-application.c b/shell/ev-application.c index a7e3a708..96be3bc7 100644 --- a/shell/ev-application.c +++ b/shell/ev-application.c @@ -734,7 +734,6 @@ method_call_cb (GDBusConnection *connection, const gchar *key; GVariant *value; GdkDisplay *display = NULL; - int screen_number = 0; EvLinkDest *dest = NULL; EvWindowRunMode mode = EV_WINDOW_MODE_NORMAL; const gchar *search_string = NULL; @@ -746,8 +745,6 @@ method_call_cb (GDBusConnection *connection, while (g_variant_iter_loop (iter, "{&sv}", &key, &value)) { if (strcmp (key, "display") == 0 && g_variant_classify (value) == G_VARIANT_CLASS_STRING) { display = ev_display_open_if_needed (g_variant_get_string (value, NULL)); - } else if (strcmp (key, "screen") == 0 && g_variant_classify (value) == G_VARIANT_CLASS_STRING) { - screen_number = g_variant_get_int32 (value); } else if (strcmp (key, "mode") == 0 && g_variant_classify (value) == G_VARIANT_CLASS_UINT32) { mode = g_variant_get_uint32 (value); } else if (strcmp (key, "page-label") == 0 && g_variant_classify (value) == G_VARIANT_CLASS_STRING) { @@ -762,10 +759,8 @@ method_call_cb (GDBusConnection *connection, } g_variant_iter_free (iter); - if (display != NULL && - screen_number >= 0 && - screen_number < gdk_display_get_n_screens (display)) - screen = gdk_display_get_screen (display, screen_number); + if (display != NULL) + screen = gdk_display_get_default_screen (display); else screen = gdk_screen_get_default (); |