gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r19611 - gnunet-gtk/src/fs


From: gnunet
Subject: [GNUnet-SVN] r19611 - gnunet-gtk/src/fs
Date: Wed, 1 Feb 2012 19:09:25 +0100

Author: grothoff
Date: 2012-02-01 19:09:25 +0100 (Wed, 01 Feb 2012)
New Revision: 19611

Modified:
   gnunet-gtk/src/fs/gnunet-fs-gtk.c
Log:
-don't even start if fs startup fails

Modified: gnunet-gtk/src/fs/gnunet-fs-gtk.c
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk.c   2012-02-01 17:38:19 UTC (rev 19610)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk.c   2012-02-01 18:09:25 UTC (rev 19611)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     (C) 2010 Christian Grothoff (and other contributing authors)
+     (C) 2010, 2012 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -54,8 +54,11 @@
   return fs;
 }
 
+
 /**
- * Get cfg.
+ * Get our configuration.
+ *
+ * @return configuration handle
  */
 const struct GNUNET_CONFIGURATION_Handle *
 GNUNET_FS_GTK_get_configuration (void)
@@ -98,6 +101,9 @@
 
 /**
  * Callback invoked if the application is supposed to exit.
+ *
+ * @param object origin of the quit event, unused
+ * @param user_data global builder instance, unused
  */
 void
 GNUNET_GTK_quit_cb (GObject * object, gpointer user_data)
@@ -111,6 +117,9 @@
 /**
  * Actual main function run right after GNUnet's scheduler
  * is initialized.  Initializes up GTK and Glade.
+ *
+ * @param cls handle to the main loop ('struct GNUNET_GTK_MainLoop')
+ * @param tc scheduler context, unused
  */
 static void
 run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
@@ -139,40 +148,17 @@
   GNUNET_GTK_tray_icon_create (GTK_WINDOW (main_window),
                                "gnunet-gtk" /* FIXME: rename icon? */ ,
                                "gnunet-fs-gtk");
-
   /* initialize file-sharing */
   fs = GNUNET_FS_start (GNUNET_GTK_main_loop_get_configuration (ml), 
                        "gnunet-gtk", &GNUNET_GTK_fs_event_handler, NULL, 
                        GNUNET_FS_FLAGS_NONE     /* | 
GNUNET_FS_FLAGS_PERSISTENCE |
                                                  * GNUNET_FS_FLAGS_DO_PROBES 
*/ ,
                         GNUNET_FS_OPTIONS_END);
-  if (fs != NULL)
+  if (NULL == fs)
   {
-    /* Searches are now started from the search bar */
-    /* add_new_tab (); */
+    GNUNET_GTK_main_loop_quit (ml);
+    return;
   }
-  else
-  {
-    gtk_widget_hide (GTK_WIDGET
-                     (GNUNET_FS_GTK_get_main_window_object
-                      ("GNUNET_GTK_main_menu_file_create_pseudonym")));
-    gtk_widget_hide (GTK_WIDGET
-                     (GNUNET_FS_GTK_get_main_window_object
-                      ("GNUNET_GTK_main_menu_file_advertise_pseudonym")));
-    gtk_widget_hide (GTK_WIDGET
-                     (GNUNET_FS_GTK_get_main_window_object
-                      ("GNUNET_GTK_main_menu_file_publish")));
-    gtk_widget_hide (GTK_WIDGET
-                     (GNUNET_FS_GTK_get_main_window_object
-                      ("GNUNET_GTK_main_menu_file_search")));
-    gtk_widget_hide (GTK_WIDGET
-                     (GNUNET_FS_GTK_get_main_window_object
-                      ("GNUNET_GTK_main_menu_file_download_uri")));
-    gtk_widget_hide (GTK_WIDGET
-                     (GNUNET_FS_GTK_get_main_window_object
-                      ("GNUNET_GTK_main_menu_file_open_gnunet_directory")));
-    /* FIXME: set warning in status bar... */
-  }
   /* make GUI visible */
   if (!tray_only)
   {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]