diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-06-17 08:35:02 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-06-17 08:35:02 +0000 |
commit | b12247fc8366f687bf0209d0119aca8b5dd3a49e (patch) | |
tree | 72b9f92faba966444ec1282253b770f5a64b84bf | |
parent | 44d27e21d0a6aeb28169dfad686c65c3ee730e0b (diff) | |
download | gnunet-gtk-b12247fc8366f687bf0209d0119aca8b5dd3a49e.tar.gz gnunet-gtk-b12247fc8366f687bf0209d0119aca8b5dd3a49e.zip |
-adding animations for errors, this should fix #2217
-rw-r--r-- | contrib/Makefile.am | 1 | ||||
-rw-r--r-- | contrib/error.gif | bin | 0 -> 9078 bytes | |||
-rw-r--r-- | src/fs/gnunet-fs-gtk_event-handler.c | 16 |
3 files changed, 15 insertions, 2 deletions
diff --git a/contrib/Makefile.am b/contrib/Makefile.am index 48d2c230..b8290635 100644 --- a/contrib/Makefile.am +++ b/contrib/Makefile.am | |||
@@ -16,6 +16,7 @@ pkgdata_DATA = \ | |||
16 | downloading.gif \ | 16 | downloading.gif \ |
17 | downloading_not_receiving.gif \ | 17 | downloading_not_receiving.gif \ |
18 | downloaded.gif \ | 18 | downloaded.gif \ |
19 | error.gif \ | ||
19 | found_source.gif \ | 20 | found_source.gif \ |
20 | published.gif \ | 21 | published.gif \ |
21 | publishing.gif \ | 22 | publishing.gif \ |
diff --git a/contrib/error.gif b/contrib/error.gif new file mode 100644 index 00000000..274fa091 --- /dev/null +++ b/contrib/error.gif | |||
Binary files differ | |||
diff --git a/src/fs/gnunet-fs-gtk_event-handler.c b/src/fs/gnunet-fs-gtk_event-handler.c index fb2d0056..3b9ff698 100644 --- a/src/fs/gnunet-fs-gtk_event-handler.c +++ b/src/fs/gnunet-fs-gtk_event-handler.c | |||
@@ -290,6 +290,11 @@ static struct GNUNET_FS_AnimationContext *animation_searching_sources; | |||
290 | */ | 290 | */ |
291 | static struct GNUNET_FS_AnimationContext *animation_found_sources; | 291 | static struct GNUNET_FS_AnimationContext *animation_found_sources; |
292 | 292 | ||
293 | /** | ||
294 | * Animation to display if we encountered a hard error. | ||
295 | */ | ||
296 | static struct GNUNET_FS_AnimationContext *animation_error; | ||
297 | |||
293 | 298 | ||
294 | 299 | ||
295 | /* ***************** Search event handling ****************** */ | 300 | /* ***************** Search event handling ****************** */ |
@@ -2437,10 +2442,13 @@ mark_download_error (struct DownloadEntry *de, | |||
2437 | return; | 2442 | return; |
2438 | } | 2443 | } |
2439 | gtk_tree_path_free (path); | 2444 | gtk_tree_path_free (path); |
2445 | if (NULL == animation_error) | ||
2446 | animation_error = load_animation ("error"); | ||
2440 | gtk_tree_store_set (de->sr->tab->ts, &iter, | 2447 | gtk_tree_store_set (de->sr->tab->ts, &iter, |
2441 | SEARCH_TAB_MC_PERCENT_PROGRESS, (guint) 0, | 2448 | SEARCH_TAB_MC_PERCENT_PROGRESS, (guint) 0, |
2442 | SEARCH_TAB_MC_URI_AS_STRING, emsg, | 2449 | SEARCH_TAB_MC_URI_AS_STRING, emsg, |
2443 | SEARCH_TAB_MC_STATUS_ICON, NULL /* FIXME: error icon? */, | 2450 | SEARCH_TAB_MC_STATUS_ICON, |
2451 | GNUNET_GTK_animation_context_get_pixbuf (animation_error), | ||
2444 | -1); | 2452 | -1); |
2445 | } | 2453 | } |
2446 | 2454 | ||
@@ -2744,10 +2752,14 @@ handle_publish_error (struct PublishEntry *pe, | |||
2744 | return; | 2752 | return; |
2745 | } | 2753 | } |
2746 | gtk_tree_path_free (path); | 2754 | gtk_tree_path_free (path); |
2755 | if (NULL == animation_error) | ||
2756 | animation_error = load_animation ("error"); | ||
2747 | gtk_tree_store_set (pe->tab->ts, &iter, | 2757 | gtk_tree_store_set (pe->tab->ts, &iter, |
2748 | PUBLISH_TAB_MC_RESULT_STRING, emsg, | 2758 | PUBLISH_TAB_MC_RESULT_STRING, emsg, |
2749 | PUBLISH_TAB_MC_PROGRESS, 100, | 2759 | PUBLISH_TAB_MC_PROGRESS, 100, |
2750 | PUBLISH_TAB_MC_STATUS_ICON, NULL /* FIXME: error status icon? */, | 2760 | PUBLISH_TAB_MC_STATUS_ICON, |
2761 | SEARCH_TAB_MC_STATUS_ICON, | ||
2762 | GNUNET_GTK_animation_context_get_pixbuf (animation_error), | ||
2751 | -1); | 2763 | -1); |
2752 | change_publish_color (pe, "red"); | 2764 | change_publish_color (pe, "red"); |
2753 | } | 2765 | } |