diff options
Diffstat (limited to 'src/plugins/fs/collection.c')
-rw-r--r-- | src/plugins/fs/collection.c | 33 |
1 files changed, 24 insertions, 9 deletions
diff --git a/src/plugins/fs/collection.c b/src/plugins/fs/collection.c index 9aef61c6..de195001 100644 --- a/src/plugins/fs/collection.c +++ b/src/plugins/fs/collection.c | |||
@@ -97,12 +97,17 @@ createCollection_clicked_fs (GtkWidget * dummy1, GtkWidget * dummy2) | |||
97 | nameLine = glade_xml_get_widget (metaXML, "collectionIdentifierEntry"); | 97 | nameLine = glade_xml_get_widget (metaXML, "collectionIdentifierEntry"); |
98 | collectionName = gtk_entry_get_text (GTK_ENTRY (nameLine)); | 98 | collectionName = gtk_entry_get_text (GTK_ENTRY (nameLine)); |
99 | root = NULL; | 99 | root = NULL; |
100 | if (GNUNET_OK == GNUNET_CO_collection_start (gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (spin)), 1000, /* priority */ | 100 | if (GNUNET_OK == GNUNET_CO_collection_start (gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (spin)), 1000, /* priority */ |
101 | updateInterval, collectionName, meta)) | 101 | updateInterval, |
102 | collectionName, meta)) | ||
102 | { | 103 | { |
103 | w = glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), "createCollection"); | 104 | w = |
105 | glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), | ||
106 | "createCollection"); | ||
104 | gtk_widget_set_sensitive (w, FALSE); | 107 | gtk_widget_set_sensitive (w, FALSE); |
105 | w = glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), "deleteCollection"); | 108 | w = |
109 | glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), | ||
110 | "deleteCollection"); | ||
106 | gtk_widget_set_sensitive (w, TRUE); | 111 | gtk_widget_set_sensitive (w, TRUE); |
107 | } | 112 | } |
108 | else | 113 | else |
@@ -133,15 +138,21 @@ deleteCollection_clicked_fs (GtkWidget * dummy1, GtkWidget * dummy2) | |||
133 | 138 | ||
134 | if (GNUNET_OK == GNUNET_CO_collection_stop ()) | 139 | if (GNUNET_OK == GNUNET_CO_collection_stop ()) |
135 | { | 140 | { |
136 | w = glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), "createCollection"); | 141 | w = |
142 | glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), | ||
143 | "createCollection"); | ||
137 | gtk_widget_set_sensitive (w, TRUE); | 144 | gtk_widget_set_sensitive (w, TRUE); |
138 | w = glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), "deleteCollection"); | 145 | w = |
146 | glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), | ||
147 | "deleteCollection"); | ||
139 | gtk_widget_set_sensitive (w, FALSE); | 148 | gtk_widget_set_sensitive (w, FALSE); |
140 | GNUNET_GTK_show_info_message (GNUNET_NO, _("Collection stopped.\n")); | 149 | GNUNET_GTK_show_info_message (GNUNET_NO, _("Collection stopped.\n")); |
141 | } | 150 | } |
142 | else | 151 | else |
143 | { | 152 | { |
144 | GNUNET_GTK_show_info_message (GNUNET_YES, _("Failed to stop collection (consult logs).\n")); | 153 | GNUNET_GTK_show_info_message (GNUNET_YES, |
154 | _ | ||
155 | ("Failed to stop collection (consult logs).\n")); | ||
145 | } | 156 | } |
146 | } | 157 | } |
147 | 158 | ||
@@ -154,11 +165,15 @@ fs_collection_start () | |||
154 | h = GNUNET_CO_collection_get_name (); | 165 | h = GNUNET_CO_collection_get_name (); |
155 | if (NULL != h) | 166 | if (NULL != h) |
156 | { | 167 | { |
157 | w = glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), "createCollection"); | 168 | w = |
169 | glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), | ||
170 | "createCollection"); | ||
158 | GNUNET_free (h); | 171 | GNUNET_free (h); |
159 | } | 172 | } |
160 | else | 173 | else |
161 | w = glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), "deleteCollection"); | 174 | w = |
175 | glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), | ||
176 | "deleteCollection"); | ||
162 | gtk_widget_set_sensitive (w, FALSE); | 177 | gtk_widget_set_sensitive (w, FALSE); |
163 | } | 178 | } |
164 | 179 | ||