aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@helixcode.com>2000-08-08 10:55:29 +0800
committerFederico Mena Quintero <federico@src.gnome.org>2000-08-08 10:55:29 +0800
commitac94f697a5cf1842244984a4c1d2859118916aa2 (patch)
tree70e6b5561514073d26dd7232b8cf9d47e2d46f38 /calendar/gui/dialogs
parent573ea91f0c6dc6de73884bbf1a4b039975fcacda (diff)
downloadgsoc2013-evolution-ac94f697a5cf1842244984a4c1d2859118916aa2.tar
gsoc2013-evolution-ac94f697a5cf1842244984a4c1d2859118916aa2.tar.gz
gsoc2013-evolution-ac94f697a5cf1842244984a4c1d2859118916aa2.tar.bz2
gsoc2013-evolution-ac94f697a5cf1842244984a4c1d2859118916aa2.tar.lz
gsoc2013-evolution-ac94f697a5cf1842244984a4c1d2859118916aa2.tar.xz
gsoc2013-evolution-ac94f697a5cf1842244984a4c1d2859118916aa2.tar.zst
gsoc2013-evolution-ac94f697a5cf1842244984a4c1d2859118916aa2.zip
New function. (cal_component_get_icalcomponent): Ensure that the SEQUENCE
2000-08-07 Federico Mena Quintero <federico@helixcode.com> * cal-util/cal-component.c (cal_component_clone): New function. (cal_component_get_icalcomponent): Ensure that the SEQUENCE property does not need incrementing. * gui/dialogs/alarm-notify-dialog.c (alarm_notify_dialog): Use CalComponent. Deal with an empty summary property. svn path=/trunk/; revision=4589
Diffstat (limited to 'calendar/gui/dialogs')
-rw-r--r--calendar/gui/dialogs/alarm-notify-dialog.c23
-rw-r--r--calendar/gui/dialogs/alarm-notify-dialog.h4
-rw-r--r--calendar/gui/dialogs/task-editor.c7
3 files changed, 20 insertions, 14 deletions
diff --git a/calendar/gui/dialogs/alarm-notify-dialog.c b/calendar/gui/dialogs/alarm-notify-dialog.c
index 931ab0bfac..7d8357599c 100644
--- a/calendar/gui/dialogs/alarm-notify-dialog.c
+++ b/calendar/gui/dialogs/alarm-notify-dialog.c
@@ -20,10 +20,7 @@
*/
#include <config.h>
-#include <gtk/gtklabel.h>
-#include <gtk/gtksignal.h>
-#include <gtk/gtkspinbutton.h>
-#include <gtk/gtkwindow.h>
+#include <gnome.h>
#include <glade/glade.h>
#include "alarm-notify-dialog.h"
@@ -119,8 +116,11 @@ edit_clicked_cb (GtkWidget *widget, gpointer data)
/**
* alarm_notify_dialog:
+ * @trigger: Trigger time for the alarm.
+ * @occur: Occurrence time for the event.
+ * @comp: Calendar component object which corresponds to the alarm.
* @func: Function to be called when a dialog action is invoked.
- * @data: Closure data for @func.
+ * @func_data: Closure data for @func.
*
* Runs the alarm notification dialog. The specified @func will be used to
* notify the client about result of the actions in the dialog.
@@ -128,17 +128,19 @@ edit_clicked_cb (GtkWidget *widget, gpointer data)
* Return value: TRUE on success, FALSE if the dialog could not be created.
**/
gboolean
-alarm_notify_dialog (time_t trigger, time_t occur, iCalObject *ico,
+alarm_notify_dialog (time_t trigger, time_t occur, CalComponent *comp,
AlarmNotifyFunc func, gpointer func_data)
{
AlarmNotify *an;
char buf[256];
struct tm tm_trigger;
struct tm tm_occur;
+ CalComponentText summary;
g_return_val_if_fail (trigger != -1, FALSE);
g_return_val_if_fail (occur != -1, FALSE);
- g_return_val_if_fail (ico != NULL, FALSE);
+ g_return_val_if_fail (comp != NULL, FALSE);
+ g_return_val_if_fail (IS_CAL_COMPONENT (comp), FALSE);
g_return_val_if_fail (func != NULL, FALSE);
an = g_new0 (AlarmNotify, 1);
@@ -191,7 +193,12 @@ alarm_notify_dialog (time_t trigger, time_t occur, iCalObject *ico,
/* Summary */
- gtk_label_set_text (GTK_LABEL (an->summary), ico->summary);
+ cal_component_get_summary (comp, &summary);
+
+ if (summary.value)
+ gtk_label_set_text (GTK_LABEL (an->summary), summary.value);
+ else
+ gtk_label_set_text (GTK_LABEL (an->summary), _("No summary available."));
/* Connect actions */
diff --git a/calendar/gui/dialogs/alarm-notify-dialog.h b/calendar/gui/dialogs/alarm-notify-dialog.h
index 770768f59c..1e56f1c586 100644
--- a/calendar/gui/dialogs/alarm-notify-dialog.h
+++ b/calendar/gui/dialogs/alarm-notify-dialog.h
@@ -24,7 +24,7 @@
#include <time.h>
#include <glib.h>
-#include <cal-util/calobj.h>
+#include <cal-util/cal-component.h>
@@ -36,7 +36,7 @@ typedef enum {
typedef void (* AlarmNotifyFunc) (AlarmNotifyResult result, int snooze_mins, gpointer data);
-gboolean alarm_notify_dialog (time_t trigger, time_t occur, iCalObject *ico,
+gboolean alarm_notify_dialog (time_t trigger, time_t occur, CalComponent *comp,
AlarmNotifyFunc func, gpointer func_data);
diff --git a/calendar/gui/dialogs/task-editor.c b/calendar/gui/dialogs/task-editor.c
index 51495d8145..dd40c1b9df 100644
--- a/calendar/gui/dialogs/task-editor.c
+++ b/calendar/gui/dialogs/task-editor.c
@@ -42,15 +42,14 @@ typedef struct {
/* UI handler */
BonoboUIHandler *uih;
- /* Calendar object we are editing; this is an internal copy and is not
- * one of the read-only objects from the parent calendar.
+ /* Calendar component we are editing; this is an internal copy and is
+ * not one of the read-only objects from the parent calendar.
*/
- iCalObject *ico;
+ CalComponent *comp;
/* Widgets from the Glade file */
GtkWidget *app;
-
} TaskEditorPrivate;