aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs/memo-page.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-12-24 06:57:26 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-12-24 08:49:53 +0800
commit6feca1bf560b3269555d4f0a890cd192fdaa0f00 (patch)
treedd77b59b48d803fc095b9ea86dc02dbbd152e0db /calendar/gui/dialogs/memo-page.c
parent9d4348036c46232d3cfc728724be8b1d80e1df78 (diff)
downloadgsoc2013-evolution-6feca1bf560b3269555d4f0a890cd192fdaa0f00.tar
gsoc2013-evolution-6feca1bf560b3269555d4f0a890cd192fdaa0f00.tar.gz
gsoc2013-evolution-6feca1bf560b3269555d4f0a890cd192fdaa0f00.tar.bz2
gsoc2013-evolution-6feca1bf560b3269555d4f0a890cd192fdaa0f00.tar.lz
gsoc2013-evolution-6feca1bf560b3269555d4f0a890cd192fdaa0f00.tar.xz
gsoc2013-evolution-6feca1bf560b3269555d4f0a890cd192fdaa0f00.tar.zst
gsoc2013-evolution-6feca1bf560b3269555d4f0a890cd192fdaa0f00.zip
Remove e_dialog_editable_get().
Silly function. Use gtk_entry_get_text() for a const string or else gtk_editable_get_chars() for an allocated string.
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