aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@ximian.com>2001-08-22 06:08:39 +0800
committerFederico Mena Quintero <federico@src.gnome.org>2001-08-22 06:08:39 +0800
commitfd6f190235e88616f077cc2b7da1bab36e8351e4 (patch)
treeb69aff359a19b06dc61c237bc29ec3e9563a4993 /calendar/gui/dialogs
parent5b61b3522f3393306c7eea4223facb6454ff1880 (diff)
downloadgsoc2013-evolution-fd6f190235e88616f077cc2b7da1bab36e8351e4.tar
gsoc2013-evolution-fd6f190235e88616f077cc2b7da1bab36e8351e4.tar.gz
gsoc2013-evolution-fd6f190235e88616f077cc2b7da1bab36e8351e4.tar.bz2
gsoc2013-evolution-fd6f190235e88616f077cc2b7da1bab36e8351e4.tar.lz
gsoc2013-evolution-fd6f190235e88616f077cc2b7da1bab36e8351e4.tar.xz
gsoc2013-evolution-fd6f190235e88616f077cc2b7da1bab36e8351e4.tar.zst
gsoc2013-evolution-fd6f190235e88616f077cc2b7da1bab36e8351e4.zip
Handle the case where there is no attachment. Fixes bug #7257.
2001-08-21 Federico Mena Quintero <federico@ximian.com> * gui/dialogs/alarm-options.c (alarm_to_palarm_widgets): Handle the case where there is no attachment. Fixes bug #7257. svn path=/trunk/; revision=12368
Diffstat (limited to 'calendar/gui/dialogs')
-rw-r--r--calendar/gui/dialogs/alarm-options.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/calendar/gui/dialogs/alarm-options.c b/calendar/gui/dialogs/alarm-options.c
index f94d146377..c1d152c341 100644
--- a/calendar/gui/dialogs/alarm-options.c
+++ b/calendar/gui/dialogs/alarm-options.c
@@ -255,17 +255,20 @@ alarm_to_palarm_widgets (Dialog *dialog, CalComponentAlarm *alarm)
{
struct icalattachtype *attach;
CalComponentText description;
- char *url;
cal_component_alarm_get_attach (alarm, &attach);
cal_component_alarm_get_description (alarm, &description);
- url = icalattachtype_get_url (attach);
+ if (attach) {
+ char *url;
- e_dialog_editable_set (dialog->palarm_program, url);
- e_dialog_editable_set (dialog->palarm_args, description.value);
+ url = icalattachtype_get_url (attach);
+ e_dialog_editable_set (dialog->palarm_program, url);
- icalattachtype_free (attach);
+ icalattachtype_free (attach);
+ }
+
+ e_dialog_editable_set (dialog->palarm_args, description.value);
}
enum duration_units {
@@ -541,6 +544,14 @@ dialog_to_alarm (Dialog *dialog, CalComponentAlarm *alarm)
+/**
+ * alarm_options_dialog_run:
+ * @alarm: Alarm that is to be edited.
+ *
+ * Runs an alarm options dialog modally.
+ *
+ * Return value: TRUE if the dialog could be created, FALSE otherwise.
+ **/
gboolean
alarm_options_dialog_run (CalComponentAlarm *alarm)
{