summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/anastasis/anastasis-gtk_action.c21
-rw-r--r--src/anastasis/anastasis-gtk_handle-core-secret-changed.c12
2 files changed, 26 insertions, 7 deletions
diff --git a/src/anastasis/anastasis-gtk_action.c b/src/anastasis/anastasis-gtk_action.c
index 8581808..07b387e 100644
--- a/src/anastasis/anastasis-gtk_action.c
+++ b/src/anastasis/anastasis-gtk_action.c
@@ -1293,11 +1293,20 @@ action_secret_editing (void)
text = NULL;
if (! AG_in_secret_editing)
{
- GtkTextBuffer *tb = GCG_get_main_window_object (
- "anastasis_gtk_enter_secret_textbuffer");
+ GtkTextBuffer *tb = GTK_TEXT_BUFFER (GCG_get_main_window_object (
+ "anastasis_gtk_enter_secret_textbuffer"));
const char *old;
-
- old = gtk_entry_get_text (tb);
+ GtkTextIter start;
+ GtkTextIter end;
+
+ gtk_text_buffer_get_start_iter (tb,
+ &start);
+ gtk_text_buffer_get_end_iter (tb,
+ &end);
+ old = gtk_text_buffer_get_text (tb,
+ &start,
+ &end,
+ true);
if (0 != strcmp (old,
text))
gtk_text_buffer_set_text (tb,
@@ -1328,8 +1337,8 @@ action_secret_editing (void)
else
{
/* secret is NULL */
- GtkTextBuffer *tb = GCG_get_main_window_object (
- "anastasis_gtk_enter_secret_textbuffer");
+ GtkTextBuffer *tb = GTK_TEXT_BUFFER (GCG_get_main_window_object (
+ "anastasis_gtk_enter_secret_textbuffer"));
gtk_text_buffer_set_text (tb,
"",
diff --git a/src/anastasis/anastasis-gtk_handle-core-secret-changed.c b/src/anastasis/anastasis-gtk_handle-core-secret-changed.c
index c0ca4c1..5498077 100644
--- a/src/anastasis/anastasis-gtk_handle-core-secret-changed.c
+++ b/src/anastasis/anastasis-gtk_handle-core-secret-changed.c
@@ -36,10 +36,20 @@ void
anastasis_gtk_enter_secret_textbuffer_changed_cb (GtkTextBuffer *tb,
gpointer user_data)
{
- const char *text = gtk_text_buffer_get_text (tb);
json_t *arguments;
struct GNUNET_TIME_Absolute expiration;
+ GtkTextIter start;
+ GtkTextIter end;
+ const char *text;
+ gtk_text_buffer_get_start_iter (tb,
+ &start);
+ gtk_text_buffer_get_end_iter (tb,
+ &end);
+ text = gtk_text_buffer_get_text (tb,
+ &start,
+ &end,
+ true);
if (AG_in_action)
return;
AG_in_secret_editing = true;