aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-02-03 12:32:22 +0000
committerChristian Grothoff <christian@grothoff.org>2012-02-03 12:32:22 +0000
commit44212493213c5baed2409fc1674f4b28c338a0aa (patch)
treee49e51a766c8b4e0f758bf5ff7e23f7080487e48
parent7887b5458ab6c8af3347f2aec22d505d184f7454 (diff)
downloadgnunet-gtk-44212493213c5baed2409fc1674f4b28c338a0aa.tar.gz
gnunet-gtk-44212493213c5baed2409fc1674f4b28c338a0aa.zip
-gladifying more signal handlers
-rw-r--r--contrib/gnunet_fs_gtk_search_tab.glade47
-rw-r--r--src/fs/gnunet-fs-gtk.c3
-rw-r--r--src/fs/gnunet-fs-gtk_event-handler.c74
-rw-r--r--src/fs/gnunet-fs-gtk_event-handler.h5
4 files changed, 46 insertions, 83 deletions
diff --git a/contrib/gnunet_fs_gtk_search_tab.glade b/contrib/gnunet_fs_gtk_search_tab.glade
index 71af274e..8b655639 100644
--- a/contrib/gnunet_fs_gtk_search_tab.glade
+++ b/contrib/gnunet_fs_gtk_search_tab.glade
@@ -1,4 +1,4 @@
1<?xml version="1.0" encoding="UTF-8"?> 1<?xml version="1.0"?>
2<interface> 2<interface>
3 <requires lib="gtk+" version="2.20"/> 3 <requires lib="gtk+" version="2.20"/>
4 <!-- interface-naming-policy project-wide --> 4 <!-- interface-naming-policy project-wide -->
@@ -41,7 +41,6 @@
41 </columns> 41 </columns>
42 </object> 42 </object>
43 <object class="GtkWindow" id="_search_result_frame_window"> 43 <object class="GtkWindow" id="_search_result_frame_window">
44 <property name="can_focus">False</property>
45 <property name="type">popup</property> 44 <property name="type">popup</property>
46 <property name="title">You should never see this</property> 45 <property name="title">You should never see this</property>
47 <property name="skip_taskbar_hint">True</property> 46 <property name="skip_taskbar_hint">True</property>
@@ -64,9 +63,13 @@
64 <property name="search_column">6</property> 63 <property name="search_column">6</property>
65 <property name="enable_grid_lines">horizontal</property> 64 <property name="enable_grid_lines">horizontal</property>
66 <property name="enable_tree_lines">True</property> 65 <property name="enable_tree_lines">True</property>
66 <signal name="cursor_changed" handler="GNUNET_FS_GTK_search_treeview_cursor_changed"/>
67 <signal name="button_press_event" handler="GNUNET_FS_GTK_search_treeview_button_press_event"/>
68 <signal name="row_activated" handler="GNUNET_FS_GTK_search_treeview_row_activated"/>
69 <signal name="popup_menu" handler="GNUNET_FS_GTK_search_treeview_popup_menu"/>
67 <child> 70 <child>
68 <object class="GtkTreeViewColumn" id="search_result_description_column"> 71 <object class="GtkTreeViewColumn" id="search_result_description_column">
69 <property name="title" translatable="yes">Description</property> 72 <property name="title">Description</property>
70 <property name="expand">True</property> 73 <property name="expand">True</property>
71 <property name="clickable">True</property> 74 <property name="clickable">True</property>
72 <property name="reorderable">True</property> 75 <property name="reorderable">True</property>
@@ -83,7 +86,7 @@
83 </child> 86 </child>
84 <child> 87 <child>
85 <object class="GtkTreeViewColumn" id="search_result_availability_column"> 88 <object class="GtkTreeViewColumn" id="search_result_availability_column">
86 <property name="title" translatable="yes">Availability</property> 89 <property name="title">Availability</property>
87 <property name="clickable">True</property> 90 <property name="clickable">True</property>
88 <property name="reorderable">True</property> 91 <property name="reorderable">True</property>
89 <property name="sort_indicator">True</property> 92 <property name="sort_indicator">True</property>
@@ -99,7 +102,7 @@
99 </child> 102 </child>
100 <child> 103 <child>
101 <object class="GtkTreeViewColumn" id="search_result_mime_column"> 104 <object class="GtkTreeViewColumn" id="search_result_mime_column">
102 <property name="title" translatable="yes">Format</property> 105 <property name="title">Format</property>
103 <property name="clickable">True</property> 106 <property name="clickable">True</property>
104 <property name="reorderable">True</property> 107 <property name="reorderable">True</property>
105 <property name="sort_indicator">True</property> 108 <property name="sort_indicator">True</property>
@@ -115,7 +118,7 @@
115 </child> 118 </child>
116 <child> 119 <child>
117 <object class="GtkTreeViewColumn" id="search_result_completed_column"> 120 <object class="GtkTreeViewColumn" id="search_result_completed_column">
118 <property name="title" translatable="yes">Completed (bytes)</property> 121 <property name="title">Completed (bytes)</property>
119 <property name="reorderable">True</property> 122 <property name="reorderable">True</property>
120 <property name="sort_indicator">True</property> 123 <property name="sort_indicator">True</property>
121 <property name="sort_column_id">14</property> 124 <property name="sort_column_id">14</property>
@@ -130,7 +133,7 @@
130 </child> 133 </child>
131 <child> 134 <child>
132 <object class="GtkTreeViewColumn" id="search_result_size_column"> 135 <object class="GtkTreeViewColumn" id="search_result_size_column">
133 <property name="title" translatable="yes">Size</property> 136 <property name="title">Size</property>
134 <property name="clickable">True</property> 137 <property name="clickable">True</property>
135 <property name="reorderable">True</property> 138 <property name="reorderable">True</property>
136 <property name="sort_indicator">True</property> 139 <property name="sort_indicator">True</property>
@@ -146,7 +149,7 @@
146 </child> 149 </child>
147 <child> 150 <child>
148 <object class="GtkTreeViewColumn" id="search_result_progress_column"> 151 <object class="GtkTreeViewColumn" id="search_result_progress_column">
149 <property name="title" translatable="yes">Progress</property> 152 <property name="title">Progress</property>
150 <property name="clickable">True</property> 153 <property name="clickable">True</property>
151 <property name="reorderable">True</property> 154 <property name="reorderable">True</property>
152 <property name="sort_indicator">True</property> 155 <property name="sort_indicator">True</property>
@@ -178,7 +181,7 @@
178 </child> 181 </child>
179 <child> 182 <child>
180 <object class="GtkTreeViewColumn" id="search_result_preview_column"> 183 <object class="GtkTreeViewColumn" id="search_result_preview_column">
181 <property name="title" translatable="yes">Preview</property> 184 <property name="title">Preview</property>
182 <property name="reorderable">True</property> 185 <property name="reorderable">True</property>
183 <child> 186 <child>
184 <object class="GtkCellRendererPixbuf" id="search_result_preview_renderer"/> 187 <object class="GtkCellRendererPixbuf" id="search_result_preview_renderer"/>
@@ -195,7 +198,6 @@
195 </child> 198 </child>
196 </object> 199 </object>
197 <object class="GtkWindow" id="_search_result_label_window"> 200 <object class="GtkWindow" id="_search_result_label_window">
198 <property name="can_focus">False</property>
199 <property name="type">popup</property> 201 <property name="type">popup</property>
200 <property name="title" translatable="yes">You shouldn't see this also</property> 202 <property name="title" translatable="yes">You shouldn't see this also</property>
201 <property name="type_hint">dock</property> 203 <property name="type_hint">dock</property>
@@ -207,11 +209,9 @@
207 <child> 209 <child>
208 <object class="GtkHBox" id="_search_result_label_hbox"> 210 <object class="GtkHBox" id="_search_result_label_hbox">
209 <property name="visible">True</property> 211 <property name="visible">True</property>
210 <property name="can_focus">False</property>
211 <child> 212 <child>
212 <object class="GtkAlignment" id="_search_result_label_window_label_alignment"> 213 <object class="GtkAlignment" id="_search_result_label_window_label_alignment">
213 <property name="visible">True</property> 214 <property name="visible">True</property>
214 <property name="can_focus">False</property>
215 <property name="border_width">2</property> 215 <property name="border_width">2</property>
216 <property name="xscale">0</property> 216 <property name="xscale">0</property>
217 <property name="yscale">0</property> 217 <property name="yscale">0</property>
@@ -219,7 +219,6 @@
219 <object class="GtkLabel" id="_search_result_label_window_label"> 219 <object class="GtkLabel" id="_search_result_label_window_label">
220 <property name="height_request">30</property> 220 <property name="height_request">30</property>
221 <property name="visible">True</property> 221 <property name="visible">True</property>
222 <property name="can_focus">False</property>
223 <property name="label">query</property> 222 <property name="label">query</property>
224 </object> 223 </object>
225 </child> 224 </child>
@@ -233,18 +232,16 @@
233 <child> 232 <child>
234 <object class="GtkAlignment" id="_search_result_label_play_button_alignment"> 233 <object class="GtkAlignment" id="_search_result_label_play_button_alignment">
235 <property name="visible">True</property> 234 <property name="visible">True</property>
236 <property name="can_focus">False</property>
237 <property name="xscale">0</property> 235 <property name="xscale">0</property>
238 <property name="yscale">0</property> 236 <property name="yscale">0</property>
239 <child> 237 <child>
240 <object class="GtkButton" id="_search_result_label_play_button"> 238 <object class="GtkButton" id="_search_result_label_play_button">
241 <property name="use_action_appearance">False</property>
242 <property name="can_focus">True</property> 239 <property name="can_focus">True</property>
243 <property name="receives_default">True</property> 240 <property name="receives_default">True</property>
241 <signal name="clicked" handler="GNUNET_FS_GTK_search_result_play_button_clicked"/>
244 <child> 242 <child>
245 <object class="GtkImage" id="play_icon_stock_image"> 243 <object class="GtkImage" id="play_icon_stock_image">
246 <property name="visible">True</property> 244 <property name="visible">True</property>
247 <property name="can_focus">False</property>
248 <property name="stock">gtk-media-play</property> 245 <property name="stock">gtk-media-play</property>
249 <property name="icon-size">2</property> 246 <property name="icon-size">2</property>
250 </object> 247 </object>
@@ -261,19 +258,17 @@
261 <child> 258 <child>
262 <object class="GtkAlignment" id="_search_result_label_pause_button_alignment"> 259 <object class="GtkAlignment" id="_search_result_label_pause_button_alignment">
263 <property name="visible">True</property> 260 <property name="visible">True</property>
264 <property name="can_focus">False</property>
265 <property name="xscale">0</property> 261 <property name="xscale">0</property>
266 <property name="yscale">0</property> 262 <property name="yscale">0</property>
267 <child> 263 <child>
268 <object class="GtkButton" id="_search_result_label_pause_button"> 264 <object class="GtkButton" id="_search_result_label_pause_button">
269 <property name="use_action_appearance">False</property>
270 <property name="visible">True</property> 265 <property name="visible">True</property>
271 <property name="can_focus">True</property> 266 <property name="can_focus">True</property>
272 <property name="receives_default">True</property> 267 <property name="receives_default">True</property>
268 <signal name="clicked" handler="GNUNET_FS_GTK_search_result_pause_button_clicked"/>
273 <child> 269 <child>
274 <object class="GtkImage" id="pause_icon_stock_image"> 270 <object class="GtkImage" id="pause_icon_stock_image">
275 <property name="visible">True</property> 271 <property name="visible">True</property>
276 <property name="can_focus">False</property>
277 <property name="stock">gtk-media-pause</property> 272 <property name="stock">gtk-media-pause</property>
278 <property name="icon-size">2</property> 273 <property name="icon-size">2</property>
279 </object> 274 </object>
@@ -290,19 +285,17 @@
290 <child> 285 <child>
291 <object class="GtkAlignment" id="_search_result_label_clear_button_alignment"> 286 <object class="GtkAlignment" id="_search_result_label_clear_button_alignment">
292 <property name="visible">True</property> 287 <property name="visible">True</property>
293 <property name="can_focus">False</property>
294 <property name="xscale">0</property> 288 <property name="xscale">0</property>
295 <property name="yscale">0</property> 289 <property name="yscale">0</property>
296 <child> 290 <child>
297 <object class="GtkButton" id="_search_result_label_clear_button"> 291 <object class="GtkButton" id="_search_result_label_clear_button">
298 <property name="use_action_appearance">False</property>
299 <property name="visible">True</property> 292 <property name="visible">True</property>
300 <property name="can_focus">True</property> 293 <property name="can_focus">True</property>
301 <property name="receives_default">True</property> 294 <property name="receives_default">True</property>
295 <signal name="clicked" handler="GNUNET_FS_GTK_search_result_clear_button_clicked"/>
302 <child> 296 <child>
303 <object class="GtkImage" id="clear_icon_stock_image"> 297 <object class="GtkImage" id="clear_icon_stock_image">
304 <property name="visible">True</property> 298 <property name="visible">True</property>
305 <property name="can_focus">False</property>
306 <property name="stock">gtk-clear</property> 299 <property name="stock">gtk-clear</property>
307 <property name="icon-size">2</property> 300 <property name="icon-size">2</property>
308 </object> 301 </object>
@@ -320,20 +313,18 @@
320 <child> 313 <child>
321 <object class="GtkAlignment" id="_search_result_label_close_button_alignment"> 314 <object class="GtkAlignment" id="_search_result_label_close_button_alignment">
322 <property name="visible">True</property> 315 <property name="visible">True</property>
323 <property name="can_focus">False</property>
324 <property name="xscale">0</property> 316 <property name="xscale">0</property>
325 <property name="yscale">0</property> 317 <property name="yscale">0</property>
326 <child> 318 <child>
327 <object class="GtkButton" id="_search_result_label_close_button"> 319 <object class="GtkButton" id="_search_result_label_close_button">
328 <property name="use_action_appearance">False</property>
329 <property name="visible">True</property> 320 <property name="visible">True</property>
330 <property name="can_focus">True</property> 321 <property name="can_focus">True</property>
331 <property name="receives_default">True</property> 322 <property name="receives_default">True</property>
332 <property name="relief">half</property> 323 <property name="relief">half</property>
324 <signal name="clicked" handler="GNUNET_FS_GTK_search_result_close_button_clicked"/>
333 <child> 325 <child>
334 <object class="GtkImage" id="close_icon_stock_image"> 326 <object class="GtkImage" id="close_icon_stock_image">
335 <property name="visible">True</property> 327 <property name="visible">True</property>
336 <property name="can_focus">False</property>
337 <property name="stock">gtk-close</property> 328 <property name="stock">gtk-close</property>
338 <property name="icon-size">2</property> 329 <property name="icon-size">2</property>
339 </object> 330 </object>
@@ -353,10 +344,10 @@
353 <object class="GtkSizeGroup" id="_search_result_label_buttons_size_group"> 344 <object class="GtkSizeGroup" id="_search_result_label_buttons_size_group">
354 <property name="mode">both</property> 345 <property name="mode">both</property>
355 <widgets> 346 <widgets>
356 <widget name="_search_result_label_play_button"/>
357 <widget name="_search_result_label_pause_button"/>
358 <widget name="_search_result_label_clear_button"/>
359 <widget name="_search_result_label_close_button"/> 347 <widget name="_search_result_label_close_button"/>
348 <widget name="_search_result_label_clear_button"/>
349 <widget name="_search_result_label_pause_button"/>
350 <widget name="_search_result_label_play_button"/>
360 </widgets> 351 </widgets>
361 </object> 352 </object>
362</interface> 353</interface>
diff --git a/src/fs/gnunet-fs-gtk.c b/src/fs/gnunet-fs-gtk.c
index 0d26001c..59238ff6 100644
--- a/src/fs/gnunet-fs-gtk.c
+++ b/src/fs/gnunet-fs-gtk.c
@@ -150,7 +150,8 @@ run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
150 ("GNUNET_GTK_main_window")); 150 ("GNUNET_GTK_main_window"));
151 gtk_window_maximize (GTK_WINDOW (main_window)); 151 gtk_window_maximize (GTK_WINDOW (main_window));
152 152
153 /* Allow multiple selection in metadata view; FIXME-STYLE: can we do this with glade now? */ 153 /* Allow multiple selection in metadata view; */
154 /* FIXME-GTK3: this can be done within (modern versions of) glade */
154 metadata_tree = 155 metadata_tree =
155 GTK_TREE_VIEW (GNUNET_FS_GTK_get_main_window_object 156 GTK_TREE_VIEW (GNUNET_FS_GTK_get_main_window_object
156 ("GNUNET_GTK_main_window_metadata_treeview")); 157 ("GNUNET_GTK_main_window_metadata_treeview"));
diff --git a/src/fs/gnunet-fs-gtk_event-handler.c b/src/fs/gnunet-fs-gtk_event-handler.c
index 3df59cf1..93e5c27a 100644
--- a/src/fs/gnunet-fs-gtk_event-handler.c
+++ b/src/fs/gnunet-fs-gtk_event-handler.c
@@ -440,9 +440,11 @@ search_list_popup_selection_done (GtkMenuShell *menushell,
440 * @param column unused entry specifying which column the mouse was in 440 * @param column unused entry specifying which column the mouse was in
441 * @param user_data the 'struct SearchTab' that was activated 441 * @param user_data the 'struct SearchTab' that was activated
442 */ 442 */
443static void 443void
444start_download_row_activated (GtkTreeView * tree_view, GtkTreePath * path, 444GNUNET_FS_GTK_search_treeview_row_activated (GtkTreeView * tree_view,
445 GtkTreeViewColumn * column, gpointer user_data) 445 GtkTreePath * path,
446 GtkTreeViewColumn * column,
447 gpointer user_data)
446{ 448{
447 struct SearchTab *tab = user_data; 449 struct SearchTab *tab = user_data;
448 450
@@ -681,8 +683,9 @@ search_list_popup (GtkTreeModel *tm,
681 * @return FALSE if no menu could be popped up, 683 * @return FALSE if no menu could be popped up,
682 * TRUE if there is now a pop-up menu 684 * TRUE if there is now a pop-up menu
683 */ 685 */
684static gboolean 686gboolean
685search_list_on_popup (GtkWidget *widget, gpointer user_data) 687GNUNET_FS_GTK_search_treeview_popup_menu (GtkWidget *widget,
688 gpointer user_data)
686{ 689{
687 GtkTreeView *tv = GTK_TREE_VIEW (widget); 690 GtkTreeView *tv = GTK_TREE_VIEW (widget);
688 struct SearchTab *tab = user_data; 691 struct SearchTab *tab = user_data;
@@ -707,10 +710,10 @@ search_list_on_popup (GtkWidget *widget, gpointer user_data)
707 * @return FALSE if no menu could be popped up, 710 * @return FALSE if no menu could be popped up,
708 * TRUE if there is now a pop-up menu 711 * TRUE if there is now a pop-up menu
709 */ 712 */
710static gboolean 713gboolean
711search_list_on_menu (GtkWidget * widget, 714GNUNET_FS_GTK_search_treeview_button_press_event (GtkWidget * widget,
712 GdkEvent * event, 715 GdkEvent * event,
713 gpointer user_data) 716 gpointer user_data)
714{ 717{
715 GtkTreeView *tv = GTK_TREE_VIEW (widget); 718 GtkTreeView *tv = GTK_TREE_VIEW (widget);
716 GdkEventButton *event_button = (GdkEventButton *) event; 719 GdkEventButton *event_button = (GdkEventButton *) event;
@@ -854,8 +857,9 @@ free_search_result (struct SearchResult *sr)
854 * @param tv the tree view in a search tab where the selection changed 857 * @param tv the tree view in a search tab where the selection changed
855 * @param user_data the 'struct SearchTab' that contains the tree view 858 * @param user_data the 'struct SearchTab' that contains the tree view
856 */ 859 */
857static void 860void
858update_meta_data_views (GtkTreeView *tv, gpointer user_data) 861GNUNET_FS_GTK_search_treeview_cursor_changed (GtkTreeView *tv,
862 gpointer user_data)
859{ 863{
860 struct SearchTab *tab = user_data; 864 struct SearchTab *tab = user_data;
861 GtkImage *image; 865 GtkImage *image;
@@ -925,7 +929,7 @@ GNUNET_GTK_main_window_notebook_switch_page_cb (GtkWidget * dummy,
925 continue; 929 continue;
926 tv = GTK_TREE_VIEW (gtk_builder_get_object 930 tv = GTK_TREE_VIEW (gtk_builder_get_object
927 (tab->builder, "_search_result_frame")); 931 (tab->builder, "_search_result_frame"));
928 update_meta_data_views (tv, tab); 932 GNUNET_FS_GTK_search_treeview_cursor_changed (tv, tab);
929 return; 933 return;
930 } 934 }
931 /* active tab is not a search tab (likely the 'publish' tab), 935 /* active tab is not a search tab (likely the 'publish' tab),
@@ -946,8 +950,8 @@ GNUNET_GTK_main_window_notebook_switch_page_cb (GtkWidget * dummy,
946 * @param button the 'close' button 950 * @param button the 'close' button
947 * @param user_data the 'struct SearchTab' of the tab to close 951 * @param user_data the 'struct SearchTab' of the tab to close
948 */ 952 */
949static void 953void
950stop_search (GtkButton *button, gpointer user_data) 954GNUNET_FS_GTK_search_result_close_button_clicked (GtkButton *button, gpointer user_data)
951{ 955{
952 struct SearchTab *tab = user_data; 956 struct SearchTab *tab = user_data;
953 struct GNUNET_FS_SearchContext *sc; 957 struct GNUNET_FS_SearchContext *sc;
@@ -972,8 +976,8 @@ stop_search (GtkButton *button, gpointer user_data)
972 * @param button the 'pause' button 976 * @param button the 'pause' button
973 * @param user_data the 'struct SearchTab' of the tab to pause 977 * @param user_data the 'struct SearchTab' of the tab to pause
974 */ 978 */
975static void 979void
976pause_search (GtkButton *button, gpointer user_data) 980GNUNET_FS_GTK_search_result_pause_button_clicked (GtkButton *button, gpointer user_data)
977{ 981{
978 struct SearchTab *tab = user_data; 982 struct SearchTab *tab = user_data;
979 983
@@ -994,8 +998,8 @@ pause_search (GtkButton *button, gpointer user_data)
994 * @param button the 'resume' button 998 * @param button the 'resume' button
995 * @param user_data the 'struct SearchTab' of the tab to resume 999 * @param user_data the 'struct SearchTab' of the tab to resume
996 */ 1000 */
997static void 1001void
998continue_search (GtkButton * button, gpointer user_data) 1002GNUNET_FS_GTK_search_result_play_button_clicked (GtkButton * button, gpointer user_data)
999{ 1003{
1000 struct SearchTab *tab = user_data; 1004 struct SearchTab *tab = user_data;
1001 1005
@@ -1021,8 +1025,8 @@ continue_search (GtkButton * button, gpointer user_data)
1021 * @param button the button pressed by the user 1025 * @param button the button pressed by the user
1022 * @param user_data the 'struct SearchTab' of the respective tab to clean up 1026 * @param user_data the 'struct SearchTab' of the respective tab to clean up
1023 */ 1027 */
1024static void 1028void
1025clear_downloads (GtkButton * button, gpointer user_data) 1029GNUNET_FS_GTK_search_result_clear_button_clicked (GtkButton * button, gpointer user_data)
1026{ 1030{
1027 struct SearchTab *tab = user_data; 1031 struct SearchTab *tab = user_data;
1028 struct SearchResult *sr; 1032 struct SearchResult *sr;
@@ -1204,7 +1208,7 @@ update_search_result (struct SearchResult *sr,
1204 { 1208 {
1205 tv = GTK_TREE_VIEW (gtk_builder_get_object 1209 tv = GTK_TREE_VIEW (gtk_builder_get_object
1206 (sr->tab->builder, "_search_result_frame")); 1210 (sr->tab->builder, "_search_result_frame"));
1207 update_meta_data_views (tv, sr->tab); 1211 GNUNET_FS_GTK_search_treeview_cursor_changed (tv, sr->tab);
1208 } 1212 }
1209} 1213}
1210 1214
@@ -1399,7 +1403,6 @@ setup_search_tab (struct GNUNET_FS_SearchContext *sc,
1399 const struct GNUNET_FS_Uri *query) 1403 const struct GNUNET_FS_Uri *query)
1400{ 1404{
1401 struct SearchTab *tab; 1405 struct SearchTab *tab;
1402 GtkTreeView *tv;
1403 GtkNotebook *notebook; 1406 GtkNotebook *notebook;
1404 GtkWindow *sf; 1407 GtkWindow *sf;
1405 gint pages; 1408 gint pages;
@@ -1446,44 +1449,18 @@ setup_search_tab (struct GNUNET_FS_SearchContext *sc,
1446 tab->label = 1449 tab->label =
1447 GTK_LABEL (gtk_builder_get_object 1450 GTK_LABEL (gtk_builder_get_object
1448 (tab->builder, "_search_result_label_window_label")); 1451 (tab->builder, "_search_result_label_window_label"));
1449
1450 /* FIXME-UNCLEAN: connect these signals using glade!!! */
1451 tab->close_button = 1452 tab->close_button =
1452 GTK_WIDGET (gtk_builder_get_object 1453 GTK_WIDGET (gtk_builder_get_object
1453 (tab->builder, "_search_result_label_close_button")); 1454 (tab->builder, "_search_result_label_close_button"));
1454 g_signal_connect (G_OBJECT (tab->close_button), "clicked",
1455 G_CALLBACK (stop_search), tab);
1456 tab->clear_button =
1457 GTK_WIDGET (gtk_builder_get_object
1458 (tab->builder, "_search_result_label_clear_button"));
1459 g_signal_connect (G_OBJECT (tab->clear_button), "clicked",
1460 G_CALLBACK (clear_downloads), tab);
1461 tab->play_button = 1455 tab->play_button =
1462 GTK_WIDGET (gtk_builder_get_object 1456 GTK_WIDGET (gtk_builder_get_object
1463 (tab->builder, "_search_result_label_play_button")); 1457 (tab->builder, "_search_result_label_play_button"));
1464 g_signal_connect (G_OBJECT (tab->play_button), "clicked",
1465 G_CALLBACK (continue_search), tab);
1466 tab->pause_button = 1458 tab->pause_button =
1467 GTK_WIDGET (gtk_builder_get_object 1459 GTK_WIDGET (gtk_builder_get_object
1468 (tab->builder, "_search_result_label_pause_button")); 1460 (tab->builder, "_search_result_label_pause_button"));
1469 g_signal_connect (G_OBJECT (tab->pause_button), "clicked",
1470 G_CALLBACK (pause_search), tab);
1471 /* patch text */ 1461 /* patch text */
1472 update_search_label (tab); 1462 update_search_label (tab);
1473 1463
1474 /* add signal handlers; FIXME-UNCLEAN: again, connect these with glade... */
1475 tv = GTK_TREE_VIEW (gtk_builder_get_object
1476 (tab->builder, "_search_result_frame"));
1477 g_signal_connect (G_OBJECT (tv), "row-activated",
1478 G_CALLBACK (start_download_row_activated), tab);
1479 g_signal_connect (G_OBJECT (tv), "cursor-changed",
1480 G_CALLBACK (update_meta_data_views), tab);
1481 g_signal_connect (G_OBJECT (tv), "button_press_event",
1482 G_CALLBACK (search_list_on_menu), tab);
1483 g_signal_connect (G_OBJECT (tv), "popup-menu",
1484 G_CALLBACK (search_list_on_popup), tab);
1485
1486
1487 /* make visible */ 1464 /* make visible */
1488 notebook = 1465 notebook =
1489 GTK_NOTEBOOK (GNUNET_FS_GTK_get_main_window_object 1466 GTK_NOTEBOOK (GNUNET_FS_GTK_get_main_window_object
@@ -1534,7 +1511,6 @@ setup_inner_search (struct GNUNET_FS_SearchContext *sc,
1534 ret->frame = parent->tab->frame; 1511 ret->frame = parent->tab->frame;
1535 ret->tab_label = parent->tab->tab_label; 1512 ret->tab_label = parent->tab->tab_label;
1536 ret->close_button = parent->tab->close_button; 1513 ret->close_button = parent->tab->close_button;
1537 ret->clear_button = parent->tab->clear_button;
1538 ret->play_button = parent->tab->play_button; 1514 ret->play_button = parent->tab->play_button;
1539 ret->label = parent->tab->label; 1515 ret->label = parent->tab->label;
1540 1516
diff --git a/src/fs/gnunet-fs-gtk_event-handler.h b/src/fs/gnunet-fs-gtk_event-handler.h
index a2f155e4..bda074ea 100644
--- a/src/fs/gnunet-fs-gtk_event-handler.h
+++ b/src/fs/gnunet-fs-gtk_event-handler.h
@@ -85,11 +85,6 @@ struct SearchTab
85 GtkWidget *close_button; 85 GtkWidget *close_button;
86 86
87 /** 87 /**
88 * Button to clear all entries for downloads that have completed.
89 */
90 GtkWidget *clear_button;
91
92 /**
93 * Button to resume the search. 88 * Button to resume the search.
94 */ 89 */
95 GtkWidget *play_button; 90 GtkWidget *play_button;