From 0597b877c5bf4d21ac4048742ddf6b11e24877ba Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Fri, 18 Jul 2008 16:23:26 +0000 Subject: ** Fixes bug #542125 2008-07-18 Matthew Barnes ** Fixes bug #542125 ** This set of changes migrates CompEditor, CompEditorPage and the various subclasses from using BonoboUI to GtkUIManager for menus and toolbars. It also substantially cleans up the code and streamlines the CompEditorPage API, making more effective use of GObject properties. Core changes: * gui/dialogs/comp-editor-page.c: * gui/dialogs/comp-editor-page.h: * gui/dialogs/comp-editor.c: * gui/dialogs/comp-editor.h: * gui/dialogs/event-editor.c: * gui/dialogs/event-editor.h: * gui/dialogs/event-page.c: * gui/dialogs/event-page.h: * gui/dialogs/memo-editor.c: * gui/dialogs/memo-editor.h: * gui/dialogs/memo-page.c: * gui/dialogs/memo-page.h: * gui/dialogs/recurrence-page.c: * gui/dialogs/recurrence-page.h: * gui/dialogs/schedule-page.c: * gui/dialogs/schedule-page.h: * gui/dialogs/task-details-page.c: * gui/dialogs/task-details-page.h: * gui/dialogs/task-editor.c: * gui/dialogs/task-editor.h: * gui/dialogs/task-page.c: * gui/dialogs/task-page.h: Supporting changes: * gui/calendar-component.c: * gui/comp-editor-factory.c: * gui/e-cal-popup.c: * gui/e-calendar-table.c: * gui/e-calendar-view.c: * gui/e-comp-editor-registry.c: * gui/e-memo-table.c: * gui/e-tasks.c: * gui/gnome-cal.c: * gui/memos-component.c: * gui/tasks-component.c: * gui/dialogs/alarm-dialog.c: * gui/dialogs/comp-editor-util.c: * art/Makefile.am: Move query-free-busy.png to data/icons. svn path=/trunk/; revision=35753 --- calendar/gui/memos-component.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'calendar/gui/memos-component.c') diff --git a/calendar/gui/memos-component.c b/calendar/gui/memos-component.c index df17624f75..0d95f2c2d8 100644 --- a/calendar/gui/memos-component.c +++ b/calendar/gui/memos-component.c @@ -988,7 +988,7 @@ object_created_cb (CompEditor *ce, EMemoTable *memo_table) { g_return_if_fail (memo_table != NULL); - memo_table->user_created_cal = comp_editor_get_e_cal (ce); + memo_table->user_created_cal = comp_editor_get_client (ce); g_signal_emit_by_name (memo_table, "user_created"); memo_table->user_created_cal = NULL; } @@ -998,7 +998,7 @@ create_new_memo (MemosComponent *memo_component, gboolean is_assigned, MemosComp { ECal *ecal; ECalComponent *comp; - MemoEditor *editor; + CompEditor *editor; CompEditorFlags flags = 0; ecal = setup_create_ecal (memo_component, component_view); @@ -1017,10 +1017,10 @@ create_new_memo (MemosComponent *memo_component, gboolean is_assigned, MemosComp if (component_view) g_signal_connect (editor, "object_created", G_CALLBACK (object_created_cb), e_memos_get_calendar_table (component_view->memos)); - comp_editor_edit_comp (COMP_EDITOR (editor), comp); - comp_editor_focus (COMP_EDITOR (editor)); + comp_editor_edit_comp (editor, comp); + gtk_window_present (GTK_WINDOW (editor)); - e_comp_editor_registry_add (comp_editor_registry, COMP_EDITOR (editor), TRUE); + e_comp_editor_registry_add (comp_editor_registry, editor, TRUE); return TRUE; } -- cgit v1.2.3 From 6dd3a55a40a84a8666069d5122f715f93fc03251 Mon Sep 17 00:00:00 2001 From: Suman Manjunath Date: Mon, 4 Aug 2008 03:40:06 +0000 Subject: Matthew Barnes ** Fixes bug #249844 (Use C_() macro instead of Q_() macro, Use fully qualified names for New submenu entries). svn path=/trunk/; revision=35897 --- calendar/gui/memos-component.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'calendar/gui/memos-component.c') diff --git a/calendar/gui/memos-component.c b/calendar/gui/memos-component.c index 0d95f2c2d8..c6be74977b 100644 --- a/calendar/gui/memos-component.c +++ b/calendar/gui/memos-component.c @@ -1258,7 +1258,7 @@ impl__get_userCreatableItems (PortableServer_Servant servant, list->_buffer[0].id = CREATE_MEMO_ID; list->_buffer[0].description = _("New memo"); - list->_buffer[0].menuDescription = _("Mem_o"); + list->_buffer[0].menuDescription = C_("New", "Mem_o"); list->_buffer[0].tooltip = _("Create a new memo"); list->_buffer[0].menuShortcut = 'o'; list->_buffer[0].iconName = "stock_insert-note"; @@ -1266,7 +1266,7 @@ impl__get_userCreatableItems (PortableServer_Servant servant, list->_buffer[1].id = CREATE_SHARED_MEMO_ID; list->_buffer[1].description = _("New shared memo"); - list->_buffer[1].menuDescription = _("_Shared memo"); + list->_buffer[1].menuDescription = C_("New", "_Shared memo"); list->_buffer[1].tooltip = _("Create a shared new memo"); list->_buffer[1].menuShortcut = 'h'; list->_buffer[1].iconName = "stock_insert-note"; @@ -1274,7 +1274,7 @@ impl__get_userCreatableItems (PortableServer_Servant servant, list->_buffer[2].id = CREATE_MEMO_LIST_ID; list->_buffer[2].description = _("New memo list"); - list->_buffer[2].menuDescription = _("Memo li_st"); + list->_buffer[2].menuDescription = C_("New", "Memo li_st"); list->_buffer[2].tooltip = _("Create a new memo list"); list->_buffer[2].menuShortcut = '\0'; list->_buffer[2].iconName = "stock_notes"; -- cgit v1.2.3 From 6bf36561f19fede5232329407dbdbd1dec82f33c Mon Sep 17 00:00:00 2001 From: Michael Monreal Date: Wed, 6 Aug 2008 09:32:08 +0000 Subject: ** Fix for bug #467115 2008-08-06 Michael Monreal ** Fix for bug #467115 * addressbook/gui/component/addressbook-view.c: (addressbook_view_init): * calendar/gui/GNOME_Evolution_Calendar.server.in.in: * calendar/gui/memos-component.c: (create_component_view): * calendar/gui/tasks-component.c: (create_component_view): * data/icons/Makefile.am: * mail/GNOME_Evolution_Mail.server.in.in: * mail/mail-component.c: (impl_createView): Ship and use tango icons for the mail, tasks and memos components. svn path=/trunk/; revision=35915 --- calendar/gui/memos-component.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'calendar/gui/memos-component.c') diff --git a/calendar/gui/memos-component.c b/calendar/gui/memos-component.c index c6be74977b..89068a7f90 100644 --- a/calendar/gui/memos-component.c +++ b/calendar/gui/memos-component.c @@ -1098,7 +1098,7 @@ create_component_view (MemosComponent *memos_component) GTK_SHADOW_IN); gtk_widget_show (selector_scrolled_window); - component_view->info_label = (EInfoLabel *)e_info_label_new("stock_insert-note"); + component_view->info_label = (EInfoLabel *)e_info_label_new("evolution-memos"); e_info_label_set_info(component_view->info_label, _("Memos"), ""); gtk_widget_show (GTK_WIDGET (component_view->info_label)); -- cgit v1.2.3 From 670e6d167863d4c8d8dde107e7d8ac7a288e0b52 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Wed, 6 Aug 2008 15:44:47 +0000 Subject: ** Fix for bug #249844 2008-08-06 Milan Crha ** Fix for bug #249844 * addressbook/gui/component/addressbook-component.c: * calendar/gui/tasks-component.c: (impl__get_userCreatableItems): * calendar/gui/memos-component.c: (impl__get_userCreatableItems): * mail/mail-component.c: (impl__get_userCreatableItems): * shell/test/evolution-test-component.c: (impl__get_userCreatableItems): (impl__get_userCreatableItems): Do not let compiler claim. * mail/em-event.h: (struct _EMEventTargetCustomIcon): Declare 'folder_name' as const char * to let compiler happy; no copy of the pointer anyway. * calendar/gui/calendar-component.c: (impl__get_userCreatableItems): Use C_() macro instead of Q_() macro. Use fully qualified names for "New" submenu entries. svn path=/trunk/; revision=35916 --- calendar/gui/memos-component.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'calendar/gui/memos-component.c') diff --git a/calendar/gui/memos-component.c b/calendar/gui/memos-component.c index 89068a7f90..d0d17b0945 100644 --- a/calendar/gui/memos-component.c +++ b/calendar/gui/memos-component.c @@ -1258,7 +1258,7 @@ impl__get_userCreatableItems (PortableServer_Servant servant, list->_buffer[0].id = CREATE_MEMO_ID; list->_buffer[0].description = _("New memo"); - list->_buffer[0].menuDescription = C_("New", "Mem_o"); + list->_buffer[0].menuDescription = (char *) C_("New", "Mem_o"); list->_buffer[0].tooltip = _("Create a new memo"); list->_buffer[0].menuShortcut = 'o'; list->_buffer[0].iconName = "stock_insert-note"; @@ -1266,7 +1266,7 @@ impl__get_userCreatableItems (PortableServer_Servant servant, list->_buffer[1].id = CREATE_SHARED_MEMO_ID; list->_buffer[1].description = _("New shared memo"); - list->_buffer[1].menuDescription = C_("New", "_Shared memo"); + list->_buffer[1].menuDescription = (char *) C_("New", "_Shared memo"); list->_buffer[1].tooltip = _("Create a shared new memo"); list->_buffer[1].menuShortcut = 'h'; list->_buffer[1].iconName = "stock_insert-note"; @@ -1274,7 +1274,7 @@ impl__get_userCreatableItems (PortableServer_Servant servant, list->_buffer[2].id = CREATE_MEMO_LIST_ID; list->_buffer[2].description = _("New memo list"); - list->_buffer[2].menuDescription = C_("New", "Memo li_st"); + list->_buffer[2].menuDescription = (char *) C_("New", "Memo li_st"); list->_buffer[2].tooltip = _("Create a new memo list"); list->_buffer[2].menuShortcut = '\0'; list->_buffer[2].iconName = "stock_notes"; -- cgit v1.2.3 From 434bc25ed6b3f458f3bf119e76bd8b2bcffe5178 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Mon, 11 Aug 2008 17:04:32 +0000 Subject: ** Fixes bug #546892 2008-08-11 Matthew Barnes ** Fixes bug #546892 * e-util/e-icon-factory.c (e_icon_factory_get_image): Kill this function. Use gtk_image_new_from_icon_name(). * e-util/e-icon-factory.c (e_icon_factory_get_icon_list): Kill this function. Use gtk_window_set_icon_name(). * widgets/misc/e-activity-handler.c: * widgets/misc/e-task-widget.c: Purge the GdkPixbuf arguments from the API. We've been ignoring them since the spinner icon was added. * addressbook/gui/contact-editor/e-contact-editor-fullname.c: * addressbook/gui/contact-editor/e-contact-editor-im.c: * addressbook/gui/contact-editor/e-contact-editor-address.c: * calendar/gui/alarm-notify/alarm-notify-dialog.c: * calendar/gui/dialogs/alarm-dialog.c: * calendar/gui/dialogs/alarm-list-dialog.c: * calendar/gui/dialogs/cal-attachment-select-file.c: * calendar/gui/dialogs/changed-comp.c: * calendar/gui/dialogs/delete-error.c: * calendar/gui/dialogs/select-source-dialog.c: * mail/mail-send-recv.c: * mail/message-tag-followup.c: * widgets/misc/e-combo-button.c: * widgets/misc/e-info-label.c: * widgets/misc/e-url-entry.c: * widgets/misc/e-task-widget.c: Prefer gtk_window_set_icon_name() over gtk_window_set_icon_list(). * addressbook/gui/contact-editor/e-contact-editor-im.c: * calendar/gui/dialogs/event-page.c: * calendar/gui/e-timezone-entry.c: * e-util/e-gui-utils.c: * e-util/e-popup.c: * plugins/import-ics-attachments/icsimporter.c: * plugins/itip-formatter/itip-view.c: * mail/em-folder-browser.c: * mail/em-format-html-display.c: * mail/mail-send-recv.c: * mail/message-tag-followup.c: Prefer gtk_image_new_from_icon_name() over e_icon_factory_get_image(). * calendar/gui/alarm-notify/alarm-queue.c: * plugins/mail-notification/mail-notification.c: Prefer gtk_status_icon_set_from_icon_name() over gtk_status_icon_set_from_pixbuf(). * addressbook/gui/component/addressbook-view.c: * calendar/gui/e-calendar-table.c: * calendar/gui/e-calendar-view.c: * calendar/gui/e-memo-table.c: * mail/mail-mt.c: e_activity_handler_operation_started() no longer takes a GdkPixbuf. It was ignoring the pixbuf anyway ever since we added a spinner icon. svn path=/trunk/; revision=35958 --- calendar/gui/memos-component.c | 1 - 1 file changed, 1 deletion(-) (limited to 'calendar/gui/memos-component.c') diff --git a/calendar/gui/memos-component.c b/calendar/gui/memos-component.c index d0d17b0945..31280d52cb 100644 --- a/calendar/gui/memos-component.c +++ b/calendar/gui/memos-component.c @@ -51,7 +51,6 @@ #include "dialogs/copy-source-dialog.h" #include "dialogs/memo-editor.h" #include "widgets/misc/e-info-label.h" -#include "e-util/e-icon-factory.h" #include "e-util/e-error.h" #include "calendar-component.h" -- cgit v1.2.3 From f19618ac7f06b7f9e4bb2d7ce2e75de6e8554737 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Mon, 18 Aug 2008 04:37:15 +0000 Subject: ** Fixes bug #508732 2008-08-18 Matthew Barnes ** Fixes bug #508732 * shell/e-shell.c: Add a "crash_recovery" flag, with accessor functions for it. * shell/e-shell-window (init_view): Check and reset the "crash_recovery" flag before creating a new shell view. The components can use this flag to take steps to recover from the previous crash. * shell/apps_evolution_shell.schemas.in: Remove the "skip_recovery_dialog" and "recovery" keys. * shell/Evolution-Component.idl (createView): Add a "select_item" boolean parameter. * shell/main.c: Kill the crash recovery dialog. Instead just set the crash recovery flag in e-shell appropriately. * mail/mail-component.c (impl_createView): Add a "select_item" argument for crash recovery, which we forward to EMFolderBrowser as a "suppress_message_selection" flag. * mail/em-folder-browser.c (emfb_set_folder): Suppress automatic message selection if we are recovering from a crash. * addressbook/gui/component/addressbook-component.c (impl_createView): * calendar/gui/calendar-component.c (impl_createView): * calendar/gui/memos-component.c (impl_createView): * calendar/gui/tasks-component.c (impl_createView): Add a "select_item" argument for crash recovery, which these components do not use. * help/C/evolution.xml: Remove the bit about crash recovery. svn path=/trunk/; revision=36009 --- calendar/gui/memos-component.c | 1 + 1 file changed, 1 insertion(+) (limited to 'calendar/gui/memos-component.c') diff --git a/calendar/gui/memos-component.c b/calendar/gui/memos-component.c index 31280d52cb..adf54c5c2d 100644 --- a/calendar/gui/memos-component.c +++ b/calendar/gui/memos-component.c @@ -1215,6 +1215,7 @@ view_destroyed_cb (gpointer data, GObject *where_the_object_was) static GNOME_Evolution_ComponentView impl_createView (PortableServer_Servant servant, GNOME_Evolution_ShellView parent, + CORBA_boolean select_item, CORBA_Environment *ev) { MemosComponent *component = MEMOS_COMPONENT (bonobo_object_from_servant (servant)); -- cgit v1.2.3 From dd797d23c8de2d4971ea395b59b239b13866e8e4 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Tue, 23 Sep 2008 11:42:18 +0000 Subject: ** Fix for bug #553273 2008-09-23 Milan Crha ** Fix for bug #553273 * addressbook/gui/component/addressbook-view.c: (delete_addressbook_folder), (delete_addressbook_cb): * addressbook/gui/widgets/eab-gui-util.c: (save_it): * addressbook/gui/contact-list-editor/e-contact-list-model.c: (e_contact_list_model_add_email): * addressbook/gui/contact-list-editor/e-contact-list-editor.c: (contact_list_editor_contact_exists): * plugins/exchange-operations/exchange-config-listener.c: (exchange_config_listener_authenticate): * mail/em-composer-utils.c: (em_utils_handle_receipt): * mail/em-folder-view.c: (emfv_delete_msg_response): * composer/e-composer-actions.c: (action_save_cb): * calendar/gui/alarm-notify/alarm-queue.c: (edit_component): * calendar/gui/tasks-component.c: (delete_task_list_cb): * calendar/gui/calendar-component.c: (delete_calendar_cb): * calendar/gui/memos-component.c: (delete_memo_list_cb): Always end e_error_run/e_error_new calls with NULL parameter. svn path=/trunk/; revision=36434 --- calendar/gui/memos-component.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'calendar/gui/memos-component.c') diff --git a/calendar/gui/memos-component.c b/calendar/gui/memos-component.c index adf54c5c2d..cee6031404 100644 --- a/calendar/gui/memos-component.c +++ b/calendar/gui/memos-component.c @@ -415,7 +415,7 @@ delete_memo_list_cb (EPopup *ep, EPopupItem *pitem, void *data) return; if (e_error_run((GtkWindow *)gtk_widget_get_toplevel(ep->target->widget), - "calendar:prompt-delete-memo-list", e_source_peek_name(selected_source)) != GTK_RESPONSE_YES) + "calendar:prompt-delete-memo-list", e_source_peek_name(selected_source), NULL) != GTK_RESPONSE_YES) return; /* first, ask the backend to remove the memo list */ -- cgit v1.2.3 From 762ac32d75dc9ad72e66969afda09766592fd42f Mon Sep 17 00:00:00 2001 From: Sankarasivasubramanian Pasupathilingam Date: Wed, 24 Sep 2008 11:02:48 +0000 Subject: Change License from GPL to LGPL svn path=/trunk/; revision=36443 --- calendar/gui/memos-component.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'calendar/gui/memos-component.c') diff --git a/calendar/gui/memos-component.c b/calendar/gui/memos-component.c index cee6031404..dc2b888fe4 100644 --- a/calendar/gui/memos-component.c +++ b/calendar/gui/memos-component.c @@ -1,24 +1,24 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* memos-component.c - * - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) - * +/* * 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. + * 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 * - * 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. * - * Authors: Rodrigo Moya - * Nathan Owens + * Authors: + * Rodrigo Moya + * Nathan Owens + * + * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) + * */ #ifdef HAVE_CONFIG_H -- cgit v1.2.3 From a3b38ef1293fa8c8f162be5310e5b3dec8782a2e Mon Sep 17 00:00:00 2001 From: Suman Manjunath Date: Mon, 13 Oct 2008 10:24:07 +0000 Subject: Fix for bug #424818 (bugzilla.novell.com) - Integrate the mark-calendar-offline plugin into the main code as we already have a similar per-calendar option which does the same thing. svn path=/trunk/; revision=36610 --- calendar/gui/memos-component.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'calendar/gui/memos-component.c') diff --git a/calendar/gui/memos-component.c b/calendar/gui/memos-component.c index dc2b888fe4..931367cf39 100644 --- a/calendar/gui/memos-component.c +++ b/calendar/gui/memos-component.c @@ -460,12 +460,39 @@ edit_memo_list_cb (EPopup *ep, EPopupItem *pitem, void *data) calendar_setup_edit_memo_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) +{ + MemosComponentView *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 emc_source_popups[] = { { E_POPUP_ITEM, "10.new", N_("_New Memo List"), new_memo_list_cb, NULL, "stock_notes", 0, 0 }, { E_POPUP_ITEM, "15.copy", N_("_Copy..."), copy_memo_list_cb, NULL, "edit-copy", 0, E_CAL_POPUP_SOURCE_PRIMARY }, { E_POPUP_BAR, "20.bar" }, { E_POPUP_ITEM, "20.delete", N_("_Delete"), delete_memo_list_cb, NULL, "edit-delete", 0, E_CAL_POPUP_SOURCE_USER|E_CAL_POPUP_SOURCE_PRIMARY }, + { E_POPUP_ITEM, "30.mark_memos_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_memos_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_memo_list_cb, NULL, "document-properties", 0, E_CAL_POPUP_SOURCE_PRIMARY }, -- cgit v1.2.3 From 1a04fd272634d22277979c705ae854bea580905a Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Mon, 17 Nov 2008 19:30:33 +0000 Subject: ** Fixes bug #558322 2008-11-17 Matthew Barnes ** Fixes bug #558322 * addressbook/gui/component/addressbook-view.c (rename_addressbook_cb): * calendar/gui/calendar-component.c (rename_calendar_cb): * calendar/gui/memos-component.c (rename_memo_list_cb): * calendar/gui/tasks-component.c (rename_task_list_cb): New "Rename" item in the source selector pop-up menu calls the recently added e_source_selector_edit_primary_selection(). Still need to bind the "F2" key to this action, but I'm not sure how whether EPopup supports that. svn path=/trunk/; revision=36791 --- calendar/gui/memos-component.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'calendar/gui/memos-component.c') diff --git a/calendar/gui/memos-component.c b/calendar/gui/memos-component.c index 931367cf39..b8b0983d75 100644 --- a/calendar/gui/memos-component.c +++ b/calendar/gui/memos-component.c @@ -447,6 +447,16 @@ new_memo_list_cb (EPopup *ep, EPopupItem *pitem, void *data) calendar_setup_new_memo_list (GTK_WINDOW (gtk_widget_get_toplevel(ep->target->widget))); } +static void +rename_memo_list_cb (EPopup *ep, EPopupItem *pitem, void *data) +{ + MemosComponentView *component_view = data; + ESourceSelector *selector; + + selector = E_SOURCE_SELECTOR (component_view->source_selector); + e_source_selector_edit_primary_selection (selector); +} + static void edit_memo_list_cb (EPopup *ep, EPopupItem *pitem, void *data) { @@ -488,6 +498,7 @@ mark_offline_cb (EPopup *ep, EPopupItem *pitem, void *data) static EPopupItem emc_source_popups[] = { { E_POPUP_ITEM, "10.new", N_("_New Memo List"), new_memo_list_cb, NULL, "stock_notes", 0, 0 }, { E_POPUP_ITEM, "15.copy", N_("_Copy..."), copy_memo_list_cb, NULL, "edit-copy", 0, E_CAL_POPUP_SOURCE_PRIMARY }, + { E_POPUP_ITEM, "18.rename", N_("_Rename..."), rename_memo_list_cb, NULL, NULL, 0, E_CAL_POPUP_SOURCE_PRIMARY }, { E_POPUP_BAR, "20.bar" }, { E_POPUP_ITEM, "20.delete", N_("_Delete"), delete_memo_list_cb, NULL, "edit-delete", 0, E_CAL_POPUP_SOURCE_USER|E_CAL_POPUP_SOURCE_PRIMARY }, -- cgit v1.2.3 From 8425d8bbe6359a1baae04f569864f72d34144b5c Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Mon, 17 Nov 2008 21:09:36 +0000 Subject: ** Fixes bug #557818 2008-11-17 Matthew Barnes ** Fixes bug #557818 * addressbook/gui/component/addressbook-view.c: * calendar/gui/calendar-component.c: * calendar/gui/memos-component.c: * calendar/gui/tasks-component.c: ESourceSelector now handles most of the drag-and-drop signals. We just have to listen for the new "data-dropped" signal and deal with it. Gets rid of a lot of duplicate logic. svn path=/trunk/; revision=36793 --- calendar/gui/memos-component.c | 153 ++++------------------------------------- 1 file changed, 15 insertions(+), 138 deletions(-) (limited to 'calendar/gui/memos-component.c') diff --git a/calendar/gui/memos-component.c b/calendar/gui/memos-component.c index b8b0983d75..8ae51a5fb5 100644 --- a/calendar/gui/memos-component.c +++ b/calendar/gui/memos-component.c @@ -637,90 +637,6 @@ impl_upgradeFromVersion (PortableServer_Servant servant, g_error_free(err); } -static gboolean -selector_tree_drag_drop (GtkWidget *widget, - GdkDragContext *context, - int x, - int y, - guint time, - CalendarComponent *component) -{ - GtkTreeViewColumn *column; - int cell_x; - int cell_y; - GtkTreePath *path; - GtkTreeModel *model; - GtkTreeIter iter; - gpointer data; - - if (!gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (widget), x, y, &path, - &column, &cell_x, &cell_y)) - return FALSE; - - - model = gtk_tree_view_get_model (GTK_TREE_VIEW (widget)); - - if (!gtk_tree_model_get_iter (model, &iter, path)) { - gtk_tree_path_free (path); - return FALSE; - } - - gtk_tree_model_get (model, &iter, 0, &data, -1); - - if (E_IS_SOURCE_GROUP (data)) { - g_object_unref (data); - gtk_tree_path_free (path); - return FALSE; - } - - gtk_tree_path_free (path); - return TRUE; -} - -static gboolean -selector_tree_drag_motion (GtkWidget *widget, - GdkDragContext *context, - int x, - int y, - guint time, - gpointer user_data) -{ - GtkTreePath *path = NULL; - gpointer data = NULL; - GtkTreeViewDropPosition pos; - GtkTreeModel *model; - GtkTreeIter iter; - GdkDragAction action = GDK_ACTION_DEFAULT; - - if (!gtk_tree_view_get_dest_row_at_pos (GTK_TREE_VIEW (widget), - x, y, &path, &pos)) - goto finish; - - model = gtk_tree_view_get_model (GTK_TREE_VIEW (widget)); - - if (!gtk_tree_model_get_iter (model, &iter, path)) - goto finish; - - gtk_tree_model_get (model, &iter, 0, &data, -1); - - if (E_IS_SOURCE_GROUP (data) || e_source_get_readonly (data)) - goto finish; - - gtk_tree_view_set_drag_dest_row(GTK_TREE_VIEW (widget), path, GTK_TREE_VIEW_DROP_INTO_OR_BEFORE); - action = context->suggested_action; - if (action == GDK_ACTION_COPY && (context->actions & GDK_ACTION_MOVE)) - action=GDK_ACTION_MOVE; - - finish: - if (path) - gtk_tree_path_free (path); - if (data) - g_object_unref (data); - - gdk_drag_status (context, action, time); - return TRUE; -} - static gboolean update_single_object (ECal *client, icalcomponent *icalcomp, gboolean fail_on_modify) { @@ -782,43 +698,21 @@ update_objects (ECal *client, icalcomponent *icalcomp) return TRUE; } -static void -selector_tree_drag_data_received (GtkWidget *widget, - GdkDragContext *context, - gint x, - gint y, - GtkSelectionData *data, - guint info, - guint time, - gpointer user_data) +static gboolean +selector_tree_data_dropped (ESourceSelector *selector, + GtkSelectionData *data, + ESource *destination, + GdkDragAction action, + guint info, + MemosComponent *component) { - GtkTreePath *path = NULL; - GtkTreeViewDropPosition pos; - gpointer source = NULL; - GtkTreeModel *model; - GtkTreeIter iter; gboolean success = FALSE; icalcomponent *icalcomp = NULL; ECal *client = NULL; GSList *components, *p; - MemosComponent *component = MEMOS_COMPONENT (user_data); - - if (!gtk_tree_view_get_dest_row_at_pos (GTK_TREE_VIEW (widget), - x, y, &path, &pos)) - goto finish; - model = gtk_tree_view_get_model (GTK_TREE_VIEW (widget)); - - if (!gtk_tree_model_get_iter (model, &iter, path)) - goto finish; - - - gtk_tree_model_get (model, &iter, 0, &source, -1); - - if (E_IS_SOURCE_GROUP (source) || e_source_get_readonly (source) || !data->data) - goto finish; - - client = auth_new_cal_from_source (source, E_CAL_SOURCE_TYPE_JOURNAL); + client = auth_new_cal_from_source ( + destination, E_CAL_SOURCE_TYPE_JOURNAL); if (!client || !e_cal_open (client, TRUE, NULL)) goto finish; @@ -844,7 +738,7 @@ selector_tree_drag_data_received (GtkWidget *widget, continue; /* FIXME deal with GDK_ACTION_ASK */ - if (context->action == GDK_ACTION_COPY) { + if (action == GDK_ACTION_COPY) { old_uid = g_strdup (icalcomponent_get_uid (icalcomp)); uid = e_cal_component_gen_uid (); icalcomponent_set_uid (icalcomp, uid); @@ -861,7 +755,7 @@ selector_tree_drag_data_received (GtkWidget *widget, /* this will report success by last item, but we don't care */ success = update_objects (client, icalcomp); - if (success && context->action == GDK_ACTION_MOVE) { + if (success && action == GDK_ACTION_MOVE) { /* remove components rather here, because we know which has been moved */ ESource *source_source; ECal *source_client; @@ -901,22 +795,10 @@ selector_tree_drag_data_received (GtkWidget *widget, finish: if (client) g_object_unref (client); - if (source) - g_object_unref (source); - if (path) - gtk_tree_path_free (path); - gtk_drag_finish (context, success, success && context->action == GDK_ACTION_MOVE, time); + return success; } -static void -selector_tree_drag_leave (GtkWidget *widget, GdkDragContext *context, guint time, gpointer data) -{ - gtk_tree_view_set_drag_dest_row(GTK_TREE_VIEW (widget), - NULL, GTK_TREE_VIEW_DROP_BEFORE); -} - - static void control_activate_cb (BonoboControl *control, gboolean activate, gpointer data) { @@ -1113,14 +995,9 @@ create_component_view (MemosComponent *memos_component) a11y = gtk_widget_get_accessible (GTK_WIDGET (component_view->source_selector)); atk_object_set_name (a11y, _("Memo Source Selector")); - g_signal_connect (component_view->source_selector, "drag-motion", G_CALLBACK (selector_tree_drag_motion), - memos_component); - g_signal_connect (component_view->source_selector, "drag-leave", G_CALLBACK (selector_tree_drag_leave), - memos_component); - g_signal_connect (component_view->source_selector, "drag-drop", G_CALLBACK (selector_tree_drag_drop), - memos_component); - g_signal_connect (component_view->source_selector, "drag-data-received", - G_CALLBACK (selector_tree_drag_data_received), memos_component); + g_signal_connect ( + component_view->source_selector, "data-dropped", + G_CALLBACK (selector_tree_data_dropped), memos_component); gtk_drag_dest_set(component_view->source_selector, GTK_DEST_DEFAULT_ALL, drag_types, num_drag_types, GDK_ACTION_COPY | GDK_ACTION_MOVE); -- cgit v1.2.3 From 607ce3802eabee692e55d89aacefd06390819e07 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Fri, 9 Jan 2009 07:36:29 +0000 Subject: Reviewed by Matthew Barnes 2009-01-09 Takao Fujiwara Reviewed by Matthew Barnes * Fix for bug #566011 * addressbook/gui/component/Makefile.am: * addressbook/gui/component/addressbook-component.c (addressbook_component_class_init): Include instead of and add bindtextdomain(). * calendar/gui/Makefile.am: * calendar/gui/calendar-component.c (calendar_component_class_init): * calendar/gui/dialogs/comp-editor.c: * calendar/gui/memos-component.c (memos_component_class_init): * calendar/gui/tasks-component.c (tasks_component_class_init): Include instead of and add bindtextdomain(). * composer/e-composer-header-table.c: * composer/e-composer-private.h: Include instead of . * mail/mail-component.c (mail_component_class_init): Include instead of and add bindtextdomain(). * shell/e-user-creatable-items-handler.c (e_user_creatable_items_handler_class_ini): Include instead of and add bindtextdomain(). * widgets/misc/e-charset-picker.c: * widgets/misc/e-signature-combo-box.c: Include instead of . svn path=/trunk/; revision=37021 --- calendar/gui/memos-component.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'calendar/gui/memos-component.c') diff --git a/calendar/gui/memos-component.c b/calendar/gui/memos-component.c index 8ae51a5fb5..fea1a53fff 100644 --- a/calendar/gui/memos-component.c +++ b/calendar/gui/memos-component.c @@ -27,7 +27,7 @@ #include #include -#include +#include #include #include #include @@ -1286,6 +1286,9 @@ memos_component_class_init (MemosComponentClass *klass) POA_GNOME_Evolution_Component__epv *epv = &klass->epv; GObjectClass *object_class = G_OBJECT_CLASS (klass); + bindtextdomain (GETTEXT_PACKAGE, EVOLUTION_LOCALEDIR); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); + parent_class = g_type_class_peek_parent (klass); epv->upgradeFromVersion = impl_upgradeFromVersion; -- cgit v1.2.3 From 4b2e8a5ec5ac91f0209a83587c8b81787fff9875 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Wed, 21 Jan 2009 19:30:36 +0000 Subject: ** Fix for bug #362754 2009-01-21 Milan Crha ** Fix for bug #362754 * addressbook/gui/component/addressbook-component.c: (ensure_sources): * calendar/gui/tasks-component.c: (ensure_sources): * calendar/gui/memos-component.c: (ensure_sources): * calendar/gui/calendar-component.c: (ensure_sources): Ensure to show default groups and sources with actual localized name, not the one it was stored last time. svn path=/trunk/; revision=37117 --- calendar/gui/memos-component.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'calendar/gui/memos-component.c') diff --git a/calendar/gui/memos-component.c b/calendar/gui/memos-component.c index fea1a53fff..02c1df50ff 100644 --- a/calendar/gui/memos-component.c +++ b/calendar/gui/memos-component.c @@ -193,6 +193,9 @@ ensure_sources (MemosComponent *component) and too late to prevent user seeing "Can not Open ... because of invalid uri" error.*/ e_source_list_sync (source_list,NULL); } + + /* ensure the group name is in current locale, not read from configuration */ + e_source_group_set_name (on_this_computer, _("On This Computer")); } else { /* create the local source group */ @@ -202,7 +205,10 @@ ensure_sources (MemosComponent *component) on_this_computer = group; } - if (!personal_source) { + if (personal_source) { + /* ensure the source name is in current locale, not read from configuration */ + e_source_set_name (personal_source, _("Personal")); + } else { GSList *memos_selected; /* Create the default Person addressbook */ ESource *source = e_source_new (_("Personal"), PERSONAL_RELATIVE_URI); @@ -230,8 +236,11 @@ ensure_sources (MemosComponent *component) personal_source = source; } - if (!on_the_web) { - /* Create the LDAP source group */ + if (on_the_web) { + /* ensure the group name is in current locale, not read from configuration */ + e_source_group_set_name (on_the_web, _("On The Web")); + } else { + /* Create the source group */ group = e_source_group_new (_("On The Web"), WEB_BASE_URI); e_source_list_add_group (source_list, group, -1); -- cgit v1.2.3 From 2e94db8a65126ffcb456bd2823cf45e5b1510b0b Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Tue, 27 Jan 2009 12:32:09 +0000 Subject: ** Fix for bug #318003 2009-01-27 Milan Crha ** Fix for bug #318003 * gui/memos-component.c: (selector_tree_data_dropped): * gui/tasks-component.c: (selector_tree_data_dropped): * gui/calendar-component.c: (selector_tree_data_dropped), (create_component_view): * gui/comp-util.h: (cal_comp_process_source_list_drop): * gui/comp-util.c: (update_single_object), (update_objects), (cal_comp_process_source_list_drop): Support move of the event in day view when dropped over the source list. Use the same function for events/tasks/memos. * gui/e-day-view.c: (e_day_view_on_drag_data_get): Encode string data same as memos and tasks do, with a source UID. * gui/e-calendar-table.c: (e_calendar_table_copy_clipboard): * gui/e-memo-table.c: (e_memo_table_copy_clipboard): Removed inappropriate comments. svn path=/trunk/; revision=37140 --- calendar/gui/memos-component.c | 120 ++--------------------------------------- 1 file changed, 4 insertions(+), 116 deletions(-) (limited to 'calendar/gui/memos-component.c') diff --git a/calendar/gui/memos-component.c b/calendar/gui/memos-component.c index 02c1df50ff..82961c0ded 100644 --- a/calendar/gui/memos-component.c +++ b/calendar/gui/memos-component.c @@ -646,67 +646,6 @@ impl_upgradeFromVersion (PortableServer_Servant servant, g_error_free(err); } -static gboolean -update_single_object (ECal *client, icalcomponent *icalcomp, gboolean fail_on_modify) -{ - char *uid; - icalcomponent *tmp_icalcomp; - - d(g_message("memos-component.c: update_single_object called");) - - uid = (char *) icalcomponent_get_uid (icalcomp); - - if (e_cal_get_object (client, uid, NULL, &tmp_icalcomp, NULL)) { - if (fail_on_modify) - return FALSE; - else - return e_cal_modify_object (client, icalcomp, CALOBJ_MOD_ALL, NULL); - } - - return e_cal_create_object (client, icalcomp, &uid, NULL); -} - -static gboolean -update_objects (ECal *client, icalcomponent *icalcomp) -{ - icalcomponent *subcomp; - icalcomponent_kind kind; - - d(g_message("memos-component.c: update_objects called");) - - kind = icalcomponent_isa (icalcomp); - if (kind == ICAL_VJOURNAL_COMPONENT) - return update_single_object (client, icalcomp, TRUE); - else if (kind != ICAL_VCALENDAR_COMPONENT) - return FALSE; - - subcomp = icalcomponent_get_first_component (icalcomp, ICAL_ANY_COMPONENT); - while (subcomp) { - gboolean success; - - kind = icalcomponent_isa (subcomp); - if (kind == ICAL_VTIMEZONE_COMPONENT) { - icaltimezone *zone; - - zone = icaltimezone_new (); - icaltimezone_set_component (zone, subcomp); - - success = e_cal_add_timezone (client, zone, NULL); - icaltimezone_free (zone, 1); - if (!success) - return success; - } else if (kind == ICAL_VJOURNAL_COMPONENT) { - success = update_single_object (client, subcomp, TRUE); - if (!success) - return success; - } - - subcomp = icalcomponent_get_next_component (icalcomp, ICAL_ANY_COMPONENT); - } - - return TRUE; -} - static gboolean selector_tree_data_dropped (ESourceSelector *selector, GtkSelectionData *data, @@ -727,11 +666,8 @@ selector_tree_data_dropped (ESourceSelector *selector, goto finish; components = cal_comp_selection_get_string_list (data); - for (p = components; p; p = p->next) { - const char * uid; - char *old_uid = NULL; - icalcomponent *tmp_icalcomp = NULL; - GError *error = NULL; + success = components != NULL; + for (p = components; p && success; p = p->next) { char *comp_str; /* do not free this! */ /* p->data is "source_uid\ncomponent_string" */ @@ -746,58 +682,10 @@ selector_tree_data_dropped (ESourceSelector *selector, if (!icalcomp) continue; - /* FIXME deal with GDK_ACTION_ASK */ - if (action == GDK_ACTION_COPY) { - old_uid = g_strdup (icalcomponent_get_uid (icalcomp)); - uid = e_cal_component_gen_uid (); - icalcomponent_set_uid (icalcomp, uid); - } - - uid = icalcomponent_get_uid (icalcomp); - if (!old_uid) - old_uid = g_strdup (uid); - - if (!e_cal_get_object (client, uid, NULL, &tmp_icalcomp, &error)) { - if ((error != NULL) && (error->code != E_CALENDAR_STATUS_OBJECT_NOT_FOUND)) - g_message ("Failed to search the object in destination task list: %s",error->message); - else { - /* this will report success by last item, but we don't care */ - success = update_objects (client, icalcomp); - - if (success && action == GDK_ACTION_MOVE) { - /* remove components rather here, because we know which has been moved */ - ESource *source_source; - ECal *source_client; - - source_source = e_source_list_peek_source_by_uid (component->priv->source_list, p->data); - - if (source_source && !E_IS_SOURCE_GROUP (source_source) && !e_source_get_readonly (source_source)) { - source_client = auth_new_cal_from_source (source_source, E_CAL_SOURCE_TYPE_JOURNAL); - - if (source_client) { - gboolean read_only = TRUE; - - e_cal_is_read_only (source_client, &read_only, NULL); - - if (!read_only && e_cal_open (source_client, TRUE, NULL)) - e_cal_remove_object (source_client, old_uid, NULL); - else if (!read_only) - g_message ("Cannot open source client to remove old memo"); - - g_object_unref (source_client); - } else - g_message ("Cannot create source client to remove old memo"); - } - } - } - - g_clear_error (&error); - } else - icalcomponent_free (tmp_icalcomp); - - g_free (old_uid); + success = cal_comp_process_source_list_drop (client, icalcomp, action, p->data, component->priv->source_list); icalcomponent_free (icalcomp); } + g_slist_foreach (components, (GFunc)g_free, NULL); g_slist_free (components); -- cgit v1.2.3 From 51dba6bd0c19773ba8b631efbf51c07d548fc75c Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sun, 1 Feb 2009 01:18:42 +0000 Subject: ** Disable debug macros (#define d(x) x) throughout. (#569638) 2009-01-31 Matthew Barnes ** Disable debug macros (#define d(x) x) throughout. (#569638) svn path=/trunk/; revision=37202 --- calendar/gui/memos-component.c | 1 - 1 file changed, 1 deletion(-) (limited to 'calendar/gui/memos-component.c') diff --git a/calendar/gui/memos-component.c b/calendar/gui/memos-component.c index 82961c0ded..3fbebd7e3e 100644 --- a/calendar/gui/memos-component.c +++ b/calendar/gui/memos-component.c @@ -118,7 +118,6 @@ struct _MemosComponentPrivate { GList *notifications; }; -/* #define d(x) x */ #define d(x) static void -- cgit v1.2.3