gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r19657 - gnunet-gtk/src/fs
Date: Thu, 2 Feb 2012 21:18:06 +0100

Author: grothoff
Date: 2012-02-02 21:18:06 +0100 (Thu, 02 Feb 2012)
New Revision: 19657

Modified:
   gnunet-gtk/src/fs/gnunet-fs-gtk.c
   gnunet-gtk/src/fs/gnunet-fs-gtk_advertise-pseudonym.c
   gnunet-gtk/src/fs/gnunet-fs-gtk_publish-dialog.c
Log:
-resolving more FIXMEs

Modified: gnunet-gtk/src/fs/gnunet-fs-gtk.c
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk.c   2012-02-02 20:11:33 UTC (rev 19656)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk.c   2012-02-02 20:18:06 UTC (rev 19657)
@@ -94,7 +94,7 @@
 
 /**
  * Task run on shutdown.
- * FIXME: does this need to be a separate task!?
+ * FIXME-STYLE: does this need to be a separate task!?
  *
  * @param cls NULL
  * @param tc scheduler context, unused
@@ -150,7 +150,7 @@
                   ("GNUNET_GTK_main_window"));
   gtk_window_maximize (GTK_WINDOW (main_window));
   
-  /* Allow multiple selection in metadata view; FIXME: can we do this with 
glade now? */
+  /* Allow multiple selection in metadata view; FIXME-STYLE: can we do this 
with glade now? */
   metadata_tree =
       GTK_TREE_VIEW (GNUNET_FS_GTK_get_main_window_object
                      ("GNUNET_GTK_main_window_metadata_treeview"));

Modified: gnunet-gtk/src/fs/gnunet-fs-gtk_advertise-pseudonym.c
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk_advertise-pseudonym.c       2012-02-02 
20:11:33 UTC (rev 19656)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk_advertise-pseudonym.c       2012-02-02 
20:18:06 UTC (rev 19657)
@@ -313,7 +313,7 @@
                            &add_to_list, 
                            ls);
 
-  /* FIXME: this signal can be connected by (modern) Glade automatically */
+  /* FIXME-UNCLEAN: this signal can be connected by (modern) Glade 
automatically */
   tv = GTK_TREE_VIEW (gtk_builder_get_object
                       (builder, "GNUNET_GTK_select_pseudonym_tree_view"));
   sel = gtk_tree_view_get_selection (tv);

Modified: gnunet-gtk/src/fs/gnunet-fs-gtk_publish-dialog.c
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk_publish-dialog.c    2012-02-02 20:11:33 UTC 
(rev 19656)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk_publish-dialog.c    2012-02-02 20:18:06 UTC 
(rev 19657)
@@ -54,11 +54,6 @@
   GtkBuilder *builder;
   
   /**
-   * Builder for the master window (FIXME: remove)
-   */
-  GtkBuilder *main_window_builder;
-
-  /**
    * Handle to the main window of the publishing dialog.
    */
   GtkWindow *master_pubdialog;
@@ -290,7 +285,6 @@
 
   /* Don't let the user close the dialog until all scanners are finished and
      their windows are closed */
-  /* FIXME: what about open-directory operations? */
   if ( (gtk_tree_model_get_iter_first (ctx->file_info_treemodel, &iter)) && 
        (ns_ok == GNUNET_YES) && 
        (ctx->adddir_head == NULL) )
@@ -299,7 +293,6 @@
     gtk_widget_set_sensitive (ctx->execute_button, FALSE);
 
   /* if an 'edit' operation is open, don't even allow "cancel" */
-  /* FIXME: what about open-directory operations? */
   if (ctx->adddir_head == NULL)
     gtk_widget_set_sensitive (ctx->cancel_button, TRUE);
   else
@@ -1388,7 +1381,7 @@
   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);
 
-  /* FIXME-UGLY: automatically connect using glade  instead */
+  /* FIXME-STYLE: 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,
@@ -1419,7 +1412,6 @@
   GtkWidget *ad;
   GtkComboBox *combo;
 
-  /* 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);
 
@@ -1434,7 +1426,7 @@
   ad = GTK_WIDGET (gtk_builder_get_object
                    (ctx->open_directory_builder, 
"GNUNET_GTK_publish_directory_dialog"));
 
-  /* FIXME-UGLY: automatically connect using glade  instead */
+  /* FIXME-STYLE: 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,
@@ -1454,11 +1446,6 @@
 
 /**
  * Context we keep while an "edit" sub-dialog is open.
- *
- * FIXME-MAYBE: we should probably keep these also in a DLL with the
- * master dialog to prevent the master dialog from closing while the
- * edit dialog is running?  Or are we otherwise already preventing
- * this?
  */
 struct EditPublishContext
 {
@@ -1474,12 +1461,6 @@
 
   /**
    * Position in the tree that is being edited.
-   *
-   * FIXME-MAYBE: using a TreeIter here is not great, as the row may be
-   * moved (or even deleted) while the edit dialog is running.  Should
-   * use a RowReference instead.  Also, how do we guard against two
-   * edit dialogs being opened for the same file? (Shouldn't we store
-   * the EditPublishContext with, say, the tree model?)
    */
   GtkTreeIter iter;
 };
@@ -1626,23 +1607,22 @@
   struct GNUNET_CONTAINER_MetaData *meta;
   struct GNUNET_FS_Namespace *ns;
 
-  gtk_tree_model_get (tm, iter, 1, &ns, 4, &meta, -1);
+  gtk_tree_model_get (tm, iter, 
+                     1, &ns, 
+                     4, &meta, 
+                     -1);
   if (NULL != meta)
     GNUNET_CONTAINER_meta_data_destroy (meta);
   if (NULL != ns)
-  {
-    /* FIXME-BUG-MAYBE: should we not delete ns here? (resource leak?) */
-    // GNUNET_FS_namespace_delete (nso, GNUNET_NO);
-  }
+    GNUNET_FS_namespace_delete (ns, GNUNET_NO); 
   /* recursively clean up children */
-  if (gtk_tree_model_iter_children (tm, &child, iter))
+  if (! gtk_tree_model_iter_children (tm, &child, iter))
+    return;
+  do
   {
-    do
-    {
-      free_pseudonym_tree_store (tm, &child);
-    }
-    while (gtk_tree_model_iter_next (tm, &child));
+    free_pseudonym_tree_store (tm, &child);
   }
+  while (gtk_tree_model_iter_next (tm, &child));  
 }
 
 
@@ -1687,7 +1667,6 @@
   GtkTreeIter iter;
 
   /* Refuse to close until all scanners are finished */
-  /* FIXME: what about open-directory operations? */
   if (NULL != ctx->adddir_head)
     return GNUNET_NO;
 
@@ -1754,7 +1733,7 @@
     do
     {
       fi = get_file_information (ctx->file_info_treemodel, &iter);
-      /* FIXME: should we convert namespace id and uid from UTF8? */
+      /* FIXME-FEATURE-BUG-MINOR: should we convert namespace id and uid from 
UTF8? */
       GNUNET_FS_publish_start (GNUNET_FS_GTK_get_fs_handle (), 
                               fi, namespace,
                               namespace_id, namespace_uid,
@@ -1875,7 +1854,7 @@
     return;
   GNUNET_CONTAINER_multihashmap_put (uc->seen, &hc, "dummy",
                                      
GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST);
-  /* FIXME: what if this put fails?  Not convinced it cannot... */
+  /* FIXME-BUG-MAYBE: what if this put fails?  Not convinced it cannot... */
   desc =
       GNUNET_CONTAINER_meta_data_get_first_by_types (last_meta,
                                                      
EXTRACTOR_METATYPE_DESCRIPTION,
@@ -1955,8 +1934,10 @@
   uc.ts = ts;
   uc.ns = GNUNET_FS_namespace_create (GNUNET_FS_GTK_get_fs_handle (), name);
   uc.update_called = GNUNET_NO;
-  gtk_tree_store_insert_with_values (ts, &iter, NULL, G_MAXINT, 0, name, 1,
-                                     uc.ns, 2, NULL /* last-id */ ,
+  gtk_tree_store_insert_with_values (ts, &iter, NULL, G_MAXINT, 
+                                    0, name, 
+                                    1, uc.ns, 
+                                    2, NULL /* last-id */ ,
                                      3, NULL /* last-uri (as string!) */ ,
                                      4, NULL /* meta */ ,
                                      5, NULL /* next-ID */ ,
@@ -1984,9 +1965,6 @@
   GtkTreeView *pseudonym_treeview;
 
   ctx = GNUNET_malloc (sizeof (struct MainPublishingDialogContext));
-  /* FIXME-UNCLEAN: why bother keeping this one? */
-  ctx->main_window_builder = GTK_BUILDER (user_data);
-
   ctx->builder = GNUNET_GTK_get_new_builder 
("gnunet_fs_gtk_publish_dialog.glade", ctx);
   if (ctx->builder == NULL)
   {




reply via email to

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