diff options
author | Chris Toshok <toshok@helixcode.com> | 2000-10-03 09:29:43 +0800 |
---|---|---|
committer | Chris Toshok <toshok@src.gnome.org> | 2000-10-03 09:29:43 +0800 |
commit | 1ad5f19df9e41efd06107dc04802c69eae7ca386 (patch) | |
tree | 2e60e134b991973235469814439bbb9676493d26 /shell/evolution-storage-set-view.c | |
parent | 11aa32cb036c01e993ff40b8799856a85256018f (diff) | |
download | gsoc2013-evolution-1ad5f19df9e41efd06107dc04802c69eae7ca386.tar gsoc2013-evolution-1ad5f19df9e41efd06107dc04802c69eae7ca386.tar.gz gsoc2013-evolution-1ad5f19df9e41efd06107dc04802c69eae7ca386.tar.bz2 gsoc2013-evolution-1ad5f19df9e41efd06107dc04802c69eae7ca386.tar.lz gsoc2013-evolution-1ad5f19df9e41efd06107dc04802c69eae7ca386.tar.xz gsoc2013-evolution-1ad5f19df9e41efd06107dc04802c69eae7ca386.tar.zst gsoc2013-evolution-1ad5f19df9e41efd06107dc04802c69eae7ca386.zip |
fix typo. (impl_StorageSetView_remove_listener): same.
2000-10-02 Chris Toshok <toshok@helixcode.com>
* evolution-storage-set-view.c (impl_StorageSetView_add_listener): fix typo.
(impl_StorageSetView_remove_listener): same.
(impl_StorageSetView__get_show_folders): implementation of getter for show_folders.
(impl_StorageSetView__set_show_folders): implementation of setter for show_folders.
(corba_class_init): install _set_show_folders and _get_show_folders.
* Evolution-StorageSetView.idl: add show_folders attribute to
StorageSetView.
* e-storage-set-view.h: add prototypes for
e_storage_set_view_{get,set}_show_folders.
* e-storage-set-view.c (insert_storages): split this code out from
e_storage_set_view_construct so we can call it when "show_folders"
has been changed.
(e_storage_set_view_construct): remove the code to insert
storages.
(e_storage_set_view_set_show_folders): new function. tears down
existing tree and node/path hashtable and calls insert_storages.
(e_storage_set_view_get_show_folders): new function, retrieves
current show_folders state.
svn path=/trunk/; revision=5684
Diffstat (limited to 'shell/evolution-storage-set-view.c')
-rw-r--r-- | shell/evolution-storage-set-view.c | 40 |
1 files changed, 38 insertions, 2 deletions
diff --git a/shell/evolution-storage-set-view.c b/shell/evolution-storage-set-view.c index e0401c5efc..2e320c9ee5 100644 --- a/shell/evolution-storage-set-view.c +++ b/shell/evolution-storage-set-view.c @@ -184,7 +184,7 @@ impl_StorageSetView_add_listener (PortableServer_Servant servant, EvolutionStorageSetView *storage_set_view; bonobo_object = bonobo_object_from_servant (servant); - storage_set_view = EVOLUTION_STORAGE_SET_VIEW (servant); + storage_set_view = EVOLUTION_STORAGE_SET_VIEW (bonobo_object); if (! add_listener (storage_set_view, listener)) CORBA_exception_set (ev, CORBA_USER_EXCEPTION, @@ -200,13 +200,47 @@ impl_StorageSetView_remove_listener (PortableServer_Servant servant, EvolutionStorageSetView *storage_set_view; bonobo_object = bonobo_object_from_servant (servant); - storage_set_view = EVOLUTION_STORAGE_SET_VIEW (servant); + storage_set_view = EVOLUTION_STORAGE_SET_VIEW (bonobo_object); if (! remove_listener (storage_set_view, listener)) CORBA_exception_set (ev, CORBA_USER_EXCEPTION, ex_Evolution_StorageSetView_NotFound, NULL); } +static CORBA_boolean +impl_StorageSetView__get_show_folders (PortableServer_Servant servant, + CORBA_Environment * ev) +{ + BonoboObject *bonobo_object; + EvolutionStorageSetView *storage_set_view; + EvolutionStorageSetViewPrivate *priv; + + bonobo_object = bonobo_object_from_servant (servant); + storage_set_view = EVOLUTION_STORAGE_SET_VIEW (bonobo_object); + priv = storage_set_view->priv; + + return (CORBA_boolean)e_storage_set_view_get_show_folders ( + E_STORAGE_SET_VIEW(priv->storage_set_view_widget)); +} + +static void +impl_StorageSetView__set_show_folders (PortableServer_Servant servant, + const CORBA_boolean value, + CORBA_Environment * ev) +{ + BonoboObject *bonobo_object; + EvolutionStorageSetView *storage_set_view; + EvolutionStorageSetViewPrivate *priv; + + bonobo_object = bonobo_object_from_servant (servant); + storage_set_view = EVOLUTION_STORAGE_SET_VIEW (bonobo_object); + priv = storage_set_view->priv; + + e_storage_set_view_set_show_folders ( + E_STORAGE_SET_VIEW(priv->storage_set_view_widget), + (gboolean)value); +} + /* GtkObject methods. */ @@ -254,6 +288,8 @@ corba_class_init (void) epv = g_new0 (POA_Evolution_StorageSetView__epv, 1); epv->add_listener = impl_StorageSetView_add_listener; epv->remove_listener = impl_StorageSetView_remove_listener; + epv->_set_show_folders = impl_StorageSetView__set_show_folders; + epv->_get_show_folders = impl_StorageSetView__get_show_folders; vepv = &StorageSetView_vepv; vepv->_base_epv = base_epv; |