diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2002-03-13 12:55:04 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2002-03-13 12:55:04 +0800 |
commit | d5ba94f758a5206dc7cd5b0cd222bb2c3d348ebe (patch) | |
tree | f0ed1da36d11d0d6a12183a9f8f13bb3434e94d0 /calendar/gui/config-control-factory.c | |
parent | 9a3b0141daad42713cdeae13ffb0d2e8af786540 (diff) | |
download | gsoc2013-evolution-d5ba94f758a5206dc7cd5b0cd222bb2c3d348ebe.tar.gz gsoc2013-evolution-d5ba94f758a5206dc7cd5b0cd222bb2c3d348ebe.tar.zst gsoc2013-evolution-d5ba94f758a5206dc7cd5b0cd222bb2c3d348ebe.zip |
Add <visible>False</visible> to cal-prefs-dialog so it doesn't get shown
* gui/dialogs/cal-prefs-dialog.glade: Add <visible>False</visible>
to cal-prefs-dialog so it doesn't get shown when we load the Glade
file with libglade.
* gui/component-factory.c (owner_set_cb): Register the
ConfigControl factory.
* gui/tasks-control.c: Removed verb "TaskSettings".
(tasks_control_settings_cmd): Removed.
* gui/calendar-commands.c: Removed verb "CalendarSettings".
(settings_cmd): Removed.
* gui/dialogs/cal-prefs-dialog.c: Renamed `CalPrefsDialogPrivate'
to `DialogData'. Replace `dialog' member with a `page' member.
Remove `toplevel_notebook' member.
(init_widgets): Renamed from `cal_prefs_dialog_init_widgets'.
Just get a DialogData.
(get_widgets): Get a DialogData pointer.
(cal_prefs_dialog_destroy): Removed.
(config_control_destroy_callback): New, signal handler for
::destroy for ConfigControl.
(cal_prefs_dialog_new): Create a new DialogData, connect all the
signal handlers.
(create_time_edit): Renamed from
`cal_prefs_dialog_create_time_edit'.
(cal_prefs_dialog_show): Removed.
(cal_prefs_dialog_button_clicked): Removed.
(show_task_list_config): Get a DialogData.
(show_config): Renamed from `cal_prefs_dialog_show_config'.
Likewise.
(update_task_list_config): Likewise.
(update_config): Renamed from
`cal_prefs_dialog_update_config'. Likewise.
(color_set_callback): New callback, makes the dialog report
changes when the setting in any of the color widgets is changed.
(widget_changed_callback): New callback, makes the dialog report
changes when any of the widgets changes status.
(connect_changed): New utility function to connect this callback
to all the widgets.
(setup_widgets): Connect all the widgets.
(cal_prefs_dialog_new): Call `setup_widgets'.
* gui/config-control-factory.c: New.
* gui/config-control-factory.h: New.
* gui/GNOME_Evolution_Calendar.oaf.in: Add
OAFIID:GNOME_Evolution_Calendar_ConfigControl and
OAFIID:GNOME_Evolution_Calendar_ConfigControlFactory.
svn path=/trunk/; revision=16135
Diffstat (limited to 'calendar/gui/config-control-factory.c')
-rw-r--r-- | calendar/gui/config-control-factory.c | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/calendar/gui/config-control-factory.c b/calendar/gui/config-control-factory.c new file mode 100644 index 0000000000..f2a9b48383 --- /dev/null +++ b/calendar/gui/config-control-factory.c @@ -0,0 +1,61 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* config-control-factory.c + * + * Copyright (C) 2002 Ximian, Inc. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2 of the GNU General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * + * Author: Ettore Perazzoli + */ + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#include "config-control-factory.h" + +#include "dialogs/cal-prefs-dialog.h" + +#include <bonobo/bonobo-generic-factory.h> + + +#define CONFIG_CONTROL_FACTORY_ID "OAFIID:GNOME_Evolution_Calendar_ConfigControlFactory" +static BonoboGenericFactory *generic_factory = NULL; + + +static BonoboObject * +factory_fn (BonoboGenericFactory *generic_factory, + void *data) +{ + EvolutionConfigControl *config_control; + + config_control = cal_prefs_dialog_new (); + + return BONOBO_OBJECT (config_control); +} + +gboolean +config_control_factory_register (GNOME_Evolution_Shell shell) +{ + generic_factory = bonobo_generic_factory_new (CONFIG_CONTROL_FACTORY_ID, + factory_fn, shell); + + if (generic_factory == NULL) { + g_warning ("Cannot register %s", CONFIG_CONTROL_FACTORY_ID); + return FALSE; + } + + return TRUE; +} |