aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhark <hark@puscii.nl>2014-02-13 19:12:36 +0000
committerhark <hark@puscii.nl>2014-02-13 19:12:36 +0000
commitc9b9ccb4b65c1337fe2d6525b407968d39c72541 (patch)
tree1f86d51f918cc306cfee993c50b110875a8754b1
parent869a7dd06dc00b10a57a72071ad2c8052cc48bbf (diff)
downloadgnunet-gtk-c9b9ccb4b65c1337fe2d6525b407968d39c72541.tar.gz
gnunet-gtk-c9b9ccb4b65c1337fe2d6525b407968d39c72541.zip
fix: didn't show resume button when a call was suspended
-rw-r--r--contrib/gnunet_conversation_gtk_main_window.glade35
-rw-r--r--src/conversation/gnunet-conversation-gtk.c11
2 files changed, 31 insertions, 15 deletions
diff --git a/contrib/gnunet_conversation_gtk_main_window.glade b/contrib/gnunet_conversation_gtk_main_window.glade
index f23b3168..4bdd831c 100644
--- a/contrib/gnunet_conversation_gtk_main_window.glade
+++ b/contrib/gnunet_conversation_gtk_main_window.glade
@@ -2,6 +2,14 @@
2<interface> 2<interface>
3 <!-- interface-requires gtk+ 3.0 --> 3 <!-- interface-requires gtk+ 3.0 -->
4 <object class="GtkAction" id="action1"/> 4 <object class="GtkAction" id="action1"/>
5 <object class="GtkListStore" id="gnunet_conversation_gtk_contacts_liststore">
6 <columns>
7 <!-- column-name contactName -->
8 <column type="gchararray"/>
9 <!-- column-name contactType -->
10 <column type="gchararray"/>
11 </columns>
12 </object>
5 <object class="GtkListStore" id="gnunet_conversation_gtk_contacts_zone_liststore"> 13 <object class="GtkListStore" id="gnunet_conversation_gtk_contacts_zone_liststore">
6 <columns> 14 <columns>
7 <!-- column-name ego_name --> 15 <!-- column-name ego_name -->
@@ -224,6 +232,21 @@
224 </packing> 232 </packing>
225 </child> 233 </child>
226 <child> 234 <child>
235 <object class="GtkLabel" id="GNUNET_CONVERSATION_GTK_my_address">
236 <property name="visible">True</property>
237 <property name="can_focus">False</property>
238 <property name="tooltip_text" translatable="yes">This is the address the phone is listening on.</property>
239 <property name="label" translatable="yes">my address</property>
240 <property name="selectable">True</property>
241 <property name="single_line_mode">True</property>
242 </object>
243 <packing>
244 <property name="expand">False</property>
245 <property name="fill">True</property>
246 <property name="position">1</property>
247 </packing>
248 </child>
249 <child>
227 <object class="GtkBox" id="outgoing_ego_chooser_box"> 250 <object class="GtkBox" id="outgoing_ego_chooser_box">
228 <property name="visible">True</property> 251 <property name="visible">True</property>
229 <property name="can_focus">False</property> 252 <property name="can_focus">False</property>
@@ -265,7 +288,7 @@
265 <packing> 288 <packing>
266 <property name="expand">False</property> 289 <property name="expand">False</property>
267 <property name="fill">True</property> 290 <property name="fill">True</property>
268 <property name="position">1</property> 291 <property name="position">2</property>
269 </packing> 292 </packing>
270 </child> 293 </child>
271 <child> 294 <child>
@@ -543,7 +566,7 @@
543 <packing> 566 <packing>
544 <property name="expand">False</property> 567 <property name="expand">False</property>
545 <property name="fill">True</property> 568 <property name="fill">True</property>
546 <property name="position">2</property> 569 <property name="position">3</property>
547 </packing> 570 </packing>
548 </child> 571 </child>
549 </object> 572 </object>
@@ -899,14 +922,6 @@
899 <column type="gint"/> 922 <column type="gint"/>
900 </columns> 923 </columns>
901 </object> 924 </object>
902 <object class="GtkListStore" id="gnunet_conversation_gtk_contacts_liststore">
903 <columns>
904 <!-- column-name contactName -->
905 <column type="gchararray"/>
906 <!-- column-name contactType -->
907 <column type="gchararray"/>
908 </columns>
909 </object>
910 <object class="GtkListStore" id="gnunet_conversation_gtk_history_liststore"> 925 <object class="GtkListStore" id="gnunet_conversation_gtk_history_liststore">
911 <columns> 926 <columns>
912 <!-- column-name logTime --> 927 <!-- column-name logTime -->
diff --git a/src/conversation/gnunet-conversation-gtk.c b/src/conversation/gnunet-conversation-gtk.c
index 74ecc238..238e1475 100644
--- a/src/conversation/gnunet-conversation-gtk.c
+++ b/src/conversation/gnunet-conversation-gtk.c
@@ -792,12 +792,10 @@ do_suspend (struct GNUNET_CONVERSATION_Caller *sel_caller)
792 792
793// GNUNET_assert (NULL != cl_active); 793// GNUNET_assert (NULL != cl_active);
794 794
795 set_incoming_call_state(sel_caller,CT_suspended);
796 GNUNET_CONVERSATION_caller_suspend (sel_caller); 795 GNUNET_CONVERSATION_caller_suspend (sel_caller);
797
798// cl_active = NULL;
799
800 phone_state = PS_LISTEN; 796 phone_state = PS_LISTEN;
797 set_incoming_call_state(sel_caller,CT_suspended);
798
801} 799}
802 800
803 801
@@ -1905,6 +1903,7 @@ update_active_call_list_buttons()
1905 b_suspend = GTK_WIDGET (get_object ("GNUNET_GTK_conversation_suspend_button")); 1903 b_suspend = GTK_WIDGET (get_object ("GNUNET_GTK_conversation_suspend_button"));
1906 b_resume = GTK_WIDGET (get_object ("GNUNET_GTK_conversation_resume_button")); 1904 b_resume = GTK_WIDGET (get_object ("GNUNET_GTK_conversation_resume_button"));
1907 1905
1906 LOG("caller state: %u phone_state: %u",cl_caller_state, phone_state);
1908 1907
1909 switch (cl_caller_state) 1908 switch (cl_caller_state)
1910 { 1909 {
@@ -1962,11 +1961,13 @@ update_active_call_list_buttons()
1962 gtk_widget_set_sensitive(b_accept, 0); 1961 gtk_widget_set_sensitive(b_accept, 0);
1963 gtk_widget_set_sensitive(b_hangup, 1); 1962 gtk_widget_set_sensitive(b_hangup, 1);
1964 gtk_widget_set_sensitive(b_suspend, 0); 1963 gtk_widget_set_sensitive(b_suspend, 0);
1965 //gtk_widget_set_sensitive(b_resume, 1); 1964
1966 if (phone_state == PS_LISTEN) 1965 if (phone_state == PS_LISTEN)
1967 { 1966 {
1967 LOG("enable resume button");
1968 gtk_widget_set_sensitive(b_resume, 1); 1968 gtk_widget_set_sensitive(b_resume, 1);
1969 }else{ 1969 }else{
1970 LOG("disable resume button");
1970 gtk_widget_set_sensitive(b_resume, 0); 1971 gtk_widget_set_sensitive(b_resume, 0);
1971 } 1972 }
1972 break; 1973 break;