diff options
author | Christian Grothoff <christian@grothoff.org> | 2008-06-07 21:49:42 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2008-06-07 21:49:42 +0000 |
commit | 44b20e435e8f396585ab2eedf17d4005c7cddea9 (patch) | |
tree | 80dd0341e87c410b08c43900decd94e3952466fe | |
parent | 04323bcef87404f18bb05a55060d9479d6a4a5b0 (diff) | |
download | gnunet-gtk-44b20e435e8f396585ab2eedf17d4005c7cddea9.tar.gz gnunet-gtk-44b20e435e8f396585ab2eedf17d4005c7cddea9.zip |
indent
-rw-r--r-- | src/common/helper.c | 5 | ||||
-rw-r--r-- | src/common/logging.c | 11 | ||||
-rw-r--r-- | src/include/gnunetgtk_common.h | 3 | ||||
-rw-r--r-- | src/plugins/chat/chat.c | 4 | ||||
-rw-r--r-- | src/plugins/daemon/daemon.c | 35 | ||||
-rw-r--r-- | src/plugins/fs/collection.c | 3 | ||||
-rw-r--r-- | src/plugins/fs/fs.c | 26 | ||||
-rw-r--r-- | src/plugins/fs/namespace.c | 8 | ||||
-rw-r--r-- | src/plugins/fs/namespace_search.c | 19 | ||||
-rw-r--r-- | src/plugins/fs/search.c | 39 | ||||
-rw-r--r-- | src/plugins/stats/functions.c | 5 |
11 files changed, 81 insertions, 77 deletions
diff --git a/src/common/helper.c b/src/common/helper.c index c9f218e8..1090fefa 100644 --- a/src/common/helper.c +++ b/src/common/helper.c | |||
@@ -698,8 +698,9 @@ GNUNET_GTK_run_gnunet_setup (gchar * conffile, gboolean run_wizard) | |||
698 | return TRUE; | 698 | return TRUE; |
699 | } | 699 | } |
700 | 700 | ||
701 | GtkWidget *GNUNET_GTK_extract_main_widget_from_window (GladeXML * xml, | 701 | GtkWidget * |
702 | const char *windowName) | 702 | GNUNET_GTK_extract_main_widget_from_window (GladeXML * xml, |
703 | const char *windowName) | ||
703 | { | 704 | { |
704 | GtkContainer *window; | 705 | GtkContainer *window; |
705 | GtkWidget *ret; | 706 | GtkWidget *ret; |
diff --git a/src/common/logging.c b/src/common/logging.c index 355b4f3b..677c4783 100644 --- a/src/common/logging.c +++ b/src/common/logging.c | |||
@@ -38,9 +38,10 @@ init () | |||
38 | if (infoWindowTextView != NULL) | 38 | if (infoWindowTextView != NULL) |
39 | return; | 39 | return; |
40 | infoWindowTextView | 40 | infoWindowTextView |
41 | = glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML(), | 41 | = glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), |
42 | "messageWindowTextView"); | 42 | "messageWindowTextView"); |
43 | } | 43 | } |
44 | |||
44 | /** | 45 | /** |
45 | * Do not track more than MAX messages | 46 | * Do not track more than MAX messages |
46 | */ | 47 | */ |
@@ -52,7 +53,7 @@ init () | |||
52 | static void * | 53 | static void * |
53 | doInfoMessage (void *args) | 54 | doInfoMessage (void *args) |
54 | { | 55 | { |
55 | char * note = args; | 56 | char *note = args; |
56 | GtkTextIter iter; | 57 | GtkTextIter iter; |
57 | GtkTextBuffer *buffer; | 58 | GtkTextBuffer *buffer; |
58 | GtkTextIter end; | 59 | GtkTextIter end; |
@@ -63,7 +64,7 @@ doInfoMessage (void *args) | |||
63 | gtk_text_buffer_insert (buffer, &iter, note, -1); | 64 | gtk_text_buffer_insert (buffer, &iter, note, -1); |
64 | if (gtk_text_buffer_get_line_count (buffer) >= MAX_LINES) | 65 | if (gtk_text_buffer_get_line_count (buffer) >= MAX_LINES) |
65 | { | 66 | { |
66 | gtk_text_buffer_get_iter_at_line (buffer, &iter, MAX_LINES-1); | 67 | gtk_text_buffer_get_iter_at_line (buffer, &iter, MAX_LINES - 1); |
67 | gtk_text_buffer_get_iter_at_line (buffer, &end, -1); | 68 | gtk_text_buffer_get_iter_at_line (buffer, &end, -1); |
68 | gtk_text_buffer_delete (buffer, &iter, &end); | 69 | gtk_text_buffer_delete (buffer, &iter, &end); |
69 | } | 70 | } |
@@ -79,7 +80,7 @@ void | |||
79 | GNUNET_GTK_show_info_message (const char *format, ...) | 80 | GNUNET_GTK_show_info_message (const char *format, ...) |
80 | { | 81 | { |
81 | va_list args; | 82 | va_list args; |
82 | gchar * note; | 83 | gchar *note; |
83 | 84 | ||
84 | va_start (args, format); | 85 | va_start (args, format); |
85 | note = g_strdup_vprintf (format, args); | 86 | note = g_strdup_vprintf (format, args); |
diff --git a/src/include/gnunetgtk_common.h b/src/include/gnunetgtk_common.h index b0cce179..ff8e9034 100644 --- a/src/include/gnunetgtk_common.h +++ b/src/include/gnunetgtk_common.h | |||
@@ -175,7 +175,8 @@ struct GNUNET_CronManager *GNUNET_GTK_get_cron_manager (void); | |||
175 | 175 | ||
176 | 176 | ||
177 | GtkWidget *GNUNET_GTK_extract_main_widget_from_window (GladeXML * xml, | 177 | GtkWidget *GNUNET_GTK_extract_main_widget_from_window (GladeXML * xml, |
178 | const char *windowName); | 178 | const char |
179 | *windowName); | ||
179 | 180 | ||
180 | 181 | ||
181 | 182 | ||
diff --git a/src/plugins/chat/chat.c b/src/plugins/chat/chat.c index 6db7bbfa..e4cbfa2f 100644 --- a/src/plugins/chat/chat.c +++ b/src/plugins/chat/chat.c | |||
@@ -262,8 +262,8 @@ create_chat_room_tab (const char *room_name, const char *nick) | |||
262 | glade_xml_new (GNUNET_GTK_get_glade_filename (), | 262 | glade_xml_new (GNUNET_GTK_get_glade_filename (), |
263 | "chatFrame", PACKAGE_NAME); | 263 | "chatFrame", PACKAGE_NAME); |
264 | GNUNET_GTK_connect_glade_with_plugins (client->chatXML); | 264 | GNUNET_GTK_connect_glade_with_plugins (client->chatXML); |
265 | client->chatFrame = GNUNET_GTK_extract_main_widget_from_window (client->chatXML, | 265 | client->chatFrame = |
266 | "chatFrame"); | 266 | GNUNET_GTK_extract_main_widget_from_window (client->chatXML, "chatFrame"); |
267 | chatLabel = gtk_label_new (room_name); | 267 | chatLabel = gtk_label_new (room_name); |
268 | gtk_notebook_append_page (GTK_NOTEBOOK (chatnotebook), | 268 | gtk_notebook_append_page (GTK_NOTEBOOK (chatnotebook), |
269 | client->chatFrame, chatLabel); | 269 | client->chatFrame, chatLabel); |
diff --git a/src/plugins/daemon/daemon.c b/src/plugins/daemon/daemon.c index 0cab7e52..a120b03c 100644 --- a/src/plugins/daemon/daemon.c +++ b/src/plugins/daemon/daemon.c | |||
@@ -78,7 +78,7 @@ updateAppModel (void *dummy) | |||
78 | char *pos; | 78 | char *pos; |
79 | char *desc; | 79 | char *desc; |
80 | GtkListStore *model; | 80 | GtkListStore *model; |
81 | 81 | ||
82 | model = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING); | 82 | model = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING); |
83 | apps = NULL; | 83 | apps = NULL; |
84 | sock = GNUNET_client_connection_create (ectx, cfg); | 84 | sock = GNUNET_client_connection_create (ectx, cfg); |
@@ -257,7 +257,7 @@ cronCheckDaemon (void *dummy) | |||
257 | ret = 0; | 257 | ret = 0; |
258 | if (last != ret) | 258 | if (last != ret) |
259 | { | 259 | { |
260 | updateAppModel(NULL); | 260 | updateAppModel (NULL); |
261 | last = ret; | 261 | last = ret; |
262 | } | 262 | } |
263 | GNUNET_GTK_save_call (&doUpdateMenus, &ret); | 263 | GNUNET_GTK_save_call (&doUpdateMenus, &ret); |
@@ -282,10 +282,9 @@ on_startDaemon_clicked_daemon (GtkWidget * widget, gpointer data) | |||
282 | gtk_widget_set_sensitive (launchEntry, FALSE); | 282 | gtk_widget_set_sensitive (launchEntry, FALSE); |
283 | if (GNUNET_OK == GNUNET_test_daemon_running (ectx, cfg)) | 283 | if (GNUNET_OK == GNUNET_test_daemon_running (ectx, cfg)) |
284 | { | 284 | { |
285 | GNUNET_cron_advance_job(GNUNET_GTK_get_cron_manager (), | 285 | GNUNET_cron_advance_job (GNUNET_GTK_get_cron_manager (), |
286 | &cronCheckDaemon, | 286 | &cronCheckDaemon, |
287 | 15 * GNUNET_CRON_SECONDS, | 287 | 15 * GNUNET_CRON_SECONDS, NULL); |
288 | NULL); | ||
289 | return; | 288 | return; |
290 | } | 289 | } |
291 | else | 290 | else |
@@ -325,10 +324,9 @@ on_startDaemon_clicked_daemon (GtkWidget * widget, gpointer data) | |||
325 | GNUNET_GTK_add_log_entry (_("Launched gnunetd\n")); | 324 | GNUNET_GTK_add_log_entry (_("Launched gnunetd\n")); |
326 | } | 325 | } |
327 | g_free (fn); | 326 | g_free (fn); |
328 | GNUNET_cron_advance_job(GNUNET_GTK_get_cron_manager (), | 327 | GNUNET_cron_advance_job (GNUNET_GTK_get_cron_manager (), |
329 | &cronCheckDaemon, | 328 | &cronCheckDaemon, |
330 | 15 * GNUNET_CRON_SECONDS, | 329 | 15 * GNUNET_CRON_SECONDS, NULL); |
331 | NULL); | ||
332 | return; | 330 | return; |
333 | } | 331 | } |
334 | else | 332 | else |
@@ -348,10 +346,9 @@ on_startDaemon_clicked_daemon (GtkWidget * widget, gpointer data) | |||
348 | } | 346 | } |
349 | if (fn != NULL) | 347 | if (fn != NULL) |
350 | g_free (fn); | 348 | g_free (fn); |
351 | GNUNET_cron_advance_job(GNUNET_GTK_get_cron_manager (), | 349 | GNUNET_cron_advance_job (GNUNET_GTK_get_cron_manager (), |
352 | &cronCheckDaemon, | 350 | &cronCheckDaemon, |
353 | 15 * GNUNET_CRON_SECONDS, | 351 | 15 * GNUNET_CRON_SECONDS, NULL); |
354 | NULL); | ||
355 | } | 352 | } |
356 | } | 353 | } |
357 | 354 | ||
@@ -390,10 +387,8 @@ on_stopDaemon_clicked_daemon (GtkWidget * widget, gpointer data) | |||
390 | } | 387 | } |
391 | GNUNET_client_connection_destroy (sock); | 388 | GNUNET_client_connection_destroy (sock); |
392 | } | 389 | } |
393 | GNUNET_cron_advance_job(GNUNET_GTK_get_cron_manager (), | 390 | GNUNET_cron_advance_job (GNUNET_GTK_get_cron_manager (), |
394 | &cronCheckDaemon, | 391 | &cronCheckDaemon, 15 * GNUNET_CRON_SECONDS, NULL); |
395 | 15 * GNUNET_CRON_SECONDS, | ||
396 | NULL); | ||
397 | } | 392 | } |
398 | 393 | ||
399 | void | 394 | void |
@@ -474,8 +469,8 @@ init_daemon (struct GNUNET_GE_Context *e, struct GNUNET_GC_Configuration *c) | |||
474 | GNUNET_free (daemon_config); | 469 | GNUNET_free (daemon_config); |
475 | 470 | ||
476 | cron = GNUNET_GTK_get_cron_manager (); | 471 | cron = GNUNET_GTK_get_cron_manager (); |
477 | GNUNET_cron_add_job (cron, &cronCheckDaemon, 2 * GNUNET_CRON_SECONDS, 15 * GNUNET_CRON_SECONDS, | 472 | GNUNET_cron_add_job (cron, &cronCheckDaemon, 2 * GNUNET_CRON_SECONDS, |
478 | NULL); | 473 | 15 * GNUNET_CRON_SECONDS, NULL); |
479 | GNUNET_cron_add_job (cron, &updateAppModel, 5 * GNUNET_CRON_MINUTES, | 474 | GNUNET_cron_add_job (cron, &updateAppModel, 5 * GNUNET_CRON_MINUTES, |
480 | 5 * GNUNET_CRON_MINUTES, NULL); | 475 | 5 * GNUNET_CRON_MINUTES, NULL); |
481 | } | 476 | } |
diff --git a/src/plugins/fs/collection.c b/src/plugins/fs/collection.c index 067dce3c..5009b0a2 100644 --- a/src/plugins/fs/collection.c +++ b/src/plugins/fs/collection.c | |||
@@ -137,7 +137,8 @@ deleteCollection_clicked_fs (GtkWidget * dummy1, GtkWidget * dummy2) | |||
137 | } | 137 | } |
138 | else | 138 | else |
139 | { | 139 | { |
140 | GNUNET_GTK_show_info_message (_("Failed to stop collection (consult logs).\n")); | 140 | GNUNET_GTK_show_info_message (_ |
141 | ("Failed to stop collection (consult logs).\n")); | ||
141 | } | 142 | } |
142 | } | 143 | } |
143 | 144 | ||
diff --git a/src/plugins/fs/fs.c b/src/plugins/fs/fs.c index e00668a0..55505074 100644 --- a/src/plugins/fs/fs.c +++ b/src/plugins/fs/fs.c | |||
@@ -676,23 +676,21 @@ fs_summary_stop () | |||
676 | 676 | ||
677 | } | 677 | } |
678 | 678 | ||
679 | static void | 679 | static void |
680 | init_cron_job(void * arg) | 680 | init_cron_job (void *arg) |
681 | { | 681 | { |
682 | GtkWidget * tab = arg; | 682 | GtkWidget *tab = arg; |
683 | 683 | ||
684 | ctx = GNUNET_FSUI_start (ectx, cfg, "gnunet-gtk", | 684 | ctx = GNUNET_FSUI_start (ectx, cfg, "gnunet-gtk", 8, /* FIXME: allow user to configure download parallelism */ |
685 | 8, /* FIXME: allow user to configure download parallelism */ | ||
686 | GNUNET_YES, &eventProcessor, NULL); | 685 | GNUNET_YES, &eventProcessor, NULL); |
687 | GNUNET_GTK_save_call((GNUNET_ThreadMainFunction) >k_widget_show, | 686 | GNUNET_GTK_save_call ((GNUNET_ThreadMainFunction) & gtk_widget_show, tab); |
688 | tab); | ||
689 | } | 687 | } |
690 | 688 | ||
691 | void | 689 | void |
692 | init_fs (struct GNUNET_GE_Context *e, struct GNUNET_GC_Configuration *c) | 690 | init_fs (struct GNUNET_GE_Context *e, struct GNUNET_GC_Configuration *c) |
693 | { | 691 | { |
694 | GtkWidget *tab; | 692 | GtkWidget *tab; |
695 | struct GNUNET_CronManager * cron; | 693 | struct GNUNET_CronManager *cron; |
696 | 694 | ||
697 | ectx = e; | 695 | ectx = e; |
698 | cfg = c; | 696 | cfg = c; |
@@ -701,8 +699,8 @@ init_fs (struct GNUNET_GE_Context *e, struct GNUNET_GC_Configuration *c) | |||
701 | fs_collection_start (); | 699 | fs_collection_start (); |
702 | fs_namespace_start (); | 700 | fs_namespace_start (); |
703 | tab = glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), "fsnotebook"); | 701 | tab = glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), "fsnotebook"); |
704 | cron = GNUNET_GTK_get_cron_manager(); | 702 | cron = GNUNET_GTK_get_cron_manager (); |
705 | GNUNET_cron_add_job(cron, &init_cron_job, 0, 0, tab); | 703 | GNUNET_cron_add_job (cron, &init_cron_job, 0, 0, tab); |
706 | } | 704 | } |
707 | 705 | ||
708 | static void * | 706 | static void * |
@@ -712,19 +710,19 @@ cleanup_save_call (void *arg) | |||
712 | 710 | ||
713 | fs_summary_stop (); | 711 | fs_summary_stop (); |
714 | fs_namespace_stop (); | 712 | fs_namespace_stop (); |
715 | gtk_widget_hide(tab); | 713 | gtk_widget_hide (tab); |
716 | return NULL; | 714 | return NULL; |
717 | } | 715 | } |
718 | 716 | ||
719 | void | 717 | void |
720 | done_fs () | 718 | done_fs () |
721 | { | 719 | { |
722 | struct GNUNET_CronManager * cron; | 720 | struct GNUNET_CronManager *cron; |
723 | GtkWidget *tab; | 721 | GtkWidget *tab; |
724 | 722 | ||
725 | tab = glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), "fsnotebook"); | 723 | tab = glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), "fsnotebook"); |
726 | cron = GNUNET_GTK_get_cron_manager(); | 724 | cron = GNUNET_GTK_get_cron_manager (); |
727 | GNUNET_cron_del_job(cron, &init_cron_job, 0, tab); | 725 | GNUNET_cron_del_job (cron, &init_cron_job, 0, tab); |
728 | if (ctx != NULL) | 726 | if (ctx != NULL) |
729 | GNUNET_FSUI_stop (ctx); | 727 | GNUNET_FSUI_stop (ctx); |
730 | GNUNET_GTK_save_call (&cleanup_save_call, tab); | 728 | GNUNET_GTK_save_call (&cleanup_save_call, tab); |
diff --git a/src/plugins/fs/namespace.c b/src/plugins/fs/namespace.c index 987d0264..3e7108f1 100644 --- a/src/plugins/fs/namespace.c +++ b/src/plugins/fs/namespace.c | |||
@@ -120,9 +120,11 @@ makeNamespaceFrame (NamespaceList * entry) | |||
120 | = glade_xml_new (GNUNET_GTK_get_glade_filename (), | 120 | = glade_xml_new (GNUNET_GTK_get_glade_filename (), |
121 | "namespaceContentFrame", PACKAGE_NAME); | 121 | "namespaceContentFrame", PACKAGE_NAME); |
122 | GNUNET_GTK_connect_glade_with_plugins (namespaceXML); | 122 | GNUNET_GTK_connect_glade_with_plugins (namespaceXML); |
123 | child = GNUNET_GTK_extract_main_widget_from_window (namespaceXML, "namespaceContentFrame"); | 123 | child = |
124 | resultList = glade_xml_get_widget (namespaceXML, | 124 | GNUNET_GTK_extract_main_widget_from_window (namespaceXML, |
125 | "namespaceContentFrameTreeView"); | 125 | "namespaceContentFrame"); |
126 | resultList = | ||
127 | glade_xml_get_widget (namespaceXML, "namespaceContentFrameTreeView"); | ||
126 | entry->addButton = glade_xml_get_widget (namespaceXML, "addButton"); | 128 | entry->addButton = glade_xml_get_widget (namespaceXML, "addButton"); |
127 | entry->updateButton = glade_xml_get_widget (namespaceXML, | 129 | entry->updateButton = glade_xml_get_widget (namespaceXML, |
128 | "namespaceUpdateButton"); | 130 | "namespaceUpdateButton"); |
diff --git a/src/plugins/fs/namespace_search.c b/src/plugins/fs/namespace_search.c index ed134192..83c0848e 100644 --- a/src/plugins/fs/namespace_search.c +++ b/src/plugins/fs/namespace_search.c | |||
@@ -80,10 +80,10 @@ on_namespaceRatingSpinButton_changed_fs (GtkWidget * dummy, | |||
80 | { | 80 | { |
81 | if (nsName != NULL) | 81 | if (nsName != NULL) |
82 | { | 82 | { |
83 | GNUNET_GE_ASSERT(NULL, | 83 | GNUNET_GE_ASSERT (NULL, |
84 | GNUNET_OK == | 84 | GNUNET_OK == |
85 | GNUNET_pseudonym_name_to_id(ectx, cfg, | 85 | GNUNET_pseudonym_name_to_id (ectx, cfg, |
86 | nsName, &nsid)); | 86 | nsName, &nsid)); |
87 | newrating = gtk_spin_button_get_value (GTK_SPIN_BUTTON (spin)); | 87 | newrating = gtk_spin_button_get_value (GTK_SPIN_BUTTON (spin)); |
88 | rating = GNUNET_pseudonym_rank (ectx, | 88 | rating = GNUNET_pseudonym_rank (ectx, |
89 | cfg, &nsid, newrating - rating); | 89 | cfg, &nsid, newrating - rating); |
@@ -157,10 +157,10 @@ on_searchNamespaceComboBoxEntry_changed_fs (GtkWidget * dummy, | |||
157 | } | 157 | } |
158 | else if (nsName != NULL) | 158 | else if (nsName != NULL) |
159 | { | 159 | { |
160 | GNUNET_GE_ASSERT(NULL, | 160 | GNUNET_GE_ASSERT (NULL, |
161 | GNUNET_OK == | 161 | GNUNET_OK == |
162 | GNUNET_pseudonym_name_to_id(ectx, cfg, | 162 | GNUNET_pseudonym_name_to_id (ectx, cfg, |
163 | nsName, &ns)); | 163 | nsName, &ns)); |
164 | gtk_spin_button_set_value (GTK_SPIN_BUTTON (spin), rating); | 164 | gtk_spin_button_set_value (GTK_SPIN_BUTTON (spin), rating); |
165 | gtk_widget_set_sensitive (spin, TRUE); | 165 | gtk_widget_set_sensitive (spin, TRUE); |
166 | keyword | 166 | keyword |
@@ -261,7 +261,8 @@ saveDiscovery (void *cls) | |||
261 | } | 261 | } |
262 | if (found == GNUNET_NO) | 262 | if (found == GNUNET_NO) |
263 | { | 263 | { |
264 | GNUNET_GTK_show_info_message (_("Namespace `%s' found: %s.\n"), nni->namespaceName, desc); | 264 | GNUNET_GTK_show_info_message (_("Namespace `%s' found: %s.\n"), |
265 | nni->namespaceName, desc); | ||
265 | gtk_list_store_append (model, &iter); | 266 | gtk_list_store_append (model, &iter); |
266 | gtk_list_store_set (model, | 267 | gtk_list_store_set (model, |
267 | &iter, | 268 | &iter, |
diff --git a/src/plugins/fs/search.c b/src/plugins/fs/search.c index aaabb079..889e5ff1 100644 --- a/src/plugins/fs/search.c +++ b/src/plugins/fs/search.c | |||
@@ -255,13 +255,13 @@ addEntryToSearchTree (SearchList * searchContext, | |||
255 | } | 255 | } |
256 | } | 256 | } |
257 | #else | 257 | #else |
258 | mime = GNUNET_strdup(rawMime); | 258 | mime = GNUNET_strdup (rawMime); |
259 | #endif | 259 | #endif |
260 | 260 | ||
261 | gtk_tree_store_set (searchContext->tree, iter, | 261 | gtk_tree_store_set (searchContext->tree, iter, |
262 | SEARCH_NAME, name, SEARCH_SIZE, size, SEARCH_HSIZE, | 262 | SEARCH_NAME, name, SEARCH_SIZE, size, SEARCH_HSIZE, |
263 | size_h, SEARCH_MIME, mime, | 263 | size_h, SEARCH_MIME, mime, |
264 | SEARCH_RAW_MIME, rawMime, SEARCH_DESC, desc, | 264 | SEARCH_RAW_MIME, rawMime, SEARCH_DESC, desc, |
265 | SEARCH_PIXBUF, pixbuf, SEARCH_URI, | 265 | SEARCH_PIXBUF, pixbuf, SEARCH_URI, |
266 | GNUNET_ECRS_uri_duplicate (info->uri), SEARCH_META, | 266 | GNUNET_ECRS_uri_duplicate (info->uri), SEARCH_META, |
267 | GNUNET_meta_data_duplicate (info->meta), | 267 | GNUNET_meta_data_duplicate (info->meta), |
@@ -270,11 +270,11 @@ addEntryToSearchTree (SearchList * searchContext, | |||
270 | searchContext, SEARCH_INTERNAL_PARENT, downloadParent, | 270 | searchContext, SEARCH_INTERNAL_PARENT, downloadParent, |
271 | SEARCH_STATUS, getStatusName (state), | 271 | SEARCH_STATUS, getStatusName (state), |
272 | SEARCH_APPLICABILITY_RANK, 1, SEARCH_RANK_SORT, | 272 | SEARCH_APPLICABILITY_RANK, 1, SEARCH_RANK_SORT, |
273 | (long long) 1, SEARCH_RANK_PIXBUF, rankbuf, | 273 | (long long) 1, SEARCH_RANK_PIXBUF, rankbuf, |
274 | #ifdef HAVE_GIO | 274 | #ifdef HAVE_GIO |
275 | SEARCH_ICON, icon, | 275 | SEARCH_ICON, icon, |
276 | #endif | 276 | #endif |
277 | -1); | 277 | -1); |
278 | g_object_unref (rankbuf); | 278 | g_object_unref (rankbuf); |
279 | if (pixbuf != NULL) | 279 | if (pixbuf != NULL) |
280 | g_object_unref (pixbuf); | 280 | g_object_unref (pixbuf); |
@@ -711,15 +711,16 @@ fs_search_started (struct GNUNET_FSUI_SearchList * fsui_list, | |||
711 | PACKAGE_NAME); | 711 | PACKAGE_NAME); |
712 | GNUNET_GTK_connect_glade_with_plugins (list->searchXML); | 712 | GNUNET_GTK_connect_glade_with_plugins (list->searchXML); |
713 | list->searchpage | 713 | list->searchpage |
714 | = GNUNET_GTK_extract_main_widget_from_window (list->searchXML, "searchResultsFrame"); | 714 | = |
715 | GNUNET_GTK_extract_main_widget_from_window (list->searchXML, | ||
716 | "searchResultsFrame"); | ||
715 | /* setup tree view and renderers */ | 717 | /* setup tree view and renderers */ |
716 | list->treeview = GTK_TREE_VIEW (glade_xml_get_widget (list->searchXML, | 718 | list->treeview = GTK_TREE_VIEW (glade_xml_get_widget (list->searchXML, |
717 | "searchResults")); | 719 | "searchResults")); |
718 | g_signal_connect_swapped (list->treeview, | 720 | g_signal_connect_swapped (list->treeview, |
719 | "button-press-event", | 721 | "button-press-event", |
720 | G_CALLBACK (search_click_handler), list); | 722 | G_CALLBACK (search_click_handler), list); |
721 | list->tree = gtk_tree_store_new (SEARCH_NUM, | 723 | list->tree = gtk_tree_store_new (SEARCH_NUM, G_TYPE_STRING, /* name */ |
722 | G_TYPE_STRING, /* name */ | ||
723 | G_TYPE_UINT64, /* size */ | 724 | G_TYPE_UINT64, /* size */ |
724 | G_TYPE_STRING, /* human-readable size */ | 725 | G_TYPE_STRING, /* human-readable size */ |
725 | G_TYPE_STRING, /* mime-type */ | 726 | G_TYPE_STRING, /* mime-type */ |
@@ -739,7 +740,7 @@ fs_search_started (struct GNUNET_FSUI_SearchList * fsui_list, | |||
739 | GDK_TYPE_PIXBUF, /* ranking visualization */ | 740 | GDK_TYPE_PIXBUF, /* ranking visualization */ |
740 | G_TYPE_INT64 /* numeric sort */ | 741 | G_TYPE_INT64 /* numeric sort */ |
741 | #ifdef HAVE_GIO | 742 | #ifdef HAVE_GIO |
742 | , GDK_TYPE_PIXBUF /* icon */ | 743 | , GDK_TYPE_PIXBUF /* icon */ |
743 | #endif | 744 | #endif |
744 | ); | 745 | ); |
745 | 746 | ||
@@ -935,7 +936,9 @@ fs_search_started (struct GNUNET_FSUI_SearchList * fsui_list, | |||
935 | "searchTabLabelWindow", PACKAGE_NAME); | 936 | "searchTabLabelWindow", PACKAGE_NAME); |
936 | GNUNET_GTK_connect_glade_with_plugins (list->labelXML); | 937 | GNUNET_GTK_connect_glade_with_plugins (list->labelXML); |
937 | list->tab_label | 938 | list->tab_label |
938 | = GNUNET_GTK_extract_main_widget_from_window (list->labelXML, "searchTabLabelWindow"); | 939 | = |
940 | GNUNET_GTK_extract_main_widget_from_window (list->labelXML, | ||
941 | "searchTabLabelWindow"); | ||
939 | /* process existing results */ | 942 | /* process existing results */ |
940 | for (i = 0; i < resultCount; i++) | 943 | for (i = 0; i < resultCount; i++) |
941 | fs_search_result_received (list, &results[i], uri); | 944 | fs_search_result_received (list, &results[i], uri); |
@@ -1186,14 +1189,14 @@ on_fssearchbutton_clicked_fs (gpointer dummy2, GtkWidget * searchButton) | |||
1186 | if (nsName != NULL) | 1189 | if (nsName != NULL) |
1187 | { | 1190 | { |
1188 | char *ustring; | 1191 | char *ustring; |
1189 | GNUNET_EncName enc; | 1192 | GNUNET_EncName enc; |
1190 | GNUNET_HashCode nsid; | 1193 | GNUNET_HashCode nsid; |
1191 | 1194 | ||
1192 | GNUNET_GE_ASSERT(NULL, | 1195 | GNUNET_GE_ASSERT (NULL, |
1193 | GNUNET_OK == | 1196 | GNUNET_OK == |
1194 | GNUNET_pseudonym_name_to_id(ectx, cfg, | 1197 | GNUNET_pseudonym_name_to_id (ectx, cfg, |
1195 | nsName, &nsid)); | 1198 | nsName, &nsid)); |
1196 | GNUNET_hash_to_enc(&nsid, &enc); | 1199 | GNUNET_hash_to_enc (&nsid, &enc); |
1197 | 1200 | ||
1198 | ustring = | 1201 | ustring = |
1199 | GNUNET_malloc (strlen (searchString) + sizeof (GNUNET_EncName) + | 1202 | GNUNET_malloc (strlen (searchString) + sizeof (GNUNET_EncName) + |
@@ -1201,7 +1204,7 @@ on_fssearchbutton_clicked_fs (gpointer dummy2, GtkWidget * searchButton) | |||
1201 | strlen (GNUNET_ECRS_SUBSPACE_INFIX) + 10); | 1204 | strlen (GNUNET_ECRS_SUBSPACE_INFIX) + 10); |
1202 | strcpy (ustring, GNUNET_ECRS_URI_PREFIX); | 1205 | strcpy (ustring, GNUNET_ECRS_URI_PREFIX); |
1203 | strcat (ustring, GNUNET_ECRS_SUBSPACE_INFIX); | 1206 | strcat (ustring, GNUNET_ECRS_SUBSPACE_INFIX); |
1204 | strcat (ustring, (const char*)&enc); | 1207 | strcat (ustring, (const char *) &enc); |
1205 | strcat (ustring, "/"); | 1208 | strcat (ustring, "/"); |
1206 | strcat (ustring, searchString); | 1209 | strcat (ustring, searchString); |
1207 | fsss.uri = GNUNET_ECRS_string_to_uri (ectx, ustring); | 1210 | fsss.uri = GNUNET_ECRS_string_to_uri (ectx, ustring); |
diff --git a/src/plugins/stats/functions.c b/src/plugins/stats/functions.c index 4c179dd0..256b5de8 100644 --- a/src/plugins/stats/functions.c +++ b/src/plugins/stats/functions.c | |||
@@ -478,7 +478,8 @@ statsProcessor (const char *optName, unsigned long long value, void *data) | |||
478 | return GNUNET_OK; | 478 | return GNUNET_OK; |
479 | } | 479 | } |
480 | 480 | ||
481 | struct UpdateClosure { | 481 | struct UpdateClosure |
482 | { | ||
482 | GNUNET_CronTime delta; | 483 | GNUNET_CronTime delta; |
483 | int is_running; | 484 | int is_running; |
484 | }; | 485 | }; |
@@ -489,7 +490,7 @@ struct UpdateClosure { | |||
489 | static void * | 490 | static void * |
490 | updateDaemonStatus (void *cls) | 491 | updateDaemonStatus (void *cls) |
491 | { | 492 | { |
492 | struct UpdateClosure * uc = cls; | 493 | struct UpdateClosure *uc = cls; |
493 | static gboolean once = TRUE; | 494 | static gboolean once = TRUE; |
494 | static int last_status = -5; | 495 | static int last_status = -5; |
495 | unsigned long long connected_peers; | 496 | unsigned long long connected_peers; |