gnome-control-center/capplets/windows/metacity-window-manager.c
Seth Nickell 059bd84cef Handle setting the currently running window manager properly.
2002-06-04  Seth Nickell  <snickell@stanford.edu>

	* gnome-window-properties.c: (set_wm_change_pending),
	(wm_selection_changed), (wm_widget_add_wm), (apply_wm),
	(setup_appearance_option_menu), (appearance_changed),
	(setup_dialog), (main):
	* gnome-window-properties.glade:
	* metacity-window-manager.c: (metacity_get_theme_list):

	Handle setting the currently running window manager properly.

	Get the theme list, and make changes based on it to the GConf setting.
2002-06-04 22:58:35 +00:00

127 lines
2.9 KiB
C

#include "metacity-window-manager.h"
static GnomeWindowManagerClass *parent_class;
struct _MetacityWindowManagerPrivate {
};
/* this function is called when the shared lib is loaded */
GObject *
window_manager_new (void)
{
GObject *wm;
wm = g_object_new (metacity_window_manager_get_type (), NULL);
return wm;
}
static void
metacity_set_theme (const char *theme_name)
{
}
static GList *
metacity_get_theme_list (void)
{
GList *themes = NULL;
themes = g_list_prepend (themes, g_strdup ("Crux"));
themes = g_list_prepend (themes, g_strdup ("Atlanta"));
themes = g_list_prepend (themes, g_strdup ("Butt Ugly XRP"));
themes = g_list_prepend (themes, g_strdup ("ForMyGirlFriend"));
themes = g_list_prepend (themes, g_strdup ("Themes.orgRocks"));
return themes;
}
static void
metacity_set_font (const char *font)
{
}
static gboolean
metacity_get_focus_follows_mouse (void)
{
return FALSE;
}
static void
metacity_set_focus_follows_mouse (gboolean focus_follows_mouse)
{
}
static void
metacity_window_manager_init (MetacityWindowManager *metacity_window_manager, MetacityWindowManagerClass *class)
{
metacity_window_manager->p = g_new0 (MetacityWindowManagerPrivate, 1);
}
static void
metacity_window_manager_finalize (GObject *object)
{
MetacityWindowManager *metacity_window_manager;
g_return_if_fail (object != NULL);
g_return_if_fail (IS_METACITY_WINDOW_MANAGER (object));
metacity_window_manager = METACITY_WINDOW_MANAGER (object);
g_free (metacity_window_manager->p);
G_OBJECT_CLASS (parent_class)->finalize (object);
}
static void
metacity_window_manager_class_init (MetacityWindowManagerClass *class)
{
GObjectClass *object_class;
GnomeWindowManagerClass *wm_class;
object_class = G_OBJECT_CLASS (class);
wm_class = GNOME_WINDOW_MANAGER_CLASS (class);
object_class->finalize = metacity_window_manager_finalize;
wm_class->set_theme = metacity_set_theme;
wm_class->get_theme_list = metacity_get_theme_list;
wm_class->set_font = metacity_set_font;
wm_class->get_focus_follows_mouse = metacity_get_focus_follows_mouse;
wm_class->set_focus_follows_mouse = metacity_set_focus_follows_mouse;
parent_class = g_type_class_peek_parent (class);
}
GType
metacity_window_manager_get_type (void)
{
static GType metacity_window_manager_type = 0;
if (!metacity_window_manager_type) {
static GTypeInfo metacity_window_manager_info = {
sizeof (MetacityWindowManagerClass),
NULL, /* GBaseInitFunc */
NULL, /* GBaseFinalizeFunc */
(GClassInitFunc) metacity_window_manager_class_init,
NULL, /* GClassFinalizeFunc */
NULL, /* user-supplied data */
sizeof (MetacityWindowManager),
0, /* n_preallocs */
(GInstanceInitFunc) metacity_window_manager_init,
NULL
};
metacity_window_manager_type =
g_type_register_static (gnome_window_manager_get_type (),
"MetacityWindowManager",
&metacity_window_manager_info, 0);
}
return metacity_window_manager_type;
}