[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r28655 - gnunet-gtk/src/setup
From: |
gnunet |
Subject: |
[GNUnet-SVN] r28655 - gnunet-gtk/src/setup |
Date: |
Thu, 15 Aug 2013 14:34:27 +0200 |
Author: grothoff
Date: 2013-08-15 14:34:26 +0200 (Thu, 15 Aug 2013)
New Revision: 28655
Modified:
gnunet-gtk/src/setup/gnunet-setup-gns.c
Log:
-fix funky PSEU editing issue
Modified: gnunet-gtk/src/setup/gnunet-setup-gns.c
===================================================================
--- gnunet-gtk/src/setup/gnunet-setup-gns.c 2013-08-15 12:17:29 UTC (rev
28654)
+++ gnunet-gtk/src/setup/gnunet-setup-gns.c 2013-08-15 12:34:26 UTC (rev
28655)
@@ -836,7 +836,6 @@
}
-
/**
* The edit dialog completed; update the namestore and the
* view based on the new values in 'edc'.
@@ -1213,28 +1212,21 @@
*
* @param renderer updated renderer
* @param path the path identifying the edited cell
- * @param new_iter selected cell in the combo's model (with the record type)
+ * @param new_text updated text
* @param user_data unused
*/
void
-GNUNET_setup_gns_type_cellrenderercombo_changed_cb (GtkCellRendererCombo
*combo,
- gchar *path_string,
- GtkTreeIter *new_iter,
- gpointer user_data)
+GNUNET_setup_gns_type_cellrenderercombo_edited_cb (GtkCellRendererText *text,
+ gchar *path_string,
+ gchar *new_text,
+ gpointer user_data)
{
- GtkListStore *ls;
- gchar *new_text;
GtkTreeIter it;
guint type;
char *name_str;
struct GNUNET_HashCode name_hash;
struct RecordInfo *ri;
- ls = GTK_LIST_STORE (GNUNET_SETUP_get_object
("GNUNET_setup_gns_type_liststore"));
- gtk_tree_model_get (GTK_TREE_MODEL (ls), new_iter,
- 1, &new_text,
- -1);
-
if (0 == strcmp (new_text, _(NEW_RECORD_STR)))
{
GNUNET_break (0);
@@ -1585,17 +1577,31 @@
struct OperationContext *oc;
pseu = gtk_entry_get_text (GTK_ENTRY (editable));
+ if ( (NULL != current_pseudonym) &&
+ (0 == strcmp (pseu,
+ current_pseudonym)) )
+ return;
if (GNUNET_OK !=
GNUNET_DNSPARSER_check_label (pseu))
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- _("Name `%s' invalid for GADS/DNS (too long for a DNS
label?)\n"),
+ _("Name `%s' invalid for GNS (too long for a DNS label?)\n"),
pseu);
gdk_beep ();
gtk_entry_set_text (GTK_ENTRY (editable),
- pseu);
+ current_pseudonym);
return;
}
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "New Pseudonym is `%s' %u\n",
+ pseu);
+ GNUNET_free_non_null (current_pseudonym);
+ if ( (NULL != pseu) &&
+ (0 != strlen (pseu)) )
+ current_pseudonym = GNUNET_strdup (pseu);
+ else
+ current_pseudonym = NULL;
+
GNUNET_CRYPTO_hash ("+", 1, &hc);
ri = GNUNET_CONTAINER_multihashmap_get (n2r, &hc);
if (NULL == ri)
@@ -1642,15 +1648,6 @@
total,
rd_new,
&operation_done_cont, oc);
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "New Pseudonym is `%s' %u\n",
- (char *) pseu, rd_new[off].data_size);
- GNUNET_free_non_null (current_pseudonym);
- if ( (NULL != pseu) &&
- (0 != strlen (pseu)) )
- current_pseudonym = GNUNET_strdup (pseu);
- else
- current_pseudonym = NULL;
}
#if HAVE_QRENCODE_H
setup_qrcode ();
@@ -1874,7 +1871,8 @@
GNUNET_asprintf (&type_str, "%s", EXPIRE_INVALID_STRING);
if ( (0 == strcmp (name, GNUNET_GNS_MASTERZONE_STR)) &&
- (GNUNET_NAMESTORE_TYPE_PSEU == rd[c].record_type) )
+ (GNUNET_NAMESTORE_TYPE_PSEU == rd[c].record_type) &&
+ (NULL == current_pseudonym) )
{
pseu_entry = GTK_ENTRY((GNUNET_SETUP_get_object
("GNUNET_setup_gns_pseu_entry")));
gtk_entry_set_text (pseu_entry, val);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r28655 - gnunet-gtk/src/setup,
gnunet <=