diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-02-03 12:36:41 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-02-03 12:36:41 +0000 |
commit | 15b40d9715f65f923c0bb4fd0762e61b1c007ce9 (patch) | |
tree | b9260be07a16e155639f5fb2dd2ac74921494da1 | |
parent | 44212493213c5baed2409fc1674f4b28c338a0aa (diff) | |
download | gnunet-gtk-15b40d9715f65f923c0bb4fd0762e61b1c007ce9.tar.gz gnunet-gtk-15b40d9715f65f923c0bb4fd0762e61b1c007ce9.zip |
-gladifying more signal handlers
-rw-r--r-- | contrib/gnunet_fs_gtk_publish_directory_dialog.glade | 112 | ||||
-rw-r--r-- | contrib/gnunet_fs_gtk_publish_file_dialog.glade | 179 | ||||
-rw-r--r-- | src/fs/gnunet-fs-gtk_publish-dialog.c | 73 |
3 files changed, 165 insertions, 199 deletions
diff --git a/contrib/gnunet_fs_gtk_publish_directory_dialog.glade b/contrib/gnunet_fs_gtk_publish_directory_dialog.glade index dea894f0..c07612b1 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" encoding="UTF-8"?> | 1 | <?xml version="1.0"?> |
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 --> |
@@ -19,7 +19,6 @@ | |||
19 | </object> | 19 | </object> |
20 | <object class="GtkFileFilter" id="gnunet_directory_filter"/> | 20 | <object class="GtkFileFilter" id="gnunet_directory_filter"/> |
21 | <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> | ||
23 | <property name="can_default">True</property> | 22 | <property name="can_default">True</property> |
24 | <property name="events">GDK_FOCUS_CHANGE_MASK | GDK_STRUCTURE_MASK</property> | 23 | <property name="events">GDK_FOCUS_CHANGE_MASK | GDK_STRUCTURE_MASK</property> |
25 | <property name="border_width">5</property> | 24 | <property name="border_width">5</property> |
@@ -35,65 +34,20 @@ | |||
35 | <property name="create_folders">False</property> | 34 | <property name="create_folders">False</property> |
36 | <property name="filter">gnunet_directory_filter</property> | 35 | <property name="filter">gnunet_directory_filter</property> |
37 | <property name="select_multiple">True</property> | 36 | <property name="select_multiple">True</property> |
37 | <signal name="response" handler="GNUNET_GTK_publish_directory_dialog_response_cb"/> | ||
38 | <child internal-child="vbox"> | 38 | <child internal-child="vbox"> |
39 | <object class="GtkVBox" id="dialog-vbox8"> | 39 | <object class="GtkVBox" id="dialog-vbox8"> |
40 | <property name="visible">True</property> | 40 | <property name="visible">True</property> |
41 | <property name="can_focus">False</property> | 41 | <property name="orientation">vertical</property> |
42 | <property name="spacing">2</property> | 42 | <property name="spacing">2</property> |
43 | <child internal-child="action_area"> | ||
44 | <object class="GtkHButtonBox" id="dialog-action_area9"> | ||
45 | <property name="visible">True</property> | ||
46 | <property name="can_focus">False</property> | ||
47 | <property name="layout_style">end</property> | ||
48 | <child> | ||
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> | ||
52 | <property name="visible">True</property> | ||
53 | <property name="can_focus">True</property> | ||
54 | <property name="receives_default">True</property> | ||
55 | <property name="use_stock">True</property> | ||
56 | </object> | ||
57 | <packing> | ||
58 | <property name="expand">False</property> | ||
59 | <property name="fill">False</property> | ||
60 | <property name="position">0</property> | ||
61 | </packing> | ||
62 | </child> | ||
63 | <child> | ||
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> | ||
67 | <property name="visible">True</property> | ||
68 | <property name="can_focus">True</property> | ||
69 | <property name="can_default">True</property> | ||
70 | <property name="receives_default">True</property> | ||
71 | <property name="use_stock">True</property> | ||
72 | </object> | ||
73 | <packing> | ||
74 | <property name="expand">False</property> | ||
75 | <property name="fill">False</property> | ||
76 | <property name="position">1</property> | ||
77 | </packing> | ||
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> | 43 | <child> |
88 | <object class="GtkTable" id="table1"> | 44 | <object class="GtkTable" id="table1"> |
89 | <property name="visible">True</property> | 45 | <property name="visible">True</property> |
90 | <property name="can_focus">False</property> | ||
91 | <property name="n_rows">2</property> | 46 | <property name="n_rows">2</property> |
92 | <property name="n_columns">4</property> | 47 | <property name="n_columns">4</property> |
93 | <child> | 48 | <child> |
94 | <object class="GtkLabel" id="GNUNET_GTK_publish_directory_dialog_priority_label"> | 49 | <object class="GtkLabel" id="GNUNET_GTK_publish_directory_dialog_priority_label"> |
95 | <property name="visible">True</property> | 50 | <property name="visible">True</property> |
96 | <property name="can_focus">False</property> | ||
97 | <property name="label" translatable="yes">Priority:</property> | 51 | <property name="label" translatable="yes">Priority:</property> |
98 | </object> | 52 | </object> |
99 | <packing> | 53 | <packing> |
@@ -107,10 +61,8 @@ | |||
107 | <object class="GtkSpinButton" id="GNUNET_GTK_publish_directory_dialog_priority_spin_button"> | 61 | <object class="GtkSpinButton" id="GNUNET_GTK_publish_directory_dialog_priority_spin_button"> |
108 | <property name="visible">True</property> | 62 | <property name="visible">True</property> |
109 | <property name="can_focus">True</property> | 63 | <property name="can_focus">True</property> |
110 | <property name="invisible_char">•</property> | 64 | <property name="invisible_char">•</property> |
111 | <property name="invisible_char_set">True</property> | 65 | <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> | 66 | <property name="primary_icon_sensitive">True</property> |
115 | <property name="secondary_icon_sensitive">True</property> | 67 | <property name="secondary_icon_sensitive">True</property> |
116 | <property name="adjustment">priority_adjustment</property> | 68 | <property name="adjustment">priority_adjustment</property> |
@@ -125,7 +77,6 @@ | |||
125 | <child> | 77 | <child> |
126 | <object class="GtkLabel" id="GNUNET_GTK_publish_directory_dialog_expiration_label"> | 78 | <object class="GtkLabel" id="GNUNET_GTK_publish_directory_dialog_expiration_label"> |
127 | <property name="visible">True</property> | 79 | <property name="visible">True</property> |
128 | <property name="can_focus">False</property> | ||
129 | <property name="label" translatable="yes">Expiration year:</property> | 80 | <property name="label" translatable="yes">Expiration year:</property> |
130 | </object> | 81 | </object> |
131 | <packing> | 82 | <packing> |
@@ -137,10 +88,8 @@ | |||
137 | <object class="GtkSpinButton" id="GNUNET_GTK_publish_directory_dialog_expiration_year_spin_button"> | 88 | <object class="GtkSpinButton" id="GNUNET_GTK_publish_directory_dialog_expiration_year_spin_button"> |
138 | <property name="visible">True</property> | 89 | <property name="visible">True</property> |
139 | <property name="can_focus">True</property> | 90 | <property name="can_focus">True</property> |
140 | <property name="invisible_char">•</property> | 91 | <property name="invisible_char">•</property> |
141 | <property name="invisible_char_set">True</property> | 92 | <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> | 93 | <property name="primary_icon_sensitive">True</property> |
145 | <property name="secondary_icon_sensitive">True</property> | 94 | <property name="secondary_icon_sensitive">True</property> |
146 | <property name="adjustment">expiration_year_adjustment</property> | 95 | <property name="adjustment">expiration_year_adjustment</property> |
@@ -154,7 +103,6 @@ | |||
154 | <child> | 103 | <child> |
155 | <object class="GtkLabel" id="GNUNET_GTK_publish_directory_dialog_anonymity_label"> | 104 | <object class="GtkLabel" id="GNUNET_GTK_publish_directory_dialog_anonymity_label"> |
156 | <property name="visible">True</property> | 105 | <property name="visible">True</property> |
157 | <property name="can_focus">False</property> | ||
158 | <property name="label" translatable="yes">Anonymity:</property> | 106 | <property name="label" translatable="yes">Anonymity:</property> |
159 | </object> | 107 | </object> |
160 | <packing> | 108 | <packing> |
@@ -167,7 +115,6 @@ | |||
167 | <child> | 115 | <child> |
168 | <object class="GtkLabel" id="GNUNET_GTK_publish_directory_dialog_replication_label"> | 116 | <object class="GtkLabel" id="GNUNET_GTK_publish_directory_dialog_replication_label"> |
169 | <property name="visible">True</property> | 117 | <property name="visible">True</property> |
170 | <property name="can_focus">False</property> | ||
171 | <property name="label" translatable="yes">_Replication:</property> | 118 | <property name="label" translatable="yes">_Replication:</property> |
172 | <property name="use_underline">True</property> | 119 | <property name="use_underline">True</property> |
173 | </object> | 120 | </object> |
@@ -184,10 +131,8 @@ | |||
184 | <object class="GtkSpinButton" id="GNUNET_GTK_publish_directory_dialog_replication_spin_button"> | 131 | <object class="GtkSpinButton" id="GNUNET_GTK_publish_directory_dialog_replication_spin_button"> |
185 | <property name="visible">True</property> | 132 | <property name="visible">True</property> |
186 | <property name="can_focus">True</property> | 133 | <property name="can_focus">True</property> |
187 | <property name="invisible_char">●</property> | 134 | <property name="invisible_char">●</property> |
188 | <property name="invisible_char_set">True</property> | 135 | <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> | 136 | <property name="primary_icon_sensitive">True</property> |
192 | <property name="secondary_icon_sensitive">True</property> | 137 | <property name="secondary_icon_sensitive">True</property> |
193 | <property name="adjustment">replication_adjustment</property> | 138 | <property name="adjustment">replication_adjustment</property> |
@@ -204,12 +149,10 @@ | |||
204 | <child> | 149 | <child> |
205 | <object class="GtkAlignment" id="GNUNET_GTK_publish_directory_dialog_anonymity_combobox_alignment"> | 150 | <object class="GtkAlignment" id="GNUNET_GTK_publish_directory_dialog_anonymity_combobox_alignment"> |
206 | <property name="visible">True</property> | 151 | <property name="visible">True</property> |
207 | <property name="can_focus">False</property> | ||
208 | <property name="yscale">0</property> | 152 | <property name="yscale">0</property> |
209 | <child> | 153 | <child> |
210 | <object class="GtkComboBox" id="GNUNET_GTK_publish_directory_dialog_anonymity_combobox"> | 154 | <object class="GtkComboBox" id="GNUNET_GTK_publish_directory_dialog_anonymity_combobox"> |
211 | <property name="visible">True</property> | 155 | <property name="visible">True</property> |
212 | <property name="can_focus">False</property> | ||
213 | <property name="active">1</property> | 156 | <property name="active">1</property> |
214 | <child> | 157 | <child> |
215 | <object class="GtkCellRendererText" id="GNUNET_GTK_publish_directory_dialog_anonymity_combobox_renderer"/> | 158 | <object class="GtkCellRendererText" id="GNUNET_GTK_publish_directory_dialog_anonymity_combobox_renderer"/> |
@@ -245,14 +188,12 @@ | |||
245 | <child> | 188 | <child> |
246 | <object class="GtkHBox" id="hbox1"> | 189 | <object class="GtkHBox" id="hbox1"> |
247 | <property name="visible">True</property> | 190 | <property name="visible">True</property> |
248 | <property name="can_focus">False</property> | ||
249 | <child> | 191 | <child> |
250 | <placeholder/> | 192 | <placeholder/> |
251 | </child> | 193 | </child> |
252 | <child> | 194 | <child> |
253 | <object class="GtkCheckButton" id="GNUNET_GTK_publish_directory_dialog_do_index_checkbutton"> | 195 | <object class="GtkCheckButton" id="GNUNET_GTK_publish_directory_dialog_do_index_checkbutton"> |
254 | <property name="label" translatable="yes">Index files</property> | 196 | <property name="label" translatable="yes">Index files</property> |
255 | <property name="use_action_appearance">False</property> | ||
256 | <property name="visible">True</property> | 197 | <property name="visible">True</property> |
257 | <property name="can_focus">True</property> | 198 | <property name="can_focus">True</property> |
258 | <property name="receives_default">False</property> | 199 | <property name="receives_default">False</property> |
@@ -262,7 +203,6 @@ | |||
262 | </object> | 203 | </object> |
263 | <packing> | 204 | <packing> |
264 | <property name="expand">False</property> | 205 | <property name="expand">False</property> |
265 | <property name="fill">True</property> | ||
266 | <property name="position">1</property> | 206 | <property name="position">1</property> |
267 | </packing> | 207 | </packing> |
268 | </child> | 208 | </child> |
@@ -273,6 +213,46 @@ | |||
273 | <property name="position">3</property> | 213 | <property name="position">3</property> |
274 | </packing> | 214 | </packing> |
275 | </child> | 215 | </child> |
216 | <child internal-child="action_area"> | ||
217 | <object class="GtkHButtonBox" id="dialog-action_area9"> | ||
218 | <property name="visible">True</property> | ||
219 | <property name="layout_style">end</property> | ||
220 | <child> | ||
221 | <object class="GtkButton" id="GNUNET_GTK_publish_dialog_cancel_button"> | ||
222 | <property name="label">gtk-cancel</property> | ||
223 | <property name="visible">True</property> | ||
224 | <property name="can_focus">True</property> | ||
225 | <property name="receives_default">True</property> | ||
226 | <property name="use_stock">True</property> | ||
227 | </object> | ||
228 | <packing> | ||
229 | <property name="expand">False</property> | ||
230 | <property name="fill">False</property> | ||
231 | <property name="position">0</property> | ||
232 | </packing> | ||
233 | </child> | ||
234 | <child> | ||
235 | <object class="GtkButton" id="GNUNET_GTK_publish_directory_dialog_ok_button"> | ||
236 | <property name="label">gtk-ok</property> | ||
237 | <property name="visible">True</property> | ||
238 | <property name="can_focus">True</property> | ||
239 | <property name="can_default">True</property> | ||
240 | <property name="receives_default">True</property> | ||
241 | <property name="use_stock">True</property> | ||
242 | </object> | ||
243 | <packing> | ||
244 | <property name="expand">False</property> | ||
245 | <property name="fill">False</property> | ||
246 | <property name="position">1</property> | ||
247 | </packing> | ||
248 | </child> | ||
249 | </object> | ||
250 | <packing> | ||
251 | <property name="expand">False</property> | ||
252 | <property name="pack_type">end</property> | ||
253 | <property name="position">0</property> | ||
254 | </packing> | ||
255 | </child> | ||
276 | </object> | 256 | </object> |
277 | </child> | 257 | </child> |
278 | <action-widgets> | 258 | <action-widgets> |
diff --git a/contrib/gnunet_fs_gtk_publish_file_dialog.glade b/contrib/gnunet_fs_gtk_publish_file_dialog.glade index 14857449..30b439b1 100644 --- a/contrib/gnunet_fs_gtk_publish_file_dialog.glade +++ b/contrib/gnunet_fs_gtk_publish_file_dialog.glade | |||
@@ -1,9 +1,8 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0"?> |
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> | ||
7 | <property name="can_default">True</property> | 6 | <property name="can_default">True</property> |
8 | <property name="border_width">5</property> | 7 | <property name="border_width">5</property> |
9 | <property name="title" translatable="yes">Publish file...</property> | 8 | <property name="title" translatable="yes">Publish file...</property> |
@@ -12,93 +11,15 @@ | |||
12 | <property name="type_hint">normal</property> | 11 | <property name="type_hint">normal</property> |
13 | <property name="create_folders">False</property> | 12 | <property name="create_folders">False</property> |
14 | <property name="select_multiple">True</property> | 13 | <property name="select_multiple">True</property> |
14 | <signal name="response" handler="GNUNET_GTK_publish_file_dialog_response_cb"/> | ||
15 | <child internal-child="vbox"> | 15 | <child internal-child="vbox"> |
16 | <object class="GtkVBox" id="dialog-vbox1"> | 16 | <object class="GtkVBox" id="dialog-vbox1"> |
17 | <property name="visible">True</property> | 17 | <property name="visible">True</property> |
18 | <property name="can_focus">False</property> | 18 | <property name="orientation">vertical</property> |
19 | <property name="spacing">2</property> | 19 | <property name="spacing">2</property> |
20 | <child internal-child="action_area"> | ||
21 | <object class="GtkHButtonBox" id="dialog-action_area2"> | ||
22 | <property name="visible">True</property> | ||
23 | <property name="can_focus">False</property> | ||
24 | <property name="layout_style">end</property> | ||
25 | <child> | ||
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> | ||
29 | <property name="visible">True</property> | ||
30 | <property name="can_focus">True</property> | ||
31 | <property name="receives_default">True</property> | ||
32 | <property name="use_stock">True</property> | ||
33 | </object> | ||
34 | <packing> | ||
35 | <property name="expand">False</property> | ||
36 | <property name="fill">False</property> | ||
37 | <property name="position">0</property> | ||
38 | </packing> | ||
39 | </child> | ||
40 | <child> | ||
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> | ||
44 | <property name="visible">True</property> | ||
45 | <property name="can_focus">True</property> | ||
46 | <property name="can_default">True</property> | ||
47 | <property name="receives_default">True</property> | ||
48 | <property name="use_stock">True</property> | ||
49 | </object> | ||
50 | <packing> | ||
51 | <property name="expand">False</property> | ||
52 | <property name="fill">False</property> | ||
53 | <property name="position">1</property> | ||
54 | </packing> | ||
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> | ||
68 | <child> | ||
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> | ||
72 | <property name="visible">True</property> | ||
73 | <property name="can_focus">True</property> | ||
74 | <property name="receives_default">False</property> | ||
75 | <property name="use_underline">True</property> | ||
76 | <property name="active">True</property> | ||
77 | <property name="draw_indicator">True</property> | ||
78 | </object> | ||
79 | <packing> | ||
80 | <property name="expand">False</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> | ||
85 | </packing> | ||
86 | </child> | ||
87 | <child> | ||
88 | <placeholder/> | ||
89 | </child> | ||
90 | </object> | ||
91 | <packing> | ||
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> | ||
96 | </packing> | ||
97 | </child> | ||
98 | <child> | 20 | <child> |
99 | <object class="GtkTable" id="table1"> | 21 | <object class="GtkTable" id="table1"> |
100 | <property name="visible">True</property> | 22 | <property name="visible">True</property> |
101 | <property name="can_focus">False</property> | ||
102 | <property name="n_rows">2</property> | 23 | <property name="n_rows">2</property> |
103 | <property name="n_columns">4</property> | 24 | <property name="n_columns">4</property> |
104 | <property name="column_spacing">4</property> | 25 | <property name="column_spacing">4</property> |
@@ -106,12 +27,10 @@ | |||
106 | <child> | 27 | <child> |
107 | <object class="GtkAlignment" id="GNUNET_GTK_publish_file_dialog_anonymity_combobox_alignment"> | 28 | <object class="GtkAlignment" id="GNUNET_GTK_publish_file_dialog_anonymity_combobox_alignment"> |
108 | <property name="visible">True</property> | 29 | <property name="visible">True</property> |
109 | <property name="can_focus">False</property> | ||
110 | <property name="yscale">0</property> | 30 | <property name="yscale">0</property> |
111 | <child> | 31 | <child> |
112 | <object class="GtkComboBox" id="GNUNET_GTK_publish_file_dialog_anonymity_combobox"> | 32 | <object class="GtkComboBox" id="GNUNET_GTK_publish_file_dialog_anonymity_combobox"> |
113 | <property name="visible">True</property> | 33 | <property name="visible">True</property> |
114 | <property name="can_focus">False</property> | ||
115 | <property name="active">1</property> | 34 | <property name="active">1</property> |
116 | <child> | 35 | <child> |
117 | <object class="GtkCellRendererText" id="GNUNET_GTK_publish_file_dialog_anonymity_combobox_renderer"/> | 36 | <object class="GtkCellRendererText" id="GNUNET_GTK_publish_file_dialog_anonymity_combobox_renderer"/> |
@@ -139,7 +58,6 @@ | |||
139 | <child> | 58 | <child> |
140 | <object class="GtkLabel" id="GNUNET_GTK_publish_file_dialog_anonymity_label"> | 59 | <object class="GtkLabel" id="GNUNET_GTK_publish_file_dialog_anonymity_label"> |
141 | <property name="visible">True</property> | 60 | <property name="visible">True</property> |
142 | <property name="can_focus">False</property> | ||
143 | <property name="label" translatable="yes">Anonymity:</property> | 61 | <property name="label" translatable="yes">Anonymity:</property> |
144 | </object> | 62 | </object> |
145 | <packing> | 63 | <packing> |
@@ -154,7 +72,6 @@ | |||
154 | <child> | 72 | <child> |
155 | <object class="GtkLabel" id="GNUNET_GTK_publish_file_dialog_priority_label"> | 73 | <object class="GtkLabel" id="GNUNET_GTK_publish_file_dialog_priority_label"> |
156 | <property name="visible">True</property> | 74 | <property name="visible">True</property> |
157 | <property name="can_focus">False</property> | ||
158 | <property name="label" translatable="yes">Priority:</property> | 75 | <property name="label" translatable="yes">Priority:</property> |
159 | </object> | 76 | </object> |
160 | <packing> | 77 | <packing> |
@@ -168,10 +85,8 @@ | |||
168 | <object class="GtkSpinButton" id="GNUNET_GTK_publish_file_dialog_priority_spin_button"> | 85 | <object class="GtkSpinButton" id="GNUNET_GTK_publish_file_dialog_priority_spin_button"> |
169 | <property name="visible">True</property> | 86 | <property name="visible">True</property> |
170 | <property name="can_focus">True</property> | 87 | <property name="can_focus">True</property> |
171 | <property name="invisible_char">•</property> | 88 | <property name="invisible_char">•</property> |
172 | <property name="invisible_char_set">True</property> | 89 | <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> | 90 | <property name="primary_icon_sensitive">True</property> |
176 | <property name="secondary_icon_sensitive">True</property> | 91 | <property name="secondary_icon_sensitive">True</property> |
177 | <property name="adjustment">priority_adjustment</property> | 92 | <property name="adjustment">priority_adjustment</property> |
@@ -185,7 +100,6 @@ | |||
185 | <child> | 100 | <child> |
186 | <object class="GtkLabel" id="GNUNET_GTK_publish_file_dialog_expiration_label"> | 101 | <object class="GtkLabel" id="GNUNET_GTK_publish_file_dialog_expiration_label"> |
187 | <property name="visible">True</property> | 102 | <property name="visible">True</property> |
188 | <property name="can_focus">False</property> | ||
189 | <property name="label" translatable="yes">Expiration year:</property> | 103 | <property name="label" translatable="yes">Expiration year:</property> |
190 | </object> | 104 | </object> |
191 | <packing> | 105 | <packing> |
@@ -197,10 +111,8 @@ | |||
197 | <object class="GtkSpinButton" id="GNUNET_GTK_publish_file_dialog_expiration_year_spin_button"> | 111 | <object class="GtkSpinButton" id="GNUNET_GTK_publish_file_dialog_expiration_year_spin_button"> |
198 | <property name="visible">True</property> | 112 | <property name="visible">True</property> |
199 | <property name="can_focus">True</property> | 113 | <property name="can_focus">True</property> |
200 | <property name="invisible_char">•</property> | 114 | <property name="invisible_char">•</property> |
201 | <property name="invisible_char_set">True</property> | 115 | <property name="invisible_char_set">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> | 116 | <property name="primary_icon_sensitive">True</property> |
205 | <property name="secondary_icon_sensitive">True</property> | 117 | <property name="secondary_icon_sensitive">True</property> |
206 | <property name="adjustment">expiration_year_adjustment</property> | 118 | <property name="adjustment">expiration_year_adjustment</property> |
@@ -214,7 +126,6 @@ | |||
214 | <child> | 126 | <child> |
215 | <object class="GtkLabel" id="GNUNET_GTK_publish_file_dialog_replication_label"> | 127 | <object class="GtkLabel" id="GNUNET_GTK_publish_file_dialog_replication_label"> |
216 | <property name="visible">True</property> | 128 | <property name="visible">True</property> |
217 | <property name="can_focus">False</property> | ||
218 | <property name="label" translatable="yes">_Replication:</property> | 129 | <property name="label" translatable="yes">_Replication:</property> |
219 | <property name="use_underline">True</property> | 130 | <property name="use_underline">True</property> |
220 | </object> | 131 | </object> |
@@ -229,10 +140,8 @@ | |||
229 | <object class="GtkSpinButton" id="GNUNET_GTK_publish_file_dialog_replication_spin_button"> | 140 | <object class="GtkSpinButton" id="GNUNET_GTK_publish_file_dialog_replication_spin_button"> |
230 | <property name="visible">True</property> | 141 | <property name="visible">True</property> |
231 | <property name="can_focus">True</property> | 142 | <property name="can_focus">True</property> |
232 | <property name="invisible_char">●</property> | 143 | <property name="invisible_char">●</property> |
233 | <property name="invisible_char_set">True</property> | 144 | <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> | 145 | <property name="primary_icon_sensitive">True</property> |
237 | <property name="secondary_icon_sensitive">True</property> | 146 | <property name="secondary_icon_sensitive">True</property> |
238 | <property name="adjustment">replication_adjustment</property> | 147 | <property name="adjustment">replication_adjustment</property> |
@@ -253,6 +162,78 @@ | |||
253 | <property name="position">2</property> | 162 | <property name="position">2</property> |
254 | </packing> | 163 | </packing> |
255 | </child> | 164 | </child> |
165 | <child> | ||
166 | <object class="GtkHBox" id="hbox1"> | ||
167 | <property name="visible">True</property> | ||
168 | <child> | ||
169 | <placeholder/> | ||
170 | </child> | ||
171 | <child> | ||
172 | <object class="GtkCheckButton" id="GNUNET_GTK_publish_file_dialog_do_index_checkbutton"> | ||
173 | <property name="label" translatable="yes">Index file</property> | ||
174 | <property name="visible">True</property> | ||
175 | <property name="can_focus">True</property> | ||
176 | <property name="receives_default">False</property> | ||
177 | <property name="use_underline">True</property> | ||
178 | <property name="active">True</property> | ||
179 | <property name="draw_indicator">True</property> | ||
180 | </object> | ||
181 | <packing> | ||
182 | <property name="expand">False</property> | ||
183 | <property name="fill">False</property> | ||
184 | <property name="padding">20</property> | ||
185 | <property name="pack_type">end</property> | ||
186 | <property name="position">0</property> | ||
187 | </packing> | ||
188 | </child> | ||
189 | </object> | ||
190 | <packing> | ||
191 | <property name="expand">False</property> | ||
192 | <property name="fill">False</property> | ||
193 | <property name="pack_type">end</property> | ||
194 | <property name="position">1</property> | ||
195 | </packing> | ||
196 | </child> | ||
197 | <child internal-child="action_area"> | ||
198 | <object class="GtkHButtonBox" id="dialog-action_area2"> | ||
199 | <property name="visible">True</property> | ||
200 | <property name="layout_style">end</property> | ||
201 | <child> | ||
202 | <object class="GtkButton" id="GNUNET_GTK_publish_file_dialog_cancel_button"> | ||
203 | <property name="label">gtk-cancel</property> | ||
204 | <property name="visible">True</property> | ||
205 | <property name="can_focus">True</property> | ||
206 | <property name="receives_default">True</property> | ||
207 | <property name="use_stock">True</property> | ||
208 | </object> | ||
209 | <packing> | ||
210 | <property name="expand">False</property> | ||
211 | <property name="fill">False</property> | ||
212 | <property name="position">0</property> | ||
213 | </packing> | ||
214 | </child> | ||
215 | <child> | ||
216 | <object class="GtkButton" id="GNUNET_GTK_publish_file_dialog_ok_button"> | ||
217 | <property name="label">gtk-ok</property> | ||
218 | <property name="visible">True</property> | ||
219 | <property name="can_focus">True</property> | ||
220 | <property name="can_default">True</property> | ||
221 | <property name="receives_default">True</property> | ||
222 | <property name="use_stock">True</property> | ||
223 | </object> | ||
224 | <packing> | ||
225 | <property name="expand">False</property> | ||
226 | <property name="fill">False</property> | ||
227 | <property name="position">1</property> | ||
228 | </packing> | ||
229 | </child> | ||
230 | </object> | ||
231 | <packing> | ||
232 | <property name="expand">False</property> | ||
233 | <property name="pack_type">end</property> | ||
234 | <property name="position">0</property> | ||
235 | </packing> | ||
236 | </child> | ||
256 | </object> | 237 | </object> |
257 | </child> | 238 | </child> |
258 | <action-widgets> | 239 | <action-widgets> |
@@ -269,8 +250,8 @@ | |||
269 | </columns> | 250 | </columns> |
270 | </object> | 251 | </object> |
271 | <object class="GtkAdjustment" id="anonymity_adjustment"> | 252 | <object class="GtkAdjustment" id="anonymity_adjustment"> |
272 | <property name="upper">10000000</property> | ||
273 | <property name="value">1</property> | 253 | <property name="value">1</property> |
254 | <property name="upper">10000000</property> | ||
274 | <property name="step_increment">1</property> | 255 | <property name="step_increment">1</property> |
275 | <property name="page_increment">10</property> | 256 | <property name="page_increment">10</property> |
276 | </object> | 257 | </object> |
@@ -280,8 +261,8 @@ | |||
280 | <property name="page_increment">10</property> | 261 | <property name="page_increment">10</property> |
281 | </object> | 262 | </object> |
282 | <object class="GtkAdjustment" id="priority_adjustment"> | 263 | <object class="GtkAdjustment" id="priority_adjustment"> |
283 | <property name="upper">100000000</property> | ||
284 | <property name="value">1000</property> | 264 | <property name="value">1000</property> |
265 | <property name="upper">100000000</property> | ||
285 | <property name="step_increment">1</property> | 266 | <property name="step_increment">1</property> |
286 | <property name="page_increment">10</property> | 267 | <property name="page_increment">10</property> |
287 | </object> | 268 | </object> |
diff --git a/src/fs/gnunet-fs-gtk_publish-dialog.c b/src/fs/gnunet-fs-gtk_publish-dialog.c index 4f33fc62..20a05400 100644 --- a/src/fs/gnunet-fs-gtk_publish-dialog.c +++ b/src/fs/gnunet-fs-gtk_publish-dialog.c | |||
@@ -1215,10 +1215,10 @@ scan_file_or_directory (struct MainPublishingDialogContext *ctx, | |||
1215 | * @param response_id result of the dialog ("-5" means to "run") | 1215 | * @param response_id result of the dialog ("-5" means to "run") |
1216 | * @param user_data master publishing dialog context of our window | 1216 | * @param user_data master publishing dialog context of our window |
1217 | */ | 1217 | */ |
1218 | static void | 1218 | void |
1219 | publish_directory_dialog_response_cb (GtkDialog * dialog, | 1219 | GNUNET_GTK_publish_directory_dialog_response_cb (GtkDialog * dialog, |
1220 | gint response_id, | 1220 | gint response_id, |
1221 | gpointer user_data) | 1221 | gpointer user_data) |
1222 | { | 1222 | { |
1223 | struct MainPublishingDialogContext *ctx = user_data; | 1223 | struct MainPublishingDialogContext *ctx = user_data; |
1224 | 1224 | ||
@@ -1276,10 +1276,10 @@ publish_directory_dialog_response_cb (GtkDialog * dialog, | |||
1276 | * @param response_id result of the dialog ("-5" means to "run") | 1276 | * @param response_id result of the dialog ("-5" means to "run") |
1277 | * @param user_data master publishing dialog context of our window | 1277 | * @param user_data master publishing dialog context of our window |
1278 | */ | 1278 | */ |
1279 | static void | 1279 | void |
1280 | publish_file_dialog_response_cb (GtkDialog * dialog, | 1280 | GNUNET_GTK_publish_file_dialog_response_cb (GtkDialog * dialog, |
1281 | gint response_id, | 1281 | gint response_id, |
1282 | gpointer user_data) | 1282 | gpointer user_data) |
1283 | { | 1283 | { |
1284 | struct MainPublishingDialogContext *ctx = user_data; | 1284 | struct MainPublishingDialogContext *ctx = user_data; |
1285 | 1285 | ||
@@ -1344,13 +1344,9 @@ GNUNET_GTK_master_publish_dialog_add_button_clicked_cb (GtkWidget * dummy, | |||
1344 | gpointer user_data) | 1344 | gpointer user_data) |
1345 | { | 1345 | { |
1346 | struct MainPublishingDialogContext *ctx = user_data; | 1346 | struct MainPublishingDialogContext *ctx = user_data; |
1347 | GtkWidget *ad; | ||
1348 | GtkComboBox *combo; | ||
1349 | 1347 | ||
1350 | ctx->open_file_builder = GNUNET_GTK_get_new_builder ("gnunet_fs_gtk_publish_file_dialog.glade", ctx); | 1348 | ctx->open_file_builder = GNUNET_GTK_get_new_builder ("gnunet_fs_gtk_publish_file_dialog.glade", ctx); |
1351 | GNUNET_FS_GTK_setup_expiration_year_adjustment (ctx->open_file_builder); | 1349 | GNUNET_FS_GTK_setup_expiration_year_adjustment (ctx->open_file_builder); |
1352 | ad = GTK_WIDGET (gtk_builder_get_object | ||
1353 | (ctx->open_file_builder, "GNUNET_GTK_publish_file_dialog")); | ||
1354 | 1350 | ||
1355 | /* FIXME-FEATURE: Use some kind of adjustable defaults instead of 1000, 0 and TRUE */ | 1351 | /* FIXME-FEATURE: Use some kind of adjustable defaults instead of 1000, 0 and TRUE */ |
1356 | gtk_spin_button_set_value (GTK_SPIN_BUTTON (gtk_builder_get_object (ctx->open_file_builder, | 1352 | gtk_spin_button_set_value (GTK_SPIN_BUTTON (gtk_builder_get_object (ctx->open_file_builder, |
@@ -1360,17 +1356,24 @@ GNUNET_GTK_master_publish_dialog_add_button_clicked_cb (GtkWidget * dummy, | |||
1360 | gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (gtk_builder_get_object (ctx->open_file_builder, | 1356 | gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (gtk_builder_get_object (ctx->open_file_builder, |
1361 | "GNUNET_GTK_publish_file_dialog_do_index_checkbutton")), TRUE); | 1357 | "GNUNET_GTK_publish_file_dialog_do_index_checkbutton")), TRUE); |
1362 | 1358 | ||
1363 | /* FIXME-STYLE: automatically connect using glade instead */ | 1359 | { |
1364 | g_signal_connect (G_OBJECT (ad), "response", | 1360 | GtkComboBox *combo; |
1365 | G_CALLBACK (publish_file_dialog_response_cb), ctx); | 1361 | |
1366 | combo = GTK_COMBO_BOX (gtk_builder_get_object (ctx->open_file_builder, | 1362 | combo = GTK_COMBO_BOX (gtk_builder_get_object (ctx->open_file_builder, |
1367 | "GNUNET_GTK_publish_file_dialog_anonymity_combobox")); | 1363 | "GNUNET_GTK_publish_file_dialog_anonymity_combobox")); |
1368 | gtk_combo_box_set_model (combo, | 1364 | gtk_combo_box_set_model (combo, |
1369 | GNUNET_FS_GTK_get_anonymity_level_list_store ()); | 1365 | GNUNET_FS_GTK_get_anonymity_level_list_store ()); |
1370 | 1366 | } | |
1367 | |||
1371 | /* show dialog */ | 1368 | /* show dialog */ |
1372 | gtk_window_set_transient_for (GTK_WINDOW (ad), ctx->master_pubdialog); | 1369 | { |
1373 | gtk_window_present (GTK_WINDOW (ad)); | 1370 | GtkWidget *ad; |
1371 | |||
1372 | ad = GTK_WIDGET (gtk_builder_get_object | ||
1373 | (ctx->open_file_builder, "GNUNET_GTK_publish_file_dialog")); | ||
1374 | gtk_window_set_transient_for (GTK_WINDOW (ad), ctx->master_pubdialog); | ||
1375 | gtk_window_present (GTK_WINDOW (ad)); | ||
1376 | } | ||
1374 | } | 1377 | } |
1375 | 1378 | ||
1376 | 1379 | ||
@@ -1388,8 +1391,6 @@ GNUNET_GTK_master_publish_dialog_open_button_clicked_cb (GtkWidget * dummy, | |||
1388 | gpointer user_data) | 1391 | gpointer user_data) |
1389 | { | 1392 | { |
1390 | struct MainPublishingDialogContext *ctx = user_data; | 1393 | struct MainPublishingDialogContext *ctx = user_data; |
1391 | GtkWidget *ad; | ||
1392 | GtkComboBox *combo; | ||
1393 | 1394 | ||
1394 | ctx->open_directory_builder = GNUNET_GTK_get_new_builder ("gnunet_fs_gtk_publish_directory_dialog.glade", ctx); | 1395 | ctx->open_directory_builder = GNUNET_GTK_get_new_builder ("gnunet_fs_gtk_publish_directory_dialog.glade", ctx); |
1395 | GNUNET_FS_GTK_setup_expiration_year_adjustment (ctx->open_directory_builder); | 1396 | GNUNET_FS_GTK_setup_expiration_year_adjustment (ctx->open_directory_builder); |
@@ -1402,19 +1403,23 @@ GNUNET_GTK_master_publish_dialog_open_button_clicked_cb (GtkWidget * dummy, | |||
1402 | gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (gtk_builder_get_object (ctx->open_directory_builder, | 1403 | gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (gtk_builder_get_object (ctx->open_directory_builder, |
1403 | "GNUNET_GTK_publish_directory_dialog_do_index_checkbutton")), TRUE); | 1404 | "GNUNET_GTK_publish_directory_dialog_do_index_checkbutton")), TRUE); |
1404 | 1405 | ||
1405 | ad = GTK_WIDGET (gtk_builder_get_object | 1406 | { |
1406 | (ctx->open_directory_builder, "GNUNET_GTK_publish_directory_dialog")); | 1407 | GtkComboBox *combo; |
1407 | 1408 | ||
1408 | /* FIXME-STYLE: automatically connect using glade instead */ | 1409 | combo = GTK_COMBO_BOX (gtk_builder_get_object (ctx->open_directory_builder, |
1409 | g_signal_connect (G_OBJECT (ad), "response", | 1410 | "GNUNET_GTK_publish_directory_dialog_anonymity_combobox")); |
1410 | G_CALLBACK (publish_directory_dialog_response_cb), ctx); | 1411 | gtk_combo_box_set_model (combo, GNUNET_FS_GTK_get_anonymity_level_list_store ()); |
1411 | combo = GTK_COMBO_BOX (gtk_builder_get_object (ctx->open_directory_builder, | 1412 | } |
1412 | "GNUNET_GTK_publish_directory_dialog_anonymity_combobox")); | ||
1413 | gtk_combo_box_set_model (combo, GNUNET_FS_GTK_get_anonymity_level_list_store ()); | ||
1414 | 1413 | ||
1415 | /* show dialog */ | 1414 | /* show dialog */ |
1416 | gtk_window_set_transient_for (GTK_WINDOW (ad), ctx->master_pubdialog); | 1415 | { |
1417 | gtk_window_present (GTK_WINDOW (ad)); | 1416 | GtkWidget *ad; |
1417 | |||
1418 | ad = GTK_WIDGET (gtk_builder_get_object | ||
1419 | (ctx->open_directory_builder, "GNUNET_GTK_publish_directory_dialog")); | ||
1420 | gtk_window_set_transient_for (GTK_WINDOW (ad), ctx->master_pubdialog); | ||
1421 | gtk_window_present (GTK_WINDOW (ad)); | ||
1422 | } | ||
1418 | } | 1423 | } |
1419 | 1424 | ||
1420 | 1425 | ||