[evolution] Remove e_dialog_editable_set().
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Remove e_dialog_editable_set().
- Date: Sat, 24 Dec 2011 00:50:06 +0000 (UTC)
commit 9d4348036c46232d3cfc728724be8b1d80e1df78
Author: Matthew Barnes <mbarnes redhat com>
Date: Fri Dec 23 17:05:49 2011 -0500
Remove e_dialog_editable_set().
Silly function. Use gtk_entry_set_text().
calendar/gui/dialogs/alarm-dialog.c | 10 ++++++----
calendar/gui/dialogs/event-page.c | 21 +++++++++++++++------
calendar/gui/dialogs/memo-page.c | 14 ++++++++++----
calendar/gui/dialogs/task-details-page.c | 4 ++--
calendar/gui/dialogs/task-page.c | 14 ++++++++++----
doc/reference/shell/eshell-sections.txt | 1 -
e-util/e-dialog-widgets.c | 21 ---------------------
e-util/e-dialog-widgets.h | 1 -
8 files changed, 43 insertions(+), 43 deletions(-)
---
diff --git a/calendar/gui/dialogs/alarm-dialog.c b/calendar/gui/dialogs/alarm-dialog.c
index 1c76c79..b5aaed5 100644
--- a/calendar/gui/dialogs/alarm-dialog.c
+++ b/calendar/gui/dialogs/alarm-dialog.c
@@ -32,7 +32,6 @@
#include <gtk/gtk.h>
#include <glib/gi18n.h>
#include <libedataserver/e-time-utils.h>
-#include "e-util/e-dialog-widgets.h"
#include <libecal/e-cal-util.h>
#include <libecal/e-cal-time-util.h>
#include "e-util/e-util.h"
@@ -553,6 +552,7 @@ alarm_to_palarm_widgets (Dialog *dialog,
ECalComponentAlarm *alarm)
{
ECalComponentText description;
+ GtkEntry *entry;
const gchar *url;
icalattach *attach;
@@ -563,10 +563,12 @@ alarm_to_palarm_widgets (Dialog *dialog,
if (!(url && *url))
return;
- e_dialog_editable_set (dialog->palarm_program, url);
- e_cal_component_alarm_get_description (alarm, &description);
+ entry = GTK_ENTRY (dialog->palarm_program);
+ gtk_entry_set_text (entry, url);
- e_dialog_editable_set (dialog->palarm_args, description.value);
+ entry = GTK_ENTRY (dialog->palarm_args);
+ e_cal_component_alarm_get_description (alarm, &description);
+ gtk_entry_set_text (entry, description.value);
}
/* Fills the procedure alarm data with the values from the widgets */
diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c
index b418898..11524cd 100644
--- a/calendar/gui/dialogs/event-page.c
+++ b/calendar/gui/dialogs/event-page.c
@@ -325,8 +325,8 @@ clear_widgets (EventPage *epage)
editor = comp_editor_page_get_editor (COMP_EDITOR_PAGE (epage));
/* Summary, description */
- e_dialog_editable_set (priv->summary, NULL);
- e_dialog_editable_set (priv->location, NULL);
+ gtk_entry_set_text (GTK_ENTRY (priv->summary), "");
+ gtk_entry_set_text (GTK_ENTRY (priv->location), "");
gtk_text_buffer_set_text (gtk_text_view_get_buffer (GTK_TEXT_VIEW (priv->description)), "", 0);
e_buffer_tagger_update_tags (GTK_TEXT_VIEW (priv->description));
@@ -354,7 +354,7 @@ clear_widgets (EventPage *epage)
e_dialog_combo_box_set (priv->alarm_time_combo, ALARM_NONE, priv->alarm_map);
/* Categories */
- e_dialog_editable_set (priv->categories, NULL);
+ gtk_entry_set_text (GTK_ENTRY (priv->categories), "");
}
static gboolean
@@ -1127,11 +1127,17 @@ event_page_fill_widgets (CompEditorPage *page,
comp_editor_copy_new_attendees (priv->comp, comp);
e_cal_component_get_summary (comp, &text);
- e_dialog_editable_set (priv->summary, text.value);
+ if (text.value != NULL)
+ gtk_entry_set_text (GTK_ENTRY (priv->summary), text.value);
+ else
+ gtk_entry_set_text (GTK_ENTRY (priv->summary), "");
priv->old_summary = g_strdup (text.value);
e_cal_component_get_location (comp, &location);
- e_dialog_editable_set (priv->location, location);
+ if (location != NULL)
+ gtk_entry_set_text (GTK_ENTRY (priv->location), location);
+ else
+ gtk_entry_set_text (GTK_ENTRY (priv->location), "");
event_page_load_locations_list (page, comp);
e_cal_component_get_description_list (comp, &l);
@@ -1326,7 +1332,10 @@ event_page_fill_widgets (CompEditorPage *page,
/* Categories */
e_cal_component_get_categories (comp, &categories);
- e_dialog_editable_set (priv->categories, categories);
+ if (categories != NULL)
+ gtk_entry_set_text (GTK_ENTRY (priv->categories), categories);
+ else
+ gtk_entry_set_text (GTK_ENTRY (priv->categories), "");
/* Source */
e_source_combo_box_set_active (
diff --git a/calendar/gui/dialogs/memo-page.c b/calendar/gui/dialogs/memo-page.c
index cf1e879..3b783d3 100644
--- a/calendar/gui/dialogs/memo-page.c
+++ b/calendar/gui/dialogs/memo-page.c
@@ -167,7 +167,7 @@ clear_widgets (MemoPage *mpage)
CompEditor *editor;
/* Summary */
- e_dialog_editable_set (mpage->priv->summary_entry, NULL);
+ gtk_entry_set_text (GTK_ENTRY (mpage->priv->summary_entry), "");
/* Description */
view = GTK_TEXT_VIEW (mpage->priv->memo_content);
@@ -180,7 +180,7 @@ clear_widgets (MemoPage *mpage)
comp_editor_set_classification (editor, E_CAL_COMPONENT_CLASS_PRIVATE);
/* Categories */
- e_dialog_editable_set (mpage->priv->categories, NULL);
+ gtk_entry_set_text (GTK_ENTRY (mpage->priv->categories), "");
}
static void
@@ -279,7 +279,10 @@ memo_page_fill_widgets (CompEditorPage *page,
/* Summary */
e_cal_component_get_summary (comp, &text);
- e_dialog_editable_set (priv->summary_entry, text.value);
+ if (text.value != NULL)
+ gtk_entry_set_text (GTK_ENTRY (priv->summary_entry), text.value);
+ else
+ gtk_entry_set_text (GTK_ENTRY (priv->summary_entry), "");
e_cal_component_get_description_list (comp, &l);
if (l && l->data) {
@@ -312,7 +315,10 @@ memo_page_fill_widgets (CompEditorPage *page,
/* Categories */
e_cal_component_get_categories (comp, &categories);
- e_dialog_editable_set (priv->categories, categories);
+ if (categories != NULL)
+ gtk_entry_set_text (GTK_ENTRY (priv->categories), categories);
+ else
+ gtk_entry_set_text (GTK_ENTRY (priv->categories), "");
e_client_get_backend_property_sync (E_CLIENT (client), CAL_BACKEND_PROPERTY_CAL_EMAIL_ADDRESS, &backend_addr, NULL, NULL);
set_subscriber_info_string (mpage, backend_addr);
diff --git a/calendar/gui/dialogs/task-details-page.c b/calendar/gui/dialogs/task-details-page.c
index de30bac..71905ce 100644
--- a/calendar/gui/dialogs/task-details-page.c
+++ b/calendar/gui/dialogs/task-details-page.c
@@ -140,7 +140,7 @@ clear_widgets (TaskDetailsPage *tdpage)
e_date_edit_set_time (E_DATE_EDIT (priv->completed_date), -1);
/* URL */
- e_dialog_editable_set (priv->url, NULL);
+ gtk_entry_set_text (GTK_ENTRY (priv->url), "");
}
static void
@@ -297,7 +297,7 @@ task_details_page_fill_widgets (CompEditorPage *page,
/* URL */
e_cal_component_get_url (comp, &url);
- e_dialog_editable_set (priv->url, url);
+ gtk_entry_set_text (GTK_ENTRY (priv->url), url ? url : "");
sensitize_widgets (tdpage);
diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c
index a533505..493af6f 100644
--- a/calendar/gui/dialogs/task-page.c
+++ b/calendar/gui/dialogs/task-page.c
@@ -201,7 +201,7 @@ clear_widgets (TaskPage *tpage)
editor = comp_editor_page_get_editor (COMP_EDITOR_PAGE (tpage));
/* Summary, description */
- e_dialog_editable_set (priv->summary, NULL);
+ gtk_entry_set_text (GTK_ENTRY (priv->summary), "");
gtk_text_buffer_set_text (gtk_text_view_get_buffer (GTK_TEXT_VIEW (priv->description)), "", 0);
e_buffer_tagger_update_tags (GTK_TEXT_VIEW (priv->description));
@@ -213,7 +213,7 @@ clear_widgets (TaskPage *tpage)
comp_editor_set_classification (editor, E_CAL_COMPONENT_CLASS_PUBLIC);
/* Categories */
- e_dialog_editable_set (priv->categories, NULL);
+ gtk_entry_set_text (GTK_ENTRY (priv->categories), "");
}
static gboolean
@@ -521,7 +521,10 @@ task_page_fill_widgets (CompEditorPage *page,
/* Summary, description(s) */
e_cal_component_get_summary (comp, &text);
- e_dialog_editable_set (priv->summary, text.value);
+ if (text.value != NULL)
+ gtk_entry_set_text (GTK_ENTRY (priv->summary), text.value);
+ else
+ gtk_entry_set_text (GTK_ENTRY (priv->summary), "");
e_cal_component_get_description_list (comp, &l);
if (l && l->data) {
@@ -614,7 +617,10 @@ task_page_fill_widgets (CompEditorPage *page,
/* Categories */
e_cal_component_get_categories (comp, &categories);
- e_dialog_editable_set (priv->categories, categories);
+ if (categories != NULL)
+ gtk_entry_set_text (GTK_ENTRY (priv->categories), categories);
+ else
+ gtk_entry_set_text (GTK_ENTRY (priv->categories), "");
/* Source */
e_source_combo_box_set_active (
diff --git a/doc/reference/shell/eshell-sections.txt b/doc/reference/shell/eshell-sections.txt
index d54c7f9..137f497 100644
--- a/doc/reference/shell/eshell-sections.txt
+++ b/doc/reference/shell/eshell-sections.txt
@@ -841,7 +841,6 @@ e_datetime_format_format_tm
<FILE>e-dialog-utils</FILE>
<TITLE>Dialog Utilities (Legacy)</TITLE>
e_notice
-e_dialog_editable_set
e_dialog_editable_get
e_dialog_combo_box_set
e_dialog_combo_box_get
diff --git a/e-util/e-dialog-widgets.c b/e-util/e-dialog-widgets.c
index 12034f9..2b0c20d 100644
--- a/e-util/e-dialog-widgets.c
+++ b/e-util/e-dialog-widgets.c
@@ -70,27 +70,6 @@ index_to_value (const gint *value_map,
}
/**
- * e_dialog_editable_set:
- * @widget: A #GtkEditable widget.
- * @value: String value.
- *
- * Sets the string value inside a #GtkEditable-derived widget.
- **/
-void
-e_dialog_editable_set (GtkWidget *widget,
- const gchar *value)
-{
- gint pos = 0;
-
- g_return_if_fail (GTK_IS_EDITABLE (widget));
-
- gtk_editable_delete_text (GTK_EDITABLE (widget), 0, -1);
-
- if (value)
- gtk_editable_insert_text (GTK_EDITABLE (widget), value, strlen (value), &pos);
-}
-
-/**
* e_dialog_editable_get:
* @widget: A #GtkEditable widget.
*
diff --git a/e-util/e-dialog-widgets.h b/e-util/e-dialog-widgets.h
index 5b2585c..60c30e7 100644
--- a/e-util/e-dialog-widgets.h
+++ b/e-util/e-dialog-widgets.h
@@ -27,7 +27,6 @@
#include <gtk/gtk.h>
-void e_dialog_editable_set (GtkWidget *widget, const gchar *value);
gchar *e_dialog_editable_get (GtkWidget *widget);
void e_dialog_combo_box_set (GtkWidget *widget, gint value, const gint *value_map);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]