source: trunk/third/evolution/shell/e-shell-config.c @ 18142

Revision 18142, 1.9 KB checked in by ghudson, 22 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r18141, which included commits to RCS files with non-trunk default branches.
Line 
1/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
2/* e-shell-config.c
3 *
4 * Copyright (C) 2002 Ximian, Inc.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of version 2 of the GNU General Public
8 * License as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13 * General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public
16 * License along with this program; if not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
19 */
20
21#ifdef HAVE_CONFIG_H
22#include <config.h>
23#endif
24
25#include "e-shell-config.h"
26
27#include "e-shell-config-folder-settings.h"
28#include "evolution-config-control.h"
29#include "evolution-folder-selector-button.h"
30
31#include <bonobo/bonobo-generic-factory.h>
32
33
34#define E_SHELL_CONFIG_FACTORY_OAFIID "OAFIID:GNOME_Evolution_Shell_Config_Factory"
35
36#define E_SHELL_CONFIG_FOLDER_SETTINGS_OAFIID "OAFIID:GNOME_Evolution_Shell_Config_FolderSettings_Control"
37
38
39static BonoboObject *
40config_control_factory_cb (BonoboGenericFactory *factory,
41                           const char *component_id,
42                           gpointer shell)
43{
44        if (!strcmp (component_id, E_SHELL_CONFIG_FOLDER_SETTINGS_OAFIID))
45                return e_shell_config_folder_settings_create_control (shell);
46        else {
47                g_assert_not_reached();
48                return NULL;
49        }
50}
51
52gboolean
53e_shell_config_factory_register (EShell *shell)
54{
55        BonoboGenericFactory *factory;
56
57        g_return_val_if_fail (E_IS_SHELL (shell), FALSE);
58
59        factory = bonobo_generic_factory_new_multi (
60                E_SHELL_CONFIG_FACTORY_OAFIID,
61                config_control_factory_cb,
62                shell);
63
64        if (factory == NULL) {
65                g_warning ("Cannot register factory %s", E_SHELL_CONFIG_FACTORY_OAFIID);
66                return FALSE;
67        }
68        return TRUE;
69}
Note: See TracBrowser for help on using the repository browser.