aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArturo Espinosa <unammx@src.gnome.org>1998-04-18 12:40:59 +0800
committerArturo Espinosa <unammx@src.gnome.org>1998-04-18 12:40:59 +0800
commit6329a627a9e719838427d02e9d4480bf3c6cd76a (patch)
tree13d037a620db415b28ca6f71c8811e8b359ef175
parentd4f4dc26fcc04d8020812444763a38049a04beff (diff)
downloadgsoc2013-evolution-6329a627a9e719838427d02e9d4480bf3c6cd76a.tar
gsoc2013-evolution-6329a627a9e719838427d02e9d4480bf3c6cd76a.tar.gz
gsoc2013-evolution-6329a627a9e719838427d02e9d4480bf3c6cd76a.tar.bz2
gsoc2013-evolution-6329a627a9e719838427d02e9d4480bf3c6cd76a.tar.lz
gsoc2013-evolution-6329a627a9e719838427d02e9d4480bf3c6cd76a.tar.xz
gsoc2013-evolution-6329a627a9e719838427d02e9d4480bf3c6cd76a.tar.zst
gsoc2013-evolution-6329a627a9e719838427d02e9d4480bf3c6cd76a.zip
Final steps.
svn path=/trunk/; revision=157
-rw-r--r--calendar/cal-util/calobj.c3
-rw-r--r--calendar/calobj.c3
-rw-r--r--calendar/gui/main.c12
-rw-r--r--calendar/main.c12
-rw-r--r--calendar/pcs/calobj.c3
5 files changed, 27 insertions, 6 deletions
diff --git a/calendar/cal-util/calobj.c b/calendar/cal-util/calobj.c
index 624a179b05..4624b3a485 100644
--- a/calendar/cal-util/calobj.c
+++ b/calendar/cal-util/calobj.c
@@ -771,8 +771,7 @@ ical_object_to_vobject (iCalObject *ical)
store_list (o, VCExpDateProp, ical->exdate, ',');
/* description/comment */
- if (ical->comment)
- addPropValue (o, VCDescriptionProp, ical->comment);
+ addPropValue (o, VCDescriptionProp, ical->comment ? ical->comment : "No Comment");
/* summary */
if (ical->summary)
diff --git a/calendar/calobj.c b/calendar/calobj.c
index 624a179b05..4624b3a485 100644
--- a/calendar/calobj.c
+++ b/calendar/calobj.c
@@ -771,8 +771,7 @@ ical_object_to_vobject (iCalObject *ical)
store_list (o, VCExpDateProp, ical->exdate, ',');
/* description/comment */
- if (ical->comment)
- addPropValue (o, VCDescriptionProp, ical->comment);
+ addPropValue (o, VCDescriptionProp, ical->comment ? ical->comment : "No Comment");
/* summary */
if (ical->summary)
diff --git a/calendar/gui/main.c b/calendar/gui/main.c
index e4dfdf77b9..a3b9ce2bcc 100644
--- a/calendar/gui/main.c
+++ b/calendar/gui/main.c
@@ -309,6 +309,13 @@ setup_menu (GtkWidget *gcal)
gnome_app_create_toolbar_with_data (GNOME_APP (gcal), gnome_toolbar, gcal);
}
+static gint
+calendar_close_event (GtkWidget *widget, GdkEvent *event, GnomeCalendar *gcal)
+{
+ close_cmd (widget, gcal);
+ return TRUE;
+}
+
static void
new_calendar (char *full_name, char *calendar_file)
{
@@ -324,7 +331,12 @@ new_calendar (char *full_name, char *calendar_file)
if (calendar_file && g_file_exists (calendar_file)) {
printf ("Trying to load %s\n", calendar_file);
gnome_calendar_load (GNOME_CALENDAR (toplevel), calendar_file);
+ } else {
+ GNOME_CALENDAR (toplevel)->cal->filename = g_strdup (calendar_file);
}
+ gtk_signal_connect (GTK_OBJECT (toplevel), "delete_event",
+ GTK_SIGNAL_FUNC(calendar_close_event), toplevel);
+
active_calendars++;
all_calendars = g_list_prepend (all_calendars, toplevel);
gtk_widget_show (toplevel);
diff --git a/calendar/main.c b/calendar/main.c
index e4dfdf77b9..a3b9ce2bcc 100644
--- a/calendar/main.c
+++ b/calendar/main.c
@@ -309,6 +309,13 @@ setup_menu (GtkWidget *gcal)
gnome_app_create_toolbar_with_data (GNOME_APP (gcal), gnome_toolbar, gcal);
}
+static gint
+calendar_close_event (GtkWidget *widget, GdkEvent *event, GnomeCalendar *gcal)
+{
+ close_cmd (widget, gcal);
+ return TRUE;
+}
+
static void
new_calendar (char *full_name, char *calendar_file)
{
@@ -324,7 +331,12 @@ new_calendar (char *full_name, char *calendar_file)
if (calendar_file && g_file_exists (calendar_file)) {
printf ("Trying to load %s\n", calendar_file);
gnome_calendar_load (GNOME_CALENDAR (toplevel), calendar_file);
+ } else {
+ GNOME_CALENDAR (toplevel)->cal->filename = g_strdup (calendar_file);
}
+ gtk_signal_connect (GTK_OBJECT (toplevel), "delete_event",
+ GTK_SIGNAL_FUNC(calendar_close_event), toplevel);
+
active_calendars++;
all_calendars = g_list_prepend (all_calendars, toplevel);
gtk_widget_show (toplevel);
diff --git a/calendar/pcs/calobj.c b/calendar/pcs/calobj.c
index 624a179b05..4624b3a485 100644
--- a/calendar/pcs/calobj.c
+++ b/calendar/pcs/calobj.c
@@ -771,8 +771,7 @@ ical_object_to_vobject (iCalObject *ical)
store_list (o, VCExpDateProp, ical->exdate, ',');
/* description/comment */
- if (ical->comment)
- addPropValue (o, VCDescriptionProp, ical->comment);
+ addPropValue (o, VCDescriptionProp, ical->comment ? ical->comment : "No Comment");
/* summary */
if (ical->summary)