Author: juha
Date: 2007-12-11 21:58:58 + (Tue, 11 Dec 2007)
New Revision: 26458
Modified:
xfcalendar/trunk/NEWS
xfcalendar/trunk/TODO
xfcalendar/trunk/configure.in.in
xfcalendar/trunk/src/event-list.c
xfcalendar/trunk/src/ical-code.c
xfcalendar/trunk/src/ical-code.h
xfcalendar/trunk/src/interface.c
xfcalendar/trunk/src/interface.h
xfcalendar/trunk/src/main.c
xfcalendar/trunk/src/parameters.c
xfcalendar/trunk/src/parameters.h
Log:
made archiving a compile time option
Modified: xfcalendar/trunk/NEWS
===
--- xfcalendar/trunk/NEWS 2007-12-11 19:30:45 UTC (rev 26457)
+++ xfcalendar/trunk/NEWS 2007-12-11 21:58:58 UTC (rev 26458)
@@ -1,13 +1,3 @@
-20071002:
--
-* Orage version 4.5.9.7 released
-* Day view added.
-
-20070519:
--
-* Orage version 4.5.9.5 released
-* libnotify support added.
-
20070104:
-
* Orage version 4.5.9 released
Modified: xfcalendar/trunk/TODO
===
--- xfcalendar/trunk/TODO 2007-12-11 19:30:45 UTC (rev 26457)
+++ xfcalendar/trunk/TODO 2007-12-11 21:58:58 UTC (rev 26458)
@@ -40,10 +40,10 @@
*** DONE 4.5 ***
10) more alarm possibilities (like libnotify BUG 2831 and email)
-*** DONE 4.5 ***
+*** Partly DONE 4.5 ***
11) Day, Week, Month view
-*** DONE 4.5 for day and week view ***
+*** Partly DONE 4.5 ***
12) Exclude possiblity in repeating rule
Modified: xfcalendar/trunk/configure.in.in
===
--- xfcalendar/trunk/configure.in.in2007-12-11 19:30:45 UTC (rev 26457)
+++ xfcalendar/trunk/configure.in.in2007-12-11 21:58:58 UTC (rev 26458)
@@ -9,7 +9,7 @@
dnl
dnl Version information
-m4_define([orage_version], [4.5.11.2-svn])
+m4_define([orage_version], [4.5.11.3-svn])
m4_define([gtk_minimum_version], [2.6.0])
m4_define([xfce_minimum_version], [4.4.0])
@@ -194,6 +194,20 @@
[notify_minimum_version], [libnotify],
[LIBNOTIFY support])
+dnl
+dnl *** Optional support for automatic archiving ***
+dnl
+have_archive=no
+AC_ARG_ENABLE([archive],
+AC_HELP_STRING([--enable-archive], [use automatic archiving (defaut=yes)])
+AC_HELP_STRING([--disable-archive], [don't use automatic archiving]),
+ [], [enable_archive=yes])
+if test x$enable_archive = xyes; then
+AC_DEFINE([HAVE_ARCHIVE], [1], [Define to enable archiving])
+have_archive=yes
+fi
+
+
dnl Check for debugging support
dnl BM_DEBUG_SUPPORT()
XDT_FEATURE_DEBUG
@@ -240,4 +254,5 @@
else
echo * LIBNOTIFY support: no
fi
+echo * Automatic archiving: $have_archive
echo
Modified: xfcalendar/trunk/src/event-list.c
===
--- xfcalendar/trunk/src/event-list.c 2007-12-11 19:30:45 UTC (rev 26457)
+++ xfcalendar/trunk/src/event-list.c 2007-12-11 21:58:58 UTC (rev 26458)
@@ -90,29 +90,59 @@
{ STRING, 0, DRAG_TARGET_STRING }
};
+static void start_appt_win(char *mode, el_win *el
+, GtkTreeModel *model, GtkTreeIter *iter, GtkTreePath *path)
+{
+gchar *uid = NULL, *flags = NULL;
+appt_win *apptw;
+
+if (gtk_tree_model_get_iter(model, iter, path)) {
+gtk_tree_model_get(model, iter, COL_UID, uid, -1);
+#ifdef HAVE_ARCHIVE
+gtk_tree_model_get(model, iter, COL_FLAGS, flags, -1);
+if (flags flags[3] == 'A') {
+xfical_unarchive_uid(uid);
+/* note that file id changes after archive */
+uid[0]='O';
+refresh_el_win(el);
+}
+g_free(flags);
+#endif
+apptw = create_appt_win(mode, uid, el);
+g_free(uid);
+}
+}
+
static void editEvent(GtkTreeView *view, GtkTreePath *path
, GtkTreeViewColumn *col, gpointer user_data)
{
el_win *el = (el_win *)user_data;
-appt_win *apptw;
GtkTreeModel *model;
GtkTreeIter iter;
+/*
gchar *uid = NULL, *flags = NULL;
+appt_win *apptw;
+*/
model = gtk_tree_view_get_model(view);
+start_appt_win(UPDATE, el, model, iter, path);
+/*
if (gtk_tree_model_get_iter(model, iter, path)) {
-gtk_tree_model_get(model, iter
-, COL_UID, uid, COL_FLAGS, flags, -1);
+gtk_tree_model_get(model, iter, COL_UID, uid, -1);
+#ifdef HAVE_ARCHIVE
+gtk_tree_model_get(model, iter, COL_FLAGS, flags, -1);
if (flags flags[3] == 'A') {
xfical_unarchive_uid(uid);
-/* note that file id changes after archive */
+/ * note that file id changes after archive * /
uid[0]='O';
refresh_el_win(el);
}
+#endif
apptw = create_appt_win(UPDATE, uid, el);
g_free(uid);