aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-meeting-utils.c
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2002-02-16 03:22:18 +0800
committerJP Rosevear <jpr@src.gnome.org>2002-02-16 03:22:18 +0800
commit68bff65a4119bdd4431a5572c3cd59d2425c13ed (patch)
treeb03d169df01b8f5e41856920d91fed1192e0fe71 /calendar/gui/e-meeting-utils.c
parent079f1f45e7c421ed7f19840f70034df4c7dace74 (diff)
downloadgsoc2013-evolution-68bff65a4119bdd4431a5572c3cd59d2425c13ed.tar.gz
gsoc2013-evolution-68bff65a4119bdd4431a5572c3cd59d2425c13ed.tar.zst
gsoc2013-evolution-68bff65a4119bdd4431a5572c3cd59d2425c13ed.zip
use new column enums (set_value_at): emit pre-change/cell change signals
2002-02-14 JP Rosevear <jpr@ximian.com> * gui/e-meeting-model.c: use new column enums (set_value_at): emit pre-change/cell change signals (destroy): destroy refresh_queue and refresh_data (init): init new elements (refresh_queue_add): if the attendee is being refreshed already, possibly update the start/end times to look for and update the callback info, otherwise add it to the queue (refresh_queue_remove): remove a refreshing attende from the queue (process_callbacks): make all the callbacks and remove the attendee from the queue (process_free_busy): process the callbacks immediately if parsing fails or on successful completion of processing (async_close): process free busy (cursor_cb): we're only looking for one at a time now (refresh_busy_periods): idle callback to start processing the queue (e_meeting_model_refresh_all_busy_periods): add every row to the queue (e_meeting_model_refresh_busy_periods): add a single row to the queue * gui/e-meeting-model.h: new protos, enum the columns * gui/e-meeting-time-sel.c: use new compare time function (e_meeting_time_selector_construct): listen for a cell changed signal and use separate callbacks for rows_inserted and rows_deleted (e_meeting_time_selector_refresh_free_busy): util function to refresh free busy info (e_meeting_time_selector_on_update_free_busy): use above (rows_inserted_cb): refresh free busy on the new rows (cell_changed_cb): refresh free busy on the row when the address changes (rows_deleted_cb): redraw * gui/e-meeting-utils.[hc]: a holding spot for a meeting time comparison function * gui/Makefile.am: compile new files svn path=/trunk/; revision=15741
Diffstat (limited to 'calendar/gui/e-meeting-utils.c')
-rw-r--r--calendar/gui/e-meeting-utils.c52
1 files changed, 52 insertions, 0 deletions
diff --git a/calendar/gui/e-meeting-utils.c b/calendar/gui/e-meeting-utils.c
new file mode 100644
index 0000000000..496bb8ebaa
--- /dev/null
+++ b/calendar/gui/e-meeting-utils.c
@@ -0,0 +1,52 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/* itip-model.c
+ *
+ * Copyright (C) 2001 Ximian, Inc.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
+ * License as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Author: JP Rosevear
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "e-meeting-utils.h"
+
+gint
+e_meeting_time_compare_times (EMeetingTime*time1,
+ EMeetingTime*time2)
+{
+ gint day_comparison;
+
+ day_comparison = g_date_compare (&time1->date,
+ &time2->date);
+ if (day_comparison != 0)
+ return day_comparison;
+
+ if (time1->hour < time2->hour)
+ return -1;
+ if (time1->hour > time2->hour)
+ return 1;
+
+ if (time1->minute < time2->minute)
+ return -1;
+ if (time1->minute > time2->minute)
+ return 1;
+
+ /* The start times are exactly the same. */
+ return 0;
+}