aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-02-02 17:34:54 +0000
committerChristian Grothoff <christian@grothoff.org>2012-02-02 17:34:54 +0000
commita84f12987f2ab515b93b9928b751b438d058f326 (patch)
treec31dd7ee2196749a4ea26f7f11b9361cd9a4edd4
parent5292a4545a1ee9bc3bae1cf3c8973a98ff2509fc (diff)
downloadgnunet-gtk-a84f12987f2ab515b93b9928b751b438d058f326.tar.gz
gnunet-gtk-a84f12987f2ab515b93b9928b751b438d058f326.zip
-eliminating dead glade file
-rw-r--r--contrib/Makefile.am1
-rw-r--r--contrib/gnunet_fs_gtk_advertise_pseudonym_dialog.glade793
-rw-r--r--src/fs/gnunet-fs-gtk_advertise-pseudonym.c135
3 files changed, 75 insertions, 854 deletions
diff --git a/contrib/Makefile.am b/contrib/Makefile.am
index 4b6f8b4a..2ac5e305 100644
--- a/contrib/Makefile.am
+++ b/contrib/Makefile.am
@@ -14,7 +14,6 @@ EXTRA_DIST = \
14 14
15pkgdata_DATA = \ 15pkgdata_DATA = \
16 gnunet_fs_gtk_about_window.glade \ 16 gnunet_fs_gtk_about_window.glade \
17 gnunet_fs_gtk_advertise_pseudonym_dialog.glade \
18 gnunet_fs_gtk_create_namespace_dialog.glade \ 17 gnunet_fs_gtk_create_namespace_dialog.glade \
19 gnunet_fs_gtk_download_as_dialog.glade \ 18 gnunet_fs_gtk_download_as_dialog.glade \
20 gnunet_fs_gtk_main_window.glade \ 19 gnunet_fs_gtk_main_window.glade \
diff --git a/contrib/gnunet_fs_gtk_advertise_pseudonym_dialog.glade b/contrib/gnunet_fs_gtk_advertise_pseudonym_dialog.glade
deleted file mode 100644
index e77a41d9..00000000
--- a/contrib/gnunet_fs_gtk_advertise_pseudonym_dialog.glade
+++ /dev/null
@@ -1,793 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<interface>
3 <requires lib="gtk+" version="2.20"/>
4 <object class="GtkAdjustment" id="adjustment2">
5 <property name="upper">100</property>
6 <property name="step_increment">1</property>
7 <property name="page_increment">10</property>
8 <property name="page_size">10</property>
9 </object>
10 <object class="GtkAdjustment" id="GNUNET_GTK_anonymity_adjustment">
11 <property name="upper">100000</property>
12 <property name="value">1</property>
13 <property name="step_increment">1</property>
14 <property name="page_increment">10</property>
15 </object>
16 <object class="GtkListStore" id="GNUNET_GTK_keyword_list_store">
17 <columns>
18 <!-- column-name keyword -->
19 <column type="gchararray"/>
20 </columns>
21 </object>
22 <object class="GtkListStore" id="GNUNET_GTK_meta_data_list_store">
23 <columns>
24 <!-- column-name extractor_meta_type -->
25 <column type="guint"/>
26 <!-- column-name extractor_meta_format -->
27 <column type="guint"/>
28 <!-- column-name extractor_meta_type_string -->
29 <column type="gchararray"/>
30 <!-- column-name extracotr_meta_value -->
31 <column type="gchararray"/>
32 </columns>
33 </object>
34 <object class="GtkListStore" id="GNUNET_GTK_metatype_list_store">
35 <columns>
36 <!-- column-name description -->
37 <column type="gchararray"/>
38 <!-- column-name guint1 -->
39 <column type="guint"/>
40 <!-- column-name helptext -->
41 <column type="gchararray"/>
42 </columns>
43 </object>
44 <object class="GtkAdjustment" id="adjustment1">
45 <property name="upper">100</property>
46 <property name="step_increment">1</property>
47 <property name="page_increment">10</property>
48 <property name="page_size">10</property>
49 </object>
50 <object class="GtkAdjustment" id="adjustment3">
51 <property name="upper">100</property>
52 <property name="step_increment">1</property>
53 <property name="page_increment">10</property>
54 <property name="page_size">10</property>
55 </object>
56 <object class="GtkAdjustment" id="adjustment4">
57 <property name="upper">100</property>
58 <property name="step_increment">1</property>
59 <property name="page_increment">10</property>
60 <property name="page_size">10</property>
61 </object>
62 <object class="GtkAdjustment" id="expiration_year_adjustment">
63 <property name="upper">9999</property>
64 <property name="step_increment">1</property>
65 <property name="page_increment">5</property>
66 </object>
67 <object class="GtkDialog" id="GNUNET_GTK_advertise_pseudonym_dialog">
68 <property name="can_focus">False</property>
69 <property name="border_width">5</property>
70 <property name="title" translatable="yes">Advertise namespace</property>
71 <property name="destroy_with_parent">True</property>
72 <property name="type_hint">dialog</property>
73 <property name="skip_taskbar_hint">True</property>
74 <child internal-child="vbox">
75 <object class="GtkBox" id="GNUNET_GTK_advertise_pseudonym_master_vbox">
76 <property name="visible">True</property>
77 <property name="can_focus">False</property>
78 <property name="orientation">vertical</property>
79 <property name="spacing">2</property>
80 <child internal-child="action_area">
81 <object class="GtkButtonBox" id="dialog-action_area13">
82 <property name="visible">True</property>
83 <property name="can_focus">False</property>
84 <property name="layout_style">end</property>
85 <child>
86 <object class="GtkButton" id="GNUNET_GTK_advertise_pseudonym_cancel_button">
87 <property name="label">gtk-cancel</property>
88 <property name="use_action_appearance">False</property>
89 <property name="visible">True</property>
90 <property name="can_focus">True</property>
91 <property name="receives_default">True</property>
92 <property name="use_action_appearance">False</property>
93 <property name="use_stock">True</property>
94 </object>
95 <packing>
96 <property name="expand">False</property>
97 <property name="fill">False</property>
98 <property name="position">0</property>
99 </packing>
100 </child>
101 <child>
102 <object class="GtkButton" id="GNUNET_GTK_advertise_pseudonym_confirm_button">
103 <property name="label">gtk-ok</property>
104 <property name="use_action_appearance">False</property>
105 <property name="visible">True</property>
106 <property name="sensitive">False</property>
107 <property name="can_focus">True</property>
108 <property name="receives_default">True</property>
109 <property name="use_action_appearance">False</property>
110 <property name="use_stock">True</property>
111 </object>
112 <packing>
113 <property name="expand">False</property>
114 <property name="fill">False</property>
115 <property name="position">1</property>
116 </packing>
117 </child>
118 </object>
119 <packing>
120 <property name="expand">False</property>
121 <property name="fill">True</property>
122 <property name="pack_type">end</property>
123 <property name="position">0</property>
124 </packing>
125 </child>
126 <child>
127 <object class="GtkHBox" id="GNUNET_GTK_advertise_pseudonym_metadata_hbox">
128 <property name="visible">True</property>
129 <property name="can_focus">False</property>
130 <child>
131 <object class="GtkVBox" id="GNUNET_GTK_advertise_pseudonym_metadata_vbox">
132 <property name="visible">True</property>
133 <property name="can_focus">False</property>
134 <property name="spacing">5</property>
135 <child>
136 <object class="GtkHBox" id="GNUNET_GTK_advertise_pseudonym_metadata_edit_hbox">
137 <property name="visible">True</property>
138 <property name="can_focus">False</property>
139 <child>
140 <object class="GtkLabel" id="GNUNET_GTK_advertise_pseudonym_metadata_type_label">
141 <property name="visible">True</property>
142 <property name="can_focus">False</property>
143 <property name="label" translatable="yes">Type:</property>
144 </object>
145 <packing>
146 <property name="expand">False</property>
147 <property name="fill">False</property>
148 <property name="position">0</property>
149 </packing>
150 </child>
151 <child>
152 <object class="GtkScrolledWindow" id="GNUNET_GTK_advertise_pseudonym_metadata_type_scrolled_window">
153 <property name="height_request">100</property>
154 <property name="visible">True</property>
155 <property name="can_focus">True</property>
156 <property name="hscrollbar_policy">never</property>
157 <child>
158 <object class="GtkTreeView" id="GNUNET_GTK_advertise_pseudonym_metadata_type_tree_view">
159 <property name="visible">True</property>
160 <property name="can_focus">True</property>
161 <property name="model">GNUNET_GTK_metatype_list_store</property>
162 <property name="headers_visible">False</property>
163 <property name="headers_clickable">False</property>
164 <property name="reorderable">True</property>
165 <property name="enable_search">False</property>
166 <property name="tooltip_column">2</property>
167 <child internal-child="selection">
168 <object class="GtkTreeSelection" id="treeview-selection1"/>
169 </child>
170 <child>
171 <object class="GtkTreeViewColumn" id="GNUNET_GTK_advertise_pseudonym_metadata_type_tree_view_column">
172 <property name="title" translatable="yes">Value</property>
173 <property name="sort_column_id">0</property>
174 <child>
175 <object class="GtkCellRendererText" id="GNUNET_GTK_advertise_pseudonym_metadata_type_tree_view_renderer"/>
176 <attributes>
177 <attribute name="text">0</attribute>
178 </attributes>
179 </child>
180 </object>
181 </child>
182 </object>
183 </child>
184 </object>
185 <packing>
186 <property name="expand">True</property>
187 <property name="fill">True</property>
188 <property name="position">1</property>
189 </packing>
190 </child>
191 <child>
192 <object class="GtkLabel" id="GNUNET_GTK_advertise_pseudonym_metadata_value_label">
193 <property name="visible">True</property>
194 <property name="can_focus">False</property>
195 <property name="label" translatable="yes">Value:</property>
196 </object>
197 <packing>
198 <property name="expand">False</property>
199 <property name="fill">False</property>
200 <property name="padding">5</property>
201 <property name="position">2</property>
202 </packing>
203 </child>
204 <child>
205 <object class="GtkEntry" id="GNUNET_GTK_advertise_pseudonym_metadata_value_entry">
206 <property name="visible">True</property>
207 <property name="can_focus">True</property>
208 <property name="invisible_char">●</property>
209 <signal name="changed" handler="GNUNET_GTK_advertise_pseudonym_metadata_value_entry_changed_cb" swapped="no"/>
210 </object>
211 <packing>
212 <property name="expand">True</property>
213 <property name="fill">True</property>
214 <property name="position">3</property>
215 </packing>
216 </child>
217 </object>
218 <packing>
219 <property name="expand">False</property>
220 <property name="fill">False</property>
221 <property name="position">0</property>
222 </packing>
223 </child>
224 <child>
225 <object class="GtkScrolledWindow" id="GNUNET_GTK_advertise_pseudonym_metadata_scrolled_window">
226 <property name="width_request">400</property>
227 <property name="height_request">120</property>
228 <property name="visible">True</property>
229 <property name="can_focus">False</property>
230 <property name="hadjustment">adjustment1</property>
231 <property name="vadjustment">adjustment2</property>
232 <child>
233 <object class="GtkTreeView" id="GNUNET_GTK_advertise_pseudonym_metadata_tree_view">
234 <property name="visible">True</property>
235 <property name="can_focus">True</property>
236 <property name="hadjustment">adjustment1</property>
237 <property name="vadjustment">adjustment2</property>
238 <property name="model">GNUNET_GTK_meta_data_list_store</property>
239 <property name="enable_search">False</property>
240 <child internal-child="selection">
241 <object class="GtkTreeSelection" id="treeview-selection2"/>
242 </child>
243 <child>
244 <object class="GtkTreeViewColumn" id="GNUNET_GTK_advertise_pseudonym_metadata_tree_view_type_column">
245 <property name="sizing">fixed</property>
246 <property name="fixed_width">120</property>
247 <property name="title" translatable="yes">Type</property>
248 <property name="reorderable">True</property>
249 <property name="sort_column_id">2</property>
250 <child>
251 <object class="GtkCellRendererText" id="GNUNET_GTK_advertise_pseudonym_metadata_tree_view_type_renderer"/>
252 <attributes>
253 <attribute name="text">2</attribute>
254 </attributes>
255 </child>
256 </object>
257 </child>
258 <child>
259 <object class="GtkTreeViewColumn" id="GNUNET_GTK_advertise_pseudonym_metadata_tree_view_description_column">
260 <property name="title" translatable="yes">Value</property>
261 <property name="expand">True</property>
262 <property name="reorderable">True</property>
263 <property name="sort_column_id">3</property>
264 <child>
265 <object class="GtkCellRendererText" id="GNUNET_GTK_advertise_pseudonym_metadata_tree_view_value_renderer"/>
266 <attributes>
267 <attribute name="text">3</attribute>
268 </attributes>
269 </child>
270 </object>
271 </child>
272 </object>
273 </child>
274 </object>
275 <packing>
276 <property name="expand">True</property>
277 <property name="fill">True</property>
278 <property name="position">1</property>
279 </packing>
280 </child>
281 </object>
282 <packing>
283 <property name="expand">True</property>
284 <property name="fill">True</property>
285 <property name="position">0</property>
286 </packing>
287 </child>
288 <child>
289 <object class="GtkVBox" id="GNUNET_GTK_advertise_pseudonym_metadata_button_vbox">
290 <property name="visible">True</property>
291 <property name="can_focus">False</property>
292 <child>
293 <object class="GtkButton" id="GNUNET_GTK_advertise_pseudonym_metadata_add_button">
294 <property name="label">gtk-add</property>
295 <property name="use_action_appearance">False</property>
296 <property name="visible">True</property>
297 <property name="sensitive">False</property>
298 <property name="can_focus">True</property>
299 <property name="receives_default">True</property>
300 <property name="use_action_appearance">False</property>
301 <property name="use_stock">True</property>
302 <signal name="clicked" handler="GNUNET_GTK_advertise_pseudonym_metadata_add_button_clicked_cb" swapped="no"/>
303 </object>
304 <packing>
305 <property name="expand">False</property>
306 <property name="fill">False</property>
307 <property name="position">0</property>
308 </packing>
309 </child>
310 <child>
311 <object class="GtkButton" id="GNUNET_GTK_advertise_pseudonym_metadata_delete_button">
312 <property name="label">gtk-delete</property>
313 <property name="use_action_appearance">False</property>
314 <property name="visible">True</property>
315 <property name="sensitive">False</property>
316 <property name="can_focus">True</property>
317 <property name="receives_default">True</property>
318 <property name="use_action_appearance">False</property>
319 <property name="use_stock">True</property>
320 <signal name="clicked" handler="GNUNET_GTK_advertise_pseudonym_metadata_delete_button_clicked_cb" swapped="no"/>
321 </object>
322 <packing>
323 <property name="expand">False</property>
324 <property name="fill">False</property>
325 <property name="padding">5</property>
326 <property name="position">1</property>
327 </packing>
328 </child>
329 <child>
330 <object class="GtkLabel" id="GNUNET_GTK_advertise_pseudonym_metadata_preview_label">
331 <property name="visible">True</property>
332 <property name="can_focus">False</property>
333 <property name="label" translatable="yes">Preview:</property>
334 </object>
335 <packing>
336 <property name="expand">False</property>
337 <property name="fill">False</property>
338 <property name="padding">10</property>
339 <property name="position">2</property>
340 </packing>
341 </child>
342 <child>
343 <object class="GtkImage" id="GNUNET_GTK_advertise_pseudonym_metadata_preview_image">
344 <property name="sensitive">False</property>
345 <property name="can_focus">False</property>
346 <property name="stock">gtk-missing-image</property>
347 </object>
348 <packing>
349 <property name="expand">True</property>
350 <property name="fill">True</property>
351 <property name="position">3</property>
352 </packing>
353 </child>
354 <child>
355 <object class="GtkFileChooserButton" id="GNUNET_GTK_advertise_pseudonym_metadata_preview_file_chooser_button">
356 <property name="can_focus">False</property>
357 <property name="create_folders">False</property>
358 <property name="title" translatable="yes">Select file</property>
359 <signal name="file-set" handler="GNUNET_GTK_advertise_pseudonym_metadata_preview_file_chooser_button_file_set_cb" swapped="no"/>
360 </object>
361 <packing>
362 <property name="expand">False</property>
363 <property name="fill">False</property>
364 <property name="position">4</property>
365 </packing>
366 </child>
367 </object>
368 <packing>
369 <property name="expand">True</property>
370 <property name="fill">True</property>
371 <property name="padding">5</property>
372 <property name="position">1</property>
373 </packing>
374 </child>
375 </object>
376 <packing>
377 <property name="expand">False</property>
378 <property name="fill">True</property>
379 <property name="position">1</property>
380 </packing>
381 </child>
382 <child>
383 <object class="GtkHBox" id="GNUNET_GTK_advertise_pseudonym_secondary_hbox">
384 <property name="visible">True</property>
385 <property name="can_focus">False</property>
386 <child>
387 <object class="GtkVBox" id="GNUNET_GTK_advertise_pseudonym_keyword_entry_vbox">
388 <property name="visible">True</property>
389 <property name="can_focus">False</property>
390 <child>
391 <object class="GtkHBox" id="GNUNET_GTK_advertise_pseudonym_keyword_hbox">
392 <property name="visible">True</property>
393 <property name="can_focus">False</property>
394 <child>
395 <object class="GtkLabel" id="GNUNET_GTK_advertise_pseudonym_keyword_label">
396 <property name="visible">True</property>
397 <property name="can_focus">False</property>
398 <property name="label" translatable="yes">_Keyword:</property>
399 <property name="use_underline">True</property>
400 <property name="mnemonic_widget">GNUNET_GTK_advertise_pseudonym_keyword_entry</property>
401 </object>
402 <packing>
403 <property name="expand">False</property>
404 <property name="fill">False</property>
405 <property name="position">0</property>
406 </packing>
407 </child>
408 <child>
409 <object class="GtkEntry" id="GNUNET_GTK_advertise_pseudonym_keyword_entry">
410 <property name="visible">True</property>
411 <property name="can_focus">True</property>
412 <property name="invisible_char">●</property>
413 <property name="caps_lock_warning">False</property>
414 <signal name="changed" handler="GNUNET_GTK_advertise_pseudonym_keyword_entry_changed_cb" swapped="no"/>
415 <signal name="activate" handler="GNUNET_GTK_advertise_pseudonym_keyword_entry_activate_cb" swapped="no"/>
416 </object>
417 <packing>
418 <property name="expand">True</property>
419 <property name="fill">True</property>
420 <property name="position">1</property>
421 </packing>
422 </child>
423 </object>
424 <packing>
425 <property name="expand">False</property>
426 <property name="fill">False</property>
427 <property name="padding">5</property>
428 <property name="position">0</property>
429 </packing>
430 </child>
431 <child>
432 <object class="GtkHBox" id="GNUNET_GTK_advertise_pseudonym_keyword_list_hbox">
433 <property name="visible">True</property>
434 <property name="can_focus">False</property>
435 <child>
436 <object class="GtkScrolledWindow" id="GNUNET_GTK_advertise_pseudonym_keyword_scrolled_window">
437 <property name="width_request">400</property>
438 <property name="height_request">120</property>
439 <property name="visible">True</property>
440 <property name="can_focus">False</property>
441 <property name="hadjustment">adjustment3</property>
442 <property name="vadjustment">adjustment4</property>
443 <property name="hscrollbar_policy">never</property>
444 <child>
445 <object class="GtkTreeView" id="GNUNET_GTK_advertise_pseudonym_keyword_list_tree_view">
446 <property name="visible">True</property>
447 <property name="can_focus">True</property>
448 <property name="hadjustment">adjustment3</property>
449 <property name="vadjustment">adjustment4</property>
450 <property name="model">GNUNET_GTK_keyword_list_store</property>
451 <property name="search_column">0</property>
452 <child internal-child="selection">
453 <object class="GtkTreeSelection" id="treeview-selection3"/>
454 </child>
455 <child>
456 <object class="GtkTreeViewColumn" id="GNUNET_GTK_advertise_pseudonym_keyword_list_tree_view_column">
457 <property name="title" translatable="yes">Keywords</property>
458 <property name="reorderable">True</property>
459 <property name="sort_column_id">0</property>
460 <child>
461 <object class="GtkCellRendererText" id="GNUNET_GTK_advertise_pseudonym_keyword_list_tree_view_renderer"/>
462 <attributes>
463 <attribute name="text">0</attribute>
464 </attributes>
465 </child>
466 </object>
467 </child>
468 </object>
469 </child>
470 </object>
471 <packing>
472 <property name="expand">True</property>
473 <property name="fill">True</property>
474 <property name="position">0</property>
475 </packing>
476 </child>
477 <child>
478 <object class="GtkVBox" id="GNUNET_GTK_advertise_pseudonym_keyword_list_button_vbox">
479 <property name="visible">True</property>
480 <property name="can_focus">False</property>
481 <child>
482 <object class="GtkButton" id="GNUNET_GTK_advertise_pseudonym_keyword_list_add_button">
483 <property name="label">gtk-add</property>
484 <property name="use_action_appearance">False</property>
485 <property name="visible">True</property>
486 <property name="sensitive">False</property>
487 <property name="can_focus">True</property>
488 <property name="receives_default">True</property>
489 <property name="use_action_appearance">False</property>
490 <property name="use_stock">True</property>
491 <signal name="clicked" handler="GNUNET_GTK_advertise_pseudonym_keyword_list_add_button_clicked_cb" swapped="no"/>
492 </object>
493 <packing>
494 <property name="expand">False</property>
495 <property name="fill">False</property>
496 <property name="position">0</property>
497 </packing>
498 </child>
499 <child>
500 <object class="GtkButton" id="GNUNET_GTK_advertise_pseudonym_keyword_list_del_button">
501 <property name="label">gtk-delete</property>
502 <property name="use_action_appearance">False</property>
503 <property name="visible">True</property>
504 <property name="sensitive">False</property>
505 <property name="can_focus">True</property>
506 <property name="receives_default">True</property>
507 <property name="use_action_appearance">False</property>
508 <property name="use_stock">True</property>
509 <signal name="clicked" handler="GNUNET_GTK_advertise_pseudonym_keyword_list_del_button_clicked_cb" swapped="no"/>
510 </object>
511 <packing>
512 <property name="expand">False</property>
513 <property name="fill">False</property>
514 <property name="padding">5</property>
515 <property name="position">1</property>
516 </packing>
517 </child>
518 </object>
519 <packing>
520 <property name="expand">False</property>
521 <property name="fill">False</property>
522 <property name="padding">5</property>
523 <property name="position">1</property>
524 </packing>
525 </child>
526 </object>
527 <packing>
528 <property name="expand">True</property>
529 <property name="fill">True</property>
530 <property name="position">1</property>
531 </packing>
532 </child>
533 </object>
534 <packing>
535 <property name="expand">True</property>
536 <property name="fill">True</property>
537 <property name="padding">5</property>
538 <property name="position">0</property>
539 </packing>
540 </child>
541 <child>
542 <object class="GtkVBox" id="GNUNET_GTK_advertise_pseudonym_misc_vbox">
543 <property name="visible">True</property>
544 <property name="can_focus">False</property>
545 <child>
546 <object class="GtkLabel" id="GNUNET_GTK_advertise_pseudonym_options_label">
547 <property name="visible">True</property>
548 <property name="can_focus">False</property>
549 <property name="label" translatable="yes">Options</property>
550 <property name="justify">center</property>
551 </object>
552 <packing>
553 <property name="expand">False</property>
554 <property name="fill">False</property>
555 <property name="padding">5</property>
556 <property name="position">0</property>
557 </packing>
558 </child>
559 <child>
560 <object class="GtkHSeparator" id="hseparator3">
561 <property name="visible">True</property>
562 <property name="can_focus">False</property>
563 </object>
564 <packing>
565 <property name="expand">False</property>
566 <property name="fill">True</property>
567 <property name="padding">5</property>
568 <property name="position">1</property>
569 </packing>
570 </child>
571 <child>
572 <object class="GtkHBox" id="GNUNET_GTK_advertise_pseudonym_anonymity_hbox">
573 <property name="visible">True</property>
574 <property name="can_focus">False</property>
575 <child>
576 <object class="GtkLabel" id="GNUNET_GTK_advertise_pseudonym_anonymity_label">
577 <property name="visible">True</property>
578 <property name="can_focus">False</property>
579 <property name="label" translatable="yes">_Anonymity:</property>
580 <property name="use_underline">True</property>
581 </object>
582 <packing>
583 <property name="expand">False</property>
584 <property name="fill">False</property>
585 <property name="padding">5</property>
586 <property name="position">0</property>
587 </packing>
588 </child>
589 <child>
590 <object class="GtkSpinButton" id="GNUNET_GTK_advertise_pseudonym_anonymity_spin_button">
591 <property name="visible">True</property>
592 <property name="can_focus">True</property>
593 <property name="tooltip_markup">Anonymity of zero means no anonymity. Values larger than one require GNUnet to have cover traffic (with larger values implying more cover traffic).</property>
594 <property name="invisible_char">●</property>
595 <property name="adjustment">GNUNET_GTK_anonymity_adjustment</property>
596 <signal name="value-changed" handler="GNUNET_GTK_anonymity_spin_button_value_changed_cb" after="yes" swapped="no"/>
597 </object>
598 <packing>
599 <property name="expand">True</property>
600 <property name="fill">True</property>
601 <property name="position">1</property>
602 </packing>
603 </child>
604 </object>
605 <packing>
606 <property name="expand">False</property>
607 <property name="fill">False</property>
608 <property name="position">2</property>
609 </packing>
610 </child>
611 <child>
612 <object class="GtkHSeparator" id="hseparator1">
613 <property name="visible">True</property>
614 <property name="can_focus">False</property>
615 </object>
616 <packing>
617 <property name="expand">False</property>
618 <property name="fill">False</property>
619 <property name="position">3</property>
620 </packing>
621 </child>
622 <child>
623 <object class="GtkHBox" id="GNUNET_GTK_advertise_pseudonym_priority_hbox">
624 <property name="visible">True</property>
625 <property name="can_focus">False</property>
626 <child>
627 <object class="GtkLabel" id="GNUNET_GTK_advertise_pseudonym_priority_label">
628 <property name="visible">True</property>
629 <property name="can_focus">False</property>
630 <property name="label" translatable="yes">_Priority:</property>
631 <property name="use_underline">True</property>
632 </object>
633 <packing>
634 <property name="expand">False</property>
635 <property name="fill">True</property>
636 <property name="padding">5</property>
637 <property name="position">0</property>
638 </packing>
639 </child>
640 <child>
641 <object class="GtkSpinButton" id="GNUNET_GTK_advertise_pseudonym_priority_spin_button">
642 <property name="visible">True</property>
643 <property name="can_focus">True</property>
644 <property name="tooltip_markup">The content priority determines when content is discarded in favour of other, more popular content. </property>
645 <property name="invisible_char">●</property>
646 <property name="adjustment">priority_adjustment</property>
647 <property name="numeric">True</property>
648 </object>
649 <packing>
650 <property name="expand">True</property>
651 <property name="fill">True</property>
652 <property name="position">1</property>
653 </packing>
654 </child>
655 </object>
656 <packing>
657 <property name="expand">False</property>
658 <property name="fill">False</property>
659 <property name="position">4</property>
660 </packing>
661 </child>
662 <child>
663 <object class="GtkHSeparator" id="hseparator2">
664 <property name="visible">True</property>
665 <property name="can_focus">False</property>
666 </object>
667 <packing>
668 <property name="expand">False</property>
669 <property name="fill">True</property>
670 <property name="position">5</property>
671 </packing>
672 </child>
673 <child>
674 <object class="GtkHBox" id="hbox1">
675 <property name="visible">True</property>
676 <property name="can_focus">False</property>
677 <child>
678 <object class="GtkLabel" id="GNUNET_GTK_advertise_pseudonym_root_label">
679 <property name="visible">True</property>
680 <property name="can_focus">False</property>
681 <property name="label" translatable="yes">_Root:</property>
682 <property name="use_underline">True</property>
683 <property name="selectable">True</property>
684 </object>
685 <packing>
686 <property name="expand">True</property>
687 <property name="fill">True</property>
688 <property name="padding">5</property>
689 <property name="position">0</property>
690 </packing>
691 </child>
692 <child>
693 <object class="GtkEntry" id="GNUNET_GTK_advertise_pseudonym_root_entry">
694 <property name="visible">True</property>
695 <property name="can_focus">True</property>
696 <property name="invisible_char">•</property>
697 <property name="text" translatable="yes">root</property>
698 </object>
699 <packing>
700 <property name="expand">True</property>
701 <property name="fill">True</property>
702 <property name="position">1</property>
703 </packing>
704 </child>
705 </object>
706 <packing>
707 <property name="expand">True</property>
708 <property name="fill">True</property>
709 <property name="position">6</property>
710 </packing>
711 </child>
712 <child>
713 <object class="GtkHSeparator" id="hseparator4">
714 <property name="visible">True</property>
715 <property name="can_focus">False</property>
716 </object>
717 <packing>
718 <property name="expand">False</property>
719 <property name="fill">True</property>
720 <property name="position">7</property>
721 </packing>
722 </child>
723 <child>
724 <object class="GtkHBox" id="hbox2">
725 <property name="visible">True</property>
726 <property name="can_focus">False</property>
727 <child>
728 <object class="GtkLabel" id="GNUNET_GTK_advertise_pseudonym_expiration_label">
729 <property name="visible">True</property>
730 <property name="can_focus">False</property>
731 <property name="label" translatable="yes">_Expiration year:</property>
732 <property name="use_underline">True</property>
733 </object>
734 <packing>
735 <property name="expand">False</property>
736 <property name="fill">True</property>
737 <property name="padding">5</property>
738 <property name="position">0</property>
739 </packing>
740 </child>
741 <child>
742 <object class="GtkSpinButton" id="GNUNET_GTK_advertise_pseudonym_expiration_year_spin_button">
743 <property name="visible">True</property>
744 <property name="can_focus">True</property>
745 <property name="max_length">4</property>
746 <property name="invisible_char">•</property>
747 <property name="adjustment">expiration_year_adjustment</property>
748 <property name="climb_rate">1</property>
749 <property name="numeric">True</property>
750 </object>
751 <packing>
752 <property name="expand">True</property>
753 <property name="fill">True</property>
754 <property name="position">1</property>
755 </packing>
756 </child>
757 </object>
758 <packing>
759 <property name="expand">True</property>
760 <property name="fill">True</property>
761 <property name="position">8</property>
762 </packing>
763 </child>
764 </object>
765 <packing>
766 <property name="expand">False</property>
767 <property name="fill">False</property>
768 <property name="padding">11</property>
769 <property name="position">1</property>
770 </packing>
771 </child>
772 </object>
773 <packing>
774 <property name="expand">False</property>
775 <property name="fill">True</property>
776 <property name="padding">5</property>
777 <property name="position">2</property>
778 </packing>
779 </child>
780 </object>
781 </child>
782 <action-widgets>
783 <action-widget response="-6">GNUNET_GTK_advertise_pseudonym_cancel_button</action-widget>
784 <action-widget response="-5">GNUNET_GTK_advertise_pseudonym_confirm_button</action-widget>
785 </action-widgets>
786 </object>
787 <object class="GtkAdjustment" id="priority_adjustment">
788 <property name="upper">10000000</property>
789 <property name="value">1000</property>
790 <property name="step_increment">1</property>
791 <property name="page_increment">10</property>
792 </object>
793</interface>
diff --git a/src/fs/gnunet-fs-gtk_advertise-pseudonym.c b/src/fs/gnunet-fs-gtk_advertise-pseudonym.c
index b3355a48..7f8ab544 100644
--- a/src/fs/gnunet-fs-gtk_advertise-pseudonym.c
+++ b/src/fs/gnunet-fs-gtk_advertise-pseudonym.c
@@ -27,39 +27,7 @@
27#include "gnunet-fs-gtk_publish-edit-dialog.h" 27#include "gnunet-fs-gtk_publish-edit-dialog.h"
28 28
29 29
30 30/* *************************** handlers run on closing of the dialog ********************** */
31gboolean
32GNUNET_GTK_select_pseudonym_dialog_delete_event_cb (GtkWidget * widget,
33 GdkEvent * event,
34 gpointer user_Data)
35{
36 /* FIXME-LEAK: this doesn't destroy the dialog properly... */
37 gtk_widget_hide (widget);
38 return TRUE;
39}
40
41
42/**
43 * Callback with information about local (!) namespaces.
44 * Contains the names of the local namespace and the global
45 * ID. Adds the to the list store.
46 *
47 * @param cls closure, the list store.
48 * @param name human-readable identifier of the namespace
49 * @param id hash identifier for the namespace
50 */
51static void
52add_to_list (void *cls, const char *name, const GNUNET_HashCode * id)
53{
54 GtkListStore *ls = cls;
55 GtkTreeIter iter;
56
57 gtk_list_store_insert_with_values (ls, &iter, -1,
58 0, name,
59 1, GNUNET_FS_namespace_create (GNUNET_FS_GTK_get_fs_handle (),
60 name),
61 -1);
62}
63 31
64 32
65/** 33/**
@@ -100,7 +68,8 @@ struct NamespaceAdvertisementContext
100 * to abort the iteration 68 * to abort the iteration
101 */ 69 */
102static int 70static int
103advertise_namespace (void *cls, struct GNUNET_FS_FileInformation *fi, 71advertise_namespace (void *cls,
72 struct GNUNET_FS_FileInformation *fi,
104 uint64_t length, struct GNUNET_CONTAINER_MetaData *meta, 73 uint64_t length, struct GNUNET_CONTAINER_MetaData *meta,
105 struct GNUNET_FS_Uri **uri, 74 struct GNUNET_FS_Uri **uri,
106 struct GNUNET_FS_BlockOptions *bo, int *do_index, 75 struct GNUNET_FS_BlockOptions *bo, int *do_index,
@@ -144,7 +113,7 @@ GNUNET_GTK_select_pseudonym_dialog_response_cb (GtkDialog * dialog,
144 gint response_id, 113 gint response_id,
145 gpointer user_data) 114 gpointer user_data)
146{ 115{
147 GtkBuilder *builder; 116 GtkBuilder *builder = GTK_BUILDER (user_data);
148 GtkWidget *ad; 117 GtkWidget *ad;
149 GtkTreeView *tv; 118 GtkTreeView *tv;
150 GtkTreeSelection *sel; 119 GtkTreeSelection *sel;
@@ -158,7 +127,6 @@ GNUNET_GTK_select_pseudonym_dialog_response_cb (GtkDialog * dialog,
158 struct GNUNET_CONTAINER_MetaData *meta; 127 struct GNUNET_CONTAINER_MetaData *meta;
159 struct GNUNET_FS_BlockOptions bo; 128 struct GNUNET_FS_BlockOptions bo;
160 129
161 builder = GTK_BUILDER (user_data);
162 ad = GTK_WIDGET (gtk_builder_get_object 130 ad = GTK_WIDGET (gtk_builder_get_object
163 (builder, "GNUNET_GTK_select_pseudonym_dialog")); 131 (builder, "GNUNET_GTK_select_pseudonym_dialog"));
164 132
@@ -214,36 +182,63 @@ GNUNET_GTK_select_pseudonym_dialog_response_cb (GtkDialog * dialog,
214} 182}
215 183
216 184
185/**
186 * User deleted 'select pseudonym' dialog. Clean up.
187 *
188 * @param widget the dialog
189 * @param event the destroying event
190 * @param user_data the builder of the dialog
191 * @return TRUE
192 */
193gboolean
194GNUNET_GTK_select_pseudonym_dialog_delete_event_cb (GtkWidget *widget,
195 GdkEvent *event,
196 gpointer user_data)
197{
198 GtkBuilder *builder = GTK_BUILDER (user_data);
199
200 /* FIXME: do we need to also explicitly destroy the window? */
201 g_object_unref (G_OBJECT (builder));
202 return TRUE;
203}
204
205
206
207/* *************************** code to create the dialog ********************** */
208
217 209
218 210
219/** 211/**
220 * Advertise pseudonym selected. 212 * Callback with information about local (!) namespaces.
213 * Contains the names of the local namespace and the global
214 * ID. Adds the to the list store.
215 *
216 * @param cls closure, the list store.
217 * @param name human-readable identifier of the namespace
218 * @param id hash identifier for the namespace
221 */ 219 */
222void 220static void
223GNUNET_GTK_main_menu_file_advertise_pseudonym_activate_cb (GtkWidget * dummy, 221add_to_list (void *cls,
224 gpointer data) 222 const char *name,
223 const GNUNET_HashCode * id)
225{ 224{
226 GtkWidget *ad; 225 GtkListStore *ls = cls;
227 GtkListStore *ls; 226 GtkTreeIter iter;
228 GtkWidget *toplevel;
229 GtkBuilder *builder;
230 227
231 builder = GTK_BUILDER (data); 228 gtk_list_store_insert_with_values (ls, &iter, -1,
232 ad = GTK_WIDGET (gtk_builder_get_object 229 0, name,
233 (builder, "GNUNET_GTK_select_pseudonym_dialog")); 230 1, GNUNET_FS_namespace_create (GNUNET_FS_GTK_get_fs_handle (),
234 ls = GTK_LIST_STORE (gtk_builder_get_object 231 name),
235 (builder, "GNUNET_GTK_select_pseudonym_liststore")); 232 -1);
236 gtk_list_store_clear (ls);
237 GNUNET_FS_namespace_list (GNUNET_FS_GTK_get_fs_handle (), &add_to_list, ls);
238 toplevel = gtk_widget_get_toplevel (dummy);
239 if (GTK_IS_WINDOW (toplevel))
240 gtk_window_set_transient_for (GTK_WINDOW (ad), GTK_WINDOW (toplevel));
241 gtk_window_present (GTK_WINDOW (ad));
242} 233}
243 234
244 235
245/** 236/**
237 * Selection of the pseudonym changed, update the sensitivity
238 * of the buttons.
246 * 239 *
240 * @param ts the selection instance
241 * @param user_data the builder of the selection dialog
247 */ 242 */
248static void 243static void
249selection_changed_cb (GtkTreeSelection * ts, gpointer user_data) 244selection_changed_cb (GtkTreeSelection * ts, gpointer user_data)
@@ -255,7 +250,7 @@ selection_changed_cb (GtkTreeSelection * ts, gpointer user_data)
255 ok_button = 250 ok_button =
256 GTK_WIDGET (gtk_builder_get_object 251 GTK_WIDGET (gtk_builder_get_object
257 (builder, "GNUNET_GTK_select_pseudonym_ok_button")); 252 (builder, "GNUNET_GTK_select_pseudonym_ok_button"));
258 if (TRUE == gtk_tree_selection_get_selected (ts, NULL, &iter)) 253 if (gtk_tree_selection_get_selected (ts, NULL, &iter))
259 gtk_widget_set_sensitive (ok_button, TRUE); 254 gtk_widget_set_sensitive (ok_button, TRUE);
260 else 255 else
261 gtk_widget_set_sensitive (ok_button, FALSE); 256 gtk_widget_set_sensitive (ok_button, FALSE);
@@ -263,23 +258,43 @@ selection_changed_cb (GtkTreeSelection * ts, gpointer user_data)
263 258
264 259
265/** 260/**
261 * Advertise pseudonym selected in the menu.
266 * 262 *
263 * @param dummy the menu item
264 * @param user_data the builder of the main window, unused
267 */ 265 */
268void 266void
269GNUNET_GTK_select_pseudonym_dialog_realize_cb (GtkWidget * widget, 267GNUNET_GTK_main_menu_file_advertise_pseudonym_activate_cb (GtkWidget * dummy,
270 gpointer user_data) 268 gpointer user_data)
271{ 269{
270 GtkWidget *ad;
271 GtkListStore *ls;
272 GtkWidget *toplevel;
272 GtkTreeView *tv; 273 GtkTreeView *tv;
273 GtkTreeSelection *sel; 274 GtkTreeSelection *sel;
274 GtkBuilder *builder; 275 GtkBuilder *builder;
275 276
276 builder = GTK_BUILDER (user_data); 277 builder = GNUNET_GTK_get_new_builder ("gnunet_fs_gtk_select_pseudonym_dialog.glade", NULL);
277 278
279 ad = GTK_WIDGET (gtk_builder_get_object
280 (builder, "GNUNET_GTK_select_pseudonym_dialog"));
281 ls = GTK_LIST_STORE (gtk_builder_get_object
282 (builder, "GNUNET_GTK_select_pseudonym_liststore"));
283 GNUNET_FS_namespace_list (GNUNET_FS_GTK_get_fs_handle (),
284 &add_to_list,
285 ls);
286
287 /* FIXME: this signal can be connected by (modern) Glade automatically */
278 tv = GTK_TREE_VIEW (gtk_builder_get_object 288 tv = GTK_TREE_VIEW (gtk_builder_get_object
279 (builder, "GNUNET_GTK_select_pseudonym_tree_view")); 289 (builder, "GNUNET_GTK_select_pseudonym_tree_view"));
280 sel = gtk_tree_view_get_selection (tv); 290 sel = gtk_tree_view_get_selection (tv);
281 g_signal_connect (G_OBJECT (sel), "changed", 291 g_signal_connect (G_OBJECT (sel), "changed",
282 G_CALLBACK (selection_changed_cb), user_data); 292 G_CALLBACK (selection_changed_cb), builder);
293
294 toplevel = gtk_widget_get_toplevel (dummy);
295 if (GTK_IS_WINDOW (toplevel))
296 gtk_window_set_transient_for (GTK_WINDOW (ad), GTK_WINDOW (toplevel));
297 gtk_window_present (GTK_WINDOW (ad));
283} 298}
284 299
285 300