summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzhuyaliang <[email protected]>2023-10-11 13:38:16 +0800
committerraveit65 <[email protected]>2023-10-13 14:10:05 +0200
commit4bd1a51c9a5d0d5e2f570a21d12b521e68cc4ffd (patch)
tree02a2fdfbd92158abc52bdc3aa17476bf09d431af
parent59f29767052e91951d11adca3940d5a4fc0728b1 (diff)
downloadmate-control-center-4bd1a51c9a5d0d5e2f570a21d12b521e68cc4ffd.tar.bz2
mate-control-center-4bd1a51c9a5d0d5e2f570a21d12b521e68cc4ffd.tar.xz
Remove "libwindow settings" that are no longer in use
-rw-r--r--Makefile.am4
-rw-r--r--capplets/common/Makefile.am2
-rw-r--r--configure.ac2
-rw-r--r--libwindow-settings/Makefile.am55
-rw-r--r--libwindow-settings/marco-window-manager.c501
-rw-r--r--libwindow-settings/marco-window-manager.h30
-rw-r--r--libwindow-settings/mate-window-manager.c270
-rw-r--r--libwindow-settings/mate-window-manager.h171
-rw-r--r--libwindow-settings/mate-window-settings-2.0.pc.in11
-rw-r--r--libwindow-settings/mate-wm-manager.c322
-rw-r--r--libwindow-settings/mate-wm-manager.h16
-rw-r--r--po/POTFILES.in2
12 files changed, 2 insertions, 1384 deletions
diff --git a/Makefile.am b/Makefile.am
index 6f093074..134c64ad 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,8 +2,8 @@ if USE_NLS
PO_SUBDIR = po
endif
-SUBDIRS = $(PO_SUBDIR) libwindow-settings capplets font-viewer help man
-DIST_SUBDIRS = po libwindow-settings capplets font-viewer help libslab shell typing-break man
+SUBDIRS = $(PO_SUBDIR) capplets font-viewer help man
+DIST_SUBDIRS = po capplets font-viewer help libslab shell typing-break man
if HAVE_LIBMATESLAB
SUBDIRS += libslab
diff --git a/capplets/common/Makefile.am b/capplets/common/Makefile.am
index 876e1a90..5362f2e2 100644
--- a/capplets/common/Makefile.am
+++ b/capplets/common/Makefile.am
@@ -7,7 +7,6 @@ AM_CPPFLAGS = \
-DG_LOG_DOMAIN=\"capplet-common\" \
-DINSTALL_PREFIX=\"$(prefix)\" \
-I$(top_srcdir) \
- -I$(top_srcdir)/libwindow-settings \
-DPIXMAP_DIR=\""$(datadir)/mate-control-center/pixmaps"\" \
$(WARN_CFLAGS) \
$(CAPPLET_CFLAGS) \
@@ -40,7 +39,6 @@ libcommon_la_SOURCES = \
wm-common.h
libcommon_la_LIBADD = \
- $(top_builddir)/libwindow-settings/libmate-window-settings.la \
$(MARCO_LIBS) \
$(MATE_DESKTOP_LIBS) \
$(GIO_LIBS) \
diff --git a/configure.ac b/configure.ac
index 4a1e19ed..19e11db5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -303,8 +303,6 @@ capplets/time-admin/data/Makefile
capplets/windows/Makefile
font-viewer/Makefile
help/Makefile
-libwindow-settings/Makefile
-libwindow-settings/mate-window-settings-2.0.pc
man/Makefile
po/Makefile.in
libslab/mate-slab.pc
diff --git a/libwindow-settings/Makefile.am b/libwindow-settings/Makefile.am
deleted file mode 100644
index 5db54937..00000000
--- a/libwindow-settings/Makefile.am
+++ /dev/null
@@ -1,55 +0,0 @@
-WM_MODULE_DIR=$(libdir)/window-manager-settings
-
-AM_CPPFLAGS = \
- -DMATELOCALEDIR="\"$(datadir)/locale\"" \
- -DG_LOG_DOMAIN=\"capplet-common\" \
- -DMATE_WM_PROPERTY_PATH=\"$(datadir)/mate/wm-properties\" \
- -DMATE_WINDOW_MANAGER_MODULE_PATH=\""$(WM_MODULE_DIR)"\" \
- -I$(top_srcdir)/ \
- $(WARN_CFLAGS) \
- @CAPPLET_CFLAGS@ \
- -DMARCO_THEME_DIR=\""$(datadir)/themes"\"
-
-lib_LTLIBRARIES = libmate-window-settings.la
-
-libmate_window_settings_la_LDFLAGS = \
- -export_dynamic \
- -no-undefined \
- -version-info 1:0:0
-
-libmate_window_settings_la_LIBADD = $(MATECC_LIBS)
-
-libmate_window_settings_la_SOURCES = \
- mate-window-manager.c \
- mate-window-manager.h \
- mate-wm-manager.c \
- mate-wm-manager.h
-
-libmate_window_settingsincludedir = $(includedir)/mate-window-settings-2.0
-
-libmate_window_settingsinclude_HEADERS = \
- mate-window-manager.h \
- mate-wm-manager.h
-
-pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = mate-window-settings-2.0.pc
-
-EXTRA_DIST = \
- mate-window-settings-2.0.pc.in
-
-wms_flags = -export_dynamic -avoid-version -module
-wmsdir = $(WM_MODULE_DIR)
-
-wms_LTLIBRARIES = \
- libmarco.la
-
-libmarco_la_SOURCES = \
- marco-window-manager.c \
- marco-window-manager.h
-
-libmarco_la_LDFLAGS = $(wms_flags)
-libmarco_la_LIBADD = \
- $(MATECC_LIBS) \
- libmate-window-settings.la
-
--include $(top_srcdir)/git.mk
diff --git a/libwindow-settings/marco-window-manager.c b/libwindow-settings/marco-window-manager.c
deleted file mode 100644
index c92887f4..00000000
--- a/libwindow-settings/marco-window-manager.c
+++ /dev/null
@@ -1,501 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
-
-/* marco-window-manager.c
- * Copyright (C) 2002 Seth Nickell
- * Copyright (C) 2002 Red Hat, Inc.
- *
- * Written by: Seth Nickell <[email protected]>,
- * Havoc Pennington <[email protected]>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * 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., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301, USA.
- */
-
-#include <config.h>
-#include <string.h>
-#include <glib/gi18n.h>
-#include <gio/gio.h>
-
-#include "marco-window-manager.h"
-
-#define MARCO_SCHEMA "org.mate.Marco.general"
-#define MARCO_THEME_KEY "theme"
-#define MARCO_FONT_KEY "titlebar-font"
-#define MARCO_FOCUS_KEY "focus-mode"
-#define MARCO_AUTORAISE_KEY "auto-raise"
-#define MARCO_AUTORAISE_DELAY_KEY "auto-raise-delay"
-#define MARCO_MOUSE_MODIFIER_KEY "mouse-button-modifier"
-#define MARCO_DOUBLE_CLICK_TITLEBAR_KEY "action-double-click-titlebar"
-#define MARCO_COMPOSITING_MANAGER_KEY "compositing-manager"
-#define MARCO_COMPOSITING_FAST_ALT_TAB_KEY "compositing-fast-alt-tab"
-
-/* keep following enums in sync with marco */
-enum
-{
- ACTION_TITLEBAR_TOGGLE_SHADE,
- ACTION_TITLEBAR_TOGGLE_MAXIMIZE,
- ACTION_TITLEBAR_TOGGLE_MAXIMIZE_HORIZONTALLY,
- ACTION_TITLEBAR_TOGGLE_MAXIMIZE_VERTICALLY,
- ACTION_TITLEBAR_MINIMIZE,
- ACTION_TITLEBAR_NONE,
- ACTION_TITLEBAR_LOWER,
- ACTION_TITLEBAR_MENU
-};
-enum
-{
- FOCUS_MODE_CLICK,
- FOCUS_MODE_SLOPPY,
- FOCUS_MODE_MOUSE
-};
-
-static MateWindowManagerClass *parent_class;
-
-struct _MarcoWindowManagerPrivate {
- GSettings *settings;
- char *font;
- char *theme;
- char *mouse_modifier;
-};
-
-static void
-value_changed (GSettings *settings,
- gchar *key,
- void *data)
-{
- MarcoWindowManager *meta_wm;
-
- meta_wm = MARCO_WINDOW_MANAGER (data);
-
- mate_window_manager_settings_changed (MATE_WINDOW_MANAGER (meta_wm));
-}
-
-/* this function is called when the shared lib is loaded */
-GObject *
-window_manager_new (int expected_interface_version)
-{
- GObject *wm;
-
- if (expected_interface_version != MATE_WINDOW_MANAGER_INTERFACE_VERSION) {
- g_warning ("Marco window manager module wasn't compiled with the current version of mate-control-center");
- return NULL;
- }
-
- wm = g_object_new (marco_window_manager_get_type (), NULL);
-
- return wm;
-}
-
-static GList *
-add_themes_from_dir (GList *current_list, const char *path)
-{
- GDir *theme_dir;
- const gchar *entry;
- char *theme_file_path;
- GList *node;
- gboolean found = FALSE;
- GError *error = NULL;
-
- if (!(g_file_test (path, G_FILE_TEST_EXISTS) && g_file_test (path, G_FILE_TEST_IS_DIR))) {
- return current_list;
- }
-
- theme_dir = g_dir_open (path, 0, &error);
-
- if (error) {
- g_debug ("Could not open the folder: %s", error->message);
- g_error_free (error);
- return current_list;
- }
-
- while ((entry = g_dir_read_name (theme_dir)) != NULL) {
- theme_file_path = g_build_filename (path, entry, "metacity-1/metacity-theme-2.xml", NULL);
-
- if (g_file_test (theme_file_path, G_FILE_TEST_EXISTS)) {
-
- for (node = current_list; (node != NULL) && (!found); node = node->next) {
- found = (strcmp (node->data, entry) == 0);
- }
-
- if (!found) {
- current_list = g_list_prepend (current_list, g_strdup (entry));
- }
- }
- else {
- g_free (theme_file_path);
- theme_file_path = g_build_filename (path, entry, "metacity-1/metacity-theme-1.xml", NULL);
-
- if (g_file_test (theme_file_path, G_FILE_TEST_EXISTS)) {
-
- for (node = current_list; (node != NULL) && (!found); node = node->next) {
- found = (strcmp (node->data, entry) == 0);
- }
-
- if (!found) {
- current_list = g_list_prepend (current_list, g_strdup (entry));
- }
- }
- }
-
- found = FALSE;
- g_free (theme_file_path);
- }
-
- g_dir_close (theme_dir);
-
- return current_list;
-}
-
-static GList *
-marco_get_theme_list (MateWindowManager *wm)
-{
- GList *themes = NULL;
- char *home_dir_themes;
- const gchar* const* xdg_data_dirs;
- int i;
-
- home_dir_themes = g_build_filename (g_get_home_dir (), ".themes", NULL);
- themes = add_themes_from_dir (themes, home_dir_themes);
- g_free (home_dir_themes);
-
- xdg_data_dirs = g_get_system_data_dirs ();
- for (i = 0; xdg_data_dirs[i] != NULL; i++) {
- char *sys_dir_themes = g_build_filename (xdg_data_dirs[i], "themes", NULL);
- themes = add_themes_from_dir (themes, sys_dir_themes);
- g_free (sys_dir_themes);
- }
-
- themes = add_themes_from_dir (themes, MARCO_THEME_DIR);
-
- return themes;
-}
-
-static char *
-marco_get_user_theme_folder (MateWindowManager *wm)
-{
- return g_build_filename (g_get_home_dir (), ".themes", NULL);
-}
-
-static void
-marco_change_settings (MateWindowManager *wm,
- const MateWMSettings *settings)
-{
- MarcoWindowManager *meta_wm;
-
- meta_wm = MARCO_WINDOW_MANAGER (wm);
-
- if (settings->flags & MATE_WM_SETTING_COMPOSITING_MANAGER)
- g_settings_set_boolean (meta_wm->p->settings,
- MARCO_COMPOSITING_MANAGER_KEY,
- settings->compositing_manager);
-
- if (settings->flags & MATE_WM_SETTING_COMPOSITING_ALTTAB)
- g_settings_set_boolean (meta_wm->p->settings,
- MARCO_COMPOSITING_FAST_ALT_TAB_KEY,
- settings->compositing_fast_alt_tab);
-
- if (settings->flags & MATE_WM_SETTING_MOUSE_FOCUS)
- g_settings_set_enum (meta_wm->p->settings,
- MARCO_FOCUS_KEY,
- settings->focus_follows_mouse ?
- FOCUS_MODE_SLOPPY : FOCUS_MODE_CLICK);
-
- if (settings->flags & MATE_WM_SETTING_AUTORAISE)
- g_settings_set_boolean (meta_wm->p->settings,
- MARCO_AUTORAISE_KEY,
- settings->autoraise);
-
- if (settings->flags & MATE_WM_SETTING_AUTORAISE_DELAY)
- g_settings_set_int (meta_wm->p->settings,
- MARCO_AUTORAISE_DELAY_KEY,
- settings->autoraise_delay);
-
- if (settings->flags & MATE_WM_SETTING_FONT) {
- g_settings_set_string (meta_wm->p->settings,
- MARCO_FONT_KEY,
- settings->font);
- }
-
- if (settings->flags & MATE_WM_SETTING_MOUSE_MOVE_MODIFIER) {
- char *value;
-
- value = g_strdup_printf ("<%s>", settings->mouse_move_modifier);
- g_settings_set_string (meta_wm->p->settings,
- MARCO_MOUSE_MODIFIER_KEY,
- value);
- g_free (value);
- }
-
- if (settings->flags & MATE_WM_SETTING_THEME) {
- g_settings_set_string (meta_wm->p->settings,
- MARCO_THEME_KEY,
- settings->theme);
- }
-
- if (settings->flags & MATE_WM_SETTING_DOUBLE_CLICK_ACTION) {
- g_settings_set_enum (meta_wm->p->settings,
- MARCO_DOUBLE_CLICK_TITLEBAR_KEY,
- settings->double_click_action);
- }
-}
-
-static void
-marco_get_settings (MateWindowManager *wm,
- MateWMSettings *settings)
-{
- int to_get;
- MarcoWindowManager *meta_wm;
-
- meta_wm = MARCO_WINDOW_MANAGER (wm);
-
- to_get = settings->flags;
- settings->flags = 0;
-
- if (to_get & MATE_WM_SETTING_COMPOSITING_MANAGER) {
- settings->compositing_manager = g_settings_get_boolean (meta_wm->p->settings,
- MARCO_COMPOSITING_MANAGER_KEY);
- settings->flags |= MATE_WM_SETTING_COMPOSITING_MANAGER;
- }
-
- if (to_get & MATE_WM_SETTING_COMPOSITING_ALTTAB) {
- settings->compositing_fast_alt_tab = g_settings_get_boolean (meta_wm->p->settings,
- MARCO_COMPOSITING_FAST_ALT_TAB_KEY);
- settings->flags |= MATE_WM_SETTING_COMPOSITING_ALTTAB;
- }
-
- if (to_get & MATE_WM_SETTING_MOUSE_FOCUS) {
- gint marco_focus_value;
-
- marco_focus_value = g_settings_get_enum (meta_wm->p->settings,
- MARCO_FOCUS_KEY);
- settings->focus_follows_mouse = FALSE;
- if (marco_focus_value == FOCUS_MODE_SLOPPY || marco_focus_value == FOCUS_MODE_MOUSE)
- settings->focus_follows_mouse = TRUE;
-
- settings->flags |= MATE_WM_SETTING_MOUSE_FOCUS;
- }
-
- if (to_get & MATE_WM_SETTING_AUTORAISE) {
- settings->autoraise = (g_settings_get_boolean (meta_wm->p->settings,
- MARCO_AUTORAISE_KEY) != FALSE);
- settings->flags |= MATE_WM_SETTING_AUTORAISE;
- }
-
- if (to_get & MATE_WM_SETTING_AUTORAISE_DELAY) {
- settings->autoraise_delay =
- g_settings_get_int (meta_wm->p->settings,
- MARCO_AUTORAISE_DELAY_KEY);
- settings->flags |= MATE_WM_SETTING_AUTORAISE_DELAY;
- }
-
- if (to_get & MATE_WM_SETTING_FONT) {
- char *str;
-
- str = g_settings_get_string (meta_wm->p->settings,
- MARCO_FONT_KEY);
-
- if (str == NULL)
- str = g_strdup ("Sans Bold 12");
-
- if (meta_wm->p->font &&
- strcmp (meta_wm->p->font, str) == 0) {
- g_free (str);
- } else {
- g_free (meta_wm->p->font);
- meta_wm->p->font = str;
- }
-
- settings->font = meta_wm->p->font;
-
- settings->flags |= MATE_WM_SETTING_FONT;
- }
-
- if (to_get & MATE_WM_SETTING_MOUSE_MOVE_MODIFIER) {
- char *str;
- const char *new;
-
- str = g_settings_get_string (meta_wm->p->settings,
- MARCO_MOUSE_MODIFIER_KEY);
-
- if (str == NULL)
- str = g_strdup ("<Super>");
-
- if (strcmp (str, "<Super>") == 0)
- new = "Super";
- else if (strcmp (str, "<Alt>") == 0)
- new = "Alt";
- else if (strcmp (str, "<Meta>") == 0)
- new = "Meta";
- else if (strcmp (str, "<Hyper>") == 0)
- new = "Hyper";
- else if (strcmp (str, "<Control>") == 0)
- new = "Control";
- else
- new = NULL;
-
- if (new && meta_wm->p->mouse_modifier &&
- strcmp (new, meta_wm->p->mouse_modifier) == 0) {
- /* unchanged */;
- } else {
- g_free (meta_wm->p->mouse_modifier);
- meta_wm->p->mouse_modifier = g_strdup (new);
- }
-
- g_free (str);
-
- settings->mouse_move_modifier = meta_wm->p->mouse_modifier;
-
- settings->flags |= MATE_WM_SETTING_MOUSE_MOVE_MODIFIER;
- }
-
- if (to_get & MATE_WM_SETTING_THEME) {
- char *str;
-
- str = g_settings_get_string (meta_wm->p->settings,
- MARCO_THEME_KEY);
-
- if (str == NULL)
- str = g_strdup ("Spidey");
-
- g_free (meta_wm->p->theme);
- meta_wm->p->theme = str;
- settings->theme = meta_wm->p->theme;
-
- settings->flags |= MATE_WM_SETTING_THEME;
- }
-
- if (to_get & MATE_WM_SETTING_DOUBLE_CLICK_ACTION) {
- settings->double_click_action =
- g_settings_get_enum (meta_wm->p->settings,
- MARCO_DOUBLE_CLICK_TITLEBAR_KEY);
-
- settings->flags |= MATE_WM_SETTING_DOUBLE_CLICK_ACTION;
- }
-}
-
-static int
-marco_get_settings_mask (MateWindowManager *wm)
-{
- return MATE_WM_SETTING_MASK;
-}
-
-static void
-marco_get_double_click_actions (MateWindowManager *wm,
- const MateWMDoubleClickAction **actions_p,
- int *n_actions_p)
-{
- static MateWMDoubleClickAction actions[] = {
- { ACTION_TITLEBAR_TOGGLE_SHADE, N_("Roll up") },
- { ACTION_TITLEBAR_TOGGLE_MAXIMIZE, N_("Maximize") },
- { ACTION_TITLEBAR_TOGGLE_MAXIMIZE_HORIZONTALLY, N_("Maximize Horizontally") },
- { ACTION_TITLEBAR_TOGGLE_MAXIMIZE_VERTICALLY, N_("Maximize Vertically") },
- { ACTION_TITLEBAR_MINIMIZE, N_("Minimize") },
- { ACTION_TITLEBAR_NONE, N_("None") }
- };
-
- static gboolean initialized = FALSE;
-
- if (!initialized) {
- int i;
-
- initialized = TRUE;
- for (i = 0; i < G_N_ELEMENTS (actions); i++) {
- actions[i].human_readable_name = _(actions[i].human_readable_name);
- }
- }
-
- *actions_p = actions;
- *n_actions_p = (int) G_N_ELEMENTS (actions);
-}
-
-static void
-marco_window_manager_init (MarcoWindowManager *marco_window_manager,
- MarcoWindowManagerClass *class)
-{
- marco_window_manager->p = g_new0 (MarcoWindowManagerPrivate, 1);
- marco_window_manager->p->settings = g_settings_new (MARCO_SCHEMA);
- marco_window_manager->p->font = NULL;
- marco_window_manager->p->theme = NULL;
- marco_window_manager->p->mouse_modifier = NULL;
-
- g_signal_connect (marco_window_manager->p->settings,
- "changed",
- G_CALLBACK (value_changed), marco_window_manager);
-}
-
-static void
-marco_window_manager_finalize (GObject *object)
-{
- MarcoWindowManager *marco_window_manager;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_MARCO_WINDOW_MANAGER (object));
-
- marco_window_manager = MARCO_WINDOW_MANAGER (object);
-
- g_object_unref (marco_window_manager->p->settings);
- g_free (marco_window_manager->p);
-
- G_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
-static void
-marco_window_manager_class_init (MarcoWindowManagerClass *class)
-{
- GObjectClass *object_class;
- MateWindowManagerClass *wm_class;
-
- object_class = G_OBJECT_CLASS (class);
- wm_class = MATE_WINDOW_MANAGER_CLASS (class);
-
- object_class->finalize = marco_window_manager_finalize;
-
- wm_class->change_settings = marco_change_settings;
- wm_class->get_settings = marco_get_settings;
- wm_class->get_settings_mask = marco_get_settings_mask;
- wm_class->get_user_theme_folder = marco_get_user_theme_folder;
- wm_class->get_theme_list = marco_get_theme_list;
- wm_class->get_double_click_actions = marco_get_double_click_actions;
-
- parent_class = g_type_class_peek_parent (class);
-}
-
-GType
-marco_window_manager_get_type (void)
-{
- static GType marco_window_manager_type = 0;
-
- if (!marco_window_manager_type) {
- static GTypeInfo marco_window_manager_info = {
- sizeof (MarcoWindowManagerClass),
- NULL, /* GBaseInitFunc */
- NULL, /* GBaseFinalizeFunc */
- (GClassInitFunc) marco_window_manager_class_init,
- NULL, /* GClassFinalizeFunc */
- NULL, /* user-supplied data */
- sizeof (MarcoWindowManager),
- 0, /* n_preallocs */
- (GInstanceInitFunc) marco_window_manager_init,
- NULL
- };
-
- marco_window_manager_type =
- g_type_register_static (mate_window_manager_get_type (),
- "MarcoWindowManager",
- &marco_window_manager_info, 0);
- }
-
- return marco_window_manager_type;
-}
-
diff --git a/libwindow-settings/marco-window-manager.h b/libwindow-settings/marco-window-manager.h
deleted file mode 100644
index efaf961e..00000000
--- a/libwindow-settings/marco-window-manager.h
+++ /dev/null
@@ -1,30 +0,0 @@
-#ifndef MARCO_WINDOW_MANAGER_H
-#define MARCO_WINDOW_MANAGER_H
-
-#include <glib-object.h>
-#include "mate-window-manager.h"
-
-#define MARCO_WINDOW_MANAGER(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, marco_window_manager_get_type (), MarcoWindowManager)
-#define MARCO_WINDOW_MANAGER_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, marco_window_manager_get_type (), MarcoWindowManagerClass)
-#define IS_MARCO_WINDOW_MANAGER(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, marco_window_manager_get_type ())
-
-typedef struct _MarcoWindowManager MarcoWindowManager;
-typedef struct _MarcoWindowManagerClass MarcoWindowManagerClass;
-
-typedef struct _MarcoWindowManagerPrivate MarcoWindowManagerPrivate;
-
-struct _MarcoWindowManager
-{
- MateWindowManager parent;
- MarcoWindowManagerPrivate *p;
-};
-
-struct _MarcoWindowManagerClass
-{
- MateWindowManagerClass klass;
-};
-
-GType marco_window_manager_get_type (void);
-GObject* window_manager_new (int expected_interface_version);
-
-#endif
diff --git a/libwindow-settings/mate-window-manager.c b/libwindow-settings/mate-window-manager.c
deleted file mode 100644
index ece2e7d3..00000000
--- a/libwindow-settings/mate-window-manager.c
+++ /dev/null
@@ -1,270 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
-
-/* mate-window-manager.h
- * Copyright (C) 2002 Seth Nickell
- * Copyright (C) 2002 Red Hat, Inc.
- *
- * Written by: Seth Nickell <[email protected]>,
- * Havoc Pennington <[email protected]>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * 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., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301, USA.
- */
-
-#include "mate-window-manager.h"
-
-#include <gmodule.h>
-
-static GObjectClass *parent_class;
-
-struct _MateWindowManagerPrivate {
- char *window_manager_name;
- MateDesktopItem *ditem;
-};
-
-GObject *
-mate_window_manager_new (MateDesktopItem *it)
-{
- const char *settings_lib;
- char *module_name;
- MateWindowManagerNewFunc wm_new_func = NULL;
- GObject *wm;
- GModule *module;
- gboolean success;
-
- settings_lib = mate_desktop_item_get_string (it, "X-MATE-WMSettingsModule");
-
- module_name = g_module_build_path (MATE_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 ());
- g_free (module_name);
- 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);
- g_free (module_name);
- return NULL;
- }
-
- g_free (module_name);
-
- wm = (* wm_new_func) (MATE_WINDOW_MANAGER_INTERFACE_VERSION);
-
- if (wm == NULL)
- return NULL;
-
- (MATE_WINDOW_MANAGER (wm))->p->window_manager_name = g_strdup (mate_desktop_item_get_string (it, MATE_DESKTOP_ITEM_NAME));
- (MATE_WINDOW_MANAGER (wm))->p->ditem = mate_desktop_item_ref (it);
-
- return wm;
-}
-
-const char *
-mate_window_manager_get_name (MateWindowManager *wm)
-{
- return wm->p->window_manager_name;
-}
-
-MateDesktopItem *
-mate_window_manager_get_ditem (MateWindowManager *wm)
-{
- return mate_desktop_item_ref (wm->p->ditem);
-}
-
-GList *
-mate_window_manager_get_theme_list (MateWindowManager *wm)
-{
- MateWindowManagerClass *klass = MATE_WINDOW_MANAGER_GET_CLASS (wm);
- if (klass->get_theme_list)
- return klass->get_theme_list (wm);
- else
- return NULL;
-}
-
-char *
-mate_window_manager_get_user_theme_folder (MateWindowManager *wm)
-{
- MateWindowManagerClass *klass = MATE_WINDOW_MANAGER_GET_CLASS (wm);
- if (klass->get_user_theme_folder)
- return klass->get_user_theme_folder (wm);
- else
- return NULL;
-}
-
-void
-mate_window_manager_get_double_click_actions (MateWindowManager *wm,
- const MateWMDoubleClickAction **actions,
- int *n_actions)
-{
- MateWindowManagerClass *klass = MATE_WINDOW_MANAGER_GET_CLASS (wm);
-
- *actions = NULL;
- *n_actions = 0;
-
- if (klass->get_double_click_actions)
- klass->get_double_click_actions (wm, actions, n_actions);
-}
-
-void
-mate_window_manager_change_settings (MateWindowManager *wm,
- const MateWMSettings *settings)
-{
- MateWindowManagerClass *klass = MATE_WINDOW_MANAGER_GET_CLASS (wm);
-
- (* klass->change_settings) (wm, settings);
-}
-
-void
-mate_window_manager_get_settings (MateWindowManager *wm,
- MateWMSettings *settings)
-{
- MateWindowManagerClass *klass = MATE_WINDOW_MANAGER_GET_CLASS (wm);
- int mask;
-
- mask = (* klass->get_settings_mask) (wm);
- settings->flags &= mask; /* avoid back compat issues by not returning
- * fields to the caller that the WM module
- * doesn't know about
- */
-
- (* klass->get_settings) (wm, settings);
-}
-
-static void
-mate_window_manager_init (MateWindowManager *mate_window_manager, MateWindowManagerClass *class)
-{
- mate_window_manager->p = g_new0 (MateWindowManagerPrivate, 1);
-}
-
-static void
-mate_window_manager_finalize (GObject *object)
-{
- MateWindowManager *mate_window_manager;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_MATE_WINDOW_MANAGER (object));
-
- mate_window_manager = MATE_WINDOW_MANAGER (object);
-
- g_free (mate_window_manager->p);
-
- parent_class->finalize (object);
-}
-
-enum {
- SETTINGS_CHANGED,
- LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL] = { 0 };
-
-static void
-mate_window_manager_class_init (MateWindowManagerClass *class)
-{
- GObjectClass *object_class;
-
- object_class = G_OBJECT_CLASS (class);
-
- object_class->finalize = mate_window_manager_finalize;
-
- parent_class = g_type_class_peek_parent (class);
-
- signals[SETTINGS_CHANGED] =
- g_signal_new ("settings_changed",
- G_OBJECT_CLASS_TYPE (class),
- G_SIGNAL_RUN_FIRST | G_SIGNAL_NO_RECURSE,
- G_STRUCT_OFFSET (MateWindowManagerClass, settings_changed),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
-}
-
-GType
-mate_window_manager_get_type (void)
-{
- static GType mate_window_manager_type = 0;
-
- if (!mate_window_manager_type) {
- static GTypeInfo mate_window_manager_info = {
- sizeof (MateWindowManagerClass),
- NULL, /* GBaseInitFunc */
- NULL, /* GBaseFinalizeFunc */
- (GClassInitFunc) mate_window_manager_class_init,
- NULL, /* GClassFinalizeFunc */
- NULL, /* user-supplied data */
- sizeof (MateWindowManager),
- 0, /* n_preallocs */
- (GInstanceInitFunc) mate_window_manager_init,
- NULL
- };
-
- mate_window_manager_type =
- g_type_register_static (G_TYPE_OBJECT,
- "MateWindowManager",
- &mate_window_manager_info, 0);
- }
-
- return mate_window_manager_type;
-}
-
-void
-mate_window_manager_settings_changed (MateWindowManager *wm)
-{
- g_signal_emit (wm, signals[SETTINGS_CHANGED], 0);
-}
-
-/* Helper functions for MateWMSettings */
-MateWMSettings *
-mate_wm_settings_copy (MateWMSettings *settings)
-{
- MateWMSettings *retval;
-
- g_return_val_if_fail (settings != NULL, NULL);
-
- retval = g_new (MateWMSettings, 1);
- *retval = *settings;
-
- if (retval->flags & MATE_WM_SETTING_FONT)
- retval->font = g_strdup (retval->font);
- if (retval->flags & MATE_WM_SETTING_MOUSE_MOVE_MODIFIER)
- retval->mouse_move_modifier = g_strdup (retval->mouse_move_modifier);
- if (retval->flags & MATE_WM_SETTING_THEME)
- retval->theme = g_strdup (retval->theme);
-
- return retval;
-}
-
-void
-mate_wm_settings_free (MateWMSettings *settings)
-{
- g_return_if_fail (settings != NULL);
-
- if (settings->flags & MATE_WM_SETTING_FONT)
- g_free ((void *) settings->font);
- if (settings->flags & MATE_WM_SETTING_MOUSE_MOVE_MODIFIER)
- g_free ((void *) settings->mouse_move_modifier);
- if (settings->flags & MATE_WM_SETTING_THEME)
- g_free ((void *)settings->theme);
-
- g_free (settings);
-}
-
diff --git a/libwindow-settings/mate-window-manager.h b/libwindow-settings/mate-window-manager.h
deleted file mode 100644
index 0bc2fc24..00000000
--- a/libwindow-settings/mate-window-manager.h
+++ /dev/null
@@ -1,171 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
-
-/* mate-window-manager.h
- * Copyright (C) 2002 Seth Nickell
- * Copyright (C) 2002 Red Hat, Inc.
- *
- * Written by: Seth Nickell <[email protected]>,
- * Havoc Pennington <[email protected]>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * 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., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301, USA.
- */
-
-#ifndef MATE_WINDOW_MANAGER_H
-#define MATE_WINDOW_MANAGER_H
-
-#include <glib.h>
-#include <glib-object.h>
-#include <libmate-desktop/mate-desktop-item.h>
-
-/* Increment if backward-incompatible changes are made, so we get a clean
- * error. In principle the libtool versioning handles this, but
- * in combination with dlopen I don't quite trust that.
- */
-#define MATE_WINDOW_MANAGER_INTERFACE_VERSION 1
-
-typedef GObject * (* MateWindowManagerNewFunc) (int expected_interface_version);
-
-typedef enum
-{
- MATE_WM_SETTING_FONT = 1 << 0,
- MATE_WM_SETTING_MOUSE_FOCUS = 1 << 1,
- MATE_WM_SETTING_AUTORAISE = 1 << 2,
- MATE_WM_SETTING_AUTORAISE_DELAY = 1 << 3,
- MATE_WM_SETTING_MOUSE_MOVE_MODIFIER = 1 << 4,
- MATE_WM_SETTING_THEME = 1 << 5,
- MATE_WM_SETTING_DOUBLE_CLICK_ACTION = 1 << 6,
- MATE_WM_SETTING_COMPOSITING_MANAGER = 1 << 7,
- MATE_WM_SETTING_COMPOSITING_ALTTAB = 1 << 8,
- MATE_WM_SETTING_MASK =
- MATE_WM_SETTING_FONT |
- MATE_WM_SETTING_MOUSE_FOCUS |
- MATE_WM_SETTING_AUTORAISE |
- MATE_WM_SETTING_AUTORAISE_DELAY |
- MATE_WM_SETTING_MOUSE_MOVE_MODIFIER |
- MATE_WM_SETTING_THEME |
- MATE_WM_SETTING_DOUBLE_CLICK_ACTION |
- MATE_WM_SETTING_COMPOSITING_MANAGER |
- MATE_WM_SETTING_COMPOSITING_ALTTAB
-} MateWMSettingsFlags;
-
-typedef struct
-{
- int number;
- const char *human_readable_name;
-} MateWMDoubleClickAction;
-
-typedef struct
-{
- MateWMSettingsFlags flags; /* this allows us to expand the struct
- * while remaining binary compatible
- */
- const char *font;
- int autoraise_delay;
- /* One of the strings "Alt", "Control", "Super", "Hyper", "Meta" */
- const char *mouse_move_modifier;
- const char *theme;
- int double_click_action;
-
- guint focus_follows_mouse : 1;
- guint autoraise : 1;
-
- gboolean compositing_manager;
- gboolean compositing_fast_alt_tab;
-
-} MateWMSettings;
-
-G_BEGIN_DECLS
-
-#define MATE_WINDOW_MANAGER(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, mate_window_manager_get_type (), MateWindowManager)
-#define MATE_WINDOW_MANAGER_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, mate_window_manager_get_type (), MateWindowManagerClass)
-#define IS_MATE_WINDOW_MANAGER(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, mate_window_manager_get_type ())
-#define MATE_WINDOW_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), mate_window_manager_get_type, MateWindowManagerClass))
-
-typedef struct _MateWindowManager MateWindowManager;
-typedef struct _MateWindowManagerClass MateWindowManagerClass;
-
-typedef struct _MateWindowManagerPrivate MateWindowManagerPrivate;
-
-struct _MateWindowManager
-{
- GObject parent;
-
- MateWindowManagerPrivate *p;
-};
-
-struct _MateWindowManagerClass
-{
- GObjectClass klass;
-
- void (* settings_changed) (MateWindowManager *wm);
-
- void (* change_settings) (MateWindowManager *wm,
- const MateWMSettings *settings);
- void (* get_settings) (MateWindowManager *wm,
- MateWMSettings *settings);
-
- GList * (* get_theme_list) (MateWindowManager *wm);
- char * (* get_user_theme_folder) (MateWindowManager *wm);
-
- int (* get_settings_mask) (MateWindowManager *wm);
-
- void (* get_double_click_actions) (MateWindowManager *wm,
- const MateWMDoubleClickAction **actions,
- int *n_actions);
-
- void (* padding_func_1) (MateWindowManager *wm);
- void (* padding_func_2) (MateWindowManager *wm);
- void (* padding_func_3) (MateWindowManager *wm);
- void (* padding_func_4) (MateWindowManager *wm);
- void (* padding_func_5) (MateWindowManager *wm);
- void (* padding_func_6) (MateWindowManager *wm);
- void (* padding_func_7) (MateWindowManager *wm);
- void (* padding_func_8) (MateWindowManager *wm);
- void (* padding_func_9) (MateWindowManager *wm);
- void (* padding_func_10) (MateWindowManager *wm);
-};
-
-GObject * mate_window_manager_new (MateDesktopItem *item);
-GType mate_window_manager_get_type (void);
-const char * mate_window_manager_get_name (MateWindowManager *wm);
-MateDesktopItem *mate_window_manager_get_ditem (MateWindowManager *wm);
-
-/* GList of char *'s */
-GList * mate_window_manager_get_theme_list (MateWindowManager *wm);
-char * mate_window_manager_get_user_theme_folder (MateWindowManager *wm);
-
-/* only uses fields with their flags set */
-void mate_window_manager_change_settings (MateWindowManager *wm,
- const MateWMSettings *settings);
-/* only gets fields with their flags set (and if it fails to get a field,
- * it unsets that flag, so flags should be checked on return)
- */
-void mate_window_manager_get_settings (MateWindowManager *wm,
- MateWMSettings *settings);
-
-void mate_window_manager_settings_changed (MateWindowManager *wm);
-
-void mate_window_manager_get_double_click_actions (MateWindowManager *wm,
- const MateWMDoubleClickAction **actions,
- int *n_actions);
-
-/* Helper functions for MateWMSettings */
-MateWMSettings *mate_wm_settings_copy (MateWMSettings *settings);
-void mate_wm_settings_free (MateWMSettings *settings);
-
-G_END_DECLS
-
-#endif /* MATE_WINDOW_MANAGER_H */
diff --git a/libwindow-settings/mate-window-settings-2.0.pc.in b/libwindow-settings/mate-window-settings-2.0.pc.in
deleted file mode 100644
index 32c337ed..00000000
--- a/libwindow-settings/mate-window-settings-2.0.pc.in
+++ /dev/null
@@ -1,11 +0,0 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
-
-Name: mate-window-settings-2.0
-Description: Utility library for getting window manager settings
-Requires: gtk+-3.0 mate-desktop-2.0
-Version: @VERSION@
-Libs: -L${libdir} -lmate-window-settings
-Cflags: -I${includedir}/mate-window-settings-2.0
diff --git a/libwindow-settings/mate-wm-manager.c b/libwindow-settings/mate-wm-manager.c
deleted file mode 100644
index 096f9009..00000000
--- a/libwindow-settings/mate-wm-manager.c
+++ /dev/null
@@ -1,322 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
-
-/* mate-wm-manager.c
- * Copyright (C) 2002 Seth Nickell
- * Copyright (C) 1998, 2002 Red Hat, Inc.
- *
- * Written by: Seth Nickell <[email protected]>,
- * Havoc Pennington <[email protected]>
- * Owen Taylor <[email protected]>,
- * Bradford Hovinen <[email protected]>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * 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., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301, USA.
- */
-
-#include <config.h>
-#include "mate-wm-manager.h"
-
-#include <glib.h>
-#include <glib/gi18n.h>
-#include <gdk/gdk.h>
-#include <gdk/gdkx.h>
-#include <string.h>
-
-typedef struct {
- MateDesktopItem *ditem;
- char *name; /* human readable, localized */
- char *identify_name; /* name we expect to be set on the screen */
- char *exec;
- char *tryexec;
- char *config_exec;
- char *config_tryexec;
- char *module;
- gboolean session_managed;
- gboolean is_user;
- gboolean is_present;
- gboolean is_config_present;
- MateWindowManager *mate_wm;
-} AvailableWindowManager;
-
-static gboolean done_scan = FALSE;
-static GList *available_wms;
-
-static void
-wm_free (AvailableWindowManager *wm)
-{
- g_free (wm->name);
- g_free (wm->exec);
- g_free (wm->tryexec);
- g_free (wm->config_exec);
- g_free (wm->config_tryexec);
- g_free (wm->module);
- g_free (wm->identify_name);
-
- g_free (wm);
-}
-
-static GList *
-list_desktop_files_in_dir (const gchar *directory)
-{
- GDir *dir;
- GList *result = NULL;
- const gchar *suffix;
- const gchar *name;
- const char* const ext = ".desktop";
- size_t ext_len;
- GError *error = NULL;
-
- dir = g_dir_open (directory, 0, &error);
-
- if (error) {
- g_debug ("Could not read the folder content: %s",
- error->message);
- g_error_free (error);
- return NULL;
- }
-
- ext_len = strlen (ext);
-
- while ((name = g_dir_read_name (dir)) != NULL) {
- /* Ignore files without .desktop suffix, and ignore
- * .desktop files with no prefix
- */
- size_t name_len;
-
- name_len = strlen (name);
-
- if (name_len <= ext_len)
- continue;
-
- suffix = name + name_len - ext_len;
-
- if (strcmp (suffix, ext) != 0)
- continue;
-
- result = g_list_prepend (result,
- g_build_filename (directory, name, NULL));
- }
-
- g_dir_close (dir);
-
- return result;
-}
-
-static gint
-wm_compare (gconstpointer a, gconstpointer b)
-{
- const AvailableWindowManager *wm_a = (const AvailableWindowManager *)a;
- const AvailableWindowManager *wm_b = (const AvailableWindowManager *)b;
-
- /* mmm, sloooow */
-
- return g_utf8_collate (mate_desktop_item_get_string (wm_a->ditem, MATE_DESKTOP_ITEM_NAME),
- mate_desktop_item_get_string (wm_b->ditem, MATE_DESKTOP_ITEM_NAME));
-}
-
-static AvailableWindowManager*
-wm_load (const char *desktop_file,
- gboolean is_user)
-{
- AvailableWindowManager *wm;
- gchar *path;
-
- wm = g_new0 (AvailableWindowManager, 1);
-
- wm->ditem = mate_desktop_item_new_from_file (desktop_file, 0, NULL);
- if (wm->ditem == NULL) {
- g_free (wm);
- return NULL;
- }
-
- mate_desktop_item_set_entry_type (wm->ditem, MATE_DESKTOP_ITEM_TYPE_APPLICATION);
-
- #define GET_STRING(X) g_strdup (mate_desktop_item_get_string (wm->ditem, (X)))
- #define GET_BOOLEAN(X) mate_desktop_item_get_boolean (wm->ditem, (X))
-
- wm->exec = GET_STRING (MATE_DESKTOP_ITEM_EXEC);
- wm->tryexec = GET_STRING (MATE_DESKTOP_ITEM_TRY_EXEC);
- wm->name = GET_STRING (MATE_DESKTOP_ITEM_NAME);
- wm->config_exec = GET_STRING ("ConfigExec");
- wm->config_tryexec = GET_STRING ("ConfigTryExec");
- wm->session_managed = GET_BOOLEAN ("SessionManaged");
- wm->module = GET_STRING ("X-MATE-WMSettingsModule");
- wm->identify_name = GET_STRING ("X-MATE-WMName");
- wm->is_user = is_user;
-
- #undef GET_STRING
- #undef GET_BOOLEAN
-
- if (wm->exec) {
- const char* exec;
-
- exec = wm->tryexec ? wm->tryexec : wm->exec;
- if ((path = g_find_program_in_path (exec)) != NULL) {
- wm->is_present = TRUE;
- g_free (path);
- } else {
- wm->is_present = FALSE;
- }
- }
-
- if (wm->config_exec) {
- const char* exec;
-
- exec = wm->config_tryexec ? wm->config_tryexec : wm->config_exec;
- if ((path = g_find_program_in_path (exec)) != NULL) {
- wm->is_config_present = TRUE;
- g_free (path);
- } else {
- wm->is_config_present = FALSE;
- }
- }
-
- if (wm->name && wm->exec &&
- (wm->is_user || wm->is_present))
- return wm;
- else {
- wm_free (wm);
- return NULL;
- }
-}
-
-static void
-scan_wm_directory (const gchar *directory, gboolean is_user)
-{
- GList *tmp_list;
- GList *files;
-
- files = list_desktop_files_in_dir (directory);
-
- tmp_list = files;
- while (tmp_list) {
- AvailableWindowManager *wm;
-
- wm = wm_load (tmp_list->data, is_user);
-
- if (wm != NULL)
- available_wms = g_list_prepend (available_wms, wm);
-
- tmp_list = tmp_list->next;
- }
-
- g_list_free_full (files, g_free);
-}
-
-void
-mate_wm_manager_init (void)
-{
- gchar *user_config_dir;
-
- if (done_scan)
- {
- return;
- }
- done_scan = TRUE;
-
- /* look up WMs on system config folder */
- scan_wm_directory (MATE_WM_PROPERTY_PATH, FALSE);
-
- /* look up WMs on user config folder */
- user_config_dir = g_build_filename (g_get_user_config_dir (), "mate", "wm-properties", NULL);
- scan_wm_directory (user_config_dir, TRUE);
- g_free (user_config_dir);
-
- available_wms = g_list_sort (available_wms, wm_compare);
-}
-
-static AvailableWindowManager*
-get_current_wm (GdkScreen *screen)
-{
- AvailableWindowManager *current_wm;
- const char *name;
- GList *tmp_list;
-
- g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL);
-
- name = gdk_x11_screen_get_window_manager_name (screen);
-
- current_wm = NULL;
-
- tmp_list = available_wms;
- while (tmp_list != NULL) {
- AvailableWindowManager *wm = tmp_list->data;
-
- if (wm->identify_name &&
- strcmp (wm->identify_name, name) == 0) {
- current_wm = wm;
- break;
- }
- tmp_list = tmp_list->next;
- }
-
- if (current_wm == NULL) {
- /* Try with localized name, sort of crackrock
- * back compat hack
- */
-
- tmp_list = available_wms;
- while (tmp_list != NULL) {
- AvailableWindowManager *wm = tmp_list->data;
-
- if (strcmp (wm->name, name) == 0) {
- current_wm = wm;
- break;
- }
- tmp_list = tmp_list->next;
- }
- }
-
- return current_wm;
-}
-
-MateWindowManager*
-mate_wm_manager_get_current (GdkScreen *screen)
-{
- AvailableWindowManager *wm;
-
- wm = get_current_wm (screen);
-
- if (wm != NULL && wm->module != NULL)
- /* may still return NULL here */
- return (MateWindowManager*) mate_window_manager_new (wm->ditem);
- else
- return NULL;
-}
-
-gboolean
-mate_wm_manager_spawn_config_tool_for_current (GdkScreen *screen,
- GError **error)
-{
- AvailableWindowManager *wm;
-
- wm = get_current_wm (screen);
-
- if (wm != NULL && wm->config_exec != NULL) {
- return g_spawn_command_line_async (wm->config_exec,
- error);
- } else {
- const char *name;
-
- name = gdk_x11_screen_get_window_manager_name (screen);
-
- g_set_error (error,
- G_SPAWN_ERROR,
- G_SPAWN_ERROR_FAILED,
- _("Window manager \"%s\" has not registered a configuration tool\n"),
- name);
- return FALSE;
- }
-}
diff --git a/libwindow-settings/mate-wm-manager.h b/libwindow-settings/mate-wm-manager.h
deleted file mode 100644
index 5319390e..00000000
--- a/libwindow-settings/mate-wm-manager.h
+++ /dev/null
@@ -1,16 +0,0 @@
-#ifndef MATE_WINDOW_MANAGER_LIST_H
-#define MATE_WINDOW_MANAGER_LIST_H
-
-#include <gtk/gtk.h>
-
-#include "mate-window-manager.h"
-
-void mate_wm_manager_init (void);
-
-/* gets the currently active window manager */
-MateWindowManager *mate_wm_manager_get_current (GdkScreen *screen);
-
-gboolean mate_wm_manager_spawn_config_tool_for_current (GdkScreen *screen,
- GError **error);
-
-#endif
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 8504b4fb..02c194ae 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -81,8 +81,6 @@ capplets/time-admin/src/time-share.c
capplets/time-admin/src/time-zone.c
capplets/time-admin/src/time-zones.h
capplets/time-admin/data/mate-time-admin.desktop.in
-libwindow-settings/mate-wm-manager.c
-libwindow-settings/marco-window-manager.c
shell/control-center.c
shell/matecc.desktop.in
shell/matecc.directory.desktop.in