gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r20569 - in gnunet-gtk: contrib src/gns


From: gnunet
Subject: [GNUnet-SVN] r20569 - in gnunet-gtk: contrib src/gns
Date: Fri, 16 Mar 2012 15:42:12 +0100

Author: wachs
Date: 2012-03-16 15:42:12 +0100 (Fri, 16 Mar 2012)
New Revision: 20569

Modified:
   gnunet-gtk/contrib/gnunet_gns_gtk_main_window.glade
   gnunet-gtk/src/gns/gnunet-gns-gtk_zone.c
Log:
- visibility changes for name row


Modified: gnunet-gtk/contrib/gnunet_gns_gtk_main_window.glade
===================================================================
--- gnunet-gtk/contrib/gnunet_gns_gtk_main_window.glade 2012-03-16 14:32:07 UTC 
(rev 20568)
+++ gnunet-gtk/contrib/gnunet_gns_gtk_main_window.glade 2012-03-16 14:42:12 UTC 
(rev 20569)
@@ -254,6 +254,7 @@
                         <signal name="toggled" 
handler="GNUNET_GNS_GTK_ispublic_cellrenderertoggle_toggled_cb" swapped="no"/>
                       </object>
                       <attributes>
+                        <attribute name="visible">10</attribute>
                         <attribute name="active">1</attribute>
                       </attributes>
                     </child>
@@ -293,6 +294,7 @@
                         <signal name="edited" 
handler="GNUNET_GNS_GTK_expiration_cellrenderertext_edited_cb" swapped="no"/>
                       </object>
                       <attributes>
+                        <attribute name="visible">10</attribute>
                         <attribute name="text">6</attribute>
                       </attributes>
                     </child>
@@ -310,6 +312,7 @@
                         <signal name="edited" 
handler="GNUNET_GNS_GTK_value_cellrenderertext_edited_cb" swapped="no"/>
                       </object>
                       <attributes>
+                        <attribute name="visible">10</attribute>
                         <attribute name="background">8</attribute>
                         <attribute name="text">7</attribute>
                       </attributes>
@@ -350,6 +353,8 @@
       <column type="gchararray"/>
       <!-- column-name name_is_editable -->
       <column type="gboolean"/>
+      <!-- column-name name_row -->
+      <column type="gboolean"/>
     </columns>
   </object>
   <object class="GtkListStore" id="GNUNET_GNS_GTK_type_liststore">

Modified: gnunet-gtk/src/gns/gnunet-gns-gtk_zone.c
===================================================================
--- gnunet-gtk/src/gns/gnunet-gns-gtk_zone.c    2012-03-16 14:32:07 UTC (rev 
20568)
+++ gnunet-gtk/src/gns/gnunet-gns-gtk_zone.c    2012-03-16 14:42:12 UTC (rev 
20569)
@@ -40,6 +40,7 @@
   TREE_COL_VAL_AS_STR,
   TREE_COL_VAL_COLOR,
   TREE_COL_NAME_IS_EDITABLE,
+  TREE_COL_IS_NAME_ROW,
 };
 
 enum
@@ -85,13 +86,16 @@
 
   /* check if value is still valid */
   gtk_tree_model_get(tm, &it, TREE_COL_VAL_AS_STR, &value_str, -1);
-  if (GNUNET_OK != GNUNET_NAMESTORE_string_to_value (type,
-                                    value_str,
-                                    &data,
-                                    &data_size))
-    gtk_tree_store_set (gns->ts, &it, TREE_COL_VAL_COLOR, "red", -1);
-  else
-    gtk_tree_store_set (gns->ts, &it, TREE_COL_VAL_COLOR, NULL, -1);
+  if (NULL != value_str)
+  {
+    if (GNUNET_OK != GNUNET_NAMESTORE_string_to_value (type,
+                                      value_str,
+                                      &data,
+                                      &data_size))
+      gtk_tree_store_set (gns->ts, &it, TREE_COL_VAL_COLOR, "red", -1);
+    else
+      gtk_tree_store_set (gns->ts, &it, TREE_COL_VAL_COLOR, NULL, -1);
+  }
 }
 
 
@@ -303,6 +307,7 @@
   gtk_tree_store_set(zc_ctx->gns->ts, &iter_name,
                      TREE_COL_NAME, name,
                      TREE_COL_NAME_IS_EDITABLE, 1,
+                     TREE_COL_IS_NAME_ROW, 1
                      -1);
 
 
@@ -342,6 +347,7 @@
                                        TREE_COL_EXP_TIME_AS_STR, exp,
                                        TREE_COL_EXP_TIME_IS_REL, 
time_is_relative,
                                        TREE_COL_VAL_AS_STR, val,
+                                       TREE_COL_IS_NAME_ROW, 0
                                        -1);
 
     GNUNET_free (exp);




reply via email to

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