diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-01-06 08:57:20 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-01-06 08:57:20 +0000 |
commit | 0b2c209a381b00fcd8ac982b4ea0899411deaf8b (patch) | |
tree | 258bd8333b187ff1c02cd4fc025c37bab40a3006 | |
parent | aae743ebe9b9f32e87565199f9e426ba4c1c23fa (diff) | |
download | gnunet-gtk-0b2c209a381b00fcd8ac982b4ea0899411deaf8b.tar.gz gnunet-gtk-0b2c209a381b00fcd8ac982b4ea0899411deaf8b.zip |
-LRN: unbuildering publish-file-dialog
-rw-r--r-- | contrib/gnunet_fs_gtk_main_window.glade | 296 | ||||
-rw-r--r-- | contrib/gnunet_fs_gtk_publish_file_dialog.glade | 366 | ||||
-rw-r--r-- | src/fs/gnunet-fs-gtk-main_window_file_publish.c | 31 |
3 files changed, 219 insertions, 474 deletions
diff --git a/contrib/gnunet_fs_gtk_main_window.glade b/contrib/gnunet_fs_gtk_main_window.glade index b58cb539..89d787a4 100644 --- a/contrib/gnunet_fs_gtk_main_window.glade +++ b/contrib/gnunet_fs_gtk_main_window.glade | |||
@@ -254,302 +254,6 @@ | |||
254 | <column type="guint64"/> | 254 | <column type="guint64"/> |
255 | </columns> | 255 | </columns> |
256 | </object> | 256 | </object> |
257 | <object class="GtkFileChooserDialog" id="GNUNET_GTK_publish_file_dialog"> | ||
258 | <property name="can_focus">False</property> | ||
259 | <property name="can_default">True</property> | ||
260 | <property name="border_width">5</property> | ||
261 | <property name="title" translatable="yes">Publish file...</property> | ||
262 | <property name="modal">True</property> | ||
263 | <property name="destroy_with_parent">True</property> | ||
264 | <property name="type_hint">normal</property> | ||
265 | <property name="skip_taskbar_hint">True</property> | ||
266 | <property name="skip_pager_hint">True</property> | ||
267 | <property name="transient_for">GNUNET_GTK_main_window</property> | ||
268 | <property name="create_folders">False</property> | ||
269 | <property name="select_multiple">True</property> | ||
270 | <signal name="delete-event" handler="gtk_widget_hide_on_delete" swapped="no"/> | ||
271 | <child internal-child="vbox"> | ||
272 | <object class="GtkVBox" id="dialog-vbox5"> | ||
273 | <property name="visible">True</property> | ||
274 | <property name="can_focus">False</property> | ||
275 | <property name="spacing">2</property> | ||
276 | <child internal-child="action_area"> | ||
277 | <object class="GtkHButtonBox" id="dialog-action_area5"> | ||
278 | <property name="visible">True</property> | ||
279 | <property name="can_focus">False</property> | ||
280 | <property name="layout_style">end</property> | ||
281 | <child> | ||
282 | <object class="GtkButton" id="GNUNET_GTK_publish_file_dialog_cancel_button"> | ||
283 | <property name="label">gtk-cancel</property> | ||
284 | <property name="use_action_appearance">False</property> | ||
285 | <property name="visible">True</property> | ||
286 | <property name="sensitive">False</property> | ||
287 | <property name="can_focus">True</property> | ||
288 | <property name="receives_default">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"/> | ||
292 | </object> | ||
293 | <packing> | ||
294 | <property name="expand">False</property> | ||
295 | <property name="fill">False</property> | ||
296 | <property name="position">0</property> | ||
297 | </packing> | ||
298 | </child> | ||
299 | <child> | ||
300 | <object class="GtkButton" id="GNUNET_GTK_publish_file_dialog_ok_button"> | ||
301 | <property name="label">gtk-ok</property> | ||
302 | <property name="use_action_appearance">False</property> | ||
303 | <property name="visible">True</property> | ||
304 | <property name="can_focus">True</property> | ||
305 | <property name="can_default">True</property> | ||
306 | <property name="receives_default">True</property> | ||
307 | <property name="use_stock">True</property> | ||
308 | </object> | ||
309 | <packing> | ||
310 | <property name="expand">False</property> | ||
311 | <property name="fill">False</property> | ||
312 | <property name="position">1</property> | ||
313 | </packing> | ||
314 | </child> | ||
315 | </object> | ||
316 | <packing> | ||
317 | <property name="expand">False</property> | ||
318 | <property name="fill">True</property> | ||
319 | <property name="pack_type">end</property> | ||
320 | <property name="position">0</property> | ||
321 | </packing> | ||
322 | </child> | ||
323 | <child> | ||
324 | <object class="GtkVBox" id="vbox1"> | ||
325 | <property name="visible">True</property> | ||
326 | <property name="can_focus">False</property> | ||
327 | <child> | ||
328 | <object class="GtkHBox" id="hbox2"> | ||
329 | <property name="visible">True</property> | ||
330 | <property name="can_focus">False</property> | ||
331 | <child> | ||
332 | <object class="GtkCheckButton" id="GNUNET_GTK_publish_file_dialog_do_index_checkbutton"> | ||
333 | <property name="label" translatable="yes">Index file</property> | ||
334 | <property name="use_action_appearance">False</property> | ||
335 | <property name="visible">True</property> | ||
336 | <property name="can_focus">True</property> | ||
337 | <property name="receives_default">False</property> | ||
338 | <property name="use_underline">True</property> | ||
339 | <property name="active">True</property> | ||
340 | <property name="draw_indicator">True</property> | ||
341 | </object> | ||
342 | <packing> | ||
343 | <property name="expand">False</property> | ||
344 | <property name="fill">False</property> | ||
345 | <property name="padding">20</property> | ||
346 | <property name="position">0</property> | ||
347 | </packing> | ||
348 | </child> | ||
349 | <child> | ||
350 | <placeholder/> | ||
351 | </child> | ||
352 | <child> | ||
353 | <object class="GtkLabel" id="GNUNET_GTK_publish_file_dialog_priority_label"> | ||
354 | <property name="visible">True</property> | ||
355 | <property name="can_focus">False</property> | ||
356 | <property name="label" translatable="yes">Priority:</property> | ||
357 | </object> | ||
358 | <packing> | ||
359 | <property name="expand">False</property> | ||
360 | <property name="fill">True</property> | ||
361 | <property name="padding">13</property> | ||
362 | <property name="position">2</property> | ||
363 | </packing> | ||
364 | </child> | ||
365 | <child> | ||
366 | <object class="GtkSpinButton" id="GNUNET_GTK_publish_file_dialog_priority_spin_button"> | ||
367 | <property name="visible">True</property> | ||
368 | <property name="can_focus">True</property> | ||
369 | <property name="invisible_char">•</property> | ||
370 | <property name="invisible_char_set">True</property> | ||
371 | <property name="primary_icon_activatable">False</property> | ||
372 | <property name="secondary_icon_activatable">False</property> | ||
373 | <property name="primary_icon_sensitive">True</property> | ||
374 | <property name="secondary_icon_sensitive">True</property> | ||
375 | <property name="adjustment">priority_adjustment</property> | ||
376 | <property name="numeric">True</property> | ||
377 | </object> | ||
378 | <packing> | ||
379 | <property name="expand">False</property> | ||
380 | <property name="fill">True</property> | ||
381 | <property name="padding">20</property> | ||
382 | <property name="position">3</property> | ||
383 | </packing> | ||
384 | </child> | ||
385 | </object> | ||
386 | <packing> | ||
387 | <property name="expand">False</property> | ||
388 | <property name="fill">False</property> | ||
389 | <property name="position">0</property> | ||
390 | </packing> | ||
391 | </child> | ||
392 | <child> | ||
393 | <object class="GtkHBox" id="hbox5"> | ||
394 | <property name="visible">True</property> | ||
395 | <property name="can_focus">False</property> | ||
396 | <child> | ||
397 | <object class="GtkLabel" id="GNUNET_GTK_publish_file_dialog_expiration_label"> | ||
398 | <property name="visible">True</property> | ||
399 | <property name="can_focus">False</property> | ||
400 | <property name="label" translatable="yes">Expiration year:</property> | ||
401 | </object> | ||
402 | <packing> | ||
403 | <property name="expand">False</property> | ||
404 | <property name="fill">False</property> | ||
405 | <property name="padding">20</property> | ||
406 | <property name="position">0</property> | ||
407 | </packing> | ||
408 | </child> | ||
409 | <child> | ||
410 | <object class="GtkSpinButton" id="GNUNET_GTK_publish_file_dialog_expiration_year_spin_button"> | ||
411 | <property name="visible">True</property> | ||
412 | <property name="can_focus">True</property> | ||
413 | <property name="invisible_char">•</property> | ||
414 | <property name="invisible_char_set">True</property> | ||
415 | <property name="primary_icon_activatable">False</property> | ||
416 | <property name="secondary_icon_activatable">False</property> | ||
417 | <property name="primary_icon_sensitive">True</property> | ||
418 | <property name="secondary_icon_sensitive">True</property> | ||
419 | <property name="adjustment">expiration_year_adjustment</property> | ||
420 | <property name="numeric">True</property> | ||
421 | </object> | ||
422 | <packing> | ||
423 | <property name="expand">False</property> | ||
424 | <property name="fill">False</property> | ||
425 | <property name="position">1</property> | ||
426 | </packing> | ||
427 | </child> | ||
428 | <child> | ||
429 | <object class="GtkLabel" id="GNUNET_GTK_publish_file_dialog_anonymity_label"> | ||
430 | <property name="visible">True</property> | ||
431 | <property name="can_focus">False</property> | ||
432 | <property name="label" translatable="yes">Anonymity:</property> | ||
433 | </object> | ||
434 | <packing> | ||
435 | <property name="expand">False</property> | ||
436 | <property name="fill">True</property> | ||
437 | <property name="padding">5</property> | ||
438 | <property name="position">2</property> | ||
439 | </packing> | ||
440 | </child> | ||
441 | <child> | ||
442 | <object class="GtkAlignment" id="GNUNET_GTK_publish_file_dialog_anonymity_combobox_alignment"> | ||
443 | <property name="visible">True</property> | ||
444 | <property name="can_focus">False</property> | ||
445 | <property name="yscale">0</property> | ||
446 | <child> | ||
447 | <object class="GtkComboBox" id="GNUNET_GTK_publish_file_dialog_anonymity_combobox"> | ||
448 | <property name="visible">True</property> | ||
449 | <property name="can_focus">False</property> | ||
450 | <property name="model">main_window_search_anonymity_liststore</property> | ||
451 | <property name="active">1</property> | ||
452 | <child> | ||
453 | <object class="GtkCellRendererText" id="GNUNET_GTK_publish_file_dialog_anonymity_combobox_renderer"/> | ||
454 | <attributes> | ||
455 | <attribute name="foreground">2</attribute> | ||
456 | <attribute name="text">0</attribute> | ||
457 | </attributes> | ||
458 | </child> | ||
459 | <child> | ||
460 | <object class="GtkCellRendererText" id="GNUNET_GTK_publish_file_dialog_anonymity_combobox_renerer_level"/> | ||
461 | <attributes> | ||
462 | <attribute name="text">1</attribute> | ||
463 | </attributes> | ||
464 | </child> | ||
465 | </object> | ||
466 | </child> | ||
467 | </object> | ||
468 | <packing> | ||
469 | <property name="expand">False</property> | ||
470 | <property name="fill">False</property> | ||
471 | <property name="position">3</property> | ||
472 | </packing> | ||
473 | </child> | ||
474 | </object> | ||
475 | <packing> | ||
476 | <property name="expand">False</property> | ||
477 | <property name="fill">True</property> | ||
478 | <property name="position">1</property> | ||
479 | </packing> | ||
480 | </child> | ||
481 | <child> | ||
482 | <object class="GtkHBox" id="hbox11"> | ||
483 | <property name="visible">True</property> | ||
484 | <property name="can_focus">False</property> | ||
485 | <child> | ||
486 | <object class="GtkLabel" id="GNUNET_GTK_publish_file_dialog_replication_label"> | ||
487 | <property name="visible">True</property> | ||
488 | <property name="can_focus">False</property> | ||
489 | <property name="label" translatable="yes">_Replication:</property> | ||
490 | <property name="use_underline">True</property> | ||
491 | </object> | ||
492 | <packing> | ||
493 | <property name="expand">False</property> | ||
494 | <property name="fill">True</property> | ||
495 | <property name="padding">20</property> | ||
496 | <property name="position">0</property> | ||
497 | </packing> | ||
498 | </child> | ||
499 | <child> | ||
500 | <object class="GtkSpinButton" id="GNUNET_GTK_publish_file_dialog_replication_spin_button"> | ||
501 | <property name="visible">True</property> | ||
502 | <property name="can_focus">True</property> | ||
503 | <property name="invisible_char">●</property> | ||
504 | <property name="primary_icon_activatable">False</property> | ||
505 | <property name="secondary_icon_activatable">False</property> | ||
506 | <property name="primary_icon_sensitive">True</property> | ||
507 | <property name="secondary_icon_sensitive">True</property> | ||
508 | <property name="adjustment">replication_adjustment</property> | ||
509 | <property name="numeric">True</property> | ||
510 | </object> | ||
511 | <packing> | ||
512 | <property name="expand">False</property> | ||
513 | <property name="fill">True</property> | ||
514 | <property name="padding">1</property> | ||
515 | <property name="position">1</property> | ||
516 | </packing> | ||
517 | </child> | ||
518 | <child> | ||
519 | <placeholder/> | ||
520 | </child> | ||
521 | <child> | ||
522 | <placeholder/> | ||
523 | </child> | ||
524 | </object> | ||
525 | <packing> | ||
526 | <property name="expand">False</property> | ||
527 | <property name="fill">True</property> | ||
528 | <property name="position">2</property> | ||
529 | </packing> | ||
530 | </child> | ||
531 | </object> | ||
532 | <packing> | ||
533 | <property name="expand">False</property> | ||
534 | <property name="fill">False</property> | ||
535 | <property name="position">2</property> | ||
536 | </packing> | ||
537 | </child> | ||
538 | </object> | ||
539 | </child> | ||
540 | <action-widgets> | ||
541 | <action-widget response="-6">GNUNET_GTK_publish_file_dialog_cancel_button</action-widget> | ||
542 | <action-widget response="-5">GNUNET_GTK_publish_file_dialog_ok_button</action-widget> | ||
543 | </action-widgets> | ||
544 | </object> | ||
545 | <object class="GtkListStore" id="GNUNET_GTK_publish_file_dialog_expiration_list_store"> | ||
546 | <columns> | ||
547 | <!-- column-name human_readable_time --> | ||
548 | <column type="gchararray"/> | ||
549 | <!-- column-name time_in_ms --> | ||
550 | <column type="guint64"/> | ||
551 | </columns> | ||
552 | </object> | ||
553 | <object class="GtkListStore" id="GNUNET_GTK_select_pseudonym_liststore"> | 257 | <object class="GtkListStore" id="GNUNET_GTK_select_pseudonym_liststore"> |
554 | <columns> | 258 | <columns> |
555 | <!-- column-name namespace_name --> | 259 | <!-- column-name namespace_name --> |
diff --git a/contrib/gnunet_fs_gtk_publish_file_dialog.glade b/contrib/gnunet_fs_gtk_publish_file_dialog.glade index 0d67aa11..14857449 100644 --- a/contrib/gnunet_fs_gtk_publish_file_dialog.glade +++ b/contrib/gnunet_fs_gtk_publish_file_dialog.glade | |||
@@ -1,72 +1,35 @@ | |||
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 --> |
5 | <object class="GtkFileChooserDialog" id="GNUNET_GTK_publish_file_dialog"> | 5 | <object class="GtkFileChooserDialog" id="GNUNET_GTK_publish_file_dialog"> |
6 | <property name="can_focus">False</property> | ||
6 | <property name="can_default">True</property> | 7 | <property name="can_default">True</property> |
7 | <property name="border_width">5</property> | 8 | <property name="border_width">5</property> |
8 | <property name="title" translatable="yes">Publish file...</property> | 9 | <property name="title" translatable="yes">Publish file...</property> |
10 | <property name="modal">True</property> | ||
11 | <property name="destroy_with_parent">True</property> | ||
9 | <property name="type_hint">normal</property> | 12 | <property name="type_hint">normal</property> |
10 | <property name="has_separator">False</property> | ||
11 | <property name="select_multiple">True</property> | ||
12 | <property name="create_folders">False</property> | 13 | <property name="create_folders">False</property> |
14 | <property name="select_multiple">True</property> | ||
13 | <child internal-child="vbox"> | 15 | <child internal-child="vbox"> |
14 | <object class="GtkVBox" id="dialog-vbox1"> | 16 | <object class="GtkVBox" id="dialog-vbox1"> |
15 | <property name="visible">True</property> | 17 | <property name="visible">True</property> |
16 | <property name="orientation">vertical</property> | 18 | <property name="can_focus">False</property> |
17 | <property name="spacing">2</property> | 19 | <property name="spacing">2</property> |
18 | <child> | 20 | <child internal-child="action_area"> |
19 | <object class="GtkVBox" id="vbox1"> | 21 | <object class="GtkHButtonBox" id="dialog-action_area2"> |
20 | <property name="visible">True</property> | 22 | <property name="visible">True</property> |
21 | <property name="orientation">vertical</property> | 23 | <property name="can_focus">False</property> |
24 | <property name="layout_style">end</property> | ||
22 | <child> | 25 | <child> |
23 | <object class="GtkHBox" id="hbox1"> | 26 | <object class="GtkButton" id="GNUNET_GTK_publish_file_dialog_cancel_button"> |
27 | <property name="label">gtk-cancel</property> | ||
28 | <property name="use_action_appearance">False</property> | ||
24 | <property name="visible">True</property> | 29 | <property name="visible">True</property> |
25 | <child> | 30 | <property name="can_focus">True</property> |
26 | <object class="GtkCheckButton" id="GNUNET_GTK_publish_file_dialog_do_index_checkbutton"> | 31 | <property name="receives_default">True</property> |
27 | <property name="label" translatable="yes">Index file</property> | 32 | <property name="use_stock">True</property> |
28 | <property name="visible">True</property> | ||
29 | <property name="can_focus">True</property> | ||
30 | <property name="receives_default">False</property> | ||
31 | <property name="use_underline">True</property> | ||
32 | <property name="active">True</property> | ||
33 | <property name="draw_indicator">True</property> | ||
34 | </object> | ||
35 | <packing> | ||
36 | <property name="expand">False</property> | ||
37 | <property name="fill">False</property> | ||
38 | <property name="padding">20</property> | ||
39 | <property name="position">0</property> | ||
40 | </packing> | ||
41 | </child> | ||
42 | <child> | ||
43 | <placeholder/> | ||
44 | </child> | ||
45 | <child> | ||
46 | <object class="GtkLabel" id="GNUNET_GTK_publish_file_dialog_priority_label"> | ||
47 | <property name="visible">True</property> | ||
48 | <property name="label" translatable="yes">Priority:</property> | ||
49 | </object> | ||
50 | <packing> | ||
51 | <property name="expand">False</property> | ||
52 | <property name="padding">13</property> | ||
53 | <property name="position">2</property> | ||
54 | </packing> | ||
55 | </child> | ||
56 | <child> | ||
57 | <object class="GtkSpinButton" id="GNUNET_GTK_publish_file_dialog_priority_spin_button"> | ||
58 | <property name="visible">True</property> | ||
59 | <property name="can_focus">True</property> | ||
60 | <property name="invisible_char">•</property> | ||
61 | <property name="adjustment">priority_adjustment</property> | ||
62 | <property name="numeric">True</property> | ||
63 | </object> | ||
64 | <packing> | ||
65 | <property name="expand">False</property> | ||
66 | <property name="padding">20</property> | ||
67 | <property name="position">3</property> | ||
68 | </packing> | ||
69 | </child> | ||
70 | </object> | 33 | </object> |
71 | <packing> | 34 | <packing> |
72 | <property name="expand">False</property> | 35 | <property name="expand">False</property> |
@@ -75,150 +38,219 @@ | |||
75 | </packing> | 38 | </packing> |
76 | </child> | 39 | </child> |
77 | <child> | 40 | <child> |
78 | <object class="GtkHBox" id="hbox2"> | 41 | <object class="GtkButton" id="GNUNET_GTK_publish_file_dialog_ok_button"> |
42 | <property name="label">gtk-ok</property> | ||
43 | <property name="use_action_appearance">False</property> | ||
79 | <property name="visible">True</property> | 44 | <property name="visible">True</property> |
80 | <child> | 45 | <property name="can_focus">True</property> |
81 | <object class="GtkLabel" id="GNUNET_GTK_publish_file_dialog_expiration_label"> | 46 | <property name="can_default">True</property> |
82 | <property name="visible">True</property> | 47 | <property name="receives_default">True</property> |
83 | <property name="label" translatable="yes">Expiration year:</property> | 48 | <property name="use_stock">True</property> |
84 | </object> | ||
85 | <packing> | ||
86 | <property name="expand">False</property> | ||
87 | <property name="fill">False</property> | ||
88 | <property name="padding">20</property> | ||
89 | <property name="position">0</property> | ||
90 | </packing> | ||
91 | </child> | ||
92 | <child> | ||
93 | <object class="GtkSpinButton" id="GNUNET_GTK_publish_file_dialog_expiration_year_spin_button"> | ||
94 | <property name="visible">True</property> | ||
95 | <property name="can_focus">True</property> | ||
96 | <property name="invisible_char">•</property> | ||
97 | <property name="adjustment">expiration_year_adjustment</property> | ||
98 | <property name="numeric">True</property> | ||
99 | </object> | ||
100 | <packing> | ||
101 | <property name="expand">False</property> | ||
102 | <property name="fill">False</property> | ||
103 | <property name="position">1</property> | ||
104 | </packing> | ||
105 | </child> | ||
106 | <child> | ||
107 | <object class="GtkLabel" id="GNUNET_GTK_publish_file_dialog_anonymity_label"> | ||
108 | <property name="visible">True</property> | ||
109 | <property name="label" translatable="yes">Anonymity:</property> | ||
110 | </object> | ||
111 | <packing> | ||
112 | <property name="expand">False</property> | ||
113 | <property name="padding">5</property> | ||
114 | <property name="position">2</property> | ||
115 | </packing> | ||
116 | </child> | ||
117 | <child> | ||
118 | <object class="GtkSpinButton" id="GNUNET_GTK_publish_file_dialog_anonymity_spin_button"> | ||
119 | <property name="visible">True</property> | ||
120 | <property name="can_focus">True</property> | ||
121 | <property name="invisible_char">•</property> | ||
122 | <property name="adjustment">anonymity_adjustment</property> | ||
123 | <property name="numeric">True</property> | ||
124 | <signal name="value_changed" handler="GNUNET_GTK_anonymity_spin_button_value_changed_cb"/> | ||
125 | </object> | ||
126 | <packing> | ||
127 | <property name="expand">False</property> | ||
128 | <property name="padding">20</property> | ||
129 | <property name="position">3</property> | ||
130 | </packing> | ||
131 | </child> | ||
132 | </object> | 49 | </object> |
133 | <packing> | 50 | <packing> |
134 | <property name="expand">False</property> | 51 | <property name="expand">False</property> |
52 | <property name="fill">False</property> | ||
135 | <property name="position">1</property> | 53 | <property name="position">1</property> |
136 | </packing> | 54 | </packing> |
137 | </child> | 55 | </child> |
56 | </object> | ||
57 | <packing> | ||
58 | <property name="expand">False</property> | ||
59 | <property name="fill">True</property> | ||
60 | <property name="pack_type">end</property> | ||
61 | <property name="position">0</property> | ||
62 | </packing> | ||
63 | </child> | ||
64 | <child> | ||
65 | <object class="GtkHBox" id="hbox1"> | ||
66 | <property name="visible">True</property> | ||
67 | <property name="can_focus">False</property> | ||
138 | <child> | 68 | <child> |
139 | <object class="GtkHBox" id="hbox3"> | 69 | <object class="GtkCheckButton" id="GNUNET_GTK_publish_file_dialog_do_index_checkbutton"> |
70 | <property name="label" translatable="yes">Index file</property> | ||
71 | <property name="use_action_appearance">False</property> | ||
140 | <property name="visible">True</property> | 72 | <property name="visible">True</property> |
141 | <child> | 73 | <property name="can_focus">True</property> |
142 | <object class="GtkLabel" id="GNUNET_GTK_publish_file_dialog_replication_label"> | 74 | <property name="receives_default">False</property> |
143 | <property name="visible">True</property> | 75 | <property name="use_underline">True</property> |
144 | <property name="label" translatable="yes">_Replication:</property> | 76 | <property name="active">True</property> |
145 | <property name="use_underline">True</property> | 77 | <property name="draw_indicator">True</property> |
146 | </object> | ||
147 | <packing> | ||
148 | <property name="expand">False</property> | ||
149 | <property name="padding">20</property> | ||
150 | <property name="position">0</property> | ||
151 | </packing> | ||
152 | </child> | ||
153 | <child> | ||
154 | <object class="GtkSpinButton" id="GNUNET_GTK_publish_file_dialog_replication_spin_button"> | ||
155 | <property name="visible">True</property> | ||
156 | <property name="can_focus">True</property> | ||
157 | <property name="invisible_char">●</property> | ||
158 | <property name="adjustment">replication_adjustment</property> | ||
159 | <property name="numeric">True</property> | ||
160 | </object> | ||
161 | <packing> | ||
162 | <property name="expand">False</property> | ||
163 | <property name="padding">1</property> | ||
164 | <property name="position">1</property> | ||
165 | </packing> | ||
166 | </child> | ||
167 | <child> | ||
168 | <placeholder/> | ||
169 | </child> | ||
170 | <child> | ||
171 | <placeholder/> | ||
172 | </child> | ||
173 | </object> | 78 | </object> |
174 | <packing> | 79 | <packing> |
175 | <property name="expand">False</property> | 80 | <property name="expand">False</property> |
176 | <property name="position">2</property> | 81 | <property name="fill">False</property> |
82 | <property name="padding">20</property> | ||
83 | <property name="pack_type">end</property> | ||
84 | <property name="position">0</property> | ||
177 | </packing> | 85 | </packing> |
178 | </child> | 86 | </child> |
87 | <child> | ||
88 | <placeholder/> | ||
89 | </child> | ||
179 | </object> | 90 | </object> |
180 | <packing> | 91 | <packing> |
181 | <property name="position">2</property> | 92 | <property name="expand">False</property> |
93 | <property name="fill">False</property> | ||
94 | <property name="pack_type">end</property> | ||
95 | <property name="position">1</property> | ||
182 | </packing> | 96 | </packing> |
183 | </child> | 97 | </child> |
184 | <child internal-child="action_area"> | 98 | <child> |
185 | <object class="GtkHButtonBox" id="dialog-action_area2"> | 99 | <object class="GtkTable" id="table1"> |
186 | <property name="visible">True</property> | 100 | <property name="visible">True</property> |
187 | <property name="layout_style">end</property> | 101 | <property name="can_focus">False</property> |
102 | <property name="n_rows">2</property> | ||
103 | <property name="n_columns">4</property> | ||
104 | <property name="column_spacing">4</property> | ||
105 | <property name="row_spacing">3</property> | ||
188 | <child> | 106 | <child> |
189 | <object class="GtkButton" id="GNUNET_GTK_publish_file_dialog_cancel_button"> | 107 | <object class="GtkAlignment" id="GNUNET_GTK_publish_file_dialog_anonymity_combobox_alignment"> |
190 | <property name="label">gtk-cancel</property> | 108 | <property name="visible">True</property> |
109 | <property name="can_focus">False</property> | ||
110 | <property name="yscale">0</property> | ||
111 | <child> | ||
112 | <object class="GtkComboBox" id="GNUNET_GTK_publish_file_dialog_anonymity_combobox"> | ||
113 | <property name="visible">True</property> | ||
114 | <property name="can_focus">False</property> | ||
115 | <property name="active">1</property> | ||
116 | <child> | ||
117 | <object class="GtkCellRendererText" id="GNUNET_GTK_publish_file_dialog_anonymity_combobox_renderer"/> | ||
118 | <attributes> | ||
119 | <attribute name="foreground">2</attribute> | ||
120 | <attribute name="text">0</attribute> | ||
121 | </attributes> | ||
122 | </child> | ||
123 | <child> | ||
124 | <object class="GtkCellRendererText" id="GNUNET_GTK_publish_file_dialog_anonymity_combobox_renerer_level"/> | ||
125 | <attributes> | ||
126 | <attribute name="text">1</attribute> | ||
127 | </attributes> | ||
128 | </child> | ||
129 | </object> | ||
130 | </child> | ||
131 | </object> | ||
132 | <packing> | ||
133 | <property name="left_attach">3</property> | ||
134 | <property name="right_attach">4</property> | ||
135 | <property name="top_attach">1</property> | ||
136 | <property name="bottom_attach">2</property> | ||
137 | </packing> | ||
138 | </child> | ||
139 | <child> | ||
140 | <object class="GtkLabel" id="GNUNET_GTK_publish_file_dialog_anonymity_label"> | ||
141 | <property name="visible">True</property> | ||
142 | <property name="can_focus">False</property> | ||
143 | <property name="label" translatable="yes">Anonymity:</property> | ||
144 | </object> | ||
145 | <packing> | ||
146 | <property name="left_attach">2</property> | ||
147 | <property name="right_attach">3</property> | ||
148 | <property name="top_attach">1</property> | ||
149 | <property name="bottom_attach">2</property> | ||
150 | <property name="x_options"></property> | ||
151 | <property name="y_options"></property> | ||
152 | </packing> | ||
153 | </child> | ||
154 | <child> | ||
155 | <object class="GtkLabel" id="GNUNET_GTK_publish_file_dialog_priority_label"> | ||
156 | <property name="visible">True</property> | ||
157 | <property name="can_focus">False</property> | ||
158 | <property name="label" translatable="yes">Priority:</property> | ||
159 | </object> | ||
160 | <packing> | ||
161 | <property name="left_attach">2</property> | ||
162 | <property name="right_attach">3</property> | ||
163 | <property name="x_options"></property> | ||
164 | <property name="y_options"></property> | ||
165 | </packing> | ||
166 | </child> | ||
167 | <child> | ||
168 | <object class="GtkSpinButton" id="GNUNET_GTK_publish_file_dialog_priority_spin_button"> | ||
191 | <property name="visible">True</property> | 169 | <property name="visible">True</property> |
192 | <property name="can_focus">True</property> | 170 | <property name="can_focus">True</property> |
193 | <property name="receives_default">True</property> | 171 | <property name="invisible_char">•</property> |
194 | <property name="use_stock">True</property> | 172 | <property name="invisible_char_set">True</property> |
173 | <property name="primary_icon_activatable">False</property> | ||
174 | <property name="secondary_icon_activatable">False</property> | ||
175 | <property name="primary_icon_sensitive">True</property> | ||
176 | <property name="secondary_icon_sensitive">True</property> | ||
177 | <property name="adjustment">priority_adjustment</property> | ||
178 | <property name="numeric">True</property> | ||
195 | </object> | 179 | </object> |
196 | <packing> | 180 | <packing> |
197 | <property name="expand">False</property> | 181 | <property name="left_attach">3</property> |
198 | <property name="fill">False</property> | 182 | <property name="right_attach">4</property> |
199 | <property name="position">0</property> | ||
200 | </packing> | 183 | </packing> |
201 | </child> | 184 | </child> |
202 | <child> | 185 | <child> |
203 | <object class="GtkButton" id="GNUNET_GTK_publish_file_dialog_ok_button"> | 186 | <object class="GtkLabel" id="GNUNET_GTK_publish_file_dialog_expiration_label"> |
204 | <property name="label">gtk-ok</property> | 187 | <property name="visible">True</property> |
188 | <property name="can_focus">False</property> | ||
189 | <property name="label" translatable="yes">Expiration year:</property> | ||
190 | </object> | ||
191 | <packing> | ||
192 | <property name="x_options"></property> | ||
193 | <property name="y_options"></property> | ||
194 | </packing> | ||
195 | </child> | ||
196 | <child> | ||
197 | <object class="GtkSpinButton" id="GNUNET_GTK_publish_file_dialog_expiration_year_spin_button"> | ||
205 | <property name="visible">True</property> | 198 | <property name="visible">True</property> |
206 | <property name="can_focus">True</property> | 199 | <property name="can_focus">True</property> |
207 | <property name="can_default">True</property> | 200 | <property name="invisible_char">•</property> |
208 | <property name="receives_default">True</property> | 201 | <property name="invisible_char_set">True</property> |
209 | <property name="use_stock">True</property> | 202 | <property name="primary_icon_activatable">False</property> |
203 | <property name="secondary_icon_activatable">False</property> | ||
204 | <property name="primary_icon_sensitive">True</property> | ||
205 | <property name="secondary_icon_sensitive">True</property> | ||
206 | <property name="adjustment">expiration_year_adjustment</property> | ||
207 | <property name="numeric">True</property> | ||
210 | </object> | 208 | </object> |
211 | <packing> | 209 | <packing> |
212 | <property name="expand">False</property> | 210 | <property name="left_attach">1</property> |
213 | <property name="fill">False</property> | 211 | <property name="right_attach">2</property> |
214 | <property name="position">1</property> | 212 | </packing> |
213 | </child> | ||
214 | <child> | ||
215 | <object class="GtkLabel" id="GNUNET_GTK_publish_file_dialog_replication_label"> | ||
216 | <property name="visible">True</property> | ||
217 | <property name="can_focus">False</property> | ||
218 | <property name="label" translatable="yes">_Replication:</property> | ||
219 | <property name="use_underline">True</property> | ||
220 | </object> | ||
221 | <packing> | ||
222 | <property name="top_attach">1</property> | ||
223 | <property name="bottom_attach">2</property> | ||
224 | <property name="x_options"></property> | ||
225 | <property name="y_options"></property> | ||
226 | </packing> | ||
227 | </child> | ||
228 | <child> | ||
229 | <object class="GtkSpinButton" id="GNUNET_GTK_publish_file_dialog_replication_spin_button"> | ||
230 | <property name="visible">True</property> | ||
231 | <property name="can_focus">True</property> | ||
232 | <property name="invisible_char">●</property> | ||
233 | <property name="invisible_char_set">True</property> | ||
234 | <property name="primary_icon_activatable">False</property> | ||
235 | <property name="secondary_icon_activatable">False</property> | ||
236 | <property name="primary_icon_sensitive">True</property> | ||
237 | <property name="secondary_icon_sensitive">True</property> | ||
238 | <property name="adjustment">replication_adjustment</property> | ||
239 | <property name="numeric">True</property> | ||
240 | </object> | ||
241 | <packing> | ||
242 | <property name="left_attach">1</property> | ||
243 | <property name="right_attach">2</property> | ||
244 | <property name="top_attach">1</property> | ||
245 | <property name="bottom_attach">2</property> | ||
215 | </packing> | 246 | </packing> |
216 | </child> | 247 | </child> |
217 | </object> | 248 | </object> |
218 | <packing> | 249 | <packing> |
219 | <property name="expand">False</property> | 250 | <property name="expand">False</property> |
251 | <property name="fill">False</property> | ||
220 | <property name="pack_type">end</property> | 252 | <property name="pack_type">end</property> |
221 | <property name="position">0</property> | 253 | <property name="position">2</property> |
222 | </packing> | 254 | </packing> |
223 | </child> | 255 | </child> |
224 | </object> | 256 | </object> |
@@ -228,12 +260,6 @@ | |||
228 | <action-widget response="-5">GNUNET_GTK_publish_file_dialog_ok_button</action-widget> | 260 | <action-widget response="-5">GNUNET_GTK_publish_file_dialog_ok_button</action-widget> |
229 | </action-widgets> | 261 | </action-widgets> |
230 | </object> | 262 | </object> |
231 | <object class="GtkAdjustment" id="priority_adjustment"> | ||
232 | <property name="value">1000</property> | ||
233 | <property name="upper">100000000</property> | ||
234 | <property name="step_increment">1</property> | ||
235 | <property name="page_increment">10</property> | ||
236 | </object> | ||
237 | <object class="GtkListStore" id="GNUNET_GTK_publish_file_dialog_expiration_list_store"> | 263 | <object class="GtkListStore" id="GNUNET_GTK_publish_file_dialog_expiration_list_store"> |
238 | <columns> | 264 | <columns> |
239 | <!-- column-name human_readable_time --> | 265 | <!-- column-name human_readable_time --> |
@@ -243,8 +269,8 @@ | |||
243 | </columns> | 269 | </columns> |
244 | </object> | 270 | </object> |
245 | <object class="GtkAdjustment" id="anonymity_adjustment"> | 271 | <object class="GtkAdjustment" id="anonymity_adjustment"> |
246 | <property name="value">1</property> | ||
247 | <property name="upper">10000000</property> | 272 | <property name="upper">10000000</property> |
273 | <property name="value">1</property> | ||
248 | <property name="step_increment">1</property> | 274 | <property name="step_increment">1</property> |
249 | <property name="page_increment">10</property> | 275 | <property name="page_increment">10</property> |
250 | </object> | 276 | </object> |
@@ -253,6 +279,12 @@ | |||
253 | <property name="step_increment">1</property> | 279 | <property name="step_increment">1</property> |
254 | <property name="page_increment">10</property> | 280 | <property name="page_increment">10</property> |
255 | </object> | 281 | </object> |
282 | <object class="GtkAdjustment" id="priority_adjustment"> | ||
283 | <property name="upper">100000000</property> | ||
284 | <property name="value">1000</property> | ||
285 | <property name="step_increment">1</property> | ||
286 | <property name="page_increment">10</property> | ||
287 | </object> | ||
256 | <object class="GtkAdjustment" id="replication_adjustment"> | 288 | <object class="GtkAdjustment" id="replication_adjustment"> |
257 | <property name="upper">99999</property> | 289 | <property name="upper">99999</property> |
258 | <property name="step_increment">1</property> | 290 | <property name="step_increment">1</property> |
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 da3d6c4d..6791e61b 100644 --- a/src/fs/gnunet-fs-gtk-main_window_file_publish.c +++ b/src/fs/gnunet-fs-gtk-main_window_file_publish.c | |||
@@ -51,6 +51,7 @@ struct MainPublishingDialogContext | |||
51 | 51 | ||
52 | gulong open_directory_handler_id; | 52 | gulong open_directory_handler_id; |
53 | GtkBuilder *open_directory_builder; | 53 | GtkBuilder *open_directory_builder; |
54 | GtkBuilder *open_file_builder; | ||
54 | gulong open_file_handler_id; | 55 | gulong open_file_handler_id; |
55 | }; | 56 | }; |
56 | 57 | ||
@@ -1150,12 +1151,22 @@ GNUNET_GTK_master_publish_dialog_add_button_clicked_cb (GtkWidget * dummy, | |||
1150 | { | 1151 | { |
1151 | GtkWidget *ad; | 1152 | GtkWidget *ad; |
1152 | 1153 | ||
1154 | GtkComboBox *combo; | ||
1155 | GtkTreeModel *anon_treemodel; | ||
1156 | |||
1157 | ctx->open_file_builder = GNUNET_GTK_get_new_builder ("gnunet_fs_gtk_publish_file_dialog.glade", ctx); | ||
1158 | GNUNET_FS_GTK_setup_expiration_year_adjustment (ctx->open_file_builder); | ||
1153 | ad = GTK_WIDGET (gtk_builder_get_object | 1159 | ad = GTK_WIDGET (gtk_builder_get_object |
1154 | (ctx->main_window_builder, "GNUNET_GTK_publish_file_dialog")); | 1160 | (ctx->open_file_builder, "GNUNET_GTK_publish_file_dialog")); |
1155 | GNUNET_FS_GTK_setup_expiration_year_adjustment (ctx->main_window_builder); | ||
1156 | 1161 | ||
1157 | ctx->open_file_handler_id = g_signal_connect (G_OBJECT (ad), "response", G_CALLBACK (GNUNET_GTK_publish_file_dialog_response_cb), ctx); | 1162 | ctx->open_file_handler_id = g_signal_connect (G_OBJECT (ad), "response", G_CALLBACK (GNUNET_GTK_publish_file_dialog_response_cb), ctx); |
1158 | 1163 | ||
1164 | anon_treemodel = GTK_TREE_MODEL (gtk_builder_get_object (ctx->main_window_builder, | ||
1165 | "main_window_search_anonymity_liststore")); | ||
1166 | combo = GTK_COMBO_BOX (gtk_builder_get_object (ctx->open_file_builder, | ||
1167 | "GNUNET_GTK_publish_file_dialog_anonymity_combobox")); | ||
1168 | gtk_combo_box_set_model (combo, anon_treemodel); | ||
1169 | |||
1159 | gtk_window_set_transient_for (GTK_WINDOW (ad), ctx->master_pubdialog); | 1170 | gtk_window_set_transient_for (GTK_WINDOW (ad), ctx->master_pubdialog); |
1160 | 1171 | ||
1161 | gtk_window_present (GTK_WINDOW (ad)); | 1172 | gtk_window_present (GTK_WINDOW (ad)); |
@@ -1709,41 +1720,39 @@ GNUNET_GTK_publish_file_dialog_response_cb (GtkDialog * dialog, | |||
1709 | GtkSpinButton *sb; | 1720 | GtkSpinButton *sb; |
1710 | GtkWidget *ad; | 1721 | GtkWidget *ad; |
1711 | 1722 | ||
1712 | GtkBuilder *builder = ctx->main_window_builder; | ||
1713 | |||
1714 | if (g_signal_handler_is_connected (G_OBJECT (dialog), ctx->open_file_handler_id)) | 1723 | if (g_signal_handler_is_connected (G_OBJECT (dialog), ctx->open_file_handler_id)) |
1715 | g_signal_handler_disconnect (G_OBJECT (dialog), ctx->open_file_handler_id); | 1724 | g_signal_handler_disconnect (G_OBJECT (dialog), ctx->open_file_handler_id); |
1716 | ctx->open_file_handler_id = 0; | 1725 | ctx->open_file_handler_id = 0; |
1717 | 1726 | ||
1718 | ad = GTK_WIDGET (gtk_builder_get_object | 1727 | ad = GTK_WIDGET (gtk_builder_get_object |
1719 | (builder, "GNUNET_GTK_publish_file_dialog")); | 1728 | (ctx->open_file_builder, "GNUNET_GTK_publish_file_dialog")); |
1720 | 1729 | ||
1721 | if (response_id == -5) | 1730 | if (response_id == -5) |
1722 | { | 1731 | { |
1723 | /* OK */ | 1732 | /* OK */ |
1724 | sb = GTK_SPIN_BUTTON (gtk_builder_get_object | 1733 | sb = GTK_SPIN_BUTTON (gtk_builder_get_object |
1725 | (builder, | 1734 | (ctx->open_file_builder, |
1726 | "GNUNET_GTK_publish_file_dialog_expiration_year_spin_button")); | 1735 | "GNUNET_GTK_publish_file_dialog_expiration_year_spin_button")); |
1727 | 1736 | ||
1728 | if (!GNUNET_GTK_get_selected_anonymity_level | 1737 | if (!GNUNET_GTK_get_selected_anonymity_level |
1729 | (builder, "GNUNET_GTK_publish_file_dialog_anonymity_combobox", | 1738 | (ctx->open_file_builder, "GNUNET_GTK_publish_file_dialog_anonymity_combobox", |
1730 | &bo.anonymity_level)) | 1739 | &bo.anonymity_level)) |
1731 | bo.anonymity_level = 1; | 1740 | bo.anonymity_level = 1; |
1732 | bo.content_priority = | 1741 | bo.content_priority = |
1733 | gtk_spin_button_get_value (GTK_SPIN_BUTTON | 1742 | gtk_spin_button_get_value (GTK_SPIN_BUTTON |
1734 | (gtk_builder_get_object | 1743 | (gtk_builder_get_object |
1735 | (builder, | 1744 | (ctx->open_file_builder, |
1736 | "GNUNET_GTK_publish_file_dialog_priority_spin_button"))); | 1745 | "GNUNET_GTK_publish_file_dialog_priority_spin_button"))); |
1737 | bo.expiration_time = GNUNET_FS_GTK_get_expiration_time (sb); | 1746 | bo.expiration_time = GNUNET_FS_GTK_get_expiration_time (sb); |
1738 | bo.replication_level = | 1747 | bo.replication_level = |
1739 | gtk_spin_button_get_value (GTK_SPIN_BUTTON | 1748 | gtk_spin_button_get_value (GTK_SPIN_BUTTON |
1740 | (gtk_builder_get_object | 1749 | (gtk_builder_get_object |
1741 | (builder, | 1750 | (ctx->open_file_builder, |
1742 | "GNUNET_GTK_publish_file_dialog_replication_spin_button"))); | 1751 | "GNUNET_GTK_publish_file_dialog_replication_spin_button"))); |
1743 | do_index = | 1752 | do_index = |
1744 | gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON | 1753 | gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON |
1745 | (gtk_builder_get_object | 1754 | (gtk_builder_get_object |
1746 | (builder, | 1755 | (ctx->open_file_builder, |
1747 | "GNUNET_GTK_publish_file_dialog_do_index_checkbutton"))); | 1756 | "GNUNET_GTK_publish_file_dialog_do_index_checkbutton"))); |
1748 | 1757 | ||
1749 | filename = GNUNET_GTK_filechooser_get_filename_utf8 (GTK_FILE_CHOOSER (ad)); | 1758 | filename = GNUNET_GTK_filechooser_get_filename_utf8 (GTK_FILE_CHOOSER (ad)); |
@@ -1755,7 +1764,7 @@ GNUNET_GTK_publish_file_dialog_response_cb (GtkDialog * dialog, | |||
1755 | { | 1764 | { |
1756 | /* Cancel/Escape/close/etc */ | 1765 | /* Cancel/Escape/close/etc */ |
1757 | } | 1766 | } |
1758 | gtk_widget_hide (ad); | 1767 | gtk_widget_destroy (ad); |
1759 | } | 1768 | } |
1760 | 1769 | ||
1761 | 1770 | ||