diff options
author | Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk> | 2011-08-02 20:26:11 +0800 |
---|---|---|
committer | Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk> | 2011-08-04 17:10:19 +0800 |
commit | 726b480efacd222976fe99200598b294ff8686b8 (patch) | |
tree | c1fde273fb65431add2bee94054a52ca4ce15e3e /src/empathy-call-window.c | |
parent | d89a90c582166d20b9a5c165d5784e434fc1de7f (diff) | |
download | gsoc2013-empathy-726b480efacd222976fe99200598b294ff8686b8.tar gsoc2013-empathy-726b480efacd222976fe99200598b294ff8686b8.tar.gz gsoc2013-empathy-726b480efacd222976fe99200598b294ff8686b8.tar.bz2 gsoc2013-empathy-726b480efacd222976fe99200598b294ff8686b8.tar.lz gsoc2013-empathy-726b480efacd222976fe99200598b294ff8686b8.tar.xz gsoc2013-empathy-726b480efacd222976fe99200598b294ff8686b8.tar.zst gsoc2013-empathy-726b480efacd222976fe99200598b294ff8686b8.zip |
CallWindow: add a 'Call log' menu
https://bugzilla.gnome.org/show_bug.cgi?id=655884
Diffstat (limited to 'src/empathy-call-window.c')
-rw-r--r-- | src/empathy-call-window.c | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c index bcbadc7e0..2d7d53efd 100644 --- a/src/empathy-call-window.c +++ b/src/empathy-call-window.c @@ -738,6 +738,51 @@ empathy_call_window_contents_cb (GtkAction *action, } static void +empathy_call_window_debug_cb (GtkAction *action, + EmpathyCallWindow *self) +{ + GdkDisplay *display; + GError *error = NULL; + gchar *path; + GAppInfo *app_info; + GdkAppLaunchContext *context = NULL; + + /* Try to run from source directory if possible */ + path = g_build_filename (g_getenv ("EMPATHY_SRCDIR"), "src", + "empathy-debugger", NULL); + + if (!g_file_test (path, G_FILE_TEST_EXISTS)) + { + g_free (path); + path = g_build_filename (BIN_DIR, "empathy-debugger", NULL); + } + + app_info = g_app_info_create_from_commandline (path, NULL, 0, &error); + if (app_info == NULL) + { + DEBUG ("Failed to create app info: %s", error->message); + g_error_free (error); + goto out; + } + + display = gdk_display_get_default (); + context = gdk_display_get_app_launch_context (display); + + if (!g_app_info_launch (app_info, NULL, (GAppLaunchContext *) context, + &error)) + { + g_warning ("Failed to open debug window: %s", error->message); + g_error_free (error); + goto out; + } + +out: + tp_clear_object (&app_info); + tp_clear_object (&context); + g_free (path); +} + +static void empathy_call_window_about_cb (GtkAction *action, EmpathyCallWindow *self) { @@ -839,6 +884,7 @@ empathy_call_window_init (EmpathyCallWindow *self) "dialpad", "toggled", empathy_call_window_dialpad_cb, "menufullscreen", "activate", empathy_call_window_fullscreen_cb, "menucontents", "activate", empathy_call_window_contents_cb, + "menudebug", "activate", empathy_call_window_debug_cb, "menuabout", "activate", empathy_call_window_about_cb, "menupreviewdisable", "activate", empathy_call_window_disable_camera_cb, "menupreviewminimise", "activate", empathy_call_window_minimise_camera_cb, |