gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r19656 - gnunet-gtk/src/fs
Date: Thu, 2 Feb 2012 21:11:33 +0100

Author: grothoff
Date: 2012-02-02 21:11:33 +0100 (Thu, 02 Feb 2012)
New Revision: 19656

Modified:
   gnunet-gtk/src/fs/gnunet-fs-gtk.c
   gnunet-gtk/src/fs/gnunet-fs-gtk_create-pseudonym.c
   gnunet-gtk/src/fs/gnunet-fs-gtk_main-window-namespace-dropdown.c
   gnunet-gtk/src/fs/gnunet-fs-gtk_open-directory.c
   gnunet-gtk/src/fs/gnunet-fs-gtk_publish-dialog.c
Log:
-resolving misc fixmes, classifying others

Modified: gnunet-gtk/src/fs/gnunet-fs-gtk.c
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk.c   2012-02-02 19:59:44 UTC (rev 19655)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk.c   2012-02-02 20:11:33 UTC (rev 19656)
@@ -158,11 +158,12 @@
                                GTK_SELECTION_MULTIPLE);
 
   GNUNET_GTK_tray_icon_create (GTK_WINDOW (main_window),
-                               "gnunet-gtk" /* FIXME: rename icon? */ ,
+                               "gnunet-fs-gtk",
                                "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-gtk",
+                       &GNUNET_GTK_fs_event_handler, NULL, 
                        GNUNET_FS_FLAGS_NONE     /* | 
GNUNET_FS_FLAGS_PERSISTENCE |
                                                  * GNUNET_FS_FLAGS_DO_PROBES 
*/ ,
                         GNUNET_FS_OPTIONS_END);

Modified: gnunet-gtk/src/fs/gnunet-fs-gtk_create-pseudonym.c
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk_create-pseudonym.c  2012-02-02 19:59:44 UTC 
(rev 19655)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk_create-pseudonym.c  2012-02-02 20:11:33 UTC 
(rev 19656)
@@ -51,7 +51,7 @@
   }
   name = gtk_entry_get_text (GTK_ENTRY (gtk_builder_get_object (builder, 
                                                                
"GNUNET_GTK_create_namespace_name_entry")));
-  /* FIXME: show busy dialog while doing key creation */
+  /* FIXME-FEATURE: show busy dialog while doing key creation */
   if (NULL != name)
   {
     ns = GNUNET_FS_namespace_create (GNUNET_FS_GTK_get_fs_handle (), name);

Modified: gnunet-gtk/src/fs/gnunet-fs-gtk_main-window-namespace-dropdown.c
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk_main-window-namespace-dropdown.c    
2012-02-02 19:59:44 UTC (rev 19655)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk_main-window-namespace-dropdown.c    
2012-02-02 20:11:33 UTC (rev 19656)
@@ -36,7 +36,7 @@
  * ID of a timeout task which we schedule to close the drop-down automatically
  * if the mouse leaves the area for a while.  0 for no such task.
  *
- * FIXME: this task is not cancelled if the main window is closed while
+ * FIXME-BUG-MINOR: this task is not cancelled if the main window is closed 
while
  *        the drop-down is down.
  */
 static guint namespace_selector_window_leave_timeout_source;
@@ -403,7 +403,7 @@
   GtkTreeIter iter;
   GtkTreeStore *namespace_treestore;
 
-  /* FIXME: can't we do the button initialization when we create the main 
window? */
+  /* FIXME-STYLE: can't we do the button initialization when we create the 
main window? */
   /* Make sure button class is realized */
   g_type_class_unref (g_type_class_ref (GTK_TYPE_BUTTON));
   /* GNUnet main window assumes that images on buttons are visible,
@@ -417,7 +417,7 @@
       GTK_TREE_STORE (GNUNET_FS_GTK_get_main_window_object
                       ("main_window_search_namespace_treestore"));
     
-    /* FIXME: find a way to manage pseudonyms.
+    /* FIXME-FEATURE: find a way to manage pseudonyms.
      * Right now the list will be filled with ALL and ANY pseudonyms that we
      * find, these are held as files in a special directory.
      * I don't see an easy way to ignore certain pseudonyms in that directory,
@@ -430,7 +430,7 @@
                                       0, "Any", 1, NULL, 2, "", 3,
                                       "Do not search in any particular 
namespace",
                                       -1);
-    /* FIXME-BUG: when do we unregister? */
+    /* FIXME-BUG-MINOR: when do we unregister? */
     GNUNET_PSEUDONYM_discovery_callback_register 
(GNUNET_FS_GTK_get_configuration (), 
                                                  &add_namespace_to_ts,
                                                  namespace_treestore);
@@ -461,7 +461,9 @@
   }
 
   /* show the window (to trigger certain events) and immediately hide it */
-  /* FIXME: yuck, can't we trigger these events by other means? */
+  /* FIXME-STYLE: yuck, can't we trigger these events by other means?  
+     CG->LRN: Which events are you even talking about here? I can't find 
anything
+     that would seem to be needed here. */
   {
     GtkWidget *namespace_selector_window;
 

Modified: gnunet-gtk/src/fs/gnunet-fs-gtk_open-directory.c
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk_open-directory.c    2012-02-02 19:59:44 UTC 
(rev 19655)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk_open-directory.c    2012-02-02 20:11:33 UTC 
(rev 19656)
@@ -168,7 +168,7 @@
                    (builder, "GNUNET_GTK_open_directory_dialog"));
   ff = GTK_FILE_FILTER (gtk_builder_get_object
                         (builder, "gnunet_directory_filter"));
-  /* FIXME: some day, write a custom file filter for gnunet-directories... */
+  /* FIXME-FEATURE: some day, write a custom file filter for 
gnunet-directories... */
   gtk_file_filter_add_pattern (ff, "*" GNUNET_FS_DIRECTORY_EXT);
 
   toplevel = gtk_widget_get_toplevel (dummy);

Modified: gnunet-gtk/src/fs/gnunet-fs-gtk_publish-dialog.c
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk_publish-dialog.c    2012-02-02 19:59:44 UTC 
(rev 19655)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk_publish-dialog.c    2012-02-02 20:11:33 UTC 
(rev 19656)
@@ -129,23 +129,13 @@
   GtkWidget *cancel_button;
 
   /**
-   * FIXME: ugly, keep?
+   * Builder for the open directory dialog (non-NULL while the dialog is open)
    */
-  gulong open_directory_handler_id;
-
-  /**
-   * FIXME: ugly, keep?
-   */
   GtkBuilder *open_directory_builder;
 
   /**
-   * FIXME: ugly, keep?
+   * Builder for the open file dialog (non-NULL while the dialog is open)
    */
-  gulong open_file_handler_id;
-
-  /**
-   * FIXME: ugly, keep?
-   */
   GtkBuilder *open_file_builder;
 
   /**
@@ -1260,12 +1250,6 @@
 {
   struct MainPublishingDialogContext *ctx = user_data;
 
-  /* FIXME-UGLY: how about using a separate closure and not needing this mess? 
-     In fact, even without it I don't see why we need to disconnect the 
handler... */
-  if (g_signal_handler_is_connected (G_OBJECT (dialog), 
ctx->open_directory_handler_id))
-    g_signal_handler_disconnect (G_OBJECT (dialog), 
ctx->open_directory_handler_id);
-  ctx->open_directory_handler_id = 0;
-
   if (response_id == -5 /* OK */)
   {
     char *filename;
@@ -1327,12 +1311,6 @@
 {
   struct MainPublishingDialogContext *ctx = user_data;
 
-  /* FIXME-UGLY: how about using a separate closure and not needing this mess? 
-     In fact, even without it I don't see why we need to disconnect the 
handler... */
-  if (g_signal_handler_is_connected (G_OBJECT (dialog), 
ctx->open_file_handler_id))
-    g_signal_handler_disconnect (G_OBJECT (dialog), ctx->open_file_handler_id);
-  ctx->open_file_handler_id = 0;
-
   if (response_id == -5 /* OK */)
   {
     char *filename;
@@ -1397,9 +1375,6 @@
   GtkWidget *ad;
   GtkComboBox *combo;
 
-  /* FIXME-UGLY: should we use a fresh, specific context for this dialog?
-     FIXME-BUG: how does this right now prevent two dialogs from being opened?
-     (or the master dialog from being closed in the meantime?) */
   ctx->open_file_builder = GNUNET_GTK_get_new_builder 
("gnunet_fs_gtk_publish_file_dialog.glade", ctx);
   GNUNET_FS_GTK_setup_expiration_year_adjustment (ctx->open_file_builder);
   ad = GTK_WIDGET (gtk_builder_get_object
@@ -1412,9 +1387,10 @@
                                                                      
"GNUNET_GTK_publish_file_dialog_replication_spin_button")), 0);
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (gtk_builder_get_object 
(ctx->open_file_builder,
                                                                           
"GNUNET_GTK_publish_file_dialog_do_index_checkbutton")), TRUE);
-  
-  ctx->open_file_handler_id = g_signal_connect (G_OBJECT (ad), "response",
-                                               G_CALLBACK 
(publish_file_dialog_response_cb), ctx);
+
+  /* FIXME-UGLY: automatically connect using glade  instead */
+  g_signal_connect (G_OBJECT (ad), "response",
+                   G_CALLBACK (publish_file_dialog_response_cb), ctx);
   combo = GTK_COMBO_BOX (gtk_builder_get_object (ctx->open_file_builder,
                                                 
"GNUNET_GTK_publish_file_dialog_anonymity_combobox"));
   gtk_combo_box_set_model (combo, 
@@ -1442,12 +1418,8 @@
   struct MainPublishingDialogContext *ctx = user_data;
   GtkWidget *ad;
   GtkComboBox *combo;
-  GtkTreeModel *anon_treemodel;
 
-  /* FIXME-UGLY: should we use a fresh, specific context for this dialog?
-     FIXME-BUG: how does this right now prevent two dialogs from being opened? 
-     (or the master dialog from being closed in the meantime?) */
-
+  /* FIXME-UGLY: should we use a fresh, specific context for this dialog? */
   ctx->open_directory_builder = GNUNET_GTK_get_new_builder 
("gnunet_fs_gtk_publish_directory_dialog.glade", ctx);
   GNUNET_FS_GTK_setup_expiration_year_adjustment (ctx->open_directory_builder);
 
@@ -1462,15 +1434,12 @@
   ad = GTK_WIDGET (gtk_builder_get_object
                    (ctx->open_directory_builder, 
"GNUNET_GTK_publish_directory_dialog"));
 
-  ctx->open_directory_handler_id = g_signal_connect (G_OBJECT (ad), "response",
-                                                    G_CALLBACK 
(publish_directory_dialog_response_cb), ctx);
-
-  /* FIXME-BUG-MAYBE: possibly bad sharing of the anonymity tree model */
-  anon_treemodel = GTK_TREE_MODEL (gtk_builder_get_object 
(ctx->main_window_builder,
-                                                          
"main_window_search_anonymity_liststore"));
+  /* FIXME-UGLY: automatically connect using glade  instead */
+  g_signal_connect (G_OBJECT (ad), "response",
+                   G_CALLBACK (publish_directory_dialog_response_cb), ctx);
   combo = GTK_COMBO_BOX (gtk_builder_get_object (ctx->open_directory_builder,
                                                 
"GNUNET_GTK_publish_directory_dialog_anonymity_combobox"));
-  gtk_combo_box_set_model (combo, anon_treemodel);
+  gtk_combo_box_set_model (combo, GNUNET_FS_GTK_get_anonymity_level_list_store 
());
 
   /* show dialog */
   gtk_window_set_transient_for (GTK_WINDOW (ad), ctx->master_pubdialog);




reply via email to

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