aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@src.gnome.org>2008-10-25 07:52:05 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2008-10-25 07:52:05 +0800
commit85b2913a380c69f14ae0254ad23b10fabfb33667 (patch)
treec1cf143e37294dd9dd3667ebbe0a1d0c00b04b56 /calendar
parente7a31c5035a0afeed6c1675e30487c1e2bdc139f (diff)
downloadgsoc2013-evolution-85b2913a380c69f14ae0254ad23b10fabfb33667.tar
gsoc2013-evolution-85b2913a380c69f14ae0254ad23b10fabfb33667.tar.gz
gsoc2013-evolution-85b2913a380c69f14ae0254ad23b10fabfb33667.tar.bz2
gsoc2013-evolution-85b2913a380c69f14ae0254ad23b10fabfb33667.tar.lz
gsoc2013-evolution-85b2913a380c69f14ae0254ad23b10fabfb33667.tar.xz
gsoc2013-evolution-85b2913a380c69f14ae0254ad23b10fabfb33667.tar.zst
gsoc2013-evolution-85b2913a380c69f14ae0254ad23b10fabfb33667.zip
Merge revisions 36534:36684 from trunk.
svn path=/branches/kill-bonobo/; revision=36685
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog88
-rw-r--r--calendar/conduits/calendar/calendar-conduit.c32
-rw-r--r--calendar/conduits/common/Makefile.am1
-rw-r--r--calendar/conduits/common/libecalendar-common-conduit.c2
-rw-r--r--calendar/conduits/memo/memo-conduit.c33
-rw-r--r--calendar/conduits/todo/todo-conduit.c33
-rw-r--r--calendar/gui/alarm-notify/alarm.c31
-rw-r--r--calendar/gui/cal-search-bar.c5
-rw-r--r--calendar/gui/calendar-commands.c37
-rw-r--r--calendar/gui/calendar-commands.h34
-rw-r--r--calendar/gui/dialogs/calendar-setup.c3
-rw-r--r--calendar/gui/dialogs/comp-editor.c32
-rw-r--r--calendar/gui/e-cal-popup.c32
-rw-r--r--calendar/gui/e-day-view.c50
-rw-r--r--calendar/gui/e-week-view.c9
-rw-r--r--calendar/gui/gnome-cal.c38
-rw-r--r--calendar/gui/gnome-cal.h34
-rw-r--r--calendar/gui/tasks-component.c27
-rw-r--r--calendar/importers/icalendar-importer.c34
19 files changed, 344 insertions, 211 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 04bfe0d70a..343a76a9e0 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,91 @@
+2008-10-20 Matthew Barnes <mbarnes@redhat.com>
+
+ ** Fixes bug #555958 (patch by Anis Elleuch)
+
+ * gui/dialogs/comp-editor.c (comp_editor_init):
+ Add the UI manager's accelerator group to the editor window
+ so that menu shortcut keys work.
+
+2008-10-20 Milan Crha <mcrha@redhat.com>
+
+ ** Fix for bug #553715
+
+ * gui/e-week-view.c: (e_week_view_on_editing_stopped):
+ Set end time for the event properly, not same as start time.
+
+2008-10-20 Milan Crha <mcrha@redhat.com>
+
+ ** Fix for bug #528816
+
+ * importers/icalendar-importer.c: (vcal_supported): We do not support
+ vCalendar importer when we can parse the iCalendar from the file,
+ because the latter holds more information, like timezones.
+
+2008-10-17 Matt Davey <mcdavey@mrao.cam.ac.uk>
+
+ ** Fix for bug #556059
+
+ * conduits/common/Makefile.am:
+ * conduits/common/libecalendar-common-conduit.c: Allow building outside
+ the source tree.
+
+2008-10-17 Milan Crha <mcrha@redhat.com>
+
+ ** Fix for bug #553609
+
+ * gui/e-week-view.c: (e_week_view_set_selected_time_range):
+ Do not do any changes when the view has not been shown yet.
+
+2008-10-17 Milan Crha <mcrha@redhat.com>
+
+ ** Fix for bug #530872
+
+ * gui/e-calendar-table.c: (e_calendar_table_on_open_task):
+ Check for NULL soon enough to not crash.
+
+2008-10-14 Sankar P <psankar@novell.com>
+
+License Changes
+
+ * conduits/calendar/calendar-conduit.c:
+ * conduits/memo/memo-conduit.c:
+ * conduits/todo/todo-conduit.c:
+ * gui/calendar-commands.c:
+ * gui/calendar-commands.h:
+ * gui/gnome-cal.c:
+ * gui/gnome-cal.h:
+
+2008-10-13 Suman Manjunath <msuman@novell.com>
+
+ ** Fix for bug #424818 (bugzilla.novell.com)
+
+ * gui/dialogs/calendar-setup.c (eccp_general_offline): Don't show offline
+ availability option for B&A calendars.
+ * gui/e-cal-popup.c (e_cal_popup_target_new_source): Check for the correct
+ property ("offline_sync" instead of "offline") while setting the GUI mask.
+ * gui/calendar-component.c (set_offline_availability),
+ (mark_no_offline_cb), (mark_offline_cb):
+ * gui/memos-component.c (set_offline_availability),
+ (mark_no_offline_cb), (mark_offline_cb):
+ * gui/tasks-component.c (set_offline_availability),
+ (mark_no_offline_cb), (mark_offline_cb):
+ Integrate the mark-calendar-offline plugin into the main code as we already
+ have a similar per-calendar option which does the same thing.
+
+2008-10-09 Matthew Barnes <mbarnes@redhat.com>
+
+ ** Fixes part of bug #555494
+
+ * gui/cal-search-bar.c (generate_viewoption_menu):
+ Category icons are not themed. Load by file, not by icon name.
+
+2008-10-08 Sankar P <psankar@novell.com>
+
+License Changes
+
+ * gui/alarm-notify/alarm.c:
+ * gui/dialogs/comp-editor.c:
+
2008-10-01 Milan Crha <mcrha@redhat.com>
** Part of fix for bug #554418
diff --git a/calendar/conduits/calendar/calendar-conduit.c b/calendar/conduits/calendar/calendar-conduit.c
index 5d610132a3..b5d2e1abe1 100644
--- a/calendar/conduits/calendar/calendar-conduit.c
+++ b/calendar/conduits/calendar/calendar-conduit.c
@@ -1,24 +1,26 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* Evolution calendar - Calendar Conduit
- *
- * Copyright (C) 1998 Free Software Foundation
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- *
- * Authors: Eskil Heyn Olsen <deity@eskil.dk>
- * JP Rosevear <jpr@ximian.com>
+/*
+ * Evolution calendar - Calendar Conduit
*
* 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.
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) version 3.
*
* 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.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with the program; if not, see <http://www.gnu.org/licenses/>
+ *
+ *
+ * Authors:
+ * Eskil Heyn Olsen <deity@eskil.dk>
+ * JP Rosevear <jpr@ximian.com>
+ *
+ * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
*
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <config.h>
diff --git a/calendar/conduits/common/Makefile.am b/calendar/conduits/common/Makefile.am
index 3f18ffa19c..2db1df5fca 100644
--- a/calendar/conduits/common/Makefile.am
+++ b/calendar/conduits/common/Makefile.am
@@ -1,4 +1,5 @@
INCLUDES = \
+ -I$(top_srcdir) \
-I$(top_srcdir)/e-util \
-I$(top_builddir)/e-util \
$(EVOLUTION_CALENDAR_CONDUIT_CFLAGS)
diff --git a/calendar/conduits/common/libecalendar-common-conduit.c b/calendar/conduits/common/libecalendar-common-conduit.c
index c5000875b7..1b7013bb0a 100644
--- a/calendar/conduits/common/libecalendar-common-conduit.c
+++ b/calendar/conduits/common/libecalendar-common-conduit.c
@@ -26,7 +26,7 @@
#include <string.h>
#include <libedataserver/e-categories.h>
-#include <e-util/e-pilot-util.h>
+#include <e-pilot-util.h>
#include <pi-appinfo.h>
#include <glib.h>
diff --git a/calendar/conduits/memo/memo-conduit.c b/calendar/conduits/memo/memo-conduit.c
index 1a9638b0ce..ecaa07fa48 100644
--- a/calendar/conduits/memo/memo-conduit.c
+++ b/calendar/conduits/memo/memo-conduit.c
@@ -1,27 +1,28 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* Evolution calendar - Memo Conduit
- *
- * Copyright (C) 1998 Free Software Foundation
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- *
- * Authors: Eskil Heyn Olsen <deity@eskil.dk>
- * JP Rosevear <jpr@ximian.com>
+/*
+ * Evolution calendar - Memo Conduit
*
* 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.
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) version 3.
*
* 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.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with the program; if not, see <http://www.gnu.org/licenses/>
+ *
+ *
+ * Authors:
+ * Eskil Heyn Olsen <deity@eskil.dk>
+ * JP Rosevear <jpr@ximian.com>
+ *
+ * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
*
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
diff --git a/calendar/conduits/todo/todo-conduit.c b/calendar/conduits/todo/todo-conduit.c
index de93956d18..53aeab425b 100644
--- a/calendar/conduits/todo/todo-conduit.c
+++ b/calendar/conduits/todo/todo-conduit.c
@@ -1,27 +1,28 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* Evolution calendar - ToDo Conduit
- *
- * Copyright (C) 1998 Free Software Foundation
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- *
- * Authors: Eskil Heyn Olsen <deity@eskil.dk>
- * JP Rosevear <jpr@ximian.com>
+/*
+ * Evolution calendar - ToDo Conduit
*
* 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.
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) version 3.
*
* 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.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with the program; if not, see <http://www.gnu.org/licenses/>
+ *
+ *
+ * Authors:
+ * Eskil Heyn Olsen <deity@eskil.dk>
+ * JP Rosevear <jpr@ximian.com>
+ *
+ * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
*
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
diff --git a/calendar/gui/alarm-notify/alarm.c b/calendar/gui/alarm-notify/alarm.c
index 7f6d1f41d5..bf96f1f664 100644
--- a/calendar/gui/alarm-notify/alarm.c
+++ b/calendar/gui/alarm-notify/alarm.c
@@ -1,23 +1,26 @@
-/* Evolution calendar - Low-level alarm timer mechanism
- *
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- *
- * Authors: Miguel de Icaza <miguel@ximian.com>
- * Federico Mena-Quintero <federico@ximian.com>
+/*
+ * Evolution calendar - Low-level alarm timer mechanism
*
* 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.
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) version 3.
*
* 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.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with the program; if not, see <http://www.gnu.org/licenses/>
+ *
+ *
+ * Authors:
+ * Miguel de Icaza <miguel@ximian.com>
+ * Federico Mena-Quintero <federico@ximian.com>
+ *
+ * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
*
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <config.h>
diff --git a/calendar/gui/cal-search-bar.c b/calendar/gui/cal-search-bar.c
index d816aa7cd9..b8fe5a45fd 100644
--- a/calendar/gui/cal-search-bar.c
+++ b/calendar/gui/cal-search-bar.c
@@ -552,9 +552,8 @@ generate_viewoption_menu (CALSearchBarItem *subitems)
if (subitems[i].image) {
GtkWidget *image;
- image = gtk_image_new_from_icon_name (
- subitems[i].image,
- GTK_ICON_SIZE_MENU);
+ image = gtk_image_new_from_file (
+ subitems[i].image);
gtk_image_menu_item_set_image (
GTK_IMAGE_MENU_ITEM (menu_item),
image);
diff --git a/calendar/gui/calendar-commands.c b/calendar/gui/calendar-commands.c
index c2a46fb4e5..c398b6e12b 100644
--- a/calendar/gui/calendar-commands.c
+++ b/calendar/gui/calendar-commands.c
@@ -1,27 +1,28 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* Evolution calendar - Commands for the calendar GUI control
- *
- * Copyright (C) 1998 The Free Software Foundation
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- *
- * Authors: Miguel de Icaza <miguel@ximian.com>
- * Federico Mena-Quintero <federico@ximian.com>
- * Seth Alves <alves@hungry.com>
- * Rodrigo Moya <rodrigo@ximian.com>
+/*
+ * Evolution calendar - Commands for the calendar GUI control
*
* 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.
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) version 3.
*
* 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.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with the program; if not, see <http://www.gnu.org/licenses/>
+ *
+ *
+ * Authors:
+ * Miguel de Icaza <miguel@ximian.com>
+ * Federico Mena-Quintero <federico@ximian.com>
+ * Seth Alves <alves@hungry.com>
+ * Rodrigo Moya <rodrigo@ximian.com>
+ *
+ * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
*
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifdef HAVE_CONFIG_H
diff --git a/calendar/gui/calendar-commands.h b/calendar/gui/calendar-commands.h
index ac996eeede..cfe2d24232 100644
--- a/calendar/gui/calendar-commands.h
+++ b/calendar/gui/calendar-commands.h
@@ -1,25 +1,27 @@
-/* Evolution calendar - Commands for the calendar GUI control
- *
- * Copyright (C) 1998 The Free Software Foundation
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- *
- * Authors: Miguel de Icaza <miguel@ximian.com>
- * Federico Mena-Quintero <federico@ximian.com>
- * Seth Alves <alves@hungry.com>
+/*
+ * Evolution calendar - Commands for the calendar GUI control
*
* 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.
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) version 3.
*
* 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.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with the program; if not, see <http://www.gnu.org/licenses/>
+ *
+ *
+ * Authors:
+ * Miguel de Icaza <miguel@ximian.com>
+ * Federico Mena-Quintero <federico@ximian.com>
+ * Seth Alves <alves@hungry.com>
+ *
+ * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
*
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef CALENDAR_COMMANDS_H
diff --git a/calendar/gui/dialogs/calendar-setup.c b/calendar/gui/dialogs/calendar-setup.c
index f7ab2ee846..724206a072 100644
--- a/calendar/gui/dialogs/calendar-setup.c
+++ b/calendar/gui/dialogs/calendar-setup.c
@@ -259,7 +259,8 @@ eccp_general_offline (EConfig *ec, EConfigItem *item, struct _GtkWidget *parent,
GtkWidget *offline_setting = NULL;
const char *offline_sync;
int row;
- gboolean is_local = g_str_has_prefix (e_source_group_peek_base_uri (sdialog->source_group), "file:");
+ const char *base_uri = e_source_group_peek_base_uri (sdialog->source_group);
+ gboolean is_local = base_uri && (g_str_has_prefix (base_uri, "file://") || g_str_has_prefix (base_uri, "contacts://"));
offline_sync = e_source_get_property (sdialog->source, "offline_sync");
if (old)
return old;
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index 5e19e690eb..c1f123e836 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -1,21 +1,25 @@
-/* Evolution calendar - Framework for a calendar component editor dialog
- *
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- *
- * Author: Federico Mena-Quintero <federico@ximian.com>
+/*
+ * Evolution calendar - Framework for a calendar component editor dialog
*
* 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.
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) version 3.
*
* 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.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with the program; if not, see <http://www.gnu.org/licenses/>
+ *
+ *
+ * Authors:
+ * Federico Mena-Quintero <federico@ximian.com>
+ *
+ * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
*
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifdef HAVE_CONFIG_H
@@ -1752,6 +1756,10 @@ comp_editor_init (CompEditor *editor)
priv->attachment_bar = e_attachment_bar_new (NULL);
priv->manager = gtk_ui_manager_new ();
+ gtk_window_add_accel_group (
+ GTK_WINDOW (editor),
+ gtk_ui_manager_get_accel_group (priv->manager));
+
action_group = gtk_action_group_new ("core");
gtk_action_group_set_translation_domain (
action_group, GETTEXT_PACKAGE);
diff --git a/calendar/gui/e-cal-popup.c b/calendar/gui/e-cal-popup.c
index 7f61282a5a..6a5c5b3fa5 100644
--- a/calendar/gui/e-cal-popup.c
+++ b/calendar/gui/e-cal-popup.c
@@ -702,7 +702,7 @@ e_cal_popup_target_new_source(ECalPopup *eabp, ESourceSelector *selector)
{
ECalPopupTargetSource *t = e_popup_target_new(&eabp->popup, E_CAL_POPUP_TARGET_SOURCE, sizeof(*t));
guint32 mask = ~0;
- const char *source_uri;
+ const char *relative_uri;
char *uri;
ESource *source;
const char *offline = NULL;
@@ -719,42 +719,32 @@ e_cal_popup_target_new_source(ECalPopup *eabp, ESourceSelector *selector)
mask &= ~E_CAL_POPUP_SOURCE_PRIMARY;
/* FIXME Gross hack, should have a property or something */
- source_uri = e_source_peek_relative_uri(source);
- if (source_uri && !strcmp("system", source_uri))
+ relative_uri = e_source_peek_relative_uri(source);
+ if (relative_uri && !strcmp("system", relative_uri))
mask &= ~E_CAL_POPUP_SOURCE_SYSTEM;
else
mask &= ~E_CAL_POPUP_SOURCE_USER;
- source = e_source_selector_peek_primary_selection (selector);
uri = e_source_get_uri (source);
if (!uri || (g_ascii_strncasecmp (uri, "file://", 7) && g_ascii_strncasecmp (uri, "contacts://", 11))) {
/* check for e_target_selector's offline_status property here */
- offline = e_source_get_property (source, "offline");
-
- if (offline && strcmp (offline,"1") == 0) {
- /* set the menu item to Mark Offline - */
- mask &= ~E_CAL_POPUP_SOURCE_NO_OFFLINE;
- } else {
+ offline = e_source_get_property (source, "offline_sync");
+ if (offline && strcmp (offline, "1") == 0)
+ mask &= ~E_CAL_POPUP_SOURCE_NO_OFFLINE; /* set the menu item to Mark Offline */
+ else
mask &= ~E_CAL_POPUP_SOURCE_OFFLINE;
- }
} else {
mask |= E_CAL_POPUP_SOURCE_NO_OFFLINE;
mask |= E_CAL_POPUP_SOURCE_OFFLINE;
}
g_free (uri);
- source = e_source_selector_peek_primary_selection (selector);
- /*check for delete_status property here*/
+ /* check for delete_status property here */
delete = e_source_get_property (source, "delete");
-
- if (delete && strcmp (delete,"no") == 0) {
- /*set the menu item to non deletable */
- mask &= ~E_CAL_POPUP_SOURCE_NO_DELETE;
- }
- else {
+ if (delete && strcmp (delete, "no") == 0)
+ mask &= ~E_CAL_POPUP_SOURCE_NO_DELETE; /* set the menu item to non deletable */
+ else
mask &= ~E_CAL_POPUP_SOURCE_DELETE;
- }
-
t->target.mask = mask;
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c
index 3497dd4326..8b73cd7ccf 100644
--- a/calendar/gui/e-day-view.c
+++ b/calendar/gui/e-day-view.c
@@ -1,30 +1,26 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
- * Authors :
- * Damon Chaplin <damon@ximian.com>
- * Rodrigo Moya <rodrigo@ximian.com>
- *
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
+ * EDayView - displays the Day & Work-Week views of the calendar.
*
* 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.
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) version 3.
*
* 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.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
- */
-
-/*
- * EDayView - displays the Day & Work-Week views of the calendar.
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with the program; if not, see <http://www.gnu.org/licenses/>
+ *
+ * Authors:
+ * Damon Chaplin <damon@ximian.com>
+ * Rodrigo Moya <rodrigo@ximian.com>
+ *
+ * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
*/
-
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -214,11 +210,9 @@ static gboolean e_day_view_on_top_canvas_scroll (GtkWidget *widget,
static gboolean e_day_view_on_main_canvas_scroll (GtkWidget *widget,
GdkEventScroll *scroll,
EDayView *day_view);
-
static gboolean e_day_view_on_time_canvas_scroll (GtkWidget *widget,
GdkEventScroll *scroll,
EDayView *day_view);
-
static gboolean e_day_view_on_main_canvas_motion (GtkWidget *widget,
GdkEventMotion *event,
EDayView *day_view);
@@ -2998,10 +2992,8 @@ e_day_view_on_top_canvas_scroll (GtkWidget *widget,
e_day_view_top_scroll (day_view, -E_DAY_VIEW_WHEEL_MOUSE_STEP_SIZE);
return TRUE;
default:
- break;
+ return FALSE;
}
-
- return FALSE;
}
static gboolean
@@ -3024,13 +3016,11 @@ e_day_view_on_time_canvas_scroll (GtkWidget *widget,
e_day_view_scroll (day_view, -E_DAY_VIEW_WHEEL_MOUSE_STEP_SIZE);
return TRUE;
default:
- break;
- }
-
- return FALSE;
-}
-
-static gboolean
+ return FALSE;
+ }
+}
+
+static gboolean
e_day_view_on_long_event_button_press (EDayView *day_view,
gint event_num,
GdkEventButton *event,
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c
index 2b8f303acd..3a5dd92e2f 100644
--- a/calendar/gui/e-week-view.c
+++ b/calendar/gui/e-week-view.c
@@ -1402,6 +1402,11 @@ e_week_view_set_selected_time_range (ECalendarView *cal_view,
g_return_if_fail (E_IS_WEEK_VIEW (week_view));
+ if (!g_date_valid (&week_view->base_date)) {
+ /* This view has not been initialized/shown yet, thus skip this. */
+ return;
+ }
+
time_to_gdate_with_zone (&date, start_time, e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view)));
/* Set the selection to the given days. */
@@ -3607,12 +3612,12 @@ e_week_view_on_editing_stopped (EWeekView *week_view,
e_cal_component_get_dtend (comp, &dt);
if (dt.value->zone) {
- *dt.value = icaltime_from_timet_with_zone (
+ tt = icaltime_from_timet_with_zone (
event->comp_data->instance_end,
dt.value->is_date,
dt.value->zone);
} else {
- *dt.value = icaltime_from_timet_with_zone (
+ tt = icaltime_from_timet_with_zone (
event->comp_data->instance_end,
dt.value->is_date,
e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view)));
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
index f479f5ba4b..31d72ee545 100644
--- a/calendar/gui/gnome-cal.c
+++ b/calendar/gui/gnome-cal.c
@@ -1,28 +1,28 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* Evolution calendar - Main calendar view widget
- *
- * Copyright (C) 1998 The Free Software Foundation
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- *
- * Authors: Miguel de Icaza <miguel@ximian.com>
- * Federico Mena-Quintero <federico@ximian.com>
- * Seth Alves <alves@hungry.com>
- * Rodrigo Moya <rodrigo@ximian.com>
+/*
+ * Evolution calendar - Main calendar view widget
*
* 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.
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) version 3.
*
* 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.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with the program; if not, see <http://www.gnu.org/licenses/>
+ *
+ *
+ * Authors:
+ * Miguel de Icaza <miguel@ximian.com>
+ * Federico Mena-Quintero <federico@ximian.com>
+ * Seth Alves <alves@hungry.com>
+ * Rodrigo Moya <rodrigo@ximian.com>
+ *
+ * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
*
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifdef HAVE_CONFIG_H
diff --git a/calendar/gui/gnome-cal.h b/calendar/gui/gnome-cal.h
index 29865d98fa..6c758a60cd 100644
--- a/calendar/gui/gnome-cal.h
+++ b/calendar/gui/gnome-cal.h
@@ -1,25 +1,27 @@
-/* Evolution calendar - Main calendar view widget
- *
- * Copyright (C) 1998 The Free Software Foundation
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- *
- * Authors: Miguel de Icaza <miguel@ximian.com>
- * Federico Mena-Quintero <federico@ximian.com>
- * Seth Alves <alves@hungry.com>
+/*
+ * Evolution calendar - Main calendar view widget
*
* 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.
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) version 3.
*
* 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.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with the program; if not, see <http://www.gnu.org/licenses/>
+ *
+ *
+ * Authors:
+ * Miguel de Icaza <miguel@ximian.com>
+ * Federico Mena-Quintero <federico@ximian.com>
+ * Seth Alves <alves@hungry.com>
+ *
+ * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
*
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef GNOME_CALENDAR_APP_H
diff --git a/calendar/gui/tasks-component.c b/calendar/gui/tasks-component.c
index 7c70192c90..c2ad3a45ef 100644
--- a/calendar/gui/tasks-component.c
+++ b/calendar/gui/tasks-component.c
@@ -250,12 +250,39 @@ edit_task_list_cb (EPopup *ep, EPopupItem *pitem, void *data)
calendar_setup_edit_task_list (GTK_WINDOW (gtk_widget_get_toplevel(ep->target->widget)), selected_source);
}
+static void
+set_offline_availability (EPopup *ep, EPopupItem *pitem, void *data, const char *value)
+{
+ TasksComponentView *component_view = data;
+ ESource *selected_source;
+
+ selected_source = e_source_selector_peek_primary_selection (E_SOURCE_SELECTOR (component_view->source_selector));
+ if (!selected_source)
+ return;
+
+ e_source_set_property (selected_source, "offline_sync", value);
+}
+
+static void
+mark_no_offline_cb (EPopup *ep, EPopupItem *pitem, void *data)
+{
+ set_offline_availability (ep, pitem, data, "0");
+}
+
+static void
+mark_offline_cb (EPopup *ep, EPopupItem *pitem, void *data)
+{
+ set_offline_availability (ep, pitem, data, "1");
+}
+
static EPopupItem etc_source_popups[] = {
{ E_POPUP_ITEM, "10.new", N_("_New Task List"), new_task_list_cb, NULL, "stock_todo", 0, 0 },
{ E_POPUP_ITEM, "15.copy", N_("_Copy..."), copy_task_list_cb, NULL, "edit-copy", 0, E_CAL_POPUP_SOURCE_PRIMARY },
{ E_POPUP_BAR, "20.bar" },
{ E_POPUP_ITEM, "20.delete", N_("_Delete"), delete_task_list_cb, NULL, "edit-delete", 0, E_CAL_POPUP_SOURCE_USER|E_CAL_POPUP_SOURCE_PRIMARY },
+ { E_POPUP_ITEM, "30.mark_tasks_offline", N_("_Make available for offline use"), mark_offline_cb, NULL, "stock_disconnect", E_CAL_POPUP_SOURCE_OFFLINE, E_CAL_POPUP_SOURCE_USER|E_CAL_POPUP_SOURCE_PRIMARY|E_CAL_POPUP_SOURCE_OFFLINE },
+ { E_POPUP_ITEM, "40.mark_tasks_no_offline", N_("_Do not make available for offline use"), mark_no_offline_cb, NULL, "stock_connect", E_CAL_POPUP_SOURCE_NO_OFFLINE, E_CAL_POPUP_SOURCE_USER|E_CAL_POPUP_SOURCE_PRIMARY|E_CAL_POPUP_SOURCE_NO_OFFLINE },
{ E_POPUP_BAR, "99.bar" },
{ E_POPUP_ITEM, "99.properties", N_("_Properties"), edit_task_list_cb, NULL, "document-properties", 0, E_CAL_POPUP_SOURCE_PRIMARY },
diff --git a/calendar/importers/icalendar-importer.c b/calendar/importers/icalendar-importer.c
index da10434890..eb751d07a3 100644
--- a/calendar/importers/icalendar-importer.c
+++ b/calendar/importers/icalendar-importer.c
@@ -474,22 +474,34 @@ vcal_supported(EImport *ei, EImportTarget *target, EImportImporter *im)
if (g_file_get_contents(filename, &contents, NULL, NULL)) {
VObject *vcal;
+ icalcomponent *icalcomp;
- /* parse the file */
- vcal = Parse_MIME (contents, strlen (contents));
- g_free (contents);
+ icalcomp = e_cal_util_parse_ics_string (contents);
- if (vcal) {
- icalcomponent *icalcomp;
+ if (icalcomp && icalcomponent_is_valid (icalcomp)) {
+ /* If we can create proper iCalendar from the file, then
+ rather use ics importer, because it knows to read more
+ information than older version, the vCalendar. */
+ ret = FALSE;
+ g_free (contents);
+ } else {
+ if (icalcomp)
+ icalcomponent_free (icalcomp);
- icalcomp = icalvcal_convert (vcal);
+ /* parse the file */
+ vcal = Parse_MIME (contents, strlen (contents));
+ g_free (contents);
- if (icalcomp) {
- icalcomponent_free (icalcomp);
- ret = TRUE;
- }
+ if (vcal) {
+ icalcomp = icalvcal_convert (vcal);
- cleanVObject (vcal);
+ if (icalcomp) {
+ icalcomponent_free (icalcomp);
+ ret = TRUE;
+ }
+
+ cleanVObject (vcal);
+ }
}
}
g_free (filename);