Blame src/modules/settings/e-settings-meeting-time-selector.c

Packit 15f964
/*
Packit 15f964
 * e-settings-meeting-time-selector.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
Packit 15f964
#include "evolution-config.h"
Packit 15f964
Packit 15f964
#include "e-settings-meeting-time-selector.h"
Packit 15f964
Packit 15f964
#include <calendar/gui/e-meeting-time-sel.h>
Packit 15f964
Packit 15f964
#define E_SETTINGS_MEETING_TIME_SELECTOR_GET_PRIVATE(obj) \
Packit 15f964
	(G_TYPE_INSTANCE_GET_PRIVATE \
Packit 15f964
	((obj), E_TYPE_SETTINGS_MEETING_TIME_SELECTOR, ESettingsMeetingTimeSelectorPrivate))
Packit 15f964
Packit 15f964
struct _ESettingsMeetingTimeSelectorPrivate {
Packit 15f964
	gint placeholder;
Packit 15f964
};
Packit 15f964
Packit 15f964
G_DEFINE_DYNAMIC_TYPE (
Packit 15f964
	ESettingsMeetingTimeSelector,
Packit 15f964
	e_settings_meeting_time_selector,
Packit 15f964
	E_TYPE_EXTENSION)
Packit 15f964
Packit 15f964
static void
Packit 15f964
settings_meeting_time_selector_constructed (GObject *object)
Packit 15f964
{
Packit 15f964
	EExtension *extension;
Packit 15f964
	EExtensible *extensible;
Packit 15f964
	GSettings *settings;
Packit 15f964
Packit 15f964
	extension = E_EXTENSION (object);
Packit 15f964
	extensible = e_extension_get_extensible (extension);
Packit 15f964
Packit 15f964
	settings = e_util_ref_settings ("org.gnome.evolution.calendar");
Packit 15f964
Packit 15f964
	g_settings_bind (
Packit 15f964
		settings, "use-24hour-format",
Packit 15f964
		extensible, "use-24-hour-format",
Packit 15f964
		G_SETTINGS_BIND_GET);
Packit 15f964
Packit 15f964
	g_object_unref (settings);
Packit 15f964
Packit 15f964
	/* Chain up to parent's constructed() method. */
Packit 15f964
	G_OBJECT_CLASS (e_settings_meeting_time_selector_parent_class)->constructed (object);
Packit 15f964
}
Packit 15f964
Packit 15f964
static void
Packit 15f964
e_settings_meeting_time_selector_class_init (ESettingsMeetingTimeSelectorClass *class)
Packit 15f964
{
Packit 15f964
	GObjectClass *object_class;
Packit 15f964
	EExtensionClass *extension_class;
Packit 15f964
Packit 15f964
	g_type_class_add_private (
Packit 15f964
		class, sizeof (ESettingsMeetingTimeSelectorPrivate));
Packit 15f964
Packit 15f964
	object_class = G_OBJECT_CLASS (class);
Packit 15f964
	object_class->constructed = settings_meeting_time_selector_constructed;
Packit 15f964
Packit 15f964
	extension_class = E_EXTENSION_CLASS (class);
Packit 15f964
	extension_class->extensible_type = E_TYPE_MEETING_TIME_SELECTOR;
Packit 15f964
}
Packit 15f964
Packit 15f964
static void
Packit 15f964
e_settings_meeting_time_selector_class_finalize (ESettingsMeetingTimeSelectorClass *class)
Packit 15f964
{
Packit 15f964
}
Packit 15f964
Packit 15f964
static void
Packit 15f964
e_settings_meeting_time_selector_init (ESettingsMeetingTimeSelector *extension)
Packit 15f964
{
Packit 15f964
	extension->priv =
Packit 15f964
		E_SETTINGS_MEETING_TIME_SELECTOR_GET_PRIVATE (extension);
Packit 15f964
}
Packit 15f964
Packit 15f964
void
Packit 15f964
e_settings_meeting_time_selector_type_register (GTypeModule *type_module)
Packit 15f964
{
Packit 15f964
	/* XXX G_DEFINE_DYNAMIC_TYPE declares a static type registration
Packit 15f964
	 *     function, so we have to wrap it with a public function in
Packit 15f964
	 *     order to register types from a separate compilation unit. */
Packit 15f964
	e_settings_meeting_time_selector_register_type (type_module);
Packit 15f964
}
Packit 15f964