aboutsummaryrefslogtreecommitdiff
path: root/src/fs/gnunet-fs-gtk.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs/gnunet-fs-gtk.c')
-rw-r--r--src/fs/gnunet-fs-gtk.c52
1 files changed, 26 insertions, 26 deletions
diff --git a/src/fs/gnunet-fs-gtk.c b/src/fs/gnunet-fs-gtk.c
index 739ff005..4b3f0c35 100644
--- a/src/fs/gnunet-fs-gtk.c
+++ b/src/fs/gnunet-fs-gtk.c
@@ -192,12 +192,12 @@ main_window_save_position (GtkWidget *main_window)
192 GNUNET_CONFIGURATION_set_value_number (cfg, "gnunet-fs-gtk", 192 GNUNET_CONFIGURATION_set_value_number (cfg, "gnunet-fs-gtk",
193 "MAIN_WINDOW_HEIGHT", window_height); 193 "MAIN_WINDOW_HEIGHT", window_height);
194 GNUNET_CONFIGURATION_set_value_string (cfg, "gnunet-fs-gtk", 194 GNUNET_CONFIGURATION_set_value_string (cfg, "gnunet-fs-gtk",
195 "MAIN_WINDOW_MAXIMIZED", 195 "MAIN_WINDOW_MAXIMIZED",
196 (maximized == GNUNET_YES) ? "YES" : "NO"); 196 (maximized == GNUNET_YES) ? "YES" : "NO");
197 197
198 cfgDefault = GNUNET_CONFIGURATION_create (); 198 cfgDefault = GNUNET_CONFIGURATION_create ();
199 (void) GNUNET_CONFIGURATION_load (cfgDefault, NULL); /* load defaults only */ 199 (void) GNUNET_CONFIGURATION_load (cfgDefault, NULL); /* load defaults only */
200 GNUNET_CONFIGURATION_write_diffs (cfgDefault, cfg, 200 GNUNET_CONFIGURATION_write_diffs (cfgDefault, cfg,
201 GNUNET_GTK_main_loop_get_configuration_file (ml)); 201 GNUNET_GTK_main_loop_get_configuration_file (ml));
202 GNUNET_CONFIGURATION_destroy (cfgDefault); 202 GNUNET_CONFIGURATION_destroy (cfgDefault);
203} 203}
@@ -231,7 +231,7 @@ GNUNET_GTK_main_window_configure_event_cb (GtkWidget *main_window,
231 */ 231 */
232static void 232static void
233shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 233shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
234{ 234{
235 struct SearchLookup *sl; 235 struct SearchLookup *sl;
236 struct PseuLookupContext *lctx; 236 struct PseuLookupContext *lctx;
237 237
@@ -267,10 +267,10 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
267 GNUNET_IDENTITY_disconnect (main_context.identity); 267 GNUNET_IDENTITY_disconnect (main_context.identity);
268 main_context.identity = NULL; 268 main_context.identity = NULL;
269 } 269 }
270 while (NULL != (sl = main_context.sl_head)) 270 while (NULL != (sl = main_context.sl_head))
271 abort_search_lookup (sl); 271 abort_search_lookup (sl);
272 while (NULL != (lctx = main_context.lctx_head)) 272 while (NULL != (lctx = main_context.lctx_head))
273 abort_pseu_lookup (lctx); 273 abort_pseu_lookup (lctx);
274 if (NULL != main_context.zm) 274 if (NULL != main_context.zm)
275 { 275 {
276 GNUNET_NAMESTORE_zone_monitor_stop (main_context.zm); 276 GNUNET_NAMESTORE_zone_monitor_stop (main_context.zm);
@@ -372,7 +372,7 @@ process_paste (GtkClipboard *cb,
372 * TRUE if there is now a pop-up menu 372 * TRUE if there is now a pop-up menu
373 */ 373 */
374gboolean 374gboolean
375GNUNET_FS_GTK_main_window_button_press_event (GtkWidget * widget, 375GNUNET_FS_GTK_main_window_button_press_event (GtkWidget * widget,
376 GdkEvent * event, 376 GdkEvent * event,
377 gpointer user_data) 377 gpointer user_data)
378{ 378{
@@ -500,8 +500,8 @@ format_service_list (unsigned int count, const char *const*list)
500 500
501 501
502static void 502static void
503service_list_callback (void *cls, 503service_list_callback (void *cls,
504 enum GNUNET_ARM_RequestStatus rs, 504 enum GNUNET_ARM_RequestStatus rs,
505 unsigned int count, 505 unsigned int count,
506 const char *const*list) 506 const char *const*list)
507{ 507{
@@ -537,7 +537,7 @@ arm_connection_state_change (void *cls,
537 537
538static void 538static void
539service_status_change (void *cls, 539service_status_change (void *cls,
540 const char *service, 540 const char *service,
541 enum GNUNET_ARM_ServiceStatus status) 541 enum GNUNET_ARM_ServiceStatus status)
542{ 542{
543 /* Very crude, we can probably do better. 543 /* Very crude, we can probably do better.
@@ -545,7 +545,7 @@ service_status_change (void *cls,
545 * to service status changes, then update the indicator, 545 * to service status changes, then update the indicator,
546 * without requesting a list from ARM every goddamned time? 546 * without requesting a list from ARM every goddamned time?
547 */ 547 */
548 GNUNET_ARM_request_service_list (arm, 548 GNUNET_ARM_request_service_list (arm,
549 SERVICE_LIST_TIMEOUT, 549 SERVICE_LIST_TIMEOUT,
550 &service_list_callback, cls); 550 &service_list_callback, cls);
551} 551}
@@ -563,7 +563,7 @@ service_status_change (void *cls,
563 * @param rd_count number of entries in @a rd array; 0 on removal 563 * @param rd_count number of entries in @a rd array; 0 on removal
564 * @param rd array of records for the label 564 * @param rd array of records for the label
565 */ 565 */
566static void 566static void
567monitor_zone_records (void *cls, 567monitor_zone_records (void *cls,
568 const struct GNUNET_CRYPTO_EccPrivateKey *zone, 568 const struct GNUNET_CRYPTO_EccPrivateKey *zone,
569 const char *label, 569 const char *label,
@@ -591,7 +591,7 @@ monitor_zone_records (void *cls,
591 if (gtk_tree_model_get_iter_first (tm, &iter)) 591 if (gtk_tree_model_get_iter_first (tm, &iter))
592 do 592 do
593 { 593 {
594 gtk_tree_model_get (tm, &iter, 594 gtk_tree_model_get (tm, &iter,
595 0, &id, 595 0, &id,
596 -1); 596 -1);
597 if (0 == strcmp (id, label_gnu)) 597 if (0 == strcmp (id, label_gnu))
@@ -635,7 +635,7 @@ handle_sks_zone_identity (void *cls,
635 const char *name) 635 const char *name)
636{ 636{
637 main_context.id_op = NULL; 637 main_context.id_op = NULL;
638 638
639 if (NULL == ego) 639 if (NULL == ego)
640 { 640 {
641 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 641 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
@@ -649,7 +649,7 @@ handle_sks_zone_identity (void *cls,
649 main_context.zm = GNUNET_NAMESTORE_zone_monitor_start (main_context.cfg, 649 main_context.zm = GNUNET_NAMESTORE_zone_monitor_start (main_context.cfg,
650 main_context.sks_zone, 650 main_context.sks_zone,
651 &monitor_zone_records, 651 &monitor_zone_records,
652 NULL, 652 NULL,
653 NULL); 653 NULL);
654} 654}
655 655
@@ -739,7 +739,7 @@ run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
739 /* If anything is wrong - play safe and show it maximized */ 739 /* If anything is wrong - play safe and show it maximized */
740 gtk_window_maximize (GTK_WINDOW (main_context.main_window)); 740 gtk_window_maximize (GTK_WINDOW (main_context.main_window));
741 } 741 }
742 742
743 /* Allow multiple selection in metadata view; */ 743 /* Allow multiple selection in metadata view; */
744 /* FIXME-GTK3: this can be done within (modern versions of) glade */ 744 /* FIXME-GTK3: this can be done within (modern versions of) glade */
745 gtk_tree_selection_set_mode (gtk_tree_view_get_selection (main_context.md_treeview), 745 gtk_tree_selection_set_mode (gtk_tree_view_get_selection (main_context.md_treeview),
@@ -762,7 +762,7 @@ run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
762 762
763 /* initialize file-sharing */ 763 /* initialize file-sharing */
764 fs = GNUNET_FS_start (main_context.cfg, "gnunet-fs-gtk", 764 fs = GNUNET_FS_start (main_context.cfg, "gnunet-fs-gtk",
765 &GNUNET_GTK_fs_event_handler, NULL, 765 &GNUNET_GTK_fs_event_handler, NULL,
766 GNUNET_FS_FLAGS_PERSISTENCE | GNUNET_FS_FLAGS_DO_PROBES, 766 GNUNET_FS_FLAGS_PERSISTENCE | GNUNET_FS_FLAGS_DO_PROBES,
767 GNUNET_FS_OPTIONS_DOWNLOAD_PARALLELISM, 767 GNUNET_FS_OPTIONS_DOWNLOAD_PARALLELISM,
768 (unsigned int) dl_parallel, 768 (unsigned int) dl_parallel,
@@ -793,12 +793,12 @@ run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
793 gtk_widget_show (main_context.main_window); 793 gtk_widget_show (main_context.main_window);
794 gtk_window_present (GTK_WINDOW (main_context.main_window)); 794 gtk_window_present (GTK_WINDOW (main_context.main_window));
795 } 795 }
796 796
797 { 797 {
798 char *const *argv; 798 char *const *argv;
799 int argc; 799 int argc;
800 int i; 800 int i;
801 801
802 GNUNET_GTK_main_loop_get_args (ml, &argc, &argv); 802 GNUNET_GTK_main_loop_get_args (ml, &argc, &argv);
803 803
804 for (i = 0; i < argc; i++) 804 for (i = 0; i < argc; i++)
@@ -826,7 +826,7 @@ main (int argc, char **argv)
826 gettext_noop ("start in tray mode"), 0, 826 gettext_noop ("start in tray mode"), 0,
827 &GNUNET_GETOPT_set_one, &tray_only}, 827 &GNUNET_GETOPT_set_one, &tray_only},
828 GNUNET_GETOPT_OPTION_END 828 GNUNET_GETOPT_OPTION_END
829 }; 829 };
830#if HAVE_LIBUNIQUE 830#if HAVE_LIBUNIQUE
831 int arge; 831 int arge;
832 832
@@ -845,7 +845,7 @@ main (int argc, char **argv)
845 UniqueMessageData *msg; 845 UniqueMessageData *msg;
846 846
847 msg = unique_message_data_new (); 847 msg = unique_message_data_new ();
848 unique_message_data_set_text (msg, argv[arge], strlen (argv[arge])+1); 848 unique_message_data_set_text (msg, argv[arge], strlen (argv[arge])+1);
849 if (UNIQUE_RESPONSE_OK == response) 849 if (UNIQUE_RESPONSE_OK == response)
850 response = unique_app_send_message (unique_app, 850 response = unique_app_send_message (unique_app,
851 UNIQUE_OPEN, 851 UNIQUE_OPEN,
@@ -857,14 +857,14 @@ main (int argc, char **argv)
857 857
858 return (UNIQUE_RESPONSE_OK == response) ? 0 : 1; 858 return (UNIQUE_RESPONSE_OK == response) ? 0 : 1;
859 } 859 }
860 860
861#endif 861#endif
862 if (GNUNET_OK != 862 if (GNUNET_OK !=
863 GNUNET_GTK_main_loop_start ("gnunet-fs-gtk", 863 GNUNET_GTK_main_loop_start ("gnunet-fs-gtk",
864 "GTK GUI for GNUnet", 864 "GTK GUI for GNUnet",
865 argc, argv, 865 argc, argv,
866 options, 866 options,
867 "gnunet_fs_gtk_main_window.glade", 867 "gnunet_fs_gtk_main_window.glade",
868 &run)) 868 &run))
869 { 869 {
870#if HAVE_LIBUNIQUE 870#if HAVE_LIBUNIQUE