aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs/task-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/task-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/task-page.c')
-rw-r--r--calendar/gui/dialogs/task-page.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c
index 493af6f28c..2fe06d9658 100644
--- a/calendar/gui/dialogs/task-page.c
+++ b/calendar/gui/dialogs/task-page.c
@@ -763,8 +763,8 @@ task_page_fill_component (CompEditorPage *page,
/* Summary. */
- str = e_dialog_editable_get (priv->summary);
- if (!str || strlen (str) == 0)
+ str = gtk_editable_get_chars (GTK_EDITABLE (priv->summary), 0, -1);
+ if (str == NULL || *str == '\0')
e_cal_component_set_summary (comp, NULL);
else {
ECalComponentText text;
@@ -775,8 +775,7 @@ task_page_fill_component (CompEditorPage *page,
e_cal_component_set_summary (comp, &text);
}
- if (str)
- g_free (str);
+ g_free (str);
/* Description */
@@ -798,8 +797,7 @@ task_page_fill_component (CompEditorPage *page,
e_cal_component_set_description_list (comp, &l);
}
- if (str)
- g_free (str);
+ g_free (str);
/* Dates */
@@ -857,10 +855,9 @@ task_page_fill_component (CompEditorPage *page,
}
/* 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);
@@ -1521,19 +1518,18 @@ get_widgets (TaskPage *tpage)
}
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);
}
/* Callback used when the start or due date widgets change. We notify the