evolution r36303 - in branches/kill-bonobo: calendar/gui shell ui



Author: mbarnes
Date: Thu Sep 11 14:44:18 2008
New Revision: 36303
URL: http://svn.gnome.org/viewvc/evolution?rev=36303&view=rev

Log:
Add popup menu stubs for calendars, tasks and memos.


Modified:
   branches/kill-bonobo/calendar/gui/calendar-commands.c
   branches/kill-bonobo/calendar/gui/calendar-component.c
   branches/kill-bonobo/calendar/gui/e-cal-shell-view-actions.c
   branches/kill-bonobo/calendar/gui/e-memo-shell-view-actions.c
   branches/kill-bonobo/calendar/gui/e-task-shell-view-actions.c
   branches/kill-bonobo/calendar/gui/memos-component.c
   branches/kill-bonobo/calendar/gui/tasks-component.c
   branches/kill-bonobo/calendar/gui/tasks-control.c
   branches/kill-bonobo/shell/e-shell-module.c
   branches/kill-bonobo/shell/e-shell-module.h
   branches/kill-bonobo/ui/evolution-calendars.ui
   branches/kill-bonobo/ui/evolution-memos.ui
   branches/kill-bonobo/ui/evolution-tasks.ui

Modified: branches/kill-bonobo/calendar/gui/calendar-commands.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/calendar-commands.c	(original)
+++ branches/kill-bonobo/calendar/gui/calendar-commands.c	Thu Sep 11 14:44:18 2008
@@ -582,35 +582,6 @@
 	BONOBO_UI_VERB_END
 };
 
-static EPixmap pixmaps [] = {
-	E_PIXMAP ("/commands/CalendarPrev", "go-previous", E_ICON_SIZE_MENU),
-	E_PIXMAP ("/commands/CalendarPrint", "document-print", E_ICON_SIZE_MENU),
-	E_PIXMAP ("/commands/DeleteAllOccurrences", "edit-delete", E_ICON_SIZE_MENU),
-	E_PIXMAP ("/commands/DeleteOccurrence", "edit-delete", E_ICON_SIZE_MENU),
-    E_PIXMAP ("/commands/CalendarGoto", "go-jump", E_ICON_SIZE_MENU),
-    E_PIXMAP ("/commands/CalendarNext", "go-next", E_ICON_SIZE_MENU),
-    E_PIXMAP ("/commands/CalendarPrintPreview", "document-print-preview", E_ICON_SIZE_MENU),
-    E_PIXMAP ("/commands/Copy", "edit-copy", E_ICON_SIZE_MENU),
-    E_PIXMAP ("/commands/Cut", "edit-cut", E_ICON_SIZE_MENU),
-    E_PIXMAP ("/commands/Delete", "edit-delete", E_ICON_SIZE_MENU),
-    E_PIXMAP ("/commands/Paste", "edit-paste", E_ICON_SIZE_MENU),
-    E_PIXMAP ("/commands/CalendarToday", "go-today", E_ICON_SIZE_MENU),
-
-	E_PIXMAP ("/Toolbar/Print", "document-print", E_ICON_SIZE_LARGE_TOOLBAR),
-	E_PIXMAP ("/Toolbar/Delete", "edit-delete", E_ICON_SIZE_LARGE_TOOLBAR),
-	E_PIXMAP ("/Toolbar/Prev", "go-previous", E_ICON_SIZE_LARGE_TOOLBAR),
-	E_PIXMAP ("/Toolbar/Next", "go-next", E_ICON_SIZE_LARGE_TOOLBAR),
-	E_PIXMAP ("/Toolbar/Goto", "go-jump", E_ICON_SIZE_LARGE_TOOLBAR),
-	E_PIXMAP ("/Toolbar/DayView", "view-calendar-day", E_ICON_SIZE_LARGE_TOOLBAR),
-	E_PIXMAP ("/Toolbar/WorkWeekView", "view-calendar-workweek", E_ICON_SIZE_LARGE_TOOLBAR),
-	E_PIXMAP ("/Toolbar/WeekView", "view-calendar-week", E_ICON_SIZE_LARGE_TOOLBAR),
-	E_PIXMAP ("/Toolbar/MonthView",	"view-calendar-month", E_ICON_SIZE_LARGE_TOOLBAR),
-	E_PIXMAP ("/Toolbar/ListView", "view-calendar-list", E_ICON_SIZE_LARGE_TOOLBAR),
-    E_PIXMAP ("/Toolbar/Today", "go-today", E_ICON_SIZE_LARGE_TOOLBAR),
-
-	E_PIXMAP_END
-};
-
 void
 calendar_control_activate (BonoboControl *control,
 			   GnomeCalendar *gcal)
@@ -642,8 +613,6 @@
 			       NULL);
 	g_free (xmlfile);
 
-	e_pixmaps_update (uic, pixmaps);
-
 	gnome_calendar_setup_view_menus (gcal, uic);
 
 	g_signal_connect (gcal, "calendar_focus_change",

Modified: branches/kill-bonobo/calendar/gui/calendar-component.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/calendar-component.c	(original)
+++ branches/kill-bonobo/calendar/gui/calendar-component.c	Thu Sep 11 14:44:18 2008
@@ -110,8 +110,6 @@
 } CalendarComponentView;
 
 struct _CalendarComponentPrivate {
-	char *base_directory;
-	char *config_directory;
 
 	GConfClient *gconf_client;
 	int gconf_notify_id;
@@ -1580,53 +1578,6 @@
 }
 
 
-static GNOME_Evolution_CreatableItemTypeList *
-impl__get_userCreatableItems (PortableServer_Servant servant,
-			      CORBA_Environment *ev)
-{
-	GNOME_Evolution_CreatableItemTypeList *list = GNOME_Evolution_CreatableItemTypeList__alloc ();
-
-	list->_length  = 4;
-	list->_maximum = list->_length;
-	list->_buffer  = GNOME_Evolution_CreatableItemTypeList_allocbuf (list->_length);
-
-	CORBA_sequence_set_release (list, FALSE);
-
-	list->_buffer[0].id = CREATE_EVENT_ID;
-	list->_buffer[0].description = _("New appointment");
-	list->_buffer[0].menuDescription = (char *) C_("New", "_Appointment");
-	list->_buffer[0].tooltip = _("Create a new appointment");
-	list->_buffer[0].menuShortcut = 'a';
-	list->_buffer[0].iconName = "appointment-new";
-	list->_buffer[0].type = GNOME_Evolution_CREATABLE_OBJECT;
-
-	list->_buffer[1].id = CREATE_MEETING_ID;
-	list->_buffer[1].description = _("New meeting");
-	list->_buffer[1].menuDescription = (char *) C_("New", "M_eeting");
-	list->_buffer[1].tooltip = _("Create a new meeting request");
-	list->_buffer[1].menuShortcut = 'e';
-	list->_buffer[1].iconName = "stock_new-meeting";
-	list->_buffer[1].type = GNOME_Evolution_CREATABLE_OBJECT;
-
-	list->_buffer[2].id = CREATE_ALLDAY_EVENT_ID;
-	list->_buffer[2].description = _("New all day appointment");
-	list->_buffer[2].menuDescription = (char *) C_("New", "All Day A_ppointment");
-	list->_buffer[2].tooltip = _("Create a new all-day appointment");
-	list->_buffer[2].menuShortcut = '\0';
-	list->_buffer[2].iconName = "stock_new-24h-appointment";
-	list->_buffer[2].type = GNOME_Evolution_CREATABLE_OBJECT;
-
-	list->_buffer[3].id = CREATE_CALENDAR_ID;
-	list->_buffer[3].description = _("New calendar");
-	list->_buffer[3].menuDescription = (char *) C_("New", "Cale_ndar");
-	list->_buffer[3].tooltip = _("Create a new calendar");
-	list->_buffer[3].menuShortcut = '\0';
-	list->_buffer[3].iconName = "x-office-calendar";
-	list->_buffer[3].type = GNOME_Evolution_CREATABLE_FOLDER;
-
-	return list;
-}
-
 static void
 impl_requestCreateItem (PortableServer_Servant servant,
 			const CORBA_char *item_type_name,
@@ -1704,8 +1655,6 @@
 	}
 	g_list_free (priv->views);
 
-	g_free (priv->base_directory);
-	g_free (priv->config_directory);
 	g_free (priv);
 
 	(* G_OBJECT_CLASS (parent_class)->finalize) (object);
@@ -1721,7 +1670,6 @@
 
 	epv->upgradeFromVersion      = impl_upgradeFromVersion;
 	epv->createView              = impl_createView;
-	epv->_get_userCreatableItems = impl__get_userCreatableItems;
 	epv->requestCreateItem       = impl_requestCreateItem;
 	epv->handleURI               = impl_handleURI;
 
@@ -1737,9 +1685,6 @@
 
 	priv = g_new0 (CalendarComponentPrivate, 1);
 
-	priv->base_directory = g_build_filename (e_get_user_data_dir (), "calendar", NULL);
-	priv->config_directory = g_build_filename (priv->base_directory, "config", NULL);
-
 	/* EPFIXME: Should use a custom one instead?  Also we should add
 	 * calendar_component_peek_gconf_client().  */
 	priv->gconf_client = gconf_client_get_default ();
@@ -1760,38 +1705,6 @@
 
 /* Public API.  */
 
-CalendarComponent *
-calendar_component_peek (void)
-{
-	static CalendarComponent *component = NULL;
-
-	if (component == NULL) {
-		component = g_object_new (calendar_component_get_type (), NULL);
-
-		if (g_mkdir_with_parents (calendar_component_peek_config_directory (component), 0777) != 0) {
-			g_warning (G_STRLOC ": Cannot create directory %s: %s",
-				   calendar_component_peek_config_directory (component),
-				   g_strerror (errno));
-			g_object_unref (component);
-			component = NULL;
-		}
-	}
-
-	return component;
-}
-
-const char *
-calendar_component_peek_base_directory (CalendarComponent *component)
-{
-	return component->priv->base_directory;
-}
-
-const char *
-calendar_component_peek_config_directory (CalendarComponent *component)
-{
-	return component->priv->config_directory;
-}
-
 ESourceList *
 calendar_component_peek_source_list (CalendarComponent *component)
 {

Modified: branches/kill-bonobo/calendar/gui/e-cal-shell-view-actions.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/e-cal-shell-view-actions.c	(original)
+++ branches/kill-bonobo/calendar/gui/e-cal-shell-view-actions.c	Thu Sep 11 14:44:18 2008
@@ -21,6 +21,18 @@
 #include "e-cal-shell-view-private.h"
 
 static void
+action_calendar_copy_cb (GtkAction *action,
+                         ECalShellView *cal_shell_view)
+{
+}
+
+static void
+action_calendar_delete_cb (GtkAction *action,
+                           ECalShellView *cal_shell_view)
+{
+}
+
+static void
 action_calendar_go_back_cb (GtkAction *action,
                             ECalShellView *cal_shell_view)
 {
@@ -45,6 +57,12 @@
 }
 
 static void
+action_calendar_new_cb (GtkAction *action,
+                        ECalShellView *cal_shell_view)
+{
+}
+
+static void
 action_calendar_print_cb (GtkAction *action,
                           ECalShellView *cal_shell_view)
 {
@@ -57,6 +75,12 @@
 }
 
 static void
+action_calendar_properties_cb (GtkAction *action,
+                               ECalShellView *cal_shell_view)
+{
+}
+
+static void
 action_calendar_purge_cb (GtkAction *action,
                           ECalShellView *cal_shell_view)
 {
@@ -113,6 +137,20 @@
 
 static GtkActionEntry calendar_entries[] = {
 
+	{ "calendar-copy",
+	  GTK_STOCK_COPY,
+	  N_("_Copy..."),
+	  NULL,
+	  NULL,  /* XXX Add a tooltip! */
+	  G_CALLBACK (action_calendar_copy_cb) },
+
+	{ "calendar-delete",
+	  GTK_STOCK_DELETE,
+	  NULL,
+	  NULL,
+	  NULL,  /* XXX Add a tooltip! */
+	  G_CALLBACK (action_calendar_delete_cb) },
+
 	{ "calendar-go-back",
 	  GTK_STOCK_GO_BACK,
 	  N_("Previous"),
@@ -141,6 +179,13 @@
 	  N_("Select a specific date"),
 	  G_CALLBACK (action_calendar_jump_to_cb) },
 
+	{ "calendar-new",
+	  "x-office-calendar",
+	  N_("_New Calendar"),
+	  NULL,
+	  N_("Create a new calendar"),
+	  G_CALLBACK (action_calendar_new_cb) },
+
 	{ "calendar-print",
 	  GTK_STOCK_PRINT,
 	  NULL,
@@ -155,6 +200,13 @@
 	  N_("Preview the calendar to be printed"),
 	  G_CALLBACK (action_calendar_print_preview_cb) },
 
+	{ "calendar-properties",
+	  GTK_STOCK_PROPERTIES,
+	  NULL,
+	  NULL,
+	  NULL,  /* XXX Add a tooltip! */
+	  G_CALLBACK (action_calendar_properties_cb) },
+
 	{ "calendar-purge",
 	  NULL,
 	  N_("Purg_e"),

Modified: branches/kill-bonobo/calendar/gui/e-memo-shell-view-actions.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/e-memo-shell-view-actions.c	(original)
+++ branches/kill-bonobo/calendar/gui/e-memo-shell-view-actions.c	Thu Sep 11 14:44:18 2008
@@ -45,6 +45,30 @@
 }
 
 static void
+action_memo_list_copy_cb (GtkAction *action,
+                          EMemoShellView *memo_shell_view)
+{
+}
+
+static void
+action_memo_list_delete_cb (GtkAction *action,
+                            EMemoShellView *memo_shell_view)
+{
+}
+
+static void
+action_memo_list_new_cb (GtkAction *action,
+                         EMemoShellView *memo_shell_view)
+{
+}
+
+static void
+action_memo_list_properties_cb (GtkAction *action,
+                                EMemoShellView *memo_shell_view)
+{
+}
+
+static void
 action_memo_open_cb (GtkAction *action,
                      EMemoShellView *memo_shell_view)
 {
@@ -98,6 +122,34 @@
 	  N_("Delete selected memos"),
 	  G_CALLBACK (action_memo_delete_cb) },
 
+	{ "memo-list-copy",
+	  GTK_STOCK_COPY,
+	  N_("_Copy..."),
+	  NULL,
+	  NULL,  /* XXX Add a tooltip! */
+	  G_CALLBACK (action_memo_list_copy_cb) },
+
+	{ "memo-list-delete",
+	  GTK_STOCK_DELETE,
+	  N_("_Delete"),
+	  NULL,
+	  NULL,  /* XXX Add a tooltip! */
+	  G_CALLBACK (action_memo_list_delete_cb) },
+
+	{ "memo-list-new",
+	  "stock_notes",
+	  N_("_New Memo List"),
+	  NULL,
+	  N_("Create a new memo list"),
+	  G_CALLBACK (action_memo_list_new_cb) },
+
+	{ "memo-list-properties",
+	  GTK_STOCK_PROPERTIES,
+	  NULL,
+	  NULL,
+	  NULL,  /* XXX Add a tooltip! */
+	  G_CALLBACK (action_memo_list_properties_cb) },
+
 	{ "memo-open",
 	  NULL,
 	  N_("Open Memo"),

Modified: branches/kill-bonobo/calendar/gui/e-task-shell-view-actions.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/e-task-shell-view-actions.c	(original)
+++ branches/kill-bonobo/calendar/gui/e-task-shell-view-actions.c	Thu Sep 11 14:44:18 2008
@@ -57,6 +57,30 @@
 }
 
 static void
+action_task_list_copy_cb (GtkAction *action,
+                          ETaskShellView *task_shell_view)
+{
+}
+
+static void
+action_task_list_delete_cb (GtkAction *action,
+                            ETaskShellView *task_shell_view)
+{
+}
+
+static void
+action_task_list_new_cb (GtkAction *action,
+                         ETaskShellView *task_shell_view)
+{
+}
+
+static void
+action_task_list_properties_cb (GtkAction *action,
+                                ETaskShellView *task_shell_view)
+{
+}
+
+static void
 action_task_mark_complete_cb (GtkAction *action,
                               ETaskShellView *task_shell_view)
 {
@@ -136,6 +160,34 @@
 	  NULL,  /* XXX Add a tooltip! */
 	  G_CALLBACK (action_task_forward_cb) },
 
+	{ "task-list-copy",
+	  GTK_STOCK_COPY,
+	  N_("Copy..."),
+	  NULL,
+	  NULL,  /* XXX Add a tooltip! */
+	  G_CALLBACK (action_task_list_copy_cb) },
+
+	{ "task-list-delete",
+	  GTK_STOCK_DELETE,
+	  N_("_Delete"),
+	  NULL,
+	  NULL,  /* XXX Add a tooltip! */
+	  G_CALLBACK (action_task_list_delete_cb) },
+
+	{ "task-list-new",
+	  "stock_todo",
+	  N_("_New Task List"),
+	  NULL,
+	  N_("Create a new task list"),
+	  G_CALLBACK (action_task_list_new_cb) },
+
+	{ "task-list-properties",
+	  GTK_STOCK_PROPERTIES,
+	  NULL,
+	  NULL,
+	  NULL,  /* XXX Add a tooltip! */
+	  G_CALLBACK (action_task_list_properties_cb) },
+
 	{ "task-mark-complete",
 	  NULL,
 	  N_("Mar_k as Complete"),

Modified: branches/kill-bonobo/calendar/gui/memos-component.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/memos-component.c	(original)
+++ branches/kill-bonobo/calendar/gui/memos-component.c	Thu Sep 11 14:44:18 2008
@@ -105,8 +105,6 @@
 } MemosComponentView;
 
 struct _MemosComponentPrivate {
-	char *base_directory;
-	char *config_directory;
 
 	ESourceList *source_list;
 	GSList *source_selection;
@@ -1244,45 +1242,6 @@
 	return BONOBO_OBJREF(ecv);
 }
 
-static GNOME_Evolution_CreatableItemTypeList *
-impl__get_userCreatableItems (PortableServer_Servant servant,
-			      CORBA_Environment *ev)
-{
-	GNOME_Evolution_CreatableItemTypeList *list = GNOME_Evolution_CreatableItemTypeList__alloc ();
-
-	list->_length  = 3;
-	list->_maximum = list->_length;
-	list->_buffer  = GNOME_Evolution_CreatableItemTypeList_allocbuf (list->_length);
-
-	CORBA_sequence_set_release (list, FALSE);
-
-	list->_buffer[0].id = CREATE_MEMO_ID;
-	list->_buffer[0].description = _("New memo");
-	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";
-	list->_buffer[0].type = GNOME_Evolution_CREATABLE_OBJECT;
-
-	list->_buffer[1].id = CREATE_SHARED_MEMO_ID;
-	list->_buffer[1].description = _("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";
-	list->_buffer[1].type = GNOME_Evolution_CREATABLE_OBJECT;
-
-	list->_buffer[2].id = CREATE_MEMO_LIST_ID;
-	list->_buffer[2].description = _("New memo list");
-	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";
-	list->_buffer[2].type = GNOME_Evolution_CREATABLE_FOLDER;
-
-	return list;
-}
-
 static void
 impl_requestCreateItem (PortableServer_Servant servant,
 			const CORBA_char *item_type_name,
@@ -1358,8 +1317,6 @@
 	}
 	g_list_free (priv->views);
 
-	g_free (priv->base_directory);
-	g_free (priv->config_directory);
 	g_free (priv);
 
 	(* G_OBJECT_CLASS (parent_class)->finalize) (object);
@@ -1375,7 +1332,6 @@
 
 	epv->upgradeFromVersion      = impl_upgradeFromVersion;
 	epv->createView		     = impl_createView;
-	epv->_get_userCreatableItems = impl__get_userCreatableItems;
 	epv->requestCreateItem       = impl_requestCreateItem;
 
 	object_class->dispose = impl_dispose;
@@ -1389,46 +1345,12 @@
 
 	priv = g_new0 (MemosComponentPrivate, 1);
 
-	priv->base_directory = g_build_filename (e_get_user_data_dir (), "memos", NULL);
-	priv->config_directory = g_build_filename (priv->base_directory, "config", NULL);
-
 	component->priv = priv;
 	ensure_sources (component);
 }
 
 /* Public API */
 
-MemosComponent *
-memos_component_peek (void)
-{
-	static MemosComponent *component = NULL;
-
-	if (component == NULL) {
-		component = g_object_new (memos_component_get_type (), NULL);
-
-		if (g_mkdir_with_parents (component->priv->config_directory, 0777) != 0) {
-			g_warning (G_STRLOC ": Cannot create directory %s: %s",
-				   component->priv->config_directory, g_strerror (errno));
-			g_object_unref (component);
-			component = NULL;
-		}
-	}
-
-	return component;
-}
-
-const char *
-memos_component_peek_base_directory (MemosComponent *component)
-{
-	return component->priv->base_directory;
-}
-
-const char *
-memos_component_peek_config_directory (MemosComponent *component)
-{
-	return component->priv->config_directory;
-}
-
 ESourceList *
 memos_component_peek_source_list (MemosComponent *component)
 {

Modified: branches/kill-bonobo/calendar/gui/tasks-component.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/tasks-component.c	(original)
+++ branches/kill-bonobo/calendar/gui/tasks-component.c	Thu Sep 11 14:44:18 2008
@@ -104,8 +104,6 @@
 } TasksComponentView;
 
 struct _TasksComponentPrivate {
-	char *base_directory;
-	char *config_directory;
 
 	ESourceList *source_list;
 	GSList *source_selection;
@@ -1309,45 +1307,6 @@
 	return;
 }
 
-static GNOME_Evolution_CreatableItemTypeList *
-impl__get_userCreatableItems (PortableServer_Servant servant,
-			      CORBA_Environment *ev)
-{
-	GNOME_Evolution_CreatableItemTypeList *list = GNOME_Evolution_CreatableItemTypeList__alloc ();
-
-	list->_length  = 3;
-	list->_maximum = list->_length;
-	list->_buffer  = GNOME_Evolution_CreatableItemTypeList_allocbuf (list->_length);
-
-	CORBA_sequence_set_release (list, FALSE);
-
-	list->_buffer[0].id = CREATE_TASK_ID;
-	list->_buffer[0].description = _("New task");
-	list->_buffer[0].menuDescription = (char *) C_("New", "_Task");
-	list->_buffer[0].tooltip = _("Create a new task");
-	list->_buffer[0].menuShortcut = 't';
-	list->_buffer[0].iconName = "stock_task";
-	list->_buffer[0].type = GNOME_Evolution_CREATABLE_OBJECT;
-
-	list->_buffer[1].id = CREATE_TASK_ASSIGNED_ID;
-	list->_buffer[1].description = _("New assigned task");
-	list->_buffer[1].menuDescription = (char *) C_("New", "Assigne_d Task");
-	list->_buffer[1].tooltip = _("Create a new assigned task");
-	list->_buffer[1].menuShortcut = '\0';
-	list->_buffer[1].iconName = "stock_task";
-	list->_buffer[1].type = GNOME_Evolution_CREATABLE_OBJECT;
-
-	list->_buffer[2].id = CREATE_TASK_LIST_ID;
-	list->_buffer[2].description = _("New task list");
-	list->_buffer[2].menuDescription = (char *) C_("New", "Tas_k list");
-	list->_buffer[2].tooltip = _("Create a new task list");
-	list->_buffer[2].menuShortcut = '\0';
-	list->_buffer[2].iconName = "stock_todo";
-	list->_buffer[2].type = GNOME_Evolution_CREATABLE_FOLDER;
-
-	return list;
-}
-
 static void
 impl_requestCreateItem (PortableServer_Servant servant,
 			const CORBA_char *item_type_name,
@@ -1421,8 +1380,6 @@
 	}
 	g_list_free (priv->views);
 
-	g_free (priv->base_directory);
-	g_free (priv->config_directory);
 	g_free (priv);
 
 	(* G_OBJECT_CLASS (parent_class)->finalize) (object);
@@ -1438,7 +1395,6 @@
 
 	epv->upgradeFromVersion      = impl_upgradeFromVersion;
 	epv->createView		     = impl_createView;
-	epv->_get_userCreatableItems = impl__get_userCreatableItems;
 	epv->requestCreateItem       = impl_requestCreateItem;
 	epv->handleURI               = impl_handleURI;
 
@@ -1453,46 +1409,12 @@
 
 	priv = g_new0 (TasksComponentPrivate, 1);
 
-	priv->base_directory = g_build_filename (e_get_user_data_dir (), "tasks", NULL);
-	priv->config_directory = g_build_filename (priv->base_directory, "config", NULL);
-
 	component->priv = priv;
 	ensure_sources (component);
 }
 
 /* Public API */
 
-TasksComponent *
-tasks_component_peek (void)
-{
-	static TasksComponent *component = NULL;
-
-	if (component == NULL) {
-		component = g_object_new (tasks_component_get_type (), NULL);
-
-		if (g_mkdir_with_parents (component->priv->config_directory, 0777) != 0) {
-			g_warning (G_STRLOC ": Cannot create directory %s: %s",
-				   component->priv->config_directory, g_strerror (errno));
-			g_object_unref (component);
-			component = NULL;
-		}
-	}
-
-	return component;
-}
-
-const char *
-tasks_component_peek_base_directory (TasksComponent *component)
-{
-	return component->priv->base_directory;
-}
-
-const char *
-tasks_component_peek_config_directory (TasksComponent *component)
-{
-	return component->priv->config_directory;
-}
-
 ESourceList *
 tasks_component_peek_source_list (TasksComponent *component)
 {

Modified: branches/kill-bonobo/calendar/gui/tasks-control.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/tasks-control.c	(original)
+++ branches/kill-bonobo/calendar/gui/tasks-control.c	Thu Sep 11 14:44:18 2008
@@ -249,23 +249,6 @@
 	BONOBO_UI_VERB_END
 };
 
-static EPixmap pixmaps [] = {
-	E_PIXMAP ("/commands/TasksCopy", "edit-copy", E_ICON_SIZE_MENU),
-	E_PIXMAP ("/commands/TasksCut", "edit-cut", E_ICON_SIZE_MENU),
-	E_PIXMAP ("/commands/TasksDelete", "edit-delete", E_ICON_SIZE_MENU),
-	E_PIXMAP ("/commands/TasksForward", "mail-forward", E_ICON_SIZE_MENU),
-	E_PIXMAP ("/commands/TasksPaste", "edit-paste", E_ICON_SIZE_MENU),
-	E_PIXMAP ("/commands/TasksPrint", "document-print", E_ICON_SIZE_MENU),
-	E_PIXMAP ("/commands/TasksPrintPreview", "document-print-preview", E_ICON_SIZE_MENU),
-
-	E_PIXMAP ("/Toolbar/Cut", "edit-cut", E_ICON_SIZE_LARGE_TOOLBAR),
-	E_PIXMAP ("/Toolbar/Copy", "edit-copy", E_ICON_SIZE_LARGE_TOOLBAR),
-	E_PIXMAP ("/Toolbar/Paste", "edit-paste", E_ICON_SIZE_LARGE_TOOLBAR),
-	E_PIXMAP ("/Toolbar/Print", "document-print", E_ICON_SIZE_LARGE_TOOLBAR),
-	E_PIXMAP ("/Toolbar/Delete", "edit-delete", E_ICON_SIZE_LARGE_TOOLBAR),
-
-	E_PIXMAP_END
-};
 void
 tasks_control_activate (BonoboControl *control, ETasks *tasks)
 {
@@ -299,8 +282,6 @@
 			       NULL);
 	g_free (xmlfile);
 
-	e_pixmaps_update (uic, pixmaps);
-
 	e_tasks_setup_view_menus (tasks, uic);
 
 	/* Signals from the tasks widget; also sensitize the menu items as appropriate */

Modified: branches/kill-bonobo/shell/e-shell-module.c
==============================================================================
--- branches/kill-bonobo/shell/e-shell-module.c	(original)
+++ branches/kill-bonobo/shell/e-shell-module.c	Thu Sep 11 14:44:18 2008
@@ -20,6 +20,7 @@
 
 #include "e-shell-module.h"
 
+#include <errno.h>
 #include <gmodule.h>
 #include <glib/gi18n.h>
 #include <e-util/e-util.h>
@@ -41,6 +42,7 @@
 	gchar *filename;
 
 	EShell *shell;
+	gchar *config_dir;
 	gchar *data_dir;
 
 	/* Initializes the loaded type module. */
@@ -287,6 +289,15 @@
 }
 
 const gchar *
+e_shell_module_get_config_dir (EShellModule *shell_module)
+{
+	g_return_val_if_fail (E_IS_SHELL_MODULE (shell_module), NULL);
+	g_return_val_if_fail (shell_module->priv->config_dir != NULL, NULL);
+
+	return shell_module->priv->config_dir;
+}
+
+const gchar *
 e_shell_module_get_data_dir (EShellModule *shell_module)
 {
 	g_return_val_if_fail (E_IS_SHELL_MODULE (shell_module), NULL);
@@ -355,6 +366,7 @@
 {
 	GTypeModule *type_module;
 	EShellModuleInfo *module_info;
+	const gchar *pathname;
 
 	g_return_if_fail (E_IS_SHELL_MODULE (shell_module));
 	g_return_if_fail (info != NULL);
@@ -375,7 +387,21 @@
 	module_info->is_busy = info->is_busy;
 	module_info->shutdown = info->shutdown;
 
+	/* Determine the user data directory for this module. */
 	g_free (shell_module->priv->data_dir);
 	shell_module->priv->data_dir = g_build_filename (
 		e_get_user_data_dir (), module_info->name, NULL);
+
+	/* Determine the user configuration directory for this module. */
+	g_free (shell_module->priv->config_dir);
+	shell_module->priv->config_dir = g_build_filename (
+		shell_module->priv->data_dir, "config", NULL);
+
+	/* Create the user configuration directory for this module,
+	 * which should also create the user data directory. */
+	pathname = shell_module->priv->config_dir;
+	if (g_mkdir_with_parents (pathname, 0777) != 0)
+		g_critical (
+			"Cannot create directory %s: %s",
+			pathname, g_strerror (errno));
 }

Modified: branches/kill-bonobo/shell/e-shell-module.h
==============================================================================
--- branches/kill-bonobo/shell/e-shell-module.h	(original)
+++ branches/kill-bonobo/shell/e-shell-module.h	Thu Sep 11 14:44:18 2008
@@ -74,6 +74,7 @@
 						 const gchar *filename);
 gint		e_shell_module_compare		(EShellModule *shell_module_a,
 						 EShellModule *shell_module_b);
+const gchar *	e_shell_module_get_config_dir	(EShellModule *shell_module);
 const gchar *	e_shell_module_get_data_dir	(EShellModule *shell_module);
 const gchar *	e_shell_module_get_filename	(EShellModule *shell_module);
 const gchar *	e_shell_module_get_searches	(EShellModule *shell_module);

Modified: branches/kill-bonobo/ui/evolution-calendars.ui
==============================================================================
--- branches/kill-bonobo/ui/evolution-calendars.ui	(original)
+++ branches/kill-bonobo/ui/evolution-calendars.ui	Thu Sep 11 14:44:18 2008
@@ -23,12 +23,6 @@
     <menu action='view-menu'>
       <menuitem action='calendar-go-today'/>
       <menuitem action='calendar-jump-to'/>
-      <separator/>
-      <menuitem action='calendar-view-day'/>
-      <menuitem action='calendar-view-workweek'/>
-      <menuitem action='calendar-view-week'/>
-      <menuitem action='calendar-view-month'/>
-      <menuitem action='calendar-view-list'/>
     </menu>
     <placeholder name='custom-menus'>
       <menu action='actions-menu'>
@@ -52,4 +46,12 @@
     <toolitem action='calendar-view-month'/>
     <toolitem action='calendar-view-list'/>
   </toolbar>
+  <popup name='calendar-popup'>
+    <menuitem action='calendar-new'/>
+    <menuitem action='calendar-copy'/>
+    <separator/>
+    <menuitem action='calendar-delete'/>
+    <separator/>
+    <menuitem action='calendar-properties'/>
+  </popup>
 </ui>

Modified: branches/kill-bonobo/ui/evolution-memos.ui
==============================================================================
--- branches/kill-bonobo/ui/evolution-memos.ui	(original)
+++ branches/kill-bonobo/ui/evolution-memos.ui	Thu Sep 11 14:44:18 2008
@@ -30,4 +30,12 @@
     <toolitem action='memo-print'/>
     <toolitem action='memo-delete'/>
   </toolbar>
+  <popup name='memo-list-popup'>
+    <menuitem action='memo-list-new'/>
+    <menuitem action='memo-list-copy'/>
+    <separator/>
+    <menuitem action='memo-list-delete'/>
+    <separator/>
+    <menuitem action='memo-list-properties'/>
+  </popup>
 </ui>

Modified: branches/kill-bonobo/ui/evolution-tasks.ui
==============================================================================
--- branches/kill-bonobo/ui/evolution-tasks.ui	(original)
+++ branches/kill-bonobo/ui/evolution-tasks.ui	Thu Sep 11 14:44:18 2008
@@ -39,4 +39,12 @@
     <toolitem action='task-print'/>
     <toolitem action='task-delete'/>
   </toolbar>
+  <popup name='task-list-popup'>
+    <menuitem action='task-list-new'/>
+    <menuitem action='task-list-copy'/>
+    <separator/>
+    <menuitem action='task-list-delete'/>
+    <separator/>
+    <menuitem action='task-list-properties'/>
+  </popup>
 </ui>



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