|
From: <pa...@us...> - 2008-09-12 00:30:55
|
Revision: 558
http://osmo-pim.svn.sourceforge.net/osmo-pim/?rev=558&view=rev
Author: pasp
Date: 2008-09-12 00:31:06 +0000 (Fri, 12 Sep 2008)
Log Message:
-----------
* Prepare to exporting iCal files (still doesn't work).
Since this commit Osmo requires SVN version of libical.
Modified Paths:
--------------
trunk/ChangeLog
trunk/configure.ac
trunk/src/Makefile.am
trunk/src/calendar.c
trunk/src/calendar_ical.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-09-10 01:39:07 UTC (rev 557)
+++ trunk/ChangeLog 2008-09-12 00:31:06 UTC (rev 558)
@@ -1,7 +1,11 @@
2008-xx-xx: version 0.2.4
+ * Visible tasks list can be printed
* Improved birthdays browser
* Option to save data after every modification
+ * Many bug fixes and enhancements
+ * Added translations: tr
+ * Updated translations: fr
2008-07-22: version 0.2.2
* Advanced task reminder and event checker
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2008-09-10 01:39:07 UTC (rev 557)
+++ trunk/configure.ac 2008-09-12 00:31:06 UTC (rev 558)
@@ -47,26 +47,6 @@
AM_PATH_XML2(2.0.0,,
AC_MSG_ERROR([You do not appear to have libxml2 installed.]))
-# Checks for libical
-AC_ARG_WITH(libical,
- [[ --without-libical disable iCal support]],
- [if test "x$withval" = "xno" ; then use_ical=0 ; else use_ical=1; fi],
- use_ical=1)
-AC_CHECK_LIB(pthread, pthread_attr_init, [lib=yes], [lib=no])
-if test "$lib" = "yes" && test "$use_ical" = "1"; then
- LDFLAGS="${LDFLAGS} -lpthread"
- AC_CHECK_LIB(ical, icalparser_new, [lib=yes], [lib=no])
- if test "$lib" = "yes"; then
- ical_LIBS="-lical -lpthread"
- AC_DEFINE([HAVE_LIBICAL], [1], [Defined if compile with libical support])
- libical="yes"
- else
- libical="no"
- fi
-else
- libical="no"
-fi
-
# Checks for libgringotts
AC_ARG_WITH(gringotts,
[[ --without-gringotts disable Gringotts support]],
@@ -81,7 +61,18 @@
libgringotts="no"
fi
-# Checks for libnotify
+# Checks for libical
+PKG_CHECK_MODULES(LIBICAL, libical >= 0.32, have_libical=true,
+ have_libical=false)
+if test "x$have_libical" = "xtrue"; then
+ AC_DEFINE([HAVE_LIBICAL], [1], [Definded if compile with libical support])
+ libical="yes"
+else
+ libical="no"
+fi
+AM_CONDITIONAL([HAVE_LIBICAL], test "x$have_libical" = "xtrue")
+
+#Checks for libnotify
PKG_CHECK_MODULES(LIBNOTIFY, libnotify >= 0.4.4, have_libnotify=true,
have_libnotify=false)
if test "x$have_libnotify" = "xtrue"; then
@@ -119,7 +110,7 @@
CFLAGS="$BUILD_CFLAGS -Wall $PLATFORM_CFLAGS -D_GNU_SOURCE"
CXXFLAGS="$CFLAGS"
CPPFLAGS=""
-LIBS="$ical_LIBS $gringotts_LIBS"
+LIBS="$gringotts_LIBS"
AC_CONFIG_FILES([
Makefile
Modified: trunk/src/Makefile.am
===================================================================
--- trunk/src/Makefile.am 2008-09-10 01:39:07 UTC (rev 557)
+++ trunk/src/Makefile.am 2008-09-12 00:31:06 UTC (rev 558)
@@ -54,6 +54,9 @@
CFLAGS += @LIBNOTIFY_CFLAGS@
LIBS += @LIBNOTIFY_LIBS@
+CFLAGS += @LIBICAL_CFLAGS@
+LIBS += @LIBICAL_LIBS@
+
if CONFIGPATH
CFLAGS += -DCONFIG_PATH=\"$(configpath)\"
endif
Modified: trunk/src/calendar.c
===================================================================
--- trunk/src/calendar.c 2008-09-10 01:39:07 UTC (rev 557)
+++ trunk/src/calendar.c 2008-09-12 00:31:06 UTC (rev 558)
@@ -1417,6 +1417,7 @@
/*------------------------------------------------------------------------------*/
+#ifdef HAVE_LIBICAL
void
popup_ical_export_cb (gpointer user_data)
{
@@ -1430,6 +1431,7 @@
GUI *appGUI = (GUI *) user_data;
ical_events_browser (appGUI);
}
+#endif /* HAVE_LIBICAL */
/*------------------------------------------------------------------------------*/
@@ -1454,8 +1456,11 @@
GtkWidget *popup_menu_add_task_entry;
GtkWidget *popup_menu_separator;
GtkWidget *popup_menu_browse_notes;
+
+#ifdef HAVE_LIBICAL
GtkWidget *popup_menu_ical_browse;
GtkWidget *popup_menu_ical_export;
+#endif /* HAVE_LIBICAL */
gchar tmpbuf[BUFFER_SIZE];
Modified: trunk/src/calendar_ical.c
===================================================================
--- trunk/src/calendar_ical.c 2008-09-10 01:39:07 UTC (rev 557)
+++ trunk/src/calendar_ical.c 2008-09-12 00:31:06 UTC (rev 558)
@@ -32,15 +32,10 @@
#ifdef HAVE_LIBICAL
-#include <ical.h>
-/*#include <icalss.h>*/
-#undef PACKAGE
-#undef PACKAGE_BUGREPORT
-#undef PACKAGE_NAME
-#undef PACKAGE_STRING
-#undef PACKAGE_TARNAME
-#undef PACKAGE_VERSION
-#undef VERSION
+#include <libical/ical.h>
+#include <libical/icalss.h>
+#include <libical/icalset.h>
+#include <libical/icalclassify.h>
/*------------------------------------------------------------------------------*/
@@ -48,8 +43,7 @@
ics_initialize_timezone (void) {
gchar *tz_search_paths [] = {
-/* FIXME: doesn't work with libical 0.27 */
-/* "/usr/share/zoneinfo/",*/
+ "/usr/share/zoneinfo/",
"/opt/usr/share/libical/zoneinfo/",
"/usr/share/libical/zoneinfo/",
"/usr/local/share/libical/zoneinfo/"
@@ -642,7 +636,6 @@
if (item->date.day == cday && item->date.month == cmonth && (year_flag == FALSE || item->date.year == cyear))
gtk_list_store_set (appGUI->cal->ical_events_list_store, &iter, I_COLUMN_FONT_WEIGHT, PANGO_WEIGHT_BOLD, -1);
}
-
}
/*------------------------------------------------------------------------------*/
@@ -1136,12 +1129,13 @@
gchar *filename;
gint i;
guint32 julian_day;
+guint day, month, year;
gchar *summary, *description;
-/*icalcomponent *event;*/
-/*icalproperty *prop;*/
-/*icalparameter *param;*/
-/*icalfileset *ics_file;*/
-/*struct icaltimetype atime;*/
+icalcomponent *event;
+icalproperty *prop;
+icalparameter *param;
+/*icalset *ics_file;*/
+struct icaltimetype atime;
GUI *appGUI = (GUI *)user_data;
@@ -1171,30 +1165,34 @@
/*printf ("%d: %d, %s, %s\n", i, julian_day, summary, description);*/
- /*event = icalcomponent_new(ICAL_VCALENDAR_COMPONENT);*/
+ event = icalcomponent_new (ICAL_VCALENDAR_COMPONENT);
- /*atime.day = 1;*/
- /*atime.month = 8;*/
- /*atime.year = 2008;*/
- /*atime.is_date = 1;*/
- /*prop = icalproperty_new_dtstamp(atime);*/
- /*icalcomponent_add_property(event, prop);*/
+ utl_julian_to_dmy (julian_day, &day, &month, &year);
+ atime.day = day;
+ atime.month = month;
+ atime.year = year;
+ atime.is_date = 1;
+ prop = icalproperty_new_dtstamp (atime);
+ icalcomponent_add_property (event, prop);
+ prop = icalproperty_new_uid ("clay.ll.pl");
+ icalcomponent_add_property (event, prop);
+ prop = icalproperty_new_summary (summary);
+ icalcomponent_add_property (event, prop);
+ prop = icalproperty_new_description (description);
+ icalcomponent_add_property (event, prop);
+ prop=icalproperty_new_organizer ("ch...@ex...");
+ param = icalparameter_new_role (ICAL_ROLE_CHAIR);
+ icalproperty_add_parameter (prop, param);
+ icalcomponent_add_property (event,prop);
- /*prop = icalproperty_new_uid("clay.ll.pl");*/
- /*icalcomponent_add_property(event,prop);*/
-
- /*prop=icalproperty_new_organizer("ch...@ex..."); */
- /*param = icalparameter_new_role(ICAL_ROLE_CHAIR);*/
- /*icalproperty_add_parameter(prop, param);*/
- /*icalcomponent_add_property(event,prop);*/
-
/*icalset_add_component (ics_file, event);*/
- /*icalfileset_commit (ics_file);*/
g_free (summary);
g_free (description);
}
+ /*icalfileset_commit (ics_file);*/
+
g_free (filename);
ical_export_window_close_cb (NULL, NULL, user_data);
}
@@ -1223,8 +1221,6 @@
GtkCellRenderer *renderer;
gchar tmpbuf[BUFFER_SIZE];
- return; /* remove me */
-
appGUI->cal->ical_export_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_title (GTK_WINDOW (appGUI->cal->ical_export_window), _("iCalendar export"));
gtk_window_set_position (GTK_WINDOW (appGUI->cal->ical_export_window), GTK_WIN_POS_CENTER_ON_PARENT);
@@ -1482,6 +1478,7 @@
g_signal_connect(cancel_button, "clicked", G_CALLBACK(button_ical_export_window_close_cb), appGUI);
export_button = gtk_button_new_with_label (_("Export"));
+ gtk_widget_set_sensitive (export_button, FALSE); /* FIXME: Remove this line when exported files will be useful */
gtk_widget_show (export_button);
gtk_container_add (GTK_CONTAINER (hbuttonbox), export_button);
GTK_WIDGET_SET_FLAGS (export_button, GTK_CAN_DEFAULT);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|