[ekiga] Call Window: Added a "Close" menu entry.



commit 57fe94ff54246eb126583b57e36352198c82ccec
Author: Damien Sandras <dsandras beip be>
Date:   Sun Mar 11 14:43:57 2012 +0100

    Call Window: Added a "Close" menu entry.

 src/gui/call_window.cpp |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)
---
diff --git a/src/gui/call_window.cpp b/src/gui/call_window.cpp
index ddc109f..208022f 100644
--- a/src/gui/call_window.cpp
+++ b/src/gui/call_window.cpp
@@ -393,6 +393,8 @@ static gboolean on_stats_refresh_cb (gpointer self);
 static gboolean ekiga_call_window_delete_event_cb (GtkWidget *widget,
                                                    G_GNUC_UNUSED GdkEventAny *event);
 
+static void window_closed_from_menu_cb (G_GNUC_UNUSED GtkWidget *,
+                                        gpointer);
 
 /**/
 static void ekiga_call_window_update_calling_state (EkigaCallWindow *cw,
@@ -1327,6 +1329,18 @@ ekiga_call_window_delete_event_cb (GtkWidget *widget,
 }
 
 static void
+window_closed_from_menu_cb (G_GNUC_UNUSED GtkWidget *w,
+                            gpointer data)
+{
+  EkigaCallWindow *cw = NULL;
+
+  cw = EKIGA_CALL_WINDOW (data);
+  g_return_if_fail (EKIGA_IS_CALL_WINDOW (cw));
+
+  ekiga_call_window_delete_event_cb (GTK_WIDGET (cw), NULL);
+}
+
+static void
 ekiga_call_window_update_calling_state (EkigaCallWindow *cw,
 					unsigned calling_state)
 {
@@ -1926,6 +1940,13 @@ ekiga_call_window_init_menu (EkigaCallWindow *cw)
 		     G_CALLBACK (toggle_video_stream_pause_cb),
 		     cw, false),
 
+      GTK_MENU_SEPARATOR,
+
+      GTK_MENU_ENTRY("close", NULL, _("Close the Ekiga window"),
+		     GTK_STOCK_CLOSE, 'W',
+		     G_CALLBACK (window_closed_from_menu_cb),
+		     cw, TRUE),
+
       GTK_MENU_NEW(_("_View")),
 
       GTK_MENU_RADIO_ENTRY("local_video", _("_Local Video"),



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]