diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-01-01 21:32:04 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-01-01 21:32:04 +0000 |
commit | 52f7c1ad4b7c8f60b8a8644f9b5d132c26e48523 (patch) | |
tree | ee80443451e6ccd69c597a2557021cd7dba3e4ed | |
parent | 4af4767e05e41ef53dfa42cb1824a6fed3a35ee7 (diff) | |
download | gnunet-gtk-52f7c1ad4b7c8f60b8a8644f9b5d132c26e48523.tar.gz gnunet-gtk-52f7c1ad4b7c8f60b8a8644f9b5d132c26e48523.zip |
-add replication spin button for publishing directories
-rw-r--r-- | contrib/gnunet_fs_gtk_publish_directory_dialog.glade | 67 | ||||
-rw-r--r-- | src/fs/gnunet-fs-gtk-main_window_file_publish.c | 8 |
2 files changed, 62 insertions, 13 deletions
diff --git a/contrib/gnunet_fs_gtk_publish_directory_dialog.glade b/contrib/gnunet_fs_gtk_publish_directory_dialog.glade index 52bbf7af..3b23603c 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 --> |
@@ -8,8 +8,8 @@ | |||
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="upper">100000000</property> | ||
12 | <property name="value">1000</property> | 11 | <property name="value">1000</property> |
12 | <property name="upper">100000000</property> | ||
13 | <property name="step_increment">1</property> | 13 | <property name="step_increment">1</property> |
14 | <property name="page_increment">10</property> | 14 | <property name="page_increment">10</property> |
15 | </object> | 15 | </object> |
@@ -26,16 +26,18 @@ | |||
26 | <property name="border_width">5</property> | 26 | <property name="border_width">5</property> |
27 | <property name="type_hint">normal</property> | 27 | <property name="type_hint">normal</property> |
28 | <property name="has_separator">False</property> | 28 | <property name="has_separator">False</property> |
29 | <property name="action">select-folder</property> | ||
30 | <property name="select_multiple">True</property> | 29 | <property name="select_multiple">True</property> |
31 | <property name="create_folders">False</property> | 30 | <property name="create_folders">False</property> |
31 | <property name="action">select-folder</property> | ||
32 | <child internal-child="vbox"> | 32 | <child internal-child="vbox"> |
33 | <object class="GtkVBox" id="dialog-vbox2"> | 33 | <object class="GtkVBox" id="dialog-vbox2"> |
34 | <property name="visible">True</property> | 34 | <property name="visible">True</property> |
35 | <property name="orientation">vertical</property> | ||
35 | <property name="spacing">2</property> | 36 | <property name="spacing">2</property> |
36 | <child> | 37 | <child> |
37 | <object class="GtkVBox" id="vbox1"> | 38 | <object class="GtkVBox" id="vbox1"> |
38 | <property name="visible">True</property> | 39 | <property name="visible">True</property> |
40 | <property name="orientation">vertical</property> | ||
39 | <child> | 41 | <child> |
40 | <object class="GtkHBox" id="hbox1"> | 42 | <object class="GtkHBox" id="hbox1"> |
41 | <property name="visible">True</property> | 43 | <property name="visible">True</property> |
@@ -45,7 +47,6 @@ | |||
45 | <property name="visible">True</property> | 47 | <property name="visible">True</property> |
46 | <property name="can_focus">True</property> | 48 | <property name="can_focus">True</property> |
47 | <property name="receives_default">False</property> | 49 | <property name="receives_default">False</property> |
48 | <property name="use_action_appearance">False</property> | ||
49 | <property name="use_underline">True</property> | 50 | <property name="use_underline">True</property> |
50 | <property name="active">True</property> | 51 | <property name="active">True</property> |
51 | <property name="draw_indicator">True</property> | 52 | <property name="draw_indicator">True</property> |
@@ -75,7 +76,7 @@ | |||
75 | <object class="GtkSpinButton" id="GNUNET_GTK_publish_directory_dialog_priority_spin_button"> | 76 | <object class="GtkSpinButton" id="GNUNET_GTK_publish_directory_dialog_priority_spin_button"> |
76 | <property name="visible">True</property> | 77 | <property name="visible">True</property> |
77 | <property name="can_focus">True</property> | 78 | <property name="can_focus">True</property> |
78 | <property name="invisible_char">•</property> | 79 | <property name="invisible_char">•</property> |
79 | <property name="adjustment">priority_adjustment</property> | 80 | <property name="adjustment">priority_adjustment</property> |
80 | <property name="numeric">True</property> | 81 | <property name="numeric">True</property> |
81 | </object> | 82 | </object> |
@@ -111,7 +112,7 @@ | |||
111 | <object class="GtkSpinButton" id="GNUNET_GTK_publish_directory_dialog_expiration_year_spin_button"> | 112 | <object class="GtkSpinButton" id="GNUNET_GTK_publish_directory_dialog_expiration_year_spin_button"> |
112 | <property name="visible">True</property> | 113 | <property name="visible">True</property> |
113 | <property name="can_focus">True</property> | 114 | <property name="can_focus">True</property> |
114 | <property name="invisible_char">•</property> | 115 | <property name="invisible_char">•</property> |
115 | <property name="adjustment">expiration_year_adjustment</property> | 116 | <property name="adjustment">expiration_year_adjustment</property> |
116 | </object> | 117 | </object> |
117 | <packing> | 118 | <packing> |
@@ -135,10 +136,10 @@ | |||
135 | <object class="GtkSpinButton" id="GNUNET_GTK_publish_directory_dialog_anonymity_spin_button"> | 136 | <object class="GtkSpinButton" id="GNUNET_GTK_publish_directory_dialog_anonymity_spin_button"> |
136 | <property name="visible">True</property> | 137 | <property name="visible">True</property> |
137 | <property name="can_focus">True</property> | 138 | <property name="can_focus">True</property> |
138 | <property name="invisible_char">•</property> | 139 | <property name="invisible_char">•</property> |
139 | <property name="adjustment">anonymity_adjustment</property> | 140 | <property name="adjustment">anonymity_adjustment</property> |
140 | <property name="numeric">True</property> | 141 | <property name="numeric">True</property> |
141 | <signal name="value-changed" handler="GNUNET_GTK_anonymity_spin_button_value_changed_cb" swapped="no"/> | 142 | <signal name="value_changed" handler="GNUNET_GTK_anonymity_spin_button_value_changed_cb"/> |
142 | </object> | 143 | </object> |
143 | <packing> | 144 | <packing> |
144 | <property name="expand">False</property> | 145 | <property name="expand">False</property> |
@@ -152,6 +153,47 @@ | |||
152 | <property name="position">1</property> | 153 | <property name="position">1</property> |
153 | </packing> | 154 | </packing> |
154 | </child> | 155 | </child> |
156 | <child> | ||
157 | <object class="GtkHBox" id="hbox3"> | ||
158 | <property name="visible">True</property> | ||
159 | <child> | ||
160 | <object class="GtkLabel" id="GNUNET_GTK_publish_directory_dialog_replication_label"> | ||
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> | ||
174 | <property name="can_focus">True</property> | ||
175 | <property name="invisible_char">●</property> | ||
176 | <property name="adjustment">replication_adjustment</property> | ||
177 | <property name="numeric">True</property> | ||
178 | </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> | ||
191 | </object> | ||
192 | <packing> | ||
193 | <property name="expand">False</property> | ||
194 | <property name="position">2</property> | ||
195 | </packing> | ||
196 | </child> | ||
155 | </object> | 197 | </object> |
156 | <packing> | 198 | <packing> |
157 | <property name="position">2</property> | 199 | <property name="position">2</property> |
@@ -167,7 +209,6 @@ | |||
167 | <property name="visible">True</property> | 209 | <property name="visible">True</property> |
168 | <property name="can_focus">True</property> | 210 | <property name="can_focus">True</property> |
169 | <property name="receives_default">True</property> | 211 | <property name="receives_default">True</property> |
170 | <property name="use_action_appearance">False</property> | ||
171 | <property name="use_stock">True</property> | 212 | <property name="use_stock">True</property> |
172 | </object> | 213 | </object> |
173 | <packing> | 214 | <packing> |
@@ -183,7 +224,6 @@ | |||
183 | <property name="can_focus">True</property> | 224 | <property name="can_focus">True</property> |
184 | <property name="can_default">True</property> | 225 | <property name="can_default">True</property> |
185 | <property name="receives_default">True</property> | 226 | <property name="receives_default">True</property> |
186 | <property name="use_action_appearance">False</property> | ||
187 | <property name="use_stock">True</property> | 227 | <property name="use_stock">True</property> |
188 | </object> | 228 | </object> |
189 | <packing> | 229 | <packing> |
@@ -207,8 +247,13 @@ | |||
207 | </action-widgets> | 247 | </action-widgets> |
208 | </object> | 248 | </object> |
209 | <object class="GtkAdjustment" id="anonymity_adjustment"> | 249 | <object class="GtkAdjustment" id="anonymity_adjustment"> |
210 | <property name="upper">10000000</property> | ||
211 | <property name="value">1</property> | 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> | ||
212 | <property name="step_increment">1</property> | 257 | <property name="step_increment">1</property> |
213 | <property name="page_increment">10</property> | 258 | <property name="page_increment">10</property> |
214 | </object> | 259 | </object> |
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 8c4be512..e5efd423 100644 --- a/src/fs/gnunet-fs-gtk-main_window_file_publish.c +++ b/src/fs/gnunet-fs-gtk-main_window_file_publish.c | |||
@@ -1365,11 +1365,15 @@ GNUNET_GTK_publish_directory_dialog_response_cb (GtkDialog * dialog, | |||
1365 | &bo.anonymity_level)) | 1365 | &bo.anonymity_level)) |
1366 | bo.anonymity_level = 1; | 1366 | bo.anonymity_level = 1; |
1367 | bo.content_priority = | 1367 | bo.content_priority = |
1368 | gtk_spin_button_get_value (GTK_SPIN_BUTTON | 1368 | gtk_spin_button_get_value (GTK_SPIN_BUTTON |
1369 | (gtk_builder_get_object | 1369 | (gtk_builder_get_object |
1370 | (builder, | 1370 | (builder, |
1371 | "GNUNET_GTK_publish_directory_dialog_priority_spin_button"))); | 1371 | "GNUNET_GTK_publish_directory_dialog_priority_spin_button"))); |
1372 | bo.replication_level = 0; /* FIXME: replication level in GUI? */ | 1372 | bo.replication_level = |
1373 | gtk_spin_button_get_value (GTK_SPIN_BUTTON | ||
1374 | (gtk_builder_get_object | ||
1375 | (builder, | ||
1376 | "GNUNET_GTK_publish_directory_dialog_replication_spin_button"))); | ||
1373 | bo.expiration_time = GNUNET_FS_GTK_get_expiration_time (sb); | 1377 | bo.expiration_time = GNUNET_FS_GTK_get_expiration_time (sb); |
1374 | do_index = | 1378 | do_index = |
1375 | gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON | 1379 | gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON |