|
Packit |
15f964 |
/*
|
|
Packit |
15f964 |
* e-cal-config-hook.c
|
|
Packit |
15f964 |
*
|
|
Packit |
15f964 |
* This program is free software; you can redistribute it and/or modify it
|
|
Packit |
15f964 |
* under the terms of the GNU Lesser General Public License as published by
|
|
Packit |
15f964 |
* the Free Software Foundation.
|
|
Packit |
15f964 |
*
|
|
Packit |
15f964 |
* This program is distributed in the hope that it will be useful, but
|
|
Packit |
15f964 |
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
Packit |
15f964 |
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
Packit |
15f964 |
* for more details.
|
|
Packit |
15f964 |
*
|
|
Packit |
15f964 |
* You should have received a copy of the GNU Lesser General Public License
|
|
Packit |
15f964 |
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
|
Packit |
15f964 |
*
|
|
Packit |
15f964 |
*
|
|
Packit |
15f964 |
* Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
|
|
Packit |
15f964 |
*
|
|
Packit |
15f964 |
*/
|
|
Packit |
15f964 |
|
|
Packit |
15f964 |
#include "evolution-config.h"
|
|
Packit |
15f964 |
|
|
Packit |
15f964 |
#include "e-cal-config-hook.h"
|
|
Packit |
15f964 |
|
|
Packit |
15f964 |
#include "calendar/gui/e-cal-config.h"
|
|
Packit |
15f964 |
|
|
Packit |
15f964 |
static const EConfigHookTargetMask no_masks[] = {
|
|
Packit |
15f964 |
{ NULL }
|
|
Packit |
15f964 |
};
|
|
Packit |
15f964 |
|
|
Packit |
15f964 |
static const EConfigHookTargetMap targets[] = {
|
|
Packit |
15f964 |
{ "source", EC_CONFIG_TARGET_SOURCE, no_masks },
|
|
Packit |
15f964 |
{ "prefs", EC_CONFIG_TARGET_PREFS, no_masks },
|
|
Packit |
15f964 |
{ NULL }
|
|
Packit |
15f964 |
};
|
|
Packit |
15f964 |
|
|
Packit |
15f964 |
static void
|
|
Packit |
15f964 |
cal_config_hook_class_init (EConfigHookClass *class)
|
|
Packit |
15f964 |
{
|
|
Packit |
15f964 |
EPluginHookClass *plugin_hook_class;
|
|
Packit |
15f964 |
gint ii;
|
|
Packit |
15f964 |
|
|
Packit |
15f964 |
plugin_hook_class = E_PLUGIN_HOOK_CLASS (class);
|
|
Packit |
15f964 |
plugin_hook_class->id = "org.gnome.evolution.calendar.config:1.0";
|
|
Packit |
15f964 |
|
|
Packit |
15f964 |
class->config_class = g_type_class_ref (e_cal_config_get_type ());
|
|
Packit |
15f964 |
|
|
Packit |
15f964 |
for (ii = 0; targets[ii].type != NULL; ii++)
|
|
Packit |
15f964 |
e_config_hook_class_add_target_map (
|
|
Packit |
15f964 |
(EConfigHookClass *) class, &targets[ii]);
|
|
Packit |
15f964 |
}
|
|
Packit |
15f964 |
|
|
Packit |
15f964 |
void
|
|
Packit |
15f964 |
e_cal_config_hook_register_type (GTypeModule *type_module)
|
|
Packit |
15f964 |
{
|
|
Packit |
15f964 |
const GTypeInfo type_info = {
|
|
Packit |
15f964 |
sizeof (EConfigHookClass),
|
|
Packit |
15f964 |
(GBaseInitFunc) NULL,
|
|
Packit |
15f964 |
(GBaseFinalizeFunc) NULL,
|
|
Packit |
15f964 |
(GClassInitFunc) cal_config_hook_class_init,
|
|
Packit |
15f964 |
(GClassFinalizeFunc) NULL,
|
|
Packit |
15f964 |
NULL, /* class_data */
|
|
Packit |
15f964 |
sizeof (EConfigHook),
|
|
Packit |
15f964 |
0, /* n_preallocs */
|
|
Packit |
15f964 |
(GInstanceInitFunc) NULL,
|
|
Packit |
15f964 |
NULL /* value_table */
|
|
Packit |
15f964 |
};
|
|
Packit |
15f964 |
|
|
Packit |
15f964 |
g_type_module_register_type (
|
|
Packit |
15f964 |
type_module, e_config_hook_get_type (),
|
|
Packit |
15f964 |
"ECalConfigHook", &type_info, 0);
|
|
Packit |
15f964 |
}
|