diff options
Diffstat (limited to 'src/fs/gnunet-fs-gtk-event_handler.h')
-rw-r--r-- | src/fs/gnunet-fs-gtk-event_handler.h | 58 |
1 files changed, 52 insertions, 6 deletions
diff --git a/src/fs/gnunet-fs-gtk-event_handler.h b/src/fs/gnunet-fs-gtk-event_handler.h index fcca7cef..310ba97c 100644 --- a/src/fs/gnunet-fs-gtk-event_handler.h +++ b/src/fs/gnunet-fs-gtk-event_handler.h | |||
@@ -26,6 +26,10 @@ | |||
26 | #include "gnunet-fs-gtk-common.h" | 26 | #include "gnunet-fs-gtk-common.h" |
27 | 27 | ||
28 | 28 | ||
29 | /** | ||
30 | * State we keep for each (search) result entry in the | ||
31 | * tree view of a search tab. | ||
32 | */ | ||
29 | struct SearchResult; | 33 | struct SearchResult; |
30 | 34 | ||
31 | 35 | ||
@@ -54,31 +58,68 @@ struct SearchTab | |||
54 | */ | 58 | */ |
55 | struct GNUNET_FS_SearchContext *sc; | 59 | struct GNUNET_FS_SearchContext *sc; |
56 | 60 | ||
61 | /** | ||
62 | * Text of the search query. | ||
63 | */ | ||
57 | char *query_txt; | 64 | char *query_txt; |
58 | 65 | ||
66 | /** | ||
67 | * GtkBuilder object for the search tab. | ||
68 | */ | ||
59 | GtkBuilder *builder; | 69 | GtkBuilder *builder; |
60 | 70 | ||
71 | /** | ||
72 | * Frame instance of the search tab. | ||
73 | */ | ||
61 | GtkWidget *frame; | 74 | GtkWidget *frame; |
62 | 75 | ||
76 | /** | ||
77 | * The widget representing this search in the tab bar (not | ||
78 | * a GtkLabel, contains the actual label and the buttons). | ||
79 | */ | ||
63 | GtkWidget *tab_label; | 80 | GtkWidget *tab_label; |
64 | 81 | ||
82 | /** | ||
83 | * Button to stop and close the search. | ||
84 | */ | ||
65 | GtkWidget *close_button; | 85 | GtkWidget *close_button; |
66 | 86 | ||
87 | /** | ||
88 | * Button to clear all entries for downloads that have completed. | ||
89 | */ | ||
67 | GtkWidget *clear_button; | 90 | GtkWidget *clear_button; |
68 | 91 | ||
92 | /** | ||
93 | * Button to resume the search. | ||
94 | */ | ||
69 | GtkWidget *play_button; | 95 | GtkWidget *play_button; |
70 | 96 | ||
97 | /** | ||
98 | * Button to pause the search. | ||
99 | */ | ||
71 | GtkWidget *pause_button; | 100 | GtkWidget *pause_button; |
72 | 101 | ||
102 | /** | ||
103 | * Textual label in the 'tab_label' | ||
104 | */ | ||
73 | GtkLabel *label; | 105 | GtkLabel *label; |
74 | 106 | ||
107 | /** | ||
108 | * Tree store with the search results. | ||
109 | */ | ||
75 | GtkTreeStore *ts; | 110 | GtkTreeStore *ts; |
76 | 111 | ||
112 | /** | ||
113 | * Number of results we got for this search. | ||
114 | */ | ||
77 | unsigned int num_results; | 115 | unsigned int num_results; |
78 | 116 | ||
79 | }; | 117 | }; |
80 | 118 | ||
81 | 119 | ||
120 | /** | ||
121 | * Information we keep for each download. | ||
122 | */ | ||
82 | struct DownloadEntry | 123 | struct DownloadEntry |
83 | { | 124 | { |
84 | 125 | ||
@@ -156,14 +197,19 @@ GNUNET_GTK_add_to_uri_tab (GtkTreeIter * iter, struct SearchResult **sr, | |||
156 | /** | 197 | /** |
157 | * Add a search result to the given search tab. | 198 | * Add a search result to the given search tab. |
158 | * | 199 | * |
159 | * @param tab search tab to extend | 200 | * @param tab search tab to extend, never NULL |
160 | * @param iter set to position where search result is added | 201 | * @param iter set to position where search result is added (OUT only) |
161 | * @param parent_rr reference to parent entry in search tab | 202 | * @param parent_rr reference to parent entry in search tab, NULL for normal |
162 | * @param uri uri to add | 203 | * search results, |
204 | * @param uri uri to add, can be NULL for top-level entry of a directory opened from disk | ||
205 | * (in this case, we don't know the URI and should probably not | ||
206 | * bother to calculate it) | ||
163 | * @param meta metadata of the entry | 207 | * @param meta metadata of the entry |
164 | * @param result associated FS search result (can be NULL) | 208 | * @param result associated FS search result (can be NULL if this result |
209 | * was part of a directory) | ||
165 | * @param applicability_rank how relevant is the result | 210 | * @param applicability_rank how relevant is the result |
166 | * @return entry for the search result | 211 | * @return struct representing the search result (also stored in the tree |
212 | * model at 'iter') | ||
167 | */ | 213 | */ |
168 | struct SearchResult * | 214 | struct SearchResult * |
169 | GNUNET_GTK_add_search_result (struct SearchTab *tab, GtkTreeIter * iter, | 215 | GNUNET_GTK_add_search_result (struct SearchTab *tab, GtkTreeIter * iter, |