[empathy] Don't use deprecated gdk_app_launch_context_new()
- From: Emilio Pozuelo Monfort <epm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] Don't use deprecated gdk_app_launch_context_new()
- Date: Tue, 11 Jan 2011 11:38:53 +0000 (UTC)
commit 2392932b2eed456f7d5b39d0a9eb839194dfb0e1
Author: Emilio Pozuelo Monfort <emilio pozuelo collabora co uk>
Date: Mon Jan 10 17:12:47 2011 +0000
Don't use deprecated gdk_app_launch_context_new()
libempathy-gtk/empathy-account-widget.c | 6 +++---
src/empathy-accounts-dialog.c | 5 +++--
src/empathy-main-window.c | 8 +++-----
3 files changed, 9 insertions(+), 10 deletions(-)
---
diff --git a/libempathy-gtk/empathy-account-widget.c b/libempathy-gtk/empathy-account-widget.c
index 591c964..b6e84aa 100644
--- a/libempathy-gtk/empathy-account-widget.c
+++ b/libempathy-gtk/empathy-account-widget.c
@@ -1090,6 +1090,7 @@ account_widget_launch_external_clicked (GtkWidget *button,
GDesktopAppInfo *desktop_info;
GError *error = NULL;
GdkAppLaunchContext *context = NULL;
+ GdkDisplay *display;
gchar *cmd;
GAppInfo *app_info;
@@ -1114,9 +1115,8 @@ account_widget_launch_external_clicked (GtkWidget *button,
goto out;
}
- context = gdk_app_launch_context_new ();
- gdk_app_launch_context_set_screen (context,
- gtk_widget_get_screen (button));
+ display = gdk_display_get_default ();
+ context = gdk_display_get_app_launch_context (display);
if (!g_app_info_launch (app_info, NULL, (GAppLaunchContext *) context,
&error))
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c
index 196ffce..f1a2114 100644
--- a/src/empathy-accounts-dialog.c
+++ b/src/empathy-accounts-dialog.c
@@ -2389,6 +2389,7 @@ empathy_accounts_dialog_show_application (GdkScreen *screen,
gboolean hidden)
{
GError *error = NULL;
+ GdkDisplay *display;
GString *cmd;
gchar *path;
GAppInfo *app_info;
@@ -2435,8 +2436,8 @@ empathy_accounts_dialog_show_application (GdkScreen *screen,
goto out;
}
- context = gdk_app_launch_context_new ();
- gdk_app_launch_context_set_display (context, gdk_screen_get_display (screen));
+ display = gdk_screen_get_display (screen);
+ context = gdk_display_get_app_launch_context (display);
if (!g_app_info_launch (app_info, NULL, (GAppLaunchContext *) context,
&error))
diff --git a/src/empathy-main-window.c b/src/empathy-main-window.c
index 88335b6..740220b 100644
--- a/src/empathy-main-window.c
+++ b/src/empathy-main-window.c
@@ -1479,14 +1479,12 @@ static void
main_window_help_debug_cb (GtkAction *action,
EmpathyMainWindow *window)
{
- GdkScreen *screen = gdk_screen_get_default ();
+ GdkDisplay *display;
GError *error = NULL;
gchar *path;
GAppInfo *app_info;
GdkAppLaunchContext *context = NULL;
- g_return_if_fail (GDK_IS_SCREEN (screen));
-
/* Try to run from source directory if possible */
path = g_build_filename (g_getenv ("EMPATHY_SRCDIR"), "src",
"empathy-debugger", NULL);
@@ -1503,8 +1501,8 @@ main_window_help_debug_cb (GtkAction *action,
goto out;
}
- context = gdk_app_launch_context_new ();
- gdk_app_launch_context_set_display (context, gdk_screen_get_display (screen));
+ display = gdk_display_get_default ();
+ context = gdk_display_get_app_launch_context (display);
if (!g_app_info_launch (app_info, NULL, (GAppLaunchContext *) context,
&error)) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]