diff options
author | Christian Grothoff <christian@grothoff.org> | 2006-12-03 21:11:19 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2006-12-03 21:11:19 +0000 |
commit | 92aa5cc54ea18e67c546f375be861ba526751646 (patch) | |
tree | 591698bfe18b4bd7159d9c83cfca41239455bd9c | |
parent | 8756f21468364ed46efee136cc986aa5486db64e (diff) | |
download | gnunet-gtk-92aa5cc54ea18e67c546f375be861ba526751646.tar.gz gnunet-gtk-92aa5cc54ea18e67c546f375be861ba526751646.zip |
added highlighting of stared and completed searches/downloads in search list -- using yellow and green colors respectively
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | TODO | 2 | ||||
-rw-r--r-- | src/plugins/fs/download.c | 21 | ||||
-rw-r--r-- | src/plugins/fs/fs.h | 1 | ||||
-rw-r--r-- | src/plugins/fs/search.c | 3 |
5 files changed, 31 insertions, 5 deletions
@@ -1,3 +1,12 @@ | |||
1 | Sun Dec 3 14:47:46 MST 2006 | ||
2 | Buttons that cannot be used are now disabled. | ||
3 | Started downloads are marked using a yellow | ||
4 | background for size field in the search dialog. | ||
5 | Completed downloads are marked using a green | ||
6 | background. When manually entering a path | ||
7 | for uploads, switch between recursive and | ||
8 | file-only is now automatic. | ||
9 | |||
1 | Wed Nov 15 23:17:36 MST 2006 | 10 | Wed Nov 15 23:17:36 MST 2006 |
2 | Updated to GNUnet 0.7.1pre0 APIs. Disabled | 11 | Updated to GNUnet 0.7.1pre0 APIs. Disabled |
3 | incomplete or broken portions of FS API. | 12 | incomplete or broken portions of FS API. |
@@ -1,6 +1,4 @@ | |||
1 | 0.7.1: | 1 | 0.7.1: |
2 | - highlight active downloads in search list [ easy ] [pre1] | ||
3 | - highlight completed downloads [ easy ] [pre1] | ||
4 | - allow deletion of keywords and metadata [pre1] | 2 | - allow deletion of keywords and metadata [pre1] |
5 | 3 | ||
6 | - create directory from known file IDs [ medium ] [pre2] | 4 | - create directory from known file IDs [ medium ] [pre2] |
diff --git a/src/plugins/fs/download.c b/src/plugins/fs/download.c index a853eb57..bc9e542a 100644 --- a/src/plugins/fs/download.c +++ b/src/plugins/fs/download.c | |||
@@ -259,8 +259,10 @@ fs_download_started(struct FSUI_DownloadList * fsui_dl, | |||
259 | = gtk_tree_row_reference_new(GTK_TREE_MODEL(sl_parent->tree), | 259 | = gtk_tree_row_reference_new(GTK_TREE_MODEL(sl_parent->tree), |
260 | path); | 260 | path); |
261 | gtk_tree_path_free(path); | 261 | gtk_tree_path_free(path); |
262 | /* TODO: extend search model with status; | 262 | gtk_tree_store_set(sl_parent->tree, |
263 | start to indicate active download! */ | 263 | &iter, |
264 | SEARCH_CELL_BG_COLOR, "yellow", | ||
265 | -1); | ||
264 | break; | 266 | break; |
265 | } | 267 | } |
266 | } while (TRUE == gtk_tree_model_iter_next(GTK_TREE_MODEL(sl_parent->tree), | 268 | } while (TRUE == gtk_tree_model_iter_next(GTK_TREE_MODEL(sl_parent->tree), |
@@ -339,7 +341,20 @@ void fs_download_update(DownloadList * list, | |||
339 | * possibly refresh directory listing. | 341 | * possibly refresh directory listing. |
340 | */ | 342 | */ |
341 | void fs_download_completed(DownloadList * downloadContext) { | 343 | void fs_download_completed(DownloadList * downloadContext) { |
342 | /* FIXME: update summary? / search list status entry (once added) */ | 344 | GtkTreeIter iter; |
345 | GtkTreePath * path; | ||
346 | |||
347 | if (downloadContext->searchViewRowReference != NULL) { | ||
348 | path = gtk_tree_row_reference_get_path(downloadContext->searchViewRowReference); | ||
349 | gtk_tree_model_get_iter(GTK_TREE_MODEL(downloadContext->searchList->tree), | ||
350 | &iter, | ||
351 | path); | ||
352 | gtk_tree_path_free(path); | ||
353 | gtk_tree_store_set(downloadContext->searchList->tree, | ||
354 | &iter, | ||
355 | SEARCH_CELL_BG_COLOR, "green", | ||
356 | -1); | ||
357 | } | ||
343 | downloadContext->has_terminated = YES; | 358 | downloadContext->has_terminated = YES; |
344 | refreshDirectoryViewFromDisk(downloadContext); | 359 | refreshDirectoryViewFromDisk(downloadContext); |
345 | } | 360 | } |
diff --git a/src/plugins/fs/fs.h b/src/plugins/fs/fs.h index e859d12f..899f57e9 100644 --- a/src/plugins/fs/fs.h +++ b/src/plugins/fs/fs.h | |||
@@ -56,6 +56,7 @@ enum { | |||
56 | SEARCH_PIXBUF, | 56 | SEARCH_PIXBUF, |
57 | SEARCH_URI, | 57 | SEARCH_URI, |
58 | SEARCH_META, | 58 | SEARCH_META, |
59 | SEARCH_CELL_BG_COLOR, | ||
59 | SEARCH_INTERNAL, | 60 | SEARCH_INTERNAL, |
60 | SEARCH_INTERNAL_PARENT, | 61 | SEARCH_INTERNAL_PARENT, |
61 | SEARCH_NUM, | 62 | SEARCH_NUM, |
diff --git a/src/plugins/fs/search.c b/src/plugins/fs/search.c index f7cc87d4..386c6297 100644 --- a/src/plugins/fs/search.c +++ b/src/plugins/fs/search.c | |||
@@ -123,6 +123,7 @@ void addEntryToSearchTree(SearchList * searchContext, | |||
123 | SEARCH_PIXBUF, pixbuf, | 123 | SEARCH_PIXBUF, pixbuf, |
124 | SEARCH_URI, ECRS_dupUri(info->uri), | 124 | SEARCH_URI, ECRS_dupUri(info->uri), |
125 | SEARCH_META, ECRS_dupMetaData(info->meta), | 125 | SEARCH_META, ECRS_dupMetaData(info->meta), |
126 | SEARCH_CELL_BG_COLOR, "white", | ||
126 | SEARCH_INTERNAL, searchContext, | 127 | SEARCH_INTERNAL, searchContext, |
127 | SEARCH_INTERNAL_PARENT, downloadParent, | 128 | SEARCH_INTERNAL_PARENT, downloadParent, |
128 | -1); | 129 | -1); |
@@ -233,6 +234,7 @@ fs_search_started(struct FSUI_SearchList * fsui_list, | |||
233 | GDK_TYPE_PIXBUF, /* preview */ | 234 | GDK_TYPE_PIXBUF, /* preview */ |
234 | G_TYPE_POINTER, /* url */ | 235 | G_TYPE_POINTER, /* url */ |
235 | G_TYPE_POINTER, /* meta */ | 236 | G_TYPE_POINTER, /* meta */ |
237 | G_TYPE_STRING, /* bg-color */ | ||
236 | G_TYPE_POINTER, /* internal: search list */ | 238 | G_TYPE_POINTER, /* internal: search list */ |
237 | G_TYPE_POINTER); /* internal: download parent list */ | 239 | G_TYPE_POINTER); /* internal: download parent list */ |
238 | 240 | ||
@@ -268,6 +270,7 @@ fs_search_started(struct FSUI_SearchList * fsui_list, | |||
268 | _("Size"), | 270 | _("Size"), |
269 | renderer, | 271 | renderer, |
270 | "text", SEARCH_HSIZE, | 272 | "text", SEARCH_HSIZE, |
273 | "cell-background", SEARCH_CELL_BG_COLOR, | ||
271 | NULL); | 274 | NULL); |
272 | column = gtk_tree_view_get_column(list->treeview, | 275 | column = gtk_tree_view_get_column(list->treeview, |
273 | col - 1); | 276 | col - 1); |