aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-01-05 10:53:25 +0000
committerChristian Grothoff <christian@grothoff.org>2012-01-05 10:53:25 +0000
commit88d52c932488995b3ad8179ebac861225047e8e8 (patch)
treed1b5814ef36ba947e8cb19dfec62e195c8964c8d
parentb01a347e857a563e8bace6674c89f7ac6b70455b (diff)
downloadgnunet-gtk-88d52c932488995b3ad8179ebac861225047e8e8.tar.gz
gnunet-gtk-88d52c932488995b3ad8179ebac861225047e8e8.zip
-LRN: unbuildering publish directory dialog and fixes
-rw-r--r--contrib/gnunet_fs_gtk_edit_publication.glade267
-rw-r--r--contrib/gnunet_fs_gtk_main_window.glade322
-rw-r--r--contrib/gnunet_fs_gtk_publish_dialog.glade31
-rw-r--r--contrib/gnunet_fs_gtk_publish_directory_dialog.glade387
-rw-r--r--src/fs/gnunet-fs-gtk-main_window_file_publish.c36
5 files changed, 410 insertions, 633 deletions
diff --git a/contrib/gnunet_fs_gtk_edit_publication.glade b/contrib/gnunet_fs_gtk_edit_publication.glade
index 81140fd9..0355c92b 100644
--- a/contrib/gnunet_fs_gtk_edit_publication.glade
+++ b/contrib/gnunet_fs_gtk_edit_publication.glade
@@ -2,15 +2,31 @@
2<interface> 2<interface>
3 <requires lib="gtk+" version="2.24"/> 3 <requires lib="gtk+" version="2.24"/>
4 <!-- interface-naming-policy project-wide --> 4 <!-- interface-naming-policy project-wide -->
5 <object class="GtkAdjustment" id="GNUNET_GTK_edit_publication_metadata_preview_image_horizontal_adjustment"> 5 <object class="GtkListStore" id="GNUNET_GTK_publication_metadata_liststore">
6 <property name="upper">100</property> 6 <columns>
7 <property name="step_increment">1</property> 7 <!-- column-name Type -->
8 <property name="page_increment">10</property> 8 <column type="guint"/>
9 <!-- column-name Format -->
10 <column type="guint"/>
11 <!-- column-name Type_name -->
12 <column type="gchararray"/>
13 <!-- column-name Value -->
14 <column type="gchararray"/>
15 <!-- column-name Description -->
16 <column type="gchararray"/>
17 </columns>
9 </object> 18 </object>
10 <object class="GtkAdjustment" id="GNUNET_GTK_edit_publication_metadata_preview_image_verticall_adjustment"> 19 <object class="GtkListStore" id="GNUNET_GTK_publication_metadata_types_liststore">
11 <property name="upper">100</property> 20 <columns>
12 <property name="step_increment">1</property> 21 <!-- column-name Type -->
13 <property name="page_increment">10</property> 22 <column type="gint"/>
23 <!-- column-name Format -->
24 <column type="gint"/>
25 <!-- column-name Type1 -->
26 <column type="gchararray"/>
27 <!-- column-name Description -->
28 <column type="gchararray"/>
29 </columns>
14 </object> 30 </object>
15 <object class="GtkListStore" id="GNUNET_GTK_publication_types_liststore"> 31 <object class="GtkListStore" id="GNUNET_GTK_publication_types_liststore">
16 <columns> 32 <columns>
@@ -50,31 +66,15 @@
50 </row> 66 </row>
51 </data> 67 </data>
52 </object> 68 </object>
53 <object class="GtkListStore" id="GNUNET_GTK_publication_metadata_liststore"> 69 <object class="GtkAdjustment" id="GNUNET_GTK_edit_publication_metadata_preview_image_horizontal_adjustment">
54 <columns> 70 <property name="upper">100</property>
55 <!-- column-name Type --> 71 <property name="step_increment">1</property>
56 <column type="guint"/> 72 <property name="page_increment">10</property>
57 <!-- column-name Format -->
58 <column type="guint"/>
59 <!-- column-name Type_name -->
60 <column type="gchararray"/>
61 <!-- column-name Value -->
62 <column type="gchararray"/>
63 <!-- column-name Description -->
64 <column type="gchararray"/>
65 </columns>
66 </object> 73 </object>
67 <object class="GtkListStore" id="GNUNET_GTK_publication_metadata_types_liststore"> 74 <object class="GtkAdjustment" id="GNUNET_GTK_edit_publication_metadata_preview_image_verticall_adjustment">
68 <columns> 75 <property name="upper">100</property>
69 <!-- column-name Type --> 76 <property name="step_increment">1</property>
70 <column type="gint"/> 77 <property name="page_increment">10</property>
71 <!-- column-name Format -->
72 <column type="gint"/>
73 <!-- column-name Type1 -->
74 <column type="gchararray"/>
75 <!-- column-name Description -->
76 <column type="gchararray"/>
77 </columns>
78 </object> 78 </object>
79 <object class="GtkListStore" id="GNUNET_GTK_publication_keywords_liststore"> 79 <object class="GtkListStore" id="GNUNET_GTK_publication_keywords_liststore">
80 <columns> 80 <columns>
@@ -349,106 +349,48 @@
349 <property name="visible">True</property> 349 <property name="visible">True</property>
350 <property name="can_focus">False</property> 350 <property name="can_focus">False</property>
351 <child> 351 <child>
352 <object class="GtkHBox" id="GNUNET_GTK_edit_publication_keyword_list_hbox"> 352 <object class="GtkVBox" id="vbox2">
353 <property name="visible">True</property> 353 <property name="visible">True</property>
354 <property name="can_focus">False</property> 354 <property name="can_focus">False</property>
355 <child> 355 <child>
356 <object class="GtkVBox" id="vbox2"> 356 <object class="GtkHBox" id="hbox3">
357 <property name="visible">True</property> 357 <property name="visible">True</property>
358 <property name="can_focus">False</property> 358 <property name="can_focus">False</property>
359 <child> 359 <child>
360 <object class="GtkHBox" id="hbox3"> 360 <object class="GtkLabel" id="GNUNET_GTK_edit_publication_keyword_label">
361 <property name="visible">True</property> 361 <property name="visible">True</property>
362 <property name="can_focus">False</property> 362 <property name="can_focus">False</property>
363 <child> 363 <property name="label" translatable="yes">_Keyword:</property>
364 <object class="GtkLabel" id="GNUNET_GTK_edit_publication_keyword_label"> 364 <property name="use_underline">True</property>
365 <property name="visible">True</property> 365 <property name="mnemonic_widget">GNUNET_GTK_edit_publication_keyword_entry</property>
366 <property name="can_focus">False</property>
367 <property name="label" translatable="yes">_Keyword:</property>
368 <property name="use_underline">True</property>
369 <property name="mnemonic_widget">GNUNET_GTK_edit_publication_keyword_entry</property>
370 </object>
371 <packing>
372 <property name="expand">False</property>
373 <property name="fill">False</property>
374 <property name="position">0</property>
375 </packing>
376 </child>
377 <child>
378 <object class="GtkEntry" id="GNUNET_GTK_edit_publication_keyword_entry">
379 <property name="visible">True</property>
380 <property name="can_focus">True</property>
381 <property name="events">GDK_KEY_PRESS_MASK | GDK_STRUCTURE_MASK</property>
382 <property name="invisible_char">●</property>
383 <property name="invisible_char_set">True</property>
384 <property name="caps_lock_warning">False</property>
385 <property name="primary_icon_activatable">False</property>
386 <property name="secondary_icon_activatable">False</property>
387 <property name="primary_icon_sensitive">True</property>
388 <property name="secondary_icon_sensitive">True</property>
389 </object>
390 <packing>
391 <property name="expand">True</property>
392 <property name="fill">True</property>
393 <property name="position">1</property>
394 </packing>
395 </child>
396 </object> 366 </object>
397 <packing> 367 <packing>
398 <property name="expand">False</property> 368 <property name="expand">False</property>
399 <property name="fill">True</property> 369 <property name="fill">False</property>
370 <property name="padding">2</property>
400 <property name="position">0</property> 371 <property name="position">0</property>
401 </packing> 372 </packing>
402 </child> 373 </child>
403 <child> 374 <child>
404 <object class="GtkScrolledWindow" id="GNUNET_GTK_edit_publication_keyword_scrolled_window"> 375 <object class="GtkEntry" id="GNUNET_GTK_edit_publication_keyword_entry">
405 <property name="width_request">400</property>
406 <property name="height_request">120</property>
407 <property name="visible">True</property> 376 <property name="visible">True</property>
408 <property name="can_focus">True</property> 377 <property name="can_focus">True</property>
409 <property name="hscrollbar_policy">never</property> 378 <property name="events">GDK_KEY_PRESS_MASK | GDK_STRUCTURE_MASK</property>
410 <property name="vscrollbar_policy">automatic</property> 379 <property name="invisible_char">●</property>
411 <property name="shadow_type">in</property> 380 <property name="invisible_char_set">True</property>
412 <child> 381 <property name="caps_lock_warning">False</property>
413 <object class="GtkTreeView" id="GNUNET_GTK_edit_publication_keyword_list_tree_view"> 382 <property name="primary_icon_activatable">False</property>
414 <property name="visible">True</property> 383 <property name="secondary_icon_activatable">False</property>
415 <property name="can_focus">True</property> 384 <property name="primary_icon_sensitive">True</property>
416 <property name="model">GNUNET_GTK_publication_keywords_liststore</property> 385 <property name="secondary_icon_sensitive">True</property>
417 <property name="search_column">0</property>
418 <child>
419 <object class="GtkTreeViewColumn" id="GNUNET_GTK_edit_publication_keyword_list_tree_view_column">
420 <property name="title">Keywords</property>
421 <property name="clickable">True</property>
422 <property name="reorderable">True</property>
423 <property name="sort_column_id">0</property>
424 <child>
425 <object class="GtkCellRendererText" id="GNUNET_GTK_edit_publication_keyword_list_tree_view_renderer"/>
426 <attributes>
427 <attribute name="text">0</attribute>
428 </attributes>
429 </child>
430 </object>
431 </child>
432 </object>
433 </child>
434 </object> 386 </object>
435 <packing> 387 <packing>
436 <property name="expand">True</property> 388 <property name="expand">True</property>
437 <property name="fill">True</property> 389 <property name="fill">True</property>
390 <property name="padding">2</property>
438 <property name="position">1</property> 391 <property name="position">1</property>
439 </packing> 392 </packing>
440 </child> 393 </child>
441 </object>
442 <packing>
443 <property name="expand">True</property>
444 <property name="fill">True</property>
445 <property name="position">0</property>
446 </packing>
447 </child>
448 <child>
449 <object class="GtkVBox" id="GNUNET_GTK_edit_publication_keyword_list_button_vbox">
450 <property name="visible">True</property>
451 <property name="can_focus">False</property>
452 <child> 394 <child>
453 <object class="GtkButton" id="GNUNET_GTK_edit_publication_keyword_list_add_button"> 395 <object class="GtkButton" id="GNUNET_GTK_edit_publication_keyword_list_add_button">
454 <property name="label">Add key_word</property> 396 <property name="label">Add key_word</property>
@@ -456,49 +398,87 @@
456 <property name="visible">True</property> 398 <property name="visible">True</property>
457 <property name="can_focus">True</property> 399 <property name="can_focus">True</property>
458 <property name="receives_default">True</property> 400 <property name="receives_default">True</property>
459 <property name="image">add_stock_image</property> 401 <property name="image">add_stock_image1</property>
460 <property name="use_underline">True</property> 402 <property name="use_underline">True</property>
461 <signal name="clicked" handler="GNUNET_GTK_edit_publication_keyword_list_add_button_clicked_cb" swapped="no"/> 403 <signal name="clicked" handler="GNUNET_GTK_edit_publication_keyword_list_add_button_clicked_cb" swapped="no"/>
462 </object> 404 </object>
463 <packing> 405 <packing>
464 <property name="expand">False</property> 406 <property name="expand">False</property>
465 <property name="fill">False</property> 407 <property name="fill">False</property>
466 <property name="position">0</property> 408 <property name="padding">2</property>
409 <property name="position">2</property>
467 </packing> 410 </packing>
468 </child> 411 </child>
412 </object>
413 <packing>
414 <property name="expand">False</property>
415 <property name="fill">True</property>
416 <property name="position">0</property>
417 </packing>
418 </child>
419 <child>
420 <object class="GtkScrolledWindow" id="GNUNET_GTK_edit_publication_keyword_scrolled_window">
421 <property name="width_request">400</property>
422 <property name="height_request">120</property>
423 <property name="visible">True</property>
424 <property name="can_focus">True</property>
425 <property name="hscrollbar_policy">never</property>
426 <property name="vscrollbar_policy">automatic</property>
427 <property name="shadow_type">in</property>
469 <child> 428 <child>
470 <object class="GtkButton" id="GNUNET_GTK_edit_publication_keyword_list_del_button"> 429 <object class="GtkTreeView" id="GNUNET_GTK_edit_publication_keyword_list_tree_view">
471 <property name="label">Delete _selected</property>
472 <property name="use_action_appearance">False</property>
473 <property name="visible">True</property> 430 <property name="visible">True</property>
474 <property name="sensitive">False</property>
475 <property name="can_focus">True</property> 431 <property name="can_focus">True</property>
476 <property name="receives_default">True</property> 432 <property name="model">GNUNET_GTK_publication_keywords_liststore</property>
477 <property name="image">del_stock_image</property> 433 <property name="search_column">0</property>
478 <property name="use_underline">True</property> 434 <child>
479 <signal name="clicked" handler="GNUNET_GTK_edit_publication_keyword_list_del_button_clicked_cb" swapped="no"/> 435 <object class="GtkTreeViewColumn" id="GNUNET_GTK_edit_publication_keyword_list_tree_view_column">
436 <property name="title">Keywords</property>
437 <property name="clickable">True</property>
438 <property name="reorderable">True</property>
439 <property name="sort_column_id">0</property>
440 <child>
441 <object class="GtkCellRendererText" id="GNUNET_GTK_edit_publication_keyword_list_tree_view_renderer"/>
442 <attributes>
443 <attribute name="text">0</attribute>
444 </attributes>
445 </child>
446 </object>
447 </child>
480 </object> 448 </object>
481 <packing>
482 <property name="expand">False</property>
483 <property name="fill">False</property>
484 <property name="padding">5</property>
485 <property name="pack_type">end</property>
486 <property name="position">1</property>
487 </packing>
488 </child> 449 </child>
489 </object> 450 </object>
490 <packing> 451 <packing>
452 <property name="expand">True</property>
453 <property name="fill">True</property>
454 <property name="position">1</property>
455 </packing>
456 </child>
457 <child>
458 <object class="GtkButton" id="GNUNET_GTK_edit_publication_keyword_list_del_button">
459 <property name="label">Delete _selected</property>
460 <property name="use_action_appearance">False</property>
461 <property name="visible">True</property>
462 <property name="sensitive">False</property>
463 <property name="can_focus">True</property>
464 <property name="receives_default">True</property>
465 <property name="image">del_stock_image1</property>
466 <property name="use_underline">True</property>
467 <signal name="clicked" handler="GNUNET_GTK_edit_publication_keyword_list_del_button_clicked_cb" swapped="no"/>
468 </object>
469 <packing>
491 <property name="expand">False</property> 470 <property name="expand">False</property>
492 <property name="fill">False</property> 471 <property name="fill">False</property>
493 <property name="padding">5</property> 472 <property name="padding">2</property>
494 <property name="position">1</property> 473 <property name="pack_type">end</property>
474 <property name="position">2</property>
495 </packing> 475 </packing>
496 </child> 476 </child>
497 </object> 477 </object>
498 <packing> 478 <packing>
499 <property name="expand">True</property> 479 <property name="expand">True</property>
500 <property name="fill">True</property> 480 <property name="fill">True</property>
501 <property name="padding">4</property> 481 <property name="padding">2</property>
502 <property name="position">0</property> 482 <property name="position">0</property>
503 </packing> 483 </packing>
504 </child> 484 </child>
@@ -632,7 +612,6 @@
632 <object class="GtkComboBox" id="GNUNET_GTK_edit_publication_anonymity_combobox"> 612 <object class="GtkComboBox" id="GNUNET_GTK_edit_publication_anonymity_combobox">
633 <property name="visible">True</property> 613 <property name="visible">True</property>
634 <property name="can_focus">False</property> 614 <property name="can_focus">False</property>
635 <property name="model">main_window_search_anonymity_liststore</property>
636 <property name="active">1</property> 615 <property name="active">1</property>
637 <child> 616 <child>
638 <object class="GtkCellRendererText" id="GNUNET_GTK_edit_publication_anonymity_combobox_renderer"/> 617 <object class="GtkCellRendererText" id="GNUNET_GTK_edit_publication_anonymity_combobox_renderer"/>
@@ -890,23 +869,33 @@
890 <property name="can_focus">False</property> 869 <property name="can_focus">False</property>
891 <property name="stock">gtk-add</property> 870 <property name="stock">gtk-add</property>
892 </object> 871 </object>
872 <object class="GtkImage" id="add_stock_image1">
873 <property name="visible">True</property>
874 <property name="can_focus">False</property>
875 <property name="stock">gtk-add</property>
876 </object>
893 <object class="GtkImage" id="del_stock_image"> 877 <object class="GtkImage" id="del_stock_image">
894 <property name="visible">True</property> 878 <property name="visible">True</property>
895 <property name="can_focus">False</property> 879 <property name="can_focus">False</property>
896 <property name="stock">gtk-delete</property> 880 <property name="stock">gtk-delete</property>
897 </object> 881 </object>
882 <object class="GtkImage" id="del_stock_image1">
883 <property name="visible">True</property>
884 <property name="can_focus">False</property>
885 <property name="stock">gtk-delete</property>
886 </object>
898 <object class="GtkAdjustment" id="expiration_year_adjustment"> 887 <object class="GtkAdjustment" id="expiration_year_adjustment">
899 <property name="upper">9999</property> 888 <property name="upper">9999</property>
900 <property name="step_increment">1</property> 889 <property name="step_increment">1</property>
901 <property name="page_increment">10</property> 890 <property name="page_increment">10</property>
902 </object> 891 </object>
903 <object class="GtkAdjustment" id="priority_adjustment"> 892 <object class="GtkAdjustment" id="replication_adjustment">
904 <property name="upper">10000000</property> 893 <property name="upper">999999</property>
905 <property name="step_increment">1</property> 894 <property name="step_increment">1</property>
906 <property name="page_increment">10</property> 895 <property name="page_increment">10</property>
907 </object> 896 </object>
908 <object class="GtkAdjustment" id="replication_adjustment"> 897 <object class="GtkAdjustment" id="priority_adjustment">
909 <property name="upper">999999</property> 898 <property name="upper">10000000</property>
910 <property name="step_increment">1</property> 899 <property name="step_increment">1</property>
911 <property name="page_increment">10</property> 900 <property name="page_increment">10</property>
912 </object> 901 </object>
@@ -930,4 +919,16 @@
930 <widget name="GNUNET_GTK_edit_publication_replication_label"/> 919 <widget name="GNUNET_GTK_edit_publication_replication_label"/>
931 </widgets> 920 </widgets>
932 </object> 921 </object>
922 <object class="GtkSizeGroup" id="sizegroup3">
923 <widgets>
924 <widget name="GNUNET_GTK_edit_publication_cancel_button"/>
925 <widget name="GNUNET_GTK_edit_publication_confirm_button"/>
926 </widgets>
927 </object>
928 <object class="GtkSizeGroup" id="sizegroup4">
929 <widgets>
930 <widget name="GNUNET_GTK_edit_publication_add_button"/>
931 <widget name="GNUNET_GTK_edit_publication_delete_button"/>
932 </widgets>
933 </object>
933</interface> 934</interface>
diff --git a/contrib/gnunet_fs_gtk_main_window.glade b/contrib/gnunet_fs_gtk_main_window.glade
index bb060f3d..b58cb539 100644
--- a/contrib/gnunet_fs_gtk_main_window.glade
+++ b/contrib/gnunet_fs_gtk_main_window.glade
@@ -12,6 +12,26 @@
12 <property name="step_increment">1</property> 12 <property name="step_increment">1</property>
13 <property name="page_increment">10</property> 13 <property name="page_increment">10</property>
14 </object> 14 </object>
15 <object class="GtkTreeStore" id="GNUNET_GTK_file_sharing_publishing_tree_store">
16 <columns>
17 <!-- column-name filesize -->
18 <column type="gchararray"/>
19 <!-- column-name do_index -->
20 <column type="gboolean"/>
21 <!-- column-name filename -->
22 <column type="gchararray"/>
23 <!-- column-name anonymity_level -->
24 <column type="guint"/>
25 <!-- column-name priority -->
26 <column type="guint"/>
27 <!-- column-name file_information_struct -->
28 <column type="gpointer"/>
29 <!-- column-name expiration_time_absolute -->
30 <column type="guint64"/>
31 <!-- column-name replication_level -->
32 <column type="guint"/>
33 </columns>
34 </object>
15 <object class="GtkListStore" id="GNUNET_GTK_meta_data_list_store"> 35 <object class="GtkListStore" id="GNUNET_GTK_meta_data_list_store">
16 <columns> 36 <columns>
17 <!-- column-name extractor_meta_type --> 37 <!-- column-name extractor_meta_type -->
@@ -234,289 +254,6 @@
234 <column type="guint64"/> 254 <column type="guint64"/>
235 </columns> 255 </columns>
236 </object> 256 </object>
237 <object class="GtkFileChooserDialog" id="GNUNET_GTK_publish_directory_dialog">
238 <property name="can_focus">False</property>
239 <property name="can_default">True</property>
240 <property name="events">GDK_FOCUS_CHANGE_MASK | GDK_STRUCTURE_MASK</property>
241 <property name="border_width">5</property>
242 <property name="modal">True</property>
243 <property name="destroy_with_parent">True</property>
244 <property name="type_hint">dialog</property>
245 <property name="skip_taskbar_hint">True</property>
246 <property name="skip_pager_hint">True</property>
247 <property name="transient_for">GNUNET_GTK_main_window</property>
248 <property name="action">select-folder</property>
249 <property name="create_folders">False</property>
250 <property name="select_multiple">True</property>
251 <child internal-child="vbox">
252 <object class="GtkVBox" id="dialog-vbox1">
253 <property name="visible">True</property>
254 <property name="can_focus">False</property>
255 <property name="spacing">2</property>
256 <child internal-child="action_area">
257 <object class="GtkHButtonBox" id="dialog-action_area6">
258 <property name="visible">True</property>
259 <property name="can_focus">False</property>
260 <property name="layout_style">end</property>
261 <child>
262 <object class="GtkButton" id="GNUNET_GTK_publish_dialog_cancel_button">
263 <property name="label">gtk-cancel</property>
264 <property name="use_action_appearance">False</property>
265 <property name="visible">True</property>
266 <property name="can_focus">True</property>
267 <property name="receives_default">True</property>
268 <property name="use_stock">True</property>
269 </object>
270 <packing>
271 <property name="expand">False</property>
272 <property name="fill">False</property>
273 <property name="position">0</property>
274 </packing>
275 </child>
276 <child>
277 <object class="GtkButton" id="GNUNET_GTK_publish_directory_dialog_ok_button">
278 <property name="label">gtk-ok</property>
279 <property name="use_action_appearance">False</property>
280 <property name="visible">True</property>
281 <property name="can_focus">True</property>
282 <property name="can_default">True</property>
283 <property name="receives_default">True</property>
284 <property name="use_stock">True</property>
285 </object>
286 <packing>
287 <property name="expand">False</property>
288 <property name="fill">False</property>
289 <property name="position">1</property>
290 </packing>
291 </child>
292 </object>
293 <packing>
294 <property name="expand">False</property>
295 <property name="fill">True</property>
296 <property name="pack_type">end</property>
297 <property name="position">0</property>
298 </packing>
299 </child>
300 <child>
301 <object class="GtkVBox" id="vbox3">
302 <property name="visible">True</property>
303 <property name="can_focus">False</property>
304 <child>
305 <object class="GtkHBox" id="hbox6">
306 <property name="visible">True</property>
307 <property name="can_focus">False</property>
308 <child>
309 <object class="GtkCheckButton" id="GNUNET_GTK_publish_directory_dialog_do_index_checkbutton">
310 <property name="label" translatable="yes">Index files</property>
311 <property name="use_action_appearance">False</property>
312 <property name="visible">True</property>
313 <property name="can_focus">True</property>
314 <property name="receives_default">False</property>
315 <property name="use_underline">True</property>
316 <property name="active">True</property>
317 <property name="draw_indicator">True</property>
318 </object>
319 <packing>
320 <property name="expand">False</property>
321 <property name="fill">False</property>
322 <property name="padding">20</property>
323 <property name="position">0</property>
324 </packing>
325 </child>
326 <child>
327 <placeholder/>
328 </child>
329 <child>
330 <object class="GtkLabel" id="GNUNET_GTK_publish_directory_dialog_priority_label">
331 <property name="visible">True</property>
332 <property name="can_focus">False</property>
333 <property name="label" translatable="yes">Priority:</property>
334 </object>
335 <packing>
336 <property name="expand">False</property>
337 <property name="fill">True</property>
338 <property name="padding">13</property>
339 <property name="position">2</property>
340 </packing>
341 </child>
342 <child>
343 <object class="GtkSpinButton" id="GNUNET_GTK_publish_directory_dialog_priority_spin_button">
344 <property name="visible">True</property>
345 <property name="can_focus">True</property>
346 <property name="invisible_char">•</property>
347 <property name="invisible_char_set">True</property>
348 <property name="primary_icon_activatable">False</property>
349 <property name="secondary_icon_activatable">False</property>
350 <property name="primary_icon_sensitive">True</property>
351 <property name="secondary_icon_sensitive">True</property>
352 <property name="adjustment">priority_adjustment</property>
353 <property name="numeric">True</property>
354 </object>
355 <packing>
356 <property name="expand">False</property>
357 <property name="fill">True</property>
358 <property name="padding">20</property>
359 <property name="position">3</property>
360 </packing>
361 </child>
362 </object>
363 <packing>
364 <property name="expand">False</property>
365 <property name="fill">False</property>
366 <property name="position">0</property>
367 </packing>
368 </child>
369 <child>
370 <object class="GtkHBox" id="hbox7">
371 <property name="visible">True</property>
372 <property name="can_focus">False</property>
373 <child>
374 <object class="GtkLabel" id="GNUNET_GTK_publish_directory_dialog_expiration_label">
375 <property name="visible">True</property>
376 <property name="can_focus">False</property>
377 <property name="label" translatable="yes">Expiration year:</property>
378 </object>
379 <packing>
380 <property name="expand">False</property>
381 <property name="fill">False</property>
382 <property name="padding">20</property>
383 <property name="position">0</property>
384 </packing>
385 </child>
386 <child>
387 <object class="GtkSpinButton" id="GNUNET_GTK_publish_directory_dialog_expiration_year_spin_button">
388 <property name="visible">True</property>
389 <property name="can_focus">True</property>
390 <property name="invisible_char">•</property>
391 <property name="invisible_char_set">True</property>
392 <property name="primary_icon_activatable">False</property>
393 <property name="secondary_icon_activatable">False</property>
394 <property name="primary_icon_sensitive">True</property>
395 <property name="secondary_icon_sensitive">True</property>
396 <property name="adjustment">expiration_year_adjustment</property>
397 </object>
398 <packing>
399 <property name="expand">False</property>
400 <property name="fill">False</property>
401 <property name="position">1</property>
402 </packing>
403 </child>
404 <child>
405 <object class="GtkLabel" id="GNUNET_GTK_publish_directory_dialog_anonymity_label">
406 <property name="visible">True</property>
407 <property name="can_focus">False</property>
408 <property name="label" translatable="yes">Anonymity:</property>
409 </object>
410 <packing>
411 <property name="expand">False</property>
412 <property name="fill">True</property>
413 <property name="padding">5</property>
414 <property name="position">2</property>
415 </packing>
416 </child>
417 <child>
418 <object class="GtkAlignment" id="GNUNET_GTK_publish_directory_dialog_anonymity_combobox_alignment">
419 <property name="visible">True</property>
420 <property name="can_focus">False</property>
421 <property name="yscale">0</property>
422 <child>
423 <object class="GtkComboBox" id="GNUNET_GTK_publish_directory_dialog_anonymity_combobox">
424 <property name="visible">True</property>
425 <property name="can_focus">False</property>
426 <property name="model">main_window_search_anonymity_liststore</property>
427 <property name="active">1</property>
428 <child>
429 <object class="GtkCellRendererText" id="GNUNET_GTK_publish_directory_dialog_anonymity_combobox_renderer"/>
430 <attributes>
431 <attribute name="foreground">2</attribute>
432 <attribute name="text">0</attribute>
433 </attributes>
434 </child>
435 <child>
436 <object class="GtkCellRendererText" id="GNUNET_GTK_publish_directory_dialog_anonymity_combobox_renerer_level"/>
437 <attributes>
438 <attribute name="text">1</attribute>
439 </attributes>
440 </child>
441 </object>
442 </child>
443 </object>
444 <packing>
445 <property name="expand">False</property>
446 <property name="fill">False</property>
447 <property name="position">3</property>
448 </packing>
449 </child>
450 </object>
451 <packing>
452 <property name="expand">False</property>
453 <property name="fill">False</property>
454 <property name="position">1</property>
455 </packing>
456 </child>
457 <child>
458 <object class="GtkHBox" id="hbox10">
459 <property name="visible">True</property>
460 <property name="can_focus">False</property>
461 <child>
462 <object class="GtkLabel" id="GNUNET_GTK_publish_directory_dialog_replication_label">
463 <property name="visible">True</property>
464 <property name="can_focus">False</property>
465 <property name="label" translatable="yes">_Replication:</property>
466 <property name="use_underline">True</property>
467 </object>
468 <packing>
469 <property name="expand">False</property>
470 <property name="fill">True</property>
471 <property name="padding">20</property>
472 <property name="position">0</property>
473 </packing>
474 </child>
475 <child>
476 <object class="GtkSpinButton" id="GNUNET_GTK_publish_directory_dialog_replication_spin_button">
477 <property name="visible">True</property>
478 <property name="can_focus">True</property>
479 <property name="invisible_char">●</property>
480 <property name="primary_icon_activatable">False</property>
481 <property name="secondary_icon_activatable">False</property>
482 <property name="primary_icon_sensitive">True</property>
483 <property name="secondary_icon_sensitive">True</property>
484 <property name="numeric">True</property>
485 </object>
486 <packing>
487 <property name="expand">False</property>
488 <property name="fill">True</property>
489 <property name="padding">1</property>
490 <property name="position">1</property>
491 </packing>
492 </child>
493 <child>
494 <placeholder/>
495 </child>
496 <child>
497 <placeholder/>
498 </child>
499 </object>
500 <packing>
501 <property name="expand">False</property>
502 <property name="fill">True</property>
503 <property name="position">2</property>
504 </packing>
505 </child>
506 </object>
507 <packing>
508 <property name="expand">False</property>
509 <property name="fill">False</property>
510 <property name="position">2</property>
511 </packing>
512 </child>
513 </object>
514 </child>
515 <action-widgets>
516 <action-widget response="-6">GNUNET_GTK_publish_dialog_cancel_button</action-widget>
517 <action-widget response="-5">GNUNET_GTK_publish_directory_dialog_ok_button</action-widget>
518 </action-widgets>
519 </object>
520 <object class="GtkFileChooserDialog" id="GNUNET_GTK_publish_file_dialog"> 257 <object class="GtkFileChooserDialog" id="GNUNET_GTK_publish_file_dialog">
521 <property name="can_focus">False</property> 258 <property name="can_focus">False</property>
522 <property name="can_default">True</property> 259 <property name="can_default">True</property>
@@ -546,9 +283,12 @@
546 <property name="label">gtk-cancel</property> 283 <property name="label">gtk-cancel</property>
547 <property name="use_action_appearance">False</property> 284 <property name="use_action_appearance">False</property>
548 <property name="visible">True</property> 285 <property name="visible">True</property>
286 <property name="sensitive">False</property>
549 <property name="can_focus">True</property> 287 <property name="can_focus">True</property>
550 <property name="receives_default">True</property> 288 <property name="receives_default">True</property>
551 <property name="use_stock">True</property> 289 <property name="image">execute_stock_image</property>
290 <property name="use_underline">True</property>
291 <signal name="clicked" handler="GNUNET_GTK_open_url_dialog_execute_button_clicked_cb" swapped="no"/>
552 </object> 292 </object>
553 <packing> 293 <packing>
554 <property name="expand">False</property> 294 <property name="expand">False</property>
@@ -1133,7 +873,7 @@
1133 <property name="tooltip_text" translatable="yes">Create a pseudonym for publishing content. Note that you can also publish content anonymously (without using a pseudonym).</property> 873 <property name="tooltip_text" translatable="yes">Create a pseudonym for publishing content. Note that you can also publish content anonymously (without using a pseudonym).</property>
1134 <property name="accel_path">&lt;gnunet-fs-gtk&gt;/File sharing/Create pseudonym</property> 874 <property name="accel_path">&lt;gnunet-fs-gtk&gt;/File sharing/Create pseudonym</property>
1135 <property name="use_underline">True</property> 875 <property name="use_underline">True</property>
1136 <property name="image">new_stock_imag</property> 876 <property name="image">new_stock_image</property>
1137 <property name="use_stock">False</property> 877 <property name="use_stock">False</property>
1138 <accelerator key="n" signal="activate" modifiers="GDK_CONTROL_MASK"/> 878 <accelerator key="n" signal="activate" modifiers="GDK_CONTROL_MASK"/>
1139 <signal name="activate" handler="GNUNET_GTK_main_menu_create_pseudonym_activate_cb" swapped="no"/> 879 <signal name="activate" handler="GNUNET_GTK_main_menu_create_pseudonym_activate_cb" swapped="no"/>
@@ -1767,11 +1507,6 @@
1767 </object> 1507 </object>
1768 </child> 1508 </child>
1769 </object> 1509 </object>
1770 <object class="GtkImage" id="new_stock_imag">
1771 <property name="visible">True</property>
1772 <property name="can_focus">False</property>
1773 <property name="stock">gtk-new</property>
1774 </object>
1775 <object class="GtkImage" id="new_stock_image"> 1510 <object class="GtkImage" id="new_stock_image">
1776 <property name="visible">True</property> 1511 <property name="visible">True</property>
1777 <property name="can_focus">False</property> 1512 <property name="can_focus">False</property>
@@ -1811,11 +1546,6 @@
1811 <widget name="main_window_search_mime_combobox"/> 1546 <widget name="main_window_search_mime_combobox"/>
1812 </widgets> 1547 </widgets>
1813 </object> 1548 </object>
1814 <object class="GtkSizeGroup" id="sizegroup4"> 1549 <object class="GtkSizeGroup" id="sizegroup4"/>
1815 <widgets>
1816 <widget name="GNUNET_GTK_master_publish_dialog_cancel_button"/>
1817 <widget name="GNUNET_GTK_master_publish_dialog_execute_button"/>
1818 </widgets>
1819 </object>
1820 <object class="GtkSizeGroup" id="sizegroup5"/> 1550 <object class="GtkSizeGroup" id="sizegroup5"/>
1821</interface> 1551</interface>
diff --git a/contrib/gnunet_fs_gtk_publish_dialog.glade b/contrib/gnunet_fs_gtk_publish_dialog.glade
index d160be7c..6fdef7a6 100644
--- a/contrib/gnunet_fs_gtk_publish_dialog.glade
+++ b/contrib/gnunet_fs_gtk_publish_dialog.glade
@@ -28,7 +28,6 @@
28 <property name="title" translatable="yes">Publish content on GNUnet</property> 28 <property name="title" translatable="yes">Publish content on GNUnet</property>
29 <property name="window_position">center-on-parent</property> 29 <property name="window_position">center-on-parent</property>
30 <property name="destroy_with_parent">True</property> 30 <property name="destroy_with_parent">True</property>
31 <property name="transient_for">GNUNET_GTK_main_window</property>
32 <signal name="delete-event" handler="GNUNET_GTK_master_publish_dialog_delete_event_cb" swapped="no"/> 31 <signal name="delete-event" handler="GNUNET_GTK_master_publish_dialog_delete_event_cb" swapped="no"/>
33 <signal name="realize" handler="GNUNET_GTK_master_publish_dialog_realize_cb" swapped="no"/> 32 <signal name="realize" handler="GNUNET_GTK_master_publish_dialog_realize_cb" swapped="no"/>
34 <child> 33 <child>
@@ -292,8 +291,8 @@
292 <object class="GtkScrolledWindow" id="GNUNET_GTK_master_publish_dialog_pseudonym_scrolled_window"> 291 <object class="GtkScrolledWindow" id="GNUNET_GTK_master_publish_dialog_pseudonym_scrolled_window">
293 <property name="visible">True</property> 292 <property name="visible">True</property>
294 <property name="can_focus">True</property> 293 <property name="can_focus">True</property>
295 <property name="hadjustment">adjustment7</property> 294 <property name="hadjustment">adjustment1</property>
296 <property name="vadjustment">adjustment8</property> 295 <property name="vadjustment">adjustment2</property>
297 <property name="hscrollbar_policy">automatic</property> 296 <property name="hscrollbar_policy">automatic</property>
298 <property name="vscrollbar_policy">automatic</property> 297 <property name="vscrollbar_policy">automatic</property>
299 <property name="shadow_type">in</property> 298 <property name="shadow_type">in</property>
@@ -302,8 +301,8 @@
302 <property name="visible">True</property> 301 <property name="visible">True</property>
303 <property name="can_focus">True</property> 302 <property name="can_focus">True</property>
304 <property name="model">GNUNET_GTK_pseudonym_tree_store</property> 303 <property name="model">GNUNET_GTK_pseudonym_tree_store</property>
305 <property name="hadjustment">adjustment7</property> 304 <property name="hadjustment">adjustment1</property>
306 <property name="vadjustment">adjustment8</property> 305 <property name="vadjustment">adjustment2</property>
307 <property name="headers_clickable">False</property> 306 <property name="headers_clickable">False</property>
308 <property name="reorderable">True</property> 307 <property name="reorderable">True</property>
309 <property name="search_column">0</property> 308 <property name="search_column">0</property>
@@ -326,11 +325,14 @@
326 </child> 325 </child>
327 <child> 326 <child>
328 <object class="GtkTreeViewColumn" id="GNUNET_GTK_master_publish_dialog_pseudonym_identifier_column"> 327 <object class="GtkTreeViewColumn" id="GNUNET_GTK_master_publish_dialog_pseudonym_identifier_column">
328 <property name="resizable">True</property>
329 <property name="sizing">autosize</property> 329 <property name="sizing">autosize</property>
330 <property name="title">Current identifier</property> 330 <property name="title">Current identifier</property>
331 <property name="clickable">True</property> 331 <property name="clickable">True</property>
332 <child> 332 <child>
333 <object class="GtkCellRendererText" id="GNUNET_GTK_master_publish_dialog_pseudonym_identifier_renderer"/> 333 <object class="GtkCellRendererText" id="GNUNET_GTK_master_publish_dialog_pseudonym_identifier_renderer">
334 <signal name="edited" handler="GNUNET_GTK_master_publish_dialog_pseudonym_identifier_renderer_edited_cb" swapped="no"/>
335 </object>
334 <attributes> 336 <attributes>
335 <attribute name="editable">8</attribute> 337 <attribute name="editable">8</attribute>
336 <attribute name="text">2</attribute> 338 <attribute name="text">2</attribute>
@@ -340,11 +342,13 @@
340 </child> 342 </child>
341 <child> 343 <child>
342 <object class="GtkTreeViewColumn" id="GNUNET_GTK_master_publish_dialog_pseudonym_updates_column"> 344 <object class="GtkTreeViewColumn" id="GNUNET_GTK_master_publish_dialog_pseudonym_updates_column">
345 <property name="resizable">True</property>
343 <property name="sizing">autosize</property> 346 <property name="sizing">autosize</property>
344 <property name="fixed_width">5</property>
345 <property name="title">Update identifier</property> 347 <property name="title">Update identifier</property>
346 <child> 348 <child>
347 <object class="GtkCellRendererText" id="GNUNET_GTK_master_publish_dialog_pseudonym_updates_renderer"/> 349 <object class="GtkCellRendererText" id="GNUNET_GTK_master_publish_dialog_pseudonym_updates_renderer">
350 <signal name="edited" handler="GNUNET_GTK_master_publish_dialog_pseudonym_updates_renderer_edited_cb" swapped="no"/>
351 </object>
348 <attributes> 352 <attributes>
349 <attribute name="editable">7</attribute> 353 <attribute name="editable">7</attribute>
350 <attribute name="text">5</attribute> 354 <attribute name="text">5</attribute>
@@ -354,6 +358,7 @@
354 </child> 358 </child>
355 <child> 359 <child>
356 <object class="GtkTreeViewColumn" id="GNUNET_GTK_master_publish_dialog_pseudonym_description_column"> 360 <object class="GtkTreeViewColumn" id="GNUNET_GTK_master_publish_dialog_pseudonym_description_column">
361 <property name="resizable">True</property>
357 <property name="title">Description (of existing content)</property> 362 <property name="title">Description (of existing content)</property>
358 <child> 363 <child>
359 <object class="GtkCellRendererText" id="GNUNET_GTK_master_publish_dialog_pseudonym_description_renderer"> 364 <object class="GtkCellRendererText" id="GNUNET_GTK_master_publish_dialog_pseudonym_description_renderer">
@@ -445,6 +450,16 @@
445 <column type="gboolean"/> 450 <column type="gboolean"/>
446 </columns> 451 </columns>
447 </object> 452 </object>
453 <object class="GtkAdjustment" id="adjustment1">
454 <property name="upper">100</property>
455 <property name="step_increment">1</property>
456 <property name="page_increment">10</property>
457 </object>
458 <object class="GtkAdjustment" id="adjustment2">
459 <property name="upper">100</property>
460 <property name="step_increment">1</property>
461 <property name="page_increment">10</property>
462 </object>
448 <object class="GtkAdjustment" id="adjustment5"> 463 <object class="GtkAdjustment" id="adjustment5">
449 <property name="upper">100</property> 464 <property name="upper">100</property>
450 <property name="step_increment">1</property> 465 <property name="step_increment">1</property>
diff --git a/contrib/gnunet_fs_gtk_publish_directory_dialog.glade b/contrib/gnunet_fs_gtk_publish_directory_dialog.glade
index 3b23603c..dea894f0 100644
--- a/contrib/gnunet_fs_gtk_publish_directory_dialog.glade
+++ b/contrib/gnunet_fs_gtk_publish_directory_dialog.glade
@@ -1,4 +1,4 @@
1<?xml version="1.0"?> 1<?xml version="1.0" encoding="UTF-8"?>
2<interface> 2<interface>
3 <requires lib="gtk+" version="2.20"/> 3 <requires lib="gtk+" version="2.20"/>
4 <!-- interface-naming-policy project-wide --> 4 <!-- interface-naming-policy project-wide -->
@@ -8,84 +8,51 @@
8 <property name="page_increment">10</property> 8 <property name="page_increment">10</property>
9 </object> 9 </object>
10 <object class="GtkAdjustment" id="priority_adjustment"> 10 <object class="GtkAdjustment" id="priority_adjustment">
11 <property name="value">1000</property> 11 <property name="upper">10000000</property>
12 <property name="upper">100000000</property>
13 <property name="step_increment">1</property> 12 <property name="step_increment">1</property>
14 <property name="page_increment">10</property> 13 <property name="page_increment">10</property>
15 </object> 14 </object>
16 <object class="GtkListStore" id="GNUNET_GTK_publish_directory_dialog_expiration_list_store"> 15 <object class="GtkAdjustment" id="replication_adjustment">
17 <columns> 16 <property name="upper">999999</property>
18 <!-- column-name human_readable_time --> 17 <property name="step_increment">1</property>
19 <column type="gchararray"/> 18 <property name="page_increment">10</property>
20 <!-- column-name time_in_ms -->
21 <column type="guint64"/>
22 </columns>
23 </object> 19 </object>
20 <object class="GtkFileFilter" id="gnunet_directory_filter"/>
24 <object class="GtkFileChooserDialog" id="GNUNET_GTK_publish_directory_dialog"> 21 <object class="GtkFileChooserDialog" id="GNUNET_GTK_publish_directory_dialog">
22 <property name="can_focus">False</property>
25 <property name="can_default">True</property> 23 <property name="can_default">True</property>
24 <property name="events">GDK_FOCUS_CHANGE_MASK | GDK_STRUCTURE_MASK</property>
26 <property name="border_width">5</property> 25 <property name="border_width">5</property>
27 <property name="type_hint">normal</property> 26 <property name="modal">True</property>
28 <property name="has_separator">False</property> 27 <property name="window_position">center-on-parent</property>
29 <property name="select_multiple">True</property> 28 <property name="default_width">800</property>
30 <property name="create_folders">False</property> 29 <property name="default_height">600</property>
30 <property name="destroy_with_parent">True</property>
31 <property name="type_hint">dialog</property>
32 <property name="skip_taskbar_hint">True</property>
33 <property name="skip_pager_hint">True</property>
31 <property name="action">select-folder</property> 34 <property name="action">select-folder</property>
35 <property name="create_folders">False</property>
36 <property name="filter">gnunet_directory_filter</property>
37 <property name="select_multiple">True</property>
32 <child internal-child="vbox"> 38 <child internal-child="vbox">
33 <object class="GtkVBox" id="dialog-vbox2"> 39 <object class="GtkVBox" id="dialog-vbox8">
34 <property name="visible">True</property> 40 <property name="visible">True</property>
35 <property name="orientation">vertical</property> 41 <property name="can_focus">False</property>
36 <property name="spacing">2</property> 42 <property name="spacing">2</property>
37 <child> 43 <child internal-child="action_area">
38 <object class="GtkVBox" id="vbox1"> 44 <object class="GtkHButtonBox" id="dialog-action_area9">
39 <property name="visible">True</property> 45 <property name="visible">True</property>
40 <property name="orientation">vertical</property> 46 <property name="can_focus">False</property>
47 <property name="layout_style">end</property>
41 <child> 48 <child>
42 <object class="GtkHBox" id="hbox1"> 49 <object class="GtkButton" id="GNUNET_GTK_publish_dialog_cancel_button">
50 <property name="label">gtk-cancel</property>
51 <property name="use_action_appearance">False</property>
43 <property name="visible">True</property> 52 <property name="visible">True</property>
44 <child> 53 <property name="can_focus">True</property>
45 <object class="GtkCheckButton" id="GNUNET_GTK_publish_directory_dialog_do_index_checkbutton"> 54 <property name="receives_default">True</property>
46 <property name="label" translatable="yes">Index files</property> 55 <property name="use_stock">True</property>
47 <property name="visible">True</property>
48 <property name="can_focus">True</property>
49 <property name="receives_default">False</property>
50 <property name="use_underline">True</property>
51 <property name="active">True</property>
52 <property name="draw_indicator">True</property>
53 </object>
54 <packing>
55 <property name="expand">False</property>
56 <property name="fill">False</property>
57 <property name="padding">20</property>
58 <property name="position">0</property>
59 </packing>
60 </child>
61 <child>
62 <placeholder/>
63 </child>
64 <child>
65 <object class="GtkLabel" id="GNUNET_GTK_publish_directory_dialog_priority_label">
66 <property name="visible">True</property>
67 <property name="label" translatable="yes">Priority:</property>
68 </object>
69 <packing>
70 <property name="expand">False</property>
71 <property name="padding">13</property>
72 <property name="position">2</property>
73 </packing>
74 </child>
75 <child>
76 <object class="GtkSpinButton" id="GNUNET_GTK_publish_directory_dialog_priority_spin_button">
77 <property name="visible">True</property>
78 <property name="can_focus">True</property>
79 <property name="invisible_char">&#x2022;</property>
80 <property name="adjustment">priority_adjustment</property>
81 <property name="numeric">True</property>
82 </object>
83 <packing>
84 <property name="expand">False</property>
85 <property name="padding">20</property>
86 <property name="position">3</property>
87 </packing>
88 </child>
89 </object> 56 </object>
90 <packing> 57 <packing>
91 <property name="expand">False</property> 58 <property name="expand">False</property>
@@ -94,149 +61,216 @@
94 </packing> 61 </packing>
95 </child> 62 </child>
96 <child> 63 <child>
97 <object class="GtkHBox" id="hbox2"> 64 <object class="GtkButton" id="GNUNET_GTK_publish_directory_dialog_ok_button">
65 <property name="label">gtk-ok</property>
66 <property name="use_action_appearance">False</property>
98 <property name="visible">True</property> 67 <property name="visible">True</property>
99 <child> 68 <property name="can_focus">True</property>
100 <object class="GtkLabel" id="GNUNET_GTK_publish_directory_dialog_expiration_label"> 69 <property name="can_default">True</property>
101 <property name="visible">True</property> 70 <property name="receives_default">True</property>
102 <property name="label" translatable="yes">Expiration year:</property> 71 <property name="use_stock">True</property>
103 </object>
104 <packing>
105 <property name="expand">False</property>
106 <property name="fill">False</property>
107 <property name="padding">20</property>
108 <property name="position">0</property>
109 </packing>
110 </child>
111 <child>
112 <object class="GtkSpinButton" id="GNUNET_GTK_publish_directory_dialog_expiration_year_spin_button">
113 <property name="visible">True</property>
114 <property name="can_focus">True</property>
115 <property name="invisible_char">&#x2022;</property>
116 <property name="adjustment">expiration_year_adjustment</property>
117 </object>
118 <packing>
119 <property name="expand">False</property>
120 <property name="fill">False</property>
121 <property name="position">1</property>
122 </packing>
123 </child>
124 <child>
125 <object class="GtkLabel" id="GNUNET_GTK_publish_directory_dialog_anonymity_label">
126 <property name="visible">True</property>
127 <property name="label" translatable="yes">Anonymity:</property>
128 </object>
129 <packing>
130 <property name="expand">False</property>
131 <property name="padding">5</property>
132 <property name="position">2</property>
133 </packing>
134 </child>
135 <child>
136 <object class="GtkSpinButton" id="GNUNET_GTK_publish_directory_dialog_anonymity_spin_button">
137 <property name="visible">True</property>
138 <property name="can_focus">True</property>
139 <property name="invisible_char">&#x2022;</property>
140 <property name="adjustment">anonymity_adjustment</property>
141 <property name="numeric">True</property>
142 <signal name="value_changed" handler="GNUNET_GTK_anonymity_spin_button_value_changed_cb"/>
143 </object>
144 <packing>
145 <property name="expand">False</property>
146 <property name="padding">20</property>
147 <property name="position">3</property>
148 </packing>
149 </child>
150 </object> 72 </object>
151 <packing> 73 <packing>
152 <property name="expand">False</property> 74 <property name="expand">False</property>
75 <property name="fill">False</property>
153 <property name="position">1</property> 76 <property name="position">1</property>
154 </packing> 77 </packing>
155 </child> 78 </child>
79 </object>
80 <packing>
81 <property name="expand">False</property>
82 <property name="fill">True</property>
83 <property name="pack_type">end</property>
84 <property name="position">0</property>
85 </packing>
86 </child>
87 <child>
88 <object class="GtkTable" id="table1">
89 <property name="visible">True</property>
90 <property name="can_focus">False</property>
91 <property name="n_rows">2</property>
92 <property name="n_columns">4</property>
156 <child> 93 <child>
157 <object class="GtkHBox" id="hbox3"> 94 <object class="GtkLabel" id="GNUNET_GTK_publish_directory_dialog_priority_label">
158 <property name="visible">True</property> 95 <property name="visible">True</property>
96 <property name="can_focus">False</property>
97 <property name="label" translatable="yes">Priority:</property>
98 </object>
99 <packing>
100 <property name="left_attach">2</property>
101 <property name="right_attach">3</property>
102 <property name="x_options"></property>
103 <property name="y_options"></property>
104 </packing>
105 </child>
106 <child>
107 <object class="GtkSpinButton" id="GNUNET_GTK_publish_directory_dialog_priority_spin_button">
108 <property name="visible">True</property>
109 <property name="can_focus">True</property>
110 <property name="invisible_char">•</property>
111 <property name="invisible_char_set">True</property>
112 <property name="primary_icon_activatable">False</property>
113 <property name="secondary_icon_activatable">False</property>
114 <property name="primary_icon_sensitive">True</property>
115 <property name="secondary_icon_sensitive">True</property>
116 <property name="adjustment">priority_adjustment</property>
117 <property name="numeric">True</property>
118 </object>
119 <packing>
120 <property name="left_attach">3</property>
121 <property name="right_attach">4</property>
122 <property name="y_options"></property>
123 </packing>
124 </child>
125 <child>
126 <object class="GtkLabel" id="GNUNET_GTK_publish_directory_dialog_expiration_label">
127 <property name="visible">True</property>
128 <property name="can_focus">False</property>
129 <property name="label" translatable="yes">Expiration year:</property>
130 </object>
131 <packing>
132 <property name="x_options"></property>
133 <property name="y_options"></property>
134 </packing>
135 </child>
136 <child>
137 <object class="GtkSpinButton" id="GNUNET_GTK_publish_directory_dialog_expiration_year_spin_button">
138 <property name="visible">True</property>
139 <property name="can_focus">True</property>
140 <property name="invisible_char">•</property>
141 <property name="invisible_char_set">True</property>
142 <property name="primary_icon_activatable">False</property>
143 <property name="secondary_icon_activatable">False</property>
144 <property name="primary_icon_sensitive">True</property>
145 <property name="secondary_icon_sensitive">True</property>
146 <property name="adjustment">expiration_year_adjustment</property>
147 </object>
148 <packing>
149 <property name="left_attach">1</property>
150 <property name="right_attach">2</property>
151 <property name="y_options"></property>
152 </packing>
153 </child>
154 <child>
155 <object class="GtkLabel" id="GNUNET_GTK_publish_directory_dialog_anonymity_label">
156 <property name="visible">True</property>
157 <property name="can_focus">False</property>
158 <property name="label" translatable="yes">Anonymity:</property>
159 </object>
160 <packing>
161 <property name="top_attach">1</property>
162 <property name="bottom_attach">2</property>
163 <property name="x_options"></property>
164 <property name="y_options"></property>
165 </packing>
166 </child>
167 <child>
168 <object class="GtkLabel" id="GNUNET_GTK_publish_directory_dialog_replication_label">
169 <property name="visible">True</property>
170 <property name="can_focus">False</property>
171 <property name="label" translatable="yes">_Replication:</property>
172 <property name="use_underline">True</property>
173 </object>
174 <packing>
175 <property name="left_attach">2</property>
176 <property name="right_attach">3</property>
177 <property name="top_attach">1</property>
178 <property name="bottom_attach">2</property>
179 <property name="x_options"></property>
180 <property name="y_options"></property>
181 </packing>
182 </child>
183 <child>
184 <object class="GtkSpinButton" id="GNUNET_GTK_publish_directory_dialog_replication_spin_button">
185 <property name="visible">True</property>
186 <property name="can_focus">True</property>
187 <property name="invisible_char">●</property>
188 <property name="invisible_char_set">True</property>
189 <property name="primary_icon_activatable">False</property>
190 <property name="secondary_icon_activatable">False</property>
191 <property name="primary_icon_sensitive">True</property>
192 <property name="secondary_icon_sensitive">True</property>
193 <property name="adjustment">replication_adjustment</property>
194 <property name="numeric">True</property>
195 </object>
196 <packing>
197 <property name="left_attach">3</property>
198 <property name="right_attach">4</property>
199 <property name="top_attach">1</property>
200 <property name="bottom_attach">2</property>
201 <property name="y_options"></property>
202 </packing>
203 </child>
204 <child>
205 <object class="GtkAlignment" id="GNUNET_GTK_publish_directory_dialog_anonymity_combobox_alignment">
206 <property name="visible">True</property>
207 <property name="can_focus">False</property>
208 <property name="yscale">0</property>
159 <child> 209 <child>
160 <object class="GtkLabel" id="GNUNET_GTK_publish_directory_dialog_replication_label"> 210 <object class="GtkComboBox" id="GNUNET_GTK_publish_directory_dialog_anonymity_combobox">
161 <property name="visible">True</property>
162 <property name="label" translatable="yes">_Replication:</property>
163 <property name="use_underline">True</property>
164 </object>
165 <packing>
166 <property name="expand">False</property>
167 <property name="padding">20</property>
168 <property name="position">0</property>
169 </packing>
170 </child>
171 <child>
172 <object class="GtkSpinButton" id="GNUNET_GTK_publish_directory_dialog_replication_spin_button">
173 <property name="visible">True</property> 211 <property name="visible">True</property>
174 <property name="can_focus">True</property> 212 <property name="can_focus">False</property>
175 <property name="invisible_char">&#x25CF;</property> 213 <property name="active">1</property>
176 <property name="adjustment">replication_adjustment</property> 214 <child>
177 <property name="numeric">True</property> 215 <object class="GtkCellRendererText" id="GNUNET_GTK_publish_directory_dialog_anonymity_combobox_renderer"/>
216 <attributes>
217 <attribute name="foreground">2</attribute>
218 <attribute name="text">0</attribute>
219 </attributes>
220 </child>
221 <child>
222 <object class="GtkCellRendererText" id="GNUNET_GTK_publish_directory_dialog_anonymity_combobox_renerer_level"/>
223 <attributes>
224 <attribute name="text">1</attribute>
225 </attributes>
226 </child>
178 </object> 227 </object>
179 <packing>
180 <property name="expand">False</property>
181 <property name="padding">1</property>
182 <property name="position">1</property>
183 </packing>
184 </child>
185 <child>
186 <placeholder/>
187 </child>
188 <child>
189 <placeholder/>
190 </child> 228 </child>
191 </object> 229 </object>
192 <packing> 230 <packing>
193 <property name="expand">False</property> 231 <property name="left_attach">1</property>
194 <property name="position">2</property> 232 <property name="right_attach">2</property>
233 <property name="top_attach">1</property>
234 <property name="bottom_attach">2</property>
235 <property name="y_options"></property>
195 </packing> 236 </packing>
196 </child> 237 </child>
197 </object> 238 </object>
198 <packing> 239 <packing>
240 <property name="expand">False</property>
241 <property name="fill">False</property>
199 <property name="position">2</property> 242 <property name="position">2</property>
200 </packing> 243 </packing>
201 </child> 244 </child>
202 <child internal-child="action_area"> 245 <child>
203 <object class="GtkHButtonBox" id="dialog-action_area3"> 246 <object class="GtkHBox" id="hbox1">
204 <property name="visible">True</property> 247 <property name="visible">True</property>
205 <property name="layout_style">end</property> 248 <property name="can_focus">False</property>
206 <child> 249 <child>
207 <object class="GtkButton" id="GNUNET_GTK_publish_dialog_cancel_button"> 250 <placeholder/>
208 <property name="label">gtk-cancel</property>
209 <property name="visible">True</property>
210 <property name="can_focus">True</property>
211 <property name="receives_default">True</property>
212 <property name="use_stock">True</property>
213 </object>
214 <packing>
215 <property name="expand">False</property>
216 <property name="fill">False</property>
217 <property name="position">0</property>
218 </packing>
219 </child> 251 </child>
220 <child> 252 <child>
221 <object class="GtkButton" id="GNUNET_GTK_publish_directory_dialog_ok_button"> 253 <object class="GtkCheckButton" id="GNUNET_GTK_publish_directory_dialog_do_index_checkbutton">
222 <property name="label">gtk-ok</property> 254 <property name="label" translatable="yes">Index files</property>
255 <property name="use_action_appearance">False</property>
223 <property name="visible">True</property> 256 <property name="visible">True</property>
224 <property name="can_focus">True</property> 257 <property name="can_focus">True</property>
225 <property name="can_default">True</property> 258 <property name="receives_default">False</property>
226 <property name="receives_default">True</property> 259 <property name="use_underline">True</property>
227 <property name="use_stock">True</property> 260 <property name="active">True</property>
261 <property name="draw_indicator">True</property>
228 </object> 262 </object>
229 <packing> 263 <packing>
230 <property name="expand">False</property> 264 <property name="expand">False</property>
231 <property name="fill">False</property> 265 <property name="fill">True</property>
232 <property name="position">1</property> 266 <property name="position">1</property>
233 </packing> 267 </packing>
234 </child> 268 </child>
235 </object> 269 </object>
236 <packing> 270 <packing>
237 <property name="expand">False</property> 271 <property name="expand">False</property>
238 <property name="pack_type">end</property> 272 <property name="fill">False</property>
239 <property name="position">0</property> 273 <property name="position">3</property>
240 </packing> 274 </packing>
241 </child> 275 </child>
242 </object> 276 </object>
@@ -246,15 +280,4 @@
246 <action-widget response="-5">GNUNET_GTK_publish_directory_dialog_ok_button</action-widget> 280 <action-widget response="-5">GNUNET_GTK_publish_directory_dialog_ok_button</action-widget>
247 </action-widgets> 281 </action-widgets>
248 </object> 282 </object>
249 <object class="GtkAdjustment" id="anonymity_adjustment">
250 <property name="value">1</property>
251 <property name="upper">10000000</property>
252 <property name="step_increment">1</property>
253 <property name="page_increment">10</property>
254 </object>
255 <object class="GtkAdjustment" id="replication_adjustment">
256 <property name="upper">100</property>
257 <property name="step_increment">1</property>
258 <property name="page_increment">10</property>
259 </object>
260</interface> 283</interface>
diff --git a/src/fs/gnunet-fs-gtk-main_window_file_publish.c b/src/fs/gnunet-fs-gtk-main_window_file_publish.c
index 18be9531..e8003acf 100644
--- a/src/fs/gnunet-fs-gtk-main_window_file_publish.c
+++ b/src/fs/gnunet-fs-gtk-main_window_file_publish.c
@@ -50,6 +50,7 @@ struct MainPublishingDialogContext
50 GtkWindow *master_pubdialog; 50 GtkWindow *master_pubdialog;
51 51
52 gulong open_directory_handler_id; 52 gulong open_directory_handler_id;
53 GtkBuilder *open_directory_builder;
53 gulong open_file_handler_id; 54 gulong open_file_handler_id;
54}; 55};
55 56
@@ -1294,40 +1295,38 @@ GNUNET_GTK_publish_directory_dialog_response_cb (GtkDialog * dialog,
1294 GtkSpinButton *sb; 1295 GtkSpinButton *sb;
1295 struct GNUNET_FS_BlockOptions bo; 1296 struct GNUNET_FS_BlockOptions bo;
1296 GtkWidget *ad; 1297 GtkWidget *ad;
1297 GtkBuilder *builder;
1298 1298
1299 if (g_signal_handler_is_connected (G_OBJECT (dialog), ctx->open_directory_handler_id)) 1299 if (g_signal_handler_is_connected (G_OBJECT (dialog), ctx->open_directory_handler_id))
1300 g_signal_handler_disconnect (G_OBJECT (dialog), ctx->open_directory_handler_id); 1300 g_signal_handler_disconnect (G_OBJECT (dialog), ctx->open_directory_handler_id);
1301 ctx->open_directory_handler_id = 0; 1301 ctx->open_directory_handler_id = 0;
1302 1302
1303 builder = ctx->main_window_builder;
1304 ad = GTK_WIDGET (gtk_builder_get_object 1303 ad = GTK_WIDGET (gtk_builder_get_object
1305 (builder, "GNUNET_GTK_publish_directory_dialog")); 1304 (ctx->open_directory_builder, "GNUNET_GTK_publish_directory_dialog"));
1306 if (response_id == -5) 1305 if (response_id == -5)
1307 { 1306 {
1308 filename = GNUNET_GTK_filechooser_get_filename_utf8 (GTK_FILE_CHOOSER (ad)); 1307 filename = GNUNET_GTK_filechooser_get_filename_utf8 (GTK_FILE_CHOOSER (ad));
1309 sb = GTK_SPIN_BUTTON (gtk_builder_get_object 1308 sb = GTK_SPIN_BUTTON (gtk_builder_get_object
1310 (builder, 1309 (ctx->open_directory_builder,
1311 "GNUNET_GTK_publish_directory_dialog_expiration_year_spin_button")); 1310 "GNUNET_GTK_publish_directory_dialog_expiration_year_spin_button"));
1312 if (!GNUNET_GTK_get_selected_anonymity_level 1311 if (!GNUNET_GTK_get_selected_anonymity_level
1313 (builder, "GNUNET_GTK_publish_directory_dialog_anonymity_combobox", 1312 (ctx->open_directory_builder, "GNUNET_GTK_publish_directory_dialog_anonymity_combobox",
1314 &bo.anonymity_level)) 1313 &bo.anonymity_level))
1315 bo.anonymity_level = 1; 1314 bo.anonymity_level = 1;
1316 bo.content_priority = 1315 bo.content_priority =
1317 gtk_spin_button_get_value (GTK_SPIN_BUTTON 1316 gtk_spin_button_get_value (GTK_SPIN_BUTTON
1318 (gtk_builder_get_object 1317 (gtk_builder_get_object
1319 (builder, 1318 (ctx->open_directory_builder,
1320 "GNUNET_GTK_publish_directory_dialog_priority_spin_button"))); 1319 "GNUNET_GTK_publish_directory_dialog_priority_spin_button")));
1321 bo.replication_level = 1320 bo.replication_level =
1322 gtk_spin_button_get_value (GTK_SPIN_BUTTON 1321 gtk_spin_button_get_value (GTK_SPIN_BUTTON
1323 (gtk_builder_get_object 1322 (gtk_builder_get_object
1324 (builder, 1323 (ctx->open_directory_builder,
1325 "GNUNET_GTK_publish_directory_dialog_replication_spin_button"))); 1324 "GNUNET_GTK_publish_directory_dialog_replication_spin_button")));
1326 bo.expiration_time = GNUNET_FS_GTK_get_expiration_time (sb); 1325 bo.expiration_time = GNUNET_FS_GTK_get_expiration_time (sb);
1327 do_index = 1326 do_index =
1328 gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON 1327 gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON
1329 (gtk_builder_get_object 1328 (gtk_builder_get_object
1330 (builder, 1329 (ctx->open_directory_builder,
1331 "GNUNET_GTK_publish_directory_dialog_do_index_checkbutton"))); 1330 "GNUNET_GTK_publish_directory_dialog_do_index_checkbutton")));
1332 1331
1333 /* FIXME: open progress dialog here... */ 1332 /* FIXME: open progress dialog here... */
@@ -1335,7 +1334,8 @@ GNUNET_GTK_publish_directory_dialog_response_cb (GtkDialog * dialog,
1335 g_free (filename); 1334 g_free (filename);
1336 update_selectivity (ctx); 1335 update_selectivity (ctx);
1337 } 1336 }
1338 gtk_widget_hide (ad); 1337 gtk_widget_destroy (ad);
1338 g_object_unref (G_OBJECT (ctx->open_directory_builder));
1339} 1339}
1340 1340
1341 1341
@@ -1344,15 +1344,23 @@ GNUNET_GTK_master_publish_dialog_open_button_clicked_cb (GtkWidget * dummy,
1344 struct MainPublishingDialogContext *ctx) 1344 struct MainPublishingDialogContext *ctx)
1345{ 1345{
1346 GtkWidget *ad; 1346 GtkWidget *ad;
1347 GtkBuilder *builder;
1348 1347
1349 builder = ctx->main_window_builder; 1348 GtkComboBox *combo;
1350 GNUNET_FS_GTK_setup_expiration_year_adjustment (builder); 1349 GtkTreeModel *anon_treemodel;
1350
1351 ctx->open_directory_builder = GNUNET_GTK_get_new_builder ("gnunet_fs_gtk_publish_directory_dialog.glade", ctx);
1352 GNUNET_FS_GTK_setup_expiration_year_adjustment (ctx->open_directory_builder);
1351 ad = GTK_WIDGET (gtk_builder_get_object 1353 ad = GTK_WIDGET (gtk_builder_get_object
1352 (builder, "GNUNET_GTK_publish_directory_dialog")); 1354 (ctx->open_directory_builder, "GNUNET_GTK_publish_directory_dialog"));
1353 1355
1354 ctx->open_directory_handler_id = g_signal_connect (G_OBJECT (ad), "response", G_CALLBACK (GNUNET_GTK_publish_directory_dialog_response_cb), ctx); 1356 ctx->open_directory_handler_id = g_signal_connect (G_OBJECT (ad), "response", G_CALLBACK (GNUNET_GTK_publish_directory_dialog_response_cb), ctx);
1355 1357
1358 anon_treemodel = GTK_TREE_MODEL (gtk_builder_get_object (ctx->main_window_builder,
1359 "main_window_search_anonymity_liststore"));
1360 combo = GTK_COMBO_BOX (gtk_builder_get_object (ctx->open_directory_builder,
1361 "GNUNET_GTK_publish_directory_dialog_anonymity_combobox"));
1362 gtk_combo_box_set_model (combo, anon_treemodel);
1363
1356 gtk_window_set_transient_for (GTK_WINDOW (ad), ctx->master_pubdialog); 1364 gtk_window_set_transient_for (GTK_WINDOW (ad), ctx->master_pubdialog);
1357 1365
1358 gtk_window_present (GTK_WINDOW (ad)); 1366 gtk_window_present (GTK_WINDOW (ad));
@@ -1659,7 +1667,7 @@ hide_master_publish_dialog (struct MainPublishingDialogContext *ctx, gint ret)
1659 while (TRUE == gtk_tree_model_iter_next (ctx->file_info_treemodel, &iter)); 1667 while (TRUE == gtk_tree_model_iter_next (ctx->file_info_treemodel, &iter));
1660 gtk_tree_store_clear (GTK_TREE_STORE (ctx->file_info_treemodel)); 1668 gtk_tree_store_clear (GTK_TREE_STORE (ctx->file_info_treemodel));
1661 gtk_widget_destroy (GTK_WIDGET (ctx->master_pubdialog)); 1669 gtk_widget_destroy (GTK_WIDGET (ctx->master_pubdialog));
1662 gtk_object_unref (GTK_OBJECT (ctx->builder)); 1670 g_object_unref (G_OBJECT (ctx->builder));
1663 GNUNET_free (ctx); 1671 GNUNET_free (ctx);
1664} 1672}
1665 1673