[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r19950 - gnunet-gtk/src/fs
From: |
gnunet |
Subject: |
[GNUnet-SVN] r19950 - gnunet-gtk/src/fs |
Date: |
Wed, 22 Feb 2012 19:35:30 +0100 |
Author: grothoff
Date: 2012-02-22 19:35:30 +0100 (Wed, 22 Feb 2012)
New Revision: 19950
Modified:
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_publish-dialog.c
gnunet-gtk/src/fs/gnunet-fs-gtk_publish-edit-dialog.c
Log:
LRN: two directory patches change the way "is_directory" is evaluated.
Now it must be GNUNET_YES for the execution flow to switch to a branch
where something is considered to be a directory.
The reason for that is that some functions might return GNUNET_SYSERR
when asked whether something is a directory or not. Checking this
value as "!= GNUNET_NO" will produce positive result, even though it's
not a directory.
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-22 18:34:29 UTC
(rev 19949)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk_download-save-as.c 2012-02-22 18:35:30 UTC
(rev 19950)
@@ -201,7 +201,7 @@
set recursive 'default' value based on what the 'dc' tells us */
cb = GTK_WIDGET (gtk_builder_get_object
(dlc->builder,
"GNUNET_GTK_save_as_recursive_check_button"));
- if (GNUNET_NO != de->is_directory)
+ if (GNUNET_YES == de->is_directory)
gtk_widget_set_sensitive (cb, TRUE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (cb),
de->is_recursive);
Modified: gnunet-gtk/src/fs/gnunet-fs-gtk_event-handler.c
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk_event-handler.c 2012-02-22 18:34:29 UTC
(rev 19949)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk_event-handler.c 2012-02-22 18:35:30 UTC
(rev 19950)
@@ -2073,7 +2073,7 @@
else
{
/* full completion, look at the entire file */
- if ( (GNUNET_NO != de->is_directory) &&
+ if ( (GNUNET_YES == de->is_directory) &&
(filename != NULL) )
{
struct AddDirectoryEntryContext ade;
Modified: gnunet-gtk/src/fs/gnunet-fs-gtk_publish-dialog.c
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk_publish-dialog.c 2012-02-22 18:34:29 UTC
(rev 19949)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk_publish-dialog.c 2012-02-22 18:35:30 UTC
(rev 19950)
@@ -1023,7 +1023,7 @@
path = gtk_tree_model_get_path (GTK_TREE_MODEL (ts), item_iter);
row_reference = gtk_tree_row_reference_new (GTK_TREE_MODEL (ts), path);
gtk_tree_path_free (path);
- if (item->is_directory)
+ if (item->is_directory == GNUNET_YES)
{
/* update meta data mime type (force to be GNUnet-directory) */
if (NULL != item->meta)
@@ -1088,7 +1088,7 @@
{
add_item (adcc, ts, item, parent_iter, sibling_iter, &last_added);
sibling_iter = &last_added;
- if (item->is_directory)
+ if (item->is_directory == GNUNET_YES)
add_share_items_to_treestore (adcc,
item->children_head,
sibling_iter);
@@ -1145,7 +1145,7 @@
last_pulse = GNUNET_TIME_absolute_get ();
}
#if VERBOSE_PROGRESS
- if (is_directory)
+ if (is_directory == GNUNET_YES)
{
GNUNET_asprintf (&s, _("Scanning directory `%s'.\n"), filename);
insert_progress_dialog_text (adcc, s);
@@ -1154,7 +1154,7 @@
else
adcc->total++;
#else
- if (! is_directory)
+ if (is_directory != GNUNET_YES)
adcc->total++;
#endif
break;
Modified: gnunet-gtk/src/fs/gnunet-fs-gtk_publish-edit-dialog.c
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk_publish-edit-dialog.c 2012-02-22
18:34:29 UTC (rev 19949)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk_publish-edit-dialog.c 2012-02-22
18:35:30 UTC (rev 19950)
@@ -392,7 +392,7 @@
/* However, directories must end with '/', so add it */
if ( (new_text[strlen (new_text) - 1] != '/') &&
- ctx->is_directory )
+ ctx->is_directory == GNUNET_YES)
{
char * tmp;
@@ -1162,12 +1162,12 @@
/* indexing does not apply to directories */
gtk_widget_set_visible (GTK_WIDGET (ctx->index_checkbutton),
- ! ctx->is_directory);
+ ctx->is_directory != GNUNET_YES);
index_label = GTK_LABEL (gtk_builder_get_object
(ctx->builder,
"GNUNET_GTK_edit_publication_index_label"));
gtk_widget_set_visible (GTK_WIDGET (index_label),
- ! ctx->is_directory);
+ ctx->is_directory != GNUNET_YES);
/* show root label only for namespaces */
gtk_widget_set_visible (GTK_WIDGET (ctx->root_entry),
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r19950 - gnunet-gtk/src/fs,
gnunet <=