aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorJP Rosevear <jpr@helixcode.com>2000-08-25 01:37:29 +0800
committerJP Rosevear <jpr@src.gnome.org>2000-08-25 01:37:29 +0800
commit152d68ee68e875f9290742380dc1433ca18e8d91 (patch)
treec34b25bb46cae19882e5cac4cf44887a34e5ca89 /calendar
parent0b9b384a2bbd6257dae54ed1b5ee08f100fa32aa (diff)
downloadgsoc2013-evolution-152d68ee68e875f9290742380dc1433ca18e8d91.tar
gsoc2013-evolution-152d68ee68e875f9290742380dc1433ca18e8d91.tar.gz
gsoc2013-evolution-152d68ee68e875f9290742380dc1433ca18e8d91.tar.bz2
gsoc2013-evolution-152d68ee68e875f9290742380dc1433ca18e8d91.tar.lz
gsoc2013-evolution-152d68ee68e875f9290742380dc1433ca18e8d91.tar.xz
gsoc2013-evolution-152d68ee68e875f9290742380dc1433ca18e8d91.tar.zst
gsoc2013-evolution-152d68ee68e875f9290742380dc1433ca18e8d91.zip
Make signal names saner (released_event_object_cb): ditto
2000-08-24 JP Rosevear <jpr@helixcode.com> * gui/gnome-cal.c (save_event_object_cb): Make signal names saner (released_event_object_cb): ditto (gnome_calendar_edit_object): ditto * gui/event-editor.h: Make signal names saner * gui/event-editor.c (event_editor_class_init): Make signal names saner now that we don't use ical object (save_event_object): ditto with callback names (file_save_cb): ditto (tb_save_and_close_cb): ditto (event_editor_set_ical_object): ditto * gui/e-day-view.c (e_day_view_update_event): Umm, != CAL_COMPONENT_EVENT (I hope that wasn't me!) svn path=/trunk/; revision=5006
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog19
-rw-r--r--calendar/gui/e-day-view.c8
-rw-r--r--calendar/gui/event-editor.c32
-rw-r--r--calendar/gui/event-editor.h4
-rw-r--r--calendar/gui/gnome-cal.c38
5 files changed, 60 insertions, 41 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 958b8c52dd..d47461bc47 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,22 @@
+2000-08-24 JP Rosevear <jpr@helixcode.com>
+
+ * gui/gnome-cal.c (save_event_object_cb): Make signal
+ names saner
+ (released_event_object_cb): ditto
+ (gnome_calendar_edit_object): ditto
+
+ * gui/event-editor.h: Make signal names saner
+
+ * gui/event-editor.c (event_editor_class_init): Make signal
+ names saner now that we don't use ical object
+ (save_event_object): ditto with callback names
+ (file_save_cb): ditto
+ (tb_save_and_close_cb): ditto
+ (event_editor_set_ical_object): ditto
+
+ * gui/e-day-view.c (e_day_view_update_event): Umm,
+ != CAL_COMPONENT_EVENT (I hope that wasn't me!)
+
2000-08-24 Federico Mena Quintero <federico@helixcode.com>
* gui/e-day-view.c (e_day_view_on_new_appointment): Do not alloc
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c
index 91c7d77ff9..cc50032734 100644
--- a/calendar/gui/e-day-view.c
+++ b/calendar/gui/e-day-view.c
@@ -1123,14 +1123,8 @@ e_day_view_update_event (EDayView *day_view,
g_return_if_fail (E_IS_DAY_VIEW (day_view));
-#if 0
- /* FIXME: Just for testing. */
- chdir ("/home/damon/tmp");
- g_log_set_always_fatal (G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL);
-
g_print ("In e_day_view_update_event day_view:%p uid:%s\n",
day_view, uid);
-#endif
/* If our calendar or time hasn't been set yet, just return. */
if (!day_view->calendar
@@ -1153,7 +1147,7 @@ e_day_view_update_event (EDayView *day_view,
}
/* We only care about events. */
- if (comp && cal_component_get_vtype (comp) == CAL_COMPONENT_EVENT) {
+ if (comp && cal_component_get_vtype (comp) != CAL_COMPONENT_EVENT) {
gtk_object_unref (GTK_OBJECT (comp));
return;
}
diff --git a/calendar/gui/event-editor.c b/calendar/gui/event-editor.c
index 60ff650553..da44b59148 100644
--- a/calendar/gui/event-editor.c
+++ b/calendar/gui/event-editor.c
@@ -119,8 +119,8 @@ typedef struct {
/* Signal IDs */
enum {
- SAVE_ICAL_OBJECT,
- ICAL_OBJECT_RELEASED,
+ SAVE_EVENT_OBJECT,
+ RELEASED_EVENT_OBJECT,
EDITOR_CLOSED,
LAST_SIGNAL
};
@@ -194,20 +194,20 @@ event_editor_class_init (EventEditorClass *class)
parent_class = gtk_type_class (GTK_TYPE_OBJECT);
- event_editor_signals[SAVE_ICAL_OBJECT] =
- gtk_signal_new ("save_ical_object",
+ event_editor_signals[SAVE_EVENT_OBJECT] =
+ gtk_signal_new ("save_event_object",
GTK_RUN_FIRST,
object_class->type,
- GTK_SIGNAL_OFFSET (EventEditorClass, save_ical_object),
+ GTK_SIGNAL_OFFSET (EventEditorClass, save_event_object),
gtk_marshal_NONE__POINTER,
GTK_TYPE_NONE, 1,
GTK_TYPE_POINTER);
- event_editor_signals[ICAL_OBJECT_RELEASED] =
- gtk_signal_new ("ical_object_released",
+ event_editor_signals[RELEASED_EVENT_OBJECT] =
+ gtk_signal_new ("released_event_object",
GTK_RUN_FIRST,
object_class->type,
- GTK_SIGNAL_OFFSET (EventEditorClass, ical_object_released),
+ GTK_SIGNAL_OFFSET (EventEditorClass, released_event_object),
gtk_marshal_NONE__STRING,
GTK_TYPE_NONE, 1,
GTK_TYPE_POINTER);
@@ -1083,11 +1083,13 @@ dialog_to_comp_object (EventEditor *ee)
}
cal_component_set_exdate_list (comp, list);
cal_component_free_exdate_list (list);
+
+ cal_component_commit_sequence (comp);
}
-/* Emits the "save_ical_object" signal if the event editor is editing an object. */
+/* Emits the "save_event_object" signal if the event editor is editing an object. */
static void
-save_ical_object (EventEditor *ee)
+save_event_object (EventEditor *ee)
{
EventEditorPrivate *priv;
char *title;
@@ -1103,7 +1105,7 @@ save_ical_object (EventEditor *ee)
gtk_window_set_title (GTK_WINDOW (priv->app), title);
g_free (title);
- gtk_signal_emit (GTK_OBJECT (ee), event_editor_signals[SAVE_ICAL_OBJECT],
+ gtk_signal_emit (GTK_OBJECT (ee), event_editor_signals[SAVE_EVENT_OBJECT],
priv->comp);
}
@@ -1126,7 +1128,7 @@ close_dialog (EventEditor *ee)
const char *uid;
cal_component_get_uid (priv->comp, &uid);
- gtk_signal_emit (GTK_OBJECT (ee), event_editor_signals[ICAL_OBJECT_RELEASED], uid);
+ gtk_signal_emit (GTK_OBJECT (ee), event_editor_signals[RELEASED_EVENT_OBJECT], uid);
gtk_object_unref (GTK_OBJECT (priv->comp));
priv->comp = NULL;
}
@@ -1143,7 +1145,7 @@ file_save_cb (GtkWidget *widget, gpointer data)
EventEditor *ee;
ee = EVENT_EDITOR (data);
- save_ical_object (ee);
+ save_event_object (ee);
}
/* File/Close callback */
@@ -1356,7 +1358,7 @@ tb_save_and_close_cb (GtkWidget *widget, gpointer data)
EventEditor *ee;
ee = EVENT_EDITOR (data);
- save_ical_object (ee);
+ save_event_object (ee);
close_dialog (ee);
}
@@ -1541,7 +1543,7 @@ event_editor_set_ical_object (EventEditor *ee, CalComponent *comp)
const char *uid;
cal_component_get_uid (priv->comp, &uid);
- gtk_signal_emit (GTK_OBJECT (ee), event_editor_signals[ICAL_OBJECT_RELEASED], uid);
+ gtk_signal_emit (GTK_OBJECT (ee), event_editor_signals[RELEASED_EVENT_OBJECT], uid);
gtk_object_unref (GTK_OBJECT (priv->comp));
priv->comp = NULL;
}
diff --git a/calendar/gui/event-editor.h b/calendar/gui/event-editor.h
index 8e95e08cfb..244d8bb6e6 100644
--- a/calendar/gui/event-editor.h
+++ b/calendar/gui/event-editor.h
@@ -52,8 +52,8 @@ struct _EventEditorClass {
/* Notification signals */
- void (* save_ical_object) (EventEditor *ee, CalComponent *comp);
- void (* ical_object_released) (EventEditor *ee, const char *uid);
+ void (* save_event_object) (EventEditor *ee, CalComponent *comp);
+ void (* released_event_object) (EventEditor *ee, const char *uid);
void (* editor_closed) (EventEditor *ee);
};
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
index 2ef5ef7248..bb2a3ded10 100644
--- a/calendar/gui/gnome-cal.c
+++ b/calendar/gui/gnome-cal.c
@@ -1308,9 +1308,20 @@ gnome_calendar_set_selected_time_range (GnomeCalendar *gcal,
gnome_calendar_update_gtk_calendar (gcal);
}
+/* Callback used when an event editor requests that an object be saved */
+static void
+save_event_object_cb (EventEditor *ee, CalComponent *comp, gpointer data)
+{
+ GnomeCalendar *gcal;
+
+ gcal = GNOME_CALENDAR (data);
+ if (!cal_client_update_object (gcal->client, comp))
+ g_message ("save_event_object_cb(): Could not update the object!");
+}
+
/* Callback used when an event editor finishes editing an object */
static void
-ical_object_released_cb (EventEditor *ee, const char *uid, gpointer data)
+released_event_object_cb (EventEditor *ee, const char *uid, gpointer data)
{
GnomeCalendar *gcal;
gboolean result;
@@ -1335,17 +1346,6 @@ editor_closed_cb (EventEditor *ee, gpointer data)
gtk_object_unref (GTK_OBJECT (ee));
}
-/* Callback used when an event editor requests that an object be saved */
-static void
-save_ical_object_cb (EventEditor *ee, CalComponent *comp, gpointer data)
-{
- GnomeCalendar *gcal;
-
- gcal = GNOME_CALENDAR (data);
- if (!cal_client_update_object (gcal->client, comp))
- g_message ("save_ical_object_cb(): Could not update the object!");
-}
-
void
gnome_calendar_edit_object (GnomeCalendar *gcal, CalComponent *comp)
{
@@ -1371,15 +1371,19 @@ gnome_calendar_edit_object (GnomeCalendar *gcal, CalComponent *comp)
*/
g_hash_table_insert (gcal->object_editor_hash, g_strdup (uid), ee);
- gtk_signal_connect (GTK_OBJECT (ee), "ical_object_released",
- GTK_SIGNAL_FUNC (ical_object_released_cb), gcal);
+
+
+ gtk_signal_connect (GTK_OBJECT (ee), "save_event_object",
+ GTK_SIGNAL_FUNC (save_event_object_cb),
+ gcal);
+
+ gtk_signal_connect (GTK_OBJECT (ee), "released_event_object",
+ GTK_SIGNAL_FUNC (released_event_object_cb),
+ gcal);
gtk_signal_connect (GTK_OBJECT (ee), "editor_closed",
GTK_SIGNAL_FUNC (editor_closed_cb), gcal);
- gtk_signal_connect (GTK_OBJECT (ee), "save_ical_object",
- GTK_SIGNAL_FUNC (save_ical_object_cb), gcal);
-
event_editor_set_ical_object (EVENT_EDITOR (ee), comp);
}