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.c32
1 files changed, 28 insertions, 4 deletions
diff --git a/src/fs/gnunet-fs-gtk.c b/src/fs/gnunet-fs-gtk.c
index 1f7d4502..bfcd0710 100644
--- a/src/fs/gnunet-fs-gtk.c
+++ b/src/fs/gnunet-fs-gtk.c
@@ -658,7 +658,7 @@ handle_sks_zone_identity (void *cls,
658 * Actual main function run right after GNUnet's scheduler 658 * Actual main function run right after GNUnet's scheduler
659 * is initialized. Initializes up GTK and Glade. 659 * is initialized. Initializes up GTK and Glade.
660 * 660 *
661 * @param cls handle to the main loop ('struct GNUNET_GTK_MainLoop') 661 * @param cls handle to the main loop (`struct GNUNET_GTK_MainLoop`)
662 * @param tc scheduler context, unused 662 * @param tc scheduler context, unused
663 */ 663 */
664static void 664static void
@@ -793,6 +793,26 @@ 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
797 {
798 char *const *argv;
799 int argc;
800 int i;
801
802 GNUNET_GTK_main_loop_get_args (ml, &argc, &argv);
803
804 for (i = 0; i < argc; i++)
805 {
806 if (GNUNET_OK !=
807 GNUNET_FS_GTK_handle_uri_string (argv[i],
808 1 /* anonymity level */))
809 fprintf (stderr,
810 "Invalid URI `%s'\n",
811 argv[i]);
812 }
813 }
814
815
796 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, 816 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL,
797 &shutdown_task, NULL); 817 &shutdown_task, NULL);
798} 818}
@@ -837,11 +857,15 @@ main (int argc, char **argv)
837 857
838 return (UNIQUE_RESPONSE_OK == response) ? 0 : 1; 858 return (UNIQUE_RESPONSE_OK == response) ? 0 : 1;
839 } 859 }
860
840#endif 861#endif
841 if (GNUNET_OK != 862 if (GNUNET_OK !=
842 GNUNET_GTK_main_loop_start ("gnunet-fs-gtk", "GTK GUI for GNUnet", argc, 863 GNUNET_GTK_main_loop_start ("gnunet-fs-gtk",
843 argv, options, 864 "GTK GUI for GNUnet",
844 "gnunet_fs_gtk_main_window.glade", &run)) 865 argc, argv,
866 options,
867 "gnunet_fs_gtk_main_window.glade",
868 &run))
845 { 869 {
846#if HAVE_LIBUNIQUE 870#if HAVE_LIBUNIQUE
847 g_object_unref (unique_app); 871 g_object_unref (unique_app);