aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-tasks.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2002-02-07 19:24:08 +0800
committerChris Lahey <clahey@src.gnome.org>2002-02-07 19:24:08 +0800
commitb7ac37f6b1b54cf9262958a4419f00d00dea554e (patch)
tree5abf2d84a4d38a3904c579d60599404428641ec4 /calendar/gui/e-tasks.c
parent9f83d6d31872f5bce584c52738385bc2ae568a05 (diff)
downloadgsoc2013-evolution-b7ac37f6b1b54cf9262958a4419f00d00dea554e.tar.gz
gsoc2013-evolution-b7ac37f6b1b54cf9262958a4419f00d00dea554e.tar.zst
gsoc2013-evolution-b7ac37f6b1b54cf9262958a4419f00d00dea554e.zip
Bumped the required version of gal.
2002-02-07 Christopher James Lahey <clahey@ximian.com> * configure.in: Bumped the required version of gal. From addressbook/ChangeLog: 2002-02-07 Christopher James Lahey <clahey@ximian.com> * gui/widgets/e-addressbook-view.c (e_addressbook_view_setup_menus): Changed this function to use the new GalViewMenus which takes a GalViewInstance, instead of a GalViewCollection. From calendar/ChangeLog: 2002-02-07 Christopher James Lahey <clahey@ximian.com> * gui/e-tasks.c (e_tasks_setup_view_menus), gui/gnome-cal.c (gnome_calendar_setup_view_menus): Made these use the new GalViewMenus stuff. From mail/ChangeLog: 2002-02-07 Christopher James Lahey <clahey@ximian.com> * folder-browser.c, folder-browser.h, folder-browser-ui.c, folder-browser-ui.h (folder_browser_ui_setup_view_menus, folder_browser_ui_discard_view_menus): Changed this to use the new GalViewMenus stuff. Made these exported functions. * mail-callbacks.c, message-browser.c: Changed these to not pass the now removed row parameter to message_list_select. * mail-config.c, mail-config.h (mail_config_folder_to_safe_url): Refactored this out of mail_config_folder_to_cachename. * message-list.c, message-list.h (message_list_select): Removed the row argument. Changed this to use the new function in ETree for finding the next cursor row that matches a test. (message_list_construct): Handle a failed construction of the ETree here. (message_list_setup_etree, save_tree_state): Don't load or save the header state. folder-browser-ui.c deals with this now. From views/ChangeLog: 2002-02-07 Christopher James Lahey <clahey@ximian.com> * addressbook/galview.xml, calendar/galview.xml, mail/galview.xml, tasks/galview.xml: Added default-view parameters. * mail/As_Sent_Folder.galview: New galview. * mail/Makefile.am, mail/galview.xml: Added As_Sent_Folder galview. From widgets/ChangeLog: 2002-02-07 Christopher James Lahey <clahey@ximian.com> * menus/gal-view-menus.c, menus/gal-view-menus.h (gal_view_menus_new): Made this take a GalViewInstance instead of a GalViewCollection. Reworked most of this to utilize the interfaces provided by GalViewInstance. svn path=/trunk/; revision=15592
Diffstat (limited to 'calendar/gui/e-tasks.c')
-rw-r--r--calendar/gui/e-tasks.c66
1 files changed, 36 insertions, 30 deletions
diff --git a/calendar/gui/e-tasks.c b/calendar/gui/e-tasks.c
index 3edb4da7c8..2fa52dd652 100644
--- a/calendar/gui/e-tasks.c
+++ b/calendar/gui/e-tasks.c
@@ -26,7 +26,7 @@
#include <gnome.h>
#include <gal/util/e-util.h>
#include <gal/e-table/e-table-scrolled.h>
-#include <gal/menus/gal-view-collection.h>
+#include <gal/menus/gal-view-instance.h>
#include <gal/menus/gal-view-factory-etable.h>
#include <gal/menus/gal-view-etable.h>
#include "widgets/menus/gal-view-menus.h"
@@ -54,8 +54,8 @@ struct _ETasksPrivate {
/* Calendar search bar for tasks */
GtkWidget *search_bar;
- /* View collection and the view menus handler */
- GalViewCollection *view_collection;
+ /* View instance and the view menus handler */
+ GalViewInstance *view_instance;
GalViewMenus *view_menus;
};
@@ -122,7 +122,7 @@ e_tasks_init (ETasks *tasks)
priv->client = NULL;
priv->query = NULL;
- priv->view_collection = NULL;
+ priv->view_instance = NULL;
priv->view_menus = NULL;
setup_widgets (tasks);
@@ -646,7 +646,7 @@ e_tasks_delete_completed (ETasks *tasks)
/* Callback used from the view collection when we need to display a new view */
static void
-display_view_cb (GalViewCollection *collection, GalView *view, gpointer data)
+display_view_cb (GalViewInstance *instance, GalView *view, gpointer data)
{
ETasks *tasks;
@@ -674,6 +674,7 @@ e_tasks_setup_view_menus (ETasks *tasks, BonoboUIComponent *uic)
GalViewFactory *factory;
ETableSpecification *spec;
char *dir;
+ static GalViewCollection *collection = NULL;
g_return_if_fail (tasks != NULL);
g_return_if_fail (E_IS_TASKS (tasks));
@@ -682,40 +683,45 @@ e_tasks_setup_view_menus (ETasks *tasks, BonoboUIComponent *uic)
priv = tasks->priv;
- g_return_if_fail (priv->view_collection == NULL);
+ g_return_if_fail (priv->view_instance == NULL);
- g_assert (priv->view_collection == NULL);
+ g_assert (priv->view_instance == NULL);
g_assert (priv->view_menus == NULL);
- /* Create the view collection */
+ /* Create the view instance */
- priv->view_collection = gal_view_collection_new ();
+ if (collection == NULL) {
+ collection = gal_view_collection_new ();
- dir = gnome_util_prepend_user_home ("/evolution/views/tasks/");
- gal_view_collection_set_storage_directories (priv->view_collection,
- EVOLUTION_DATADIR "/evolution/views/tasks/",
- dir);
- g_free (dir);
+ dir = gnome_util_prepend_user_home ("/evolution/views/tasks/");
+ gal_view_collection_set_storage_directories (collection,
+ EVOLUTION_DATADIR "/evolution/views/tasks/",
+ dir);
+ g_free (dir);
- /* Create the views */
+ /* Create the views */
- spec = e_table_specification_new ();
- e_table_specification_load_from_file (spec,
- EVOLUTION_ETSPECDIR "/e-calendar-table.etspec");
+ spec = e_table_specification_new ();
+ e_table_specification_load_from_file (spec,
+ EVOLUTION_ETSPECDIR "/e-calendar-table.etspec");
- factory = gal_view_factory_etable_new (spec);
- gtk_object_unref (GTK_OBJECT (spec));
- gal_view_collection_add_factory (priv->view_collection, factory);
- gtk_object_unref (GTK_OBJECT (factory));
+ factory = gal_view_factory_etable_new (spec);
+ gtk_object_unref (GTK_OBJECT (spec));
+ gal_view_collection_add_factory (collection, factory);
+ gtk_object_unref (GTK_OBJECT (factory));
- /* Load the collection and create the menus */
+ /* Load the collection and create the menus */
- gal_view_collection_load (priv->view_collection);
+ gal_view_collection_load (collection);
+ }
+
+ priv->view_instance = gal_view_instance_new (collection, cal_client_get_uri (priv->client));
- priv->view_menus = gal_view_menus_new (priv->view_collection);
+ priv->view_menus = gal_view_menus_new (priv->view_instance);
gal_view_menus_apply (priv->view_menus, uic, NULL);
- gtk_signal_connect (GTK_OBJECT (priv->view_collection), "display_view",
+ gtk_signal_connect (GTK_OBJECT (priv->view_instance), "display_view",
GTK_SIGNAL_FUNC (display_view_cb), tasks);
+ display_view_cb (priv->view_instance, gal_view_instance_get_current_view (priv->view_instance), tasks);
}
/**
@@ -736,13 +742,13 @@ e_tasks_discard_view_menus (ETasks *tasks)
priv = tasks->priv;
- g_return_if_fail (priv->view_collection != NULL);
+ g_return_if_fail (priv->view_instance != NULL);
- g_assert (priv->view_collection != NULL);
+ g_assert (priv->view_instance != NULL);
g_assert (priv->view_menus != NULL);
- gtk_object_unref (GTK_OBJECT (priv->view_collection));
- priv->view_collection = NULL;
+ gtk_object_unref (GTK_OBJECT (priv->view_instance));
+ priv->view_instance = NULL;
gtk_object_unref (GTK_OBJECT (priv->view_menus));
priv->view_menus = NULL;