Ignore gladep (grrr) files.
2002-05-11 Seth Nickell <snickell@stanford.edu> * .cvsignore: Ignore gladep (grrr) files. * Makefile.am: * gnome-window-manager.c: (gnome_window_manager_new): * gnome-window-manager.h: * metacity-window-manager.c: (window_manager_new), (metacity_set_theme), (metacity_get_theme_list), (metacity_set_font), (metacity_get_focus_follows_mouse), (metacity_set_focus_follows_mouse), (finalize), (class_init), (init), (metacity_window_manager_get_type): * metacity-window-manager.h: First pass at adding settings modules. * window-capplet.png: Use the wm-properties icon. * wm-list.c: (wm_list_find), (wm_list_find_exec): Nix some warnings caused by non-use of const. * gnome-window-properties.c: (setup_dialog): * gnome-window-properties.glade: Tweak appearance some more.
This commit is contained in:
parent
7c22259a61
commit
0b6fd7d726
11 changed files with 301 additions and 7 deletions
37
capplets/windows/gnome-window-manager.c
Normal file
37
capplets/windows/gnome-window-manager.c
Normal file
|
@ -0,0 +1,37 @@
|
|||
#include "gnome-window-manager.h"
|
||||
|
||||
#include <gmodule.h>
|
||||
|
||||
GObject *
|
||||
gnome_window_manager_new (GnomeDesktopItem *item)
|
||||
{
|
||||
const char *settings_lib;
|
||||
char *module_name;
|
||||
GnomeWindowManagerNewFunc wm_new_func = NULL;
|
||||
GObject *wm;
|
||||
GModule *module;
|
||||
gboolean success;
|
||||
|
||||
settings_lib = gnome_desktop_item_get_string (item, "GnomeSettingsLibrary");
|
||||
|
||||
module_name = g_module_build_path (GNOME_WINDOW_MANAGER_MODULE_PATH,
|
||||
settings_lib);
|
||||
|
||||
module = g_module_open (module_name, G_MODULE_BIND_LAZY);
|
||||
if (module == NULL) {
|
||||
g_warning ("Couldn't load window manager settings module `%s' (%s)", module_name, g_module_error ());
|
||||
return NULL;
|
||||
}
|
||||
|
||||
success = g_module_symbol (module, "window_manager_new",
|
||||
(gpointer *) &wm_new_func);
|
||||
|
||||
if ((!success) || wm_new_func == NULL) {
|
||||
g_warning ("Couldn't load window manager settings module `%s`, couldn't find symbol \'window_manager_new\'", module_name);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
wm = (wm_new_func) ();
|
||||
|
||||
return (wm);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue