diff options
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/about/about.c | 4 | ||||
-rw-r--r-- | src/plugins/daemon/daemon.c | 13 | ||||
-rw-r--r-- | src/plugins/fs/download.c | 3 | ||||
-rw-r--r-- | src/plugins/fs/download.h | 7 | ||||
-rw-r--r-- | src/plugins/fs/fs.c | 13 | ||||
-rw-r--r-- | src/plugins/fs/fs.h | 8 | ||||
-rw-r--r-- | src/plugins/fs/search.c | 11 | ||||
-rw-r--r-- | src/plugins/fs/search.h | 5 | ||||
-rw-r--r-- | src/plugins/fs/upload.c | 12 | ||||
-rw-r--r-- | src/plugins/fs/upload.h | 6 |
10 files changed, 32 insertions, 50 deletions
diff --git a/src/plugins/about/about.c b/src/plugins/about/about.c index dbea4c75..0dcf032e 100644 --- a/src/plugins/about/about.c +++ b/src/plugins/about/about.c | |||
@@ -25,8 +25,8 @@ | |||
25 | * This file contains the about dialog. | 25 | * This file contains the about dialog. |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include "config.h" | 28 | #include "platform.h" |
29 | #include "helper.h" | 29 | #include "gnunetgtk_common.h" |
30 | 30 | ||
31 | /** | 31 | /** |
32 | * This displays an about window | 32 | * This displays an about window |
diff --git a/src/plugins/daemon/daemon.c b/src/plugins/daemon/daemon.c index 396989eb..df265a79 100644 --- a/src/plugins/daemon/daemon.c +++ b/src/plugins/daemon/daemon.c | |||
@@ -25,10 +25,11 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include "platform.h" | 27 | #include "platform.h" |
28 | #include "helper.h" | 28 | #include "gnunetgtk_common.h" |
29 | #include <GNUnet/gnunet_util.h> | ||
30 | 29 | ||
31 | static gint doUpdateMenus(SaveCall * call) { | 30 | |
31 | static void doUpdateMenus(void * arg) { | ||
32 | int ret = *(int*) arg; | ||
32 | static GtkWidget * killEntry = NULL; | 33 | static GtkWidget * killEntry = NULL; |
33 | static GtkWidget * launchEntry = NULL; | 34 | static GtkWidget * launchEntry = NULL; |
34 | static GtkWidget * statsEntryYes = NULL; | 35 | static GtkWidget * statsEntryYes = NULL; |
@@ -36,9 +37,7 @@ static gint doUpdateMenus(SaveCall * call) { | |||
36 | static int once = 1; | 37 | static int once = 1; |
37 | static int isLocal; | 38 | static int isLocal; |
38 | char * host; | 39 | char * host; |
39 | int ret; | ||
40 | 40 | ||
41 | ret = * (int*) call->args; | ||
42 | if (once) { | 41 | if (once) { |
43 | once = 0; | 42 | once = 0; |
44 | killEntry | 43 | killEntry |
@@ -73,8 +72,6 @@ static gint doUpdateMenus(SaveCall * call) { | |||
73 | gtk_widget_set_sensitive(killEntry, TRUE); | 72 | gtk_widget_set_sensitive(killEntry, TRUE); |
74 | gtk_widget_set_sensitive(launchEntry, FALSE); | 73 | gtk_widget_set_sensitive(launchEntry, FALSE); |
75 | } | 74 | } |
76 | gtkSaveCallDone(call->sem); | ||
77 | return FALSE; | ||
78 | } | 75 | } |
79 | 76 | ||
80 | static void cronCheckDaemon(void * dummy) { | 77 | static void cronCheckDaemon(void * dummy) { |
@@ -84,7 +81,7 @@ static void cronCheckDaemon(void * dummy) { | |||
84 | ret = checkGNUnetDaemonRunning(); | 81 | ret = checkGNUnetDaemonRunning(); |
85 | if (ret != last) { | 82 | if (ret != last) { |
86 | last = ret; | 83 | last = ret; |
87 | gtkSaveCall((GtkFunction) doUpdateMenus, &ret); | 84 | gtkSaveCall(&doUpdateMenus, &ret); |
88 | } | 85 | } |
89 | } | 86 | } |
90 | 87 | ||
diff --git a/src/plugins/fs/download.c b/src/plugins/fs/download.c index 644005b4..9947a2ef 100644 --- a/src/plugins/fs/download.c +++ b/src/plugins/fs/download.c | |||
@@ -25,9 +25,10 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include "platform.h" | 27 | #include "platform.h" |
28 | #include "gnunetgtk_common.h" | ||
28 | #include "download.h" | 29 | #include "download.h" |
29 | #include "search.h" | 30 | #include "search.h" |
30 | #include "helper.h" | 31 | #include "fs.h" |
31 | #include <extractor.h> | 32 | #include <extractor.h> |
32 | 33 | ||
33 | typedef struct DL { | 34 | typedef struct DL { |
diff --git a/src/plugins/fs/download.h b/src/plugins/fs/download.h index 3a0a9463..a897d458 100644 --- a/src/plugins/fs/download.h +++ b/src/plugins/fs/download.h | |||
@@ -19,7 +19,7 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | /** | 21 | /** |
22 | * @file src/download.h | 22 | * @file src/plugins/fs/download.h |
23 | * @brief code for downloading with gnunet-gtk | 23 | * @brief code for downloading with gnunet-gtk |
24 | * @author Christian Grothoff | 24 | * @author Christian Grothoff |
25 | */ | 25 | */ |
@@ -27,9 +27,7 @@ | |||
27 | #ifndef GTK_DOWNLOAD_H | 27 | #ifndef GTK_DOWNLOAD_H |
28 | #define GTK_DOWNLOAD_H | 28 | #define GTK_DOWNLOAD_H |
29 | 29 | ||
30 | #include "helper.h" | 30 | #include <GNUnet/gnunet_ecrs_lib.h> |
31 | #include "fs.h" | ||
32 | |||
33 | 31 | ||
34 | /** | 32 | /** |
35 | */ | 33 | */ |
@@ -47,5 +45,4 @@ void fs_download_start(void); | |||
47 | 45 | ||
48 | void fs_download_stop(void); | 46 | void fs_download_stop(void); |
49 | 47 | ||
50 | |||
51 | #endif | 48 | #endif |
diff --git a/src/plugins/fs/fs.c b/src/plugins/fs/fs.c index 8ee954a6..6b30d9d5 100644 --- a/src/plugins/fs/fs.c +++ b/src/plugins/fs/fs.c | |||
@@ -24,8 +24,9 @@ | |||
24 | * @author Christian Grothoff | 24 | * @author Christian Grothoff |
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include "platform.h" | ||
28 | #include "gnunetgtk_common.h" | ||
27 | #include "fs.h" | 29 | #include "fs.h" |
28 | #include "helper.h" | ||
29 | #include "download.h" | 30 | #include "download.h" |
30 | #include "search.h" | 31 | #include "search.h" |
31 | #include "upload.h" | 32 | #include "upload.h" |
@@ -33,10 +34,9 @@ | |||
33 | 34 | ||
34 | struct FSUI_Context * ctx; | 35 | struct FSUI_Context * ctx; |
35 | 36 | ||
36 | static gint saveEventProcessor(SaveCall * call) { | 37 | static void saveEventProcessor(void * arg) { |
37 | const FSUI_Event * event; | 38 | const FSUI_Event * event = arg; |
38 | 39 | ||
39 | event = (const FSUI_Event *) call->args; | ||
40 | switch (event->type) { | 40 | switch (event->type) { |
41 | case FSUI_search_result: | 41 | case FSUI_search_result: |
42 | displaySearchResult(&event->data.SearchResult.fi, | 42 | displaySearchResult(&event->data.SearchResult.fi, |
@@ -106,9 +106,6 @@ static gint saveEventProcessor(SaveCall * call) { | |||
106 | event->type); | 106 | event->type); |
107 | break; | 107 | break; |
108 | } | 108 | } |
109 | |||
110 | gtkSaveCallDone(call->sem); | ||
111 | return FALSE; | ||
112 | } | 109 | } |
113 | 110 | ||
114 | /** | 111 | /** |
@@ -116,7 +113,7 @@ static gint saveEventProcessor(SaveCall * call) { | |||
116 | */ | 113 | */ |
117 | static void eventProcessor(void * cls, | 114 | static void eventProcessor(void * cls, |
118 | const FSUI_Event * event) { | 115 | const FSUI_Event * event) { |
119 | gtkSaveCall((GtkFunction) &saveEventProcessor, | 116 | gtkSaveCall(&saveEventProcessor, |
120 | (void*) event); | 117 | (void*) event); |
121 | } | 118 | } |
122 | 119 | ||
diff --git a/src/plugins/fs/fs.h b/src/plugins/fs/fs.h index f08904fc..085fb7ff 100644 --- a/src/plugins/fs/fs.h +++ b/src/plugins/fs/fs.h | |||
@@ -19,7 +19,7 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | /** | 21 | /** |
22 | * @file src/fs.h | 22 | * @file src/plugins/fs/fs.h |
23 | * @brief file-sharing globals of gnunet-gtk | 23 | * @brief file-sharing globals of gnunet-gtk |
24 | * @author Christian Grothoff | 24 | * @author Christian Grothoff |
25 | */ | 25 | */ |
@@ -27,7 +27,6 @@ | |||
27 | #ifndef GTK_FS_H | 27 | #ifndef GTK_FS_H |
28 | #define GTK_FS_H | 28 | #define GTK_FS_H |
29 | 29 | ||
30 | #include <GNUnet/gnunet_util.h> | ||
31 | #include <GNUnet/gnunet_ecrs_lib.h> | 30 | #include <GNUnet/gnunet_ecrs_lib.h> |
32 | #include <GNUnet/gnunet_fsui_lib.h> | 31 | #include <GNUnet/gnunet_fsui_lib.h> |
33 | 32 | ||
@@ -80,11 +79,6 @@ enum { | |||
80 | KTYPE_NUM, | 79 | KTYPE_NUM, |
81 | }; | 80 | }; |
82 | 81 | ||
83 | |||
84 | extern struct FSUI_Context * ctx; | 82 | extern struct FSUI_Context * ctx; |
85 | 83 | ||
86 | void gtk_fs_init(void); | ||
87 | |||
88 | void gtk_fs_done(void); | ||
89 | |||
90 | #endif | 84 | #endif |
diff --git a/src/plugins/fs/search.c b/src/plugins/fs/search.c index 6fc8d830..ea98f4e4 100644 --- a/src/plugins/fs/search.c +++ b/src/plugins/fs/search.c | |||
@@ -25,8 +25,9 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include "platform.h" | 27 | #include "platform.h" |
28 | #include "gnunetgtk_common.h" | ||
28 | #include "search.h" | 29 | #include "search.h" |
29 | #include "helper.h" | 30 | #include "fs.h" |
30 | #include <extractor.h> | 31 | #include <extractor.h> |
31 | 32 | ||
32 | /** | 33 | /** |
@@ -617,7 +618,7 @@ static int addNamespace(GtkListStore * model, | |||
617 | * cron job that periodically updates the model for the | 618 | * cron job that periodically updates the model for the |
618 | * namespace selection in the search vbox. | 619 | * namespace selection in the search vbox. |
619 | */ | 620 | */ |
620 | static gint updateNCBModelSafe(SaveCall * call) { | 621 | static void updateNCBModelSafe(void * unused) { |
621 | GtkWidget * searchNamespaceCB; | 622 | GtkWidget * searchNamespaceCB; |
622 | GtkListStore * model; | 623 | GtkListStore * model; |
623 | GtkTreeIter iter; | 624 | GtkTreeIter iter; |
@@ -644,12 +645,10 @@ static gint updateNCBModelSafe(SaveCall * call) { | |||
644 | if (-1 == gtk_combo_box_get_active(GTK_COMBO_BOX(searchNamespaceCB))) | 645 | if (-1 == gtk_combo_box_get_active(GTK_COMBO_BOX(searchNamespaceCB))) |
645 | gtk_combo_box_set_active(GTK_COMBO_BOX(searchNamespaceCB), | 646 | gtk_combo_box_set_active(GTK_COMBO_BOX(searchNamespaceCB), |
646 | 0); | 647 | 0); |
647 | gtkSaveCallDone(call->sem); | ||
648 | return FALSE; | ||
649 | } | 648 | } |
650 | 649 | ||
651 | static void updateNCBModel(void * call) { | 650 | static void updateNCBModel(void * dummy) { |
652 | gtkSaveCall((GtkFunction) updateNCBModelSafe, NULL); | 651 | gtkSaveCall(&updateNCBModelSafe, NULL); |
653 | } | 652 | } |
654 | 653 | ||
655 | /** | 654 | /** |
diff --git a/src/plugins/fs/search.h b/src/plugins/fs/search.h index c2c84d9c..b134ce3e 100644 --- a/src/plugins/fs/search.h +++ b/src/plugins/fs/search.h | |||
@@ -19,7 +19,7 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | /** | 21 | /** |
22 | * @file src/search.h | 22 | * @file src/plugins/fs/search.h |
23 | * @brief code for searching with gnunet-gtk | 23 | * @brief code for searching with gnunet-gtk |
24 | * @author Christian Grothoff | 24 | * @author Christian Grothoff |
25 | */ | 25 | */ |
@@ -27,8 +27,7 @@ | |||
27 | #ifndef GTK_SEARCH_H | 27 | #ifndef GTK_SEARCH_H |
28 | #define GTK_SEARCH_H | 28 | #define GTK_SEARCH_H |
29 | 29 | ||
30 | #include "helper.h" | 30 | #include <GNUnet/gnunet_ecrs_lib.h> |
31 | #include "fs.h" | ||
32 | 31 | ||
33 | /** | 32 | /** |
34 | * Add an entry to the search tree. | 33 | * Add an entry to the search tree. |
diff --git a/src/plugins/fs/upload.c b/src/plugins/fs/upload.c index 63c5e03d..112935a1 100644 --- a/src/plugins/fs/upload.c +++ b/src/plugins/fs/upload.c | |||
@@ -19,21 +19,23 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | /** | 21 | /** |
22 | * @file src/upload.c | 22 | * @file src/plugins/fs/upload.c |
23 | * @brief code for uploading with gnunet-gtk | 23 | * @brief code for uploading with gnunet-gtk |
24 | * @author Christian Grothoff | 24 | * @author Christian Grothoff |
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include "platform.h" | 27 | #include "platform.h" |
28 | #include "gnunetgtk_common.h" | ||
28 | #include "search.h" | 29 | #include "search.h" |
29 | #include "upload.h" | 30 | #include "upload.h" |
31 | #include "fs.h" | ||
30 | #include <extractor.h> | 32 | #include <extractor.h> |
31 | 33 | ||
32 | #ifdef MINGW | 34 | #ifdef MINGW |
33 | #include <shlobj.h> | 35 | #include <shlobj.h> |
34 | #ifndef BIF_NONEWFOLDERBUTTON | 36 | #ifndef BIF_NONEWFOLDERBUTTON |
35 | #define BIF_NONEWFOLDERBUTTON 0x200 | 37 | #define BIF_NONEWFOLDERBUTTON 0x200 |
36 | #endif | 38 | #endif |
37 | #endif | 39 | #endif |
38 | 40 | ||
39 | 41 | ||
diff --git a/src/plugins/fs/upload.h b/src/plugins/fs/upload.h index fd1083d1..1f34b118 100644 --- a/src/plugins/fs/upload.h +++ b/src/plugins/fs/upload.h | |||
@@ -19,7 +19,7 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | /** | 21 | /** |
22 | * @file src/upload.h | 22 | * @file src/plugins/fs/upload.h |
23 | * @brief code for uploading with gnunet-gtk | 23 | * @brief code for uploading with gnunet-gtk |
24 | * @author Christian Grothoff | 24 | * @author Christian Grothoff |
25 | */ | 25 | */ |
@@ -27,9 +27,6 @@ | |||
27 | #ifndef GTK_UPLOAD_H | 27 | #ifndef GTK_UPLOAD_H |
28 | #define GTK_UPLOAD_H | 28 | #define GTK_UPLOAD_H |
29 | 29 | ||
30 | #include "helper.h" | ||
31 | #include "fs.h" | ||
32 | |||
33 | /** | 30 | /** |
34 | */ | 31 | */ |
35 | void displayUploadUpdate(const char * mainName, | 32 | void displayUploadUpdate(const char * mainName, |
@@ -57,7 +54,6 @@ void displayUploadResult(const ECRS_FileInfo * info, | |||
57 | const struct ECRS_URI * uri, | 54 | const struct ECRS_URI * uri, |
58 | GtkTreeRowReference * row); | 55 | GtkTreeRowReference * row); |
59 | 56 | ||
60 | |||
61 | void fs_upload_start(void); | 57 | void fs_upload_start(void); |
62 | 58 | ||
63 | void fs_upload_stop(void); | 59 | void fs_upload_stop(void); |