diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-12-23 08:38:28 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-12-23 08:38:28 +0000 |
commit | a0ea6b8725b4399a9a9e3b906fe1bebf9f633b02 (patch) | |
tree | 49028d12d0c00ea9ed5b5b4f29abcd1c4076d8a2 | |
parent | c4cbcde4ee0e49a9594a5016bef26f9dff443ef2 (diff) | |
download | gnunet-gtk-a0ea6b8725b4399a9a9e3b906fe1bebf9f633b02.tar.gz gnunet-gtk-a0ea6b8725b4399a9a9e3b906fe1bebf9f633b02.zip |
LRN: #1759: get rid of gtk_dialog_run
-rw-r--r-- | contrib/gnunet_fs_gtk_create_namespace_dialog.glade | 19 | ||||
-rw-r--r-- | contrib/gnunet_fs_gtk_main_window.glade | 2090 | ||||
-rw-r--r-- | contrib/gnunet_fs_gtk_open_directory_dialog.glade | 18 | ||||
-rw-r--r-- | contrib/gnunet_fs_gtk_select_pseudonym_dialog.glade | 111 | ||||
-rw-r--r-- | src/fs/gnunet-fs-gtk-download.c | 2 | ||||
-rw-r--r-- | src/fs/gnunet-fs-gtk-edit_publish_dialog.c | 1074 | ||||
-rw-r--r-- | src/fs/gnunet-fs-gtk-edit_publish_dialog.h | 16 | ||||
-rw-r--r-- | src/fs/gnunet-fs-gtk-main_window_adv_pseudonym.c | 631 | ||||
-rw-r--r-- | src/fs/gnunet-fs-gtk-main_window_create_pseudonym.c | 49 | ||||
-rw-r--r-- | src/fs/gnunet-fs-gtk-main_window_file_publish.c | 516 | ||||
-rw-r--r-- | src/fs/gnunet-fs-gtk-main_window_open_directory.c | 50 | ||||
-rw-r--r-- | src/fs/gnunet-fs-gtk.c | 34 | ||||
-rw-r--r-- | src/fs/gnunet-fs-gtk.h | 13 |
13 files changed, 3385 insertions, 1238 deletions
diff --git a/contrib/gnunet_fs_gtk_create_namespace_dialog.glade b/contrib/gnunet_fs_gtk_create_namespace_dialog.glade index 025d41c4..3557705e 100644 --- a/contrib/gnunet_fs_gtk_create_namespace_dialog.glade +++ b/contrib/gnunet_fs_gtk_create_namespace_dialog.glade | |||
@@ -4,6 +4,7 @@ | |||
4 | <!-- interface-naming-policy project-wide --> | 4 | <!-- interface-naming-policy project-wide --> |
5 | <object class="GtkDialog" id="GNUNET_GTK_create_namespace_dialog"> | 5 | <object class="GtkDialog" id="GNUNET_GTK_create_namespace_dialog"> |
6 | <property name="visible">True</property> | 6 | <property name="visible">True</property> |
7 | <property name="can_focus">False</property> | ||
7 | <property name="can_default">True</property> | 8 | <property name="can_default">True</property> |
8 | <property name="border_width">5</property> | 9 | <property name="border_width">5</property> |
9 | <property name="title" translatable="yes">Create namespace</property> | 10 | <property name="title" translatable="yes">Create namespace</property> |
@@ -13,17 +14,20 @@ | |||
13 | <property name="icon_name">folder-new</property> | 14 | <property name="icon_name">folder-new</property> |
14 | <property name="type_hint">dialog</property> | 15 | <property name="type_hint">dialog</property> |
15 | <property name="skip_taskbar_hint">True</property> | 16 | <property name="skip_taskbar_hint">True</property> |
16 | <property name="has_separator">False</property> | 17 | <signal name="response" handler="GNUNET_GTK_create_namespace_dialog_response_cb" swapped="no"/> |
17 | <child internal-child="vbox"> | 18 | <child internal-child="vbox"> |
18 | <object class="GtkVBox" id="GNUNET_GTK_create_namespace_vbox"> | 19 | <object class="GtkVBox" id="GNUNET_GTK_create_namespace_vbox"> |
19 | <property name="visible">True</property> | 20 | <property name="visible">True</property> |
21 | <property name="can_focus">False</property> | ||
20 | <property name="spacing">2</property> | 22 | <property name="spacing">2</property> |
21 | <child> | 23 | <child> |
22 | <object class="GtkHBox" id="GNUNET_GTK_create_namespace_value_hbox"> | 24 | <object class="GtkHBox" id="GNUNET_GTK_create_namespace_value_hbox"> |
23 | <property name="visible">True</property> | 25 | <property name="visible">True</property> |
26 | <property name="can_focus">False</property> | ||
24 | <child> | 27 | <child> |
25 | <object class="GtkLabel" id="GNUNET_GTK_create_namespace_name_label"> | 28 | <object class="GtkLabel" id="GNUNET_GTK_create_namespace_name_label"> |
26 | <property name="visible">True</property> | 29 | <property name="visible">True</property> |
30 | <property name="can_focus">False</property> | ||
27 | <property name="label" translatable="yes">_Name:</property> | 31 | <property name="label" translatable="yes">_Name:</property> |
28 | <property name="use_underline">True</property> | 32 | <property name="use_underline">True</property> |
29 | </object> | 33 | </object> |
@@ -40,8 +44,14 @@ | |||
40 | <property name="can_focus">True</property> | 44 | <property name="can_focus">True</property> |
41 | <property name="invisible_char">●</property> | 45 | <property name="invisible_char">●</property> |
42 | <property name="activates_default">True</property> | 46 | <property name="activates_default">True</property> |
47 | <property name="primary_icon_activatable">False</property> | ||
48 | <property name="secondary_icon_activatable">False</property> | ||
49 | <property name="primary_icon_sensitive">True</property> | ||
50 | <property name="secondary_icon_sensitive">True</property> | ||
43 | </object> | 51 | </object> |
44 | <packing> | 52 | <packing> |
53 | <property name="expand">True</property> | ||
54 | <property name="fill">True</property> | ||
45 | <property name="position">1</property> | 55 | <property name="position">1</property> |
46 | </packing> | 56 | </packing> |
47 | </child> | 57 | </child> |
@@ -56,14 +66,15 @@ | |||
56 | <child internal-child="action_area"> | 66 | <child internal-child="action_area"> |
57 | <object class="GtkHButtonBox" id="GNUNET_GTK_create_namespace_dialog-action_area"> | 67 | <object class="GtkHButtonBox" id="GNUNET_GTK_create_namespace_dialog-action_area"> |
58 | <property name="visible">True</property> | 68 | <property name="visible">True</property> |
69 | <property name="can_focus">False</property> | ||
59 | <property name="layout_style">end</property> | 70 | <property name="layout_style">end</property> |
60 | <child> | 71 | <child> |
61 | <object class="GtkButton" id="GNUNET_GTK_create_namespace_cancel_button"> | 72 | <object class="GtkButton" id="GNUNET_GTK_create_namespace_cancel_button"> |
62 | <property name="label">gtk-cancel</property> | 73 | <property name="label">gtk-cancel</property> |
74 | <property name="use_action_appearance">False</property> | ||
63 | <property name="visible">True</property> | 75 | <property name="visible">True</property> |
64 | <property name="can_focus">True</property> | 76 | <property name="can_focus">True</property> |
65 | <property name="receives_default">True</property> | 77 | <property name="receives_default">True</property> |
66 | <property name="use_action_appearance">False</property> | ||
67 | <property name="use_stock">True</property> | 78 | <property name="use_stock">True</property> |
68 | </object> | 79 | </object> |
69 | <packing> | 80 | <packing> |
@@ -75,12 +86,12 @@ | |||
75 | <child> | 86 | <child> |
76 | <object class="GtkButton" id="GNUNET_GTK_create_namespace_ok_button"> | 87 | <object class="GtkButton" id="GNUNET_GTK_create_namespace_ok_button"> |
77 | <property name="label">gtk-ok</property> | 88 | <property name="label">gtk-ok</property> |
89 | <property name="use_action_appearance">False</property> | ||
78 | <property name="visible">True</property> | 90 | <property name="visible">True</property> |
79 | <property name="can_focus">True</property> | 91 | <property name="can_focus">True</property> |
80 | <property name="can_default">True</property> | 92 | <property name="can_default">True</property> |
81 | <property name="has_default">True</property> | 93 | <property name="has_default">True</property> |
82 | <property name="receives_default">True</property> | 94 | <property name="receives_default">True</property> |
83 | <property name="use_action_appearance">False</property> | ||
84 | <property name="use_stock">True</property> | 95 | <property name="use_stock">True</property> |
85 | </object> | 96 | </object> |
86 | <packing> | 97 | <packing> |
@@ -92,6 +103,8 @@ | |||
92 | </object> | 103 | </object> |
93 | <packing> | 104 | <packing> |
94 | <property name="expand">False</property> | 105 | <property name="expand">False</property> |
106 | <property name="fill">True</property> | ||
107 | <property name="pack_type">end</property> | ||
95 | <property name="position">1</property> | 108 | <property name="position">1</property> |
96 | </packing> | 109 | </packing> |
97 | </child> | 110 | </child> |
diff --git a/contrib/gnunet_fs_gtk_main_window.glade b/contrib/gnunet_fs_gtk_main_window.glade index d8b4d108..2a5c4f51 100644 --- a/contrib/gnunet_fs_gtk_main_window.glade +++ b/contrib/gnunet_fs_gtk_main_window.glade | |||
@@ -2,6 +2,823 @@ | |||
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="GtkAdjustment" id="GNUNET_GTK_edit_publication_metadata_preview_image_horizontal_adjustment"> | ||
6 | <property name="upper">100</property> | ||
7 | <property name="step_increment">1</property> | ||
8 | <property name="page_increment">10</property> | ||
9 | </object> | ||
10 | <object class="GtkAdjustment" id="GNUNET_GTK_edit_publication_metadata_preview_image_verticall_adjustment"> | ||
11 | <property name="upper">100</property> | ||
12 | <property name="step_increment">1</property> | ||
13 | <property name="page_increment">10</property> | ||
14 | </object> | ||
15 | <object class="GtkWindow" id="GNUNET_GTK_edit_publication_window"> | ||
16 | <property name="can_focus">False</property> | ||
17 | <property name="border_width">4</property> | ||
18 | <property name="modal">True</property> | ||
19 | <property name="window_position">center-on-parent</property> | ||
20 | <property name="destroy_with_parent">True</property> | ||
21 | <property name="skip_taskbar_hint">True</property> | ||
22 | <property name="skip_pager_hint">True</property> | ||
23 | <property name="deletable">False</property> | ||
24 | <property name="transient_for">GNUNET_GTK_main_window</property> | ||
25 | <signal name="realize" handler="GNUNET_GTK_edit_publication_window_realize_cb" swapped="no"/> | ||
26 | <child> | ||
27 | <object class="GtkVBox" id="GNUNET_GTK_edit_publication_master_vbox"> | ||
28 | <property name="visible">True</property> | ||
29 | <property name="can_focus">False</property> | ||
30 | <property name="spacing">2</property> | ||
31 | <child> | ||
32 | <object class="GtkVPaned" id="GNUNET_GTK_edit_publication_main_vpaned"> | ||
33 | <property name="visible">True</property> | ||
34 | <property name="can_focus">True</property> | ||
35 | <child> | ||
36 | <object class="GtkHPaned" id="GNUNET_GTK_edit_publication_top_hpaned"> | ||
37 | <property name="visible">True</property> | ||
38 | <property name="can_focus">True</property> | ||
39 | <property name="position_set">True</property> | ||
40 | <child> | ||
41 | <object class="GtkVBox" id="GNUNET_GTK_edit_publication_metadata_vbox"> | ||
42 | <property name="visible">True</property> | ||
43 | <property name="can_focus">False</property> | ||
44 | <property name="spacing">5</property> | ||
45 | <child> | ||
46 | <object class="GtkHBox" id="GNUNET_GTK_edit_publication_hbox"> | ||
47 | <property name="visible">True</property> | ||
48 | <property name="can_focus">False</property> | ||
49 | <child> | ||
50 | <object class="GtkLabel" id="GNUNET_GTK_edit_publication_type_label"> | ||
51 | <property name="visible">True</property> | ||
52 | <property name="can_focus">False</property> | ||
53 | <property name="label" translatable="yes">_Publication type:</property> | ||
54 | <property name="use_underline">True</property> | ||
55 | </object> | ||
56 | <packing> | ||
57 | <property name="expand">False</property> | ||
58 | <property name="fill">False</property> | ||
59 | <property name="position">0</property> | ||
60 | </packing> | ||
61 | </child> | ||
62 | <child> | ||
63 | <object class="GtkComboBox" id="_GNUNET_GTK_edit_publication_type_combo"> | ||
64 | <property name="visible">True</property> | ||
65 | <property name="can_focus">False</property> | ||
66 | <property name="model">GNUNET_GTK_publication_types_liststore</property> | ||
67 | <property name="active">0</property> | ||
68 | <child> | ||
69 | <object class="GtkCellRendererText" id="cellrenderertext2"/> | ||
70 | <attributes> | ||
71 | <attribute name="text">1</attribute> | ||
72 | </attributes> | ||
73 | </child> | ||
74 | </object> | ||
75 | <packing> | ||
76 | <property name="expand">False</property> | ||
77 | <property name="fill">False</property> | ||
78 | <property name="position">1</property> | ||
79 | </packing> | ||
80 | </child> | ||
81 | <child> | ||
82 | <object class="GtkButton" id="GNUNET_GTK_edit_publication_add_button"> | ||
83 | <property name="label">gtk-add</property> | ||
84 | <property name="use_action_appearance">False</property> | ||
85 | <property name="visible">True</property> | ||
86 | <property name="can_focus">True</property> | ||
87 | <property name="receives_default">True</property> | ||
88 | <property name="use_stock">True</property> | ||
89 | <signal name="clicked" handler="GNUNET_GTK_edit_publication_add_button_clicked_cb" swapped="no"/> | ||
90 | </object> | ||
91 | <packing> | ||
92 | <property name="expand">False</property> | ||
93 | <property name="fill">False</property> | ||
94 | <property name="position">2</property> | ||
95 | </packing> | ||
96 | </child> | ||
97 | <child> | ||
98 | <object class="GtkButton" id="GNUNET_GTK_edit_publication_delete_button"> | ||
99 | <property name="label">gtk-delete</property> | ||
100 | <property name="use_action_appearance">False</property> | ||
101 | <property name="visible">True</property> | ||
102 | <property name="sensitive">False</property> | ||
103 | <property name="can_focus">True</property> | ||
104 | <property name="receives_default">True</property> | ||
105 | <property name="use_stock">True</property> | ||
106 | <signal name="clicked" handler="GNUNET_GTK_edit_publication_delete_button_clicked_cb" swapped="no"/> | ||
107 | </object> | ||
108 | <packing> | ||
109 | <property name="expand">False</property> | ||
110 | <property name="fill">False</property> | ||
111 | <property name="padding">5</property> | ||
112 | <property name="position">3</property> | ||
113 | </packing> | ||
114 | </child> | ||
115 | </object> | ||
116 | <packing> | ||
117 | <property name="expand">False</property> | ||
118 | <property name="fill">False</property> | ||
119 | <property name="position">0</property> | ||
120 | </packing> | ||
121 | </child> | ||
122 | <child> | ||
123 | <object class="GtkScrolledWindow" id="GNUNET_GTK_edit_publication_metadata_scrolled_window"> | ||
124 | <property name="width_request">400</property> | ||
125 | <property name="height_request">120</property> | ||
126 | <property name="visible">True</property> | ||
127 | <property name="can_focus">True</property> | ||
128 | <property name="hscrollbar_policy">automatic</property> | ||
129 | <property name="vscrollbar_policy">automatic</property> | ||
130 | <property name="shadow_type">in</property> | ||
131 | <child> | ||
132 | <object class="GtkTreeView" id="GNUNET_GTK_edit_publication_metadata_tree_view"> | ||
133 | <property name="visible">True</property> | ||
134 | <property name="can_focus">True</property> | ||
135 | <property name="model">GNUNET_GTK_publication_metadata_liststore</property> | ||
136 | <property name="enable_search">False</property> | ||
137 | <property name="search_column">0</property> | ||
138 | <property name="tooltip_column">4</property> | ||
139 | <child> | ||
140 | <object class="GtkTreeViewColumn" id="GNUNET_GTK_edit_publication_metadata_tree_view_type_column"> | ||
141 | <property name="resizable">True</property> | ||
142 | <property name="title" translatable="yes">Type</property> | ||
143 | <property name="clickable">True</property> | ||
144 | <property name="sort_column_id">1</property> | ||
145 | <child> | ||
146 | <object class="GtkCellRendererCombo" id="GNUNET_GTK_edit_publication_metadata_tree_view_type_renderer"> | ||
147 | <property name="editable">True</property> | ||
148 | <property name="has_entry">False</property> | ||
149 | <property name="model">GNUNET_GTK_publication_metadata_types_liststore</property> | ||
150 | <property name="text_column">2</property> | ||
151 | <signal name="changed" handler="GNUNET_GTK_edit_publication_metadata_tree_view_type_renderer_changed_cb" swapped="no"/> | ||
152 | <signal name="edited" handler="GNUNET_GTK_edit_publication_metadata_tree_view_type_renderer_edited_cb" swapped="no"/> | ||
153 | </object> | ||
154 | <attributes> | ||
155 | <attribute name="text">2</attribute> | ||
156 | </attributes> | ||
157 | </child> | ||
158 | </object> | ||
159 | </child> | ||
160 | <child> | ||
161 | <object class="GtkTreeViewColumn" id="GNUNET_GTK_edit_publication_metadata_tree_view_description_column"> | ||
162 | <property name="sizing">autosize</property> | ||
163 | <property name="title" translatable="yes">Value</property> | ||
164 | <property name="expand">True</property> | ||
165 | <property name="clickable">True</property> | ||
166 | <property name="sort_column_id">2</property> | ||
167 | <child> | ||
168 | <object class="GtkCellRendererText" id="GNUNET_GTK_edit_publication_metadata_tree_view_value_renderer"> | ||
169 | <property name="editable">True</property> | ||
170 | <signal name="edited" handler="GNUNET_GTK_edit_publication_metadata_tree_view_value_renderer_edited_cb" swapped="no"/> | ||
171 | </object> | ||
172 | <attributes> | ||
173 | <attribute name="text">3</attribute> | ||
174 | </attributes> | ||
175 | </child> | ||
176 | </object> | ||
177 | </child> | ||
178 | </object> | ||
179 | </child> | ||
180 | </object> | ||
181 | <packing> | ||
182 | <property name="expand">True</property> | ||
183 | <property name="fill">True</property> | ||
184 | <property name="position">1</property> | ||
185 | </packing> | ||
186 | </child> | ||
187 | </object> | ||
188 | <packing> | ||
189 | <property name="resize">True</property> | ||
190 | <property name="shrink">False</property> | ||
191 | </packing> | ||
192 | </child> | ||
193 | <child> | ||
194 | <object class="GtkFrame" id="GNUNET_GTK_edit_publication_metadata_preview_frame"> | ||
195 | <property name="visible">True</property> | ||
196 | <property name="can_focus">False</property> | ||
197 | <property name="label_xalign">0</property> | ||
198 | <child> | ||
199 | <object class="GtkAlignment" id="GNUNET_GTK_edit_publication_metadata_preview_alignment"> | ||
200 | <property name="visible">True</property> | ||
201 | <property name="can_focus">False</property> | ||
202 | <property name="left_padding">12</property> | ||
203 | <child> | ||
204 | <object class="GtkVBox" id="GNUNET_GTK_edit_publication_metadata_preview_vbox"> | ||
205 | <property name="visible">True</property> | ||
206 | <property name="can_focus">False</property> | ||
207 | <child> | ||
208 | <object class="GtkFileChooserButton" id="GNUNET_GTK_edit_publication_metadata_preview_file_chooser_button"> | ||
209 | <property name="visible">True</property> | ||
210 | <property name="can_focus">True</property> | ||
211 | <property name="create_folders">False</property> | ||
212 | <property name="title" translatable="yes">Select file</property> | ||
213 | <signal name="file-set" handler="GNUNET_GTK_edit_publication_metadata_preview_file_chooser_button_file_set_cb" swapped="no"/> | ||
214 | </object> | ||
215 | <packing> | ||
216 | <property name="expand">False</property> | ||
217 | <property name="fill">False</property> | ||
218 | <property name="position">0</property> | ||
219 | </packing> | ||
220 | </child> | ||
221 | <child> | ||
222 | <object class="GtkScrolledWindow" id="GNUNET_GTK_edit_publication_metadata_preview_image_scrolled_window"> | ||
223 | <property name="visible">True</property> | ||
224 | <property name="can_focus">True</property> | ||
225 | <property name="hadjustment">GNUNET_GTK_edit_publication_metadata_preview_image_horizontal_adjustment</property> | ||
226 | <property name="vadjustment">GNUNET_GTK_edit_publication_metadata_preview_image_verticall_adjustment</property> | ||
227 | <property name="hscrollbar_policy">automatic</property> | ||
228 | <property name="vscrollbar_policy">automatic</property> | ||
229 | <child> | ||
230 | <object class="GtkViewport" id="GNUNET_GTK_edit_publication_metadata_preview_image_viewport"> | ||
231 | <property name="visible">True</property> | ||
232 | <property name="can_focus">False</property> | ||
233 | <property name="hadjustment">GNUNET_GTK_edit_publication_metadata_preview_image_horizontal_adjustment</property> | ||
234 | <property name="vadjustment">GNUNET_GTK_edit_publication_metadata_preview_image_verticall_adjustment</property> | ||
235 | <property name="shadow_type">none</property> | ||
236 | <child> | ||
237 | <object class="GtkImage" id="GNUNET_GTK_edit_publication_metadata_preview_image"> | ||
238 | <property name="can_focus">False</property> | ||
239 | <property name="stock">gtk-missing-image</property> | ||
240 | </object> | ||
241 | </child> | ||
242 | </object> | ||
243 | </child> | ||
244 | </object> | ||
245 | <packing> | ||
246 | <property name="expand">True</property> | ||
247 | <property name="fill">True</property> | ||
248 | <property name="position">1</property> | ||
249 | </packing> | ||
250 | </child> | ||
251 | </object> | ||
252 | </child> | ||
253 | </object> | ||
254 | </child> | ||
255 | <child type="label"> | ||
256 | <object class="GtkLabel" id="label1"> | ||
257 | <property name="visible">True</property> | ||
258 | <property name="can_focus">False</property> | ||
259 | <property name="label" translatable="yes">Preview:</property> | ||
260 | <property name="use_markup">True</property> | ||
261 | </object> | ||
262 | </child> | ||
263 | </object> | ||
264 | <packing> | ||
265 | <property name="resize">True</property> | ||
266 | <property name="shrink">False</property> | ||
267 | </packing> | ||
268 | </child> | ||
269 | </object> | ||
270 | <packing> | ||
271 | <property name="resize">True</property> | ||
272 | <property name="shrink">False</property> | ||
273 | </packing> | ||
274 | </child> | ||
275 | <child> | ||
276 | <object class="GtkHBox" id="GNUNET_GTK_edit_publication_secondary_hbox"> | ||
277 | <property name="visible">True</property> | ||
278 | <property name="can_focus">False</property> | ||
279 | <child> | ||
280 | <object class="GtkHBox" id="GNUNET_GTK_edit_publication_keyword_list_hbox"> | ||
281 | <property name="visible">True</property> | ||
282 | <property name="can_focus">False</property> | ||
283 | <child> | ||
284 | <object class="GtkVBox" id="vbox2"> | ||
285 | <property name="visible">True</property> | ||
286 | <property name="can_focus">False</property> | ||
287 | <child> | ||
288 | <object class="GtkHBox" id="hbox3"> | ||
289 | <property name="visible">True</property> | ||
290 | <property name="can_focus">False</property> | ||
291 | <child> | ||
292 | <object class="GtkLabel" id="GNUNET_GTK_edit_publication_keyword_label"> | ||
293 | <property name="visible">True</property> | ||
294 | <property name="can_focus">False</property> | ||
295 | <property name="label" translatable="yes">_Keyword:</property> | ||
296 | <property name="use_underline">True</property> | ||
297 | <property name="mnemonic_widget">GNUNET_GTK_edit_publication_keyword_entry</property> | ||
298 | </object> | ||
299 | <packing> | ||
300 | <property name="expand">False</property> | ||
301 | <property name="fill">False</property> | ||
302 | <property name="position">0</property> | ||
303 | </packing> | ||
304 | </child> | ||
305 | <child> | ||
306 | <object class="GtkEntry" id="GNUNET_GTK_edit_publication_keyword_entry"> | ||
307 | <property name="visible">True</property> | ||
308 | <property name="can_focus">True</property> | ||
309 | <property name="invisible_char">●</property> | ||
310 | <property name="invisible_char_set">True</property> | ||
311 | <property name="caps_lock_warning">False</property> | ||
312 | <property name="primary_icon_activatable">False</property> | ||
313 | <property name="secondary_icon_activatable">False</property> | ||
314 | <property name="primary_icon_sensitive">True</property> | ||
315 | <property name="secondary_icon_sensitive">True</property> | ||
316 | <signal name="key-press-event" handler="GNUNET_GTK_edit_publication_keyword_entry_key_press_event_cb" swapped="no"/> | ||
317 | </object> | ||
318 | <packing> | ||
319 | <property name="expand">True</property> | ||
320 | <property name="fill">True</property> | ||
321 | <property name="position">1</property> | ||
322 | </packing> | ||
323 | </child> | ||
324 | </object> | ||
325 | <packing> | ||
326 | <property name="expand">False</property> | ||
327 | <property name="fill">True</property> | ||
328 | <property name="position">0</property> | ||
329 | </packing> | ||
330 | </child> | ||
331 | <child> | ||
332 | <object class="GtkScrolledWindow" id="GNUNET_GTK_edit_publication_keyword_scrolled_window"> | ||
333 | <property name="width_request">400</property> | ||
334 | <property name="height_request">120</property> | ||
335 | <property name="visible">True</property> | ||
336 | <property name="can_focus">True</property> | ||
337 | <property name="hscrollbar_policy">never</property> | ||
338 | <property name="vscrollbar_policy">automatic</property> | ||
339 | <property name="shadow_type">in</property> | ||
340 | <child> | ||
341 | <object class="GtkTreeView" id="GNUNET_GTK_edit_publication_keyword_list_tree_view"> | ||
342 | <property name="visible">True</property> | ||
343 | <property name="can_focus">True</property> | ||
344 | <property name="model">GNUNET_GTK_publication_keywords_liststore</property> | ||
345 | <property name="search_column">0</property> | ||
346 | <child> | ||
347 | <object class="GtkTreeViewColumn" id="GNUNET_GTK_edit_publication_keyword_list_tree_view_column"> | ||
348 | <property name="title" translatable="yes">Keywords</property> | ||
349 | <property name="clickable">True</property> | ||
350 | <property name="reorderable">True</property> | ||
351 | <property name="sort_column_id">0</property> | ||
352 | <child> | ||
353 | <object class="GtkCellRendererText" id="GNUNET_GTK_edit_publication_keyword_list_tree_view_renderer"/> | ||
354 | <attributes> | ||
355 | <attribute name="text">0</attribute> | ||
356 | </attributes> | ||
357 | </child> | ||
358 | </object> | ||
359 | </child> | ||
360 | </object> | ||
361 | </child> | ||
362 | </object> | ||
363 | <packing> | ||
364 | <property name="expand">True</property> | ||
365 | <property name="fill">True</property> | ||
366 | <property name="position">1</property> | ||
367 | </packing> | ||
368 | </child> | ||
369 | <child> | ||
370 | <object class="GtkCheckButton" id="GNUNET_GTK_edit_publication_normalization_checkbox"> | ||
371 | <property name="label" translatable="yes">Normalize all keywords a_utomatically after "OK" is pressed</property> | ||
372 | <property name="use_action_appearance">False</property> | ||
373 | <property name="sensitive">False</property> | ||
374 | <property name="can_focus">True</property> | ||
375 | <property name="receives_default">False</property> | ||
376 | <property name="use_underline">True</property> | ||
377 | <property name="draw_indicator">True</property> | ||
378 | <signal name="toggled" handler="GNUNET_GTK_edit_publication_normalization_checkbox_toggled_cb" swapped="no"/> | ||
379 | </object> | ||
380 | <packing> | ||
381 | <property name="expand">False</property> | ||
382 | <property name="fill">False</property> | ||
383 | <property name="position">2</property> | ||
384 | </packing> | ||
385 | </child> | ||
386 | </object> | ||
387 | <packing> | ||
388 | <property name="expand">True</property> | ||
389 | <property name="fill">True</property> | ||
390 | <property name="position">0</property> | ||
391 | </packing> | ||
392 | </child> | ||
393 | <child> | ||
394 | <object class="GtkVBox" id="GNUNET_GTK_edit_publication_keyword_list_button_vbox"> | ||
395 | <property name="visible">True</property> | ||
396 | <property name="can_focus">False</property> | ||
397 | <child> | ||
398 | <object class="GtkButton" id="GNUNET_GTK_edit_publication_keyword_list_add_button"> | ||
399 | <property name="label">Add key_word</property> | ||
400 | <property name="use_action_appearance">False</property> | ||
401 | <property name="visible">True</property> | ||
402 | <property name="can_focus">True</property> | ||
403 | <property name="receives_default">True</property> | ||
404 | <property name="image">add_stock_image</property> | ||
405 | <property name="use_underline">True</property> | ||
406 | <signal name="clicked" handler="GNUNET_GTK_edit_publication_keyword_list_add_button_clicked_cb" swapped="no"/> | ||
407 | </object> | ||
408 | <packing> | ||
409 | <property name="expand">False</property> | ||
410 | <property name="fill">False</property> | ||
411 | <property name="position">0</property> | ||
412 | </packing> | ||
413 | </child> | ||
414 | <child> | ||
415 | <object class="GtkButton" id="GNUNET_GTK_edit_publication_keyword_list_normalize_button"> | ||
416 | <property name="label" translatable="yes">_Normalize selected</property> | ||
417 | <property name="use_action_appearance">False</property> | ||
418 | <property name="sensitive">False</property> | ||
419 | <property name="can_focus">True</property> | ||
420 | <property name="receives_default">True</property> | ||
421 | <property name="use_underline">True</property> | ||
422 | <signal name="clicked" handler="GNUNET_GTK_edit_publication_keyword_list_normalize_button_clicked_cb" swapped="no"/> | ||
423 | </object> | ||
424 | <packing> | ||
425 | <property name="expand">False</property> | ||
426 | <property name="fill">False</property> | ||
427 | <property name="pack_type">end</property> | ||
428 | <property name="position">0</property> | ||
429 | </packing> | ||
430 | </child> | ||
431 | <child> | ||
432 | <object class="GtkButton" id="GNUNET_GTK_edit_publication_keyword_list_del_button"> | ||
433 | <property name="label">Delete _selected</property> | ||
434 | <property name="use_action_appearance">False</property> | ||
435 | <property name="visible">True</property> | ||
436 | <property name="sensitive">False</property> | ||
437 | <property name="can_focus">True</property> | ||
438 | <property name="receives_default">True</property> | ||
439 | <property name="use_underline">True</property> | ||
440 | <signal name="clicked" handler="GNUNET_GTK_edit_publication_keyword_list_del_button_clicked_cb" swapped="no"/> | ||
441 | </object> | ||
442 | <packing> | ||
443 | <property name="expand">False</property> | ||
444 | <property name="fill">False</property> | ||
445 | <property name="padding">5</property> | ||
446 | <property name="pack_type">end</property> | ||
447 | <property name="position">1</property> | ||
448 | </packing> | ||
449 | </child> | ||
450 | </object> | ||
451 | <packing> | ||
452 | <property name="expand">False</property> | ||
453 | <property name="fill">False</property> | ||
454 | <property name="padding">5</property> | ||
455 | <property name="position">1</property> | ||
456 | </packing> | ||
457 | </child> | ||
458 | </object> | ||
459 | <packing> | ||
460 | <property name="expand">True</property> | ||
461 | <property name="fill">True</property> | ||
462 | <property name="padding">4</property> | ||
463 | <property name="position">0</property> | ||
464 | </packing> | ||
465 | </child> | ||
466 | <child> | ||
467 | <object class="GtkFrame" id="frame3"> | ||
468 | <property name="visible">True</property> | ||
469 | <property name="can_focus">False</property> | ||
470 | <property name="label_xalign">0</property> | ||
471 | <child> | ||
472 | <object class="GtkAlignment" id="alignment3"> | ||
473 | <property name="visible">True</property> | ||
474 | <property name="can_focus">False</property> | ||
475 | <property name="yalign">0</property> | ||
476 | <property name="yscale">0</property> | ||
477 | <property name="left_padding">4</property> | ||
478 | <property name="right_padding">4</property> | ||
479 | <child> | ||
480 | <object class="GtkVBox" id="GNUNET_GTK_edit_publication_misc_vbox"> | ||
481 | <property name="visible">True</property> | ||
482 | <property name="can_focus">False</property> | ||
483 | <child> | ||
484 | <object class="GtkHBox" id="GNUNET_GTK_edit_publication_anonymity_hbox"> | ||
485 | <property name="visible">True</property> | ||
486 | <property name="can_focus">False</property> | ||
487 | <child> | ||
488 | <object class="GtkLabel" id="GNUNET_GTK_edit_publication_anonymity_label"> | ||
489 | <property name="visible">True</property> | ||
490 | <property name="can_focus">False</property> | ||
491 | <property name="xalign">1</property> | ||
492 | <property name="label" translatable="yes">A_nonymity:</property> | ||
493 | <property name="use_underline">True</property> | ||
494 | </object> | ||
495 | <packing> | ||
496 | <property name="expand">False</property> | ||
497 | <property name="fill">False</property> | ||
498 | <property name="padding">5</property> | ||
499 | <property name="position">0</property> | ||
500 | </packing> | ||
501 | </child> | ||
502 | <child> | ||
503 | <object class="GtkAlignment" id="GNUNET_GTK_edit_publication_anonymity_combobox_alignment"> | ||
504 | <property name="visible">True</property> | ||
505 | <property name="can_focus">False</property> | ||
506 | <property name="yscale">0</property> | ||
507 | <child> | ||
508 | <object class="GtkComboBox" id="GNUNET_GTK_edit_publication_anonymity_combobox"> | ||
509 | <property name="visible">True</property> | ||
510 | <property name="can_focus">False</property> | ||
511 | <property name="model">main_window_search_anonymity_liststore</property> | ||
512 | <property name="active">1</property> | ||
513 | <child> | ||
514 | <object class="GtkCellRendererText" id="GNUNET_GTK_edit_publication_anonymity_combobox_renderer"/> | ||
515 | <attributes> | ||
516 | <attribute name="foreground">2</attribute> | ||
517 | <attribute name="text">0</attribute> | ||
518 | </attributes> | ||
519 | </child> | ||
520 | <child> | ||
521 | <object class="GtkCellRendererText" id="GNUNET_GTK_edit_publication_anonymity_combobox_renerer_level"/> | ||
522 | <attributes> | ||
523 | <attribute name="text">1</attribute> | ||
524 | </attributes> | ||
525 | </child> | ||
526 | </object> | ||
527 | </child> | ||
528 | </object> | ||
529 | <packing> | ||
530 | <property name="expand">False</property> | ||
531 | <property name="fill">False</property> | ||
532 | <property name="position">1</property> | ||
533 | </packing> | ||
534 | </child> | ||
535 | </object> | ||
536 | <packing> | ||
537 | <property name="expand">False</property> | ||
538 | <property name="fill">False</property> | ||
539 | <property name="position">0</property> | ||
540 | </packing> | ||
541 | </child> | ||
542 | <child> | ||
543 | <object class="GtkHBox" id="GNUNET_GTK_edit_publication_priority_hbox"> | ||
544 | <property name="visible">True</property> | ||
545 | <property name="can_focus">False</property> | ||
546 | <child> | ||
547 | <object class="GtkLabel" id="GNUNET_GTK_edit_publication_priority_label"> | ||
548 | <property name="visible">True</property> | ||
549 | <property name="can_focus">False</property> | ||
550 | <property name="xalign">1</property> | ||
551 | <property name="label" translatable="yes">_Priority:</property> | ||
552 | <property name="use_underline">True</property> | ||
553 | </object> | ||
554 | <packing> | ||
555 | <property name="expand">False</property> | ||
556 | <property name="fill">False</property> | ||
557 | <property name="padding">5</property> | ||
558 | <property name="position">0</property> | ||
559 | </packing> | ||
560 | </child> | ||
561 | <child> | ||
562 | <object class="GtkSpinButton" id="GNUNET_GTK_edit_publication_priority_spin_button"> | ||
563 | <property name="visible">True</property> | ||
564 | <property name="can_focus">True</property> | ||
565 | <property name="invisible_char">●</property> | ||
566 | <property name="invisible_char_set">True</property> | ||
567 | <property name="primary_icon_activatable">False</property> | ||
568 | <property name="secondary_icon_activatable">False</property> | ||
569 | <property name="primary_icon_sensitive">True</property> | ||
570 | <property name="secondary_icon_sensitive">True</property> | ||
571 | <property name="adjustment">priority_adjustment</property> | ||
572 | <property name="numeric">True</property> | ||
573 | </object> | ||
574 | <packing> | ||
575 | <property name="expand">False</property> | ||
576 | <property name="fill">False</property> | ||
577 | <property name="position">1</property> | ||
578 | </packing> | ||
579 | </child> | ||
580 | </object> | ||
581 | <packing> | ||
582 | <property name="expand">False</property> | ||
583 | <property name="fill">False</property> | ||
584 | <property name="position">1</property> | ||
585 | </packing> | ||
586 | </child> | ||
587 | <child> | ||
588 | <object class="GtkHBox" id="GNUNET_GTK_edit_publication_root_hbox"> | ||
589 | <property name="visible">True</property> | ||
590 | <property name="can_focus">False</property> | ||
591 | <child> | ||
592 | <object class="GtkLabel" id="GNUNET_GTK_edit_publication_root_label"> | ||
593 | <property name="visible">True</property> | ||
594 | <property name="can_focus">False</property> | ||
595 | <property name="xalign">1</property> | ||
596 | <property name="label" translatable="yes">_Root keyword:</property> | ||
597 | <property name="use_underline">True</property> | ||
598 | </object> | ||
599 | <packing> | ||
600 | <property name="expand">False</property> | ||
601 | <property name="fill">False</property> | ||
602 | <property name="padding">5</property> | ||
603 | <property name="position">0</property> | ||
604 | </packing> | ||
605 | </child> | ||
606 | <child> | ||
607 | <object class="GtkEntry" id="GNUNET_GTK_edit_publication_root_entry"> | ||
608 | <property name="visible">True</property> | ||
609 | <property name="can_focus">True</property> | ||
610 | <property name="invisible_char">•</property> | ||
611 | <property name="text">root</property> | ||
612 | <property name="invisible_char_set">True</property> | ||
613 | <property name="primary_icon_activatable">False</property> | ||
614 | <property name="secondary_icon_activatable">False</property> | ||
615 | <property name="primary_icon_sensitive">True</property> | ||
616 | <property name="secondary_icon_sensitive">True</property> | ||
617 | </object> | ||
618 | <packing> | ||
619 | <property name="expand">False</property> | ||
620 | <property name="fill">False</property> | ||
621 | <property name="position">1</property> | ||
622 | </packing> | ||
623 | </child> | ||
624 | </object> | ||
625 | <packing> | ||
626 | <property name="expand">False</property> | ||
627 | <property name="fill">False</property> | ||
628 | <property name="position">2</property> | ||
629 | </packing> | ||
630 | </child> | ||
631 | <child> | ||
632 | <object class="GtkHBox" id="hbox4"> | ||
633 | <property name="visible">True</property> | ||
634 | <property name="can_focus">False</property> | ||
635 | <child> | ||
636 | <object class="GtkLabel" id="GNUNET_GTK_edit_publication_expiration_label"> | ||
637 | <property name="visible">True</property> | ||
638 | <property name="can_focus">False</property> | ||
639 | <property name="xalign">1</property> | ||
640 | <property name="label" translatable="yes">_Expriation year:</property> | ||
641 | <property name="use_underline">True</property> | ||
642 | </object> | ||
643 | <packing> | ||
644 | <property name="expand">False</property> | ||
645 | <property name="fill">False</property> | ||
646 | <property name="padding">5</property> | ||
647 | <property name="position">0</property> | ||
648 | </packing> | ||
649 | </child> | ||
650 | <child> | ||
651 | <object class="GtkSpinButton" id="GNUNET_GTK_edit_publication_expiration_year_spin_button"> | ||
652 | <property name="visible">True</property> | ||
653 | <property name="can_focus">True</property> | ||
654 | <property name="max_length">4</property> | ||
655 | <property name="invisible_char">•</property> | ||
656 | <property name="invisible_char_set">True</property> | ||
657 | <property name="primary_icon_activatable">False</property> | ||
658 | <property name="secondary_icon_activatable">False</property> | ||
659 | <property name="primary_icon_sensitive">True</property> | ||
660 | <property name="secondary_icon_sensitive">True</property> | ||
661 | <property name="adjustment">expiration_year_adjustment</property> | ||
662 | <property name="climb_rate">1</property> | ||
663 | <property name="numeric">True</property> | ||
664 | </object> | ||
665 | <packing> | ||
666 | <property name="expand">False</property> | ||
667 | <property name="fill">False</property> | ||
668 | <property name="position">1</property> | ||
669 | </packing> | ||
670 | </child> | ||
671 | </object> | ||
672 | <packing> | ||
673 | <property name="expand">False</property> | ||
674 | <property name="fill">False</property> | ||
675 | <property name="position">3</property> | ||
676 | </packing> | ||
677 | </child> | ||
678 | <child> | ||
679 | <object class="GtkHBox" id="GNUNET_GTK_edit_publication_index_hbox"> | ||
680 | <property name="visible">True</property> | ||
681 | <property name="can_focus">False</property> | ||
682 | <child> | ||
683 | <object class="GtkLabel" id="GNUNET_GTK_edit_publication_index_label"> | ||
684 | <property name="visible">True</property> | ||
685 | <property name="can_focus">False</property> | ||
686 | <property name="xalign">1</property> | ||
687 | <property name="label" translatable="yes">_Index file:</property> | ||
688 | <property name="use_underline">True</property> | ||
689 | <property name="mnemonic_widget">GNUNET_GTK_edit_publication_index_checkbutton</property> | ||
690 | </object> | ||
691 | <packing> | ||
692 | <property name="expand">False</property> | ||
693 | <property name="fill">False</property> | ||
694 | <property name="padding">5</property> | ||
695 | <property name="position">0</property> | ||
696 | </packing> | ||
697 | </child> | ||
698 | <child> | ||
699 | <object class="GtkCheckButton" id="GNUNET_GTK_edit_publication_index_checkbutton"> | ||
700 | <property name="use_action_appearance">False</property> | ||
701 | <property name="visible">True</property> | ||
702 | <property name="can_focus">True</property> | ||
703 | <property name="receives_default">False</property> | ||
704 | <property name="draw_indicator">True</property> | ||
705 | </object> | ||
706 | <packing> | ||
707 | <property name="expand">False</property> | ||
708 | <property name="fill">False</property> | ||
709 | <property name="position">1</property> | ||
710 | </packing> | ||
711 | </child> | ||
712 | </object> | ||
713 | <packing> | ||
714 | <property name="expand">True</property> | ||
715 | <property name="fill">True</property> | ||
716 | <property name="position">4</property> | ||
717 | </packing> | ||
718 | </child> | ||
719 | </object> | ||
720 | </child> | ||
721 | </object> | ||
722 | </child> | ||
723 | <child type="label"> | ||
724 | <object class="GtkLabel" id="label2"> | ||
725 | <property name="visible">True</property> | ||
726 | <property name="can_focus">False</property> | ||
727 | <property name="label" translatable="yes">Publication options:</property> | ||
728 | <property name="use_markup">True</property> | ||
729 | </object> | ||
730 | </child> | ||
731 | </object> | ||
732 | <packing> | ||
733 | <property name="expand">False</property> | ||
734 | <property name="fill">False</property> | ||
735 | <property name="position">1</property> | ||
736 | </packing> | ||
737 | </child> | ||
738 | </object> | ||
739 | <packing> | ||
740 | <property name="resize">True</property> | ||
741 | <property name="shrink">False</property> | ||
742 | </packing> | ||
743 | </child> | ||
744 | </object> | ||
745 | <packing> | ||
746 | <property name="expand">True</property> | ||
747 | <property name="fill">True</property> | ||
748 | <property name="position">0</property> | ||
749 | </packing> | ||
750 | </child> | ||
751 | <child> | ||
752 | <object class="GtkHBox" id="GNUNET_GTK_edit_publication_buttons_hbox"> | ||
753 | <property name="visible">True</property> | ||
754 | <property name="can_focus">False</property> | ||
755 | <child> | ||
756 | <object class="GtkButton" id="GNUNET_GTK_edit_publication_confirm_button"> | ||
757 | <property name="label">gtk-ok</property> | ||
758 | <property name="use_action_appearance">False</property> | ||
759 | <property name="visible">True</property> | ||
760 | <property name="sensitive">False</property> | ||
761 | <property name="can_focus">True</property> | ||
762 | <property name="can_default">True</property> | ||
763 | <property name="has_default">True</property> | ||
764 | <property name="receives_default">True</property> | ||
765 | <property name="use_stock">True</property> | ||
766 | <signal name="clicked" handler="GNUNET_GTK_edit_publication_confirm_button_clicked_cb" swapped="no"/> | ||
767 | </object> | ||
768 | <packing> | ||
769 | <property name="expand">False</property> | ||
770 | <property name="fill">False</property> | ||
771 | <property name="padding">4</property> | ||
772 | <property name="pack_type">end</property> | ||
773 | <property name="position">0</property> | ||
774 | </packing> | ||
775 | </child> | ||
776 | <child> | ||
777 | <object class="GtkButton" id="GNUNET_GTK_edit_publication_cancel_button"> | ||
778 | <property name="label">gtk-cancel</property> | ||
779 | <property name="use_action_appearance">False</property> | ||
780 | <property name="visible">True</property> | ||
781 | <property name="can_focus">True</property> | ||
782 | <property name="receives_default">True</property> | ||
783 | <property name="use_stock">True</property> | ||
784 | <signal name="clicked" handler="GNUNET_GTK_edit_publication_cancel_button_clicked_cb" swapped="no"/> | ||
785 | </object> | ||
786 | <packing> | ||
787 | <property name="expand">False</property> | ||
788 | <property name="fill">False</property> | ||
789 | <property name="padding">4</property> | ||
790 | <property name="pack_type">end</property> | ||
791 | <property name="position">1</property> | ||
792 | </packing> | ||
793 | </child> | ||
794 | </object> | ||
795 | <packing> | ||
796 | <property name="expand">False</property> | ||
797 | <property name="fill">False</property> | ||
798 | <property name="padding">1</property> | ||
799 | <property name="pack_type">end</property> | ||
800 | <property name="position">1</property> | ||
801 | </packing> | ||
802 | </child> | ||
803 | </object> | ||
804 | </child> | ||
805 | </object> | ||
806 | <object class="GtkTreeStore" id="GNUNET_GTK_file_sharing_publishing_tree_store"> | ||
807 | <columns> | ||
808 | <!-- column-name filesize --> | ||
809 | <column type="gchararray"/> | ||
810 | <!-- column-name do_index --> | ||
811 | <column type="gboolean"/> | ||
812 | <!-- column-name filename --> | ||
813 | <column type="gchararray"/> | ||
814 | <!-- column-name anonymity_level --> | ||
815 | <column type="guint"/> | ||
816 | <!-- column-name priority --> | ||
817 | <column type="guint"/> | ||
818 | <!-- column-name file_information_struct --> | ||
819 | <column type="gpointer"/> | ||
820 | </columns> | ||
821 | </object> | ||
5 | <object class="GtkWindow" id="GNUNET_GTK_main_window"> | 822 | <object class="GtkWindow" id="GNUNET_GTK_main_window"> |
6 | <property name="can_focus">False</property> | 823 | <property name="can_focus">False</property> |
7 | <property name="title" translatable="yes">gnunet-fs-gtk</property> | 824 | <property name="title" translatable="yes">gnunet-fs-gtk</property> |
@@ -41,7 +858,6 @@ | |||
41 | <property name="use_underline">True</property> | 858 | <property name="use_underline">True</property> |
42 | <child type="submenu"> | 859 | <child type="submenu"> |
43 | <object class="GtkMenu" id="GNUNET_GTK_main_menu_file_sharing_box"> | 860 | <object class="GtkMenu" id="GNUNET_GTK_main_menu_file_sharing_box"> |
44 | <property name="visible">True</property> | ||
45 | <property name="can_focus">False</property> | 861 | <property name="can_focus">False</property> |
46 | <child> | 862 | <child> |
47 | <object class="GtkImageMenuItem" id="GNUNET_GTK_main_menu_file_create_pseudonym"> | 863 | <object class="GtkImageMenuItem" id="GNUNET_GTK_main_menu_file_create_pseudonym"> |
@@ -52,7 +868,7 @@ | |||
52 | <property name="tooltip_text" translatable="yes">Create a pseudonym for publishing content. Note that you can also publish content anonymously (without using a pseudonym).</property> | 868 | <property name="tooltip_text" translatable="yes">Create a pseudonym for publishing content. Note that you can also publish content anonymously (without using a pseudonym).</property> |
53 | <property name="accel_path"><gnunet-fs-gtk>/File sharing/Create pseudonym</property> | 869 | <property name="accel_path"><gnunet-fs-gtk>/File sharing/Create pseudonym</property> |
54 | <property name="use_underline">True</property> | 870 | <property name="use_underline">True</property> |
55 | <property name="image">image3</property> | 871 | <property name="image">new_stock_imag</property> |
56 | <property name="use_stock">False</property> | 872 | <property name="use_stock">False</property> |
57 | <accelerator key="n" signal="activate" modifiers="GDK_CONTROL_MASK"/> | 873 | <accelerator key="n" signal="activate" modifiers="GDK_CONTROL_MASK"/> |
58 | <signal name="activate" handler="GNUNET_GTK_main_menu_create_pseudonym_activate_cb" swapped="no"/> | 874 | <signal name="activate" handler="GNUNET_GTK_main_menu_create_pseudonym_activate_cb" swapped="no"/> |
@@ -65,7 +881,7 @@ | |||
65 | <property name="visible">True</property> | 881 | <property name="visible">True</property> |
66 | <property name="can_focus">False</property> | 882 | <property name="can_focus">False</property> |
67 | <property name="use_underline">True</property> | 883 | <property name="use_underline">True</property> |
68 | <property name="image">image6</property> | 884 | <property name="image">index_stock_image</property> |
69 | <property name="use_stock">False</property> | 885 | <property name="use_stock">False</property> |
70 | <signal name="activate" handler="GNUNET_GTK_main_menu_file_advertise_pseudonym_activate_cb" swapped="no"/> | 886 | <signal name="activate" handler="GNUNET_GTK_main_menu_file_advertise_pseudonym_activate_cb" swapped="no"/> |
71 | </object> | 887 | </object> |
@@ -79,7 +895,7 @@ | |||
79 | <property name="tooltip_text" translatable="yes">Publish files or directories on GNUnet</property> | 895 | <property name="tooltip_text" translatable="yes">Publish files or directories on GNUnet</property> |
80 | <property name="accel_path"><gnunet-fs-gtk>/File sharing/Publish</property> | 896 | <property name="accel_path"><gnunet-fs-gtk>/File sharing/Publish</property> |
81 | <property name="use_underline">True</property> | 897 | <property name="use_underline">True</property> |
82 | <property name="image">image2</property> | 898 | <property name="image">up_stock_image</property> |
83 | <property name="use_stock">False</property> | 899 | <property name="use_stock">False</property> |
84 | <accelerator key="a" signal="activate" modifiers="GDK_CONTROL_MASK"/> | 900 | <accelerator key="a" signal="activate" modifiers="GDK_CONTROL_MASK"/> |
85 | <signal name="activate" handler="GNUNET_GTK_main_menu_file_publish_activate_cb" swapped="no"/> | 901 | <signal name="activate" handler="GNUNET_GTK_main_menu_file_publish_activate_cb" swapped="no"/> |
@@ -88,7 +904,6 @@ | |||
88 | <child> | 904 | <child> |
89 | <object class="GtkSeparatorMenuItem" id="GNUNET_GTK_main_menu_file_sep1"> | 905 | <object class="GtkSeparatorMenuItem" id="GNUNET_GTK_main_menu_file_sep1"> |
90 | <property name="use_action_appearance">False</property> | 906 | <property name="use_action_appearance">False</property> |
91 | <property name="visible">True</property> | ||
92 | <property name="can_focus">False</property> | 907 | <property name="can_focus">False</property> |
93 | </object> | 908 | </object> |
94 | </child> | 909 | </child> |
@@ -96,12 +911,10 @@ | |||
96 | <object class="GtkImageMenuItem" id="GNUNET_GTK_main_menu_file_search"> | 911 | <object class="GtkImageMenuItem" id="GNUNET_GTK_main_menu_file_search"> |
97 | <property name="label" translatable="yes">_Search</property> | 912 | <property name="label" translatable="yes">_Search</property> |
98 | <property name="use_action_appearance">False</property> | 913 | <property name="use_action_appearance">False</property> |
99 | <property name="visible">True</property> | ||
100 | <property name="can_focus">False</property> | 914 | <property name="can_focus">False</property> |
101 | <property name="tooltip_text" translatable="yes">Search GNUnet for files</property> | 915 | <property name="tooltip_text" translatable="yes">Search GNUnet for files</property> |
102 | <property name="accel_path"><gnunet-fs-gtk>/File sharing/Search</property> | 916 | <property name="accel_path"><gnunet-fs-gtk>/File sharing/Search</property> |
103 | <property name="use_underline">True</property> | 917 | <property name="use_underline">True</property> |
104 | <property name="image">image4</property> | ||
105 | <property name="use_stock">False</property> | 918 | <property name="use_stock">False</property> |
106 | <accelerator key="s" signal="activate" modifiers="GDK_CONTROL_MASK"/> | 919 | <accelerator key="s" signal="activate" modifiers="GDK_CONTROL_MASK"/> |
107 | <signal name="activate" handler="GNUNET_GTK_main_menu_file_search_activate_cb" swapped="no"/> | 920 | <signal name="activate" handler="GNUNET_GTK_main_menu_file_search_activate_cb" swapped="no"/> |
@@ -123,7 +936,7 @@ | |||
123 | <property name="tooltip_text" translatable="yes">Download a file or directory with a known URI.</property> | 936 | <property name="tooltip_text" translatable="yes">Download a file or directory with a known URI.</property> |
124 | <property name="accel_path"><gnunet-fs-gtk>/File sharing/Download</property> | 937 | <property name="accel_path"><gnunet-fs-gtk>/File sharing/Download</property> |
125 | <property name="use_underline">True</property> | 938 | <property name="use_underline">True</property> |
126 | <property name="image">image5</property> | 939 | <property name="image">down_stock_image</property> |
127 | <property name="use_stock">False</property> | 940 | <property name="use_stock">False</property> |
128 | <accelerator key="d" signal="activate" modifiers="GDK_CONTROL_MASK"/> | 941 | <accelerator key="d" signal="activate" modifiers="GDK_CONTROL_MASK"/> |
129 | <signal name="activate" handler="GNUNET_GTK_main_menu_file_download_uri_activate_cb" swapped="no"/> | 942 | <signal name="activate" handler="GNUNET_GTK_main_menu_file_download_uri_activate_cb" swapped="no"/> |
@@ -138,7 +951,7 @@ | |||
138 | <property name="tooltip_text" translatable="yes">Use this option to browse a GNUnet directory file that has been previously downloaded.</property> | 951 | <property name="tooltip_text" translatable="yes">Use this option to browse a GNUnet directory file that has been previously downloaded.</property> |
139 | <property name="accel_path"><gnunet-fs-gtk>/File sharing/Open directory</property> | 952 | <property name="accel_path"><gnunet-fs-gtk>/File sharing/Open directory</property> |
140 | <property name="use_underline">True</property> | 953 | <property name="use_underline">True</property> |
141 | <property name="image">image1</property> | 954 | <property name="image">open_stock_image</property> |
142 | <property name="use_stock">False</property> | 955 | <property name="use_stock">False</property> |
143 | <accelerator key="F3" signal="activate"/> | 956 | <accelerator key="F3" signal="activate"/> |
144 | <signal name="activate" handler="GNUNET_GTK_main_menu_file_open_gnunet_directory_activate_cb" swapped="no"/> | 957 | <signal name="activate" handler="GNUNET_GTK_main_menu_file_open_gnunet_directory_activate_cb" swapped="no"/> |
@@ -387,6 +1200,7 @@ | |||
387 | <property name="visible">True</property> | 1200 | <property name="visible">True</property> |
388 | <property name="can_focus">True</property> | 1201 | <property name="can_focus">True</property> |
389 | <property name="receives_default">True</property> | 1202 | <property name="receives_default">True</property> |
1203 | <property name="image">find_stock_image</property> | ||
390 | <signal name="clicked" handler="main_window_search_button_clicked_cb" swapped="no"/> | 1204 | <signal name="clicked" handler="main_window_search_button_clicked_cb" swapped="no"/> |
391 | </object> | 1205 | </object> |
392 | </child> | 1206 | </child> |
@@ -403,8 +1217,7 @@ | |||
403 | <property name="can_focus">True</property> | 1217 | <property name="can_focus">True</property> |
404 | <property name="invisible_char">●</property> | 1218 | <property name="invisible_char">●</property> |
405 | <property name="invisible_char_set">True</property> | 1219 | <property name="invisible_char_set">True</property> |
406 | <property name="primary_icon_stock">gtk-find</property> | 1220 | <property name="primary_icon_activatable">False</property> |
407 | <property name="primary_icon_activatable">True</property> | ||
408 | <property name="secondary_icon_activatable">False</property> | 1221 | <property name="secondary_icon_activatable">False</property> |
409 | <property name="primary_icon_sensitive">True</property> | 1222 | <property name="primary_icon_sensitive">True</property> |
410 | <property name="secondary_icon_sensitive">True</property> | 1223 | <property name="secondary_icon_sensitive">True</property> |
@@ -665,6 +1478,407 @@ | |||
665 | </object> | 1478 | </object> |
666 | </child> | 1479 | </child> |
667 | </object> | 1480 | </object> |
1481 | <object class="GtkWindow" id="GNUNET_GTK_master_publish_dialog"> | ||
1482 | <property name="height_request">500</property> | ||
1483 | <property name="can_focus">False</property> | ||
1484 | <property name="title" translatable="yes">Publish content on GNUnet</property> | ||
1485 | <property name="window_position">center-on-parent</property> | ||
1486 | <property name="destroy_with_parent">True</property> | ||
1487 | <property name="deletable">False</property> | ||
1488 | <property name="transient_for">GNUNET_GTK_main_window</property> | ||
1489 | <signal name="realize" handler="GNUNET_GTK_master_publish_dialog_realize_cb" swapped="no"/> | ||
1490 | <signal name="delete-event" handler="GNUNET_GTK_master_publish_dialog_delete_event_cb" swapped="no"/> | ||
1491 | <child> | ||
1492 | <object class="GtkVBox" id="GNUNET_GTK_master_publish_dialog_vbox"> | ||
1493 | <property name="visible">True</property> | ||
1494 | <property name="can_focus">False</property> | ||
1495 | <property name="border_width">4</property> | ||
1496 | <property name="spacing">7</property> | ||
1497 | <child> | ||
1498 | <object class="GtkScrolledWindow" id="GNUNET_GTK_master_publish_dialog_file_information_scrolled_window"> | ||
1499 | <property name="visible">True</property> | ||
1500 | <property name="can_focus">True</property> | ||
1501 | <property name="hadjustment">adjustment5</property> | ||
1502 | <property name="vadjustment">adjustment6</property> | ||
1503 | <property name="hscrollbar_policy">automatic</property> | ||
1504 | <property name="vscrollbar_policy">automatic</property> | ||
1505 | <property name="shadow_type">in</property> | ||
1506 | <child> | ||
1507 | <object class="GtkTreeView" id="GNUNET_GTK_master_publish_dialog_file_information_tree_view"> | ||
1508 | <property name="height_request">100</property> | ||
1509 | <property name="visible">True</property> | ||
1510 | <property name="can_focus">True</property> | ||
1511 | <property name="model">GNUNET_GTK_file_sharing_publishing_tree_store</property> | ||
1512 | <property name="hadjustment">adjustment5</property> | ||
1513 | <property name="vadjustment">adjustment6</property> | ||
1514 | <property name="enable_tree_lines">True</property> | ||
1515 | <child> | ||
1516 | <object class="GtkTreeViewColumn" id="GNUNET_GTK_master_publish_dialog_file_information_filesize_column"> | ||
1517 | <property name="sizing">autosize</property> | ||
1518 | <property name="title" translatable="yes">Size</property> | ||
1519 | <child> | ||
1520 | <object class="GtkCellRendererText" id="GNUNET_GTK_master_publish_dialog_file_information_filesize_renderer"/> | ||
1521 | <attributes> | ||
1522 | <attribute name="text">0</attribute> | ||
1523 | </attributes> | ||
1524 | </child> | ||
1525 | </object> | ||
1526 | </child> | ||
1527 | <child> | ||
1528 | <object class="GtkTreeViewColumn" id="GNUNET_GTK_master_publish_dialog_file_information_filename_column"> | ||
1529 | <property name="resizable">True</property> | ||
1530 | <property name="sizing">autosize</property> | ||
1531 | <property name="title" translatable="yes">Filename</property> | ||
1532 | <property name="expand">True</property> | ||
1533 | <property name="clickable">True</property> | ||
1534 | <property name="reorderable">True</property> | ||
1535 | <property name="sort_indicator">True</property> | ||
1536 | <child> | ||
1537 | <object class="GtkCellRendererText" id="GNUNET_GTK_master_publish_dialog_file_information_filename_renderer"/> | ||
1538 | <attributes> | ||
1539 | <attribute name="text">2</attribute> | ||
1540 | </attributes> | ||
1541 | </child> | ||
1542 | </object> | ||
1543 | </child> | ||
1544 | </object> | ||
1545 | </child> | ||
1546 | </object> | ||
1547 | <packing> | ||
1548 | <property name="expand">True</property> | ||
1549 | <property name="fill">True</property> | ||
1550 | <property name="position">0</property> | ||
1551 | </packing> | ||
1552 | </child> | ||
1553 | <child> | ||
1554 | <object class="GtkHBox" id="GNUNET_GTK_master_dialog_modification_button_hbox"> | ||
1555 | <property name="visible">True</property> | ||
1556 | <property name="can_focus">False</property> | ||
1557 | <child> | ||
1558 | <object class="GtkTable" id="GNUNET_GTK_master_publish_dialog_action_table"> | ||
1559 | <property name="visible">True</property> | ||
1560 | <property name="can_focus">False</property> | ||
1561 | <property name="n_rows">2</property> | ||
1562 | <property name="n_columns">3</property> | ||
1563 | <child> | ||
1564 | <object class="GtkButton" id="GNUNET_GTK_master_publish_dialog_add_button"> | ||
1565 | <property name="label" translatable="yes">Add _File</property> | ||
1566 | <property name="use_action_appearance">False</property> | ||
1567 | <property name="visible">True</property> | ||
1568 | <property name="can_focus">True</property> | ||
1569 | <property name="receives_default">True</property> | ||
1570 | <property name="use_underline">True</property> | ||
1571 | <signal name="clicked" handler="GNUNET_GTK_master_publish_dialog_add_button_clicked_cb" swapped="no"/> | ||
1572 | </object> | ||
1573 | </child> | ||
1574 | <child> | ||
1575 | <object class="GtkButton" id="GNUNET_GTK_master_publish_dialog_new_button"> | ||
1576 | <property name="label" translatable="yes">_Create empty directory</property> | ||
1577 | <property name="use_action_appearance">False</property> | ||
1578 | <property name="visible">True</property> | ||
1579 | <property name="can_focus">True</property> | ||
1580 | <property name="receives_default">True</property> | ||
1581 | <property name="image">new_stock_image</property> | ||
1582 | <property name="use_underline">True</property> | ||
1583 | <signal name="clicked" handler="GNUNET_GTK_master_publish_dialog_new_button_clicked_cb" swapped="no"/> | ||
1584 | </object> | ||
1585 | <packing> | ||
1586 | <property name="left_attach">1</property> | ||
1587 | <property name="right_attach">3</property> | ||
1588 | </packing> | ||
1589 | </child> | ||
1590 | <child> | ||
1591 | <object class="GtkButton" id="GNUNET_GTK_master_publish_dialog_open_button"> | ||
1592 | <property name="label" translatable="yes">Add _Directory</property> | ||
1593 | <property name="use_action_appearance">False</property> | ||
1594 | <property name="visible">True</property> | ||
1595 | <property name="can_focus">True</property> | ||
1596 | <property name="receives_default">True</property> | ||
1597 | <property name="use_underline">True</property> | ||
1598 | <signal name="clicked" handler="GNUNET_GTK_master_publish_dialog_open_button_clicked_cb" swapped="no"/> | ||
1599 | </object> | ||
1600 | <packing> | ||
1601 | <property name="top_attach">1</property> | ||
1602 | <property name="bottom_attach">2</property> | ||
1603 | </packing> | ||
1604 | </child> | ||
1605 | <child> | ||
1606 | <object class="GtkButton" id="GNUNET_GTK_master_publish_dialog_edit_button"> | ||
1607 | <property name="label">gtk-edit</property> | ||
1608 | <property name="use_action_appearance">False</property> | ||
1609 | <property name="visible">True</property> | ||
1610 | <property name="sensitive">False</property> | ||
1611 | <property name="can_focus">True</property> | ||
1612 | <property name="receives_default">True</property> | ||
1613 | <property name="use_stock">True</property> | ||
1614 | <signal name="clicked" handler="GNUNET_GTK_master_publish_dialog_edit_button_clicked_cb" swapped="no"/> | ||
1615 | </object> | ||
1616 | <packing> | ||
1617 | <property name="left_attach">1</property> | ||
1618 | <property name="right_attach">2</property> | ||
1619 | <property name="top_attach">1</property> | ||
1620 | <property name="bottom_attach">2</property> | ||
1621 | </packing> | ||
1622 | </child> | ||
1623 | <child> | ||
1624 | <object class="GtkButton" id="GNUNET_GTK_master_publish_dialog_delete_button"> | ||
1625 | <property name="label">gtk-delete</property> | ||
1626 | <property name="use_action_appearance">False</property> | ||
1627 | <property name="visible">True</property> | ||
1628 | <property name="sensitive">False</property> | ||
1629 | <property name="can_focus">True</property> | ||
1630 | <property name="receives_default">True</property> | ||
1631 | <property name="use_stock">True</property> | ||
1632 | <signal name="clicked" handler="GNUNET_GTK_master_publish_dialog_delete_button_clicked_cb" swapped="no"/> | ||
1633 | </object> | ||
1634 | <packing> | ||
1635 | <property name="left_attach">2</property> | ||
1636 | <property name="right_attach">3</property> | ||
1637 | <property name="top_attach">1</property> | ||
1638 | <property name="bottom_attach">2</property> | ||
1639 | </packing> | ||
1640 | </child> | ||
1641 | </object> | ||
1642 | <packing> | ||
1643 | <property name="expand">False</property> | ||
1644 | <property name="fill">True</property> | ||
1645 | <property name="padding">25</property> | ||
1646 | <property name="position">0</property> | ||
1647 | </packing> | ||
1648 | </child> | ||
1649 | <child> | ||
1650 | <object class="GtkTable" id="GNUNET_GTK_master_publish_dialog_arrow_table"> | ||
1651 | <property name="visible">True</property> | ||
1652 | <property name="can_focus">False</property> | ||
1653 | <property name="n_rows">2</property> | ||
1654 | <property name="n_columns">3</property> | ||
1655 | <property name="homogeneous">True</property> | ||
1656 | <child> | ||
1657 | <object class="GtkButton" id="GNUNET_GTK_master_publish_dialog_up_button"> | ||
1658 | <property name="label">gtk-go-up</property> | ||
1659 | <property name="use_action_appearance">False</property> | ||
1660 | <property name="visible">True</property> | ||
1661 | <property name="sensitive">False</property> | ||
1662 | <property name="can_focus">True</property> | ||
1663 | <property name="receives_default">True</property> | ||
1664 | <property name="use_stock">True</property> | ||
1665 | <signal name="clicked" handler="GNUNET_GTK_master_publish_dialog_up_button_clicked_cb" swapped="no"/> | ||
1666 | </object> | ||
1667 | <packing> | ||
1668 | <property name="left_attach">1</property> | ||
1669 | <property name="right_attach">2</property> | ||
1670 | </packing> | ||
1671 | </child> | ||
1672 | <child> | ||
1673 | <object class="GtkButton" id="GNUNET_GTK_master_publish_dialog_left_button"> | ||
1674 | <property name="label" translatable="yes">_Left</property> | ||
1675 | <property name="use_action_appearance">False</property> | ||
1676 | <property name="visible">True</property> | ||
1677 | <property name="sensitive">False</property> | ||
1678 | <property name="can_focus">True</property> | ||
1679 | <property name="receives_default">True</property> | ||
1680 | <property name="image">left_stock_image</property> | ||
1681 | <property name="use_underline">True</property> | ||
1682 | <signal name="clicked" handler="GNUNET_GTK_master_publish_dialog_left_button_clicked_cb" swapped="no"/> | ||
1683 | </object> | ||
1684 | <packing> | ||
1685 | <property name="top_attach">1</property> | ||
1686 | <property name="bottom_attach">2</property> | ||
1687 | </packing> | ||
1688 | </child> | ||
1689 | <child> | ||
1690 | <object class="GtkButton" id="GNUNET_GTK_master_publish_dialog_down_button"> | ||
1691 | <property name="label">gtk-go-down</property> | ||
1692 | <property name="use_action_appearance">False</property> | ||
1693 | <property name="visible">True</property> | ||
1694 | <property name="sensitive">False</property> | ||
1695 | <property name="can_focus">True</property> | ||
1696 | <property name="receives_default">True</property> | ||
1697 | <property name="use_stock">True</property> | ||
1698 | <signal name="clicked" handler="GNUNET_GTK_master_publish_dialog_down_button_clicked_cb" swapped="no"/> | ||
1699 | </object> | ||
1700 | <packing> | ||
1701 | <property name="left_attach">1</property> | ||
1702 | <property name="right_attach">2</property> | ||
1703 | <property name="top_attach">1</property> | ||
1704 | <property name="bottom_attach">2</property> | ||
1705 | </packing> | ||
1706 | </child> | ||
1707 | <child> | ||
1708 | <object class="GtkButton" id="GNUNET_GTK_master_publish_dialog_right_button"> | ||
1709 | <property name="label" translatable="yes">_Right</property> | ||
1710 | <property name="use_action_appearance">False</property> | ||
1711 | <property name="visible">True</property> | ||
1712 | <property name="sensitive">False</property> | ||
1713 | <property name="can_focus">True</property> | ||
1714 | <property name="receives_default">True</property> | ||
1715 | <property name="image">right_stock_image</property> | ||
1716 | <property name="use_underline">True</property> | ||
1717 | <signal name="clicked" handler="GNUNET_GTK_master_publish_dialog_right_button_clicked_cb" swapped="no"/> | ||
1718 | </object> | ||
1719 | <packing> | ||
1720 | <property name="left_attach">2</property> | ||
1721 | <property name="right_attach">3</property> | ||
1722 | <property name="top_attach">1</property> | ||
1723 | <property name="bottom_attach">2</property> | ||
1724 | </packing> | ||
1725 | </child> | ||
1726 | <child> | ||
1727 | <placeholder/> | ||
1728 | </child> | ||
1729 | <child> | ||
1730 | <placeholder/> | ||
1731 | </child> | ||
1732 | </object> | ||
1733 | <packing> | ||
1734 | <property name="expand">False</property> | ||
1735 | <property name="fill">True</property> | ||
1736 | <property name="padding">25</property> | ||
1737 | <property name="position">1</property> | ||
1738 | </packing> | ||
1739 | </child> | ||
1740 | </object> | ||
1741 | <packing> | ||
1742 | <property name="expand">False</property> | ||
1743 | <property name="fill">True</property> | ||
1744 | <property name="position">1</property> | ||
1745 | </packing> | ||
1746 | </child> | ||
1747 | <child> | ||
1748 | <object class="GtkScrolledWindow" id="GNUNET_GTK_master_publish_dialog_pseudonym_scrolled_window"> | ||
1749 | <property name="visible">True</property> | ||
1750 | <property name="can_focus">True</property> | ||
1751 | <property name="hadjustment">adjustment7</property> | ||
1752 | <property name="vadjustment">adjustment8</property> | ||
1753 | <property name="hscrollbar_policy">automatic</property> | ||
1754 | <property name="vscrollbar_policy">automatic</property> | ||
1755 | <property name="shadow_type">in</property> | ||
1756 | <child> | ||
1757 | <object class="GtkTreeView" id="GNUNET_GTK_master_publish_dialog_pseudonym_tree_view"> | ||
1758 | <property name="visible">True</property> | ||
1759 | <property name="can_focus">True</property> | ||
1760 | <property name="model">GNUNET_GTK_pseudonym_tree_store</property> | ||
1761 | <property name="hadjustment">adjustment7</property> | ||
1762 | <property name="vadjustment">adjustment8</property> | ||
1763 | <property name="reorderable">True</property> | ||
1764 | <property name="rubber_banding">True</property> | ||
1765 | <property name="enable_grid_lines">both</property> | ||
1766 | <child> | ||
1767 | <object class="GtkTreeViewColumn" id="GNUNET_GTK_master_publish_dialog_pseudonym_name_column"> | ||
1768 | <property name="resizable">True</property> | ||
1769 | <property name="title" translatable="yes">Pseudonym</property> | ||
1770 | <property name="clickable">True</property> | ||
1771 | <property name="reorderable">True</property> | ||
1772 | <property name="sort_indicator">True</property> | ||
1773 | <child> | ||
1774 | <object class="GtkCellRendererText" id="GNUNET_GTK_master_publish_dialog_pseudonym_name_renderer"/> | ||
1775 | <attributes> | ||
1776 | <attribute name="text">0</attribute> | ||
1777 | </attributes> | ||
1778 | </child> | ||
1779 | </object> | ||
1780 | </child> | ||
1781 | <child> | ||
1782 | <object class="GtkTreeViewColumn" id="GNUNET_GTK_master_publish_dialog_pseudonym_identifier_column"> | ||
1783 | <property name="resizable">True</property> | ||
1784 | <property name="sizing">autosize</property> | ||
1785 | <property name="title" translatable="yes">Current identifier</property> | ||
1786 | <property name="clickable">True</property> | ||
1787 | <child> | ||
1788 | <object class="GtkCellRendererText" id="GNUNET_GTK_master_publish_dialog_pseudonym_identifier_renderer"/> | ||
1789 | <attributes> | ||
1790 | <attribute name="editable">8</attribute> | ||
1791 | <attribute name="text">2</attribute> | ||
1792 | </attributes> | ||
1793 | </child> | ||
1794 | </object> | ||
1795 | </child> | ||
1796 | <child> | ||
1797 | <object class="GtkTreeViewColumn" id="GNUNET_GTK_master_publish_dialog_pseudonym_updates_column"> | ||
1798 | <property name="resizable">True</property> | ||
1799 | <property name="sizing">autosize</property> | ||
1800 | <property name="fixed_width">5</property> | ||
1801 | <property name="title" translatable="yes">Update identifier</property> | ||
1802 | <child> | ||
1803 | <object class="GtkCellRendererText" id="GNUNET_GTK_master_publish_dialog_pseudonym_updates_renderer"/> | ||
1804 | <attributes> | ||
1805 | <attribute name="editable">7</attribute> | ||
1806 | <attribute name="text">5</attribute> | ||
1807 | </attributes> | ||
1808 | </child> | ||
1809 | </object> | ||
1810 | </child> | ||
1811 | <child> | ||
1812 | <object class="GtkTreeViewColumn" id="GNUNET_GTK_master_publish_dialog_pseudonym_description_column"> | ||
1813 | <property name="title" translatable="yes">Description (of existing content)</property> | ||
1814 | <child> | ||
1815 | <object class="GtkCellRendererText" id="GNUNET_GTK_master_publish_dialog_pseudonym_description_renderer"> | ||
1816 | <property name="wrap_mode">word</property> | ||
1817 | </object> | ||
1818 | <attributes> | ||
1819 | <attribute name="text">6</attribute> | ||
1820 | </attributes> | ||
1821 | </child> | ||
1822 | </object> | ||
1823 | </child> | ||
1824 | </object> | ||
1825 | </child> | ||
1826 | </object> | ||
1827 | <packing> | ||
1828 | <property name="expand">True</property> | ||
1829 | <property name="fill">True</property> | ||
1830 | <property name="position">2</property> | ||
1831 | </packing> | ||
1832 | </child> | ||
1833 | <child> | ||
1834 | <object class="GtkHBox" id="GNUNET_GTK_master_publish_dialog_master_buttons_hbox"> | ||
1835 | <property name="visible">True</property> | ||
1836 | <property name="can_focus">False</property> | ||
1837 | <property name="spacing">2</property> | ||
1838 | <child> | ||
1839 | <object class="GtkButton" id="GNUNET_GTK_master_publish_dialog_execute_button"> | ||
1840 | <property name="label" translatable="yes">_Execute</property> | ||
1841 | <property name="use_action_appearance">False</property> | ||
1842 | <property name="visible">True</property> | ||
1843 | <property name="can_focus">True</property> | ||
1844 | <property name="receives_default">True</property> | ||
1845 | <property name="use_underline">True</property> | ||
1846 | <signal name="clicked" handler="GNUNET_GTK_master_publish_dialog_execute_button_clicked_cb" swapped="no"/> | ||
1847 | </object> | ||
1848 | <packing> | ||
1849 | <property name="expand">False</property> | ||
1850 | <property name="fill">False</property> | ||
1851 | <property name="pack_type">end</property> | ||
1852 | <property name="position">0</property> | ||
1853 | </packing> | ||
1854 | </child> | ||
1855 | <child> | ||
1856 | <object class="GtkButton" id="GNUNET_GTK_master_publish_dialog_cancel_button"> | ||
1857 | <property name="label" translatable="yes">_Cancel</property> | ||
1858 | <property name="use_action_appearance">False</property> | ||
1859 | <property name="visible">True</property> | ||
1860 | <property name="can_focus">True</property> | ||
1861 | <property name="receives_default">True</property> | ||
1862 | <property name="use_underline">True</property> | ||
1863 | <signal name="clicked" handler="GNUNET_GTK_master_publish_dialog_cancel_button_clicked_cb" swapped="no"/> | ||
1864 | </object> | ||
1865 | <packing> | ||
1866 | <property name="expand">False</property> | ||
1867 | <property name="fill">False</property> | ||
1868 | <property name="pack_type">end</property> | ||
1869 | <property name="position">1</property> | ||
1870 | </packing> | ||
1871 | </child> | ||
1872 | </object> | ||
1873 | <packing> | ||
1874 | <property name="expand">False</property> | ||
1875 | <property name="fill">False</property> | ||
1876 | <property name="position">3</property> | ||
1877 | </packing> | ||
1878 | </child> | ||
1879 | </object> | ||
1880 | </child> | ||
1881 | </object> | ||
668 | <object class="GtkListStore" id="GNUNET_GTK_meta_data_list_store"> | 1882 | <object class="GtkListStore" id="GNUNET_GTK_meta_data_list_store"> |
669 | <columns> | 1883 | <columns> |
670 | <!-- column-name extractor_meta_type --> | 1884 | <!-- column-name extractor_meta_type --> |
@@ -706,7 +1920,6 @@ | |||
706 | <property name="can_focus">False</property> | 1920 | <property name="can_focus">False</property> |
707 | <property name="label" translatable="yes">_URI:</property> | 1921 | <property name="label" translatable="yes">_URI:</property> |
708 | <property name="use_underline">True</property> | 1922 | <property name="use_underline">True</property> |
709 | <property name="selectable">True</property> | ||
710 | <property name="mnemonic_widget">GNUNET_GTK_open_url_dialog_url_textview</property> | 1923 | <property name="mnemonic_widget">GNUNET_GTK_open_url_dialog_url_textview</property> |
711 | </object> | 1924 | </object> |
712 | <packing> | 1925 | <packing> |
@@ -756,7 +1969,6 @@ | |||
756 | <property name="can_focus">False</property> | 1969 | <property name="can_focus">False</property> |
757 | <property name="label" translatable="yes">_Anonymity:</property> | 1970 | <property name="label" translatable="yes">_Anonymity:</property> |
758 | <property name="use_underline">True</property> | 1971 | <property name="use_underline">True</property> |
759 | <property name="selectable">True</property> | ||
760 | <property name="mnemonic_widget">GNUNET_GTK_open_url_dialog_anonymity_combobox</property> | 1972 | <property name="mnemonic_widget">GNUNET_GTK_open_url_dialog_anonymity_combobox</property> |
761 | </object> | 1973 | </object> |
762 | <packing> | 1974 | <packing> |
@@ -819,7 +2031,7 @@ | |||
819 | <property name="sensitive">False</property> | 2031 | <property name="sensitive">False</property> |
820 | <property name="can_focus">True</property> | 2032 | <property name="can_focus">True</property> |
821 | <property name="receives_default">True</property> | 2033 | <property name="receives_default">True</property> |
822 | <property name="image">execute_stock_image2</property> | 2034 | <property name="image">execute_stock_image</property> |
823 | <property name="use_underline">True</property> | 2035 | <property name="use_underline">True</property> |
824 | <signal name="clicked" handler="GNUNET_GTK_open_url_dialog_execute_button_clicked_cb" swapped="no"/> | 2036 | <signal name="clicked" handler="GNUNET_GTK_open_url_dialog_execute_button_clicked_cb" swapped="no"/> |
825 | </object> | 2037 | </object> |
@@ -874,97 +2086,766 @@ | |||
874 | <column type="guint64"/> | 2086 | <column type="guint64"/> |
875 | </columns> | 2087 | </columns> |
876 | </object> | 2088 | </object> |
877 | <object class="GtkAdjustment" id="adjustment1"> | 2089 | <object class="GtkTreeStore" id="GNUNET_GTK_pseudonym_tree_store"> |
878 | <property name="upper">100</property> | 2090 | <columns> |
879 | <property name="step_increment">1</property> | 2091 | <!-- column-name local_name --> |
880 | <property name="page_increment">10</property> | 2092 | <column type="gchararray"/> |
881 | <property name="page_size">10</property> | 2093 | <!-- column-name namespace_handle --> |
2094 | <column type="gpointer"/> | ||
2095 | <!-- column-name last_id --> | ||
2096 | <column type="gchararray"/> | ||
2097 | <!-- column-name last_uri --> | ||
2098 | <column type="gchararray"/> | ||
2099 | <!-- column-name last_meta --> | ||
2100 | <column type="gpointer"/> | ||
2101 | <!-- column-name next_id --> | ||
2102 | <column type="gchararray"/> | ||
2103 | <!-- column-name last_description_from_meta --> | ||
2104 | <column type="gchararray"/> | ||
2105 | <!-- column-name next_id_editable --> | ||
2106 | <column type="gboolean"/> | ||
2107 | <!-- column-name current_id_editable --> | ||
2108 | <column type="gboolean"/> | ||
2109 | </columns> | ||
882 | </object> | 2110 | </object> |
883 | <object class="GtkAdjustment" id="adjustment2"> | 2111 | <object class="GtkListStore" id="GNUNET_GTK_publication_keywords_liststore"> |
884 | <property name="upper">100</property> | 2112 | <columns> |
885 | <property name="step_increment">1</property> | 2113 | <!-- column-name Keyword --> |
886 | <property name="page_increment">10</property> | 2114 | <column type="gchararray"/> |
887 | <property name="page_size">10</property> | 2115 | <!-- column-name Added --> |
2116 | <column type="gboolean"/> | ||
2117 | </columns> | ||
2118 | </object> | ||
2119 | <object class="GtkListStore" id="GNUNET_GTK_publication_metadata_liststore"> | ||
2120 | <columns> | ||
2121 | <!-- column-name Type --> | ||
2122 | <column type="gint"/> | ||
2123 | <!-- column-name Format --> | ||
2124 | <column type="gint"/> | ||
2125 | <!-- column-name Type1 --> | ||
2126 | <column type="gchararray"/> | ||
2127 | <!-- column-name Value --> | ||
2128 | <column type="gchararray"/> | ||
2129 | <!-- column-name Description --> | ||
2130 | <column type="gchararray"/> | ||
2131 | </columns> | ||
2132 | </object> | ||
2133 | <object class="GtkListStore" id="GNUNET_GTK_publication_metadata_types_liststore"> | ||
2134 | <columns> | ||
2135 | <!-- column-name Type --> | ||
2136 | <column type="gint"/> | ||
2137 | <!-- column-name Format --> | ||
2138 | <column type="gint"/> | ||
2139 | <!-- column-name Type1 --> | ||
2140 | <column type="gchararray"/> | ||
2141 | <!-- column-name Description --> | ||
2142 | <column type="gchararray"/> | ||
2143 | </columns> | ||
2144 | </object> | ||
2145 | <object class="GtkListStore" id="GNUNET_GTK_publication_types_liststore"> | ||
2146 | <columns> | ||
2147 | <!-- column-name Type --> | ||
2148 | <column type="gint"/> | ||
2149 | <!-- column-name Type1 --> | ||
2150 | <column type="gchararray"/> | ||
2151 | </columns> | ||
2152 | <data> | ||
2153 | <row> | ||
2154 | <col id="0">-1</col> | ||
2155 | <col id="1" translatable="yes">Generic</col> | ||
2156 | </row> | ||
2157 | <row> | ||
2158 | <col id="0">1</col> | ||
2159 | <col id="1" translatable="yes">Text</col> | ||
2160 | </row> | ||
2161 | <row> | ||
2162 | <col id="0">2</col> | ||
2163 | <col id="1" translatable="yes">Music</col> | ||
2164 | </row> | ||
2165 | <row> | ||
2166 | <col id="0">3</col> | ||
2167 | <col id="1" translatable="yes">Video</col> | ||
2168 | </row> | ||
2169 | <row> | ||
2170 | <col id="0">4</col> | ||
2171 | <col id="1" translatable="yes">Image</col> | ||
2172 | </row> | ||
2173 | <row> | ||
2174 | <col id="0">5</col> | ||
2175 | <col id="1" translatable="yes">Namespace</col> | ||
2176 | </row> | ||
2177 | </data> | ||
2178 | </object> | ||
2179 | <object class="GtkFileChooserDialog" id="GNUNET_GTK_publish_directory_dialog"> | ||
2180 | <property name="can_focus">False</property> | ||
2181 | <property name="can_default">True</property> | ||
2182 | <property name="events">GDK_FOCUS_CHANGE_MASK | GDK_STRUCTURE_MASK</property> | ||
2183 | <property name="border_width">5</property> | ||
2184 | <property name="modal">True</property> | ||
2185 | <property name="destroy_with_parent">True</property> | ||
2186 | <property name="type_hint">dialog</property> | ||
2187 | <property name="skip_taskbar_hint">True</property> | ||
2188 | <property name="skip_pager_hint">True</property> | ||
2189 | <property name="transient_for">GNUNET_GTK_main_window</property> | ||
2190 | <property name="action">select-folder</property> | ||
2191 | <property name="create_folders">False</property> | ||
2192 | <property name="select_multiple">True</property> | ||
2193 | <signal name="response" handler="GNUNET_GTK_publish_directory_dialog_response_cb" swapped="no"/> | ||
2194 | <child internal-child="vbox"> | ||
2195 | <object class="GtkVBox" id="dialog-vbox1"> | ||
2196 | <property name="visible">True</property> | ||
2197 | <property name="can_focus">False</property> | ||
2198 | <property name="spacing">2</property> | ||
2199 | <child internal-child="action_area"> | ||
2200 | <object class="GtkHButtonBox" id="dialog-action_area6"> | ||
2201 | <property name="visible">True</property> | ||
2202 | <property name="can_focus">False</property> | ||
2203 | <property name="layout_style">end</property> | ||
2204 | <child> | ||
2205 | <object class="GtkButton" id="GNUNET_GTK_publish_dialog_cancel_button"> | ||
2206 | <property name="label">gtk-cancel</property> | ||
2207 | <property name="use_action_appearance">False</property> | ||
2208 | <property name="visible">True</property> | ||
2209 | <property name="can_focus">True</property> | ||
2210 | <property name="receives_default">True</property> | ||
2211 | <property name="use_stock">True</property> | ||
2212 | </object> | ||
2213 | <packing> | ||
2214 | <property name="expand">False</property> | ||
2215 | <property name="fill">False</property> | ||
2216 | <property name="position">0</property> | ||
2217 | </packing> | ||
2218 | </child> | ||
2219 | <child> | ||
2220 | <object class="GtkButton" id="GNUNET_GTK_publish_directory_dialog_ok_button"> | ||
2221 | <property name="label">gtk-ok</property> | ||
2222 | <property name="use_action_appearance">False</property> | ||
2223 | <property name="visible">True</property> | ||
2224 | <property name="can_focus">True</property> | ||
2225 | <property name="can_default">True</property> | ||
2226 | <property name="receives_default">True</property> | ||
2227 | <property name="use_stock">True</property> | ||
2228 | </object> | ||
2229 | <packing> | ||
2230 | <property name="expand">False</property> | ||
2231 | <property name="fill">False</property> | ||
2232 | <property name="position">1</property> | ||
2233 | </packing> | ||
2234 | </child> | ||
2235 | </object> | ||
2236 | <packing> | ||
2237 | <property name="expand">False</property> | ||
2238 | <property name="fill">True</property> | ||
2239 | <property name="pack_type">end</property> | ||
2240 | <property name="position">0</property> | ||
2241 | </packing> | ||
2242 | </child> | ||
2243 | <child> | ||
2244 | <object class="GtkVBox" id="vbox3"> | ||
2245 | <property name="visible">True</property> | ||
2246 | <property name="can_focus">False</property> | ||
2247 | <child> | ||
2248 | <object class="GtkHBox" id="hbox6"> | ||
2249 | <property name="visible">True</property> | ||
2250 | <property name="can_focus">False</property> | ||
2251 | <child> | ||
2252 | <object class="GtkCheckButton" id="GNUNET_GTK_publish_directory_dialog_do_index_checkbutton"> | ||
2253 | <property name="label" translatable="yes">Index files</property> | ||
2254 | <property name="use_action_appearance">False</property> | ||
2255 | <property name="visible">True</property> | ||
2256 | <property name="can_focus">True</property> | ||
2257 | <property name="receives_default">False</property> | ||
2258 | <property name="use_underline">True</property> | ||
2259 | <property name="active">True</property> | ||
2260 | <property name="draw_indicator">True</property> | ||
2261 | </object> | ||
2262 | <packing> | ||
2263 | <property name="expand">False</property> | ||
2264 | <property name="fill">False</property> | ||
2265 | <property name="padding">20</property> | ||
2266 | <property name="position">0</property> | ||
2267 | </packing> | ||
2268 | </child> | ||
2269 | <child> | ||
2270 | <placeholder/> | ||
2271 | </child> | ||
2272 | <child> | ||
2273 | <object class="GtkLabel" id="GNUNET_GTK_publish_directory_dialog_priority_label"> | ||
2274 | <property name="visible">True</property> | ||
2275 | <property name="can_focus">False</property> | ||
2276 | <property name="label" translatable="yes">Priority:</property> | ||
2277 | </object> | ||
2278 | <packing> | ||
2279 | <property name="expand">False</property> | ||
2280 | <property name="fill">True</property> | ||
2281 | <property name="padding">13</property> | ||
2282 | <property name="position">2</property> | ||
2283 | </packing> | ||
2284 | </child> | ||
2285 | <child> | ||
2286 | <object class="GtkSpinButton" id="GNUNET_GTK_publish_directory_dialog_priority_spin_button"> | ||
2287 | <property name="visible">True</property> | ||
2288 | <property name="can_focus">True</property> | ||
2289 | <property name="invisible_char">•</property> | ||
2290 | <property name="invisible_char_set">True</property> | ||
2291 | <property name="primary_icon_activatable">False</property> | ||
2292 | <property name="secondary_icon_activatable">False</property> | ||
2293 | <property name="primary_icon_sensitive">True</property> | ||
2294 | <property name="secondary_icon_sensitive">True</property> | ||
2295 | <property name="adjustment">priority_adjustment</property> | ||
2296 | <property name="numeric">True</property> | ||
2297 | </object> | ||
2298 | <packing> | ||
2299 | <property name="expand">False</property> | ||
2300 | <property name="fill">True</property> | ||
2301 | <property name="padding">20</property> | ||
2302 | <property name="position">3</property> | ||
2303 | </packing> | ||
2304 | </child> | ||
2305 | </object> | ||
2306 | <packing> | ||
2307 | <property name="expand">False</property> | ||
2308 | <property name="fill">False</property> | ||
2309 | <property name="position">0</property> | ||
2310 | </packing> | ||
2311 | </child> | ||
2312 | <child> | ||
2313 | <object class="GtkHBox" id="hbox7"> | ||
2314 | <property name="visible">True</property> | ||
2315 | <property name="can_focus">False</property> | ||
2316 | <child> | ||
2317 | <object class="GtkLabel" id="GNUNET_GTK_publish_directory_dialog_expiration_label"> | ||
2318 | <property name="visible">True</property> | ||
2319 | <property name="can_focus">False</property> | ||
2320 | <property name="label" translatable="yes">Expiration year:</property> | ||
2321 | </object> | ||
2322 | <packing> | ||
2323 | <property name="expand">False</property> | ||
2324 | <property name="fill">False</property> | ||
2325 | <property name="padding">20</property> | ||
2326 | <property name="position">0</property> | ||
2327 | </packing> | ||
2328 | </child> | ||
2329 | <child> | ||
2330 | <object class="GtkSpinButton" id="GNUNET_GTK_publish_directory_dialog_expiration_year_spin_button"> | ||
2331 | <property name="visible">True</property> | ||
2332 | <property name="can_focus">True</property> | ||
2333 | <property name="invisible_char">•</property> | ||
2334 | <property name="invisible_char_set">True</property> | ||
2335 | <property name="primary_icon_activatable">False</property> | ||
2336 | <property name="secondary_icon_activatable">False</property> | ||
2337 | <property name="primary_icon_sensitive">True</property> | ||
2338 | <property name="secondary_icon_sensitive">True</property> | ||
2339 | <property name="adjustment">expiration_year_adjustment</property> | ||
2340 | </object> | ||
2341 | <packing> | ||
2342 | <property name="expand">False</property> | ||
2343 | <property name="fill">False</property> | ||
2344 | <property name="position">1</property> | ||
2345 | </packing> | ||
2346 | </child> | ||
2347 | <child> | ||
2348 | <object class="GtkLabel" id="GNUNET_GTK_publish_directory_dialog_anonymity_label"> | ||
2349 | <property name="visible">True</property> | ||
2350 | <property name="can_focus">False</property> | ||
2351 | <property name="label" translatable="yes">Anonymity:</property> | ||
2352 | </object> | ||
2353 | <packing> | ||
2354 | <property name="expand">False</property> | ||
2355 | <property name="fill">True</property> | ||
2356 | <property name="padding">5</property> | ||
2357 | <property name="position">2</property> | ||
2358 | </packing> | ||
2359 | </child> | ||
2360 | <child> | ||
2361 | <object class="GtkAlignment" id="GNUNET_GTK_publish_directory_dialog_anonymity_combobox_alignment"> | ||
2362 | <property name="visible">True</property> | ||
2363 | <property name="can_focus">False</property> | ||
2364 | <property name="yscale">0</property> | ||
2365 | <child> | ||
2366 | <object class="GtkComboBox" id="GNUNET_GTK_publish_directory_dialog_anonymity_combobox"> | ||
2367 | <property name="visible">True</property> | ||
2368 | <property name="can_focus">False</property> | ||
2369 | <property name="model">main_window_search_anonymity_liststore</property> | ||
2370 | <property name="active">1</property> | ||
2371 | <child> | ||
2372 | <object class="GtkCellRendererText" id="GNUNET_GTK_publish_directory_dialog_anonymity_combobox_renderer"/> | ||
2373 | <attributes> | ||
2374 | <attribute name="foreground">2</attribute> | ||
2375 | <attribute name="text">0</attribute> | ||
2376 | </attributes> | ||
2377 | </child> | ||
2378 | <child> | ||
2379 | <object class="GtkCellRendererText" id="GNUNET_GTK_publish_directory_dialog_anonymity_combobox_renerer_level"/> | ||
2380 | <attributes> | ||
2381 | <attribute name="text">1</attribute> | ||
2382 | </attributes> | ||
2383 | </child> | ||
2384 | </object> | ||
2385 | </child> | ||
2386 | </object> | ||
2387 | <packing> | ||
2388 | <property name="expand">False</property> | ||
2389 | <property name="fill">False</property> | ||
2390 | <property name="position">3</property> | ||
2391 | </packing> | ||
2392 | </child> | ||
2393 | </object> | ||
2394 | <packing> | ||
2395 | <property name="expand">False</property> | ||
2396 | <property name="fill">True</property> | ||
2397 | <property name="position">1</property> | ||
2398 | </packing> | ||
2399 | </child> | ||
2400 | </object> | ||
2401 | <packing> | ||
2402 | <property name="expand">True</property> | ||
2403 | <property name="fill">True</property> | ||
2404 | <property name="position">2</property> | ||
2405 | </packing> | ||
2406 | </child> | ||
2407 | </object> | ||
2408 | </child> | ||
2409 | <action-widgets> | ||
2410 | <action-widget response="-6">GNUNET_GTK_publish_dialog_cancel_button</action-widget> | ||
2411 | <action-widget response="-5">GNUNET_GTK_publish_directory_dialog_ok_button</action-widget> | ||
2412 | </action-widgets> | ||
2413 | </object> | ||
2414 | <object class="GtkFileChooserDialog" id="GNUNET_GTK_publish_file_dialog"> | ||
2415 | <property name="can_focus">False</property> | ||
2416 | <property name="can_default">True</property> | ||
2417 | <property name="border_width">5</property> | ||
2418 | <property name="title" translatable="yes">Publish file...</property> | ||
2419 | <property name="modal">True</property> | ||
2420 | <property name="destroy_with_parent">True</property> | ||
2421 | <property name="type_hint">normal</property> | ||
2422 | <property name="skip_taskbar_hint">True</property> | ||
2423 | <property name="skip_pager_hint">True</property> | ||
2424 | <property name="transient_for">GNUNET_GTK_main_window</property> | ||
2425 | <property name="create_folders">False</property> | ||
2426 | <property name="select_multiple">True</property> | ||
2427 | <signal name="delete-event" handler="gtk_widget_hide_on_delete" swapped="no"/> | ||
2428 | <signal name="response" handler="GNUNET_GTK_publish_file_dialog_response_cb" swapped="no"/> | ||
2429 | <child internal-child="vbox"> | ||
2430 | <object class="GtkVBox" id="dialog-vbox5"> | ||
2431 | <property name="visible">True</property> | ||
2432 | <property name="can_focus">False</property> | ||
2433 | <property name="spacing">2</property> | ||
2434 | <child internal-child="action_area"> | ||
2435 | <object class="GtkHButtonBox" id="dialog-action_area5"> | ||
2436 | <property name="visible">True</property> | ||
2437 | <property name="can_focus">False</property> | ||
2438 | <property name="layout_style">end</property> | ||
2439 | <child> | ||
2440 | <object class="GtkButton" id="GNUNET_GTK_publish_file_dialog_cancel_button"> | ||
2441 | <property name="label">gtk-cancel</property> | ||
2442 | <property name="use_action_appearance">False</property> | ||
2443 | <property name="visible">True</property> | ||
2444 | <property name="can_focus">True</property> | ||
2445 | <property name="receives_default">True</property> | ||
2446 | <property name="use_stock">True</property> | ||
2447 | </object> | ||
2448 | <packing> | ||
2449 | <property name="expand">False</property> | ||
2450 | <property name="fill">False</property> | ||
2451 | <property name="position">0</property> | ||
2452 | </packing> | ||
2453 | </child> | ||
2454 | <child> | ||
2455 | <object class="GtkButton" id="GNUNET_GTK_publish_file_dialog_ok_button"> | ||
2456 | <property name="label">gtk-ok</property> | ||
2457 | <property name="use_action_appearance">False</property> | ||
2458 | <property name="visible">True</property> | ||
2459 | <property name="can_focus">True</property> | ||
2460 | <property name="can_default">True</property> | ||
2461 | <property name="receives_default">True</property> | ||
2462 | <property name="use_stock">True</property> | ||
2463 | </object> | ||
2464 | <packing> | ||
2465 | <property name="expand">False</property> | ||
2466 | <property name="fill">False</property> | ||
2467 | <property name="position">1</property> | ||
2468 | </packing> | ||
2469 | </child> | ||
2470 | </object> | ||
2471 | <packing> | ||
2472 | <property name="expand">False</property> | ||
2473 | <property name="fill">True</property> | ||
2474 | <property name="pack_type">end</property> | ||
2475 | <property name="position">0</property> | ||
2476 | </packing> | ||
2477 | </child> | ||
2478 | <child> | ||
2479 | <object class="GtkVBox" id="vbox1"> | ||
2480 | <property name="visible">True</property> | ||
2481 | <property name="can_focus">False</property> | ||
2482 | <child> | ||
2483 | <object class="GtkHBox" id="hbox2"> | ||
2484 | <property name="visible">True</property> | ||
2485 | <property name="can_focus">False</property> | ||
2486 | <child> | ||
2487 | <object class="GtkCheckButton" id="GNUNET_GTK_publish_file_dialog_do_index_checkbutton"> | ||
2488 | <property name="label" translatable="yes">Index file</property> | ||
2489 | <property name="use_action_appearance">False</property> | ||
2490 | <property name="visible">True</property> | ||
2491 | <property name="can_focus">True</property> | ||
2492 | <property name="receives_default">False</property> | ||
2493 | <property name="use_underline">True</property> | ||
2494 | <property name="active">True</property> | ||
2495 | <property name="draw_indicator">True</property> | ||
2496 | </object> | ||
2497 | <packing> | ||
2498 | <property name="expand">False</property> | ||
2499 | <property name="fill">False</property> | ||
2500 | <property name="padding">20</property> | ||
2501 | <property name="position">0</property> | ||
2502 | </packing> | ||
2503 | </child> | ||
2504 | <child> | ||
2505 | <placeholder/> | ||
2506 | </child> | ||
2507 | <child> | ||
2508 | <object class="GtkLabel" id="GNUNET_GTK_publish_file_dialog_priority_label"> | ||
2509 | <property name="visible">True</property> | ||
2510 | <property name="can_focus">False</property> | ||
2511 | <property name="label" translatable="yes">Priority:</property> | ||
2512 | </object> | ||
2513 | <packing> | ||
2514 | <property name="expand">False</property> | ||
2515 | <property name="fill">True</property> | ||
2516 | <property name="padding">13</property> | ||
2517 | <property name="position">2</property> | ||
2518 | </packing> | ||
2519 | </child> | ||
2520 | <child> | ||
2521 | <object class="GtkSpinButton" id="GNUNET_GTK_publish_file_dialog_priority_spin_button"> | ||
2522 | <property name="visible">True</property> | ||
2523 | <property name="can_focus">True</property> | ||
2524 | <property name="invisible_char">•</property> | ||
2525 | <property name="invisible_char_set">True</property> | ||
2526 | <property name="primary_icon_activatable">False</property> | ||
2527 | <property name="secondary_icon_activatable">False</property> | ||
2528 | <property name="primary_icon_sensitive">True</property> | ||
2529 | <property name="secondary_icon_sensitive">True</property> | ||
2530 | <property name="adjustment">priority_adjustment</property> | ||
2531 | <property name="numeric">True</property> | ||
2532 | </object> | ||
2533 | <packing> | ||
2534 | <property name="expand">False</property> | ||
2535 | <property name="fill">True</property> | ||
2536 | <property name="padding">20</property> | ||
2537 | <property name="position">3</property> | ||
2538 | </packing> | ||
2539 | </child> | ||
2540 | </object> | ||
2541 | <packing> | ||
2542 | <property name="expand">False</property> | ||
2543 | <property name="fill">False</property> | ||
2544 | <property name="position">0</property> | ||
2545 | </packing> | ||
2546 | </child> | ||
2547 | <child> | ||
2548 | <object class="GtkHBox" id="hbox5"> | ||
2549 | <property name="visible">True</property> | ||
2550 | <property name="can_focus">False</property> | ||
2551 | <child> | ||
2552 | <object class="GtkLabel" id="GNUNET_GTK_publish_file_dialog_expiration_label"> | ||
2553 | <property name="visible">True</property> | ||
2554 | <property name="can_focus">False</property> | ||
2555 | <property name="label" translatable="yes">Expiration year:</property> | ||
2556 | </object> | ||
2557 | <packing> | ||
2558 | <property name="expand">False</property> | ||
2559 | <property name="fill">False</property> | ||
2560 | <property name="padding">20</property> | ||
2561 | <property name="position">0</property> | ||
2562 | </packing> | ||
2563 | </child> | ||
2564 | <child> | ||
2565 | <object class="GtkSpinButton" id="GNUNET_GTK_publish_file_dialog_expiration_year_spin_button"> | ||
2566 | <property name="visible">True</property> | ||
2567 | <property name="can_focus">True</property> | ||
2568 | <property name="invisible_char">•</property> | ||
2569 | <property name="invisible_char_set">True</property> | ||
2570 | <property name="primary_icon_activatable">False</property> | ||
2571 | <property name="secondary_icon_activatable">False</property> | ||
2572 | <property name="primary_icon_sensitive">True</property> | ||
2573 | <property name="secondary_icon_sensitive">True</property> | ||
2574 | <property name="adjustment">expiration_year_adjustment</property> | ||
2575 | <property name="numeric">True</property> | ||
2576 | </object> | ||
2577 | <packing> | ||
2578 | <property name="expand">False</property> | ||
2579 | <property name="fill">False</property> | ||
2580 | <property name="position">1</property> | ||
2581 | </packing> | ||
2582 | </child> | ||
2583 | <child> | ||
2584 | <object class="GtkLabel" id="GNUNET_GTK_publish_file_dialog_anonymity_label"> | ||
2585 | <property name="visible">True</property> | ||
2586 | <property name="can_focus">False</property> | ||
2587 | <property name="label" translatable="yes">Anonymity:</property> | ||
2588 | </object> | ||
2589 | <packing> | ||
2590 | <property name="expand">False</property> | ||
2591 | <property name="fill">True</property> | ||
2592 | <property name="padding">5</property> | ||
2593 | <property name="position">2</property> | ||
2594 | </packing> | ||
2595 | </child> | ||
2596 | <child> | ||
2597 | <object class="GtkAlignment" id="GNUNET_GTK_publish_file_dialog_anonymity_combobox_alignment"> | ||
2598 | <property name="visible">True</property> | ||
2599 | <property name="can_focus">False</property> | ||
2600 | <property name="yscale">0</property> | ||
2601 | <child> | ||
2602 | <object class="GtkComboBox" id="GNUNET_GTK_publish_file_dialog_anonymity_combobox"> | ||
2603 | <property name="visible">True</property> | ||
2604 | <property name="can_focus">False</property> | ||
2605 | <property name="model">main_window_search_anonymity_liststore</property> | ||
2606 | <property name="active">1</property> | ||
2607 | <child> | ||
2608 | <object class="GtkCellRendererText" id="GNUNET_GTK_publish_file_dialog_anonymity_combobox_renderer"/> | ||
2609 | <attributes> | ||
2610 | <attribute name="foreground">2</attribute> | ||
2611 | <attribute name="text">0</attribute> | ||
2612 | </attributes> | ||
2613 | </child> | ||
2614 | <child> | ||
2615 | <object class="GtkCellRendererText" id="GNUNET_GTK_publish_file_dialog_anonymity_combobox_renerer_level"/> | ||
2616 | <attributes> | ||
2617 | <attribute name="text">1</attribute> | ||
2618 | </attributes> | ||
2619 | </child> | ||
2620 | </object> | ||
2621 | </child> | ||
2622 | </object> | ||
2623 | <packing> | ||
2624 | <property name="expand">False</property> | ||
2625 | <property name="fill">False</property> | ||
2626 | <property name="position">3</property> | ||
2627 | </packing> | ||
2628 | </child> | ||
2629 | </object> | ||
2630 | <packing> | ||
2631 | <property name="expand">False</property> | ||
2632 | <property name="fill">True</property> | ||
2633 | <property name="position">1</property> | ||
2634 | </packing> | ||
2635 | </child> | ||
2636 | </object> | ||
2637 | <packing> | ||
2638 | <property name="expand">False</property> | ||
2639 | <property name="fill">False</property> | ||
2640 | <property name="position">2</property> | ||
2641 | </packing> | ||
2642 | </child> | ||
2643 | </object> | ||
2644 | </child> | ||
2645 | <action-widgets> | ||
2646 | <action-widget response="-6">GNUNET_GTK_publish_file_dialog_cancel_button</action-widget> | ||
2647 | <action-widget response="-5">GNUNET_GTK_publish_file_dialog_ok_button</action-widget> | ||
2648 | </action-widgets> | ||
2649 | </object> | ||
2650 | <object class="GtkListStore" id="GNUNET_GTK_publish_file_dialog_expiration_list_store"> | ||
2651 | <columns> | ||
2652 | <!-- column-name human_readable_time --> | ||
2653 | <column type="gchararray"/> | ||
2654 | <!-- column-name time_in_ms --> | ||
2655 | <column type="guint64"/> | ||
2656 | </columns> | ||
2657 | </object> | ||
2658 | <object class="GtkListStore" id="GNUNET_GTK_select_pseudonym_liststore"> | ||
2659 | <columns> | ||
2660 | <!-- column-name namespace_name --> | ||
2661 | <column type="gchararray"/> | ||
2662 | <!-- column-name namespace_handle --> | ||
2663 | <column type="gpointer"/> | ||
2664 | </columns> | ||
888 | </object> | 2665 | </object> |
889 | <object class="GtkAdjustment" id="adjustment3"> | 2666 | <object class="GtkAdjustment" id="adjustment3"> |
890 | <property name="upper">100</property> | 2667 | <property name="upper">100</property> |
891 | <property name="step_increment">1</property> | 2668 | <property name="step_increment">1</property> |
892 | <property name="page_increment">10</property> | 2669 | <property name="page_increment">10</property> |
893 | <property name="page_size">10</property> | ||
894 | </object> | 2670 | </object> |
895 | <object class="GtkAdjustment" id="adjustment4"> | 2671 | <object class="GtkAdjustment" id="adjustment4"> |
896 | <property name="upper">100</property> | 2672 | <property name="upper">100</property> |
897 | <property name="step_increment">1</property> | 2673 | <property name="step_increment">1</property> |
898 | <property name="page_increment">10</property> | 2674 | <property name="page_increment">10</property> |
899 | <property name="page_size">10</property> | ||
900 | </object> | 2675 | </object> |
901 | <object class="GtkImage" id="execute_stock_image"> | 2676 | <object class="GtkDialog" id="GNUNET_GTK_select_pseudonym_dialog"> |
902 | <property name="visible">True</property> | ||
903 | <property name="can_focus">False</property> | 2677 | <property name="can_focus">False</property> |
904 | <property name="stock">gtk-execute</property> | 2678 | <property name="border_width">5</property> |
2679 | <property name="title" translatable="yes">Select pseudonym...</property> | ||
2680 | <property name="modal">True</property> | ||
2681 | <property name="default_width">400</property> | ||
2682 | <property name="default_height">300</property> | ||
2683 | <property name="destroy_with_parent">True</property> | ||
2684 | <property name="type_hint">normal</property> | ||
2685 | <signal name="realize" handler="GNUNET_GTK_select_pseudonym_dialog_realize_cb" swapped="no"/> | ||
2686 | <signal name="response" handler="GNUNET_GTK_select_pseudonym_dialog_response_cb" swapped="no"/> | ||
2687 | <child internal-child="vbox"> | ||
2688 | <object class="GtkVBox" id="dialog-vbox3"> | ||
2689 | <property name="visible">True</property> | ||
2690 | <property name="can_focus">False</property> | ||
2691 | <property name="spacing">2</property> | ||
2692 | <child internal-child="action_area"> | ||
2693 | <object class="GtkHButtonBox" id="dialog-action_area3"> | ||
2694 | <property name="visible">True</property> | ||
2695 | <property name="can_focus">False</property> | ||
2696 | <property name="layout_style">end</property> | ||
2697 | <child> | ||
2698 | <object class="GtkButton" id="GNUNET_GTK_select_pseudonym_cancel_button"> | ||
2699 | <property name="label">gtk-cancel</property> | ||
2700 | <property name="use_action_appearance">False</property> | ||
2701 | <property name="visible">True</property> | ||
2702 | <property name="can_focus">True</property> | ||
2703 | <property name="receives_default">True</property> | ||
2704 | <property name="use_stock">True</property> | ||
2705 | </object> | ||
2706 | <packing> | ||
2707 | <property name="expand">False</property> | ||
2708 | <property name="fill">False</property> | ||
2709 | <property name="position">0</property> | ||
2710 | </packing> | ||
2711 | </child> | ||
2712 | <child> | ||
2713 | <object class="GtkButton" id="GNUNET_GTK_select_pseudonym_ok_button"> | ||
2714 | <property name="label">gtk-ok</property> | ||
2715 | <property name="use_action_appearance">False</property> | ||
2716 | <property name="visible">True</property> | ||
2717 | <property name="sensitive">False</property> | ||
2718 | <property name="can_focus">True</property> | ||
2719 | <property name="receives_default">True</property> | ||
2720 | <property name="use_stock">True</property> | ||
2721 | </object> | ||
2722 | <packing> | ||
2723 | <property name="expand">False</property> | ||
2724 | <property name="fill">False</property> | ||
2725 | <property name="position">1</property> | ||
2726 | </packing> | ||
2727 | </child> | ||
2728 | </object> | ||
2729 | <packing> | ||
2730 | <property name="expand">False</property> | ||
2731 | <property name="fill">True</property> | ||
2732 | <property name="pack_type">end</property> | ||
2733 | <property name="position">0</property> | ||
2734 | </packing> | ||
2735 | </child> | ||
2736 | <child> | ||
2737 | <object class="GtkScrolledWindow" id="GNUNET_GTK_select_pseudonym_scrolledwindow"> | ||
2738 | <property name="visible">True</property> | ||
2739 | <property name="can_focus">True</property> | ||
2740 | <property name="hadjustment">adjustment3</property> | ||
2741 | <property name="vadjustment">adjustment4</property> | ||
2742 | <property name="hscrollbar_policy">automatic</property> | ||
2743 | <property name="vscrollbar_policy">automatic</property> | ||
2744 | <property name="shadow_type">in</property> | ||
2745 | <child> | ||
2746 | <object class="GtkTreeView" id="GNUNET_GTK_select_pseudonym_tree_view"> | ||
2747 | <property name="visible">True</property> | ||
2748 | <property name="can_focus">True</property> | ||
2749 | <property name="model">GNUNET_GTK_select_pseudonym_liststore</property> | ||
2750 | <property name="hadjustment">adjustment3</property> | ||
2751 | <property name="vadjustment">adjustment4</property> | ||
2752 | <property name="search_column">0</property> | ||
2753 | <child> | ||
2754 | <object class="GtkTreeViewColumn" id="GNUNET_GTK_select_pseudonym_tree_view_column"> | ||
2755 | <property name="title" translatable="yes">Name</property> | ||
2756 | <property name="expand">True</property> | ||
2757 | <property name="clickable">True</property> | ||
2758 | <property name="reorderable">True</property> | ||
2759 | <property name="sort_indicator">True</property> | ||
2760 | <property name="sort_column_id">0</property> | ||
2761 | <child> | ||
2762 | <object class="GtkCellRendererText" id="GNUNET_GTK_select_pseudonym_name_renderer"/> | ||
2763 | <attributes> | ||
2764 | <attribute name="text">0</attribute> | ||
2765 | </attributes> | ||
2766 | </child> | ||
2767 | </object> | ||
2768 | </child> | ||
2769 | </object> | ||
2770 | </child> | ||
2771 | </object> | ||
2772 | <packing> | ||
2773 | <property name="expand">True</property> | ||
2774 | <property name="fill">True</property> | ||
2775 | <property name="position">1</property> | ||
2776 | </packing> | ||
2777 | </child> | ||
2778 | <child> | ||
2779 | <placeholder/> | ||
2780 | </child> | ||
2781 | </object> | ||
2782 | </child> | ||
2783 | <action-widgets> | ||
2784 | <action-widget response="-6">GNUNET_GTK_select_pseudonym_cancel_button</action-widget> | ||
2785 | <action-widget response="-5">GNUNET_GTK_select_pseudonym_ok_button</action-widget> | ||
2786 | </action-widgets> | ||
905 | </object> | 2787 | </object> |
906 | <object class="GtkImage" id="execute_stock_image1"> | 2788 | <object class="GtkImage" id="add_stock_image"> |
907 | <property name="visible">True</property> | 2789 | <property name="visible">True</property> |
908 | <property name="can_focus">False</property> | 2790 | <property name="can_focus">False</property> |
909 | <property name="stock">gtk-execute</property> | 2791 | <property name="stock">gtk-add</property> |
910 | </object> | 2792 | </object> |
911 | <object class="GtkImage" id="execute_stock_image2"> | 2793 | <object class="GtkAdjustment" id="adjustment1"> |
912 | <property name="visible">True</property> | 2794 | <property name="upper">100</property> |
913 | <property name="can_focus">False</property> | 2795 | <property name="step_increment">1</property> |
914 | <property name="stock">gtk-execute</property> | 2796 | <property name="page_increment">10</property> |
2797 | <property name="page_size">10</property> | ||
915 | </object> | 2798 | </object> |
916 | <object class="GtkImage" id="image1"> | 2799 | <object class="GtkAdjustment" id="adjustment2"> |
917 | <property name="visible">True</property> | 2800 | <property name="upper">100</property> |
918 | <property name="can_focus">False</property> | 2801 | <property name="step_increment">1</property> |
919 | <property name="stock">gtk-open</property> | 2802 | <property name="page_increment">10</property> |
2803 | <property name="page_size">10</property> | ||
920 | </object> | 2804 | </object> |
921 | <object class="GtkImage" id="image2"> | 2805 | <object class="GtkAdjustment" id="adjustment5"> |
922 | <property name="visible">True</property> | 2806 | <property name="upper">100</property> |
923 | <property name="can_focus">False</property> | 2807 | <property name="step_increment">1</property> |
924 | <property name="stock">gtk-go-up</property> | 2808 | <property name="page_increment">10</property> |
925 | </object> | 2809 | </object> |
926 | <object class="GtkImage" id="image3"> | 2810 | <object class="GtkAdjustment" id="adjustment6"> |
927 | <property name="visible">True</property> | 2811 | <property name="upper">100</property> |
928 | <property name="can_focus">False</property> | 2812 | <property name="step_increment">1</property> |
929 | <property name="stock">gtk-new</property> | 2813 | <property name="page_increment">10</property> |
930 | </object> | 2814 | </object> |
931 | <object class="GtkImage" id="image4"> | 2815 | <object class="GtkAdjustment" id="adjustment7"> |
932 | <property name="visible">True</property> | 2816 | <property name="upper">100</property> |
933 | <property name="can_focus">False</property> | 2817 | <property name="step_increment">1</property> |
934 | <property name="stock">gtk-find</property> | 2818 | <property name="page_increment">10</property> |
2819 | </object> | ||
2820 | <object class="GtkAdjustment" id="adjustment8"> | ||
2821 | <property name="upper">100</property> | ||
2822 | <property name="step_increment">1</property> | ||
2823 | <property name="page_increment">10</property> | ||
935 | </object> | 2824 | </object> |
936 | <object class="GtkImage" id="image5"> | 2825 | <object class="GtkImage" id="down_stock_image"> |
937 | <property name="visible">True</property> | 2826 | <property name="visible">True</property> |
938 | <property name="can_focus">False</property> | 2827 | <property name="can_focus">False</property> |
939 | <property name="stock">gtk-go-down</property> | 2828 | <property name="stock">gtk-go-down</property> |
940 | </object> | 2829 | </object> |
941 | <object class="GtkImage" id="image6"> | 2830 | <object class="GtkImage" id="execute_stock_image"> |
942 | <property name="visible">True</property> | 2831 | <property name="visible">True</property> |
943 | <property name="can_focus">False</property> | 2832 | <property name="can_focus">False</property> |
944 | <property name="stock">gtk-index</property> | 2833 | <property name="stock">gtk-execute</property> |
945 | </object> | 2834 | </object> |
946 | <object class="GtkImage" id="image7"> | 2835 | <object class="GtkImage" id="find_stock_image"> |
947 | <property name="visible">True</property> | 2836 | <property name="visible">True</property> |
948 | <property name="can_focus">False</property> | 2837 | <property name="can_focus">False</property> |
949 | <property name="stock">gtk-index</property> | 2838 | <property name="stock">gtk-find</property> |
950 | </object> | 2839 | </object> |
951 | <object class="GtkImage" id="image8"> | 2840 | <object class="GtkImage" id="index_stock_image"> |
952 | <property name="visible">True</property> | 2841 | <property name="visible">True</property> |
953 | <property name="can_focus">False</property> | 2842 | <property name="can_focus">False</property> |
954 | <property name="stock">gtk-index</property> | 2843 | <property name="stock">gtk-index</property> |
955 | </object> | 2844 | </object> |
956 | <object class="GtkImage" id="image9"> | 2845 | <object class="GtkImage" id="left_stock_image"> |
957 | <property name="visible">True</property> | 2846 | <property name="visible">True</property> |
958 | <property name="can_focus">False</property> | 2847 | <property name="can_focus">False</property> |
959 | <property name="stock">gtk-index</property> | 2848 | <property name="stock">gtk-go-back</property> |
960 | </object> | ||
961 | <object class="GtkSizeGroup" id="enties_and_comboboxes_sizegroup"> | ||
962 | <property name="mode">vertical</property> | ||
963 | <widgets> | ||
964 | <widget name="main_window_search_entry"/> | ||
965 | <widget name="main_window_search_anonymity_combobox"/> | ||
966 | <widget name="main_window_search_mime_combobox"/> | ||
967 | </widgets> | ||
968 | </object> | 2849 | </object> |
969 | <object class="GtkListStore" id="main_window_search_anonymity_liststore"> | 2850 | <object class="GtkListStore" id="main_window_search_anonymity_liststore"> |
970 | <columns> | 2851 | <columns> |
@@ -1067,6 +2948,7 @@ | |||
1067 | <property name="can_focus">False</property> | 2948 | <property name="can_focus">False</property> |
1068 | <property name="events">GDK_LEAVE_NOTIFY_MASK | GDK_STRUCTURE_MASK</property> | 2949 | <property name="events">GDK_LEAVE_NOTIFY_MASK | GDK_STRUCTURE_MASK</property> |
1069 | <property name="resizable">False</property> | 2950 | <property name="resizable">False</property> |
2951 | <property name="destroy_with_parent">True</property> | ||
1070 | <property name="type_hint">dropdown-menu</property> | 2952 | <property name="type_hint">dropdown-menu</property> |
1071 | <property name="skip_taskbar_hint">True</property> | 2953 | <property name="skip_taskbar_hint">True</property> |
1072 | <property name="skip_pager_hint">True</property> | 2954 | <property name="skip_pager_hint">True</property> |
@@ -1117,4 +2999,78 @@ | |||
1117 | </object> | 2999 | </object> |
1118 | </child> | 3000 | </child> |
1119 | </object> | 3001 | </object> |
3002 | <object class="GtkImage" id="new_stock_imag"> | ||
3003 | <property name="visible">True</property> | ||
3004 | <property name="can_focus">False</property> | ||
3005 | <property name="stock">gtk-new</property> | ||
3006 | </object> | ||
3007 | <object class="GtkImage" id="new_stock_image"> | ||
3008 | <property name="visible">True</property> | ||
3009 | <property name="can_focus">False</property> | ||
3010 | <property name="stock">gtk-new</property> | ||
3011 | </object> | ||
3012 | <object class="GtkImage" id="open_stock_image"> | ||
3013 | <property name="visible">True</property> | ||
3014 | <property name="can_focus">False</property> | ||
3015 | <property name="stock">gtk-open</property> | ||
3016 | </object> | ||
3017 | <object class="GtkAdjustment" id="priority_adjustment"> | ||
3018 | <property name="upper">10000000</property> | ||
3019 | <property name="value">1000</property> | ||
3020 | <property name="step_increment">1</property> | ||
3021 | <property name="page_increment">10</property> | ||
3022 | </object> | ||
3023 | <object class="GtkImage" id="right_stock_image"> | ||
3024 | <property name="visible">True</property> | ||
3025 | <property name="can_focus">False</property> | ||
3026 | <property name="stock">gtk-go-forward</property> | ||
3027 | </object> | ||
3028 | <object class="GtkImage" id="up_stock_image"> | ||
3029 | <property name="visible">True</property> | ||
3030 | <property name="can_focus">False</property> | ||
3031 | <property name="stock">gtk-go-up</property> | ||
3032 | </object> | ||
3033 | <object class="GtkSizeGroup" id="edit_publication_options_input_widgets_sizegroup"> | ||
3034 | <widgets> | ||
3035 | <widget name="GNUNET_GTK_edit_publication_anonymity_combobox_alignment"/> | ||
3036 | <widget name="GNUNET_GTK_edit_publication_priority_spin_button"/> | ||
3037 | <widget name="GNUNET_GTK_edit_publication_root_entry"/> | ||
3038 | <widget name="GNUNET_GTK_edit_publication_expiration_year_spin_button"/> | ||
3039 | <widget name="GNUNET_GTK_edit_publication_index_checkbutton"/> | ||
3040 | </widgets> | ||
3041 | </object> | ||
3042 | <object class="GtkSizeGroup" id="edit_publication_options_labels_sizegroup"> | ||
3043 | <widgets> | ||
3044 | <widget name="GNUNET_GTK_edit_publication_anonymity_label"/> | ||
3045 | <widget name="GNUNET_GTK_edit_publication_priority_label"/> | ||
3046 | <widget name="GNUNET_GTK_edit_publication_root_label"/> | ||
3047 | <widget name="GNUNET_GTK_edit_publication_expiration_label"/> | ||
3048 | <widget name="GNUNET_GTK_edit_publication_index_label"/> | ||
3049 | </widgets> | ||
3050 | </object> | ||
3051 | <object class="GtkSizeGroup" id="enties_and_comboboxes_sizegroup"> | ||
3052 | <property name="mode">vertical</property> | ||
3053 | <widgets> | ||
3054 | <widget name="main_window_search_entry"/> | ||
3055 | <widget name="main_window_search_anonymity_combobox"/> | ||
3056 | <widget name="main_window_search_mime_combobox"/> | ||
3057 | </widgets> | ||
3058 | </object> | ||
3059 | <object class="GtkAdjustment" id="expiration_year_adjustment"> | ||
3060 | <property name="upper">9999</property> | ||
3061 | <property name="step_increment">1</property> | ||
3062 | <property name="page_increment">10</property> | ||
3063 | </object> | ||
3064 | <object class="GtkSizeGroup" id="sizegroup4"> | ||
3065 | <widgets> | ||
3066 | <widget name="GNUNET_GTK_master_publish_dialog_cancel_button"/> | ||
3067 | <widget name="GNUNET_GTK_master_publish_dialog_execute_button"/> | ||
3068 | </widgets> | ||
3069 | </object> | ||
3070 | <object class="GtkSizeGroup" id="sizegroup5"> | ||
3071 | <widgets> | ||
3072 | <widget name="GNUNET_GTK_edit_publication_confirm_button"/> | ||
3073 | <widget name="GNUNET_GTK_edit_publication_cancel_button"/> | ||
3074 | </widgets> | ||
3075 | </object> | ||
1120 | </interface> | 3076 | </interface> |
diff --git a/contrib/gnunet_fs_gtk_open_directory_dialog.glade b/contrib/gnunet_fs_gtk_open_directory_dialog.glade index d55c0b00..a807742a 100644 --- a/contrib/gnunet_fs_gtk_open_directory_dialog.glade +++ b/contrib/gnunet_fs_gtk_open_directory_dialog.glade | |||
@@ -4,30 +4,30 @@ | |||
4 | <!-- interface-naming-policy project-wide --> | 4 | <!-- interface-naming-policy project-wide --> |
5 | <object class="GtkFileFilter" id="gnunet_directory_filter"/> | 5 | <object class="GtkFileFilter" id="gnunet_directory_filter"/> |
6 | <object class="GtkFileChooserDialog" id="GNUNET_GTK_open_directory_dialog"> | 6 | <object class="GtkFileChooserDialog" id="GNUNET_GTK_open_directory_dialog"> |
7 | <property name="can_focus">False</property> | ||
7 | <property name="can_default">True</property> | 8 | <property name="can_default">True</property> |
8 | <property name="border_width">5</property> | 9 | <property name="border_width">5</property> |
9 | <property name="type_hint">normal</property> | 10 | <property name="type_hint">normal</property> |
10 | <property name="has_separator">False</property> | ||
11 | <property name="filter">gnunet_directory_filter</property> | ||
12 | <property name="create_folders">False</property> | 11 | <property name="create_folders">False</property> |
12 | <property name="filter">gnunet_directory_filter</property> | ||
13 | <signal name="response" handler="GNUNET_GTK_open_directory_dialog_response_cb" swapped="no"/> | ||
13 | <child internal-child="vbox"> | 14 | <child internal-child="vbox"> |
14 | <object class="GtkVBox" id="dialog-vbox3"> | 15 | <object class="GtkVBox" id="dialog-vbox3"> |
15 | <property name="visible">True</property> | 16 | <property name="visible">True</property> |
17 | <property name="can_focus">False</property> | ||
16 | <property name="spacing">2</property> | 18 | <property name="spacing">2</property> |
17 | <child> | ||
18 | <placeholder/> | ||
19 | </child> | ||
20 | <child internal-child="action_area"> | 19 | <child internal-child="action_area"> |
21 | <object class="GtkHButtonBox" id="dialog-action_area4"> | 20 | <object class="GtkHButtonBox" id="dialog-action_area4"> |
22 | <property name="visible">True</property> | 21 | <property name="visible">True</property> |
22 | <property name="can_focus">False</property> | ||
23 | <property name="layout_style">end</property> | 23 | <property name="layout_style">end</property> |
24 | <child> | 24 | <child> |
25 | <object class="GtkButton" id="GNUNET_GTK_open_directory_dialog_cancel_button"> | 25 | <object class="GtkButton" id="GNUNET_GTK_open_directory_dialog_cancel_button"> |
26 | <property name="label">gtk-cancel</property> | 26 | <property name="label">gtk-cancel</property> |
27 | <property name="use_action_appearance">False</property> | ||
27 | <property name="visible">True</property> | 28 | <property name="visible">True</property> |
28 | <property name="can_focus">True</property> | 29 | <property name="can_focus">True</property> |
29 | <property name="receives_default">True</property> | 30 | <property name="receives_default">True</property> |
30 | <property name="use_action_appearance">False</property> | ||
31 | <property name="use_stock">True</property> | 31 | <property name="use_stock">True</property> |
32 | </object> | 32 | </object> |
33 | <packing> | 33 | <packing> |
@@ -39,11 +39,11 @@ | |||
39 | <child> | 39 | <child> |
40 | <object class="GtkButton" id="GNUNET_GTK_open_directory_dialog_ok_button"> | 40 | <object class="GtkButton" id="GNUNET_GTK_open_directory_dialog_ok_button"> |
41 | <property name="label">gtk-ok</property> | 41 | <property name="label">gtk-ok</property> |
42 | <property name="use_action_appearance">False</property> | ||
42 | <property name="visible">True</property> | 43 | <property name="visible">True</property> |
43 | <property name="can_focus">True</property> | 44 | <property name="can_focus">True</property> |
44 | <property name="can_default">True</property> | 45 | <property name="can_default">True</property> |
45 | <property name="receives_default">True</property> | 46 | <property name="receives_default">True</property> |
46 | <property name="use_action_appearance">False</property> | ||
47 | <property name="use_stock">True</property> | 47 | <property name="use_stock">True</property> |
48 | </object> | 48 | </object> |
49 | <packing> | 49 | <packing> |
@@ -55,10 +55,14 @@ | |||
55 | </object> | 55 | </object> |
56 | <packing> | 56 | <packing> |
57 | <property name="expand">False</property> | 57 | <property name="expand">False</property> |
58 | <property name="fill">True</property> | ||
58 | <property name="pack_type">end</property> | 59 | <property name="pack_type">end</property> |
59 | <property name="position">0</property> | 60 | <property name="position">0</property> |
60 | </packing> | 61 | </packing> |
61 | </child> | 62 | </child> |
63 | <child> | ||
64 | <placeholder/> | ||
65 | </child> | ||
62 | </object> | 66 | </object> |
63 | </child> | 67 | </child> |
64 | <action-widgets> | 68 | <action-widgets> |
diff --git a/contrib/gnunet_fs_gtk_select_pseudonym_dialog.glade b/contrib/gnunet_fs_gtk_select_pseudonym_dialog.glade index ea50fa41..418231de 100644 --- a/contrib/gnunet_fs_gtk_select_pseudonym_dialog.glade +++ b/contrib/gnunet_fs_gtk_select_pseudonym_dialog.glade | |||
@@ -2,28 +2,81 @@ | |||
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="GtkAdjustment" id="adjustment2"> | 5 | <object class="GtkListStore" id="GNUNET_GTK_select_pseudonym_liststore"> |
6 | <columns> | ||
7 | <!-- column-name namespace_name --> | ||
8 | <column type="gchararray"/> | ||
9 | <!-- column-name namespace_handle --> | ||
10 | <column type="gpointer"/> | ||
11 | </columns> | ||
12 | </object> | ||
13 | <object class="GtkAdjustment" id="adjustment1"> | ||
6 | <property name="upper">100</property> | 14 | <property name="upper">100</property> |
7 | <property name="step_increment">1</property> | 15 | <property name="step_increment">1</property> |
8 | <property name="page_increment">10</property> | 16 | <property name="page_increment">10</property> |
9 | <property name="page_size">10</property> | 17 | <property name="page_size">10</property> |
10 | </object> | 18 | </object> |
11 | <object class="GtkAdjustment" id="adjustment1"> | 19 | <object class="GtkAdjustment" id="adjustment2"> |
12 | <property name="upper">100</property> | 20 | <property name="upper">100</property> |
13 | <property name="step_increment">1</property> | 21 | <property name="step_increment">1</property> |
14 | <property name="page_increment">10</property> | 22 | <property name="page_increment">10</property> |
15 | <property name="page_size">10</property> | 23 | <property name="page_size">10</property> |
16 | </object> | 24 | </object> |
17 | <object class="GtkDialog" id="GNUNET_GTK_select_pseudonym_dialog"> | 25 | <object class="GtkDialog" id="GNUNET_GTK_select_pseudonym_dialog"> |
26 | <property name="can_focus">False</property> | ||
18 | <property name="border_width">5</property> | 27 | <property name="border_width">5</property> |
19 | <property name="title" translatable="yes">Select pseudonym...</property> | 28 | <property name="title" translatable="yes">Select pseudonym...</property> |
20 | <property name="modal">True</property> | 29 | <property name="modal">True</property> |
21 | <property name="type_hint">normal</property> | 30 | <property name="type_hint">normal</property> |
22 | <property name="has_separator">False</property> | ||
23 | <child internal-child="vbox"> | 31 | <child internal-child="vbox"> |
24 | <object class="GtkVBox" id="GNUNET_GTK_select_pseudonym_dialog_vbox"> | 32 | <object class="GtkVBox" id="GNUNET_GTK_select_pseudonym_dialog_vbox"> |
25 | <property name="visible">True</property> | 33 | <property name="visible">True</property> |
34 | <property name="can_focus">False</property> | ||
26 | <property name="spacing">2</property> | 35 | <property name="spacing">2</property> |
36 | <child internal-child="action_area"> | ||
37 | <object class="GtkHButtonBox" id="GNUNET_GTK_select_pseudonym_dialog_action_area"> | ||
38 | <property name="visible">True</property> | ||
39 | <property name="can_focus">False</property> | ||
40 | <property name="layout_style">end</property> | ||
41 | <child> | ||
42 | <object class="GtkButton" id="GNUNET_GTK_select_pseudonym_cancel_button"> | ||
43 | <property name="label">gtk-cancel</property> | ||
44 | <property name="use_action_appearance">False</property> | ||
45 | <property name="visible">True</property> | ||
46 | <property name="can_focus">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">0</property> | ||
54 | </packing> | ||
55 | </child> | ||
56 | <child> | ||
57 | <object class="GtkButton" id="GNUNET_GTK_select_pseudonym_ok_button"> | ||
58 | <property name="label">gtk-ok</property> | ||
59 | <property name="use_action_appearance">False</property> | ||
60 | <property name="visible">True</property> | ||
61 | <property name="sensitive">False</property> | ||
62 | <property name="can_focus">True</property> | ||
63 | <property name="receives_default">True</property> | ||
64 | <property name="use_stock">True</property> | ||
65 | </object> | ||
66 | <packing> | ||
67 | <property name="expand">False</property> | ||
68 | <property name="fill">False</property> | ||
69 | <property name="position">1</property> | ||
70 | </packing> | ||
71 | </child> | ||
72 | </object> | ||
73 | <packing> | ||
74 | <property name="expand">False</property> | ||
75 | <property name="fill">True</property> | ||
76 | <property name="pack_type">end</property> | ||
77 | <property name="position">0</property> | ||
78 | </packing> | ||
79 | </child> | ||
27 | <child> | 80 | <child> |
28 | <object class="GtkScrolledWindow" id="GNUNET_GTK_select_pseudonym_scrolledwindow"> | 81 | <object class="GtkScrolledWindow" id="GNUNET_GTK_select_pseudonym_scrolledwindow"> |
29 | <property name="visible">True</property> | 82 | <property name="visible">True</property> |
@@ -59,54 +112,14 @@ | |||
59 | </child> | 112 | </child> |
60 | </object> | 113 | </object> |
61 | <packing> | 114 | <packing> |
115 | <property name="expand">True</property> | ||
116 | <property name="fill">True</property> | ||
62 | <property name="position">1</property> | 117 | <property name="position">1</property> |
63 | </packing> | 118 | </packing> |
64 | </child> | 119 | </child> |
65 | <child> | 120 | <child> |
66 | <placeholder/> | 121 | <placeholder/> |
67 | </child> | 122 | </child> |
68 | <child internal-child="action_area"> | ||
69 | <object class="GtkHButtonBox" id="GNUNET_GTK_select_pseudonym_dialog_action_area"> | ||
70 | <property name="visible">True</property> | ||
71 | <property name="layout_style">end</property> | ||
72 | <child> | ||
73 | <object class="GtkButton" id="GNUNET_GTK_select_pseudonym_cancel_button"> | ||
74 | <property name="label">gtk-cancel</property> | ||
75 | <property name="visible">True</property> | ||
76 | <property name="can_focus">True</property> | ||
77 | <property name="receives_default">True</property> | ||
78 | <property name="use_action_appearance">False</property> | ||
79 | <property name="use_stock">True</property> | ||
80 | </object> | ||
81 | <packing> | ||
82 | <property name="expand">False</property> | ||
83 | <property name="fill">False</property> | ||
84 | <property name="position">0</property> | ||
85 | </packing> | ||
86 | </child> | ||
87 | <child> | ||
88 | <object class="GtkButton" id="GNUNET_GTK_select_pseudonym_ok_button"> | ||
89 | <property name="label">gtk-ok</property> | ||
90 | <property name="visible">True</property> | ||
91 | <property name="sensitive">False</property> | ||
92 | <property name="can_focus">True</property> | ||
93 | <property name="receives_default">True</property> | ||
94 | <property name="use_action_appearance">False</property> | ||
95 | <property name="use_stock">True</property> | ||
96 | </object> | ||
97 | <packing> | ||
98 | <property name="expand">False</property> | ||
99 | <property name="fill">False</property> | ||
100 | <property name="position">1</property> | ||
101 | </packing> | ||
102 | </child> | ||
103 | </object> | ||
104 | <packing> | ||
105 | <property name="expand">False</property> | ||
106 | <property name="pack_type">end</property> | ||
107 | <property name="position">0</property> | ||
108 | </packing> | ||
109 | </child> | ||
110 | </object> | 123 | </object> |
111 | </child> | 124 | </child> |
112 | <action-widgets> | 125 | <action-widgets> |
@@ -114,12 +127,4 @@ | |||
114 | <action-widget response="-5">GNUNET_GTK_select_pseudonym_ok_button</action-widget> | 127 | <action-widget response="-5">GNUNET_GTK_select_pseudonym_ok_button</action-widget> |
115 | </action-widgets> | 128 | </action-widgets> |
116 | </object> | 129 | </object> |
117 | <object class="GtkListStore" id="GNUNET_GTK_select_pseudonym_liststore"> | ||
118 | <columns> | ||
119 | <!-- column-name namespace_name --> | ||
120 | <column type="gchararray"/> | ||
121 | <!-- column-name namespace_handle --> | ||
122 | <column type="gpointer"/> | ||
123 | </columns> | ||
124 | </object> | ||
125 | </interface> | 130 | </interface> |
diff --git a/src/fs/gnunet-fs-gtk-download.c b/src/fs/gnunet-fs-gtk-download.c index d9451e1c..1a7ff302 100644 --- a/src/fs/gnunet-fs-gtk-download.c +++ b/src/fs/gnunet-fs-gtk-download.c | |||
@@ -203,7 +203,7 @@ GNUNET_FS_GTK_open_download_as_dialog (struct DownloadContext *dc) | |||
203 | dlc->response = 0; | 203 | dlc->response = 0; |
204 | dlc->dc = dc; | 204 | dlc->dc = dc; |
205 | g_object_set_data (G_OBJECT (ad), "dialog-context", dlc); | 205 | g_object_set_data (G_OBJECT (ad), "dialog-context", dlc); |
206 | gtk_widget_show_all (ad); | 206 | gtk_window_present (GTK_WINDOW (ad)); |
207 | } | 207 | } |
208 | 208 | ||
209 | /* end of gnunet-fs-gtk-download.c */ | 209 | /* end of gnunet-fs-gtk-download.c */ |
diff --git a/src/fs/gnunet-fs-gtk-edit_publish_dialog.c b/src/fs/gnunet-fs-gtk-edit_publish_dialog.c index 2465e6ac..37fe1a2a 100644 --- a/src/fs/gnunet-fs-gtk-edit_publish_dialog.c +++ b/src/fs/gnunet-fs-gtk-edit_publish_dialog.c | |||
@@ -24,87 +24,26 @@ | |||
24 | */ | 24 | */ |
25 | #include "gnunet-fs-gtk-common.h" | 25 | #include "gnunet-fs-gtk-common.h" |
26 | #include "gnunet-fs-gtk-edit_publish_dialog.h" | 26 | #include "gnunet-fs-gtk-edit_publish_dialog.h" |
27 | #include "gnunet-fs-gtk.h" | ||
27 | #include <gnunet/gnunet_util_lib.h> | 28 | #include <gnunet/gnunet_util_lib.h> |
29 | #include <gdk/gdkkeysyms.h> | ||
28 | 30 | ||
29 | /** | 31 | #define PUBSTATE "edit-publication-state" |
30 | * Builder for the current dialog. | ||
31 | */ | ||
32 | static GtkBuilder *builder; | ||
33 | |||
34 | /** | ||
35 | * Are we editing metadata for a directory? | ||
36 | */ | ||
37 | static int is_directory; | ||
38 | |||
39 | /** | ||
40 | * Set to YES if the preview was changed. | ||
41 | */ | ||
42 | static int preview_changed; | ||
43 | |||
44 | void | ||
45 | GNUNET_GTK_edit_file_information_keyword_list_normalize_button_clicked_cb () | ||
46 | { | ||
47 | GNUNET_break (0); | ||
48 | } | ||
49 | |||
50 | void | ||
51 | GNUNET_GTK_edit_file_information_keyword_list_del_button_clicked_cb () | ||
52 | { | ||
53 | GtkTreeView *tv; | ||
54 | GtkTreeSelection *sel; | ||
55 | GtkTreeModel *tm; | ||
56 | GtkTreeIter iter; | ||
57 | |||
58 | tv = GTK_TREE_VIEW (gtk_builder_get_object | ||
59 | (builder, | ||
60 | "GNUNET_GTK_edit_file_information_keyword_list_tree_view")); | ||
61 | sel = gtk_tree_view_get_selection (tv); | ||
62 | if (TRUE != gtk_tree_selection_get_selected (sel, &tm, &iter)) | ||
63 | { | ||
64 | GNUNET_break (0); | ||
65 | return; | ||
66 | } | ||
67 | gtk_list_store_remove (GTK_LIST_STORE (tm), &iter); | ||
68 | } | ||
69 | |||
70 | void | ||
71 | GNUNET_GTK_edit_file_information_keyword_list_add_button_clicked_cb () | ||
72 | { | ||
73 | const char *keyword; | ||
74 | GtkEntry *entry; | ||
75 | GtkListStore *ls; | ||
76 | GtkTreeIter iter; | ||
77 | |||
78 | ls = GTK_LIST_STORE (gtk_builder_get_object | ||
79 | (builder, "GNUNET_GTK_keyword_list_store")); | ||
80 | entry = | ||
81 | GTK_ENTRY (gtk_builder_get_object | ||
82 | (builder, "GNUNET_GTK_edit_file_information_keyword_entry")); | ||
83 | keyword = gtk_entry_get_text (entry); | ||
84 | if (strlen (keyword) > 0) | ||
85 | gtk_list_store_insert_with_values (ls, &iter, G_MAXINT, 0, keyword, -1); | ||
86 | gtk_entry_set_text (entry, ""); | ||
87 | } | ||
88 | 32 | ||
89 | 33 | struct edit_publication_state | |
90 | void | ||
91 | GNUNET_GTK_edit_file_information_keyword_entry_changed_cb () | ||
92 | { | 34 | { |
93 | const char *keyword; | 35 | int *do_index; |
94 | GtkEntry *entry; | 36 | char **short_fn; |
95 | GtkWidget *button; | 37 | guint *anonymity_level; |
96 | 38 | guint *priority; | |
97 | button = | 39 | struct GNUNET_FS_FileInformation *fip; |
98 | GTK_WIDGET (gtk_builder_get_object | 40 | gint preview_changed; |
99 | (builder, | 41 | gboolean allow_no_keywords; |
100 | "GNUNET_GTK_edit_file_information_keyword_list_add_button")); | 42 | gboolean is_directory; |
101 | entry = | 43 | GNUNET_FS_GTK_edit_publish_dialog_cb cb; |
102 | GTK_ENTRY (gtk_builder_get_object | 44 | gchar *root; |
103 | (builder, "GNUNET_GTK_edit_file_information_keyword_entry")); | 45 | gpointer cls; |
104 | keyword = gtk_entry_get_text (entry); | 46 | }; |
105 | gtk_widget_set_sensitive (button, (strlen (keyword) > 0) ? TRUE : FALSE); | ||
106 | } | ||
107 | |||
108 | 47 | ||
109 | static void | 48 | static void |
110 | metadata_selection_changed_cb (GtkTreeSelection * ts, gpointer user_data) | 49 | metadata_selection_changed_cb (GtkTreeSelection * ts, gpointer user_data) |
@@ -112,165 +51,222 @@ metadata_selection_changed_cb (GtkTreeSelection * ts, gpointer user_data) | |||
112 | GtkTreeView *tv; | 51 | GtkTreeView *tv; |
113 | GtkTreeSelection *sel; | 52 | GtkTreeSelection *sel; |
114 | GtkWidget *button; | 53 | GtkWidget *button; |
54 | GtkBuilder *builder; | ||
55 | |||
56 | builder = GTK_BUILDER (user_data); | ||
115 | 57 | ||
116 | tv = GTK_TREE_VIEW (gtk_builder_get_object | 58 | tv = GTK_TREE_VIEW (gtk_builder_get_object |
117 | (builder, | 59 | (builder, |
118 | "GNUNET_GTK_edit_file_information_metadata_tree_view")); | 60 | "GNUNET_GTK_edit_publication_metadata_tree_view")); |
119 | sel = gtk_tree_view_get_selection (tv); | 61 | sel = gtk_tree_view_get_selection (tv); |
120 | button = | 62 | button = |
121 | GTK_WIDGET (gtk_builder_get_object | 63 | GTK_WIDGET (gtk_builder_get_object |
122 | (builder, | 64 | (builder, |
123 | "GNUNET_GTK_edit_file_information_metadata_delete_button")); | 65 | "GNUNET_GTK_edit_publication_delete_button")); |
124 | gtk_widget_set_sensitive (button, | 66 | gtk_widget_set_sensitive (button, |
125 | gtk_tree_selection_get_selected (sel, NULL, NULL)); | 67 | gtk_tree_selection_get_selected (sel, NULL, NULL)); |
126 | } | 68 | } |
127 | 69 | ||
128 | |||
129 | static void | 70 | static void |
130 | keyword_selection_changed_cb (GtkTreeSelection * ts, gpointer user_data) | 71 | keywords_selection_changed_cb (GtkTreeSelection * ts, gpointer user_data) |
131 | { | 72 | { |
132 | GtkTreeView *tv; | 73 | GtkTreeView *tv; |
133 | GtkTreeSelection *sel; | 74 | GtkTreeSelection *sel; |
134 | GtkWidget *button; | 75 | GtkWidget *button; |
76 | GtkBuilder *builder; | ||
77 | |||
78 | builder = GTK_BUILDER (user_data); | ||
79 | |||
135 | 80 | ||
136 | tv = GTK_TREE_VIEW (gtk_builder_get_object | 81 | tv = GTK_TREE_VIEW (gtk_builder_get_object |
137 | (builder, | 82 | (builder, |
138 | "GNUNET_GTK_edit_file_information_keyword_list_tree_view")); | 83 | "GNUNET_GTK_edit_publication_keyword_list_tree_view")); |
139 | sel = gtk_tree_view_get_selection (tv); | 84 | sel = gtk_tree_view_get_selection (tv); |
140 | button = | 85 | button = |
141 | GTK_WIDGET (gtk_builder_get_object | 86 | GTK_WIDGET (gtk_builder_get_object |
142 | (builder, | 87 | (builder, |
143 | "GNUNET_GTK_edit_file_information_keyword_list_del_button")); | 88 | "GNUNET_GTK_edit_publication_keyword_list_del_button")); |
144 | 89 | ||
145 | gtk_widget_set_sensitive (button, | 90 | gtk_widget_set_sensitive (button, |
146 | gtk_tree_selection_get_selected (sel, NULL, NULL)); | 91 | gtk_tree_selection_get_selected (sel, NULL, NULL)); |
147 | button = | 92 | button = |
148 | GTK_WIDGET (gtk_builder_get_object | 93 | GTK_WIDGET (gtk_builder_get_object |
149 | (builder, | 94 | (builder, |
150 | "GNUNET_GTK_edit_file_information_keyword_list_normalize_button")); | 95 | "GNUNET_GTK_edit_publication_keyword_list_normalize_button")); |
151 | gtk_widget_set_sensitive (button, | 96 | gtk_widget_set_sensitive (button, |
152 | gtk_tree_selection_get_selected (sel, NULL, NULL)); | 97 | gtk_tree_selection_get_selected (sel, NULL, NULL)); |
153 | } | 98 | } |
154 | 99 | ||
155 | 100 | ||
156 | void | 101 | void |
157 | GNUNET_GTK_edit_file_information_metadata_value_entry_changed_cb () | 102 | GNUNET_GTK_edit_publication_window_realize_cb (GtkWidget *widget, |
103 | gpointer user_data) | ||
158 | { | 104 | { |
105 | GtkBuilder *builder; | ||
106 | GtkListStore *metatypes_list; | ||
107 | GtkTreeIter iter; | ||
159 | GtkTreeView *tv; | 108 | GtkTreeView *tv; |
160 | GtkTreeSelection *sel; | 109 | GtkTreeSelection *sel; |
161 | const char *value; | 110 | guint type; |
162 | GtkEntry *entry; | 111 | guint max_type; |
163 | GtkWidget *button; | ||
164 | 112 | ||
165 | entry = | 113 | builder = GTK_BUILDER (user_data); |
166 | GTK_ENTRY (gtk_builder_get_object | 114 | metatypes_list = GTK_LIST_STORE (gtk_builder_get_object (builder, |
167 | (builder, | 115 | "GNUNET_GTK_publication_metadata_types_liststore")); |
168 | "GNUNET_GTK_edit_file_information_metadata_value_entry")); | 116 | |
169 | value = gtk_entry_get_text (entry); | 117 | tv = GTK_TREE_VIEW (gtk_builder_get_object (builder, |
170 | tv = GTK_TREE_VIEW (gtk_builder_get_object | 118 | "GNUNET_GTK_edit_publication_metadata_tree_view")); |
171 | (builder, | ||
172 | "GNUNET_GTK_edit_file_information_metadata_type_tree_view")); | ||
173 | sel = gtk_tree_view_get_selection (tv); | 119 | sel = gtk_tree_view_get_selection (tv); |
174 | button = | 120 | g_signal_connect (G_OBJECT (sel), "changed", |
175 | GTK_WIDGET (gtk_builder_get_object | 121 | G_CALLBACK (metadata_selection_changed_cb), builder); |
176 | (builder, | ||
177 | "GNUNET_GTK_edit_file_information_metadata_add_button")); | ||
178 | gtk_widget_set_sensitive (button, | ||
179 | (strlen (value) > | ||
180 | 0) ? gtk_tree_selection_get_selected (sel, NULL, | ||
181 | NULL) : | ||
182 | FALSE); | ||
183 | } | ||
184 | 122 | ||
123 | tv = GTK_TREE_VIEW (gtk_builder_get_object (builder, | ||
124 | "GNUNET_GTK_edit_publication_keyword_list_tree_view")); | ||
125 | sel = gtk_tree_view_get_selection (tv); | ||
126 | g_signal_connect (G_OBJECT (sel), "changed", | ||
127 | G_CALLBACK (keywords_selection_changed_cb), builder); | ||
185 | 128 | ||
186 | void | 129 | max_type = EXTRACTOR_metatype_get_max (); |
187 | GNUNET_GTK_edit_file_information_keyword_entry_activate_cb () | 130 | for (type = 1; type < max_type - 1; type++) |
188 | { | 131 | gtk_list_store_insert_with_values (metatypes_list, &iter, G_MAXINT, |
189 | GNUNET_GTK_edit_file_information_keyword_list_add_button_clicked_cb (); | 132 | 0, type, |
133 | 1, EXTRACTOR_METAFORMAT_UTF8, | ||
134 | 2, EXTRACTOR_metatype_to_string (type), | ||
135 | 3, EXTRACTOR_metatype_to_description (type), -1); | ||
190 | } | 136 | } |
191 | 137 | ||
192 | |||
193 | void | 138 | void |
194 | GNUNET_GTK_edit_file_information_metadata_preview_file_chooser_button_file_set_cb | 139 | GNUNET_GTK_edit_publication_add_button_clicked_cb (GtkButton *button, |
195 | (GtkFileChooserButton * widget, gpointer user_data) | 140 | gpointer user_data) |
196 | { | 141 | { |
197 | gchar *fn; | 142 | GtkBuilder *builder; |
198 | GtkImage *image; | 143 | GtkTreeView *meta_tree; |
144 | GtkListStore *meta_list; | ||
145 | GtkTreeIter iter; | ||
199 | 146 | ||
200 | fn = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (widget)); | 147 | builder = GTK_BUILDER (user_data); |
201 | image = | 148 | meta_tree = GTK_TREE_VIEW (gtk_builder_get_object (builder, |
202 | GTK_IMAGE (gtk_builder_get_object | 149 | "GNUNET_GTK_edit_publication_metadata_tree_view")); |
203 | (builder, | 150 | meta_list = GTK_LIST_STORE (gtk_tree_view_get_model (meta_tree)); |
204 | "GNUNET_GTK_edit_file_information_metadata_preview_image")); | 151 | |
205 | gtk_image_set_from_file (image, fn); | 152 | gtk_list_store_insert (meta_list, &iter, 0); |
206 | preview_changed = GNUNET_YES; | 153 | /* type == -1 means "not set" */ |
154 | gtk_list_store_set (meta_list, &iter, 0, -1, 1, EXTRACTOR_METAFORMAT_UTF8, | ||
155 | 2, _("Select a type"), 3, _("Specify a value"), 4, NULL, -1); | ||
207 | } | 156 | } |
208 | 157 | ||
158 | gboolean | ||
159 | GNUNET_GTK_edit_publication_keyword_entry_key_press_event_cb (GtkWidget *widget, | ||
160 | GdkEventKey *event, gpointer user_data) | ||
161 | { | ||
162 | GtkBuilder *builder; | ||
163 | GtkButton *add_button; | ||
164 | builder = GTK_BUILDER (user_data); | ||
165 | |||
166 | if (event->keyval == GDK_KEY_Return) | ||
167 | { | ||
168 | add_button = GTK_BUTTON (gtk_builder_get_object (builder, | ||
169 | "GNUNET_GTK_edit_publication_add_button")); | ||
170 | GNUNET_GTK_edit_publication_add_button_clicked_cb (add_button, user_data); | ||
171 | return TRUE; | ||
172 | } | ||
173 | return FALSE; | ||
174 | } | ||
209 | 175 | ||
210 | void | 176 | void |
211 | GNUNET_GTK_edit_file_information_metadata_delete_button_clicked_cb () | 177 | GNUNET_GTK_edit_publication_metadata_tree_view_type_renderer_edited_cb ( |
178 | GtkCellRendererText *renderer, gchar *path, gchar *new_text, | ||
179 | gpointer user_data) | ||
212 | { | 180 | { |
213 | GtkTreeView *tv; | 181 | GtkBuilder *builder; |
214 | GtkTreeSelection *sel; | 182 | GtkTreeView *meta_tree; |
215 | GtkTreeModel *tm; | 183 | GtkListStore *meta_list; |
184 | GtkCellRendererCombo *combo; | ||
185 | GtkTreeModel *combo_model; | ||
216 | GtkTreeIter iter; | 186 | GtkTreeIter iter; |
187 | gint type_id; | ||
188 | gchar *description = NULL; | ||
189 | GtkTreeIter *pass_data = NULL; | ||
190 | |||
191 | builder = GTK_BUILDER (user_data); | ||
192 | meta_tree = GTK_TREE_VIEW (gtk_builder_get_object (builder, | ||
193 | "GNUNET_GTK_edit_publication_metadata_tree_view")); | ||
194 | meta_list = GTK_LIST_STORE (gtk_tree_view_get_model (meta_tree)); | ||
195 | if (!gtk_tree_model_get_iter_from_string (GTK_TREE_MODEL (meta_list), &iter, path)) | ||
196 | return; | ||
217 | 197 | ||
218 | tv = GTK_TREE_VIEW (gtk_builder_get_object | 198 | combo = GTK_CELL_RENDERER_COMBO (gtk_builder_get_object (builder, |
219 | (builder, | 199 | "GNUNET_GTK_edit_publication_metadata_tree_view_type_renderer")); |
220 | "GNUNET_GTK_edit_file_information_metadata_tree_view")); | 200 | |
221 | sel = gtk_tree_view_get_selection (tv); | 201 | pass_data = g_object_get_data (G_OBJECT (combo), "selected-type"); |
222 | if (TRUE != gtk_tree_selection_get_selected (sel, &tm, &iter)) | 202 | if (!pass_data) |
223 | { | ||
224 | GNUNET_break (0); | ||
225 | return; | 203 | return; |
226 | } | 204 | g_object_get (combo, "model", &combo_model, NULL); |
227 | gtk_list_store_remove (GTK_LIST_STORE (tm), &iter); | 205 | gtk_tree_model_get (combo_model, pass_data, 0, &type_id, 2, &description, -1); |
206 | g_free (combo_model); | ||
207 | g_free (pass_data); | ||
208 | g_object_set_data (G_OBJECT (combo), "selected-type", NULL); | ||
209 | |||
210 | gtk_list_store_set (meta_list, &iter, 0, type_id, 1, | ||
211 | EXTRACTOR_METAFORMAT_UTF8, 2, new_text, 4, description, -1); | ||
212 | g_free (description); | ||
228 | } | 213 | } |
229 | 214 | ||
215 | void | ||
216 | GNUNET_GTK_edit_publication_metadata_tree_view_type_renderer_changed_cb ( | ||
217 | GtkCellRendererCombo *combo, gchar *path_string, GtkTreeIter *new_iter, | ||
218 | gpointer user_data) | ||
219 | { | ||
220 | GtkTreeIter *pass_data; | ||
221 | |||
222 | pass_data = g_object_get_data (G_OBJECT (combo), "selected-type"); | ||
223 | if (pass_data) | ||
224 | g_free (pass_data); | ||
225 | pass_data = g_new0 (GtkTreeIter, 1); | ||
226 | *pass_data = *new_iter; | ||
227 | g_object_set_data (G_OBJECT (combo), "selected-type", pass_data); | ||
228 | } | ||
230 | 229 | ||
231 | void | 230 | void |
232 | GNUNET_GTK_edit_file_information_metadata_add_button_clicked_cb () | 231 | GNUNET_GTK_edit_publication_metadata_tree_view_value_renderer_edited_cb ( |
232 | GtkCellRendererText *renderer, gchar *path, gchar *new_text, | ||
233 | gpointer user_data) | ||
233 | { | 234 | { |
234 | const char *value; | 235 | GtkBuilder *builder; |
236 | GtkTreeView *meta_tree; | ||
237 | GtkListStore *meta_list; | ||
238 | GtkTreeIter iter; | ||
239 | gint metatype; | ||
235 | char *avalue; | 240 | char *avalue; |
236 | const char *ivalue; | 241 | const char *ivalue; |
237 | GtkEntry *entry; | ||
238 | GtkListStore *ls; | ||
239 | GtkTreeModel *tm; | ||
240 | GtkTreeView *tv; | ||
241 | GtkTreeSelection *sel; | ||
242 | GtkTreeIter iter; | ||
243 | guint type; | ||
244 | size_t slen; | 242 | size_t slen; |
245 | char *pos; | 243 | char *pos; |
246 | 244 | ||
247 | entry = | 245 | GObject *pubwindow; |
248 | GTK_ENTRY (gtk_builder_get_object | 246 | struct edit_publication_state *state = NULL; |
249 | (builder, | 247 | |
250 | "GNUNET_GTK_edit_file_information_metadata_value_entry")); | 248 | builder = GTK_BUILDER (user_data); |
251 | value = gtk_entry_get_text (entry); | 249 | meta_tree = GTK_TREE_VIEW (gtk_builder_get_object (builder, |
252 | if ((value == NULL) || (strlen (value) == 0)) | 250 | "GNUNET_GTK_edit_publication_metadata_tree_view")); |
253 | { | 251 | meta_list = GTK_LIST_STORE (gtk_tree_view_get_model (meta_tree)); |
254 | GNUNET_break (0); | 252 | if (!gtk_tree_model_get_iter_from_string (GTK_TREE_MODEL (meta_list), &iter, path)) |
255 | return; | 253 | return; |
256 | } | 254 | |
257 | tv = GTK_TREE_VIEW (gtk_builder_get_object | 255 | pubwindow = gtk_builder_get_object (builder, |
258 | (builder, | 256 | "GNUNET_GTK_edit_publication_window"); |
259 | "GNUNET_GTK_edit_file_information_metadata_type_tree_view")); | 257 | state = g_object_get_data (pubwindow, PUBSTATE); |
260 | tm = gtk_tree_view_get_model (tv); | 258 | if (!state) |
261 | sel = gtk_tree_view_get_selection (tv); | ||
262 | if (TRUE != gtk_tree_selection_get_selected (sel, &tm, &iter)) | ||
263 | { | 259 | { |
264 | GNUNET_break (0); | 260 | GNUNET_break (0); |
265 | return; | 261 | return; |
266 | } | 262 | } |
267 | gtk_tree_model_get (tm, &iter, 1, &type, -1); | 263 | |
268 | ls = GTK_LIST_STORE (gtk_builder_get_object | 264 | gtk_tree_model_get (GTK_TREE_MODEL (meta_list), &iter, 0, &metatype, -1); |
269 | (builder, "GNUNET_GTK_meta_data_list_store")); | 265 | if (metatype == EXTRACTOR_METATYPE_FILENAME |
270 | if ((type == EXTRACTOR_METATYPE_FILENAME) && | 266 | && new_text[strlen (new_text) - 1] != '/' |
271 | (value[strlen (value) - 1] != '/') && (is_directory)) | 267 | && state->is_directory) |
272 | { | 268 | { |
273 | GNUNET_asprintf (&avalue, "%s/", value); | 269 | GNUNET_asprintf (&avalue, "%s/", new_text); |
274 | /* if user typed '\' instead of '/', change it! */ | 270 | /* if user typed '\' instead of '/', change it! */ |
275 | slen = strlen (avalue); | 271 | slen = strlen (avalue); |
276 | while ((slen > 1) && (avalue[slen - 2] == '\\')) | 272 | while ((slen > 1) && (avalue[slen - 2] == '\\')) |
@@ -281,7 +277,7 @@ GNUNET_GTK_edit_file_information_metadata_add_button_clicked_cb () | |||
281 | } | 277 | } |
282 | while (NULL != (pos = strstr (avalue, "\\"))) | 278 | while (NULL != (pos = strstr (avalue, "\\"))) |
283 | *pos = '/'; | 279 | *pos = '/'; |
284 | /* remove '../' everywhere */ | 280 | // remove '../' everywhere |
285 | while (NULL != (pos = strstr (avalue, "../"))) | 281 | while (NULL != (pos = strstr (avalue, "../"))) |
286 | { | 282 | { |
287 | pos[0] = '_'; | 283 | pos[0] = '_'; |
@@ -292,158 +288,260 @@ GNUNET_GTK_edit_file_information_metadata_add_button_clicked_cb () | |||
292 | } | 288 | } |
293 | else | 289 | else |
294 | { | 290 | { |
295 | ivalue = value; | 291 | ivalue = new_text; |
296 | avalue = NULL; | 292 | avalue = NULL; |
297 | } | 293 | } |
298 | 294 | ||
299 | gtk_list_store_insert_with_values (ls, &iter, G_MAXINT, 0, type, 1, | 295 | gtk_list_store_set (meta_list, &iter, 3, ivalue, -1); |
300 | (guint) EXTRACTOR_METAFORMAT_UTF8, 2, | ||
301 | EXTRACTOR_metatype_to_string (type), 3, | ||
302 | ivalue, -1); | ||
303 | GNUNET_free_non_null (avalue); | 296 | GNUNET_free_non_null (avalue); |
304 | gtk_entry_set_text (GTK_ENTRY (entry), ""); | ||
305 | } | 297 | } |
306 | 298 | ||
299 | void | ||
300 | GNUNET_GTK_edit_publication_delete_button_clicked_cb (GtkButton *button, | ||
301 | gpointer user_data) | ||
302 | { | ||
303 | GtkTreeView *tv; | ||
304 | GtkTreeSelection *sel; | ||
305 | GtkTreeModel *tm; | ||
306 | GtkTreeIter iter; | ||
307 | GtkBuilder *builder = GTK_BUILDER (user_data); | ||
307 | 308 | ||
308 | /** | 309 | tv = GTK_TREE_VIEW (gtk_builder_get_object |
309 | * Add each of the keywords to the keyword list store. | 310 | (builder, |
310 | * | 311 | "GNUNET_GTK_edit_publication_metadata_tree_view")); |
311 | * @param cls closure | 312 | sel = gtk_tree_view_get_selection (tv); |
312 | * @param keyword the keyword | 313 | if (TRUE != gtk_tree_selection_get_selected (sel, &tm, &iter)) |
313 | * @param is_mandatory is the keyword mandatory (in a search) | 314 | { |
314 | * @return GNUNET_OK to continue to iterate | 315 | GNUNET_break (0); |
315 | */ | 316 | return; |
316 | static int | 317 | } |
317 | add_keyword (void *cls, const char *keyword, int is_mandatory) | 318 | if (gtk_list_store_remove (GTK_LIST_STORE (tm), &iter)) |
319 | gtk_tree_selection_select_iter (sel, &iter); | ||
320 | } | ||
321 | |||
322 | void | ||
323 | GNUNET_GTK_edit_publication_keyword_list_add_button_clicked_cb ( | ||
324 | GtkButton *button, gpointer user_data) | ||
318 | { | 325 | { |
326 | const char *keyword; | ||
327 | GtkEntry *entry; | ||
319 | GtkListStore *ls; | 328 | GtkListStore *ls; |
320 | GtkTreeIter iter; | 329 | GtkTreeIter iter; |
330 | GtkBuilder *builder; | ||
331 | GtkWidget *ok; | ||
332 | |||
333 | builder = GTK_BUILDER (user_data); | ||
321 | 334 | ||
322 | ls = GTK_LIST_STORE (gtk_builder_get_object | 335 | ls = GTK_LIST_STORE (gtk_builder_get_object |
323 | (builder, "GNUNET_GTK_keyword_list_store")); | 336 | (builder, "GNUNET_GTK_publication_keywords_liststore")); |
324 | gtk_list_store_insert_with_values (ls, &iter, G_MAXINT, 0, keyword, -1); | 337 | entry = |
325 | return GNUNET_OK; | 338 | GTK_ENTRY (gtk_builder_get_object |
339 | (builder, "GNUNET_GTK_edit_publication_keyword_entry")); | ||
340 | keyword = gtk_entry_get_text (entry); | ||
341 | if (strlen (keyword) > 0) | ||
342 | { | ||
343 | gtk_list_store_insert_with_values (ls, &iter, G_MAXINT, 0, keyword, 1, TRUE, -1); | ||
344 | ok = GTK_WIDGET (gtk_builder_get_object (builder, | ||
345 | "GNUNET_GTK_edit_publication_confirm_button")); | ||
346 | gtk_widget_set_sensitive (ok, TRUE); | ||
347 | } | ||
348 | gtk_entry_set_text (entry, ""); | ||
326 | } | 349 | } |
327 | 350 | ||
351 | gboolean | ||
352 | gtk_tree_model_get_item_count_cb (GtkTreeModel *model, GtkTreePath *path, | ||
353 | GtkTreeIter *iter, gpointer data) | ||
354 | { | ||
355 | gint *counter = (gint *) data; | ||
356 | *counter += 1; | ||
357 | return FALSE; | ||
358 | } | ||
328 | 359 | ||
329 | /** | 360 | void |
330 | * Add the given meta data to the model (or make it the preview | 361 | GNUNET_GTK_edit_publication_keyword_entry_changed_cb (GtkEditable *editable, |
331 | * image if it is an image). | 362 | gpointer user_data) |
332 | * | ||
333 | * @param cls closure, NULL | ||
334 | * @param plugin_name name of the plugin that produced this value; | ||
335 | * special values can be used (i.e. '<zlib>' for zlib being | ||
336 | * used in the main libextractor library and yielding | ||
337 | * meta data). | ||
338 | * @param type libextractor-type describing the meta data | ||
339 | * @param format basic format information about data | ||
340 | * @param data_mime_type mime-type of data (not of the original file); | ||
341 | * can be NULL (if mime-type is not known) | ||
342 | * @param data actual meta-data found | ||
343 | * @param data_len number of bytes in data | ||
344 | * @return 0 to continue extracting | ||
345 | */ | ||
346 | static int | ||
347 | add_meta_item (void *cls, const char *plugin_name, enum EXTRACTOR_MetaType type, | ||
348 | enum EXTRACTOR_MetaFormat format, const char *data_mime_type, | ||
349 | const char *data, size_t data_len) | ||
350 | { | 363 | { |
351 | GtkListStore *ls; | 364 | const char *keyword; |
365 | GtkEntry *entry; | ||
366 | GtkWidget *button; | ||
367 | GtkBuilder *builder; | ||
368 | |||
369 | builder = GTK_BUILDER (user_data); | ||
370 | |||
371 | button = | ||
372 | GTK_WIDGET (gtk_builder_get_object | ||
373 | (builder, | ||
374 | "GNUNET_GTK_edit_publication_keyword_list_add_button")); | ||
375 | entry = | ||
376 | GTK_ENTRY (gtk_builder_get_object | ||
377 | (builder, "GNUNET_GTK_edit_publication_keyword_entry")); | ||
378 | keyword = gtk_entry_get_text (entry); | ||
379 | gtk_widget_set_sensitive (button, (strlen (keyword) > 0) ? TRUE : FALSE); | ||
380 | } | ||
381 | |||
382 | |||
383 | gint | ||
384 | gtk_tree_model_get_item_count (GtkTreeModel *model) | ||
385 | { | ||
386 | gint c = 0; | ||
387 | gtk_tree_model_foreach (model, >k_tree_model_get_item_count_cb, &c); | ||
388 | return c; | ||
389 | } | ||
390 | |||
391 | gboolean | ||
392 | gtk_tree_model_has_items_cb (GtkTreeModel *model, GtkTreePath *path, | ||
393 | GtkTreeIter *iter, gpointer data) | ||
394 | { | ||
395 | gboolean *val = (gboolean *) data; | ||
396 | *val = TRUE; | ||
397 | return TRUE; | ||
398 | } | ||
399 | |||
400 | gboolean | ||
401 | gtk_tree_model_has_items (GtkTreeModel *model) | ||
402 | { | ||
403 | gboolean b = FALSE; | ||
404 | gtk_tree_model_foreach (model, >k_tree_model_has_items_cb, &b); | ||
405 | return b; | ||
406 | } | ||
407 | |||
408 | void | ||
409 | GNUNET_GTK_edit_publication_keyword_list_del_button_clicked_cb ( | ||
410 | GtkButton *button, gpointer user_data) | ||
411 | { | ||
412 | GtkTreeView *tv; | ||
413 | GtkTreeSelection *sel; | ||
414 | GtkTreeModel *tm; | ||
352 | GtkTreeIter iter; | 415 | GtkTreeIter iter; |
416 | GtkBuilder *builder; | ||
417 | GtkWidget *ok; | ||
418 | GObject *pubwindow; | ||
419 | struct edit_publication_state *state = NULL; | ||
420 | builder = GTK_BUILDER (user_data); | ||
353 | 421 | ||
354 | switch (format) | 422 | tv = GTK_TREE_VIEW (gtk_builder_get_object |
423 | (builder, | ||
424 | "GNUNET_GTK_edit_publication_keyword_list_tree_view")); | ||
425 | |||
426 | sel = gtk_tree_view_get_selection (tv); | ||
427 | if (TRUE != gtk_tree_selection_get_selected (sel, &tm, &iter)) | ||
355 | { | 428 | { |
356 | case EXTRACTOR_METAFORMAT_UTF8: | ||
357 | case EXTRACTOR_METAFORMAT_C_STRING: | ||
358 | ls = GTK_LIST_STORE (gtk_builder_get_object | ||
359 | (builder, "GNUNET_GTK_meta_data_list_store")); | ||
360 | gtk_list_store_insert_with_values (ls, &iter, G_MAXINT, 0, (guint) type, 1, | ||
361 | (guint) format, 2, | ||
362 | EXTRACTOR_metatype_to_string (type), 3, | ||
363 | data, -1); | ||
364 | break; | ||
365 | case EXTRACTOR_METAFORMAT_UNKNOWN: | ||
366 | break; | ||
367 | case EXTRACTOR_METAFORMAT_BINARY: | ||
368 | break; | ||
369 | default: | ||
370 | GNUNET_break (0); | 429 | GNUNET_break (0); |
430 | return; | ||
371 | } | 431 | } |
372 | return 0; | 432 | if (gtk_list_store_remove (GTK_LIST_STORE (tm), &iter)) |
433 | gtk_tree_selection_select_iter (sel, &iter); | ||
434 | |||
435 | ok = GTK_WIDGET (gtk_builder_get_object (builder, | ||
436 | "GNUNET_GTK_edit_publication_confirm_button")); | ||
437 | |||
438 | pubwindow = gtk_builder_get_object (builder, | ||
439 | "GNUNET_GTK_edit_publication_window"); | ||
440 | state = g_object_get_data (pubwindow, PUBSTATE); | ||
441 | if (!state) | ||
442 | { | ||
443 | GNUNET_break (0); | ||
444 | return; | ||
445 | } | ||
446 | |||
447 | if (!state->allow_no_keywords && !gtk_tree_model_has_items (tm)) | ||
448 | gtk_widget_set_sensitive (ok, FALSE); | ||
373 | } | 449 | } |
374 | 450 | ||
451 | void | ||
452 | GNUNET_GTK_edit_publication_keyword_list_normalize_button_clicked_cb ( | ||
453 | GtkButton *button, gpointer user_data) | ||
454 | { | ||
455 | GtkTreeView *tv; | ||
456 | GtkTreeSelection *sel; | ||
457 | GtkTreeModel *tm; | ||
458 | GtkTreeIter iter, inserted; | ||
459 | gchar *value; | ||
460 | struct GNUNET_FS_Uri *uri; | ||
461 | struct GNUNET_FS_Uri *nuri; | ||
462 | char *nvalue; | ||
463 | char *emsg; | ||
464 | GtkBuilder *builder; | ||
465 | builder = GTK_BUILDER (user_data); | ||
375 | 466 | ||
376 | /** | 467 | tv = GTK_TREE_VIEW (gtk_builder_get_object |
377 | * Function called to extract the information from FI. | 468 | (builder, |
378 | * | 469 | "GNUNET_GTK_edit_publication_keyword_list_tree_view")); |
379 | * @param cls closure | 470 | sel = gtk_tree_view_get_selection (tv); |
380 | * @param fi the entry in the publish-structure | 471 | if (TRUE != gtk_tree_selection_get_selected (sel, &tm, &iter)) |
381 | * @param length length of the file or directory | 472 | return; |
382 | * @param meta metadata for the file or directory (can be modified) | 473 | gtk_tree_model_get (tm, &iter, 0, &value, -1); |
383 | * @param uri pointer to the keywords that will be used for this entry (can be modified) | 474 | emsg = NULL; |
384 | * @param bo block options | 475 | uri = GNUNET_FS_uri_ksk_create (value, &emsg); |
385 | * @param do_index should we index (can be modified) | 476 | if (uri == NULL) |
386 | * @param client_info pointer to client context set upon creation (can be modified) | 477 | { |
387 | * @return GNUNET_SYSERR (aborts after first call) | 478 | GNUNET_break (0); |
388 | */ | 479 | GNUNET_free (emsg); |
389 | static int | 480 | g_free (value); |
390 | file_information_extract (void *cls, struct GNUNET_FS_FileInformation *fi, | 481 | return; |
391 | uint64_t length, | 482 | } |
392 | struct GNUNET_CONTAINER_MetaData *meta, | 483 | nuri = GNUNET_FS_uri_ksk_canonicalize (uri); |
393 | struct GNUNET_FS_Uri **uri, | 484 | nvalue = GNUNET_FS_uri_ksk_to_string_fancy (nuri); |
394 | struct GNUNET_FS_BlockOptions *bo, int *do_index, | 485 | |
395 | void **client_info) | 486 | if (strcmp (value, nvalue) != 0) |
487 | { | ||
488 | gtk_list_store_insert_after (GTK_LIST_STORE (tm), &inserted, &iter); | ||
489 | gtk_list_store_set (GTK_LIST_STORE (tm), &inserted, 0, nvalue, -1); | ||
490 | } | ||
491 | GNUNET_FS_uri_destroy (nuri); | ||
492 | GNUNET_FS_uri_destroy (uri); | ||
493 | GNUNET_free (nvalue); | ||
494 | g_free (value); | ||
495 | } | ||
496 | |||
497 | void | ||
498 | GNUNET_GTK_edit_publication_normalization_checkbox_toggled_cb ( | ||
499 | GtkToggleButton *button, gpointer user_data) | ||
396 | { | 500 | { |
397 | GtkImage *img; | 501 | GtkBuilder *builder; |
398 | GdkPixbuf *pixbuf; | 502 | GtkToggleButton *norm_button; |
399 | struct tm *t; | 503 | builder = GTK_BUILDER (user_data); |
400 | int year; | 504 | norm_button = GTK_TOGGLE_BUTTON (gtk_builder_get_object (builder, |
401 | time_t tp; | 505 | "GNUNET_GTK_edit_publication_keyword_list_normalize_button")); |
506 | gtk_widget_set_sensitive (GTK_WIDGET (norm_button), | ||
507 | !gtk_toggle_button_get_active (norm_button)); | ||
508 | } | ||
402 | 509 | ||
403 | if (NULL != *uri) | 510 | void |
404 | GNUNET_FS_uri_ksk_get_keywords (*uri, &add_keyword, NULL); | 511 | GNUNET_GTK_edit_publication_metadata_preview_file_chooser_button_file_set_cb ( |
405 | if (NULL != meta) | 512 | GtkFileChooserButton *widget, gpointer user_data) |
513 | { | ||
514 | gchar *fn; | ||
515 | GtkImage *image; | ||
516 | GObject *pubwindow; | ||
517 | GtkBuilder *builder = GTK_BUILDER (user_data); | ||
518 | struct edit_publication_state *state = NULL; | ||
519 | |||
520 | pubwindow = gtk_builder_get_object (builder, | ||
521 | "GNUNET_GTK_edit_publication_window"); | ||
522 | state = g_object_get_data (pubwindow, PUBSTATE); | ||
523 | if (!state) | ||
406 | { | 524 | { |
407 | GNUNET_CONTAINER_meta_data_iterate (meta, &add_meta_item, NULL); | 525 | GNUNET_break (0); |
408 | pixbuf = GNUNET_FS_GTK_get_thumbnail_from_meta_data (meta); | 526 | return; |
409 | if (pixbuf != NULL) | ||
410 | { | ||
411 | img = | ||
412 | GTK_IMAGE (gtk_builder_get_object | ||
413 | (builder, | ||
414 | "GNUNET_GTK_edit_file_information_metadata_preview_image")); | ||
415 | gtk_image_set_from_pixbuf (img, pixbuf); | ||
416 | } | ||
417 | } | 527 | } |
418 | tp = bo->expiration_time.abs_value / 1000; /* ms to seconds */ | 528 | |
419 | t = gmtime (&tp); | 529 | fn = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (widget)); |
420 | if (t == NULL) | 530 | image = |
421 | year = 0; | 531 | GTK_IMAGE (gtk_builder_get_object |
422 | else | 532 | (builder, |
423 | year = t->tm_year + 1900; | 533 | "GNUNET_GTK_edit_publication_metadata_preview_image")); |
424 | gtk_spin_button_set_value (GTK_SPIN_BUTTON | 534 | gtk_image_set_from_file (image, fn); |
425 | (gtk_builder_get_object | 535 | state->preview_changed = GNUNET_YES; |
426 | (builder, | ||
427 | "GNUNET_GTK_edit_file_information_expiration_year_spin_button")), | ||