aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs/event-page.c
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@ximian.com>2001-12-06 23:27:42 +0800
committerRodrigo Moya <rodrigo@src.gnome.org>2001-12-06 23:27:42 +0800
commit2c6ca58b20fb1bc38131cd03802cb52cbe871800 (patch)
treeb4f930fbb790be3731eb883c4b4a7a7dcf032816 /calendar/gui/dialogs/event-page.c
parentb07d0414a2f8993c4b7a7a43dfcc26d678e90046 (diff)
downloadgsoc2013-evolution-2c6ca58b20fb1bc38131cd03802cb52cbe871800.tar.gz
gsoc2013-evolution-2c6ca58b20fb1bc38131cd03802cb52cbe871800.tar.zst
gsoc2013-evolution-2c6ca58b20fb1bc38131cd03802cb52cbe871800.zip
added entry for the LOCATION field
2001-12-05 Rodrigo Moya <rodrigo@ximian.com> * gui/dialogs/event-page.glade: added entry for the LOCATION field * gui/dialogs/event-page.c: added support for the new LOCATION entry added in the Event editor. svn path=/trunk/; revision=14901
Diffstat (limited to 'calendar/gui/dialogs/event-page.c')
-rw-r--r--calendar/gui/dialogs/event-page.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c
index ff4ec98e59..48533ea2e5 100644
--- a/calendar/gui/dialogs/event-page.c
+++ b/calendar/gui/dialogs/event-page.c
@@ -51,6 +51,7 @@ struct _EventPagePrivate {
GtkWidget *main;
GtkWidget *summary;
+ GtkWidget *location;
GtkWidget *start_time;
GtkWidget *end_time;
@@ -170,6 +171,7 @@ event_page_init (EventPage *epage)
priv->main = NULL;
priv->summary = NULL;
+ priv->location = NULL;
priv->start_time = NULL;
priv->end_time = NULL;
priv->start_timezone = NULL;
@@ -403,6 +405,7 @@ clear_widgets (EventPage *epage)
/* Summary, description */
e_dialog_editable_set (priv->summary, NULL);
+ e_dialog_editable_set (priv->location, NULL);
e_dialog_editable_set (priv->description, NULL);
/* Start and end times */
@@ -465,6 +468,7 @@ event_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
CalComponentClassification cl;
CalComponentTransparency transparency;
CalComponentDateTime start_date, end_date;
+ const char *location;
const char *categories;
GSList *l;
@@ -479,11 +483,14 @@ event_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
/* Clean the page */
clear_widgets (epage);
- /* Summary, description(s) */
+ /* Summary, location, description(s) */
cal_component_get_summary (comp, &text);
e_dialog_editable_set (priv->summary, text.value);
+ cal_component_get_location (comp, &location);
+ e_dialog_editable_set (priv->location, location);
+
cal_component_get_description_list (comp, &l);
if (l) {
text = *(CalComponentText *)l->data;
@@ -600,6 +607,17 @@ event_page_fill_component (CompEditorPage *page, CalComponent *comp)
if (str)
g_free (str);
+ /* Location */
+
+ str = e_dialog_editable_get (priv->location);
+ if (!str || strlen (str) == 0)
+ cal_component_set_location (comp, NULL);
+ else
+ cal_component_set_location (comp, str);
+
+ if (str)
+ g_free (str);
+
/* Description */
str = e_dialog_editable_get (priv->description);
@@ -747,6 +765,7 @@ get_widgets (EventPage *epage)
gtk_widget_unparent (priv->main);
priv->summary = GW ("general-summary");
+ priv->location = GW ("location");
priv->start_time = GW ("start-time");
priv->end_time = GW ("end-time");
@@ -772,6 +791,7 @@ get_widgets (EventPage *epage)
#undef GW
return (priv->summary
+ && priv->location
&& priv->start_time
&& priv->end_time
&& priv->start_timezone
@@ -1284,6 +1304,8 @@ init_widgets (EventPage *epage)
gtk_signal_connect (GTK_OBJECT (priv->summary), "changed",
GTK_SIGNAL_FUNC (field_changed_cb), epage);
+ gtk_signal_connect (GTK_OBJECT (priv->location), "changed",
+ GTK_SIGNAL_FUNC (field_changed_cb), epage);
gtk_signal_connect (GTK_OBJECT (priv->start_time), "changed",
GTK_SIGNAL_FUNC (field_changed_cb), epage);
gtk_signal_connect (GTK_OBJECT (priv->end_time), "changed",