diff options
author | Christian Grothoff <christian@grothoff.org> | 2006-10-30 03:32:53 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2006-10-30 03:32:53 +0000 |
commit | 4d0d1bf8e461538fc903848e63c156433d674bcf (patch) | |
tree | fd79e2fe0d4f0fc14dccc8efcf59fdb979c3e558 | |
parent | 82e46f1f9962a085b6d8460adbda39f1b7b139aa (diff) | |
download | gnunet-gtk-4d0d1bf8e461538fc903848e63c156433d674bcf.tar.gz gnunet-gtk-4d0d1bf8e461538fc903848e63c156433d674bcf.zip |
bugfixes
-rw-r--r-- | gnunet-gtk.glade | 7 | ||||
-rw-r--r-- | src/plugins/fs/download.c | 4 | ||||
-rw-r--r-- | src/plugins/fs/fs.c | 21 | ||||
-rw-r--r-- | src/plugins/fs/search.c | 17 | ||||
-rw-r--r-- | src/plugins/fs/upload.c | 4 |
5 files changed, 40 insertions, 13 deletions
diff --git a/gnunet-gtk.glade b/gnunet-gtk.glade index 1f8b09b3..dd84e3bb 100644 --- a/gnunet-gtk.glade +++ b/gnunet-gtk.glade | |||
@@ -4541,7 +4541,7 @@ Press ENTER to add the data.</atkproperty> | |||
4541 | <property name="use_stock">True</property> | 4541 | <property name="use_stock">True</property> |
4542 | <property name="relief">GTK_RELIEF_NORMAL</property> | 4542 | <property name="relief">GTK_RELIEF_NORMAL</property> |
4543 | <property name="focus_on_click">False</property> | 4543 | <property name="focus_on_click">False</property> |
4544 | <signal name="clicked" handler="on_closeSearchButton_clicked_" object="searchResultsFrame" last_modification_time="Sun, 22 Oct 2006 06:14:18 GMT"/> | 4544 | <signal name="clicked" handler="on_abortSearchButton_clicked_" object="searchPageScrolledWindow" last_modification_time="Mon, 30 Oct 2006 03:58:55 GMT"/> |
4545 | <accelerator key="Return" modifiers="GDK_CONTROL_MASK" signal="activate"/> | 4545 | <accelerator key="Return" modifiers="GDK_CONTROL_MASK" signal="activate"/> |
4546 | </widget> | 4546 | </widget> |
4547 | <packing> | 4547 | <packing> |
@@ -4560,7 +4560,7 @@ Press ENTER to add the data.</atkproperty> | |||
4560 | <property name="use_stock">True</property> | 4560 | <property name="use_stock">True</property> |
4561 | <property name="relief">GTK_RELIEF_NORMAL</property> | 4561 | <property name="relief">GTK_RELIEF_NORMAL</property> |
4562 | <property name="focus_on_click">False</property> | 4562 | <property name="focus_on_click">False</property> |
4563 | <signal name="clicked" handler="on_closeSearchButton_clicked_" object="searchResultsFrame" last_modification_time="Sun, 22 Oct 2006 06:14:02 GMT"/> | 4563 | <signal name="clicked" handler="on_closeSearchButton_clicked_" object="searchPageScrolledWindow" last_modification_time="Sun, 22 Oct 2006 06:14:02 GMT"/> |
4564 | <accelerator key="Return" modifiers="GDK_CONTROL_MASK" signal="activate"/> | 4564 | <accelerator key="Return" modifiers="GDK_CONTROL_MASK" signal="activate"/> |
4565 | </widget> | 4565 | </widget> |
4566 | <packing> | 4566 | <packing> |
@@ -7868,10 +7868,9 @@ Daniel Nylander <po@danielnylander.se> | |||
7868 | <widget class="GtkButton" id="searchCloseButton"> | 7868 | <widget class="GtkButton" id="searchCloseButton"> |
7869 | <property name="visible">True</property> | 7869 | <property name="visible">True</property> |
7870 | <property name="tooltip" translatable="yes">Stop the search.</property> | 7870 | <property name="tooltip" translatable="yes">Stop the search.</property> |
7871 | <property name="can_focus">True</property> | ||
7872 | <property name="relief">GTK_RELIEF_NONE</property> | 7871 | <property name="relief">GTK_RELIEF_NONE</property> |
7873 | <property name="focus_on_click">True</property> | 7872 | <property name="focus_on_click">True</property> |
7874 | <signal name="clicked" handler="on_closeSearchButton_clicked_fs" object="searchTabHBox" last_modification_time="Sun, 29 Oct 2006 06:09:02 GMT"/> | 7873 | <signal name="clicked" handler="on_closeSearchButton_clicked_" object="searchTabHBox" last_modification_time="Sun, 29 Oct 2006 06:09:02 GMT"/> |
7875 | 7874 | ||
7876 | <child> | 7875 | <child> |
7877 | <widget class="GtkImage" id="image50"> | 7876 | <widget class="GtkImage" id="image50"> |
diff --git a/src/plugins/fs/download.c b/src/plugins/fs/download.c index d7ac628e..0ba02840 100644 --- a/src/plugins/fs/download.c +++ b/src/plugins/fs/download.c | |||
@@ -740,6 +740,10 @@ void on_stopDownloadButton_clicked_fs(void * unused, | |||
740 | ggc_tree_selection_selected_foreach | 740 | ggc_tree_selection_selected_foreach |
741 | (selection, | 741 | (selection, |
742 | &fsuiCallDownloadCallback, | 742 | &fsuiCallDownloadCallback, |
743 | &FSUI_abortDownload); | ||
744 | ggc_tree_selection_selected_foreach | ||
745 | (selection, | ||
746 | &fsuiCallDownloadCallback, | ||
743 | &FSUI_stopDownload); | 747 | &FSUI_stopDownload); |
744 | } | 748 | } |
745 | 749 | ||
diff --git a/src/plugins/fs/fs.c b/src/plugins/fs/fs.c index ccd0584c..3163d92c 100644 --- a/src/plugins/fs/fs.c +++ b/src/plugins/fs/fs.c | |||
@@ -59,6 +59,7 @@ saveEventProcessor(void * cls) { | |||
59 | switch (event->type) { | 59 | switch (event->type) { |
60 | /* search events */ | 60 | /* search events */ |
61 | case FSUI_search_started: | 61 | case FSUI_search_started: |
62 | printf("FSUI: search started\n"); | ||
62 | ret = fs_search_started(event->data.SearchStarted.sc.pos, | 63 | ret = fs_search_started(event->data.SearchStarted.sc.pos, |
63 | event->data.SearchStarted.searchURI, | 64 | event->data.SearchStarted.searchURI, |
64 | event->data.SearchStarted.anonymityLevel, | 65 | event->data.SearchStarted.anonymityLevel, |
@@ -66,31 +67,39 @@ saveEventProcessor(void * cls) { | |||
66 | NULL); | 67 | NULL); |
67 | break; | 68 | break; |
68 | case FSUI_search_result: | 69 | case FSUI_search_result: |
70 | printf("FSUI: search result\n"); | ||
69 | fs_search_result_received(event->data.SearchResult.sc.cctx, | 71 | fs_search_result_received(event->data.SearchResult.sc.cctx, |
70 | &event->data.SearchResult.fi, | 72 | &event->data.SearchResult.fi, |
71 | event->data.SearchResult.searchURI); | 73 | event->data.SearchResult.searchURI); |
72 | break; | 74 | break; |
73 | case FSUI_search_error: | 75 | case FSUI_search_error: |
76 | printf("FSUI: search error\n"); | ||
74 | fs_search_aborted(event->data.SearchError.sc.cctx); | 77 | fs_search_aborted(event->data.SearchError.sc.cctx); |
75 | break; | 78 | break; |
76 | case FSUI_search_aborted: | 79 | case FSUI_search_aborted: |
80 | printf("FSUI: search aborted\n"); | ||
77 | fs_search_aborted(event->data.SearchAborted.sc.cctx); | 81 | fs_search_aborted(event->data.SearchAborted.sc.cctx); |
78 | break; | 82 | break; |
79 | case FSUI_search_completed: | 83 | case FSUI_search_completed: |
84 | printf("FSUI: search completed\n"); | ||
80 | // FIXME... | 85 | // FIXME... |
81 | fs_search_aborted(event->data.SearchCompleted.sc.cctx); | 86 | fs_search_aborted(event->data.SearchCompleted.sc.cctx); |
82 | break; | 87 | break; |
83 | case FSUI_search_suspended: | 88 | case FSUI_search_suspended: |
89 | printf("FSUI: search suspended\n"); | ||
84 | fs_search_aborted(event->data.SearchSuspended.sc.cctx); | 90 | fs_search_aborted(event->data.SearchSuspended.sc.cctx); |
85 | break; | 91 | break; |
86 | case FSUI_search_resumed: | 92 | case FSUI_search_resumed: |
93 | printf("FSUI: search resumed\n"); | ||
87 | ret = fs_search_started(event->data.SearchResumed.sc.pos, | 94 | ret = fs_search_started(event->data.SearchResumed.sc.pos, |
88 | event->data.SearchResumed.searchURI, | 95 | event->data.SearchResumed.searchURI, |
89 | event->data.SearchResumed.anonymityLevel, | 96 | event->data.SearchResumed.anonymityLevel, |
90 | event->data.SearchResumed.fisSize, | 97 | event->data.SearchResumed.fisSize, |
91 | event->data.SearchResumed.fis); | 98 | event->data.SearchResumed.fis); |
99 | break; | ||
92 | case FSUI_search_stopped: | 100 | case FSUI_search_stopped: |
93 | fs_search_aborted(event->data.SearchError.sc.cctx); | 101 | printf("FSUI: search stopped\n"); |
102 | fs_search_stopped(event->data.SearchStopped.sc.cctx); | ||
94 | break; | 103 | break; |
95 | 104 | ||
96 | 105 | ||
@@ -99,10 +108,10 @@ saveEventProcessor(void * cls) { | |||
99 | fs_download_aborted(event->data.DownloadAborted.dc.cctx); | 108 | fs_download_aborted(event->data.DownloadAborted.dc.cctx); |
100 | break; | 109 | break; |
101 | case FSUI_download_error: | 110 | case FSUI_download_error: |
102 | fs_download_aborted(event->data.DownloadAborted.dc.cctx); | 111 | fs_download_aborted(event->data.DownloadError.dc.cctx); |
103 | break; | 112 | break; |
104 | case FSUI_download_suspended: | 113 | case FSUI_download_suspended: |
105 | fs_download_stopped(event->data.DownloadAborted.dc.cctx); | 114 | fs_download_stopped(event->data.DownloadSuspended.dc.cctx); |
106 | break; | 115 | break; |
107 | case FSUI_download_progress: | 116 | case FSUI_download_progress: |
108 | fs_download_update(event->data.DownloadProgress.dc.cctx, | 117 | fs_download_update(event->data.DownloadProgress.dc.cctx, |
@@ -114,7 +123,7 @@ saveEventProcessor(void * cls) { | |||
114 | fs_download_completed(event->data.DownloadCompleted.dc.cctx); | 123 | fs_download_completed(event->data.DownloadCompleted.dc.cctx); |
115 | break; | 124 | break; |
116 | case FSUI_download_stopped: | 125 | case FSUI_download_stopped: |
117 | fs_download_stopped(event->data.DownloadCompleted.dc.cctx); | 126 | fs_download_stopped(event->data.DownloadStopped.dc.cctx); |
118 | break; | 127 | break; |
119 | case FSUI_download_started: | 128 | case FSUI_download_started: |
120 | ret = fs_download_started(event->data.DownloadStarted.dc.pos, | 129 | ret = fs_download_started(event->data.DownloadStarted.dc.pos, |
@@ -129,8 +138,8 @@ saveEventProcessor(void * cls) { | |||
129 | break; | 138 | break; |
130 | case FSUI_download_resumed: | 139 | case FSUI_download_resumed: |
131 | ret = fs_download_started(event->data.DownloadResumed.dc.pos, | 140 | ret = fs_download_started(event->data.DownloadResumed.dc.pos, |
132 | event->data.DownloadStarted.dc.pcctx, | 141 | event->data.DownloadResumed.dc.pcctx, |
133 | event->data.DownloadStarted.dc.sctx, | 142 | event->data.DownloadResumed.dc.sctx, |
134 | event->data.DownloadResumed.total, | 143 | event->data.DownloadResumed.total, |
135 | event->data.DownloadResumed.anonymityLevel, | 144 | event->data.DownloadResumed.anonymityLevel, |
136 | &event->data.DownloadResumed.fi, | 145 | &event->data.DownloadResumed.fi, |
diff --git a/src/plugins/fs/search.c b/src/plugins/fs/search.c index 669477f6..f062dc88 100644 --- a/src/plugins/fs/search.c +++ b/src/plugins/fs/search.c | |||
@@ -318,10 +318,10 @@ fs_search_started(struct FSUI_SearchList * fsui_list, | |||
318 | = glade_xml_new(getGladeFileName(), | 318 | = glade_xml_new(getGladeFileName(), |
319 | "searchTabLabelWindow", | 319 | "searchTabLabelWindow", |
320 | PACKAGE_NAME); | 320 | PACKAGE_NAME); |
321 | connectGladeWithPlugins(list->labelXML); | ||
321 | list->tab_label | 322 | list->tab_label |
322 | = extractMainWidgetFromWindow(list->labelXML, | 323 | = extractMainWidgetFromWindow(list->labelXML, |
323 | "searchTabLabelWindow"); | 324 | "searchTabLabelWindow"); |
324 | |||
325 | /* process existing results */ | 325 | /* process existing results */ |
326 | for (i=0;i<resultCount;i++) | 326 | for (i=0;i<resultCount;i++) |
327 | fs_search_result_received(list, | 327 | fs_search_result_received(list, |
@@ -385,6 +385,7 @@ static void freeIterSubtree(GtkTreeModel * tree, | |||
385 | * Update views accordingly. | 385 | * Update views accordingly. |
386 | */ | 386 | */ |
387 | void fs_search_aborted(SearchList * list) { | 387 | void fs_search_aborted(SearchList * list) { |
388 | printf("search aborted\n"); | ||
388 | /* FIXME: show aborted status somehow! */ | 389 | /* FIXME: show aborted status somehow! */ |
389 | } | 390 | } |
390 | 391 | ||
@@ -616,6 +617,7 @@ void on_closeSearchButton_clicked_fs(GtkWidget * searchPage, | |||
616 | SearchList * list; | 617 | SearchList * list; |
617 | struct FCBC fcbc; | 618 | struct FCBC fcbc; |
618 | 619 | ||
620 | printf("close button clicked\n"); | ||
619 | list = search_head; | 621 | list = search_head; |
620 | while (list != NULL) { | 622 | while (list != NULL) { |
621 | if ( (list->searchpage == searchPage) || | 623 | if ( (list->searchpage == searchPage) || |
@@ -624,10 +626,13 @@ void on_closeSearchButton_clicked_fs(GtkWidget * searchPage, | |||
624 | list = list->next; | 626 | list = list->next; |
625 | } | 627 | } |
626 | GE_ASSERT(ectx, list != NULL); | 628 | GE_ASSERT(ectx, list != NULL); |
627 | fcbc.method = &FSUI_stopSearch; | 629 | fcbc.method = &FSUI_abortSearch; |
628 | fcbc.argument = list->fsui_list; | 630 | fcbc.argument = list->fsui_list; |
629 | run_with_save_calls(&fsui_callback, | 631 | run_with_save_calls(&fsui_callback, |
630 | &fcbc); | 632 | &fcbc); |
633 | fcbc.method = &FSUI_stopSearch; | ||
634 | run_with_save_calls(&fsui_callback, | ||
635 | &fcbc); | ||
631 | } | 636 | } |
632 | 637 | ||
633 | /** | 638 | /** |
@@ -637,6 +642,7 @@ void on_abortSearchButton_clicked_fs(GtkWidget * searchPage, | |||
637 | GtkWidget * closeButton) { | 642 | GtkWidget * closeButton) { |
638 | SearchList * list; | 643 | SearchList * list; |
639 | 644 | ||
645 | printf("abort button clicked\n"); | ||
640 | list = search_head; | 646 | list = search_head; |
641 | while (list != NULL) { | 647 | while (list != NULL) { |
642 | if (list->searchpage == searchPage) | 648 | if (list->searchpage == searchPage) |
@@ -661,10 +667,13 @@ static void stopSearch(GtkTreeModel * model, | |||
661 | SEARCH_SUMMARY_INTERNAL, &s, | 667 | SEARCH_SUMMARY_INTERNAL, &s, |
662 | -1); | 668 | -1); |
663 | if (s != NULL) { | 669 | if (s != NULL) { |
664 | fcbc.method = &FSUI_stopSearch; | 670 | fcbc.method = &FSUI_abortSearch; |
665 | fcbc.argument = s->fsui_list; | 671 | fcbc.argument = s->fsui_list; |
666 | run_with_save_calls(&fsui_callback, | 672 | run_with_save_calls(&fsui_callback, |
667 | &fcbc); | 673 | &fcbc); |
674 | fcbc.method = &FSUI_stopSearch; | ||
675 | run_with_save_calls(&fsui_callback, | ||
676 | &fcbc); | ||
668 | } | 677 | } |
669 | } | 678 | } |
670 | 679 | ||
@@ -675,6 +684,7 @@ void on_closeSearchSummaryButton_clicked_fs(GtkWidget * closeButton, | |||
675 | GtkWidget * treeview) { | 684 | GtkWidget * treeview) { |
676 | GtkTreeSelection * selection; | 685 | GtkTreeSelection * selection; |
677 | 686 | ||
687 | printf("stop summary button clicked\n"); | ||
678 | selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(treeview)); | 688 | selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(treeview)); |
679 | ggc_tree_selection_selected_foreach | 689 | ggc_tree_selection_selected_foreach |
680 | (selection, | 690 | (selection, |
@@ -709,6 +719,7 @@ void on_abortSearchSummaryButton_clicked_fs(GtkWidget * closeButton, | |||
709 | GtkWidget * treeview) { | 719 | GtkWidget * treeview) { |
710 | GtkTreeSelection * selection; | 720 | GtkTreeSelection * selection; |
711 | 721 | ||
722 | printf("abort summary button clicked\n"); | ||
712 | selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(treeview)); | 723 | selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(treeview)); |
713 | ggc_tree_selection_selected_foreach | 724 | ggc_tree_selection_selected_foreach |
714 | (selection, | 725 | (selection, |
diff --git a/src/plugins/fs/upload.c b/src/plugins/fs/upload.c index c742bd13..71c3083a 100644 --- a/src/plugins/fs/upload.c +++ b/src/plugins/fs/upload.c | |||
@@ -496,6 +496,10 @@ void on_stopUploadButton_clicked_fs(void * unused, | |||
496 | ggc_tree_selection_selected_foreach | 496 | ggc_tree_selection_selected_foreach |
497 | (selection, | 497 | (selection, |
498 | &fsuiCallUploadCallback, | 498 | &fsuiCallUploadCallback, |
499 | &FSUI_abortUpload); | ||
500 | ggc_tree_selection_selected_foreach | ||
501 | (selection, | ||
502 | &fsuiCallUploadCallback, | ||
499 | &FSUI_stopUpload); | 503 | &FSUI_stopUpload); |
500 | } | 504 | } |
501 | 505 | ||