[gnome-desktop/gnome-2-32] Do not use deprecated gdk_display
- From: Vincent Untz <vuntz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-desktop/gnome-2-32] Do not use deprecated gdk_display
- Date: Mon, 13 Sep 2010 09:01:11 +0000 (UTC)
commit 6b9651f4e2a3de70c254ff9dc15604fa1ad8bc54
Author: Vincent Untz <vuntz gnome org>
Date: Mon Sep 13 05:51:15 2010 +0200
Do not use deprecated gdk_display
libgnome-desktop/gnome-desktop-item.c | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/libgnome-desktop/gnome-desktop-item.c b/libgnome-desktop/gnome-desktop-item.c
index b1fa3b3..0e1e07f 100644
--- a/libgnome-desktop/gnome-desktop-item.c
+++ b/libgnome-desktop/gnome-desktop-item.c
@@ -1750,6 +1750,7 @@ ditem_execute (const GnomeDesktopItem *item,
char *exec_locale;
int launched = 0;
#ifdef HAVE_STARTUP_NOTIFICATION
+ GdkDisplay *gdkdisplay;
SnLauncherContext *sn_context;
SnDisplay *sn_display;
const char *startup_class;
@@ -1786,7 +1787,12 @@ ditem_execute (const GnomeDesktopItem *item,
arg_ptr = make_args (file_list);
#ifdef HAVE_STARTUP_NOTIFICATION
- sn_display = sn_display_new (gdk_display,
+ if (screen)
+ gdkdisplay = gdk_screen_get_display (screen);
+ else
+ gdkdisplay = gdk_display_get_default ();
+
+ sn_display = sn_display_new (GDK_DISPLAY_XDISPLAY (gdkdisplay),
sn_error_trap_push,
sn_error_trap_pop);
@@ -1805,7 +1811,7 @@ ditem_execute (const GnomeDesktopItem *item,
sn_context = sn_launcher_context_new (sn_display,
screen ? gdk_screen_get_number (screen) :
- DefaultScreen (gdk_display));
+ DefaultScreen (GDK_DISPLAY_XDISPLAY (gdkdisplay)));
name = gnome_desktop_item_get_localestring (item,
GNOME_DESKTOP_ITEM_NAME);
@@ -1926,10 +1932,8 @@ ditem_execute (const GnomeDesktopItem *item,
if (item->launch_time > 0)
launch_time = item->launch_time;
- else if (screen != NULL)
- launch_time = gdk_x11_display_get_user_time (gdk_screen_get_display (screen));
else
- launch_time = gdk_x11_display_get_user_time (gdk_display_get_default ());
+ launch_time = gdk_x11_display_get_user_time (gdkdisplay);
sn_launcher_context_initiate (sn_context,
g_get_prgname () ? g_get_prgname () : "unknown",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]