gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r19677 - gnunet-gtk/src/fs
Date: Sat, 4 Feb 2012 00:27:41 +0100

Author: grothoff
Date: 2012-02-04 00:27:41 +0100 (Sat, 04 Feb 2012)
New Revision: 19677

Modified:
   gnunet-gtk/src/fs/gnunet-fs-gtk_advertise-pseudonym.c
   gnunet-gtk/src/fs/gnunet-fs-gtk_create-pseudonym.c
   gnunet-gtk/src/fs/gnunet-fs-gtk_download-save-as.c
   gnunet-gtk/src/fs/gnunet-fs-gtk_event-handler.c
   gnunet-gtk/src/fs/gnunet-fs-gtk_open-directory.c
   gnunet-gtk/src/fs/gnunet-fs-gtk_publish-dialog.c
Log:
-use named constants instead of -5

Modified: gnunet-gtk/src/fs/gnunet-fs-gtk_advertise-pseudonym.c
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk_advertise-pseudonym.c       2012-02-03 
22:48:05 UTC (rev 19676)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk_advertise-pseudonym.c       2012-02-03 
23:27:41 UTC (rev 19677)
@@ -140,7 +140,7 @@
   struct GNUNET_CONTAINER_MetaData *meta;
   struct GNUNET_FS_BlockOptions bo;
 
-  if (-5 != response_id)
+  if (GTK_RESPONSE_OK != response_id)
   {
     gtk_widget_destroy (GTK_WIDGET (dialog));
     g_object_unref (G_OBJECT (builder));

Modified: gnunet-gtk/src/fs/gnunet-fs-gtk_create-pseudonym.c
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk_create-pseudonym.c  2012-02-03 22:48:05 UTC 
(rev 19676)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk_create-pseudonym.c  2012-02-03 23:27:41 UTC 
(rev 19677)
@@ -31,7 +31,7 @@
  * User completed the 'create pseudonym' dialog.  Run the desired action.
  *
  * @param dialog the dialog
- * @param response_id '-5' on "OK"
+ * @param response_id GTK_RESPONSE_OK on "OK"
  * @param user_data the builder of the dialog
  */
 void
@@ -43,7 +43,7 @@
   const char *name;
   struct GNUNET_FS_Namespace *ns;
 
-  if (response_id != -5)
+  if (GTK_RESPONSE_OK != response_id)
   {
     gtk_widget_destroy (GTK_WIDGET (dialog));
     g_object_unref (G_OBJECT (builder));

Modified: gnunet-gtk/src/fs/gnunet-fs-gtk_download-save-as.c
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk_download-save-as.c  2012-02-03 22:48:05 UTC 
(rev 19676)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk_download-save-as.c  2012-02-03 23:27:41 UTC 
(rev 19677)
@@ -117,6 +117,10 @@
   GtkToggleButton *cb;
 
   dc = dlc->dc;
+  fprintf (stderr,
+          "Response is %u, ok is %u\n",
+          dlc->response,
+          GTK_RESPONSE_OK);
   if (GTK_RESPONSE_OK != dlc->response)
   {
     save_as_dialog_free_download_context (dc);

Modified: gnunet-gtk/src/fs/gnunet-fs-gtk_event-handler.c
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk_event-handler.c     2012-02-03 22:48:05 UTC 
(rev 19676)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk_event-handler.c     2012-02-03 23:27:41 UTC 
(rev 19677)
@@ -238,6 +238,8 @@
                      15, &local_filename, 
                      16, &downloaded_anonymity, 
                      -1);
+  if ( (NULL != local_filename) && (GNUNET_YES == top) )
+    *local_parents = GNUNET_YES;
   if ( (NULL == local_filename) && (GNUNET_NO == top) )
     *local_parents = GNUNET_NO;
   if ( (downloaded_anonymity != -1) && (*anonymity == -1) && (GNUNET_NO == 
top) )
@@ -369,7 +371,7 @@
   if (download_directory == NULL)
     download_directory = getcwd (cwd, sizeof (cwd));
   /* Calculate suggested filename */
-  local_parents = GNUNET_YES;
+  local_parents = GNUNET_NO;
   anonymity = -1;
   filename_is_absolute = GNUNET_NO;
   filename = get_suggested_filename_anonymity (tm, &iter, GNUNET_YES,

Modified: gnunet-gtk/src/fs/gnunet-fs-gtk_open-directory.c
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk_open-directory.c    2012-02-03 22:48:05 UTC 
(rev 19676)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk_open-directory.c    2012-02-03 23:27:41 UTC 
(rev 19677)
@@ -125,7 +125,7 @@
   char *filename;
   struct AddChildContext acc;
 
-  if (-5 != response_id)
+  if (GTK_RESPONSE_OK != response_id)
   {
     gtk_widget_destroy (GTK_WIDGET (dialog));
     g_object_unref (G_OBJECT (builder));

Modified: gnunet-gtk/src/fs/gnunet-fs-gtk_publish-dialog.c
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk_publish-dialog.c    2012-02-03 22:48:05 UTC 
(rev 19676)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk_publish-dialog.c    2012-02-03 23:27:41 UTC 
(rev 19677)
@@ -1256,7 +1256,7 @@
  * Function called when the "open" (directory) dialog was closed.
  *
  * @param dialog the open dialog
- * @param response_id result of the dialog ("-5" means to "run")
+ * @param response_id result of the dialog (GTK_RESPONSE_OK means to "run")
  * @param user_data master publishing dialog context of our window
  */
 void
@@ -1266,7 +1266,7 @@
 {
   struct MainPublishingDialogContext *ctx = user_data;
 
-  if (response_id == -5 /* OK */)
+  if (GTK_RESPONSE_OK == response_id)
   {
     char *filename;
     int do_index;
@@ -1317,7 +1317,7 @@
  * Function called when the "open" (file) dialog was closed.
  *
  * @param dialog the open dialog
- * @param response_id result of the dialog ("-5" means to "run")
+ * @param response_id result of the dialog (GTK_RESPONSE_OK means to "run")
  * @param user_data master publishing dialog context of our window
  */
 void
@@ -1327,7 +1327,7 @@
 {
   struct MainPublishingDialogContext *ctx = user_data;
 
-  if (response_id == -5 /* OK */)
+  if (GTK_RESPONSE_OK == response_id)
   {
     char *filename;
     struct GNUNET_FS_BlockOptions bo;




reply via email to

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