[gnome-control-center/gnome-3-10] sharing: Add more debug for duplicate folders
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/gnome-3-10] sharing: Add more debug for duplicate folders
- Date: Thu, 14 Nov 2013 23:02:00 +0000 (UTC)
commit db7f29b67579e02a7c8c49c135da994f409928b1
Author: Bastien Nocera <hadess hadess net>
Date: Thu Nov 14 09:16:34 2013 +0100
sharing: Add more debug for duplicate folders
panels/sharing/cc-sharing-panel.c | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/panels/sharing/cc-sharing-panel.c b/panels/sharing/cc-sharing-panel.c
index a246654..a5d4235 100644
--- a/panels/sharing/cc-sharing-panel.c
+++ b/panels/sharing/cc-sharing-panel.c
@@ -433,6 +433,10 @@ cc_sharing_panel_add_folder (GtkWidget *button,
"shared-folders-liststore");
folder = gtk_file_chooser_get_current_folder (GTK_FILE_CHOOSER (dialog));
+ if (!folder || g_str_equal (folder, ""))
+ goto bail;
+
+ g_debug ("Trying to add %s", folder);
for (valid = gtk_tree_model_get_iter_first (GTK_TREE_MODEL (store), &iter);
valid;
@@ -445,14 +449,17 @@ cc_sharing_panel_add_folder (GtkWidget *button,
g_free (string);
if (matching)
- break;
+ {
+ g_debug ("Found a duplicate for %s", folder);
+ break;
+ }
}
- if (!matching && folder && !g_str_equal (folder, ""))
+ if (!matching)
gtk_list_store_insert_with_values (store, NULL, -1, 0, folder, -1);
+bail:
g_free (folder);
-
gtk_widget_destroy (dialog);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]