aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs/memo-page.c
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui/dialogs/memo-page.c')
-rw-r--r--calendar/gui/dialogs/memo-page.c30
1 files changed, 12 insertions, 18 deletions
diff --git a/calendar/gui/dialogs/memo-page.c b/calendar/gui/dialogs/memo-page.c
index 3b783d343f..4ef58eace7 100644
--- a/calendar/gui/dialogs/memo-page.c
+++ b/calendar/gui/dialogs/memo-page.c
@@ -652,8 +652,8 @@ memo_page_fill_component (CompEditorPage *page,
text_buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (priv->memo_content));
/* Summary */
- str = e_dialog_editable_get (priv->summary_entry);
- if (!str || strlen (str) == 0)
+ str = gtk_editable_get_chars (GTK_EDITABLE (priv->summary_entry), 0, -1);
+ if (str == NULL || *str == '\0')
e_cal_component_set_summary (comp, NULL);
else {
ECalComponentText text;
@@ -664,10 +664,8 @@ memo_page_fill_component (CompEditorPage *page,
e_cal_component_set_summary (comp, &text);
}
- if (str) {
- g_free (str);
- str = NULL;
- }
+ g_free (str);
+ str = NULL;
/* Memo Content */
@@ -701,8 +699,7 @@ memo_page_fill_component (CompEditorPage *page,
e_cal_component_set_description_list (comp, &l);
}
- if (str)
- g_free (str);
+ g_free (str);
/* Dates */
start_tt = icaltime_null_time ();
@@ -727,15 +724,13 @@ memo_page_fill_component (CompEditorPage *page,
e_cal_component_set_classification (comp, classification);
/* Categories */
- cat = e_dialog_editable_get (priv->categories);
+ cat = gtk_editable_get_chars (GTK_EDITABLE (priv->categories), 0, -1);
str = comp_editor_strip_categories (cat);
- if (cat)
- g_free (cat);
+ g_free (cat);
e_cal_component_set_categories (comp, str);
- if (str)
- g_free (str);
+ g_free (str);
/* change recipients only when creating new item, after that no such action is available */
if ((flags & COMP_EDITOR_IS_SHARED) && (flags & COMP_EDITOR_NEW_ITEM) && fill_comp_with_recipients (priv->name_selector, comp)) {
@@ -1026,19 +1021,18 @@ set_subscriber_info_string (MemoPage *mpage,
}
static void
-summary_changed_cb (GtkEditable *editable,
+summary_changed_cb (GtkEntry *entry,
CompEditorPage *page)
{
CompEditor *editor;
- gchar *summary;
+ const gchar *text;
if (comp_editor_page_get_updating (page))
return;
editor = comp_editor_page_get_editor (page);
- summary = e_dialog_editable_get (GTK_WIDGET (editable));
- comp_editor_set_summary (editor, summary);
- g_free (summary);
+ text = gtk_entry_get_text (entry);
+ comp_editor_set_summary (editor, text);
}
static void