gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r32339 - in gnunet-gtk: contrib src/conversation


From: gnunet
Subject: [GNUnet-SVN] r32339 - in gnunet-gtk: contrib src/conversation
Date: Thu, 13 Feb 2014 18:26:15 +0100

Author: hark
Date: 2014-02-13 18:26:15 +0100 (Thu, 13 Feb 2014)
New Revision: 32339

Modified:
   gnunet-gtk/contrib/gnunet_conversation_gtk_main_window.glade
   gnunet-gtk/src/conversation/gnunet-conversation-gtk.c
   gnunet-gtk/src/conversation/gnunet-conversation-gtk.h
Log:
make debug box optional


Modified: gnunet-gtk/contrib/gnunet_conversation_gtk_main_window.glade
===================================================================
--- gnunet-gtk/contrib/gnunet_conversation_gtk_main_window.glade        
2014-02-13 15:38:20 UTC (rev 32338)
+++ gnunet-gtk/contrib/gnunet_conversation_gtk_main_window.glade        
2014-02-13 17:26:15 UTC (rev 32339)
@@ -2,6 +2,14 @@
 <interface>
   <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkAction" id="action1"/>
+  <object class="GtkListStore" 
id="gnunet_conversation_gtk_contacts_zone_liststore">
+    <columns>
+      <!-- column-name ego_name -->
+      <column type="gchararray"/>
+      <!-- column-name ego -->
+      <column type="gpointer"/>
+    </columns>
+  </object>
   <object class="GtkWindow" id="GNUNET_GTK_conversation_window">
     <property name="can_focus">False</property>
     <property name="events">GDK_BUTTON_PRESS_MASK | 
GDK_STRUCTURE_MASK</property>
@@ -85,8 +93,7 @@
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <child>
-                  <object class="GtkBox" id="log_box">
-                    <property name="visible">True</property>
+                  <object class="GtkBox" id="GNUNET_CONVERSATION_log_box">
                     <property name="can_focus">False</property>
                     <property name="orientation">vertical</property>
                     <property name="spacing">1</property>
@@ -251,6 +258,9 @@
                             <property name="position">1</property>
                           </packing>
                         </child>
+                        <child>
+                          <placeholder/>
+                        </child>
                       </object>
                       <packing>
                         <property name="expand">False</property>
@@ -268,12 +278,54 @@
                             <property name="can_focus">False</property>
                             <property name="orientation">vertical</property>
                             <child>
-                              <object class="GtkEntry" 
id="GNUNET_GTK_conversation_address">
+                              <object class="GtkBox" 
id="addres_and_call_button">
                                 <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="invisible_char">•</property>
-                                <property name="text" 
translatable="yes">Address</property>
-                                <property 
name="invisible_char_set">True</property>
+                                <property name="can_focus">False</property>
+                                <child>
+                                  <object class="GtkEntry" 
id="GNUNET_GTK_conversation_address">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property 
name="invisible_char">•</property>
+                                    <property name="text" 
translatable="yes">Address</property>
+                                    <property 
name="invisible_char_set">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkButton" 
id="GNUNET_GTK_conversation_call_button">
+                                    <property name="label" 
translatable="yes">call</property>
+                                    <property 
name="use_action_appearance">False</property>
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property 
name="receives_default">True</property>
+                                    <property 
name="use_action_appearance">False</property>
+                                    <property 
name="use_underline">True</property>
+                                    <signal name="clicked" 
handler="GNUNET_CONVERSATION_GTK_on_call_clicked" swapped="no"/>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkImage" 
id="GNUNET_GTK_status_icon">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="tooltip_text" 
translatable="yes">Status indicator</property>
+                                    <property name="hexpand">True</property>
+                                    <property 
name="icon_name">bluefish</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">2</property>
+                                  </packing>
+                                </child>
                               </object>
                               <packing>
                                 <property name="expand">False</property>
@@ -282,82 +334,202 @@
                               </packing>
                             </child>
                             <child>
-                              <object class="GtkScrolledWindow" 
id="active_calls_scrolledwindow">
+                              <object class="GtkBox" id="active_calls">
                                 <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="shadow_type">in</property>
+                                <property name="can_focus">False</property>
                                 <child>
-                                  <object class="GtkTreeView" 
id="gnunet_conversation_gtk_active_calls_treeview">
+                                  <object class="GtkScrolledWindow" 
id="active_calls_scrolledwindow">
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
-                                    <property 
name="model">gnunet_conversation_gtk_active_calls_liststore</property>
-                                    <property 
name="headers_clickable">False</property>
-                                    <property 
name="enable_search">False</property>
-                                    <property name="search_column">0</property>
-                                    <child internal-child="selection">
-                                      <object class="GtkTreeSelection" 
id="GNUNET_CONVERSATION_GTK_active_calls_selection">
-                                        <signal name="changed" 
handler="GNUNET_CONVERSATION_GTK_on_active_calls_selection_changed" 
swapped="no"/>
-                                      </object>
-                                    </child>
+                                    <property name="shadow_type">in</property>
                                     <child>
-                                      <object class="GtkTreeViewColumn" 
id="caller_numColumn">
-                                        <property name="title" 
translatable="yes">#</property>
+                                      <object class="GtkTreeView" 
id="gnunet_conversation_gtk_active_calls_treeview">
+                                        <property 
name="visible">True</property>
+                                        <property 
name="can_focus">True</property>
+                                        <property 
name="model">gnunet_conversation_gtk_active_calls_liststore</property>
+                                        <property 
name="headers_clickable">False</property>
+                                        <property 
name="enable_search">False</property>
+                                        <property 
name="search_column">0</property>
+                                        <child internal-child="selection">
+                                          <object class="GtkTreeSelection" 
id="treeview-selection5">
+                                            <signal name="changed" 
handler="GNUNET_CONVERSATION_GTK_on_active_calls_selection_changed" 
swapped="no"/>
+                                          </object>
+                                        </child>
                                         <child>
-                                          <object class="GtkCellRendererText" 
id="GNUNET_CONVERSATION_GTK_active_calls_num">
-                                            <property 
name="background_gdk">#000000000000</property>
-                                            <property 
name="font">Normal</property>
-                                            <property 
name="foreground_gdk">#000000000000</property>
-                                            <property 
name="background_rgba">rgba(0,0,0,0)</property>
-                                            <property 
name="foreground_rgba">rgba(0,0,0,0)</property>
+                                          <object class="GtkTreeViewColumn" 
id="caller_numColumn">
+                                            <property name="title" 
translatable="yes">#</property>
+                                            <child>
+                                              <object 
class="GtkCellRendererText" id="GNUNET_CONVERSATION_GTK_active_calls_num">
+                                                <property 
name="background_gdk">#000000000000</property>
+                                                <property 
name="font">Normal</property>
+                                                <property 
name="foreground_gdk">#000000000000</property>
+                                                <property 
name="background_rgba">rgba(0,0,0,0)</property>
+                                                <property 
name="foreground_rgba">rgba(0,0,0,0)</property>
+                                              </object>
+                                              <attributes>
+                                                <attribute 
name="text">2</attribute>
+                                              </attributes>
+                                            </child>
                                           </object>
-                                          <attributes>
-                                            <attribute 
name="text">2</attribute>
-                                          </attributes>
                                         </child>
+                                        <child>
+                                          <object class="GtkTreeViewColumn" 
id="GNUNET_CONVERSATION_GTK_caller_typeColumn">
+                                            <property name="title" 
translatable="yes">type</property>
+                                            <child>
+                                              <object 
class="GtkCellRendererText" id="GNUNET_CONVERSATION_GTK_active_calls_type"/>
+                                              <attributes>
+                                                <attribute 
name="markup">3</attribute>
+                                                <attribute 
name="text">3</attribute>
+                                              </attributes>
+                                            </child>
+                                          </object>
+                                        </child>
+                                        <child>
+                                          <object class="GtkTreeViewColumn" 
id="caller_stateColumn">
+                                            <property name="title" 
translatable="yes">state</property>
+                                            <child>
+                                              <object 
class="GtkCellRendererText" id="GNUNET_CONVERSATION_GTK_active_calls_state"/>
+                                              <attributes>
+                                                <attribute 
name="markup">4</attribute>
+                                                <attribute 
name="text">4</attribute>
+                                              </attributes>
+                                            </child>
+                                          </object>
+                                        </child>
+                                        <child>
+                                          <object class="GtkTreeViewColumn" 
id="caller_idColumn">
+                                            <property name="title" 
translatable="yes">Caller ID</property>
+                                            <child>
+                                              <object 
class="GtkCellRendererText" id="GNUNET_CONVERSATION_GTK_active_calls_id"/>
+                                              <attributes>
+                                                <attribute 
name="text">0</attribute>
+                                              </attributes>
+                                            </child>
+                                          </object>
+                                        </child>
+                                        <child>
+                                          <object class="GtkTreeViewColumn" 
id="caller_testcolumn">
+                                            <property name="title" 
translatable="yes">type</property>
+                                            <property 
name="clickable">True</property>
+                                            <property 
name="sort_column_id">0</property>
+                                          </object>
+                                        </child>
                                       </object>
                                     </child>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">True</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkButtonBox" 
id="GNUNET_GTK_conversation_active_call_list_buttons">
+                                    <property name="can_focus">False</property>
+                                    <property name="border_width">2</property>
+                                    <property 
name="orientation">vertical</property>
+                                    <property 
name="layout_style">start</property>
                                     <child>
-                                      <object class="GtkTreeViewColumn" 
id="GNUNET_CONVERSATION_GTK_caller_typeColumn">
-                                        <property name="title" 
translatable="yes">type</property>
-                                        <child>
-                                          <object class="GtkCellRendererText" 
id="GNUNET_CONVERSATION_GTK_active_calls_type"/>
-                                          <attributes>
-                                            <attribute 
name="markup">3</attribute>
-                                            <attribute 
name="text">3</attribute>
-                                          </attributes>
-                                        </child>
+                                      <placeholder/>
+                                    </child>
+                                    <child>
+                                      <object class="GtkButton" 
id="GNUNET_GTK_conversation_use_current_button">
+                                        <property name="label" 
translatable="yes">&gt; contact</property>
+                                        <property 
name="use_action_appearance">False</property>
+                                        <property 
name="visible">True</property>
+                                        <property 
name="sensitive">False</property>
+                                        <property 
name="can_focus">True</property>
+                                        <property 
name="receives_default">True</property>
+                                        <property 
name="use_action_appearance">False</property>
+                                        <property 
name="xalign">0.4699999988079071</property>
+                                        <signal name="clicked" 
handler="GNUNET_CONVERSATION_GTK_on_current_clicked" swapped="no"/>
                                       </object>
+                                      <packing>
+                                        <property 
name="expand">False</property>
+                                        <property name="fill">True</property>
+                                        <property name="position">1</property>
+                                      </packing>
                                     </child>
                                     <child>
-                                      <object class="GtkTreeViewColumn" 
id="caller_stateColumn">
-                                        <property name="title" 
translatable="yes">state</property>
-                                        <child>
-                                          <object class="GtkCellRendererText" 
id="GNUNET_CONVERSATION_GTK_active_calls_state"/>
-                                          <attributes>
-                                            <attribute 
name="markup">4</attribute>
-                                            <attribute 
name="text">4</attribute>
-                                          </attributes>
-                                        </child>
+                                      <object class="GtkButton" 
id="GNUNET_GTK_conversation_accept_button">
+                                        <property name="label" 
translatable="yes">accept</property>
+                                        <property 
name="use_action_appearance">False</property>
+                                        <property 
name="visible">True</property>
+                                        <property 
name="sensitive">False</property>
+                                        <property 
name="can_focus">True</property>
+                                        <property 
name="receives_default">True</property>
+                                        <property 
name="use_action_appearance">False</property>
+                                        <signal name="clicked" 
handler="GNUNET_CONVERSATION_GTK_on_accept_clicked" swapped="no"/>
                                       </object>
+                                      <packing>
+                                        <property 
name="expand">False</property>
+                                        <property name="fill">True</property>
+                                        <property name="position">2</property>
+                                      </packing>
                                     </child>
                                     <child>
-                                      <object class="GtkTreeViewColumn" 
id="caller_idColumn">
-                                        <property name="title" 
translatable="yes">Caller ID</property>
-                                        <child>
-                                          <object class="GtkCellRendererText" 
id="GNUNET_CONVERSATION_GTK_active_calls_id"/>
-                                          <attributes>
-                                            <attribute 
name="text">0</attribute>
-                                          </attributes>
-                                        </child>
+                                      <object class="GtkButton" 
id="GNUNET_GTK_conversation_hangup_button">
+                                        <property name="label" 
translatable="yes">hangup</property>
+                                        <property 
name="use_action_appearance">False</property>
+                                        <property 
name="visible">True</property>
+                                        <property 
name="sensitive">False</property>
+                                        <property 
name="can_focus">True</property>
+                                        <property 
name="receives_default">True</property>
+                                        <property 
name="use_action_appearance">False</property>
+                                        <signal name="clicked" 
handler="GNUNET_CONVERSATION_GTK_on_hangup_clicked" swapped="no"/>
                                       </object>
+                                      <packing>
+                                        <property 
name="expand">False</property>
+                                        <property name="fill">True</property>
+                                        <property name="position">3</property>
+                                      </packing>
                                     </child>
+                                    <child>
+                                      <object class="GtkButton" 
id="GNUNET_GTK_conversation_suspend_button">
+                                        <property name="label" 
translatable="yes">suspend</property>
+                                        <property 
name="use_action_appearance">False</property>
+                                        <property 
name="visible">True</property>
+                                        <property 
name="sensitive">False</property>
+                                        <property 
name="can_focus">True</property>
+                                        <property 
name="receives_default">True</property>
+                                        <property 
name="use_action_appearance">False</property>
+                                        <signal name="clicked" 
handler="GNUNET_CONVERSATION_GTK_on_pause_clicked" swapped="no"/>
+                                      </object>
+                                      <packing>
+                                        <property 
name="expand">False</property>
+                                        <property name="fill">True</property>
+                                        <property name="position">4</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkButton" 
id="GNUNET_GTK_conversation_resume_button">
+                                        <property name="label" 
translatable="yes">resume</property>
+                                        <property 
name="use_action_appearance">False</property>
+                                        <property 
name="visible">True</property>
+                                        <property 
name="sensitive">False</property>
+                                        <property 
name="can_focus">True</property>
+                                        <property 
name="receives_default">True</property>
+                                        <property 
name="use_action_appearance">False</property>
+                                        <signal name="clicked" 
handler="GNUNET_CONVERSATION_GTK_on_resume_clicked" swapped="no"/>
+                                      </object>
+                                      <packing>
+                                        <property 
name="expand">False</property>
+                                        <property name="fill">True</property>
+                                        <property name="position">5</property>
+                                      </packing>
+                                    </child>
                                   </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">1</property>
+                                  </packing>
                                 </child>
                               </object>
                               <packing>
-                                <property name="expand">True</property>
+                                <property name="expand">False</property>
                                 <property name="fill">True</property>
-                                <property name="position">1</property>
+                                <property name="position">2</property>
                               </packing>
                             </child>
                           </object>
@@ -367,122 +539,6 @@
                             <property name="position">0</property>
                           </packing>
                         </child>
-                        <child>
-                          <object class="GtkButtonBox" 
id="GNUNET_GTK_conversation_active_call_list_buttons">
-                            <property name="can_focus">False</property>
-                            <property name="border_width">2</property>
-                            <property name="orientation">vertical</property>
-                            <property name="layout_style">start</property>
-                            <child>
-                              <object class="GtkImage" 
id="GNUNET_GTK_status_icon">
-                                <property name="visible">True</property>
-                                <property name="sensitive">False</property>
-                                <property name="can_focus">False</property>
-                                <property name="tooltip_text" 
translatable="yes">Status indicator</property>
-                                <property name="icon_name">bluefish</property>
-                              </object>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">True</property>
-                                <property name="position">0</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <object class="GtkButton" 
id="GNUNET_GTK_conversation_use_current_button">
-                                <property name="label" 
translatable="yes">import Addr</property>
-                                <property 
name="use_action_appearance">False</property>
-                                <property name="visible">True</property>
-                                <property name="sensitive">False</property>
-                                <property name="can_focus">True</property>
-                                <property 
name="receives_default">True</property>
-                                <property 
name="use_action_appearance">False</property>
-                                <property 
name="xalign">0.4699999988079071</property>
-                                <signal name="clicked" 
handler="GNUNET_CONVERSATION_GTK_on_current_clicked" swapped="no"/>
-                              </object>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">True</property>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <object class="GtkButton" 
id="GNUNET_GTK_conversation_accept_button">
-                                <property name="label" 
translatable="yes">accept</property>
-                                <property 
name="use_action_appearance">False</property>
-                                <property name="visible">True</property>
-                                <property name="sensitive">False</property>
-                                <property name="can_focus">True</property>
-                                <property 
name="receives_default">True</property>
-                                <property 
name="use_action_appearance">False</property>
-                                <signal name="clicked" 
handler="GNUNET_CONVERSATION_GTK_on_accept_clicked" swapped="no"/>
-                              </object>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">True</property>
-                                <property name="position">2</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <object class="GtkButton" 
id="GNUNET_GTK_conversation_hangup_button">
-                                <property name="label" 
translatable="yes">hangup</property>
-                                <property 
name="use_action_appearance">False</property>
-                                <property name="visible">True</property>
-                                <property name="sensitive">False</property>
-                                <property name="can_focus">True</property>
-                                <property 
name="receives_default">True</property>
-                                <property 
name="use_action_appearance">False</property>
-                                <signal name="clicked" 
handler="GNUNET_CONVERSATION_GTK_on_hangup_clicked" swapped="no"/>
-                              </object>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">True</property>
-                                <property name="position">3</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <object class="GtkButton" 
id="GNUNET_GTK_conversation_suspend_button">
-                                <property name="label" 
translatable="yes">suspend</property>
-                                <property 
name="use_action_appearance">False</property>
-                                <property name="visible">True</property>
-                                <property name="sensitive">False</property>
-                                <property name="can_focus">True</property>
-                                <property 
name="receives_default">True</property>
-                                <property 
name="use_action_appearance">False</property>
-                                <signal name="clicked" 
handler="GNUNET_CONVERSATION_GTK_on_pause_clicked" swapped="no"/>
-                              </object>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">True</property>
-                                <property name="position">4</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <object class="GtkButton" 
id="GNUNET_GTK_conversation_resume_button">
-                                <property name="label" 
translatable="yes">resume</property>
-                                <property 
name="use_action_appearance">False</property>
-                                <property name="visible">True</property>
-                                <property name="sensitive">False</property>
-                                <property name="can_focus">True</property>
-                                <property 
name="receives_default">True</property>
-                                <property 
name="use_action_appearance">False</property>
-                                <signal name="clicked" 
handler="GNUNET_CONVERSATION_GTK_on_resume_clicked" swapped="no"/>
-                              </object>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">True</property>
-                                <property name="position">5</property>
-                              </packing>
-                            </child>
-                          </object>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">True</property>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <placeholder/>
-                        </child>
                       </object>
                       <packing>
                         <property name="expand">False</property>
@@ -490,9 +546,6 @@
                         <property name="position">2</property>
                       </packing>
                     </child>
-                    <child>
-                      <placeholder/>
-                    </child>
                   </object>
                   <packing>
                     <property name="left_attach">0</property>
@@ -664,22 +717,7 @@
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkButton" 
id="GNUNET_GTK_conversation_call_button">
-                            <property name="label" 
translatable="yes">call</property>
-                            <property 
name="use_action_appearance">False</property>
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">True</property>
-                            <property 
name="use_action_appearance">False</property>
-                            <property name="use_underline">True</property>
-                            <signal name="clicked" 
handler="GNUNET_CONVERSATION_GTK_on_call_clicked" swapped="no"/>
-                          </object>
-                          <packing>
-                            <property name="left_attach">0</property>
-                            <property name="top_attach">0</property>
-                            <property name="width">1</property>
-                            <property name="height">1</property>
-                          </packing>
+                          <placeholder/>
                         </child>
                       </object>
                       <packing>
@@ -689,53 +727,6 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkScrolledWindow" 
id="contacts_scrolledwindow">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="shadow_type">in</property>
-                        <child>
-                          <object class="GtkTreeView" 
id="gnunet_conversation_gtk_treeview">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property 
name="model">gnunet_conversation_gtk_contacts_liststore</property>
-                            <property name="headers_clickable">False</property>
-                            <property name="search_column">0</property>
-                            <signal name="row-activated" 
handler="GNUNET_CONVERSATION_GTK_row_activated" swapped="no"/>
-                            <child internal-child="selection">
-                              <object class="GtkTreeSelection" 
id="treeview-selection"/>
-                            </child>
-                            <child>
-                              <object class="GtkTreeViewColumn" 
id="contactName">
-                                <property name="title" 
translatable="yes">Type</property>
-                                <child>
-                                  <object class="GtkCellRendererText" 
id="GNUNET_CONVERSATION_GTK_type_window_name_renderer"/>
-                                  <attributes>
-                                    <attribute name="text">1</attribute>
-                                  </attributes>
-                                </child>
-                              </object>
-                            </child>
-                            <child>
-                              <object class="GtkTreeViewColumn" 
id="contactType">
-                                <property name="title" 
translatable="yes">Contact</property>
-                                <child>
-                                  <object class="GtkCellRendererText" 
id="GNUNET_CONVERSATION_GTK_main_window_name_renderer"/>
-                                  <attributes>
-                                    <attribute name="text">0</attribute>
-                                  </attributes>
-                                </child>
-                              </object>
-                            </child>
-                          </object>
-                        </child>
-                      </object>
-                      <packing>
-                        <property name="expand">True</property>
-                        <property name="fill">True</property>
-                        <property name="position">2</property>
-                      </packing>
-                    </child>
-                    <child>
                       <object class="GtkEntry" 
id="GNUNET_GTK_conversation_nameAdd">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
@@ -746,7 +737,7 @@
                       <packing>
                         <property name="expand">False</property>
                         <property name="fill">True</property>
-                        <property name="position">3</property>
+                        <property name="position">2</property>
                       </packing>
                     </child>
                     <child>
@@ -760,7 +751,7 @@
                       <packing>
                         <property name="expand">False</property>
                         <property name="fill">True</property>
-                        <property name="position">4</property>
+                        <property name="position">3</property>
                       </packing>
                     </child>
                     <child>
@@ -805,6 +796,53 @@
                       <packing>
                         <property name="expand">False</property>
                         <property name="fill">True</property>
+                        <property name="position">4</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkScrolledWindow" 
id="contacts_scrolledwindow">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="shadow_type">in</property>
+                        <child>
+                          <object class="GtkTreeView" 
id="gnunet_conversation_gtk_treeview">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property 
name="model">gnunet_conversation_gtk_contacts_liststore</property>
+                            <property name="headers_clickable">False</property>
+                            <property name="search_column">0</property>
+                            <signal name="row-activated" 
handler="GNUNET_CONVERSATION_GTK_row_activated" swapped="no"/>
+                            <child internal-child="selection">
+                              <object class="GtkTreeSelection" 
id="treeview-selection"/>
+                            </child>
+                            <child>
+                              <object class="GtkTreeViewColumn" 
id="contactName">
+                                <property name="title" 
translatable="yes">Type</property>
+                                <child>
+                                  <object class="GtkCellRendererText" 
id="GNUNET_CONVERSATION_GTK_type_window_name_renderer"/>
+                                  <attributes>
+                                    <attribute name="text">1</attribute>
+                                  </attributes>
+                                </child>
+                              </object>
+                            </child>
+                            <child>
+                              <object class="GtkTreeViewColumn" 
id="contactType">
+                                <property name="title" 
translatable="yes">Contact</property>
+                                <child>
+                                  <object class="GtkCellRendererText" 
id="GNUNET_CONVERSATION_GTK_main_window_name_renderer"/>
+                                  <attributes>
+                                    <attribute name="text">0</attribute>
+                                  </attributes>
+                                </child>
+                              </object>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
                         <property name="position">5</property>
                       </packing>
                     </child>
@@ -847,22 +885,6 @@
       </object>
     </child>
   </object>
-  <object class="GtkListStore" id="gnunet_conversation_gtk_contacts_liststore">
-    <columns>
-      <!-- column-name contactName -->
-      <column type="gchararray"/>
-      <!-- column-name contactType -->
-      <column type="gchararray"/>
-    </columns>
-  </object>
-  <object class="GtkListStore" 
id="gnunet_conversation_gtk_contacts_zone_liststore">
-    <columns>
-      <!-- column-name ego_name -->
-      <column type="gchararray"/>
-      <!-- column-name ego -->
-      <column type="gpointer"/>
-    </columns>
-  </object>
   <object class="GtkListStore" 
id="gnunet_conversation_gtk_active_calls_liststore">
     <columns>
       <!-- column-name caller_id -->
@@ -877,6 +899,14 @@
       <column type="gint"/>
     </columns>
   </object>
+  <object class="GtkListStore" id="gnunet_conversation_gtk_contacts_liststore">
+    <columns>
+      <!-- column-name contactName -->
+      <column type="gchararray"/>
+      <!-- column-name contactType -->
+      <column type="gchararray"/>
+    </columns>
+  </object>
   <object class="GtkListStore" id="gnunet_conversation_gtk_history_liststore">
     <columns>
       <!-- column-name logTime -->

Modified: gnunet-gtk/src/conversation/gnunet-conversation-gtk.c
===================================================================
--- gnunet-gtk/src/conversation/gnunet-conversation-gtk.c       2014-02-13 
15:38:20 UTC (rev 32338)
+++ gnunet-gtk/src/conversation/gnunet-conversation-gtk.c       2014-02-13 
17:26:15 UTC (rev 32339)
@@ -1330,8 +1330,10 @@
 
   /* get gui objects */
 
-
-
+  if(debug_box_enabled)
+  {
+      gtk_widget_show(GTK_WIDGET(get_object("GNUNET_CONVERSATION_log_box")));
+  }
   GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &shutdown_task,
                                 NULL);
 
@@ -1379,6 +1381,11 @@
      gettext_noop ("select ego to use"), 1,
      &GNUNET_GETOPT_set_string, &ego_name},
 
+    {'d', "debug_box", "1 or 0",
+     gettext_noop ("enable debug box"), 1,
+     &GNUNET_GETOPT_set_uint, &debug_box_enabled},
+
+
     {'t', "tray", NULL,
      gettext_noop ("start in tray mode"), 0,
      &GNUNET_GETOPT_set_one, &tray_only},
@@ -1887,7 +1894,7 @@
                  
         caller_selected = cl_caller;
 
-        
gtk_widget_show(get_object("GNUNET_GTK_conversation_active_call_list_buttons" 
));
+        
gtk_widget_show(GTK_WIDGET(get_object("GNUNET_GTK_conversation_active_call_list_buttons"
 )));
 
 
         // make global?
@@ -1974,11 +1981,12 @@
     
     LOG("nothing selected");
     
-    
gtk_widget_hide(get_object("GNUNET_GTK_conversation_active_call_list_buttons" 
));
+    
gtk_widget_hide(GTK_WIDGET(get_object("GNUNET_GTK_conversation_active_call_list_buttons"
 )));
     
    }
 
 } //end function
+
 /*
  * @brief active call list type data function
  */
@@ -1991,12 +1999,57 @@
    {
      gint  state;
      gchar   buf[20];
- 
+
+     gtk_tree_model_get(model, iter, AL_caller_state, &state, -1);
+     g_snprintf(buf, sizeof(buf), "status %u", state);
+     g_object_set(renderer, "text", buf, NULL);
+       /* set 'cell-background' property of the cell renderer */
+      
+        switch (state) 
+        {
+            case CT_active:
+      g_object_set(renderer,
+                    "cell-background", "Green",
+                    "cell-background-set", TRUE,
+                     NULL);
+
+
+           break;
+            case CT_ringing:
+      g_object_set(renderer,
+                    "cell-background", "Blue",
+                    "cell-background-set", TRUE,
+                     NULL);
+
+
+           break;
+            case CT_rejected:
+
+           break;
+            case CT_suspended:
+      g_object_set(renderer,
+                    "cell-background", "Orange",
+                    "cell-background-set", TRUE,
+                     NULL);
+
+
+           break;
+            default:
+            GNUNET_break(0);
+            break;
+        }  
+
      //gtk_tree_model_get(model, iter, AL_caller_state, &state, -1);
  
      //g_snprintf(buf, sizeof(buf), "state: %u", state);
  
      //g_object_set(renderer, "text", buf, NULL);
+     //
+//     if (foo->is_important)
+        g_object_set(renderer, "markup", "<b>important</b>", "text", NULL, 
NULL);
+//     else
+//        g_object_set(renderer, "markup", NULL, "text", "not important", 
NULL);
+     //
    }
 
 
@@ -2008,14 +2061,32 @@
 {
  GtkTreeViewColumn *column;
  GtkCellRenderer *cell;
-
+ GtkCellRenderer *renderer;
  //LOG("test");
 // treeview = get_object("gnunet_conversation_gtk_active_calls_treeview");
- column = get_object("GNUNET_CONVERSATION_GTK_caller_typeColumn");
- cell = gtk_cell_renderer_text_new();
- //cell = get_object("GNUNET_CONVERSATION_GTK_active_calls_type");
- gtk_tree_view_column_set_cell_data_func(column, cell, 
active_calls_type_data_function, NULL, NULL );
 
+// column = get_object("GNUNET_CONVERSATION_GTK_caller_typeColumn");
+ //cell = gtk_cell_renderer_text_new();
+// cell = get_object("GNUNET_CONVERSATION_GTK_active_calls_type");
+// gtk_tree_view_column_set_cell_data_func(column, cell, 
active_calls_type_data_function, NULL, NULL );
+
+ column = get_object("caller_testcolumn");
+ gtk_tree_view_column_set_title(column, "test stateC");
+ renderer = gtk_cell_renderer_text_new();
+
+   /* pack cell renderer into tree view column */
+   gtk_tree_view_column_pack_start(column, renderer, TRUE);
+
+     /* set 'text' property of the cell renderer */
+     g_object_set(renderer, "text", "Boooo!", NULL);
+       /* set 'cell-background' property of the cell renderer */
+       g_object_set(renderer,
+                    "cell-background", "Orange",
+                    "cell-background-set", TRUE,
+                     NULL);
+   gtk_tree_view_column_add_attribute(column, renderer, "text", 
AL_caller_state);
+ gtk_tree_view_column_set_cell_data_func(column, renderer, 
active_calls_type_data_function, NULL, NULL );
+
 }
 
 

Modified: gnunet-gtk/src/conversation/gnunet-conversation-gtk.h
===================================================================
--- gnunet-gtk/src/conversation/gnunet-conversation-gtk.h       2014-02-13 
15:38:20 UTC (rev 32338)
+++ gnunet-gtk/src/conversation/gnunet-conversation-gtk.h       2014-02-13 
17:26:15 UTC (rev 32339)
@@ -23,8 +23,8 @@
  * @author Christian Grothoff
  */
 #include <gnunet/gnunet_util_lib.h>
+#include <stdbool.h>
 
-
 #ifndef GNUNET_CONVERSATION_GTK_H
 #define GNUNET_CONVERSATION_GTK_H
 
@@ -257,7 +257,14 @@
 static unsigned int line;
 
 //static unsigned int line1;
+/**
+ * debug box enabled
+ */
 
+static unsigned int debug_box_enabled;
+
+
+
 /**
  * Our speaker.
  */




reply via email to

[Prev in Thread] Current Thread [Next in Thread]