aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2012-03-22 12:11:40 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2012-03-22 12:11:40 +0000
commit79e4ab71445f76adb7fefb7e34e4fbe924338224 (patch)
treeb5d2df8e6cf91c5e317b678c9623212fa4889f3b
parente8fb56d1f885ca99a06ccdb7fc848bfe76f492da (diff)
downloadgnunet-gtk-79e4ab71445f76adb7fefb7e34e4fbe924338224.tar.gz
gnunet-gtk-79e4ab71445f76adb7fefb7e34e4fbe924338224.zip
- name validity check and coloring
-rw-r--r--contrib/gnunet_gns_gtk_main_window.glade53
-rw-r--r--src/gns/gnunet-gns-gtk_zone.c7
2 files changed, 60 insertions, 0 deletions
diff --git a/contrib/gnunet_gns_gtk_main_window.glade b/contrib/gnunet_gns_gtk_main_window.glade
index 7b7f6d59..ea49dfba 100644
--- a/contrib/gnunet_gns_gtk_main_window.glade
+++ b/contrib/gnunet_gns_gtk_main_window.glade
@@ -14,6 +14,53 @@
14 <signal name="activate" handler="GNUNET_GNS_GTK_delete_popup_menu_delete_cb" swapped="no"/> 14 <signal name="activate" handler="GNUNET_GNS_GTK_delete_popup_menu_delete_cb" swapped="no"/>
15 </object> 15 </object>
16 </child> 16 </child>
17 <child>
18 <object class="GtkSeparatorMenuItem" id="GNUNET_GTK_delete_sep">
19 <property name="visible">True</property>
20 <property name="can_focus">False</property>
21 <property name="use_action_appearance">False</property>
22 </object>
23 </child>
24 <child>
25 <object class="GtkMenuItem" id="1d_exp">
26 <property name="visible">True</property>
27 <property name="can_focus">False</property>
28 <property name="use_action_appearance">False</property>
29 <property name="label" translatable="yes">Set expiration 1 day</property>
30 <property name="use_underline">True</property>
31 <signal name="activate" handler="GNUNET_GNS_GTK_main_treeview_popup_menu_exp1d_cb" swapped="no"/>
32 </object>
33 </child>
34 <child>
35 <object class="GtkMenuItem" id="1w_exp">
36 <property name="visible">True</property>
37 <property name="can_focus">False</property>
38 <property name="use_action_appearance">False</property>
39 <property name="label" translatable="yes">Set expiration 1 week</property>
40 <property name="use_underline">True</property>
41 <signal name="activate" handler="GNUNET_GNS_GTK_main_treeview_popup_menu_exp1w_cb" swapped="no"/>
42 </object>
43 </child>
44 <child>
45 <object class="GtkMenuItem" id="1y_exp">
46 <property name="visible">True</property>
47 <property name="can_focus">False</property>
48 <property name="use_action_appearance">False</property>
49 <property name="label" translatable="yes">Set expiration 1 year</property>
50 <property name="use_underline">True</property>
51 <signal name="activate" handler="GNUNET_GNS_GTK_main_treeview_popup_menu_exp1y_cb" swapped="no"/>
52 </object>
53 </child>
54 <child>
55 <object class="GtkMenuItem" id="exp_inf">
56 <property name="visible">True</property>
57 <property name="can_focus">False</property>
58 <property name="use_action_appearance">False</property>
59 <property name="label" translatable="yes">Set expiration end of time</property>
60 <property name="use_underline">True</property>
61 <signal name="activate" handler="GNUNET_GNS_GTK_main_treeview_popup_menu_expinf_cb" swapped="no"/>
62 </object>
63 </child>
17 </object> 64 </object>
18 <object class="GtkWindow" id="GNUNET_GNS_GTK_main_window"> 65 <object class="GtkWindow" id="GNUNET_GNS_GTK_main_window">
19 <property name="can_focus">False</property> 66 <property name="can_focus">False</property>
@@ -254,6 +301,7 @@
254 </object> 301 </object>
255 <attributes> 302 <attributes>
256 <attribute name="visible">9</attribute> 303 <attribute name="visible">9</attribute>
304 <attribute name="background">13</attribute>
257 <attribute name="editable">9</attribute> 305 <attribute name="editable">9</attribute>
258 <attribute name="text">0</attribute> 306 <attribute name="text">0</attribute>
259 </attributes> 307 </attributes>
@@ -313,6 +361,7 @@
313 </object> 361 </object>
314 <attributes> 362 <attributes>
315 <attribute name="visible">10</attribute> 363 <attribute name="visible">10</attribute>
364 <attribute name="background">12</attribute>
316 <attribute name="text">6</attribute> 365 <attribute name="text">6</attribute>
317 </attributes> 366 </attributes>
318 </child> 367 </child>
@@ -375,6 +424,10 @@
375 <column type="gboolean"/> 424 <column type="gboolean"/>
376 <!-- column-name not_dummy_row --> 425 <!-- column-name not_dummy_row -->
377 <column type="gboolean"/> 426 <column type="gboolean"/>
427 <!-- column-name expiration_time_as_color -->
428 <column type="gchararray"/>
429 <!-- column-name name_color -->
430 <column type="gchararray"/>
378 </columns> 431 </columns>
379 </object> 432 </object>
380 <object class="GtkListStore" id="GNUNET_GNS_GTK_type_liststore"> 433 <object class="GtkListStore" id="GNUNET_GNS_GTK_type_liststore">
diff --git a/src/gns/gnunet-gns-gtk_zone.c b/src/gns/gnunet-gns-gtk_zone.c
index 147d8cef..44a779bd 100644
--- a/src/gns/gnunet-gns-gtk_zone.c
+++ b/src/gns/gnunet-gns-gtk_zone.c
@@ -881,6 +881,13 @@ void zone_iteration_proc (void *cls,
881 TREE_COL_NOT_DUMMY_ROW, GNUNET_YES, 881 TREE_COL_NOT_DUMMY_ROW, GNUNET_YES,
882 -1); 882 -1);
883 883
884 if (GNUNET_SYSERR == GNUNET_NAMESTORE_check_name (name))
885 {
886 gtk_tree_store_set (zc_ctx->gns->ts, &iter_name,
887 TREE_COL_NAME_COLOR, "red",
888 -1);
889 }
890
884 891
885 /* Append elements for records */ 892 /* Append elements for records */
886 for (c = 0; c < rd_count; c ++) 893 for (c = 0; c < rd_count; c ++)