]> git.0d.be Git - empathy.git/commitdiff
CallWindow: add a dialpad menu entry
authorEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Thu, 2 Jun 2011 10:29:00 +0000 (11:29 +0100)
committerEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Thu, 9 Jun 2011 09:20:08 +0000 (10:20 +0100)
src/empathy-call-window.c
src/empathy-call-window.ui

index d9a7bb1b6e1267a0febf3d49d03a87c1443660de..40024b9ef01dd6f5464a36d16564bacfc6b53f37 100644 (file)
@@ -124,6 +124,7 @@ struct _EmpathyCallWindowPriv
   GtkWidget *toolbar;
   GtkWidget *pane;
   GtkAction *redial;
+  GtkAction *menu_dialpad;
   GtkAction *menu_fullscreen;
   GtkAction *action_camera_on;
   GtkWidget *tool_button_camera_off;
@@ -262,6 +263,9 @@ static void empathy_call_window_video_menu_popup (EmpathyCallWindow *window,
 static void empathy_call_window_redial_cb (gpointer object,
   EmpathyCallWindow *window);
 
+static void empathy_call_window_dialpad_cb (gpointer object,
+  EmpathyCallWindow *window);
+
 static void empathy_call_window_restart_call (EmpathyCallWindow *window);
 
 static void empathy_call_window_status_message (EmpathyCallWindow *window,
@@ -1019,6 +1023,7 @@ empathy_call_window_init (EmpathyCallWindow *self)
     "microphone", &priv->mic_button,
     "toolbar", &priv->toolbar,
     "menuredial", &priv->redial,
+    "menudialpad", &priv->menu_dialpad,
     "ui_manager", &priv->ui_manager,
     "menufullscreen", &priv->menu_fullscreen,
     "camera_off", &priv->tool_button_camera_off,
@@ -1046,6 +1051,7 @@ empathy_call_window_init (EmpathyCallWindow *self)
     "hangup", "clicked", empathy_call_window_hangup_cb,
     "menuredial", "activate", empathy_call_window_redial_cb,
     "redial", "clicked", empathy_call_window_redial_cb,
+    "menudialpad", "activate", empathy_call_window_dialpad_cb,
     "microphone", "toggled", empathy_call_window_mic_toggled_cb,
     "menufullscreen", "activate", empathy_call_window_fullscreen_cb,
     "camera_off", "toggled", tool_button_camera_off_toggled_cb,
@@ -3065,6 +3071,18 @@ empathy_call_window_redial_cb (gpointer object,
     empathy_call_window_restart_call (window);
 }
 
+static void
+empathy_call_window_dialpad_cb (gpointer object,
+    EmpathyCallWindow *window)
+{
+  EmpathyCallWindowPriv *priv = GET_PRIV (window);
+
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->sidebar_button),
+      TRUE);
+  empathy_sidebar_set_page (EMPATHY_SIDEBAR (priv->sidebar),
+      priv->dtmf_panel);
+}
+
 static void
 empathy_call_window_fullscreen_cb (gpointer object,
                                    EmpathyCallWindow *window)
index ecd00dfc1bdf9e19a01780daf3d3b36faecd53d4..3a460ed688c348a7a141d075171a3be7c6f28fa9 100644 (file)
             <property name="sensitive">False</property>
           </object>
         </child>
+        <child>
+          <object class="GtkAction" id="menudialpad">
+            <property name="name">menudialpad</property>
+            <property name="label" translatable="yes">_Dialpad</property>
+          </object>
+        </child>
         <child>
           <object class="GtkAction" id="camera">
             <property name="name">camera</property>
@@ -82,6 +88,7 @@
         <menu action="call">
           <menuitem action="menuhangup"/>
           <menuitem action="menuredial"/>
+          <menuitem action="menudialpad"/>
         </menu>
         <menu action="camera">
           <menuitem action="action_camera_off"/>