]> git.0d.be Git - empathy.git/commitdiff
Keypad is unsensitive if the call is not ACCEPTED
authorXavier Claessens <xclaesse@src.gnome.org>
Thu, 1 May 2008 22:02:48 +0000 (22:02 +0000)
committerXavier Claessens <xclaesse@src.gnome.org>
Thu, 1 May 2008 22:02:48 +0000 (22:02 +0000)
svn path=/trunk/; revision=1072

libempathy/empathy-tp-call.c
src/empathy-call-window.c
src/empathy-call-window.glade

index 32debb8b39ae87fc1b5be03baf905def96b495b4..c5e977d1ce11b9cc5cbcf3cf676a56ad50a3d96a 100644 (file)
@@ -817,7 +817,7 @@ empathy_tp_call_start_tone (EmpathyTpCall *call, TpDTMFEvent event)
   EmpathyTpCallPriv *priv = GET_PRIV (call);
 
   g_return_if_fail (EMPATHY_IS_TP_CALL (call));
-  g_return_if_fail (priv->status != EMPATHY_TP_CALL_STATUS_ACCEPTED);
+  g_return_if_fail (priv->status == EMPATHY_TP_CALL_STATUS_ACCEPTED);
 
   if (!priv->audio->exists)
       return;
@@ -834,7 +834,7 @@ empathy_tp_call_stop_tone (EmpathyTpCall *call)
   EmpathyTpCallPriv *priv = GET_PRIV (call);
 
   g_return_if_fail (EMPATHY_IS_TP_CALL (call));
-  g_return_if_fail (priv->status != EMPATHY_TP_CALL_STATUS_ACCEPTED);
+  g_return_if_fail (priv->status == EMPATHY_TP_CALL_STATUS_ACCEPTED);
 
   if (!priv->audio->exists)
       return;
index cddb1143384adbbaec75eafcf01ce5a546324525..2d52fcf7c4d253bacd14278d17b0911201bd963b 100644 (file)
@@ -58,6 +58,7 @@ typedef struct
   GtkWidget *video_button;
   GtkWidget *hang_up_button;
   GtkWidget *confirmation_dialog;
+  GtkWidget *keypad_expander;
 } EmpathyCallWindow;
 
 static gboolean
@@ -140,6 +141,7 @@ call_window_finalize (EmpathyCallWindow *window)
   gtk_widget_set_sensitive (window->video_button, FALSE);
   gtk_widget_set_sensitive (window->output_volume_button, FALSE);
   gtk_widget_set_sensitive (window->input_volume_button, FALSE);
+  gtk_widget_set_sensitive (window->keypad_expander, FALSE);
 
   if (window->call)
     { 
@@ -365,6 +367,7 @@ call_window_update (EmpathyCallWindow *window)
       gtk_widget_set_sensitive (window->output_volume_button, FALSE);
       gtk_widget_set_sensitive (window->input_volume_button, FALSE);
       gtk_widget_set_sensitive (window->hang_up_button, FALSE);
+      gtk_widget_set_sensitive (window->keypad_expander, FALSE);
     }
   else if (window->status == EMPATHY_TP_CALL_STATUS_PENDING)
     {
@@ -410,6 +413,7 @@ call_window_update (EmpathyCallWindow *window)
       gtk_widget_set_sensitive (window->output_volume_button, TRUE);
       gtk_widget_set_sensitive (window->input_volume_button, TRUE);
       gtk_widget_set_sensitive (window->hang_up_button, TRUE);
+      gtk_widget_set_sensitive (window->keypad_expander, TRUE);
     }
   else if (window->status == EMPATHY_TP_CALL_STATUS_CLOSED)
       call_window_finalize (window);
@@ -480,6 +484,7 @@ empathy_call_window_new (EmpathyTpCall *call)
       "status_label", &window->status_label,
       "video_button", &window->video_button,
       "hang_up_button", &window->hang_up_button,
+      "keypad_expander", &window->keypad_expander,
       NULL);
   g_free (filename);
 
index 8e62c6c320c67ccc295cb128594133992bff65de..684aed3ceadcc2d2f7a33143aa513e6b59836ec9 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--Generated with glade3 3.4.2 on Thu May  1 22:33:28 2008 -->
+<!--Generated with glade3 3.4.2 on Thu May  1 23:37:49 2008 -->
 <glade-interface>
   <widget class="GtkWindow" id="window">
     <child>
               </packing>
             </child>
             <child>
-              <widget class="GtkExpander" id="expander1">
+              <widget class="GtkExpander" id="keypad_expander">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <child>
-                  <widget class="GtkTable" id="table2">
+                  <widget class="GtkTable" id="keypad_table">
                     <property name="visible">True</property>
                     <property name="n_rows">4</property>
                     <property name="n_columns">3</property>
                     <property name="homogeneous">True</property>
                     <child>
-                      <widget class="GtkButton" id="button_hash">
+                      <widget class="GtkButton" id="button_1">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
-                        <property name="label" translatable="yes">#</property>
+                        <property name="label" translatable="yes">1</property>
                         <property name="use_underline">True</property>
                         <property name="response_id">0</property>
                       </widget>
                       <packing>
-                        <property name="left_attach">2</property>
-                        <property name="right_attach">3</property>
-                        <property name="top_attach">3</property>
-                        <property name="bottom_attach">4</property>
                         <property name="y_options"></property>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkButton" id="button_0">
+                      <widget class="GtkButton" id="button_2">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
-                        <property name="label" translatable="yes">0</property>
+                        <property name="label" translatable="yes">2</property>
                         <property name="use_underline">True</property>
                         <property name="response_id">0</property>
                       </widget>
                       <packing>
                         <property name="left_attach">1</property>
                         <property name="right_attach">2</property>
-                        <property name="top_attach">3</property>
-                        <property name="bottom_attach">4</property>
                         <property name="y_options"></property>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkButton" id="button_asterisk">
+                      <widget class="GtkButton" id="button_3">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
-                        <property name="label" translatable="yes">*</property>
+                        <property name="label" translatable="yes">3</property>
                         <property name="use_underline">True</property>
                         <property name="response_id">0</property>
                       </widget>
                       <packing>
-                        <property name="top_attach">3</property>
-                        <property name="bottom_attach">4</property>
+                        <property name="left_attach">2</property>
+                        <property name="right_attach">3</property>
                         <property name="y_options"></property>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkButton" id="button_9">
+                      <widget class="GtkButton" id="button_4">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
-                        <property name="label" translatable="yes">9</property>
+                        <property name="label" translatable="yes">4</property>
                         <property name="use_underline">True</property>
                         <property name="response_id">0</property>
                       </widget>
                       <packing>
-                        <property name="left_attach">2</property>
-                        <property name="right_attach">3</property>
-                        <property name="top_attach">2</property>
-                        <property name="bottom_attach">3</property>
+                        <property name="top_attach">1</property>
+                        <property name="bottom_attach">2</property>
                         <property name="y_options"></property>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkButton" id="button_8">
+                      <widget class="GtkButton" id="button_5">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
-                        <property name="label" translatable="yes">8</property>
+                        <property name="label" translatable="yes">5</property>
                         <property name="use_underline">True</property>
                         <property name="response_id">0</property>
                       </widget>
                       <packing>
                         <property name="left_attach">1</property>
                         <property name="right_attach">2</property>
-                        <property name="top_attach">2</property>
-                        <property name="bottom_attach">3</property>
+                        <property name="top_attach">1</property>
+                        <property name="bottom_attach">2</property>
                         <property name="y_options"></property>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkButton" id="button_7">
+                      <widget class="GtkButton" id="button_6">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
-                        <property name="label" translatable="yes">7</property>
+                        <property name="label" translatable="yes">6</property>
                         <property name="use_underline">True</property>
                         <property name="response_id">0</property>
                       </widget>
                       <packing>
-                        <property name="top_attach">2</property>
-                        <property name="bottom_attach">3</property>
+                        <property name="left_attach">2</property>
+                        <property name="right_attach">3</property>
+                        <property name="top_attach">1</property>
+                        <property name="bottom_attach">2</property>
                         <property name="y_options"></property>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkButton" id="button_6">
+                      <widget class="GtkButton" id="button_7">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
-                        <property name="label" translatable="yes">6</property>
+                        <property name="label" translatable="yes">7</property>
                         <property name="use_underline">True</property>
                         <property name="response_id">0</property>
                       </widget>
                       <packing>
-                        <property name="left_attach">2</property>
-                        <property name="right_attach">3</property>
-                        <property name="top_attach">1</property>
-                        <property name="bottom_attach">2</property>
+                        <property name="top_attach">2</property>
+                        <property name="bottom_attach">3</property>
                         <property name="y_options"></property>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkButton" id="button_5">
+                      <widget class="GtkButton" id="button_8">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
-                        <property name="label" translatable="yes">5</property>
+                        <property name="label" translatable="yes">8</property>
                         <property name="use_underline">True</property>
                         <property name="response_id">0</property>
                       </widget>
                       <packing>
                         <property name="left_attach">1</property>
                         <property name="right_attach">2</property>
-                        <property name="top_attach">1</property>
-                        <property name="bottom_attach">2</property>
+                        <property name="top_attach">2</property>
+                        <property name="bottom_attach">3</property>
                         <property name="y_options"></property>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkButton" id="button_4">
+                      <widget class="GtkButton" id="button_9">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
-                        <property name="label" translatable="yes">4</property>
+                        <property name="label" translatable="yes">9</property>
                         <property name="use_underline">True</property>
                         <property name="response_id">0</property>
                       </widget>
                       <packing>
-                        <property name="top_attach">1</property>
-                        <property name="bottom_attach">2</property>
+                        <property name="left_attach">2</property>
+                        <property name="right_attach">3</property>
+                        <property name="top_attach">2</property>
+                        <property name="bottom_attach">3</property>
                         <property name="y_options"></property>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkButton" id="button_3">
+                      <widget class="GtkButton" id="button_asterisk">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
-                        <property name="label" translatable="yes">3</property>
+                        <property name="label" translatable="yes">*</property>
                         <property name="use_underline">True</property>
                         <property name="response_id">0</property>
                       </widget>
                       <packing>
-                        <property name="left_attach">2</property>
-                        <property name="right_attach">3</property>
+                        <property name="top_attach">3</property>
+                        <property name="bottom_attach">4</property>
                         <property name="y_options"></property>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkButton" id="button_2">
+                      <widget class="GtkButton" id="button_0">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
-                        <property name="label" translatable="yes">2</property>
+                        <property name="label" translatable="yes">0</property>
                         <property name="use_underline">True</property>
                         <property name="response_id">0</property>
                       </widget>
                       <packing>
                         <property name="left_attach">1</property>
                         <property name="right_attach">2</property>
+                        <property name="top_attach">3</property>
+                        <property name="bottom_attach">4</property>
                         <property name="y_options"></property>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkButton" id="button_1">
+                      <widget class="GtkButton" id="button_hash">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
-                        <property name="label" translatable="yes">1</property>
+                        <property name="label" translatable="yes">#</property>
                         <property name="use_underline">True</property>
                         <property name="response_id">0</property>
                       </widget>
                       <packing>
+                        <property name="left_attach">2</property>
+                        <property name="right_attach">3</property>
+                        <property name="top_attach">3</property>
+                        <property name="bottom_attach">4</property>
                         <property name="y_options"></property>
                       </packing>
                     </child>