aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-02-03 23:27:41 +0000
committerChristian Grothoff <christian@grothoff.org>2012-02-03 23:27:41 +0000
commit953bd35100727319bd916fa00ffcb7a804c30c63 (patch)
tree103e6e0cb450016d34f20316913d5f954a7223f9
parentdcf496a1cd3fef7e293e4560021ad5d710992b78 (diff)
downloadgnunet-gtk-953bd35100727319bd916fa00ffcb7a804c30c63.tar.gz
gnunet-gtk-953bd35100727319bd916fa00ffcb7a804c30c63.zip
-use named constants instead of -5
-rw-r--r--src/fs/gnunet-fs-gtk_advertise-pseudonym.c2
-rw-r--r--src/fs/gnunet-fs-gtk_create-pseudonym.c4
-rw-r--r--src/fs/gnunet-fs-gtk_download-save-as.c4
-rw-r--r--src/fs/gnunet-fs-gtk_event-handler.c4
-rw-r--r--src/fs/gnunet-fs-gtk_open-directory.c2
-rw-r--r--src/fs/gnunet-fs-gtk_publish-dialog.c8
6 files changed, 15 insertions, 9 deletions
diff --git a/src/fs/gnunet-fs-gtk_advertise-pseudonym.c b/src/fs/gnunet-fs-gtk_advertise-pseudonym.c
index 1aad22f3..942ae563 100644
--- a/src/fs/gnunet-fs-gtk_advertise-pseudonym.c
+++ b/src/fs/gnunet-fs-gtk_advertise-pseudonym.c
@@ -140,7 +140,7 @@ GNUNET_GTK_select_pseudonym_dialog_response_cb (GtkDialog * dialog,
140 struct GNUNET_CONTAINER_MetaData *meta; 140 struct GNUNET_CONTAINER_MetaData *meta;
141 struct GNUNET_FS_BlockOptions bo; 141 struct GNUNET_FS_BlockOptions bo;
142 142
143 if (-5 != response_id) 143 if (GTK_RESPONSE_OK != response_id)
144 { 144 {
145 gtk_widget_destroy (GTK_WIDGET (dialog)); 145 gtk_widget_destroy (GTK_WIDGET (dialog));
146 g_object_unref (G_OBJECT (builder)); 146 g_object_unref (G_OBJECT (builder));
diff --git a/src/fs/gnunet-fs-gtk_create-pseudonym.c b/src/fs/gnunet-fs-gtk_create-pseudonym.c
index 558fcb91..86e5abe9 100644
--- a/src/fs/gnunet-fs-gtk_create-pseudonym.c
+++ b/src/fs/gnunet-fs-gtk_create-pseudonym.c
@@ -31,7 +31,7 @@
31 * User completed the 'create pseudonym' dialog. Run the desired action. 31 * User completed the 'create pseudonym' dialog. Run the desired action.
32 * 32 *
33 * @param dialog the dialog 33 * @param dialog the dialog
34 * @param response_id '-5' on "OK" 34 * @param response_id GTK_RESPONSE_OK on "OK"
35 * @param user_data the builder of the dialog 35 * @param user_data the builder of the dialog
36 */ 36 */
37void 37void
@@ -43,7 +43,7 @@ GNUNET_GTK_create_namespace_dialog_response_cb (GtkDialog * dialog,
43 const char *name; 43 const char *name;
44 struct GNUNET_FS_Namespace *ns; 44 struct GNUNET_FS_Namespace *ns;
45 45
46 if (response_id != -5) 46 if (GTK_RESPONSE_OK != response_id)
47 { 47 {
48 gtk_widget_destroy (GTK_WIDGET (dialog)); 48 gtk_widget_destroy (GTK_WIDGET (dialog));
49 g_object_unref (G_OBJECT (builder)); 49 g_object_unref (G_OBJECT (builder));
diff --git a/src/fs/gnunet-fs-gtk_download-save-as.c b/src/fs/gnunet-fs-gtk_download-save-as.c
index f020111c..96dd2f45 100644
--- a/src/fs/gnunet-fs-gtk_download-save-as.c
+++ b/src/fs/gnunet-fs-gtk_download-save-as.c
@@ -117,6 +117,10 @@ GNUNET_GTK_save_as_dialog_response_cb (GtkDialog * dialog,
117 GtkToggleButton *cb; 117 GtkToggleButton *cb;
118 118
119 dc = dlc->dc; 119 dc = dlc->dc;
120 fprintf (stderr,
121 "Response is %u, ok is %u\n",
122 dlc->response,
123 GTK_RESPONSE_OK);
120 if (GTK_RESPONSE_OK != dlc->response) 124 if (GTK_RESPONSE_OK != dlc->response)
121 { 125 {
122 save_as_dialog_free_download_context (dc); 126 save_as_dialog_free_download_context (dc);
diff --git a/src/fs/gnunet-fs-gtk_event-handler.c b/src/fs/gnunet-fs-gtk_event-handler.c
index b711ee90..95a6e280 100644
--- a/src/fs/gnunet-fs-gtk_event-handler.c
+++ b/src/fs/gnunet-fs-gtk_event-handler.c
@@ -238,6 +238,8 @@ get_suggested_filename_anonymity (GtkTreeModel *tm,
238 15, &local_filename, 238 15, &local_filename,
239 16, &downloaded_anonymity, 239 16, &downloaded_anonymity,
240 -1); 240 -1);
241 if ( (NULL != local_filename) && (GNUNET_YES == top) )
242 *local_parents = GNUNET_YES;
241 if ( (NULL == local_filename) && (GNUNET_NO == top) ) 243 if ( (NULL == local_filename) && (GNUNET_NO == top) )
242 *local_parents = GNUNET_NO; 244 *local_parents = GNUNET_NO;
243 if ( (downloaded_anonymity != -1) && (*anonymity == -1) && (GNUNET_NO == top) ) 245 if ( (downloaded_anonymity != -1) && (*anonymity == -1) && (GNUNET_NO == top) )
@@ -369,7 +371,7 @@ start_download (GtkTreeView *tree_view,
369 if (download_directory == NULL) 371 if (download_directory == NULL)
370 download_directory = getcwd (cwd, sizeof (cwd)); 372 download_directory = getcwd (cwd, sizeof (cwd));
371 /* Calculate suggested filename */ 373 /* Calculate suggested filename */
372 local_parents = GNUNET_YES; 374 local_parents = GNUNET_NO;
373 anonymity = -1; 375 anonymity = -1;
374 filename_is_absolute = GNUNET_NO; 376 filename_is_absolute = GNUNET_NO;
375 filename = get_suggested_filename_anonymity (tm, &iter, GNUNET_YES, 377 filename = get_suggested_filename_anonymity (tm, &iter, GNUNET_YES,
diff --git a/src/fs/gnunet-fs-gtk_open-directory.c b/src/fs/gnunet-fs-gtk_open-directory.c
index d73a5846..21247d2b 100644
--- a/src/fs/gnunet-fs-gtk_open-directory.c
+++ b/src/fs/gnunet-fs-gtk_open-directory.c
@@ -125,7 +125,7 @@ GNUNET_GTK_open_directory_dialog_response_cb (GtkDialog * dialog,
125 char *filename; 125 char *filename;
126 struct AddChildContext acc; 126 struct AddChildContext acc;
127 127
128 if (-5 != response_id) 128 if (GTK_RESPONSE_OK != response_id)
129 { 129 {
130 gtk_widget_destroy (GTK_WIDGET (dialog)); 130 gtk_widget_destroy (GTK_WIDGET (dialog));
131 g_object_unref (G_OBJECT (builder)); 131 g_object_unref (G_OBJECT (builder));
diff --git a/src/fs/gnunet-fs-gtk_publish-dialog.c b/src/fs/gnunet-fs-gtk_publish-dialog.c
index cd1f1262..074a1ad1 100644
--- a/src/fs/gnunet-fs-gtk_publish-dialog.c
+++ b/src/fs/gnunet-fs-gtk_publish-dialog.c
@@ -1256,7 +1256,7 @@ scan_file_or_directory (struct MainPublishingDialogContext *ctx,
1256 * Function called when the "open" (directory) dialog was closed. 1256 * Function called when the "open" (directory) dialog was closed.
1257 * 1257 *
1258 * @param dialog the open dialog 1258 * @param dialog the open dialog
1259 * @param response_id result of the dialog ("-5" means to "run") 1259 * @param response_id result of the dialog (GTK_RESPONSE_OK means to "run")
1260 * @param user_data master publishing dialog context of our window 1260 * @param user_data master publishing dialog context of our window
1261 */ 1261 */
1262void 1262void
@@ -1266,7 +1266,7 @@ GNUNET_GTK_publish_directory_dialog_response_cb (GtkDialog * dialog,
1266{ 1266{
1267 struct MainPublishingDialogContext *ctx = user_data; 1267 struct MainPublishingDialogContext *ctx = user_data;
1268 1268
1269 if (response_id == -5 /* OK */) 1269 if (GTK_RESPONSE_OK == response_id)
1270 { 1270 {
1271 char *filename; 1271 char *filename;
1272 int do_index; 1272 int do_index;
@@ -1317,7 +1317,7 @@ GNUNET_GTK_publish_directory_dialog_response_cb (GtkDialog * dialog,
1317 * Function called when the "open" (file) dialog was closed. 1317 * Function called when the "open" (file) dialog was closed.
1318 * 1318 *
1319 * @param dialog the open dialog 1319 * @param dialog the open dialog
1320 * @param response_id result of the dialog ("-5" means to "run") 1320 * @param response_id result of the dialog (GTK_RESPONSE_OK means to "run")
1321 * @param user_data master publishing dialog context of our window 1321 * @param user_data master publishing dialog context of our window
1322 */ 1322 */
1323void 1323void
@@ -1327,7 +1327,7 @@ GNUNET_GTK_publish_file_dialog_response_cb (GtkDialog * dialog,
1327{ 1327{
1328 struct MainPublishingDialogContext *ctx = user_data; 1328 struct MainPublishingDialogContext *ctx = user_data;
1329 1329
1330 if (response_id == -5 /* OK */) 1330 if (GTK_RESPONSE_OK == response_id)
1331 { 1331 {
1332 char *filename; 1332 char *filename;
1333 struct GNUNET_FS_BlockOptions bo; 1333 struct GNUNET_FS_BlockOptions bo;