evolution r36705 - in branches/kill-bonobo: . addressbook/gui/component calendar/modules plugins/select-one-source ui



Author: mbarnes
Date: Fri Oct 31 12:54:01 2008
New Revision: 36705
URL: http://svn.gnome.org/viewvc/evolution?rev=36705&view=rev

Log:
Support inline renaming of sources in the source selector, with help
from evolution-data-server (see bug #558322).
Kill another frivolous plugin: select-one-source


Removed:
   branches/kill-bonobo/plugins/select-one-source/
Modified:
   branches/kill-bonobo/addressbook/gui/component/e-book-shell-view-actions.c
   branches/kill-bonobo/addressbook/gui/component/e-book-shell-view.c
   branches/kill-bonobo/calendar/modules/e-cal-shell-view-actions.c
   branches/kill-bonobo/calendar/modules/e-cal-shell-view-actions.h
   branches/kill-bonobo/calendar/modules/e-cal-shell-view-private.c
   branches/kill-bonobo/calendar/modules/e-cal-shell-view.c
   branches/kill-bonobo/calendar/modules/e-memo-shell-sidebar.c
   branches/kill-bonobo/calendar/modules/e-memo-shell-view-actions.c
   branches/kill-bonobo/calendar/modules/e-memo-shell-view-actions.h
   branches/kill-bonobo/calendar/modules/e-memo-shell-view.c
   branches/kill-bonobo/calendar/modules/e-task-shell-view-actions.c
   branches/kill-bonobo/calendar/modules/e-task-shell-view-actions.h
   branches/kill-bonobo/calendar/modules/e-task-shell-view.c
   branches/kill-bonobo/configure.in
   branches/kill-bonobo/ui/evolution-calendars.ui
   branches/kill-bonobo/ui/evolution-contacts.ui
   branches/kill-bonobo/ui/evolution-memos.ui
   branches/kill-bonobo/ui/evolution-tasks.ui

Modified: branches/kill-bonobo/addressbook/gui/component/e-book-shell-view-actions.c
==============================================================================
--- branches/kill-bonobo/addressbook/gui/component/e-book-shell-view-actions.c	(original)
+++ branches/kill-bonobo/addressbook/gui/component/e-book-shell-view-actions.c	Fri Oct 31 12:54:01 2008
@@ -173,6 +173,19 @@
 }
 
 static void
+action_address_book_rename_cb (GtkAction *action,
+                               EBookShellView *book_shell_view)
+{
+	EBookShellSidebar *book_shell_sidebar;
+	ESourceSelector *selector;
+
+	book_shell_sidebar = book_shell_view->priv->book_shell_sidebar;
+	selector = e_book_shell_sidebar_get_selector (book_shell_sidebar);
+
+	e_source_selector_edit_primary_selection (selector);
+}
+
+static void
 action_address_book_save_as_cb (GtkAction *action,
                                 EBookShellView *book_shell_view)
 {
@@ -523,6 +536,13 @@
 	  N_("Show properties of the selected address book"),
 	  G_CALLBACK (action_address_book_properties_cb) },
 
+	{ "address-book-rename",
+	  NULL,
+	  N_("_Rename..."),
+	  "F2",
+	  N_("Rename the selected address book"),
+	  G_CALLBACK (action_address_book_rename_cb) },
+
 	{ "address-book-save-as",
 	  GTK_STOCK_SAVE_AS,
 	  N_("S_ave Address Book as vCard"),

Modified: branches/kill-bonobo/addressbook/gui/component/e-book-shell-view.c
==============================================================================
--- branches/kill-bonobo/addressbook/gui/component/e-book-shell-view.c	(original)
+++ branches/kill-bonobo/addressbook/gui/component/e-book-shell-view.c	Fri Oct 31 12:54:01 2008
@@ -197,6 +197,10 @@
 	sensitive = has_primary_source && !primary_source_is_system;
 	gtk_action_set_sensitive (action, sensitive);
 
+	action = ACTION (ADDRESS_BOOK_RENAME);
+	sensitive = has_primary_source;
+	gtk_action_set_sensitive (action, sensitive);
+
 	action = ACTION (ADDRESS_BOOK_STOP);
 	sensitive = source_is_busy;
 	gtk_action_set_sensitive (action, sensitive);

Modified: branches/kill-bonobo/calendar/modules/e-cal-shell-view-actions.c
==============================================================================
--- branches/kill-bonobo/calendar/modules/e-cal-shell-view-actions.c	(original)
+++ branches/kill-bonobo/calendar/modules/e-cal-shell-view-actions.c	Fri Oct 31 12:54:01 2008
@@ -284,6 +284,49 @@
 }
 
 static void
+action_calendar_rename_cb (GtkAction *action,
+                           ECalShellView *cal_shell_view)
+{
+	ECalShellSidebar *cal_shell_sidebar;
+	ESourceSelector *selector;
+
+	cal_shell_sidebar = cal_shell_view->priv->cal_shell_sidebar;
+	selector = e_cal_shell_sidebar_get_selector (cal_shell_sidebar);
+
+	e_source_selector_edit_primary_selection (selector);
+}
+
+static void
+action_calendar_select_one_cb (GtkAction *action,
+                               ECalShellView *cal_shell_view)
+{
+	ECalShellSidebar *cal_shell_sidebar;
+	ESourceSelector *selector;
+	ESource *primary;
+	GSList *list, *iter;
+
+	/* XXX ESourceSelector should provide a function for this. */
+
+	cal_shell_sidebar = cal_shell_view->priv->cal_shell_sidebar;
+	selector = e_cal_shell_sidebar_get_selector (cal_shell_sidebar);
+	primary = e_source_selector_peek_primary_selection (selector);
+	g_return_if_fail (primary != NULL);
+
+	list = e_source_selector_get_selection (selector);
+	for (iter = list; iter != NULL; iter = iter->next) {
+		ESource *source = iter->data;
+
+		if (source == primary)
+			continue;
+
+		e_source_selector_unselect_source (selector, source);
+	}
+	e_source_selector_free_selection (list);
+
+	e_source_selector_select_source (selector, primary);
+}
+
+static void
 action_calendar_view_cb (GtkRadioAction *action,
                          GtkRadioAction *current,
                          ECalShellView *cal_shell_view)
@@ -615,6 +658,20 @@
 	  N_("Purge old appointments and meetings"),
 	  G_CALLBACK (action_calendar_purge_cb) },
 
+	{ "calendar-rename",
+	  NULL,
+	  N_("_Rename..."),
+	  "F2",
+	  N_("Rename the selected calendar"),
+	  G_CALLBACK (action_calendar_rename_cb) },
+
+	{ "calendar-select-one",
+	  "stock_check-filled",
+	  N_("Show _Only This Calendar"),
+	  NULL,
+	  NULL,  /* XXX Add a tooltip! */
+	  G_CALLBACK (action_calendar_select_one_cb) },
+
 	{ "event-clipboard-copy",
 	  GTK_STOCK_COPY,
 	  NULL,

Modified: branches/kill-bonobo/calendar/modules/e-cal-shell-view-actions.h
==============================================================================
--- branches/kill-bonobo/calendar/modules/e-cal-shell-view-actions.h	(original)
+++ branches/kill-bonobo/calendar/modules/e-cal-shell-view-actions.h	Fri Oct 31 12:54:01 2008
@@ -47,6 +47,10 @@
 	E_SHELL_WINDOW_ACTION ((window), "calendar-properties")
 #define E_SHELL_WINDOW_ACTION_CALENDAR_PURGE(window) \
 	E_SHELL_WINDOW_ACTION ((window), "calendar-purge")
+#define E_SHELL_WINDOW_ACTION_CALENDAR_RENAME(window) \
+	E_SHELL_WINDOW_ACTION ((window), "calendar-rename")
+#define E_SHELL_WINDOW_ACTION_CALENDAR_SELECT_ONE(window) \
+	E_SHELL_WINDOW_ACTION ((window), "calendar-select-one")
 #define E_SHELL_WINDOW_ACTION_CALENDAR_VIEW_DAY(window) \
 	E_SHELL_WINDOW_ACTION ((window), "calendar-view-day")
 #define E_SHELL_WINDOW_ACTION_CALENDAR_VIEW_LIST(window) \

Modified: branches/kill-bonobo/calendar/modules/e-cal-shell-view-private.c
==============================================================================
--- branches/kill-bonobo/calendar/modules/e-cal-shell-view-private.c	(original)
+++ branches/kill-bonobo/calendar/modules/e-cal-shell-view-private.c	Fri Oct 31 12:54:01 2008
@@ -116,6 +116,19 @@
 		cal_shell_view, calitem);
 }
 
+static gboolean
+cal_shell_view_selector_popup_event_cb (EShellView *shell_view,
+                                        ESource *primary_source,
+                                        GdkEventButton *event)
+{
+	const gchar *widget_path;
+
+	widget_path = "/calendar-popup";
+	e_shell_view_show_popup_menu (shell_view, widget_path, event);
+
+	return TRUE;
+}
+
 static void
 cal_shell_view_memopad_popup_event_cb (EShellView *shell_view,
                                        GdkEventButton *event)
@@ -240,6 +253,7 @@
 	ECalendar *mini_calendar;
 	EMemoTable *memo_table;
 	ECalendarTable *task_table;
+	ESourceSelector *selector;
 	guint id;
 
 	shell_view = E_SHELL_VIEW (cal_shell_view);
@@ -256,6 +270,7 @@
 	task_table = e_cal_shell_content_get_task_table (cal_shell_content);
 
 	cal_shell_sidebar = E_CAL_SHELL_SIDEBAR (shell_sidebar);
+	selector = e_cal_shell_sidebar_get_selector (cal_shell_sidebar);
 	mini_calendar = e_cal_shell_sidebar_get_mini_calendar (cal_shell_sidebar);
 
 	e_calendar_item_set_get_time_callback (
@@ -285,6 +300,11 @@
 		cal_shell_view);
 
 	g_signal_connect_swapped (
+		selector, "popup-event",
+		G_CALLBACK (cal_shell_view_selector_popup_event_cb),
+		cal_shell_view);
+
+	g_signal_connect_swapped (
 		memo_table, "popup-event",
 		G_CALLBACK (cal_shell_view_memopad_popup_event_cb),
 		cal_shell_view);

Modified: branches/kill-bonobo/calendar/modules/e-cal-shell-view.c
==============================================================================
--- branches/kill-bonobo/calendar/modules/e-cal-shell-view.c	(original)
+++ branches/kill-bonobo/calendar/modules/e-cal-shell-view.c	Fri Oct 31 12:54:01 2008
@@ -140,6 +140,10 @@
 	sensitive = (source != NULL);
 	gtk_action_set_sensitive (action, sensitive);
 
+	action = ACTION (CALENDAR_RENAME);
+	sensitive = has_primary_source;
+	gtk_action_set_sensitive (action, sensitive);
+
 	action = ACTION (EVENT_CLIPBOARD_COPY);
 	sensitive = (n_selected > 0);
 	gtk_action_set_sensitive (action, sensitive);

Modified: branches/kill-bonobo/calendar/modules/e-memo-shell-sidebar.c
==============================================================================
--- branches/kill-bonobo/calendar/modules/e-memo-shell-sidebar.c	(original)
+++ branches/kill-bonobo/calendar/modules/e-memo-shell-sidebar.c	Fri Oct 31 12:54:01 2008
@@ -463,9 +463,9 @@
 	}
 
 	if (source != NULL)
-		state = E_MEMO_SHELL_SIDEBAR_HAS_PRIMARY_SOURCE;
+		state |= E_MEMO_SHELL_SIDEBAR_HAS_PRIMARY_SOURCE;
 	if (is_system)
-		state = E_MEMO_SHELL_SIDEBAR_PRIMARY_SOURCE_IS_SYSTEM;
+		state |= E_MEMO_SHELL_SIDEBAR_PRIMARY_SOURCE_IS_SYSTEM;
 
 	return state;
 }

Modified: branches/kill-bonobo/calendar/modules/e-memo-shell-view-actions.c
==============================================================================
--- branches/kill-bonobo/calendar/modules/e-memo-shell-view-actions.c	(original)
+++ branches/kill-bonobo/calendar/modules/e-memo-shell-view-actions.c	Fri Oct 31 12:54:01 2008
@@ -289,6 +289,19 @@
 }
 
 static void
+action_memo_list_rename_cb (GtkAction *action,
+                            EMemoShellView *memo_shell_view)
+{
+	EMemoShellSidebar *memo_shell_sidebar;
+	ESourceSelector *selector;
+
+	memo_shell_sidebar = memo_shell_view->priv->memo_shell_sidebar;
+	selector = e_memo_shell_sidebar_get_selector (memo_shell_sidebar);
+
+	e_source_selector_edit_primary_selection (selector);
+}
+
+static void
 action_memo_list_select_one_cb (GtkAction *action,
                                 EMemoShellView *memo_shell_view)
 {
@@ -587,6 +600,13 @@
 	  NULL,  /* XXX Add a tooltip! */
 	  G_CALLBACK (action_memo_list_properties_cb) },
 
+	{ "memo-list-rename",
+	  NULL,
+	  N_("_Rename..."),
+	  "F2",
+	  N_("Rename the selected memo list"),
+	  G_CALLBACK (action_memo_list_rename_cb) },
+
 	{ "memo-list-select-one",
 	  "stock_check-filled",
 	  N_("Show _Only This Memo List"),

Modified: branches/kill-bonobo/calendar/modules/e-memo-shell-view-actions.h
==============================================================================
--- branches/kill-bonobo/calendar/modules/e-memo-shell-view-actions.h	(original)
+++ branches/kill-bonobo/calendar/modules/e-memo-shell-view-actions.h	Fri Oct 31 12:54:01 2008
@@ -61,6 +61,8 @@
 	E_SHELL_WINDOW_ACTION ((window), "memo-list-print-preview")
 #define E_SHELL_WINDOW_ACTION_MEMO_LIST_PROPERTIES(window) \
 	E_SHELL_WINDOW_ACTION ((window), "memo-list-properties")
+#define E_SHELL_WINDOW_ACTION_MEMO_LIST_RENAME(window) \
+	E_SHELL_WINDOW_ACTION ((window), "memo-list-rename")
 #define E_SHELL_WINDOW_ACTION_MEMO_LIST_SELECT_ONE(window) \
 	E_SHELL_WINDOW_ACTION ((window), "memo-list-select-one")
 

Modified: branches/kill-bonobo/calendar/modules/e-memo-shell-view.c
==============================================================================
--- branches/kill-bonobo/calendar/modules/e-memo-shell-view.c	(original)
+++ branches/kill-bonobo/calendar/modules/e-memo-shell-view.c	Fri Oct 31 12:54:01 2008
@@ -158,6 +158,10 @@
 	sensitive = has_primary_source;
 	gtk_action_set_sensitive (action, sensitive);
 
+	action = ACTION (MEMO_LIST_RENAME);
+	sensitive = has_primary_source;
+	gtk_action_set_sensitive (action, sensitive);
+
 	action = ACTION (MEMO_OPEN);
 	sensitive = single_memo_selected;
 	gtk_action_set_sensitive (action, sensitive);

Modified: branches/kill-bonobo/calendar/modules/e-task-shell-view-actions.c
==============================================================================
--- branches/kill-bonobo/calendar/modules/e-task-shell-view-actions.c	(original)
+++ branches/kill-bonobo/calendar/modules/e-task-shell-view-actions.c	Fri Oct 31 12:54:01 2008
@@ -336,6 +336,19 @@
 }
 
 static void
+action_task_list_rename_cb (GtkAction *action,
+                            ETaskShellView *task_shell_view)
+{
+	ETaskShellSidebar *task_shell_sidebar;
+	ESourceSelector *selector;
+
+	task_shell_sidebar = task_shell_view->priv->task_shell_sidebar;
+	selector = e_task_shell_sidebar_get_selector (task_shell_sidebar);
+
+	e_source_selector_edit_primary_selection (selector);
+}
+
+static void
 action_task_list_select_one_cb (GtkAction *action,
                                 ETaskShellView *task_shell_view)
 {
@@ -712,6 +725,13 @@
 	  NULL,  /* XXX Add a tooltip! */
 	  G_CALLBACK (action_task_list_properties_cb) },
 
+	{ "task-list-rename",
+	  NULL,
+	  N_("_Rename..."),
+	  "F2",
+	  N_("Rename the selected task list"),
+	  G_CALLBACK (action_task_list_rename_cb) },
+
 	{ "task-list-select-one",
 	  "stock_check-filled",
 	  N_("Show _Only This Task List"),

Modified: branches/kill-bonobo/calendar/modules/e-task-shell-view-actions.h
==============================================================================
--- branches/kill-bonobo/calendar/modules/e-task-shell-view-actions.h	(original)
+++ branches/kill-bonobo/calendar/modules/e-task-shell-view-actions.h	Fri Oct 31 12:54:01 2008
@@ -69,6 +69,10 @@
 	E_SHELL_WINDOW_ACTION ((window), "task-list-print-preview")
 #define E_SHELL_WINDOW_ACTION_TASK_LIST_PROPERTIES(window) \
 	E_SHELL_WINDOW_ACTION ((window), "task-list-properties")
+#define E_SHELL_WINDOW_ACTION_TASK_LIST_RENAME(window) \
+	E_SHELL_WINDOW_ACTION ((window), "task-list-rename")
+#define E_SHELL_WINDOW_ACTION_TASK_LIST_SELECT_ONE(window) \
+	E_SHELL_WINDOW_ACTION ((window), "task-list-select-one")
 
 /* Task Query Actions */
 #define E_SHELL_WINDOW_ACTION_TASK_FILTER_ACTIVE_TASKS(window) \

Modified: branches/kill-bonobo/calendar/modules/e-task-shell-view.c
==============================================================================
--- branches/kill-bonobo/calendar/modules/e-task-shell-view.c	(original)
+++ branches/kill-bonobo/calendar/modules/e-task-shell-view.c	Fri Oct 31 12:54:01 2008
@@ -173,6 +173,10 @@
 	sensitive = has_primary_source;
 	gtk_action_set_sensitive (action, sensitive);
 
+	action = ACTION (TASK_LIST_RENAME);
+	sensitive = has_primary_source;
+	gtk_action_set_sensitive (action, sensitive);
+
 	action = ACTION (TASK_MARK_COMPLETE);
 	sensitive =
 		any_tasks_selected &&

Modified: branches/kill-bonobo/configure.in
==============================================================================
--- branches/kill-bonobo/configure.in	(original)
+++ branches/kill-bonobo/configure.in	Fri Oct 31 12:54:01 2008
@@ -1738,7 +1738,7 @@
 plugins_base="$plugins_base_always $SA_JUNK_PLUGIN $BF_JUNK_PLUGIN $EXCHANGE_PLUGIN $MONO_PLUGIN " 
 all_plugins_base="$plugins_base_always sa-junk-plugin bogo-junk-plugin exchange-operations mono"
 
-plugins_standard_always="bbdb subject-thread save-calendar select-one-source copy-tool mail-to-task audio-inline mailing-list-actions default-mailer import-ics-attachments prefer-plain mail-notification attachment-reminder face backup-restore email-custom-header templates" 
+plugins_standard_always="bbdb subject-thread save-calendar copy-tool mail-to-task audio-inline mailing-list-actions default-mailer import-ics-attachments prefer-plain mail-notification attachment-reminder face backup-restore email-custom-header templates" 
 
 plugins_standard="$plugins_standard_always"
 all_plugins_standard="$plugins_standard"
@@ -1748,7 +1748,7 @@
 all_plugins_experimental="$plugins_experimental_always ipod-sync tnef-attachments"
 
 dnl Temporary KILL-BONOBO hack
-enable_plugins="addressbook-file audio-inline bbdb bogo-junk-plugin caldav calendar-file calendar-http copy-tool default-source external-editor google-account-setup hula-account-setup imap-features mail-notification mail-to-meeting profiler sa-junk-plugin save-attachments save-calendar select-one-source subject-thread tnef-attachments webdav-account-setup"
+enable_plugins="addressbook-file audio-inline bbdb bogo-junk-plugin caldav calendar-file calendar-http copy-tool default-source external-editor google-account-setup hula-account-setup imap-features mail-notification mail-to-meeting profiler sa-junk-plugin save-attachments save-calendar subject-thread tnef-attachments webdav-account-setup"
 
 dnl PLUGINS NOT BUILDING YET
 dnl ------------------------
@@ -2059,7 +2059,6 @@
 plugins/subject-thread/Makefile
 plugins/save-attachments/Makefile
 plugins/save-calendar/Makefile
-plugins/select-one-source/Makefile
 plugins/prefer-plain/Makefile
 plugins/profiler/Makefile
 plugins/python/Makefile

Modified: branches/kill-bonobo/ui/evolution-calendars.ui
==============================================================================
--- branches/kill-bonobo/ui/evolution-calendars.ui	(original)
+++ branches/kill-bonobo/ui/evolution-calendars.ui	Fri Oct 31 12:54:01 2008
@@ -49,8 +49,10 @@
   <popup name='calendar-popup'>
     <menuitem action='calendar-new'/>
     <menuitem action='calendar-copy'/>
+    <menuitem action='calendar-rename'/>
     <separator/>
     <menuitem action='calendar-delete'/>
+    <menuitem action='calendar-select-one'/>
     <separator/>
     <menuitem action='calendar-properties'/>
   </popup>

Modified: branches/kill-bonobo/ui/evolution-contacts.ui
==============================================================================
--- branches/kill-bonobo/ui/evolution-contacts.ui	(original)
+++ branches/kill-bonobo/ui/evolution-contacts.ui	Fri Oct 31 12:54:01 2008
@@ -49,6 +49,7 @@
   </toolbar>
   <popup name='address-book-popup'>
     <menuitem action='address-book-new'/>
+    <menuitem action='address-book-rename'/>
     <menuitem action='address-book-popup-save-as'/>
     <separator/>
     <menuitem action='address-book-popup-delete'/>

Modified: branches/kill-bonobo/ui/evolution-memos.ui
==============================================================================
--- branches/kill-bonobo/ui/evolution-memos.ui	(original)
+++ branches/kill-bonobo/ui/evolution-memos.ui	Fri Oct 31 12:54:01 2008
@@ -51,6 +51,7 @@
   <popup name='memo-list-popup'>
     <menuitem action='memo-list-new'/>
     <menuitem action='memo-list-copy'/>
+    <menuitem action='memo-list-rename'/>
     <separator/>
     <menuitem action='memo-list-delete'/>
     <menuitem action='memo-list-select-one'/>

Modified: branches/kill-bonobo/ui/evolution-tasks.ui
==============================================================================
--- branches/kill-bonobo/ui/evolution-tasks.ui	(original)
+++ branches/kill-bonobo/ui/evolution-tasks.ui	Fri Oct 31 12:54:01 2008
@@ -62,8 +62,10 @@
   <popup name='task-list-popup'>
     <menuitem action='task-list-new'/>
     <menuitem action='task-list-copy'/>
+    <menuitem action='task-list-rename'/>
     <separator/>
     <menuitem action='task-list-delete'/>
+    <menuitem action='task-list-select-one'/>
     <separator/>
     <menuitem action='task-list-properties'/>
   </popup>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]