diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-10-07 15:01:23 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-10-07 15:01:23 +0000 |
commit | 50cf17963f7ba3bfc088f8ace955f65474687c51 (patch) | |
tree | 521e604df344d32f2511ac431be88ea5232789b6 | |
parent | d876ad6a74d4e3675a99def096d9234c401f51cf (diff) | |
download | gnunet-gtk-50cf17963f7ba3bfc088f8ace955f65474687c51.tar.gz gnunet-gtk-50cf17963f7ba3bfc088f8ace955f65474687c51.zip |
finishing #3054
-rw-r--r-- | contrib/gnunet_namestore_gtk_main_window.glade | 107 | ||||
-rw-r--r-- | src/fs/gnunet-fs-gtk.c | 6 | ||||
-rw-r--r-- | src/namestore/Makefile.am | 3 | ||||
-rw-r--r-- | src/namestore/gnunet-namestore-gtk.c | 138 |
4 files changed, 126 insertions, 128 deletions
diff --git a/contrib/gnunet_namestore_gtk_main_window.glade b/contrib/gnunet_namestore_gtk_main_window.glade index 1082c510..e81fbf56 100644 --- a/contrib/gnunet_namestore_gtk_main_window.glade +++ b/contrib/gnunet_namestore_gtk_main_window.glade | |||
@@ -3,35 +3,39 @@ | |||
3 | <requires lib="gtk+" version="2.20"/> | 3 | <requires lib="gtk+" version="2.20"/> |
4 | <!-- interface-naming-policy toplevel-contextual --> | 4 | <!-- interface-naming-policy toplevel-contextual --> |
5 | <object class="GtkDialog" id="gnunet_namestore_gtk_dialog"> | 5 | <object class="GtkDialog" id="gnunet_namestore_gtk_dialog"> |
6 | <property name="width_request">800</property> | ||
7 | <property name="height_request">600</property> | ||
8 | <property name="visible">True</property> | ||
6 | <property name="can_focus">False</property> | 9 | <property name="can_focus">False</property> |
7 | <property name="border_width">5</property> | 10 | <property name="border_width">5</property> |
8 | <property name="title" translatable="yes">gnunet-setup</property> | 11 | <property name="title" translatable="yes">gnunet-namestore-gtk</property> |
9 | <property name="window_position">center</property> | 12 | <property name="window_position">center</property> |
10 | <property name="icon_name">preferences-system</property> | 13 | <property name="icon_name">preferences-system</property> |
11 | <property name="type_hint">normal</property> | 14 | <property name="type_hint">normal</property> |
12 | <signal name="destroy" handler="GNUNET_NAMESTORE_GTK_quit_cb" swapped="no"/> | 15 | <signal name="destroy" handler="gnunet_namestore_gtk_quit_cb" swapped="no"/> |
13 | <child internal-child="vbox"> | 16 | <child internal-child="vbox"> |
14 | <object class="GtkVBox" id="gnunet_namestore_gtk_dialog-vbox"> | 17 | <object class="GtkVBox" id="gnunet_namestore_gtk_dialog-vbox"> |
15 | <property name="visible">True</property> | 18 | <property name="visible">True</property> |
16 | <property name="can_focus">False</property> | 19 | <property name="can_focus">False</property> |
17 | <property name="spacing">2</property> | 20 | <property name="spacing">2</property> |
18 | <child> | 21 | <child> |
19 | <object class="GtkVBox" id="gnunet_namestore_gtk_gns_vbox"> | 22 | <object class="GtkVBox" id="gnunet_namestore_gtk_vbox"> |
23 | <property name="visible">True</property> | ||
20 | <property name="can_focus">False</property> | 24 | <property name="can_focus">False</property> |
21 | <child> | 25 | <child> |
22 | <object class="GtkHBox" id="gnunet_namestore_gtk_gns_top_hbox"> | 26 | <object class="GtkHBox" id="gnunet_namestore_gtk_top_hbox"> |
23 | <property name="visible">True</property> | 27 | <property name="visible">True</property> |
24 | <property name="can_focus">False</property> | 28 | <property name="can_focus">False</property> |
25 | <child> | 29 | <child> |
26 | <object class="GtkVBox" id="gnunet_namestore_gtk_gns_zone_vbox"> | 30 | <object class="GtkVBox" id="gnunet_namestore_gtk_zone_vbox"> |
27 | <property name="visible">True</property> | 31 | <property name="visible">True</property> |
28 | <property name="can_focus">False</property> | 32 | <property name="can_focus">False</property> |
29 | <child> | 33 | <child> |
30 | <object class="GtkHBox" id="gnunet_namestore_gtk_gns_zone_label_hbox"> | 34 | <object class="GtkHBox" id="gnunet_namestore_gtk_zone_label_hbox"> |
31 | <property name="visible">True</property> | 35 | <property name="visible">True</property> |
32 | <property name="can_focus">False</property> | 36 | <property name="can_focus">False</property> |
33 | <child> | 37 | <child> |
34 | <object class="GtkLabel" id="gnunet_namestore_gtk_gns_zone_label"> | 38 | <object class="GtkLabel" id="gnunet_namestore_gtk_zone_label"> |
35 | <property name="visible">True</property> | 39 | <property name="visible">True</property> |
36 | <property name="can_focus">False</property> | 40 | <property name="can_focus">False</property> |
37 | <property name="label" translatable="yes"><b>SET TO PUBLIC KEY OF THE ZONE</b></property> | 41 | <property name="label" translatable="yes"><b>SET TO PUBLIC KEY OF THE ZONE</b></property> |
@@ -44,14 +48,14 @@ | |||
44 | </packing> | 48 | </packing> |
45 | </child> | 49 | </child> |
46 | <child> | 50 | <child> |
47 | <object class="GtkButton" id="gnunet_namestore_gtk_gns_public_key_copy_button"> | 51 | <object class="GtkButton" id="gnunet_namestore_gtk_public_key_copy_button"> |
48 | <property name="label">gtk-copy</property> | 52 | <property name="label">gtk-copy</property> |
49 | <property name="use_action_appearance">False</property> | 53 | <property name="use_action_appearance">False</property> |
50 | <property name="visible">True</property> | 54 | <property name="visible">True</property> |
51 | <property name="can_focus">True</property> | 55 | <property name="can_focus">True</property> |
52 | <property name="receives_default">True</property> | 56 | <property name="receives_default">True</property> |
53 | <property name="use_stock">True</property> | 57 | <property name="use_stock">True</property> |
54 | <signal name="clicked" handler="gnunet_namestore_gtk_gns_public_key_copy_button_clicked_cb" swapped="no"/> | 58 | <signal name="clicked" handler="gnunet_namestore_gtk_public_key_copy_button_clicked_cb" swapped="no"/> |
55 | </object> | 59 | </object> |
56 | <packing> | 60 | <packing> |
57 | <property name="expand">False</property> | 61 | <property name="expand">False</property> |
@@ -68,11 +72,11 @@ | |||
68 | </packing> | 72 | </packing> |
69 | </child> | 73 | </child> |
70 | <child> | 74 | <child> |
71 | <object class="GtkHBox" id="gnunet_namestore_gtk_gns_pseu_hbox"> | 75 | <object class="GtkHBox" id="gnunet_namestore_gtk_pseu_hbox"> |
72 | <property name="visible">True</property> | 76 | <property name="visible">True</property> |
73 | <property name="can_focus">False</property> | 77 | <property name="can_focus">False</property> |
74 | <child> | 78 | <child> |
75 | <object class="GtkLabel" id="gnunet_namestore_gtk_gns_pseu_label"> | 79 | <object class="GtkLabel" id="gnunet_namestore_gtk_pseu_label"> |
76 | <property name="visible">True</property> | 80 | <property name="visible">True</property> |
77 | <property name="can_focus">False</property> | 81 | <property name="can_focus">False</property> |
78 | <property name="label" translatable="yes">Preferred zone name (PSEU):</property> | 82 | <property name="label" translatable="yes">Preferred zone name (PSEU):</property> |
@@ -85,7 +89,7 @@ | |||
85 | </packing> | 89 | </packing> |
86 | </child> | 90 | </child> |
87 | <child> | 91 | <child> |
88 | <object class="GtkEntry" id="gnunet_namestore_gtk_gns_pseu_entry"> | 92 | <object class="GtkEntry" id="gnunet_namestore_gtk_pseu_entry"> |
89 | <property name="visible">True</property> | 93 | <property name="visible">True</property> |
90 | <property name="can_focus">True</property> | 94 | <property name="can_focus">True</property> |
91 | <property name="max_length">63</property> | 95 | <property name="max_length">63</property> |
@@ -96,7 +100,7 @@ | |||
96 | <property name="secondary_icon_activatable">False</property> | 100 | <property name="secondary_icon_activatable">False</property> |
97 | <property name="primary_icon_sensitive">True</property> | 101 | <property name="primary_icon_sensitive">True</property> |
98 | <property name="secondary_icon_sensitive">True</property> | 102 | <property name="secondary_icon_sensitive">True</property> |
99 | <signal name="changed" handler="gnunet_namestore_gtk_gns_pseu_entry_changed_cb" swapped="no"/> | 103 | <signal name="changed" handler="gnunet_namestore_gtk_pseu_entry_changed_cb" swapped="no"/> |
100 | </object> | 104 | </object> |
101 | <packing> | 105 | <packing> |
102 | <property name="expand">False</property> | 106 | <property name="expand">False</property> |
@@ -113,12 +117,12 @@ | |||
113 | </packing> | 117 | </packing> |
114 | </child> | 118 | </child> |
115 | <child> | 119 | <child> |
116 | <object class="GtkHButtonBox" id="gnunet_namestore_gtk_gns_zone_selection_hbuttonbox"> | 120 | <object class="GtkHButtonBox" id="gnunet_namestore_gtk_zone_selection_hbuttonbox"> |
117 | <property name="visible">True</property> | 121 | <property name="visible">True</property> |
118 | <property name="can_focus">False</property> | 122 | <property name="can_focus">False</property> |
119 | <property name="layout_style">center</property> | 123 | <property name="layout_style">center</property> |
120 | <child> | 124 | <child> |
121 | <object class="GtkRadioButton" id="gnunet_namestore_gtk_gns_master_zone_selection_radiobutton"> | 125 | <object class="GtkRadioButton" id="gnunet_namestore_gtk_master_zone_selection_radiobutton"> |
122 | <property name="label" translatable="yes">_Master Zone</property> | 126 | <property name="label" translatable="yes">_Master Zone</property> |
123 | <property name="use_action_appearance">False</property> | 127 | <property name="use_action_appearance">False</property> |
124 | <property name="visible">True</property> | 128 | <property name="visible">True</property> |
@@ -127,7 +131,7 @@ | |||
127 | <property name="use_underline">True</property> | 131 | <property name="use_underline">True</property> |
128 | <property name="active">True</property> | 132 | <property name="active">True</property> |
129 | <property name="draw_indicator">True</property> | 133 | <property name="draw_indicator">True</property> |
130 | <signal name="toggled" handler="gnunet_namestore_gtk_gns_master_zone_selection_radiobutton_toggled_cb" swapped="no"/> | 134 | <signal name="toggled" handler="gnunet_namestore_gtk_master_zone_selection_radiobutton_toggled_cb" swapped="no"/> |
131 | </object> | 135 | </object> |
132 | <packing> | 136 | <packing> |
133 | <property name="expand">False</property> | 137 | <property name="expand">False</property> |
@@ -137,7 +141,7 @@ | |||
137 | </packing> | 141 | </packing> |
138 | </child> | 142 | </child> |
139 | <child> | 143 | <child> |
140 | <object class="GtkRadioButton" id="gnunet_namestore_gtk_gns_private_zone_selection_radiobutton"> | 144 | <object class="GtkRadioButton" id="gnunet_namestore_gtk_private_zone_selection_radiobutton"> |
141 | <property name="label" translatable="yes">_Private Zone</property> | 145 | <property name="label" translatable="yes">_Private Zone</property> |
142 | <property name="use_action_appearance">False</property> | 146 | <property name="use_action_appearance">False</property> |
143 | <property name="visible">True</property> | 147 | <property name="visible">True</property> |
@@ -145,8 +149,8 @@ | |||
145 | <property name="receives_default">False</property> | 149 | <property name="receives_default">False</property> |
146 | <property name="use_underline">True</property> | 150 | <property name="use_underline">True</property> |
147 | <property name="draw_indicator">True</property> | 151 | <property name="draw_indicator">True</property> |
148 | <property name="group">gnunet_namestore_gtk_gns_master_zone_selection_radiobutton</property> | 152 | <property name="group">gnunet_namestore_gtk_master_zone_selection_radiobutton</property> |
149 | <signal name="toggled" handler="gnunet_namestore_gtk_gns_private_zone_selection_radiobutton_toggled_cb" swapped="no"/> | 153 | <signal name="toggled" handler="gnunet_namestore_gtk_private_zone_selection_radiobutton_toggled_cb" swapped="no"/> |
150 | </object> | 154 | </object> |
151 | <packing> | 155 | <packing> |
152 | <property name="expand">False</property> | 156 | <property name="expand">False</property> |
@@ -156,7 +160,7 @@ | |||
156 | </packing> | 160 | </packing> |
157 | </child> | 161 | </child> |
158 | <child> | 162 | <child> |
159 | <object class="GtkRadioButton" id="gnunet_namestore_gtk_gns_shorten_zone_selection_radiobutton"> | 163 | <object class="GtkRadioButton" id="gnunet_namestore_gtk_shorten_zone_selection_radiobutton"> |
160 | <property name="label" translatable="yes">_Shorten Zone</property> | 164 | <property name="label" translatable="yes">_Shorten Zone</property> |
161 | <property name="use_action_appearance">False</property> | 165 | <property name="use_action_appearance">False</property> |
162 | <property name="visible">True</property> | 166 | <property name="visible">True</property> |
@@ -164,8 +168,8 @@ | |||
164 | <property name="receives_default">False</property> | 168 | <property name="receives_default">False</property> |
165 | <property name="use_underline">True</property> | 169 | <property name="use_underline">True</property> |
166 | <property name="draw_indicator">True</property> | 170 | <property name="draw_indicator">True</property> |
167 | <property name="group">gnunet_namestore_gtk_gns_master_zone_selection_radiobutton</property> | 171 | <property name="group">gnunet_namestore_gtk_master_zone_selection_radiobutton</property> |
168 | <signal name="toggled" handler="gnunet_namestore_gtk_gns_shorten_zone_selection_radiobutton_toggled_cb" swapped="no"/> | 172 | <signal name="toggled" handler="gnunet_namestore_gtk_shorten_zone_selection_radiobutton_toggled_cb" swapped="no"/> |
169 | </object> | 173 | </object> |
170 | <packing> | 174 | <packing> |
171 | <property name="expand">False</property> | 175 | <property name="expand">False</property> |
@@ -190,7 +194,7 @@ | |||
190 | </packing> | 194 | </packing> |
191 | </child> | 195 | </child> |
192 | <child> | 196 | <child> |
193 | <object class="GtkVSeparator" id="gnunet_namestore_gtk_gns_qr_vseparator"> | 197 | <object class="GtkVSeparator" id="gnunet_namestore_gtk_qr_vseparator"> |
194 | <property name="visible">True</property> | 198 | <property name="visible">True</property> |
195 | <property name="can_focus">False</property> | 199 | <property name="can_focus">False</property> |
196 | </object> | 200 | </object> |
@@ -201,7 +205,7 @@ | |||
201 | </packing> | 205 | </packing> |
202 | </child> | 206 | </child> |
203 | <child> | 207 | <child> |
204 | <object class="GtkImage" id="gnunet_namestore_gtk_gns_qr_image"> | 208 | <object class="GtkImage" id="gnunet_namestore_gtk_qr_image"> |
205 | <property name="width_request">64</property> | 209 | <property name="width_request">64</property> |
206 | <property name="height_request">64</property> | 210 | <property name="height_request">64</property> |
207 | <property name="visible">True</property> | 211 | <property name="visible">True</property> |
@@ -216,14 +220,14 @@ | |||
216 | </packing> | 220 | </packing> |
217 | </child> | 221 | </child> |
218 | <child> | 222 | <child> |
219 | <object class="GtkButton" id="gnunet_namestore_gtk_gns_qr_saveas_button"> | 223 | <object class="GtkButton" id="gnunet_namestore_gtk_qr_saveas_button"> |
220 | <property name="label">gtk-save-as</property> | 224 | <property name="label">gtk-save-as</property> |
221 | <property name="use_action_appearance">False</property> | 225 | <property name="use_action_appearance">False</property> |
222 | <property name="visible">True</property> | 226 | <property name="visible">True</property> |
223 | <property name="can_focus">True</property> | 227 | <property name="can_focus">True</property> |
224 | <property name="receives_default">True</property> | 228 | <property name="receives_default">True</property> |
225 | <property name="use_stock">True</property> | 229 | <property name="use_stock">True</property> |
226 | <signal name="clicked" handler="gnunet_namestore_gtk_gns_qr_saveas_button_clicked_cb" swapped="no"/> | 230 | <signal name="clicked" handler="gnunet_namestore_gtk_qr_saveas_button_clicked_cb" swapped="no"/> |
227 | </object> | 231 | </object> |
228 | <packing> | 232 | <packing> |
229 | <property name="expand">False</property> | 233 | <property name="expand">False</property> |
@@ -240,7 +244,7 @@ | |||
240 | </packing> | 244 | </packing> |
241 | </child> | 245 | </child> |
242 | <child> | 246 | <child> |
243 | <object class="GtkLabel" id="gnunet_namestore_gtk_gns_status_label"> | 247 | <object class="GtkLabel" id="gnunet_namestore_gtk_status_label"> |
244 | <property name="visible">True</property> | 248 | <property name="visible">True</property> |
245 | <property name="can_focus">False</property> | 249 | <property name="can_focus">False</property> |
246 | <property name="label" translatable="yes"><b><big>Loading...</big></b></property> | 250 | <property name="label" translatable="yes"><b><big>Loading...</big></b></property> |
@@ -253,29 +257,29 @@ | |||
253 | </packing> | 257 | </packing> |
254 | </child> | 258 | </child> |
255 | <child> | 259 | <child> |
256 | <object class="GtkScrolledWindow" id="gnunet_namestore_gtk_gns_main_scrolledwindow"> | 260 | <object class="GtkScrolledWindow" id="gnunet_namestore_gtk_scrolledwindow"> |
257 | <property name="can_focus">True</property> | 261 | <property name="can_focus">True</property> |
258 | <property name="hscrollbar_policy">automatic</property> | 262 | <property name="hscrollbar_policy">automatic</property> |
259 | <property name="vscrollbar_policy">automatic</property> | 263 | <property name="vscrollbar_policy">automatic</property> |
260 | <child> | 264 | <child> |
261 | <object class="GtkTreeView" id="gnunet_namestore_gtk_gns_main_treeview"> | 265 | <object class="GtkTreeView" id="gnunet_namestore_gtk_treeview"> |
262 | <property name="visible">True</property> | 266 | <property name="visible">True</property> |
263 | <property name="can_focus">True</property> | 267 | <property name="can_focus">True</property> |
264 | <property name="model">gnunet_namestore_gtk_gns_treestore</property> | 268 | <property name="model">gnunet_namestore_gtk_treestore</property> |
265 | <property name="search_column">0</property> | 269 | <property name="search_column">0</property> |
266 | <signal name="button-press-event" handler="gnunet_namestore_gtk_gns_main_treeview_button_press_event_cb" swapped="no"/> | 270 | <signal name="button-press-event" handler="gnunet_namestore_gtk_treeview_button_press_event_cb" swapped="no"/> |
267 | <signal name="key-press-event" handler="gnunet_namestore_gtk_gns_main_treeview_key_press_event_cb" swapped="no"/> | 271 | <signal name="key-press-event" handler="gnunet_namestore_gtk_treeview_key_press_event_cb" swapped="no"/> |
268 | <signal name="popup-menu" handler="gnunet_namestore_gtk_gns_main_treeview_popup_menu_cb" swapped="no"/> | 272 | <signal name="popup-menu" handler="gnunet_namestore_gtk_treeview_popup_menu_cb" swapped="no"/> |
269 | <child> | 273 | <child> |
270 | <object class="GtkTreeViewColumn" id="gnunet_namestore_gtk_gns_name_treeviewcolumn"> | 274 | <object class="GtkTreeViewColumn" id="gnunet_namestore_gtk_name_treeviewcolumn"> |
271 | <property name="title">Name</property> | 275 | <property name="title">Name</property> |
272 | <property name="clickable">True</property> | 276 | <property name="clickable">True</property> |
273 | <property name="reorderable">True</property> | 277 | <property name="reorderable">True</property> |
274 | <property name="sort_indicator">True</property> | 278 | <property name="sort_indicator">True</property> |
275 | <property name="sort_column_id">0</property> | 279 | <property name="sort_column_id">0</property> |
276 | <child> | 280 | <child> |
277 | <object class="GtkCellRendererText" id="gnunet_namestore_gtk_gns_name_cellrenderertext"> | 281 | <object class="GtkCellRendererText" id="gnunet_namestore_gtk_name_cellrenderertext"> |
278 | <signal name="edited" handler="gnunet_namestore_gtk_gns_name_cellrenderertext_edited_cb" swapped="no"/> | 282 | <signal name="edited" handler="gnunet_namestore_gtk_name_cellrenderertext_edited_cb" swapped="no"/> |
279 | </object> | 283 | </object> |
280 | <attributes> | 284 | <attributes> |
281 | <attribute name="visible">9</attribute> | 285 | <attribute name="visible">9</attribute> |
@@ -287,7 +291,7 @@ | |||
287 | </object> | 291 | </object> |
288 | </child> | 292 | </child> |
289 | <child> | 293 | <child> |
290 | <object class="GtkTreeViewColumn" id="gnunet_namestore_gtk_gns_type_treeviewcolumn"> | 294 | <object class="GtkTreeViewColumn" id="gnunet_namestore_gtk_type_treeviewcolumn"> |
291 | <property name="sizing">autosize</property> | 295 | <property name="sizing">autosize</property> |
292 | <property name="fixed_width">90</property> | 296 | <property name="fixed_width">90</property> |
293 | <property name="title">Type</property> | 297 | <property name="title">Type</property> |
@@ -296,10 +300,10 @@ | |||
296 | <property name="sort_indicator">True</property> | 300 | <property name="sort_indicator">True</property> |
297 | <property name="sort_column_id">3</property> | 301 | <property name="sort_column_id">3</property> |
298 | <child> | 302 | <child> |
299 | <object class="GtkCellRendererCombo" id="gnunet_namestore_gtk_gns_type_cellrenderercombo"> | 303 | <object class="GtkCellRendererCombo" id="gnunet_namestore_gtk_type_cellrenderercombo"> |
300 | <property name="model">gnunet_namestore_gtk_gns_type_liststore</property> | 304 | <property name="model">gnunet_namestore_gtk_type_liststore</property> |
301 | <property name="text_column">1</property> | 305 | <property name="text_column">1</property> |
302 | <signal name="edited" handler="gnunet_namestore_gtk_gns_type_cellrenderercombo_edited_cb" swapped="no"/> | 306 | <signal name="edited" handler="gnunet_namestore_gtk_type_cellrenderercombo_edited_cb" swapped="no"/> |
303 | </object> | 307 | </object> |
304 | <attributes> | 308 | <attributes> |
305 | <attribute name="visible">10</attribute> | 309 | <attribute name="visible">10</attribute> |
@@ -310,14 +314,14 @@ | |||
310 | </object> | 314 | </object> |
311 | </child> | 315 | </child> |
312 | <child> | 316 | <child> |
313 | <object class="GtkTreeViewColumn" id="gnunet_namestore_gtk_gns_value_treeviewcolumn"> | 317 | <object class="GtkTreeViewColumn" id="gnunet_namestore_gtk_value_treeviewcolumn"> |
314 | <property name="sizing">autosize</property> | 318 | <property name="sizing">autosize</property> |
315 | <property name="title">Value</property> | 319 | <property name="title">Value</property> |
316 | <property name="expand">True</property> | 320 | <property name="expand">True</property> |
317 | <property name="clickable">True</property> | 321 | <property name="clickable">True</property> |
318 | <property name="sort_column_id">7</property> | 322 | <property name="sort_column_id">7</property> |
319 | <child> | 323 | <child> |
320 | <object class="GtkCellRendererText" id="gnunet_namestore_gtk_gns_value_cellrenderertext"/> | 324 | <object class="GtkCellRendererText" id="gnunet_namestore_gtk_value_cellrenderertext"/> |
321 | <attributes> | 325 | <attributes> |
322 | <attribute name="sensitive">11</attribute> | 326 | <attribute name="sensitive">11</attribute> |
323 | <attribute name="visible">10</attribute> | 327 | <attribute name="visible">10</attribute> |
@@ -328,14 +332,14 @@ | |||
328 | </object> | 332 | </object> |
329 | </child> | 333 | </child> |
330 | <child> | 334 | <child> |
331 | <object class="GtkTreeViewColumn" id="gnunet_namestore_gtk_gns_expiration_treeviewcolumn"> | 335 | <object class="GtkTreeViewColumn" id="gnunet_namestore_gtk_expiration_treeviewcolumn"> |
332 | <property name="title">Expiration</property> | 336 | <property name="title">Expiration</property> |
333 | <property name="clickable">True</property> | 337 | <property name="clickable">True</property> |
334 | <property name="reorderable">True</property> | 338 | <property name="reorderable">True</property> |
335 | <property name="sort_indicator">True</property> | 339 | <property name="sort_indicator">True</property> |
336 | <property name="sort_column_id">4</property> | 340 | <property name="sort_column_id">4</property> |
337 | <child> | 341 | <child> |
338 | <object class="GtkCellRendererText" id="gnunet_namestore_gtk_gns_expiration_cellrenderertext"/> | 342 | <object class="GtkCellRendererText" id="gnunet_namestore_gtk_expiration_cellrenderertext"/> |
339 | <attributes> | 343 | <attributes> |
340 | <attribute name="sensitive">11</attribute> | 344 | <attribute name="sensitive">11</attribute> |
341 | <attribute name="visible">10</attribute> | 345 | <attribute name="visible">10</attribute> |
@@ -346,13 +350,13 @@ | |||
346 | </object> | 350 | </object> |
347 | </child> | 351 | </child> |
348 | <child> | 352 | <child> |
349 | <object class="GtkTreeViewColumn" id="gnunet_namestore_gtk_gns_ispublic_treeviewcolumn"> | 353 | <object class="GtkTreeViewColumn" id="gnunet_namestore_gtk_ispublic_treeviewcolumn"> |
350 | <property name="sizing">fixed</property> | 354 | <property name="sizing">fixed</property> |
351 | <property name="fixed_width">50</property> | 355 | <property name="fixed_width">50</property> |
352 | <property name="title">Public</property> | 356 | <property name="title">Public</property> |
353 | <property name="clickable">True</property> | 357 | <property name="clickable">True</property> |
354 | <child> | 358 | <child> |
355 | <object class="GtkCellRendererToggle" id="gnunet_namestore_gtk_gns_ispublic_cellrenderertoggle"> | 359 | <object class="GtkCellRendererToggle" id="gnunet_namestore_gtk_ispublic_cellrenderertoggle"> |
356 | <property name="sensitive">False</property> | 360 | <property name="sensitive">False</property> |
357 | </object> | 361 | </object> |
358 | <attributes> | 362 | <attributes> |
@@ -428,6 +432,7 @@ | |||
428 | <packing> | 432 | <packing> |
429 | <property name="expand">False</property> | 433 | <property name="expand">False</property> |
430 | <property name="fill">True</property> | 434 | <property name="fill">True</property> |
435 | <property name="pack_type">end</property> | ||
431 | <property name="position">1</property> | 436 | <property name="position">1</property> |
432 | </packing> | 437 | </packing> |
433 | </child> | 438 | </child> |
@@ -439,21 +444,21 @@ | |||
439 | <action-widget response="-3">gnunet_namestore_gtk_save_button</action-widget> | 444 | <action-widget response="-3">gnunet_namestore_gtk_save_button</action-widget> |
440 | </action-widgets> | 445 | </action-widgets> |
441 | </object> | 446 | </object> |
442 | <object class="GtkMenu" id="gnunet_namestore_gtk_gns_edit_popup_menu"> | 447 | <object class="GtkMenu" id="gnunet_namestore_gtk_edit_popup_menu"> |
443 | <property name="visible">True</property> | 448 | <property name="visible">True</property> |
444 | <property name="can_focus">False</property> | 449 | <property name="can_focus">False</property> |
445 | <child> | 450 | <child> |
446 | <object class="GtkMenuItem" id="gnunet_namestore_gtk_gns_popup_edit_button"> | 451 | <object class="GtkMenuItem" id="gnunet_namestore_gtk_popup_edit_button"> |
447 | <property name="use_action_appearance">False</property> | 452 | <property name="use_action_appearance">False</property> |
448 | <property name="visible">True</property> | 453 | <property name="visible">True</property> |
449 | <property name="can_focus">False</property> | 454 | <property name="can_focus">False</property> |
450 | <property name="tooltip_text" translatable="yes">Edit GNS entry</property> | 455 | <property name="tooltip_text" translatable="yes">Edit GNS entry</property> |
451 | <property name="label" translatable="yes">Edit</property> | 456 | <property name="label" translatable="yes">Edit</property> |
452 | <signal name="activate" handler="gnunet_namestore_gtk_gns_popup_edit_button_activate_cb" swapped="no"/> | 457 | <signal name="activate" handler="gnunet_namestore_gtk_popup_edit_button_activate_cb" swapped="no"/> |
453 | </object> | 458 | </object> |
454 | </child> | 459 | </child> |
455 | </object> | 460 | </object> |
456 | <object class="GtkTreeStore" id="gnunet_namestore_gtk_gns_treestore"> | 461 | <object class="GtkTreeStore" id="gnunet_namestore_gtk_treestore"> |
457 | <columns> | 462 | <columns> |
458 | <!-- column-name name --> | 463 | <!-- column-name name --> |
459 | <column type="gchararray"/> | 464 | <column type="gchararray"/> |
@@ -493,7 +498,7 @@ | |||
493 | <column type="guint"/> | 498 | <column type="guint"/> |
494 | </columns> | 499 | </columns> |
495 | </object> | 500 | </object> |
496 | <object class="GtkListStore" id="gnunet_namestore_gtk_gns_type_liststore"> | 501 | <object class="GtkListStore" id="gnunet_namestore_gtk_type_liststore"> |
497 | <columns> | 502 | <columns> |
498 | <!-- column-name type --> | 503 | <!-- column-name type --> |
499 | <column type="guint"/> | 504 | <column type="guint"/> |
diff --git a/src/fs/gnunet-fs-gtk.c b/src/fs/gnunet-fs-gtk.c index 4b3f0c35..63e9f00f 100644 --- a/src/fs/gnunet-fs-gtk.c +++ b/src/fs/gnunet-fs-gtk.c | |||
@@ -674,10 +674,10 @@ run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
674 | 674 | ||
675 | ml = cls; | 675 | ml = cls; |
676 | /* setup main context */ | 676 | /* setup main context */ |
677 | if (GNUNET_OK != GNUNET_GTK_main_loop_build_window (cls, &main_context)) | 677 | if (GNUNET_OK != GNUNET_GTK_main_loop_build_window (ml, &main_context)) |
678 | return; | 678 | return; |
679 | main_context.builder = GNUNET_GTK_main_loop_get_builder (cls); | 679 | main_context.builder = GNUNET_GTK_main_loop_get_builder (ml); |
680 | main_context.cfg = GNUNET_GTK_main_loop_get_configuration (cls); | 680 | main_context.cfg = GNUNET_GTK_main_loop_get_configuration (ml); |
681 | main_context.search_ns_treestore = GTK_TREE_STORE (GNUNET_FS_GTK_get_main_window_object ("main_window_search_namespace_treestore")); | 681 | main_context.search_ns_treestore = GTK_TREE_STORE (GNUNET_FS_GTK_get_main_window_object ("main_window_search_namespace_treestore")); |
682 | main_context.main_window = GTK_WIDGET (GNUNET_FS_GTK_get_main_window_object ("GNUNET_GTK_main_window")); | 682 | main_context.main_window = GTK_WIDGET (GNUNET_FS_GTK_get_main_window_object ("GNUNET_GTK_main_window")); |
683 | main_context.ns_selector_treeview = GTK_TREE_VIEW (GNUNET_FS_GTK_get_main_window_object ("namespace_selector_treeview")); | 683 | main_context.ns_selector_treeview = GTK_TREE_VIEW (GNUNET_FS_GTK_get_main_window_object ("namespace_selector_treeview")); |
diff --git a/src/namestore/Makefile.am b/src/namestore/Makefile.am index 372c7f8e..20992555 100644 --- a/src/namestore/Makefile.am +++ b/src/namestore/Makefile.am | |||
@@ -21,6 +21,5 @@ gnunet_namestore_gtk_CFLAGS = \ | |||
21 | @GNUNET_CFLAGS@ \ | 21 | @GNUNET_CFLAGS@ \ |
22 | @GLADE_CFLAGS@ \ | 22 | @GLADE_CFLAGS@ \ |
23 | @QR_CFLAGS@ | 23 | @QR_CFLAGS@ |
24 | 24 | gnunet_namestore_gtk_LDFLAGS = \ | |
25 | gnunet_setup_LDFLAGS = \ | ||
26 | -export-dynamic | 25 | -export-dynamic |
diff --git a/src/namestore/gnunet-namestore-gtk.c b/src/namestore/gnunet-namestore-gtk.c index 8c3acf8a..eb13501f 100644 --- a/src/namestore/gnunet-namestore-gtk.c +++ b/src/namestore/gnunet-namestore-gtk.c | |||
@@ -374,14 +374,9 @@ static struct GNUNET_IDENTITY_Operation *id_op; | |||
374 | static struct GNUNET_GTK_MainLoop *ml; | 374 | static struct GNUNET_GTK_MainLoop *ml; |
375 | 375 | ||
376 | /** | 376 | /** |
377 | * Name of the configuration file. | ||
378 | */ | ||
379 | static const char *cfgName; | ||
380 | |||
381 | /** | ||
382 | * Our configuration. | 377 | * Our configuration. |
383 | */ | 378 | */ |
384 | struct GNUNET_CONFIGURATION_Handle *cfg; | 379 | static const struct GNUNET_CONFIGURATION_Handle *cfg; |
385 | 380 | ||
386 | /** | 381 | /** |
387 | * Global return value (for success/failure of gnunet-setup). | 382 | * Global return value (for success/failure of gnunet-setup). |
@@ -389,7 +384,6 @@ struct GNUNET_CONFIGURATION_Handle *cfg; | |||
389 | static int gret; | 384 | static int gret; |
390 | 385 | ||
391 | 386 | ||
392 | |||
393 | /** | 387 | /** |
394 | * Get an object from the main window. | 388 | * Get an object from the main window. |
395 | * | 389 | * |
@@ -405,7 +399,6 @@ get_object (const char *name) | |||
405 | } | 399 | } |
406 | 400 | ||
407 | 401 | ||
408 | |||
409 | #if HAVE_QRENCODE_H | 402 | #if HAVE_QRENCODE_H |
410 | #include <qrencode.h> | 403 | #include <qrencode.h> |
411 | #include <gdk-pixbuf/gdk-pixbuf.h> | 404 | #include <gdk-pixbuf/gdk-pixbuf.h> |
@@ -441,7 +434,7 @@ create_qrcode (unsigned int scale) | |||
441 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "QRinput_new2"); | 434 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "QRinput_new2"); |
442 | return NULL; | 435 | return NULL; |
443 | } | 436 | } |
444 | entry = GTK_ENTRY (get_object ("gnunet_namestore_gtk_gns_pseu_entry")); | 437 | entry = GTK_ENTRY (get_object ("gnunet_namestore_gtk_pseu_entry")); |
445 | pseu = gtk_entry_get_text (GTK_ENTRY(entry)); | 438 | pseu = gtk_entry_get_text (GTK_ENTRY(entry)); |
446 | GNUNET_asprintf (&str, | 439 | GNUNET_asprintf (&str, |
447 | "gnunet://gns/%s/%s\n", | 440 | "gnunet://gns/%s/%s\n", |
@@ -514,7 +507,7 @@ setup_qrcode () | |||
514 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, _("Failed to initialize QR-code pixbuf")); | 507 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, _("Failed to initialize QR-code pixbuf")); |
515 | return; | 508 | return; |
516 | } | 509 | } |
517 | image = GTK_IMAGE (get_object ("gnunet_namestore_gtk_gns_qr_image")); | 510 | image = GTK_IMAGE (get_object ("gnunet_namestore_gtk_qr_image")); |
518 | if (NULL == image) | 511 | if (NULL == image) |
519 | { | 512 | { |
520 | GNUNET_break (0); | 513 | GNUNET_break (0); |
@@ -532,7 +525,7 @@ setup_qrcode () | |||
532 | * | 525 | * |
533 | * @param dialog the dialog | 526 | * @param dialog the dialog |
534 | * @param response_id reason for the dialog closing | 527 | * @param response_id reason for the dialog closing |
535 | * @param user_data the 'GtkBuilder' we used to create the dialog | 528 | * @param user_data the `GtkBuilder` we used to create the dialog |
536 | */ | 529 | */ |
537 | void | 530 | void |
538 | gnunet_namestore_gtk_qr_save_as_dialog_response_cb (GtkDialog *dialog, | 531 | gnunet_namestore_gtk_qr_save_as_dialog_response_cb (GtkDialog *dialog, |
@@ -577,7 +570,7 @@ gnunet_namestore_gtk_qr_save_as_dialog_response_cb (GtkDialog *dialog, | |||
577 | * dialog to get the desired filename and file type. | 570 | * dialog to get the desired filename and file type. |
578 | */ | 571 | */ |
579 | void | 572 | void |
580 | gnunet_namestore_gtk_gns_qr_saveas_button_clicked_cb (GtkButton *button, | 573 | gnunet_namestore_gtk_qr_saveas_button_clicked_cb (GtkButton *button, |
581 | gpointer user_data) | 574 | gpointer user_data) |
582 | { | 575 | { |
583 | GtkBuilder *builder; | 576 | GtkBuilder *builder; |
@@ -586,7 +579,7 @@ gnunet_namestore_gtk_gns_qr_saveas_button_clicked_cb (GtkButton *button, | |||
586 | GtkEntry *entry; | 579 | GtkEntry *entry; |
587 | char *suggestion; | 580 | char *suggestion; |
588 | 581 | ||
589 | entry = GTK_ENTRY (get_object ("gnunet_namestore_gtk_gns_pseu_entry")); | 582 | entry = GTK_ENTRY (get_object ("gnunet_namestore_gtk_pseu_entry")); |
590 | pseu = gtk_entry_get_text (GTK_ENTRY(entry)); | 583 | pseu = gtk_entry_get_text (GTK_ENTRY(entry)); |
591 | builder = | 584 | builder = |
592 | GNUNET_GTK_get_new_builder ("gnunet_namestore_gtk_qr_save_as_dialog.glade", | 585 | GNUNET_GTK_get_new_builder ("gnunet_namestore_gtk_qr_save_as_dialog.glade", |
@@ -612,10 +605,10 @@ gnunet_namestore_gtk_gns_qr_saveas_button_clicked_cb (GtkButton *button, | |||
612 | * Check if adding a record of the given type is Ok given the other | 605 | * Check if adding a record of the given type is Ok given the other |
613 | * records already present for the given name. | 606 | * records already present for the given name. |
614 | * | 607 | * |
615 | * @param rd_count size of the 'rd' array | 608 | * @param rd_count size of the @a rd array |
616 | * @param rd existing records | 609 | * @param rd existing records |
617 | * @param n_type new record to be added | 610 | * @param n_type new record to be added |
618 | * @return GNUNET_OK if adding this record is OK, GNUNET_NO if not | 611 | * @return #GNUNET_OK if adding this record is OK, #GNUNET_NO if not |
619 | */ | 612 | */ |
620 | static int | 613 | static int |
621 | check_record_permitted (unsigned int rd_count, | 614 | check_record_permitted (unsigned int rd_count, |
@@ -665,8 +658,8 @@ check_record_permitted (unsigned int rd_count, | |||
665 | /** | 658 | /** |
666 | * Function called upon completion of an operation. | 659 | * Function called upon completion of an operation. |
667 | * | 660 | * |
668 | * @param cls the 'struct OperationContext' of the operation that completed | 661 | * @param cls the `struct OperationContext` of the operation that completed |
669 | * @param success GNUNET_OK if the operation succeeded | 662 | * @param success #GNUNET_OK if the operation succeeded |
670 | * @param emsg error message if the operation failed | 663 | * @param emsg error message if the operation failed |
671 | */ | 664 | */ |
672 | static void | 665 | static void |
@@ -735,13 +728,13 @@ clear_zone_view () | |||
735 | GNUNET_CONTAINER_multihashmap_iterate (n2r, | 728 | GNUNET_CONTAINER_multihashmap_iterate (n2r, |
736 | &release_ri, | 729 | &release_ri, |
737 | NULL); | 730 | NULL); |
738 | gtk_widget_hide (GTK_WIDGET (get_object ("gnunet_namestore_gtk_gns_zone_selection_hbuttonbox"))); | 731 | gtk_widget_hide (GTK_WIDGET (get_object ("gnunet_namestore_gtk_zone_selection_hbuttonbox"))); |
739 | gtk_widget_show (GTK_WIDGET (get_object ("gnunet_namestore_gtk_gns_status_label"))); | 732 | gtk_widget_show (GTK_WIDGET (get_object ("gnunet_namestore_gtk_status_label"))); |
740 | gtk_widget_hide (GTK_WIDGET (get_object ("gnunet_namestore_gtk_gns_main_scrolledwindow"))); | 733 | gtk_widget_hide (GTK_WIDGET (get_object ("gnunet_namestore_gtk_scrolledwindow"))); |
741 | gtk_widget_hide (GTK_WIDGET (get_object ("gnunet_namestore_gtk_gns_qr_image"))); | 734 | gtk_widget_hide (GTK_WIDGET (get_object ("gnunet_namestore_gtk_qr_image"))); |
742 | gtk_widget_hide (GTK_WIDGET (get_object ("gnunet_namestore_gtk_gns_qr_saveas_button"))); | 735 | gtk_widget_hide (GTK_WIDGET (get_object ("gnunet_namestore_gtk_qr_saveas_button"))); |
743 | gtk_widget_hide (GTK_WIDGET (get_object ("gnunet_namestore_gtk_gns_qr_vseparator"))); | 736 | gtk_widget_hide (GTK_WIDGET (get_object ("gnunet_namestore_gtk_qr_vseparator"))); |
744 | gtk_widget_hide (GTK_WIDGET (get_object ("gnunet_namestore_gtk_gns_pseu_hbox"))); | 737 | gtk_widget_hide (GTK_WIDGET (get_object ("gnunet_namestore_gtk_pseu_hbox"))); |
745 | gtk_tree_store_clear (ts); | 738 | gtk_tree_store_clear (ts); |
746 | } | 739 | } |
747 | 740 | ||
@@ -804,7 +797,7 @@ free_edit_dialog_context (struct EditDialogContext *edc) | |||
804 | * Process a record that was stored in the namestore. | 797 | * Process a record that was stored in the namestore. |
805 | * | 798 | * |
806 | * @param cls closure | 799 | * @param cls closure |
807 | * @param rd_count number of entries in 'rd' array | 800 | * @param rd_count number of entries in @a rd array |
808 | * @param rd array of records with data to store | 801 | * @param rd array of records with data to store |
809 | */ | 802 | */ |
810 | static void | 803 | static void |
@@ -853,7 +846,7 @@ merge_with_existing_records (void *cls, | |||
853 | * Process an encrypted that was stored in the namestore for | 846 | * Process an encrypted that was stored in the namestore for |
854 | * merging. | 847 | * merging. |
855 | * | 848 | * |
856 | * @param cls closure | 849 | * @param cls closure with the `struct MoveOperationContext` |
857 | * @param block block to decrypt | 850 | * @param block block to decrypt |
858 | */ | 851 | */ |
859 | static void | 852 | static void |
@@ -885,7 +878,7 @@ decrypt_block_for_merge (void *cls, | |||
885 | 878 | ||
886 | /** | 879 | /** |
887 | * The edit dialog completed; update the namestore and the | 880 | * The edit dialog completed; update the namestore and the |
888 | * view based on the new values in 'edc'. | 881 | * view based on the new values in @a edc. |
889 | * | 882 | * |
890 | * @param edc editing context information | 883 | * @param edc editing context information |
891 | * @param ret return code of the dialog | 884 | * @param ret return code of the dialog |
@@ -1080,7 +1073,7 @@ edit_dialog_continuation (struct EditDialogContext *edc, | |||
1080 | * @param ri record information for this name (can be NULL | 1073 | * @param ri record information for this name (can be NULL |
1081 | * if this is the first record for the name) | 1074 | * if this is the first record for the name) |
1082 | * @param off offset of the record being edited in the | 1075 | * @param off offset of the record being edited in the |
1083 | * ri's list; UINT_MAX if this is a new record | 1076 | * @a ri's list; UINT_MAX if this is a new record |
1084 | */ | 1077 | */ |
1085 | static void | 1078 | static void |
1086 | launch_edit_dialog (gint n_type, | 1079 | launch_edit_dialog (gint n_type, |
@@ -1174,7 +1167,7 @@ launch_edit_dialog (gint n_type, | |||
1174 | * | 1167 | * |
1175 | * @param ri existing records | 1168 | * @param ri existing records |
1176 | * @param n_type type of the new record | 1169 | * @param n_type type of the new record |
1177 | * @return GNUNET_OK if this is allowed | 1170 | * @return #GNUNET_OK if this is allowed |
1178 | */ | 1171 | */ |
1179 | static int | 1172 | static int |
1180 | check_permissions (struct RecordInfo *ri, | 1173 | check_permissions (struct RecordInfo *ri, |
@@ -1210,8 +1203,8 @@ check_permissions (struct RecordInfo *ri, | |||
1210 | * @param user_data main window builder | 1203 | * @param user_data main window builder |
1211 | */ | 1204 | */ |
1212 | void | 1205 | void |
1213 | gnunet_namestore_gtk_gns_popup_edit_button_activate_cb (GtkWidget *widget, | 1206 | gnunet_namestore_gtk_popup_edit_button_activate_cb (GtkWidget *widget, |
1214 | gpointer user_data) | 1207 | gpointer user_data) |
1215 | { | 1208 | { |
1216 | GtkTreeSelection *sel; | 1209 | GtkTreeSelection *sel; |
1217 | gint n_type; | 1210 | gint n_type; |
@@ -1263,10 +1256,10 @@ gnunet_namestore_gtk_gns_popup_edit_button_activate_cb (GtkWidget *widget, | |||
1263 | * @param user_data unused | 1256 | * @param user_data unused |
1264 | */ | 1257 | */ |
1265 | void | 1258 | void |
1266 | gnunet_namestore_gtk_gns_type_cellrenderercombo_edited_cb (GtkCellRendererText *text, | 1259 | gnunet_namestore_gtk_type_cellrenderercombo_edited_cb (GtkCellRendererText *text, |
1267 | gchar *path_string, | 1260 | gchar *path_string, |
1268 | gchar *new_text, | 1261 | gchar *new_text, |
1269 | gpointer user_data) | 1262 | gpointer user_data) |
1270 | { | 1263 | { |
1271 | GtkTreeIter it; | 1264 | GtkTreeIter it; |
1272 | guint type; | 1265 | guint type; |
@@ -1322,10 +1315,10 @@ gnunet_namestore_gtk_gns_type_cellrenderercombo_edited_cb (GtkCellRendererText * | |||
1322 | * @param user_data unused | 1315 | * @param user_data unused |
1323 | */ | 1316 | */ |
1324 | void | 1317 | void |
1325 | gnunet_namestore_gtk_gns_name_cellrenderertext_edited_cb (GtkCellRendererText *renderer, | 1318 | gnunet_namestore_gtk_name_cellrenderertext_edited_cb (GtkCellRendererText *renderer, |
1326 | gchar *path, | 1319 | gchar *path, |
1327 | gchar *new_text, | 1320 | gchar *new_text, |
1328 | gpointer user_data) | 1321 | gpointer user_data) |
1329 | { | 1322 | { |
1330 | GtkTreeIter it; | 1323 | GtkTreeIter it; |
1331 | gboolean not_dummy; | 1324 | gboolean not_dummy; |
@@ -1447,8 +1440,8 @@ create_popup_menu () | |||
1447 | * @return TRUE if a menu was activated | 1440 | * @return TRUE if a menu was activated |
1448 | */ | 1441 | */ |
1449 | gboolean | 1442 | gboolean |
1450 | gnunet_namestore_gtk_gns_main_treeview_popup_menu_cb (GtkWidget *widget, | 1443 | gnunet_namestore_gtk_treeview_popup_menu_cb (GtkWidget *widget, |
1451 | gpointer user_data) | 1444 | gpointer user_data) |
1452 | { | 1445 | { |
1453 | return create_popup_menu (); | 1446 | return create_popup_menu (); |
1454 | } | 1447 | } |
@@ -1464,7 +1457,7 @@ gnunet_namestore_gtk_gns_main_treeview_popup_menu_cb (GtkWidget *widget, | |||
1464 | * @return TRUE if a menu was activated (event was handled) | 1457 | * @return TRUE if a menu was activated (event was handled) |
1465 | */ | 1458 | */ |
1466 | gboolean | 1459 | gboolean |
1467 | gnunet_namestore_gtk_gns_main_treeview_button_press_event_cb (GtkWidget *widget, | 1460 | gnunet_namestore_gtk_treeview_button_press_event_cb (GtkWidget *widget, |
1468 | GdkEventButton *event, | 1461 | GdkEventButton *event, |
1469 | gpointer user_data) | 1462 | gpointer user_data) |
1470 | { | 1463 | { |
@@ -1488,7 +1481,7 @@ gnunet_namestore_gtk_gns_main_treeview_button_press_event_cb (GtkWidget *widget, | |||
1488 | * @return TRUE if the key was processed ('del') | 1481 | * @return TRUE if the key was processed ('del') |
1489 | */ | 1482 | */ |
1490 | gboolean | 1483 | gboolean |
1491 | gnunet_namestore_gtk_gns_main_treeview_key_press_event_cb (GtkWidget *widget, | 1484 | gnunet_namestore_gtk_treeview_key_press_event_cb (GtkWidget *widget, |
1492 | GdkEventKey *event, | 1485 | GdkEventKey *event, |
1493 | gpointer user_data) | 1486 | gpointer user_data) |
1494 | { | 1487 | { |
@@ -1614,7 +1607,7 @@ gnunet_namestore_gtk_gns_main_treeview_key_press_event_cb (GtkWidget *widget, | |||
1614 | * @param user_data unused | 1607 | * @param user_data unused |
1615 | */ | 1608 | */ |
1616 | void | 1609 | void |
1617 | gnunet_namestore_gtk_gns_pseu_entry_changed_cb (GtkEditable *editable, | 1610 | gnunet_namestore_gtk_pseu_entry_changed_cb (GtkEditable *editable, |
1618 | gpointer user_data) | 1611 | gpointer user_data) |
1619 | { | 1612 | { |
1620 | const gchar *pseu; | 1613 | const gchar *pseu; |
@@ -1713,7 +1706,7 @@ gnunet_namestore_gtk_gns_pseu_entry_changed_cb (GtkEditable *editable, | |||
1713 | * @param user_data unused | 1706 | * @param user_data unused |
1714 | */ | 1707 | */ |
1715 | void | 1708 | void |
1716 | gnunet_namestore_gtk_gns_public_key_copy_button_clicked_cb (GtkButton *button, | 1709 | gnunet_namestore_gtk_public_key_copy_button_clicked_cb (GtkButton *button, |
1717 | gpointer user_data) | 1710 | gpointer user_data) |
1718 | { | 1711 | { |
1719 | GtkClipboard *cb; | 1712 | GtkClipboard *cb; |
@@ -1737,20 +1730,20 @@ static void | |||
1737 | zone_sync_proc (void *cls) | 1730 | zone_sync_proc (void *cls) |
1738 | { | 1731 | { |
1739 | if (0 == strcmp (current_zone_option, "ZONEKEY")) | 1732 | if (0 == strcmp (current_zone_option, "ZONEKEY")) |
1740 | gtk_widget_show (GTK_WIDGET (get_object ("gnunet_namestore_gtk_gns_pseu_hbox"))); | 1733 | gtk_widget_show (GTK_WIDGET (get_object ("gnunet_namestore_gtk_pseu_hbox"))); |
1741 | #if HAVE_QRENCODE_H | 1734 | #if HAVE_QRENCODE_H |
1742 | setup_qrcode (); | 1735 | setup_qrcode (); |
1743 | gtk_widget_show (GTK_WIDGET (get_object ("gnunet_namestore_gtk_gns_qr_image"))); | 1736 | gtk_widget_show (GTK_WIDGET (get_object ("gnunet_namestore_gtk_qr_image"))); |
1744 | gtk_widget_show (GTK_WIDGET (get_object ("gnunet_namestore_gtk_gns_qr_saveas_button"))); | 1737 | gtk_widget_show (GTK_WIDGET (get_object ("gnunet_namestore_gtk_qr_saveas_button"))); |
1745 | gtk_widget_show (GTK_WIDGET (get_object ("gnunet_namestore_gtk_gns_qr_vseparator"))); | 1738 | gtk_widget_show (GTK_WIDGET (get_object ("gnunet_namestore_gtk_qr_vseparator"))); |
1746 | #else | 1739 | #else |
1747 | gtk_widget_hide (GTK_WIDGET (get_object ("gnunet_namestore_gtk_gns_qr_image"))); | 1740 | gtk_widget_hide (GTK_WIDGET (get_object ("gnunet_namestore_gtk_qr_image"))); |
1748 | gtk_widget_hide (GTK_WIDGET (get_object ("gnunet_namestore_gtk_gns_qr_saveas_button"))); | 1741 | gtk_widget_hide (GTK_WIDGET (get_object ("gnunet_namestore_gtk_qr_saveas_button"))); |
1749 | gtk_widget_hide (GTK_WIDGET (get_object ("gnunet_namestore_gtk_gns_qr_vseparator"))); | 1742 | gtk_widget_hide (GTK_WIDGET (get_object ("gnunet_namestore_gtk_qr_vseparator"))); |
1750 | #endif | 1743 | #endif |
1751 | gtk_widget_hide (GTK_WIDGET (get_object ("gnunet_namestore_gtk_gns_status_label"))); | 1744 | gtk_widget_hide (GTK_WIDGET (get_object ("gnunet_namestore_gtk_status_label"))); |
1752 | gtk_widget_show (GTK_WIDGET (get_object ("gnunet_namestore_gtk_gns_main_scrolledwindow"))); | 1745 | gtk_widget_show (GTK_WIDGET (get_object ("gnunet_namestore_gtk_scrolledwindow"))); |
1753 | gtk_widget_show (GTK_WIDGET (get_object ("gnunet_namestore_gtk_gns_zone_selection_hbuttonbox"))); | 1746 | gtk_widget_show (GTK_WIDGET (get_object ("gnunet_namestore_gtk_zone_selection_hbuttonbox"))); |
1754 | } | 1747 | } |
1755 | 1748 | ||
1756 | 1749 | ||
@@ -1924,7 +1917,7 @@ zone_iteration_proc (void *cls, | |||
1924 | (GNUNET_NAMESTORE_TYPE_PSEU == rd[c].record_type) && | 1917 | (GNUNET_NAMESTORE_TYPE_PSEU == rd[c].record_type) && |
1925 | (NULL == current_pseudonym) ) | 1918 | (NULL == current_pseudonym) ) |
1926 | { | 1919 | { |
1927 | pseu_entry = GTK_ENTRY((get_object ("gnunet_namestore_gtk_gns_pseu_entry"))); | 1920 | pseu_entry = GTK_ENTRY((get_object ("gnunet_namestore_gtk_pseu_entry"))); |
1928 | gtk_entry_set_text (pseu_entry, val); | 1921 | gtk_entry_set_text (pseu_entry, val); |
1929 | #if HAVE_QRENCODE_H | 1922 | #if HAVE_QRENCODE_H |
1930 | setup_qrcode (); | 1923 | setup_qrcode (); |
@@ -1998,7 +1991,7 @@ identity_cb (void *cls, | |||
1998 | show_error_message (_("Failed to load zone"), | 1991 | show_error_message (_("Failed to load zone"), |
1999 | emsg); | 1992 | emsg); |
2000 | GNUNET_free (emsg); | 1993 | GNUNET_free (emsg); |
2001 | gtk_widget_show (GTK_WIDGET (get_object ("gnunet_namestore_gtk_gns_zone_selection_hbuttonbox"))); | 1994 | gtk_widget_show (GTK_WIDGET (get_object ("gnunet_namestore_gtk_zone_selection_hbuttonbox"))); |
2002 | return; | 1995 | return; |
2003 | } | 1996 | } |
2004 | pkey = GNUNET_new (struct GNUNET_CRYPTO_EccPrivateKey); | 1997 | pkey = GNUNET_new (struct GNUNET_CRYPTO_EccPrivateKey); |
@@ -2006,7 +1999,7 @@ identity_cb (void *cls, | |||
2006 | GNUNET_CRYPTO_ecc_key_get_public_for_signature (pkey, &pubkey); | 1999 | GNUNET_CRYPTO_ecc_key_get_public_for_signature (pkey, &pubkey); |
2007 | label = g_markup_printf_escaped (_("<b>Editing zone %s</b>"), | 2000 | label = g_markup_printf_escaped (_("<b>Editing zone %s</b>"), |
2008 | GNUNET_NAMESTORE_z2s (&pubkey)); | 2001 | GNUNET_NAMESTORE_z2s (&pubkey)); |
2009 | gtk_label_set_markup (GTK_LABEL (get_object ("gnunet_namestore_gtk_gns_zone_label")), | 2002 | gtk_label_set_markup (GTK_LABEL (get_object ("gnunet_namestore_gtk_zone_label")), |
2010 | label); | 2003 | label); |
2011 | g_free (label); | 2004 | g_free (label); |
2012 | /* Append a top level row and leave it empty */ | 2005 | /* Append a top level row and leave it empty */ |
@@ -2071,8 +2064,8 @@ load_zone (const char *zonename) | |||
2071 | * @param user_data builder, unused | 2064 | * @param user_data builder, unused |
2072 | */ | 2065 | */ |
2073 | void | 2066 | void |
2074 | gnunet_namestore_gtk_gns_shorten_zone_selection_radiobutton_toggled_cb (GtkToggleButton *togglebutton, | 2067 | gnunet_namestore_gtk_shorten_zone_selection_radiobutton_toggled_cb (GtkToggleButton *togglebutton, |
2075 | gpointer user_data) | 2068 | gpointer user_data) |
2076 | { | 2069 | { |
2077 | if (gtk_toggle_button_get_active (togglebutton)) | 2070 | if (gtk_toggle_button_get_active (togglebutton)) |
2078 | load_zone ("gns-short"); | 2071 | load_zone ("gns-short"); |
@@ -2087,8 +2080,8 @@ gnunet_namestore_gtk_gns_shorten_zone_selection_radiobutton_toggled_cb (GtkToggl | |||
2087 | * @param user_data builder, unused | 2080 | * @param user_data builder, unused |
2088 | */ | 2081 | */ |
2089 | void | 2082 | void |
2090 | gnunet_namestore_gtk_gns_private_zone_selection_radiobutton_toggled_cb (GtkToggleButton *togglebutton, | 2083 | gnunet_namestore_gtk_private_zone_selection_radiobutton_toggled_cb (GtkToggleButton *togglebutton, |
2091 | gpointer user_data) | 2084 | gpointer user_data) |
2092 | { | 2085 | { |
2093 | if (gtk_toggle_button_get_active (togglebutton)) | 2086 | if (gtk_toggle_button_get_active (togglebutton)) |
2094 | load_zone ("gns-private"); | 2087 | load_zone ("gns-private"); |
@@ -2103,8 +2096,8 @@ gnunet_namestore_gtk_gns_private_zone_selection_radiobutton_toggled_cb (GtkToggl | |||
2103 | * @param user_data builder, unused | 2096 | * @param user_data builder, unused |
2104 | */ | 2097 | */ |
2105 | void | 2098 | void |
2106 | gnunet_namestore_gtk_gns_master_zone_selection_radiobutton_toggled_cb (GtkToggleButton *togglebutton, | 2099 | gnunet_namestore_gtk_master_zone_selection_radiobutton_toggled_cb (GtkToggleButton *togglebutton, |
2107 | gpointer user_data) | 2100 | gpointer user_data) |
2108 | { | 2101 | { |
2109 | if (gtk_toggle_button_get_active (togglebutton)) | 2102 | if (gtk_toggle_button_get_active (togglebutton)) |
2110 | load_zone ("gns-master"); | 2103 | load_zone ("gns-master"); |
@@ -2118,7 +2111,8 @@ gnunet_namestore_gtk_gns_master_zone_selection_radiobutton_toggled_cb (GtkToggle | |||
2118 | * @param tc scheduler context | 2111 | * @param tc scheduler context |
2119 | */ | 2112 | */ |
2120 | static void | 2113 | static void |
2121 | cleanup_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 2114 | cleanup_task (void *cls, |
2115 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
2122 | { | 2116 | { |
2123 | struct OperationContext *oc; | 2117 | struct OperationContext *oc; |
2124 | struct MoveOperationContext *moc; | 2118 | struct MoveOperationContext *moc; |
@@ -2131,8 +2125,8 @@ cleanup_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
2131 | GNUNET_GTK_main_loop_quit (ml); | 2125 | GNUNET_GTK_main_loop_quit (ml); |
2132 | 2126 | ||
2133 | 2127 | ||
2134 | gtk_widget_show (GTK_WIDGET (get_object ("gnunet_namestore_gtk_gns_status_label"))); | 2128 | gtk_widget_show (GTK_WIDGET (get_object ("gnunet_namestore_gtk_status_label"))); |
2135 | gtk_widget_hide (GTK_WIDGET (get_object ("gnunet_namestore_gtk_gns_main_scrolledwindow"))); | 2129 | gtk_widget_hide (GTK_WIDGET (get_object ("gnunet_namestore_gtk_scrolledwindow"))); |
2136 | if (NULL != zmon) | 2130 | if (NULL != zmon) |
2137 | { | 2131 | { |
2138 | GNUNET_NAMESTORE_zone_monitor_stop (zmon); | 2132 | GNUNET_NAMESTORE_zone_monitor_stop (zmon); |
@@ -2220,26 +2214,26 @@ run (void *cls, | |||
2220 | GtkLabel *status_label; | 2214 | GtkLabel *status_label; |
2221 | 2215 | ||
2222 | ml = cls; | 2216 | ml = cls; |
2217 | cfg = GNUNET_GTK_main_loop_get_configuration (ml); | ||
2223 | if (GNUNET_OK != GNUNET_GTK_main_loop_build_window (ml, NULL)) | 2218 | if (GNUNET_OK != GNUNET_GTK_main_loop_build_window (ml, NULL)) |
2224 | return; | 2219 | return; |
2225 | 2220 | ||
2226 | cfgName = GNUNET_GTK_main_loop_get_configuration_file (ml); | 2221 | main_window = GTK_WIDGET (get_object ("gnunet_namestore_gtk_dialog")); |
2227 | main_window = GTK_WIDGET (get_object ("gnunet_namestore_dialog")); | ||
2228 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, | 2222 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, |
2229 | &cleanup_task, NULL); | 2223 | &cleanup_task, NULL); |
2230 | 2224 | ||
2231 | namestore = GNUNET_NAMESTORE_connect (cfg); | 2225 | namestore = GNUNET_NAMESTORE_connect (cfg); |
2232 | if (NULL == namestore) | 2226 | if (NULL == namestore) |
2233 | { | 2227 | { |
2234 | status_label = GTK_LABEL (get_object ("gnunet_namestore_gtk_gns_status_label")); | 2228 | status_label = GTK_LABEL (get_object ("gnunet_namestore_gtk_status_label")); |
2235 | label = g_markup_printf_escaped (_("<b><big>Failed to connect to namestore</b></big>")); | 2229 | label = g_markup_printf_escaped (_("<b><big>Failed to connect to namestore</b></big>")); |
2236 | gtk_label_set_markup (status_label, label); | 2230 | gtk_label_set_markup (status_label, label); |
2237 | g_free (label); | 2231 | g_free (label); |
2238 | return; | 2232 | return; |
2239 | } | 2233 | } |
2240 | identity = GNUNET_IDENTITY_connect (cfg, NULL, NULL); | 2234 | identity = GNUNET_IDENTITY_connect (cfg, NULL, NULL); |
2241 | ts = GTK_TREE_STORE (get_object ("gnunet_namestore_gtk_gns_treestore")); | 2235 | ts = GTK_TREE_STORE (get_object ("gnunet_namestore_gtk_treestore")); |
2242 | tv = GTK_TREE_VIEW (get_object ("gnunet_namestore_gtk_gns_main_treeview")); | 2236 | tv = GTK_TREE_VIEW (get_object ("gnunet_namestore_gtk_treeview")); |
2243 | tm = GTK_TREE_MODEL (ts); | 2237 | tm = GTK_TREE_MODEL (ts); |
2244 | n2r = GNUNET_CONTAINER_multihashmap_create (128, GNUNET_NO); | 2238 | n2r = GNUNET_CONTAINER_multihashmap_create (128, GNUNET_NO); |
2245 | load_zone ("gns-master"); | 2239 | load_zone ("gns-master"); |