summaryrefslogtreecommitdiffstats
path: root/gnome2-apps
diff options
context:
space:
mode:
authorVlad Glagolev2015-10-20 09:49:22 +0300
committerVlad Glagolev2015-10-20 09:49:22 +0300
commitfe6943d54ede5eaf4d025d7018ed946e90925397 (patch)
tree08e472b76bf33d744992c5b003a58c82f9834aee /gnome2-apps
parent4c192588dc1d075a2d829a00cc11107ee82f2f64 (diff)
osmo: added official patch to fix alarm warning
Diffstat (limited to 'gnome2-apps')
-rwxr-xr-xgnome2-apps/osmo/CONFIGURE2
-rwxr-xr-xgnome2-apps/osmo/DEPENDS7
-rwxr-xr-xgnome2-apps/osmo/DETAILS1
-rw-r--r--gnome2-apps/osmo/HISTORY10
-rwxr-xr-xgnome2-apps/osmo/PRE_BUILD4
-rw-r--r--gnome2-apps/osmo/warning.patch107
6 files changed, 129 insertions, 2 deletions
diff --git a/gnome2-apps/osmo/CONFIGURE b/gnome2-apps/osmo/CONFIGURE
index 356757e7f7..4db054e297 100755
--- a/gnome2-apps/osmo/CONFIGURE
+++ b/gnome2-apps/osmo/CONFIGURE
@@ -10,7 +10,7 @@ for o in OSMO_CONTACTS OSMO_TASKS OSMO_NOTES; do
fi
done &&
-config_query_option OSMO_OPTS "Enable Contacts module" y \
+config_query_option OSMO_OPTS "Enable Contacts module (requires HTML renderer)" y \
"--with-contacts" \
"--without-contacts" &&
diff --git a/gnome2-apps/osmo/DEPENDS b/gnome2-apps/osmo/DEPENDS
index b52e25806b..d226d6cebe 100755
--- a/gnome2-apps/osmo/DEPENDS
+++ b/gnome2-apps/osmo/DEPENDS
@@ -13,7 +13,12 @@ fi &&
optional_depends libical "" "" "for iCalendar support" &&
optional_depends gtkspell "" "" "for spell-checking support" &&
-optional_depends webkitgtk "" "" "for HTML rendering support" &&
+
+if list_find "$OSMO_OPTS" "--with-contacts"; then
+ depends webkitgtk
+else
+ optional_depends webkitgtk "" "" "for HTML rendering support"
+fi &&
if list_find "$OSMO_OPTS" "--with-tasks"; then
optional_depends libnotify "" "" "for task notification support"
diff --git a/gnome2-apps/osmo/DETAILS b/gnome2-apps/osmo/DETAILS
index c7697f5dfd..8417169c39 100755
--- a/gnome2-apps/osmo/DETAILS
+++ b/gnome2-apps/osmo/DETAILS
@@ -1,5 +1,6 @@
SPELL=osmo
VERSION=0.2.14
+ PATCHLEVEL=2
SOURCE=$SPELL-$VERSION.tar.gz
SOURCE_GPG=gurus.gpg:$SOURCE.sig:WORKS_FOR_ME
SOURCE_DIRECTORY="$BUILD_DIRECTORY/$SPELL-$VERSION"
diff --git a/gnome2-apps/osmo/HISTORY b/gnome2-apps/osmo/HISTORY
index fb3f32fc3d..36bb494f89 100644
--- a/gnome2-apps/osmo/HISTORY
+++ b/gnome2-apps/osmo/HISTORY
@@ -1,3 +1,13 @@
+2015-10-20 Vlad Glagolev <stealth@sourcemage.org>
+ * DETAILS: PATCHLEVEL++
+ * warning.patch: replaced with official patch
+
+2015-10-16 Vlad Glagolev <stealth@sourcemage.org>
+ * DETAILS: PATCHLEVEL=1
+ * DEPENDS, CONFIGURE: Contacts module requires webkitgtk
+ * PRE_BUILD: added, to apply the patch
+ * warning.patch: added, to restore alarm warning functionality
+
2015-10-10 Vlad Glagolev <stealth@sourcemage.org>
* DETAILS: updated spell to 0.2.14; quoting paths
* CONFIGURE: added printing flags; switch to OSMO_OPTS
diff --git a/gnome2-apps/osmo/PRE_BUILD b/gnome2-apps/osmo/PRE_BUILD
new file mode 100755
index 0000000000..77774d619e
--- /dev/null
+++ b/gnome2-apps/osmo/PRE_BUILD
@@ -0,0 +1,4 @@
+default_pre_build &&
+cd "${SOURCE_DIRECTORY}" &&
+
+patch -p0 < "${SPELL_DIRECTORY}/warning.patch"
diff --git a/gnome2-apps/osmo/warning.patch b/gnome2-apps/osmo/warning.patch
new file mode 100644
index 0000000000..d2e6388b4b
--- /dev/null
+++ b/gnome2-apps/osmo/warning.patch
@@ -0,0 +1,107 @@
+--- src/check_events.c.orig 2015-08-08 10:10:12.000000000 +0300
++++ src/check_events.c 2015-10-20 09:34:34.220984261 +0300
+@@ -341,60 +341,60 @@
+ #endif /* HAVE_LIBNOTIFY */
+
+ /*------------------------------------------------------------------------------*/
++static gboolean
++is_show_warning(TASK_ITEM *item, GUI *appGUI) {
++ if (item->warning_days > 0 || item->warning_time > 0) {
++ guint32 current_date, warning_date;
++ gint current_time, warning_time;
++ current_date = utl_date_get_current_julian();
++ current_time = utl_time_get_current_seconds();
++ utl_subtract_from_date(item->due_date_julian, item->due_time,
++ item->warning_days, item->warning_time * 60, &warning_date, &warning_time);
++
++ if (warning_date < current_date + (warning_time <= current_time) ? 1 : 0) {
++ if (item->repeat == TRUE && item->offline_ignore == TRUE) {
++ if (warning_date < appGUI->run_date + (warning_time < appGUI->run_time) ? 1 : 0) {
++ return FALSE;
++ }
++ }
+
+-gboolean
++ return TRUE;
++ }
++ }
++ return FALSE;
++}
++
++static gboolean
++is_show_notification(TASK_ITEM *item) {
++ return utl_date_time_in_the_past_js (item->due_date_julian, item->due_time);
++}
++/*------------------------------------------------------------------------------*/
++
++static gboolean
+ tsk_show_warning_notification (TASK_ITEM *item, GUI *appGUI)
+ {
+-guint32 current_date, warning_date;
+-gint current_time, warning_time;
+-
+ if (tsk_check_notification_id (item->id, NOTIFY_WARNING, appGUI))
+ return FALSE;
+-
+- if (item->warning_days > 0 || item->warning_time > 0) {
+-
+- current_date = utl_date_get_current_julian ();
+- current_time = utl_time_get_current_seconds ();
+- utl_subtract_from_date (item->due_date_julian, item->due_time,
+- item->warning_days, item->warning_time * 60, &warning_date, &warning_time);
+-
+- if (warning_date < current_date + (warning_time <= current_time) ? 1 : 0) {
+-
+- if (item->repeat == TRUE && item->offline_ignore == TRUE) {
+- if (warning_date < appGUI->run_date + (warning_time < appGUI->run_time) ? 1 : 0) {
+- return FALSE;
+- }
+- }
+-
+- return TRUE;
+- }
+- }
+-
+- return FALSE;
++ return is_show_warning(item, appGUI);
+ }
+
+ /*------------------------------------------------------------------------------*/
+
+-gboolean
++static gboolean
+ tsk_show_task_notification (TASK_ITEM *item, GUI *appGUI)
+ {
+ if (item->due_date_julian == 0 || tsk_check_notification_id (item->id, NOTIFY_ALARM, appGUI))
+ return FALSE;
+-
+- if (utl_date_time_in_the_past_js (item->due_date_julian, item->due_time)) {
+- return TRUE;
+- }
+-
+- return FALSE;
++ return is_show_notification(item);
+ }
+
+ /*------------------------------------------------------------------------------*/
+
+-gboolean
+-tsk_delete_ntask_notification(TASK_ITEM *item) {
++static gboolean
++tsk_delete_ntask_notification(TASK_ITEM *item, GUI *appGUI) {
+ if(item->done) {
+ return TRUE;
+- } else if(!utl_date_time_in_the_past_js(item->due_date_julian, item->due_time)) {
++ } else if(!is_show_notification(item) && !is_show_warning(item, appGUI)) {
+ return TRUE;
+ }
+ return FALSE;
+@@ -418,7 +418,7 @@
+ return;
+ }
+
+- if (tsk_delete_ntask_notification(item)) {
++ if (tsk_delete_ntask_notification(item, appGUI)) {
+ notify_task_delete(item->id, appGUI);
+ } else if (item->active == TRUE && item->done == FALSE) {
+