diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2012-03-23 14:46:36 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2012-03-23 14:46:36 +0000 |
commit | d95400bc88165b4a66b690bbfd86ad3689ede917 (patch) | |
tree | 30c14faffa84cebefd078f759dd698e8ad61019a | |
parent | db42fcb6a149eeb1e0368386d379395b6151abab (diff) | |
download | gnunet-gtk-d95400bc88165b4a66b690bbfd86ad3689ede917.tar.gz gnunet-gtk-d95400bc88165b4a66b690bbfd86ad3689ede917.zip |
- changes for editing
-rw-r--r-- | src/gns/gnunet-gns-gtk_zone.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/gns/gnunet-gns-gtk_zone.c b/src/gns/gnunet-gns-gtk_zone.c index eb68f4a9..8cb1605c 100644 --- a/src/gns/gnunet-gns-gtk_zone.c +++ b/src/gns/gnunet-gns-gtk_zone.c | |||
@@ -199,10 +199,7 @@ check_name_validity_and_commit (struct GNUNET_GNS_Context *gns, gchar *path) | |||
199 | g_free (n_value_color); | 199 | g_free (n_value_color); |
200 | 200 | ||
201 | if (FALSE == gtk_tree_model_iter_next (gns->tm, &it)) | 201 | if (FALSE == gtk_tree_model_iter_next (gns->tm, &it)) |
202 | { | ||
203 | GNUNET_break (0); | ||
204 | break; | 202 | break; |
205 | } | ||
206 | } | 203 | } |
207 | 204 | ||
208 | if (GNUNET_NO == valid) | 205 | if (GNUNET_NO == valid) |
@@ -288,6 +285,7 @@ check_name_validity_and_remove (struct GNUNET_GNS_Context *gns, gchar *path) | |||
288 | 285 | ||
289 | if (TRUE == gtk_tree_model_iter_parent (gns->tm, &parent, &it)) | 286 | if (TRUE == gtk_tree_model_iter_parent (gns->tm, &parent, &it)) |
290 | { | 287 | { |
288 | /* Removing a single record */ | ||
291 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 289 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
292 | "Removing single record for name `%s'\n", name); | 290 | "Removing single record for name `%s'\n", name); |
293 | 291 | ||
@@ -337,14 +335,20 @@ check_name_validity_and_remove (struct GNUNET_GNS_Context *gns, gchar *path) | |||
337 | GNUNET_NAMESTORE_record_remove(gns->ns, gns->pkey, name, &rd, &check_name_validity_and_remove_proc, rcc); | 335 | GNUNET_NAMESTORE_record_remove(gns->ns, gns->pkey, name, &rd, &check_name_validity_and_remove_proc, rcc); |
338 | GNUNET_free ((void *) rd.data); | 336 | GNUNET_free ((void *) rd.data); |
339 | } | 337 | } |
338 | else | ||
339 | { | ||
340 | gtk_tree_model_get_iter_from_string(gns->tm, &it, path); | ||
341 | gtk_tree_store_remove (gns->ts, &it); | ||
342 | } | ||
340 | g_free (n_name); | 343 | g_free (n_name); |
341 | g_free (n_exp_color); | 344 | g_free (n_exp_color); |
342 | g_free (n_exp_str); | 345 | g_free (n_exp_str); |
343 | g_free (n_value); | 346 | g_free (n_value); |
344 | g_free (n_value_color); | 347 | g_free (n_value_color); |
345 | } | 348 | } |
346 | else | 349 | else if (0 != strcmp (name, "+")) |
347 | { | 350 | { |
351 | /* Removing the whole name record */ | ||
348 | rcc = GNUNET_malloc(sizeof (struct Remove_Context)); | 352 | rcc = GNUNET_malloc(sizeof (struct Remove_Context)); |
349 | rcc->gns = gns; | 353 | rcc->gns = gns; |
350 | rcc->path = strdup (path); | 354 | rcc->path = strdup (path); |