From 7f595187a140a45ee5ba2fc2b9c068b46d829f79 Mon Sep 17 00:00:00 2001 From: Stefano Karapetsas Date: Mon, 1 Oct 2012 22:52:14 +0200 Subject: migrate to gsettings --- src/Makefile.am | 30 +- src/core/core.c | 42 +- src/core/keybindings.c | 4 +- src/core/prefs.c | 1189 ++++++++++------------------------------ src/core/screen.c | 6 +- src/include/all-keybindings.h | 394 +++++-------- src/include/prefs.h | 4 +- src/marco.schemas.in.in | 611 --------------------- src/org.mate.marco.gschema.xml | 722 ++++++++++++++++++++++++ 9 files changed, 1171 insertions(+), 1831 deletions(-) delete mode 100644 src/marco.schemas.in.in create mode 100644 src/org.mate.marco.gschema.xml (limited to 'src') diff --git a/src/Makefile.am b/src/Makefile.am index 52223298..4688139d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -142,15 +142,6 @@ libmarcoinclude_HEADERS = \ marco_theme_viewer_SOURCES= \ ui/theme-viewer.c -schema_bindings_SOURCES = \ - core/schema-bindings.c \ - marco.schemas.in.in - -schema_bindings_LDADD = @MARCO_LIBS@ -marco.schemas.in: schema_bindings ${srcdir}/marco.schemas.in.in - @echo Generating keybinding schemas... ${srcdir}/marco.schemas.in.in - ${builddir}/schema_bindings ${srcdir}/marco.schemas.in.in ${builddir}/marco.schemas.in - bin_PROGRAMS=marco marco-theme-viewer EFENCE= @@ -161,7 +152,7 @@ testboxes_SOURCES=include/util.h core/util.c include/boxes.h core/boxes.c core/t testgradient_SOURCES=ui/gradient.h ui/gradient.c ui/testgradient.c testasyncgetprop_SOURCES=core/async-getprop.h core/async-getprop.c core/testasyncgetprop.c -noinst_PROGRAMS=testboxes testgradient testasyncgetprop schema_bindings +noinst_PROGRAMS=testboxes testgradient testasyncgetprop testboxes_LDADD= @MARCO_LIBS@ testgradient_LDADD= @MARCO_LIBS@ @@ -179,9 +170,8 @@ wmproperties_in_files=marco-wm.desktop.in wmproperties_files=$(wmproperties_in_files:.desktop.in=.desktop) wmproperties_DATA = $(wmproperties_files) -schemadir = @MATECONF_SCHEMA_FILE_DIR@ -schema_in_files = marco.schemas.in -schema_DATA = $(schema_in_files:.schemas.in=.schemas) +gsettings_SCHEMAS = org.mate.marco.gschema.xml +@GSETTINGS_RULES@ @INTLTOOL_XML_NOMERGE_RULE@ @@ -189,21 +179,10 @@ xmldir = @MATE_KEYBINDINGS_KEYSDIR@ xml_in_files = 50-marco-desktop-key.xml.in 50-marco-key.xml.in xml_DATA = $(xml_in_files:.xml.in=.xml) -@INTLTOOL_SCHEMAS_RULE@ - -if MATECONF_SCHEMAS_INSTALL -install-data-local: - MATECONF_CONFIG_SOURCE=$(MATECONF_SCHEMA_CONFIG_SOURCE) $(MATECONFTOOL) --makefile-install-rule $(schema_DATA) -else -install-data-local: -endif - BUILT_SOURCES = CLEANFILES = \ marco.desktop \ marco-wm.desktop \ - marco.schemas \ - marco.schemas.in \ 50-marco-desktop-key.xml \ 50-marco-key.xml @@ -214,10 +193,9 @@ pkgconfig_DATA = libmarco-private.pc EXTRA_DIST=$(desktopfiles_files) \ $(wmproperties_files) \ $(IMAGES) \ - $(schema_DATA) \ + $(gsettings_SCHEMAS) \ $(desktopfiles_in_files) \ $(wmproperties_in_files) \ - $(schema_in_files) \ $(xml_in_files) \ libmarco-private.pc.in diff --git a/src/core/core.c b/src/core/core.c index 963cbfa7..ed46f708 100644 --- a/src/core/core.c +++ b/src/core/core.c @@ -536,74 +536,74 @@ meta_core_get_menu_accelerator (MetaMenuOp menu_op, break; case META_MENU_OP_UNSHADE: case META_MENU_OP_SHADE: - name = "toggle_shaded"; + name = "toggle-shaded"; break; case META_MENU_OP_UNSTICK: case META_MENU_OP_STICK: - name = "toggle_on_all_workspaces"; + name = "toggle-on-all-workspaces"; break; case META_MENU_OP_ABOVE: case META_MENU_OP_UNABOVE: - name = "toggle_above"; + name = "toggle-above"; break; case META_MENU_OP_WORKSPACES: switch (workspace) { case 1: - name = "move_to_workspace_1"; + name = "move-to-workspace-1"; break; case 2: - name = "move_to_workspace_2"; + name = "move-to-workspace-2"; break; case 3: - name = "move_to_workspace_3"; + name = "move-to-workspace-3"; break; case 4: - name = "move_to_workspace_4"; + name = "move-to-workspace-4"; break; case 5: - name = "move_to_workspace_5"; + name = "move-to-workspace-5"; break; case 6: - name = "move_to_workspace_6"; + name = "move-to-workspace-6"; break; case 7: - name = "move_to_workspace_7"; + name = "move-to-workspace-7"; break; case 8: - name = "move_to_workspace_8"; + name = "move-to-workspace-8"; break; case 9: - name = "move_to_workspace_9"; + name = "move-to-workspace-9"; break; case 10: - name = "move_to_workspace_10"; + name = "move-to-workspace-10"; break; case 11: - name = "move_to_workspace_11"; + name = "move-to-workspace-11"; break; case 12: - name = "move_to_workspace_12"; + name = "move-to-workspace-12"; break; } break; case META_MENU_OP_MOVE: - name = "begin_move"; + name = "begin-move"; break; case META_MENU_OP_RESIZE: - name = "begin_resize"; + name = "begin-resize"; break; case META_MENU_OP_MOVE_LEFT: - name = "move_to_workspace_left"; + name = "move-to-workspace-left"; break; case META_MENU_OP_MOVE_RIGHT: - name = "move_to_workspace_right"; + name = "move-to-workspace-right"; break; case META_MENU_OP_MOVE_UP: - name = "move_to_workspace_up"; + name = "move-to-workspace-up"; break; case META_MENU_OP_MOVE_DOWN: - name = "move_to_workspace_down"; + name = "move-to-workspace-down"; break; case META_MENU_OP_RECOVER: /* No keybinding for this one */ diff --git a/src/core/keybindings.c b/src/core/keybindings.c index e1d87920..d75c3025 100644 --- a/src/core/keybindings.c +++ b/src/core/keybindings.c @@ -56,7 +56,7 @@ typedef void (* MetaKeyHandlerFunc) (MetaDisplay *display, MetaKeyBinding *binding); /* Prototypes for handlers */ -#define keybind(name, handler, param, flags, stroke, description) \ +#define keybind(name, handler, param, flags) \ static void \ handler (MetaDisplay *display,\ MetaScreen *screen,\ @@ -124,7 +124,7 @@ struct _MetaKeyBinding const MetaKeyHandler *handler; }; -#define keybind(name, handler, param, flags, stroke, description) \ +#define keybind(name, handler, param, flags) \ { #name, handler, param, flags }, static const MetaKeyHandler key_handlers[] = { #include "all-keybindings.h" diff --git a/src/core/prefs.c b/src/core/prefs.c index 816c80f0..aae8a315 100644 --- a/src/core/prefs.c +++ b/src/core/prefs.c @@ -27,9 +27,7 @@ #include "prefs.h" #include "ui.h" #include "util.h" -#ifdef HAVE_MATECONF -#include -#endif +#include #include #include @@ -40,39 +38,55 @@ #define SCREENSHOT_COMMAND_IDX (MAX_COMMANDS - 2) #define WIN_SCREENSHOT_COMMAND_IDX (MAX_COMMANDS - 1) -/* If you add a key, it needs updating in init() and in the mateconf - * notify listener and of course in the .schemas file. +/* If you add a key, it needs updating in init() and in the GSettings + * notify listener and of course in the .gschema file. * * Keys which are handled by one of the unified handlers below are * not given a name here, because the purpose of the unified handlers * is that keys should be referred to exactly once. */ -#define KEY_TITLEBAR_FONT "/apps/marco/general/titlebar_font" -#define KEY_NUM_WORKSPACES "/apps/marco/general/num_workspaces" -#define KEY_COMPOSITOR "/apps/marco/general/compositing_manager" -#define KEY_COMPOSITOR_FAST_ALT_TAB "/apps/marco/general/compositing_fast_alt_tab" -#define KEY_MATE_ACCESSIBILITY "/desktop/mate/interface/accessibility" +#define KEY_GENERAL_SCHEMA "org.mate.Marco.general" +#define KEY_GENERAL_TITLEBAR_FONT "titlebar-font" +#define KEY_GENERAL_NUM_WORKSPACES "num-workspaces" +#define KEY_GENERAL_COMPOSITOR "compositing-manager" +#define KEY_GENERAL_COMPOSITOR_FAST_ALT_TAB "compositing-fast-alt-tab" -#define KEY_COMMAND_DIRECTORY "/apps/marco/keybinding_commands" -#define KEY_COMMAND_PREFIX "/apps/marco/keybinding_commands/command_" +#define KEY_COMMAND_SCHEMA "org.mate.Marco.keybinding-commands" +#define KEY_COMMAND_PREFIX "command-" -#define KEY_TERMINAL_DIR "/desktop/mate/applications/terminal" -#define KEY_TERMINAL_COMMAND KEY_TERMINAL_DIR "/exec" +#define KEY_SCREEN_BINDINGS_SCHEMA "org.mate.Marco.global-keybindings" -#define KEY_SCREEN_BINDINGS_PREFIX "/apps/marco/global_keybindings" -#define KEY_WINDOW_BINDINGS_PREFIX "/apps/marco/window_keybindings" -#define KEY_LIST_BINDINGS_SUFFIX "_list" +#define KEY_WINDOW_BINDINGS_SCHEMA "org.mate.Marco.window-keybindings" -#define KEY_WORKSPACE_NAME_DIRECTORY "/apps/marco/workspace_names" -#define KEY_WORKSPACE_NAME_PREFIX "/apps/marco/workspace_names/name_" +#define KEY_WORKSPACE_NAME_SCHEMA "org.mate.Marco.workspace-names" +#define KEY_WORKSPACE_NAME_PREFIX "name-" +#define KEY_MATE_INTERFACE_SCHEMA "org.mate.interface" +#define KEY_MATE_INTERFACE_ACCESSIBILITY "accessibility" +#define KEY_MATE_INTERFACE_ENABLE_ANIMATIONS "enable-animations" + +#define KEY_MATE_TERMINAL_SCHEMA "org.mate.applications-terminal" +#define KEY_MATE_TERMINAL_COMMAND "exec" + +#define KEY_MATE_MOUSE_SCHEMA "org.mate.peripherals-mouse" +#define KEY_MATE_MOUSE_CURSOR_THEME "cursor-theme" +#define KEY_MATE_MOUSE_CURSOR_SIZE "cursor-size" + +#define SETTINGS(s) g_hash_table_lookup (settings_schemas, (s)) + +static GSettings *settings_general; +static GSettings *settings_command; +static GSettings *settings_screen_bindings; +static GSettings *settings_window_bindings; +static GSettings *settings_workspace_names; +static GSettings *settings_mate_interface; +static GSettings *settings_mate_terminal; +static GSettings *settings_mate_mouse; +static GHashTable *settings_schemas; -#ifdef HAVE_MATECONF -static MateConfClient *default_client = NULL; static GList *changes = NULL; static guint changed_idle; static GList *listeners = NULL; -#endif static gboolean use_system_font = FALSE; static PangoFontDescription *titlebar_font = NULL; @@ -112,42 +126,24 @@ static char *terminal_command = NULL; static char *workspace_names[MAX_REASONABLE_WORKSPACES] = { NULL, }; -#ifdef HAVE_MATECONF -static gboolean handle_preference_update_enum (const gchar *key, MateConfValue *value); +static gboolean handle_preference_update_enum (const gchar *key, GSettings *settings); static gboolean update_key_binding (const char *name, - const char *value); -static gboolean find_and_update_list_binding (MetaKeyPref *bindings, - const char *name, - GSList *value); -static gboolean update_key_list_binding (const char *name, - GSList *value); + gchar *value); static gboolean update_command (const char *name, const char *value); static gboolean update_workspace_name (const char *name, const char *value); -static void change_notify (MateConfClient *client, - guint cnxn_id, - MateConfEntry *entry, - gpointer user_data); +static void change_notify (GSettings *settings, + gchar *key, + gpointer user_data); -static char* mateconf_key_for_workspace_name (int i); +static char* settings_key_for_workspace_name (int i); static void queue_changed (MetaPreference pref); -typedef enum - { - META_LIST_OF_STRINGS, - META_LIST_OF_MATECONFVALUE_STRINGS - } MetaStringListType; - -static gboolean update_list_binding (MetaKeyPref *binding, - GSList *value, - MetaStringListType type_of_value); - static void cleanup_error (GError **error); -static gboolean get_bool (const char *key, gboolean *val); static void maybe_give_disable_workarounds_warning (void); static void titlebar_handler (MetaPreference, const gchar*, gboolean*); @@ -155,74 +151,19 @@ static void theme_name_handler (MetaPreference, const gchar*, gboolean*); static void mouse_button_mods_handler (MetaPreference, const gchar*, gboolean*); static void button_layout_handler (MetaPreference, const gchar*, gboolean*); -#endif /* HAVE_MATECONF */ - static gboolean update_binding (MetaKeyPref *binding, - const char *value); + gchar *value); static void init_bindings (void); static void init_commands (void); static void init_workspace_names (void); -#ifndef HAVE_MATECONF -static void init_button_layout (void); -#endif /* !HAVE_MATECONF */ - -#ifdef HAVE_MATECONF - typedef struct { MetaPrefsChangedFunc func; gpointer data; } MetaPrefsListener; -static MateConfEnumStringPair symtab_focus_mode[] = - { - { META_FOCUS_MODE_CLICK, "click" }, - { META_FOCUS_MODE_SLOPPY, "sloppy" }, - { META_FOCUS_MODE_MOUSE, "mouse" }, - { 0, NULL }, - }; - -static MateConfEnumStringPair symtab_focus_new_windows[] = - { - { META_FOCUS_NEW_WINDOWS_SMART, "smart" }, - { META_FOCUS_NEW_WINDOWS_STRICT, "strict" }, - { 0, NULL }, - }; - -static MateConfEnumStringPair symtab_wrap_style[] = - { - { META_WRAP_NONE, "no wrap" }, - { META_WRAP_CLASSIC, "classic" }, - { META_WRAP_TOROIDAL, "toroidal" }, - { 0, NULL }, - }; - -static MateConfEnumStringPair symtab_visual_bell_type[] = - { - /* Note to the reader: 0 is an invalid value; these start at 1. */ - { META_VISUAL_BELL_FULLSCREEN_FLASH, "fullscreen" }, - { META_VISUAL_BELL_FRAME_FLASH, "frame_flash" }, - { 0, NULL }, - }; - -static MateConfEnumStringPair symtab_titlebar_action[] = - { - { META_ACTION_TITLEBAR_TOGGLE_SHADE, "toggle_shade" }, - { META_ACTION_TITLEBAR_TOGGLE_MAXIMIZE, "toggle_maximize" }, - { META_ACTION_TITLEBAR_TOGGLE_MAXIMIZE_HORIZONTALLY, - "toggle_maximize_horizontally" }, - { META_ACTION_TITLEBAR_TOGGLE_MAXIMIZE_VERTICALLY, - "toggle_maximize_vertically" }, - { META_ACTION_TITLEBAR_MINIMIZE, "minimize" }, - { META_ACTION_TITLEBAR_NONE, "none" }, - { META_ACTION_TITLEBAR_LOWER, "lower" }, - { META_ACTION_TITLEBAR_MENU, "menu" }, - { META_ACTION_TITLEBAR_TOGGLE_SHADE, "toggle_shade" }, - { 0, NULL }, - }; - /** * The details of one preference which is constrained to be * one of a small number of string values-- in other words, @@ -255,14 +196,15 @@ static MateConfEnumStringPair symtab_titlebar_action[] = typedef struct { gchar *key; + gchar *schema; MetaPreference pref; - MateConfEnumStringPair *symtab; - gpointer target; + gint *target; } MetaEnumPreference; typedef struct { gchar *key; + gchar *schema; MetaPreference pref; gboolean *target; gboolean becomes_true_on_destruction; @@ -271,6 +213,7 @@ typedef struct typedef struct { gchar *key; + gchar *schema; MetaPreference pref; /** @@ -306,6 +249,7 @@ typedef struct typedef struct { gchar *key; + gchar *schema; MetaPreference pref; gint *target; /** @@ -328,152 +272,172 @@ typedef struct static MetaEnumPreference preferences_enum[] = { - { "/apps/marco/general/focus_new_windows", + { "focus-new-windows", + KEY_GENERAL_SCHEMA, META_PREF_FOCUS_NEW_WINDOWS, - symtab_focus_new_windows, &focus_new_windows, }, - { "/apps/marco/general/focus_mode", + { "focus-mode", + KEY_GENERAL_SCHEMA, META_PREF_FOCUS_MODE, - symtab_focus_mode, &focus_mode, }, - { "/apps/marco/general/wrap_style", + { "wrap-style", + KEY_GENERAL_SCHEMA, META_PREF_WRAP_STYLE, - symtab_wrap_style, &wrap_style, }, - { "/apps/marco/general/visual_bell_type", + { "visual-bell-type", + KEY_GENERAL_SCHEMA, META_PREF_VISUAL_BELL_TYPE, - symtab_visual_bell_type, &visual_bell_type, }, - { "/apps/marco/general/action_double_click_titlebar", + { "action-double-click-titlebar", + KEY_GENERAL_SCHEMA, META_PREF_ACTION_DOUBLE_CLICK_TITLEBAR, - symtab_titlebar_action, &action_double_click_titlebar, }, - { "/apps/marco/general/action_middle_click_titlebar", + { "action-middle-click-titlebar", + KEY_GENERAL_SCHEMA, META_PREF_ACTION_MIDDLE_CLICK_TITLEBAR, - symtab_titlebar_action, &action_middle_click_titlebar, }, - { "/apps/marco/general/action_right_click_titlebar", + { "action-right-click-titlebar", + KEY_GENERAL_SCHEMA, META_PREF_ACTION_RIGHT_CLICK_TITLEBAR, - symtab_titlebar_action, &action_right_click_titlebar, }, - { NULL, 0, NULL, NULL }, + { NULL, NULL, 0, NULL }, }; static MetaBoolPreference preferences_bool[] = { - { "/apps/marco/general/raise_on_click", + { "raise-on-click", + KEY_GENERAL_SCHEMA, META_PREF_RAISE_ON_CLICK, &raise_on_click, TRUE, }, - { "/apps/marco/general/titlebar_uses_system_font", + { "titlebar-uses-system-font", + KEY_GENERAL_SCHEMA, META_PREF_TITLEBAR_FONT, /* note! shares a pref */ &use_system_font, TRUE, }, - { "/apps/marco/general/application_based", + { "application-based", + KEY_GENERAL_SCHEMA, META_PREF_APPLICATION_BASED, NULL, /* feature is known but disabled */ FALSE, }, - { "/apps/marco/general/disable_workarounds", + { "disable-workarounds", + KEY_GENERAL_SCHEMA, META_PREF_DISABLE_WORKAROUNDS, &disable_workarounds, FALSE, }, - { "/apps/marco/general/auto_raise", + { "auto-raise", + KEY_GENERAL_SCHEMA, META_PREF_AUTO_RAISE, &auto_raise, FALSE, }, - { "/apps/marco/general/visual_bell", + { "visual-bell", + KEY_GENERAL_SCHEMA, META_PREF_VISUAL_BELL, &provide_visual_bell, /* FIXME: change the name: it's confusing */ FALSE, }, - { "/apps/marco/general/audible_bell", + { "audible-bell", + KEY_GENERAL_SCHEMA, META_PREF_AUDIBLE_BELL, &bell_is_audible, /* FIXME: change the name: it's confusing */ FALSE, }, - { "/apps/marco/general/reduced_resources", + { "reduced-resources", + KEY_GENERAL_SCHEMA, META_PREF_REDUCED_RESOURCES, &reduced_resources, FALSE, }, - { "/desktop/mate/interface/accessibility", + { "accessibility", + KEY_MATE_INTERFACE_SCHEMA, META_PREF_MATE_ACCESSIBILITY, &mate_accessibility, FALSE, }, - { "/desktop/mate/interface/enable_animations", + { "enable-animations", + KEY_MATE_INTERFACE_SCHEMA, META_PREF_MATE_ANIMATIONS, &mate_animations, TRUE, }, - { "/apps/marco/general/compositing_manager", + { "compositing-manager", + KEY_GENERAL_SCHEMA, META_PREF_COMPOSITING_MANAGER, &compositing_manager, FALSE, }, - { "/apps/marco/general/compositing_fast_alt_tab", + { "compositing-fast-alt-tab", + KEY_GENERAL_SCHEMA, META_PREF_COMPOSITING_FAST_ALT_TAB, &compositing_fast_alt_tab, FALSE, }, - { "/apps/marco/general/resize_with_right_button", + { "resize-with-right-button", + KEY_GENERAL_SCHEMA, META_PREF_RESIZE_WITH_RIGHT_BUTTON, &resize_with_right_button, FALSE, }, - { NULL, 0, NULL, FALSE }, + { NULL, NULL, 0, NULL, FALSE }, }; static MetaStringPreference preferences_string[] = { - { "/apps/marco/general/mouse_button_modifier", + { "mouse-button-modifier", + KEY_GENERAL_SCHEMA, META_PREF_MOUSE_BUTTON_MODS, mouse_button_mods_handler, NULL, }, - { "/apps/marco/general/theme", + { "theme", + KEY_GENERAL_SCHEMA, META_PREF_THEME, theme_name_handler, NULL, }, - { KEY_TITLEBAR_FONT, + { KEY_GENERAL_TITLEBAR_FONT, + KEY_GENERAL_SCHEMA, META_PREF_TITLEBAR_FONT, titlebar_handler, NULL, }, - { KEY_TERMINAL_COMMAND, + { KEY_MATE_TERMINAL_COMMAND, + KEY_MATE_TERMINAL_SCHEMA, META_PREF_TERMINAL_COMMAND, NULL, &terminal_command, }, - { "/apps/marco/general/button_layout", + { "button-layout", + KEY_GENERAL_SCHEMA, META_PREF_BUTTON_LAYOUT, button_layout_handler, NULL, }, - { "/desktop/mate/peripherals/mouse/cursor_theme", + { "cursor-theme", + KEY_MATE_MOUSE_SCHEMA, META_PREF_CURSOR_THEME, NULL, &cursor_theme, }, - { NULL, 0, NULL, NULL }, + { NULL, NULL, 0, NULL, NULL }, }; static MetaIntPreference preferences_int[] = { - { "/apps/marco/general/num_workspaces", + { "num-workspaces", + KEY_GENERAL_SCHEMA, META_PREF_NUM_WORKSPACES, &num_workspaces, /* I would actually recommend we change the destroy value to 4 @@ -482,18 +446,20 @@ static MetaIntPreference preferences_int[] = */ 1, MAX_REASONABLE_WORKSPACES, METAINTPREFERENCE_NO_CHANGE_ON_DESTROY, }, - { "/apps/marco/general/auto_raise_delay", + { "auto-raise-delay", + KEY_GENERAL_SCHEMA, META_PREF_AUTO_RAISE_DELAY, &auto_raise_delay, 0, 10000, 0, /* @@@ Get rid of MAX_REASONABLE_AUTO_RAISE_DELAY */ }, - { "/desktop/mate/peripherals/mouse/cursor_size", + { "cursor-size", + KEY_MATE_MOUSE_SCHEMA, META_PREF_CURSOR_SIZE, &cursor_size, 1, 128, 24, }, - { NULL, 0, NULL, 0, 0, 0, }, + { NULL, NULL, 0, NULL, 0, 0, 0, }, }; static void @@ -503,8 +469,7 @@ handle_preference_init_enum (void) while (cursor->key!=NULL) { - char *value; - GError *error = NULL; + gint value; if (cursor->target==NULL) { @@ -512,24 +477,9 @@ handle_preference_init_enum (void) continue; } - value = mateconf_client_get_string (default_client, - cursor->key, - &error); - cleanup_error (&error); - - if (value==NULL) - { - ++cursor; - continue; - } - - if (!mateconf_string_to_enum (cursor->symtab, - value, - (gint *) cursor->target)) - meta_warning (_("MateConf key '%s' is set to an invalid value\n"), - cursor->key); - - g_free (value); + value = g_settings_get_enum (SETTINGS (cursor->schema), + cursor->key); + *cursor->target = value; ++cursor; } @@ -543,7 +493,7 @@ handle_preference_init_bool (void) while (cursor->key!=NULL) { if (cursor->target!=NULL) - get_bool (cursor->key, cursor->target); + *cursor->target = g_settings_get_boolean (SETTINGS (cursor->schema), cursor->key); ++cursor; } @@ -558,15 +508,12 @@ handle_preference_init_string (void) while (cursor->key!=NULL) { - char *value; - GError *error = NULL; + gchar *value; gboolean dummy = TRUE; /* the string "value" will be newly allocated */ - value = mateconf_client_get_string (default_client, - cursor->key, - &error); - cleanup_error (&error); + value = g_settings_get_string (SETTINGS (cursor->schema), + cursor->key); if (cursor->handler) { @@ -598,16 +545,14 @@ handle_preference_init_int (void) while (cursor->key!=NULL) { gint value; - GError *error = NULL; - value = mateconf_client_get_int (default_client, - cursor->key, - &error); - cleanup_error (&error); + value = g_settings_get_int (SETTINGS (cursor->schema), + cursor->key); if (value < cursor->minimum || value > cursor->maximum) { - meta_warning (_("%d stored in MateConf key %s is out of range %d to %d\n"), + /* FIXME: check if this can be avoided by GSettings */ + meta_warning (_("%d stored in GSettings key %s is out of range %d to %d\n"), value, cursor->key, cursor->minimum, cursor->maximum); /* Former behaviour for out-of-range values was: * - number of workspaces was clamped; @@ -628,7 +573,7 @@ handle_preference_init_int (void) } static gboolean -handle_preference_update_enum (const gchar *key, MateConfValue *value) +handle_preference_update_enum (const gchar *key, GSettings *settings) { MetaEnumPreference *cursor = preferences_enum; gint old_value; @@ -639,23 +584,6 @@ handle_preference_update_enum (const gchar *key, MateConfValue *value) if (cursor->key==NULL) /* Didn't recognise that key. */ return FALSE; - - /* Setting it to null (that is, removing it) always means - * "don't change". - */ - - if (value==NULL) - return TRUE; - - /* Check the type. Enums are always strings. */ - - if (value->type != MATECONF_VALUE_STRING) - { - meta_warning (_("MateConf key \"%s\" is set to an invalid type\n"), - key); - /* But we did recognise it. */ - return TRUE; - } /* We need to know whether the value changes, so * store the current value away. @@ -664,27 +592,7 @@ handle_preference_update_enum (const gchar *key, MateConfValue *value) old_value = * ((gint *) cursor->target); /* Now look it up... */ - - if (!mateconf_string_to_enum (cursor->symtab, - mateconf_value_get_string (value), - (gint *) cursor->target)) - { - /* - * We found it, but it was invalid. Complain. - * - * FIXME: This replicates the original behaviour, but in the future - * we might consider reverting invalid keys to their original values. - * (We know the old value, so we can look up a suitable string in - * the symtab.) - * - * (Empty comment follows so the translators don't see this.) - */ - - /* */ - meta_warning (_("MateConf key '%s' is set to an invalid value\n"), - key); - return TRUE; - } + *cursor->target = g_settings_get_int (settings, key); /* Did it change? If so, tell the listeners about it. */ @@ -695,7 +603,7 @@ handle_preference_update_enum (const gchar *key, MateConfValue *value) } static gboolean -handle_preference_update_bool (const gchar *key, MateConfValue *value) +handle_preference_update_bool (const gchar *key, GSettings *settings) { MetaBoolPreference *cursor = preferences_bool; gboolean old_value; @@ -710,29 +618,6 @@ handle_preference_update_bool (const gchar *key, MateConfValue *value) if (cursor->target==NULL) /* No work for us to do. */ return TRUE; - - if (value==NULL) - { - /* Value was destroyed; let's get out of here. */ - - if (cursor->becomes_true_on_destruction) - /* This preserves the behaviour of the old system, but - * for all I know that might have been an oversight. - */ - *((gboolean *)cursor->target) = TRUE; - - return TRUE; - } - - /* Check the type. */ - - if (value->type != MATECONF_VALUE_BOOL) - { - meta_warning (_("MateConf key \"%s\" is set to an invalid type\n"), - key); - /* But we did recognise it. */ - return TRUE; - } /* We need to know whether the value changes, so * store the current value away. @@ -742,7 +627,7 @@ handle_preference_update_bool (const gchar *key, MateConfValue *value) /* Now look it up... */ - *((gboolean *) cursor->target) = mateconf_value_get_bool (value); + *((gboolean *) cursor->target) = g_settings_get_boolean (settings, key); /* Did it change? If so, tell the listeners about it. */ @@ -756,10 +641,10 @@ handle_preference_update_bool (const gchar *key, MateConfValue *value) } static gboolean -handle_preference_update_string (const gchar *key, MateConfValue *value) +handle_preference_update_string (const gchar *key, GSettings *settings) { MetaStringPreference *cursor = preferences_string; - const gchar *value_as_string; + gchar *value; gboolean inform_listeners = TRUE; while (cursor->key!=NULL && strcmp (key, cursor->key)!=0) @@ -769,51 +654,39 @@ handle_preference_update_string (const gchar *key, MateConfValue *value) /* Didn't recognise that key. */ return FALSE; - if (value==NULL) - return TRUE; - - /* Check the type. */ - - if (value->type != MATECONF_VALUE_STRING) - { - meta_warning (_("MateConf key \"%s\" is set to an invalid type\n"), - key); - /* But we did recognise it. */ - return TRUE; - } - - /* Docs: "The returned string is not a copy, don't try to free it." */ - value_as_string = mateconf_value_get_string (value); + value = g_settings_get_string (settings, key); if (cursor->handler) - cursor->handler (cursor->pref, value_as_string, &inform_listeners); + cursor->handler (cursor->pref, value, &inform_listeners); else if (cursor->target) { if (*(cursor->target)) g_free(*(cursor->target)); - if (value_as_string!=NULL) - *(cursor->target) = g_strdup (value_as_string); + if (value!=NULL) + *(cursor->target) = g_strdup (value); else *(cursor->target) = NULL; inform_listeners = - (value_as_string==NULL && *(cursor->target)==NULL) || - (value_as_string!=NULL && *(cursor->target)!=NULL && - strcmp (value_as_string, *(cursor->target))==0); + (value==NULL && *(cursor->target)==NULL) || + (value!=NULL && *(cursor->target)!=NULL && + strcmp (value, *(cursor->target))==0); } if (inform_listeners) queue_changed (cursor->pref); + g_free (value); + return TRUE; } static gboolean -handle_preference_update_int (const gchar *key, MateConfValue *value) +handle_preference_update_int (const gchar *key, GSettings *settings) { MetaIntPreference *cursor = preferences_int; - gint new_value; + gint value; while (cursor->key!=NULL && strcmp (key, cursor->key)!=0) ++cursor; @@ -825,42 +698,24 @@ handle_preference_update_int (const gchar *key, MateConfValue *value) if (cursor->target==NULL) /* No work for us to do. */ return TRUE; - - if (value==NULL) - { - /* Value was destroyed. */ - if (cursor->value_if_destroyed != METAINTPREFERENCE_NO_CHANGE_ON_DESTROY) - *((gint *)cursor->target) = cursor->value_if_destroyed; + value = g_settings_get_int (settings, key); - return TRUE; - } - - /* Check the type. */ - - if (value->type != MATECONF_VALUE_INT) + if (value < cursor->minimum || value > cursor->maximum) { - meta_warning (_("MateConf key \"%s\" is set to an invalid type\n"), - key); - /* But we did recognise it. */ - return TRUE; - } - - new_value = mateconf_value_get_int (value); - - if (new_value < cursor->minimum || new_value > cursor->maximum) - { - meta_warning (_("%d stored in MateConf key %s is out of range %d to %d\n"), - new_value, cursor->key, + /* FIXME! GSettings, instead of MateConf, has Minimum/Maximun in schema! + * But some preferences depends on costants for minimum/maximum values */ + meta_warning (_("%d stored in GSettings key %s is out of range %d to %d\n"), + value, cursor->key, cursor->minimum, cursor->maximum); return TRUE; } /* Did it change? If so, tell the listeners about it. */ - if (*cursor->target != new_value) + if (*cursor->target != value) { - *cursor->target = new_value; + *cursor->target = value; queue_changed (cursor->pref); } @@ -868,7 +723,7 @@ handle_preference_update_int (const gchar *key, MateConfValue *value) } - + /****************************************************************************/ /* Listeners. */ /****************************************************************************/ @@ -977,70 +832,43 @@ queue_changed (MetaPreference pref) meta_topic (META_DEBUG_PREFS, "Change of pref %s was already pending\n", meta_preference_to_string (pref)); - /* add idle at priority below the mateconf notify idle */ + /* add idle at priority below the GSettings notify idle */ + /* FIXME is this needed for GSettings too? */ if (changed_idle == 0) changed_idle = g_idle_add_full (META_PRIORITY_PREFS_NOTIFY, changed_idle_handler, NULL, NULL); } -#else /* HAVE_MATECONF */ - -void -meta_prefs_add_listener (MetaPrefsChangedFunc func, - gpointer data) -{ - /* Nothing, because they have mateconf turned off */ -} -void -meta_prefs_remove_listener (MetaPrefsChangedFunc func, - gpointer data) -{ - /* Nothing, because they have mateconf turned off */ -} - -#endif /* HAVE_MATECONF */ - - /****************************************************************************/ /* Initialisation. */ /****************************************************************************/ -#ifdef HAVE_MATECONF -/* @@@ again, use glib's ability to tell you the size of the array */ -static gchar *mateconf_dirs_we_are_interested_in[] = { - "/apps/marco", - KEY_TERMINAL_DIR, - KEY_MATE_ACCESSIBILITY, - "/desktop/mate/peripherals/mouse", - "/desktop/mate/interface", - NULL, -}; -#endif - void meta_prefs_init (void) { -#ifdef HAVE_MATECONF - GError *err = NULL; - gchar **mateconf_dir_cursor; - - if (default_client != NULL) + if (settings_general != NULL) return; - /* returns a reference which we hold forever */ - default_client = mateconf_client_get_default (); - - for (mateconf_dir_cursor=mateconf_dirs_we_are_interested_in; - *mateconf_dir_cursor!=NULL; - mateconf_dir_cursor++) - { - mateconf_client_add_dir (default_client, - *mateconf_dir_cursor, - MATECONF_CLIENT_PRELOAD_RECURSIVE, - &err); - cleanup_error (&err); - } + /* returns references which we hold forever */ + settings_general = g_settings_new (KEY_GENERAL_SCHEMA); + settings_command = g_settings_new (KEY_COMMAND_SCHEMA); + settings_screen_bindings = g_settings_new (KEY_SCREEN_BINDINGS_SCHEMA); + settings_window_bindings = g_settings_new (KEY_WINDOW_BINDINGS_SCHEMA); + settings_workspace_names = g_settings_new (KEY_WORKSPACE_NAME_SCHEMA); + settings_mate_interface = g_settings_new (KEY_MATE_INTERFACE_SCHEMA); + settings_mate_terminal = g_settings_new (KEY_MATE_TERMINAL_SCHEMA); + settings_mate_mouse = g_settings_new (KEY_MATE_MOUSE_SCHEMA); + + settings_schemas = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, g_object_unref); + g_hash_table_insert (settings_schemas, KEY_GENERAL_SCHEMA, settings_general); + g_hash_table_insert (settings_schemas, KEY_COMMAND_SCHEMA, settings_command); + g_hash_table_insert (settings_schemas, KEY_SCREEN_BINDINGS_SCHEMA, settings_screen_bindings); + g_hash_table_insert (settings_schemas, KEY_WINDOW_BINDINGS_SCHEMA, settings_window_bindings); + g_hash_table_insert (settings_schemas, KEY_WORKSPACE_NAME_SCHEMA, settings_workspace_names); + g_hash_table_insert (settings_schemas, KEY_MATE_INTERFACE_SCHEMA, settings_mate_interface); + g_hash_table_insert (settings_schemas, KEY_MATE_TERMINAL_SCHEMA, settings_mate_terminal); + g_hash_table_insert (settings_schemas, KEY_MATE_MOUSE_SCHEMA, settings_mate_mouse); /* Pick up initial values. */ @@ -1049,46 +877,28 @@ meta_prefs_init (void) handle_preference_init_string (); handle_preference_init_int (); - /* @@@ Is there any reason we don't do the add_dir here? */ - for (mateconf_dir_cursor=mateconf_dirs_we_are_interested_in; - *mateconf_dir_cursor!=NULL; - mateconf_dir_cursor++) - { - mateconf_client_notify_add (default_client, - *mateconf_dir_cursor, - change_notify, - NULL, - NULL, - &err); - cleanup_error (&err); - } + g_signal_connect (settings_general, "changed", G_CALLBACK (change_notify), NULL); + g_signal_connect (settings_command, "changed", G_CALLBACK (change_notify), NULL); + g_signal_connect (settings_screen_bindings, "changed", G_CALLBACK (change_notify), NULL); + g_signal_connect (settings_window_bindings, "changed", G_CALLBACK (change_notify), NULL); + g_signal_connect (settings_workspace_names, "changed", G_CALLBACK (change_notify), NULL); -#else /* HAVE_MATECONF */ + g_signal_connect (settings_mate_interface, "changed::" KEY_MATE_INTERFACE_ACCESSIBILITY, G_CALLBACK (change_notify), NULL); + g_signal_connect (settings_mate_interface, "changed::" KEY_MATE_INTERFACE_ENABLE_ANIMATIONS, G_CALLBACK (change_notify), NULL); + g_signal_connect (settings_mate_terminal, "changed::" KEY_MATE_TERMINAL_COMMAND, G_CALLBACK (change_notify), NULL); + g_signal_connect (settings_mate_mouse, "changed::" KEY_MATE_MOUSE_CURSOR_THEME, G_CALLBACK (change_notify), NULL); + g_signal_connect (settings_mate_mouse, "changed::" KEY_MATE_MOUSE_CURSOR_SIZE, G_CALLBACK (change_notify), NULL); - /* Set defaults for some values that can't be set at initialization time of - * the static globals. In the case of the theme, note that there is code - * elsewhere that will do everything possible to fallback to an existing theme - * if the one here does not exist. - */ - titlebar_font = pango_font_description_from_string ("Sans Bold 10"); - current_theme = g_strdup ("ClearlooksRe"); - - init_button_layout(); -#endif /* HAVE_MATECONF */ - init_bindings (); init_commands (); init_workspace_names (); } - /****************************************************************************/ /* Updates. */ /****************************************************************************/ -#ifdef HAVE_MATECONF - -gboolean (*preference_update_handler[]) (const gchar*, MateConfValue*) = { +gboolean (*preference_update_handler[]) (const gchar*, GVariant*) = { handle_preference_update_enum, handle_preference_update_bool, handle_preference_update_string, @@ -1097,18 +907,12 @@ gboolean (*preference_update_handler[]) (const gchar*, MateConfValue*) = { }; static void -change_notify (MateConfClient *client, - guint cnxn_id, - MateConfEntry *entry, - gpointer user_data) +change_notify (GSettings *settings, + gchar *key, + gpointer user_data) { - const char *key; - MateConfValue *value; gint i=0; - key = mateconf_entry_get_key (entry); - value = mateconf_entry_get_value (entry); - /* First, search for a handler that might know what to do. */ /* FIXME: When this is all working, since the first item in every @@ -1118,89 +922,53 @@ change_notify (MateConfClient *client, while (preference_update_handler[i]!=NULL) { - if (preference_update_handler[i] (key, value)) - goto out; /* Get rid of this eventually */ + if (preference_update_handler[i] (key, settings)) + return; /* Get rid of this eventually */ i++; } - - if (g_str_has_prefix (key, KEY_WINDOW_BINDINGS_PREFIX) || - g_str_has_prefix (key, KEY_SCREEN_BINDINGS_PREFIX)) - { - if (g_str_has_suffix (key, KEY_LIST_BINDINGS_SUFFIX)) - { - GSList *list; - - if (value && value->type != MATECONF_VALUE_LIST) - { - meta_warning (_("MateConf key \"%s\" is set to an invalid type\n"), - key); - goto out; - } - - list = value ? mateconf_value_get_list (value) : NULL; - if (update_key_list_binding (key, list)) - queue_changed (META_PREF_KEYBINDINGS); - } - else - { - const char *str; - - if (value && value->type != MATECONF_VALUE_STRING) - { - meta_warning (_("MateConf key \"%s\" is set to an invalid type\n"), - key); - goto out; - } + gchar *schema_name; + g_object_get (settings, "schema-id", schema_name); - str = value ? mateconf_value_get_string (value) : NULL; + if (g_strcmp0 (schema_name, KEY_WINDOW_BINDINGS_SCHEMA) == 0 || + g_strcmp0 (schema_name, KEY_SCREEN_BINDINGS_SCHEMA) == 0) + { + gchar *str; + str = g_settings_get_string (settings, key); - if (update_key_binding (key, str)) - queue_changed (META_PREF_KEYBINDINGS); - } + if (update_key_binding (key, str)) + queue_changed (META_PREF_KEYBINDINGS); + + g_free(str); } - else if (g_str_has_prefix (key, KEY_COMMAND_PREFIX)) + else if (g_strcmp0 (schema_name, KEY_COMMAND_SCHEMA) == 0) { - const char *str; - - if (value && value->type != MATECONF_VALUE_STRING) - { - meta_warning (_("MateConf key \"%s\" is set to an invalid type\n"), - key); - goto out; - } - - str = value ? mateconf_value_get_string (value) : NULL; + gchar *str; + str = g_settings_get_string (settings, key); if (update_command (key, str)) queue_changed (META_PREF_COMMANDS); + + g_free(str); } - else if (g_str_has_prefix (key, KEY_WORKSPACE_NAME_PREFIX)) + else if (g_strcmp0 (schema_name, KEY_WORKSPACE_NAME_SCHEMA)) { - const char *str; - - if (value && value->type != MATECONF_VALUE_STRING) - { - meta_warning (_("MateConf key \"%s\" is set to an invalid type\n"), - key); - goto out; - } - - str = value ? mateconf_value_get_string (value) : NULL; + gchar *str; + str = g_settings_get_string (settings, key); if (update_workspace_name (key, str)) queue_changed (META_PREF_WORKSPACE_NAMES); + + g_free(str); } else { + /* Is this possible with GSettings? I dont think so! */ meta_topic (META_DEBUG_PREFS, "Key %s doesn't mean anything to Marco\n", key); } - - out: - /* nothing */ - return; /* AIX compiler wants something after a label like out: */ + g_free (schema_name); } static void @@ -1215,30 +983,6 @@ cleanup_error (GError **error) } } -/* get_bool returns TRUE if *val is filled in, FALSE otherwise */ -/* @@@ probably worth moving this inline; only used once */ -static gboolean -get_bool (const char *key, gboolean *val) -{ - GError *err = NULL; - MateConfValue *value; - gboolean filled_in = FALSE; - - value = mateconf_client_get (default_client, key, &err); - cleanup_error (&err); - if (value) - { - if (value->type == MATECONF_VALUE_BOOL) - { - *val = mateconf_value_get_bool (value); - filled_in = TRUE; - } - mateconf_value_free (value); - } - - return filled_in; -} - /** * Special case: give a warning the first time disable_workarounds * is turned on. @@ -1257,8 +1001,6 @@ maybe_give_disable_workarounds_warning (void) } } -#endif /* HAVE_MATECONF */ - MetaVirtualModifier meta_prefs_get_mouse_button_mods (void) { @@ -1304,13 +1046,11 @@ meta_prefs_get_cursor_size (void) return cursor_size; } - + /****************************************************************************/ /* Handlers for string preferences. */ /****************************************************************************/ -#ifdef HAVE_MATECONF - static void titlebar_handler (MetaPreference pref, const gchar *string_value, @@ -1324,9 +1064,9 @@ titlebar_handler (MetaPreference pref, if (new_desc == NULL) { meta_warning (_("Could not parse font description " - "\"%s\" from MateConf key %s\n"), + "\"%s\" from GSettings key %s\n"), string_value ? string_value : "(null)", - KEY_TITLEBAR_FONT); + KEY_GENERAL_TITLEBAR_FONT); *inform_listeners = FALSE; @@ -1374,7 +1114,7 @@ mouse_button_mods_handler (MetaPreference pref, MetaVirtualModifier mods; meta_topic (META_DEBUG_KEYBINDINGS, - "Mouse button modifier has new mateconf value \"%s\"\n", + "Mouse button modifier has new GSettings value \"%s\"\n", string_value); if (string_value && meta_ui_parse_modifier (string_value, &mods)) { @@ -1383,7 +1123,7 @@ mouse_button_mods_handler (MetaPreference pref, else { meta_topic (META_DEBUG_KEYBINDINGS, - "Failed to parse new mateconf value\n"); + "Failed to parse new GSettings value\n"); meta_warning (_("\"%s\" found in configuration database is " "not a valid value for mouse button modifier\n"), @@ -1419,7 +1159,7 @@ button_layout_equal (const MetaButtonLayout *a, static MetaButtonFunction button_function_from_string (const char *str) { - /* FIXME: mateconf_string_to_enum is the obvious way to do this */ + /* FIXME: g_settings_get_enum is the obvious way to do this */ if (strcmp (str, "menu") == 0) return META_BUTTON_FUNCTION_MENU; @@ -1646,8 +1386,6 @@ button_layout_handler (MetaPreference pref, } } -#endif /* HAVE_MATECONF */ - const PangoFontDescription* meta_prefs_get_titlebar_font (void) { @@ -1683,16 +1421,13 @@ meta_prefs_get_disable_workarounds (void) return disable_workarounds; } -#ifdef HAVE_MATECONF #define MAX_REASONABLE_AUTO_RAISE_DELAY 10000 - -#endif /* HAVE_MATECONF */ #ifdef WITH_VERBOSE_MODE const char* meta_preference_to_string (MetaPreference pref) { - /* FIXME: another case for mateconf_string_to_enum */ + /* FIXME: another case for g_settings_get_enum */ switch (pref) { case META_PREF_MOUSE_BUTTON_MODS: @@ -1799,34 +1534,18 @@ meta_preference_to_string (MetaPreference pref) void meta_prefs_set_num_workspaces (int n_workspaces) { -#ifdef HAVE_MATECONF - GError *err; - - if (default_client == NULL) - return; - if (n_workspaces < 1) n_workspaces = 1; if (n_workspaces > MAX_REASONABLE_WORKSPACES) n_workspaces = MAX_REASONABLE_WORKSPACES; - err = NULL; - mateconf_client_set_int (default_client, - KEY_NUM_WORKSPACES, - n_workspaces, - &err); + g_settings_set_int (settings_general, + KEY_GENERAL_NUM_WORKSPACES, + n_workspaces); - if (err) - { - meta_warning (_("Error setting number of workspaces to %d: %s\n"), - num_workspaces, - err->message); - g_error_free (err); - } -#endif /* HAVE_MATECONF */ } -#define keybind(name, handler, param, flags, stroke, description) \ +#define keybind(name, handler, param, flags) \ { #name, NULL, !!(flags & BINDING_REVERSES), !!(flags & BINDING_PER_WINDOW) }, static MetaKeyPref key_bindings[] = { #include "all-keybindings.h" @@ -1834,165 +1553,70 @@ static MetaKeyPref key_bindings[] = { }; #undef keybind -#ifndef HAVE_MATECONF - -/** - * A type to map names of keybindings (such as "switch_windows") - * to the binding strings themselves (such as "Tab"). - * It exists only when MateConf is turned off in ./configure and - * functions as a sort of ersatz MateConf. - */ -typedef struct -{ - const char *name; - const char *keybinding; -} MetaSimpleKeyMapping; - -/* FIXME: This would be neater if the array only contained entries whose - * default keystroke was non-null. You COULD do this by defining - * ONLY_BOUND_BY_DEFAULT around various blocks at the cost of making - * the bindings file way more complicated. However, we could stop this being - * data and move it into code. Then the compiler would optimise away - * the problem lines. - */ - -#define keybind(name, handler, param, flags, stroke, description) \ - { #name, stroke }, - -static MetaSimpleKeyMapping key_string_bindings[] = { -#include "all-keybindings.h" - { NULL, NULL } -}; -#undef keybind - -#endif /* NOT HAVE_MATECONF */ - static void init_bindings (void) { -#ifdef HAVE_MATECONF const char *prefix[] = { - KEY_WINDOW_BINDINGS_PREFIX, - KEY_SCREEN_BINDINGS_PREFIX, + KEY_WINDOW_BINDINGS_SCHEMA, + KEY_SCREEN_BINDINGS_SCHEMA, NULL }; int i; - GSList *list, *l, *list_val; - const char *str_val; - const char *key; - MateConfEntry *entry; - MateConfValue *value; + gchar **list; + gchar *str_val; + GSettings *bindings_settings; for (i = 0; prefix[i]; i++) { - list = mateconf_client_all_entries (default_client, prefix[i], NULL); - for (l = list; l; l = l->next) + bindings_settings = g_settings_new (prefix [i]); + list = g_settings_list_keys (bindings_settings); + while (*list != NULL) { - entry = l->data; - key = mateconf_entry_get_key (entry); - value = mateconf_entry_get_value (entry); - if (g_str_has_suffix (key, KEY_LIST_BINDINGS_SUFFIX)) - { - list_val = mateconf_client_get_list (default_client, key, MATECONF_VALUE_STRING, NULL); - - update_key_list_binding (key, list_val); - g_slist_foreach (list_val, (GFunc)g_free, NULL); - g_slist_free (list_val); - } - else - { - str_val = mateconf_value_get_string (value); - update_key_binding (key, str_val); - } - mateconf_entry_free (entry); + str_val = g_settings_get_string (bindings_settings, *list); + update_key_binding (*list, str_val); + list++; } - g_slist_free (list); } -#else /* HAVE_MATECONF */ - int i = 0; - int which = 0; - while (key_string_bindings[i].name) - { - if (key_string_bindings[i].keybinding == NULL) { - ++i; - continue; - } - - while (strcmp(key_bindings[which].name, - key_string_bindings[i].name) != 0) - which++; - - /* Set the binding */ - update_binding (&key_bindings[which], - key_string_bindings[i].keybinding); + g_free (str_val); + g_object_unref (bindings_settings); - ++i; - } -#endif /* HAVE_MATECONF */ } static void init_commands (void) { -#ifdef HAVE_MATECONF - GSList *list, *l; - const char *str_val; - const char *key; - MateConfEntry *entry; - MateConfValue *value; + gchar **list; + gchar *str_val; - list = mateconf_client_all_entries (default_client, KEY_COMMAND_DIRECTORY, NULL); - for (l = list; l; l = l->next) + list = g_settings_list_keys (settings_command); + while (*list != NULL) { - entry = l->data; - key = mateconf_entry_get_key (entry); - value = mateconf_entry_get_value (entry); - str_val = mateconf_value_get_string (value); - update_command (key, str_val); - mateconf_entry_free (entry); + str_val = g_settings_get_string (settings_command, *list); + update_command (*list, str_val); + list++; } - g_slist_free (list); -#else - int i; - for (i = 0; i < MAX_COMMANDS; i++) - commands[i] = NULL; -#endif /* HAVE_MATECONF */ + g_free (str_val); } static void init_workspace_names (void) { -#ifdef HAVE_MATECONF - GSList *list, *l; - const char *str_val; - const char *key; - MateConfEntry *entry; - MateConfValue *value; + gchar **list; + gchar *str_val; - list = mateconf_client_all_entries (default_client, KEY_WORKSPACE_NAME_DIRECTORY, NULL); - for (l = list; l; l = l->next) + list = g_settings_list_keys (settings_workspace_names); + while (*list != NULL) { - entry = l->data; - key = mateconf_entry_get_key (entry); - value = mateconf_entry_get_value (entry); - str_val = mateconf_value_get_string (value); - update_workspace_name (key, str_val); - mateconf_entry_free (entry); + str_val = g_settings_get_string (settings_workspace_names, *list); + update_workspace_name (*list, str_val); + list++; } - g_slist_free (list); -#else - int i; - for (i = 0; i < MAX_REASONABLE_WORKSPACES; i++) - workspace_names[i] = g_strdup_printf (_("Workspace %d"), i + 1); - - meta_topic (META_DEBUG_PREFS, - "Initialized workspace names\n"); -#endif /* HAVE_MATECONF */ + g_free (str_val); } static gboolean update_binding (MetaKeyPref *binding, - const char *value) + gchar *value) { unsigned int keysym; unsigned int keycode; @@ -2001,7 +1625,7 @@ update_binding (MetaKeyPref *binding, gboolean changed; meta_topic (META_DEBUG_KEYBINDINGS, - "Binding \"%s\" has new mateconf value \"%s\"\n", + "Binding \"%s\" has new GSettings value \"%s\"\n", binding->name, value ? value : "none"); keysym = 0; @@ -2012,7 +1636,7 @@ update_binding (MetaKeyPref *binding, if (!meta_ui_parse_accelerator (value, &keysym, &keycode, &mods)) { meta_topic (META_DEBUG_KEYBINDINGS, - "Failed to parse new mateconf value\n"); + "Failed to parse new GSettings value\n"); meta_warning (_("\"%s\" found in configuration database is not a valid value for keybinding \"%s\"\n"), value, binding->name); @@ -2030,7 +1654,6 @@ update_binding (MetaKeyPref *binding, combo = binding->bindings->data; -#ifdef HAVE_MATECONF /* Bug 329676: Bindings which can be shifted must not have no modifiers, * nor only SHIFT as a modifier. */ @@ -2040,8 +1663,6 @@ update_binding (MetaKeyPref *binding, (META_VIRTUAL_SHIFT_MASK == mods || 0 == mods)) { gchar *old_setting; - gchar *key; - GError *err = NULL; meta_warning ("Cannot bind \"%s\" to %s: it needs a modifier " "such as Ctrl or Alt.\n", @@ -2072,30 +1693,18 @@ update_binding (MetaKeyPref *binding, * So we shouldn't blindly add KEY_SCREEN_BINDINGS_PREFIX * onto here. */ - key = g_strconcat (KEY_SCREEN_BINDINGS_PREFIX, "/", - binding->name, NULL); - - mateconf_client_set_string (mateconf_client_get_default (), - key, old_setting, &err); + g_settings_set_string(settings_screen_bindings, + binding->name, + old_setting); - if (err) - { - meta_warning ("Error while reverting keybinding: %s\n", - err->message); - g_error_free (err); - err = NULL; - } - g_free (old_setting); - g_free (key); - /* The call to mateconf_client_set_string() will cause this function + /* The call to g_settings_set_string() will cause this function * to be called again with the new value, so there's no need to * carry on. */ return TRUE; } -#endif changed = FALSE; if (keysym != combo->keysym || @@ -2122,119 +1731,6 @@ update_binding (MetaKeyPref *binding, return changed; } -#ifdef HAVE_MATECONF -static gboolean -update_list_binding (MetaKeyPref *binding, - GSList *value, - MetaStringListType type_of_value) -{ - unsigned int keysym; - unsigned int keycode; - MetaVirtualModifier mods; - gboolean changed = FALSE; - const gchar *pref_string; - GSList *pref_iterator = value, *tmp; - MetaKeyCombo *combo; - - meta_topic (META_DEBUG_KEYBINDINGS, - "Binding \"%s\" has new mateconf value\n", - binding->name); - - if (binding->bindings == NULL) - { - /* We need to insert a dummy element into the list, because the first - * element is the one governed by update_binding. We only handle the - * subsequent elements. - */ - MetaKeyCombo *blank = g_malloc0 (sizeof (MetaKeyCombo)); - binding->bindings = g_slist_alloc(); - binding->bindings->data = blank; - } - - /* Okay, so, we're about to provide a new list of key combos for this - * action. Delete any pre-existing list. - */ - tmp = binding->bindings->next; - while (tmp) - { - g_free (tmp->data); - tmp = tmp->next; - } - g_slist_free (binding->bindings->next); - binding->bindings->next = NULL; - - while (pref_iterator) - { - keysym = 0; - keycode = 0; - mods = 0; - - if (!pref_iterator->data) - { - pref_iterator = pref_iterator->next; - continue; - } - - switch (type_of_value) - { - case META_LIST_OF_STRINGS: - pref_string = pref_iterator->data; - break; - case META_LIST_OF_MATECONFVALUE_STRINGS: - pref_string = mateconf_value_get_string (pref_iterator->data); - break; - default: - g_assert_not_reached (); - } - - if (!meta_ui_parse_accelerator (pref_string, &keysym, &keycode, &mods)) - { - meta_topic (META_DEBUG_KEYBINDINGS, - "Failed to parse new mateconf value\n"); - meta_warning (_("\"%s\" found in configuration database is not a valid value for keybinding \"%s\"\n"), - pref_string, binding->name); - - /* Should we remove this value from the list in mateconf? */ - pref_iterator = pref_iterator->next; - continue; - } - - /* Bug 329676: Bindings which can be shifted must not have no modifiers, - * nor only SHIFT as a modifier. - */ - - if (binding->add_shift && - 0 != keysym && - (META_VIRTUAL_SHIFT_MASK == mods || 0 == mods)) - { - meta_warning ("Cannot bind \"%s\" to %s: it needs a modifier " - "such as Ctrl or Alt.\n", - binding->name, - pref_string); - - /* Should we remove this value from the list in mateconf? */ - - pref_iterator = pref_iterator->next; - continue; - } - - changed = TRUE; - - combo = g_malloc0 (sizeof (MetaKeyCombo)); - combo->keysym = keysym; - combo->keycode = keycode; - combo->modifiers = mods; - binding->bindings->next = g_slist_prepend (binding->bindings->next, combo); - - meta_topic (META_DEBUG_KEYBINDINGS, - "New keybinding for \"%s\" is keysym = 0x%x keycode = 0x%x mods = 0x%x\n", - binding->name, keysym, keycode, mods); - - pref_iterator = pref_iterator->next; - } - return changed; -} - static const gchar* relative_key (const gchar* key) { @@ -2253,7 +1749,7 @@ relative_key (const gchar* key) static gboolean find_and_update_binding (MetaKeyPref *bindings, const char *name, - const char *value) + gchar *value) { const char *key; int i; @@ -2276,47 +1772,11 @@ find_and_update_binding (MetaKeyPref *bindings, static gboolean update_key_binding (const char *name, - const char *value) + gchar *value) { return find_and_update_binding (key_bindings, name, value); } -static gboolean -find_and_update_list_binding (MetaKeyPref *bindings, - const char *name, - GSList *value) -{ - const char *key; - int i; - gchar *name_without_suffix = g_strdup(name); - - name_without_suffix[strlen(name_without_suffix) - strlen(KEY_LIST_BINDINGS_SUFFIX)] = 0; - - if (*name_without_suffix == '/') - key = relative_key (name_without_suffix); - else - key = name_without_suffix; - - i = 0; - while (bindings[i].name && - strcmp (key, bindings[i].name) != 0) - ++i; - - g_free (name_without_suffix); - - if (bindings[i].name) - return update_list_binding (&bindings[i], value, META_LIST_OF_MATECONFVALUE_STRINGS); - else - return FALSE; -} - -static gboolean -update_key_list_binding (const char *name, - GSList *value) -{ - return find_and_update_list_binding (key_bindings, name, value); -} - static gboolean update_command (const char *name, const char *value) @@ -2385,8 +1845,6 @@ update_command (const char *name, return TRUE; } -#endif /* HAVE_MATECONF */ - const char* meta_prefs_get_command (int i) { @@ -2396,7 +1854,7 @@ meta_prefs_get_command (int i) } char* -meta_prefs_get_mateconf_key_for_command (int i) +meta_prefs_get_settings_key_for_command (int i) { char *key; @@ -2406,7 +1864,7 @@ meta_prefs_get_mateconf_key_for_command (int i) key = g_strdup (KEY_COMMAND_PREFIX "screenshot"); break; case WIN_SCREENSHOT_COMMAND_IDX: - key = g_strdup (KEY_COMMAND_PREFIX "window_screenshot"); + key = g_strdup (KEY_COMMAND_PREFIX "window-screenshot"); break; default: key = g_strdup_printf (KEY_COMMAND_PREFIX"%d", i + 1); @@ -2423,12 +1881,11 @@ meta_prefs_get_terminal_command (void) } const char* -meta_prefs_get_mateconf_key_for_terminal_command (void) +meta_prefs_get_settings_key_for_terminal_command (void) { - return KEY_TERMINAL_COMMAND; + return KEY_MATE_TERMINAL_COMMAND; } -#ifdef HAVE_MATECONF static gboolean update_workspace_name (const char *name, const char *value) @@ -2436,11 +1893,11 @@ update_workspace_name (const char *name, char *p; int i; - p = strrchr (name, '_'); + p = strrchr (name, '-'); if (p == NULL) { meta_topic (META_DEBUG_PREFS, - "Workspace name %s has no underscore?\n", name); + "Workspace name %s has no dash?\n", name); return FALSE; } @@ -2505,7 +1962,6 @@ update_workspace_name (const char *name, return TRUE; } -#endif /* HAVE_MATECONF */ const char* meta_prefs_get_workspace_name (int i) @@ -2525,9 +1981,7 @@ void meta_prefs_change_workspace_name (int i, const char *name) { -#ifdef HAVE_MATECONF char *key; - GError *err; g_return_if_fail (i >= 0 && i < MAX_REASONABLE_WORKSPACES); @@ -2535,12 +1989,6 @@ meta_prefs_change_workspace_name (int i, "Changing name of workspace %d to %s\n", i, name ? name : "none"); - /* This is a bad hack. We have to treat empty string as - * "unset" because the root window property can't contain - * null. So it gets empty string instead and we don't want - * that to result in setting the empty string as a value that - * overrides "unset". - */ if (name && *name == '\0') name = NULL; @@ -2553,36 +2001,22 @@ meta_prefs_change_workspace_name (int i, return; } - key = mateconf_key_for_workspace_name (i); + key = settings_key_for_workspace_name (i); - err = NULL; if (name != NULL) - mateconf_client_set_string (default_client, - key, name, - &err); + g_settings_set_string (settings_workspace_names, + key, + name); else - mateconf_client_unset (default_client, - key, &err); + g_settings_set_string (settings_workspace_names, + key, + ""); - - if (err) - { - meta_warning (_("Error setting name for workspace %d to \"%s\": %s\n"), - i, name ? name : "none", - err->message); - g_error_free (err); - } - g_free (key); -#else - g_free (workspace_names[i]); - workspace_names[i] = g_strdup (name); -#endif /* HAVE_MATECONF */ } -#ifdef HAVE_MATECONF static char* -mateconf_key_for_workspace_name (int i) +settings_key_for_workspace_name (int i) { char *key; @@ -2590,7 +2024,6 @@ mateconf_key_for_workspace_name (int i) return key; } -#endif /* HAVE_MATECONF */ void meta_prefs_get_button_layout (MetaButtonLayout *button_layout_p) @@ -2767,86 +2200,20 @@ meta_prefs_get_force_fullscreen (void) void meta_prefs_set_compositing_manager (gboolean whether) { -#ifdef HAVE_MATECONF - GError *err = NULL; + g_settings_set_boolean (settings_general, + KEY_GENERAL_COMPOSITOR, + whether); - mateconf_client_set_bool (default_client, - KEY_COMPOSITOR, - whether, - &err); - - if (err) - { - meta_warning (_("Error setting compositor status: %s\n"), - err->message); - g_error_free (err); - } -#else - compositing_manager = whether; -#endif } void meta_prefs_set_compositing_fast_alt_tab(gboolean whether) { -#ifdef HAVE_MATECONF - GError *err = NULL; - - mateconf_client_set_bool (default_client, - KEY_COMPOSITOR_FAST_ALT_TAB, - whether, - &err); - - if (err) - { - meta_warning (_("Error setting compositor fast alt-tab status: %s\n"), - err->message); - g_error_free (err); - } -#else - compositing_fast_alt_tab = whether; -#endif + g_settings_set_boolean (settings_general, + KEY_GENERAL_COMPOSITOR_FAST_ALT_TAB, + whether); } -#ifndef HAVE_MATECONF -static void -init_button_layout(void) -{ - MetaButtonLayout button_layout_ltr = { - { - /* buttons in the group on the left side */ - META_BUTTON_FUNCTION_MENU, - META_BUTTON_FUNCTION_LAST - }, - { - /* buttons in the group on the right side */ - META_BUTTON_FUNCTION_MINIMIZE, - META_BUTTON_FUNCTION_MAXIMIZE, - META_BUTTON_FUNCTION_CLOSE, - META_BUTTON_FUNCTION_LAST - } - }; - MetaButtonLayout button_layout_rtl = { - { - /* buttons in the group on the left side */ - META_BUTTON_FUNCTION_CLOSE, - META_BUTTON_FUNCTION_MAXIMIZE, - META_BUTTON_FUNCTION_MINIMIZE, - META_BUTTON_FUNCTION_LAST - }, - { - /* buttons in the group on the right side */ - META_BUTTON_FUNCTION_MENU, - META_BUTTON_FUNCTION_LAST - } - }; - - button_layout = meta_ui_get_direction() == META_UI_DIRECTION_LTR ? - button_layout_ltr : button_layout_rtl; -}; - -#endif - void meta_prefs_set_force_fullscreen (gboolean whether) { diff --git a/src/core/screen.c b/src/core/screen.c index 9c3e2b1f..69f3bdb0 100644 --- a/src/core/screen.c +++ b/src/core/screen.c @@ -848,7 +848,7 @@ prefs_changed_callback (MetaPreference pref, if (pref == META_PREF_NUM_WORKSPACES) { - /* MateConf doesn't provide timestamps, but luckily update_num_workspaces + /* GSettings doesn't provide timestamps, but luckily update_num_workspaces * often doesn't need it... */ guint32 timestamp = @@ -1281,8 +1281,8 @@ meta_screen_ensure_tab_popup (MetaScreen *screen, entries[i].title = window->title; /* Only get the pixbuf if the user does NOT have - /apps/marco/general/compositing_fast_alt_tab set to true - in mateconf. There is an obvious lag when the pixbuf is + compositing-fast-alt-tab-set to true + in GSettings. There is an obvious lag when the pixbuf is retrieved. */ if (!meta_prefs_get_compositing_fast_alt_tab()) win_pixbuf = get_window_pixbuf (window, &width, &height); diff --git a/src/include/all-keybindings.h b/src/include/all-keybindings.h index 26834454..0aafc397 100644 --- a/src/include/all-keybindings.h +++ b/src/include/all-keybindings.h @@ -55,12 +55,6 @@ * explain this better) * or 0 if no flag applies. * - * 5) a string representing the default binding. - * If this is NULL, the action is unbound by default. - * Please use NULL and not "disabled". - * 6) a short description. - * It must be marked translatable (i.e. inside "_(...)"). - * * Don't try to do XML entity escaping anywhere in the strings. */ @@ -84,30 +78,18 @@ /* convenience, since in this file they must always be set together */ #define REVERSES_AND_REVERSED (BINDING_REVERSES | BINDING_IS_REVERSED) -keybind (switch_to_workspace_1, handle_switch_to_workspace, 0, 0, NULL, - _("Switch to workspace 1")) -keybind (switch_to_workspace_2, handle_switch_to_workspace, 1, 0, NULL, - _("Switch to workspace 2")) -keybind (switch_to_workspace_3, handle_switch_to_workspace, 2, 0, NULL, - _("Switch to workspace 3")) -keybind (switch_to_workspace_4, handle_switch_to_workspace, 3, 0, NULL, - _("Switch to workspace 4")) -keybind (switch_to_workspace_5, handle_switch_to_workspace, 4, 0, NULL, - _("Switch to workspace 5")) -keybind (switch_to_workspace_6, handle_switch_to_workspace, 5, 0, NULL, - _("Switch to workspace 6")) -keybind (switch_to_workspace_7, handle_switch_to_workspace, 6, 0, NULL, - _("Switch to workspace 7")) -keybind (switch_to_workspace_8, handle_switch_to_workspace, 7, 0, NULL, - _("Switch to workspace 8")) -keybind (switch_to_workspace_9, handle_switch_to_workspace, 8, 0, NULL, - _("Switch to workspace 9")) -keybind (switch_to_workspace_10, handle_switch_to_workspace, 9, 0, NULL, - _("Switch to workspace 10")) -keybind (switch_to_workspace_11, handle_switch_to_workspace, 10, 0, NULL, - _("Switch to workspace 11")) -keybind (switch_to_workspace_12, handle_switch_to_workspace, 11, 0, NULL, - _("Switch to workspace 12")) +keybind (switch-to-workspace-1, handle_switch_to_workspace, 0, 0) +keybind (switch-to-workspace-2, handle_switch_to_workspace, 1, 0) +keybind (switch-to-workspace-3, handle_switch_to_workspace, 2, 0) +keybind (switch-to-workspace-4, handle_switch_to_workspace, 3, 0) +keybind (switch-to-workspace-5, handle_switch_to_workspace, 4, 0) +keybind (switch-to-workspace-6, handle_switch_to_workspace, 5, 0) +keybind (switch-to-workspace-7, handle_switch_to_workspace, 6, 0) +keybind (switch-to-workspace-8, handle_switch_to_workspace, 7, 0) +keybind (switch-to-workspace-9, handle_switch_to_workspace, 8, 0) +keybind (switch-to-workspace-10, handle_switch_to_workspace, 9, 0) +keybind (switch-to-workspace-11, handle_switch_to_workspace, 10, 0) +keybind (switch-to-workspace-12, handle_switch_to_workspace, 11, 0) /* META_MOTION_* are negative, and so distinct from workspace numbers, * which are always zero or positive. @@ -117,21 +99,17 @@ keybind (switch_to_workspace_12, handle_switch_to_workspace, 11, 0, NULL, * workspace.h, of course. */ -keybind (switch_to_workspace_left, handle_switch_to_workspace, - META_MOTION_LEFT, 0, "Left", - _("Switch to workspace on the left of the current workspace")) +keybind (switch-to-workspace-left, handle_switch_to_workspace, + META_MOTION_LEFT, 0) -keybind (switch_to_workspace_right, handle_switch_to_workspace, - META_MOTION_RIGHT, 0, "Right", - _("Switch to workspace on the right of the current workspace")) +keybind (switch-to-workspace-right, handle_switch_to_workspace, + META_MOTION_RIGHT, 0) -keybind (switch_to_workspace_up, handle_switch_to_workspace, - META_MOTION_UP, 0, "Up", - _("Switch to workspace above the current workspace")) +keybind (switch-to-workspace-up, handle_switch_to_workspace, + META_MOTION_UP, 0) -keybind (switch_to_workspace_down, handle_switch_to_workspace, - META_MOTION_DOWN, 0, "Down", - _("Switch to workspace below the current workspace")) +keybind (switch-to-workspace-down, handle_switch_to_workspace, + META_MOTION_DOWN, 0) /***********************************/ @@ -145,110 +123,73 @@ keybind (switch_to_workspace_down, handle_switch_to_workspace, * same function checking a bit in the parameter for difference. */ -keybind (switch_group, handle_switch, META_TAB_LIST_GROUP, - BINDING_REVERSES, NULL, - _("Move between windows of an application, using a popup window")) -keybind (switch_group_backward, handle_switch, META_TAB_LIST_GROUP, - REVERSES_AND_REVERSED, NULL, - _("Move backward between windows of an application, " - "using a popup window")) -keybind (switch_windows, handle_switch, META_TAB_LIST_NORMAL, - BINDING_REVERSES, "Tab", - _("Move between windows, using a popup window")) -keybind (switch_windows_backward, handle_switch, META_TAB_LIST_NORMAL, - REVERSES_AND_REVERSED, NULL, - _("Move backward between windows, using a popup window")) -keybind (switch_windows_all, handle_switch, META_TAB_LIST_NORMAL_ALL_WORKSPACES, - BINDING_REVERSES, NULL, - _("Move between windows on all workspaces, using a popup window")) -keybind (switch_windows_all_backward,handle_switch, META_TAB_LIST_NORMAL_ALL_WORKSPACES, - REVERSES_AND_REVERSED, NULL, - _("Move backward between windows on all workspaces, using a popup window")) -keybind (switch_panels, handle_switch, META_TAB_LIST_DOCKS, - BINDING_REVERSES, "Tab", - _("Move between panels and the desktop, using a popup window")) -keybind (switch_panels_backward, handle_switch, META_TAB_LIST_DOCKS, - REVERSES_AND_REVERSED, NULL, - _("Move backward between panels and the desktop, " - "using a popup window")) - -keybind (cycle_group, handle_cycle, META_TAB_LIST_GROUP, - BINDING_REVERSES, "F6", - _("Move between windows of an application immediately")) -keybind (cycle_group_backward, handle_cycle, META_TAB_LIST_GROUP, - REVERSES_AND_REVERSED, NULL, - _("Move backward between windows of an application immediately")) -keybind (cycle_windows, handle_cycle, META_TAB_LIST_NORMAL, - BINDING_REVERSES, "Escape", - _("Move between windows immediately")) -keybind (cycle_windows_backward, handle_cycle, META_TAB_LIST_NORMAL, - REVERSES_AND_REVERSED, NULL, - _("Move backward between windows immediately")) -keybind (cycle_panels, handle_cycle, META_TAB_LIST_DOCKS, - BINDING_REVERSES, "Escape", - _("Move between panels and the desktop immediately")) -keybind (cycle_panels_backward, handle_cycle, META_TAB_LIST_DOCKS, - REVERSES_AND_REVERSED, NULL, - _("Move backward between panels and the desktop immediately")) +keybind (switch-group, handle_switch, META_TAB_LIST_GROUP, BINDING_REVERSES) +keybind (switch-group-backward, handle_switch, META_TAB_LIST_GROUP, REVERSES_AND_REVERSED) +keybind (switch-windows, handle_switch, META_TAB_LIST_NORMAL, BINDING_REVERSES) +keybind (switch-windows-backward, handle_switch, META_TAB_LIST_NORMAL, REVERSES_AND_REVERSED) +keybind (switch-windows-all, handle_switch, META_TAB_LIST_NORMAL_ALL_WORKSPACES, BINDING_REVERSES) +keybind (switch-windows-all-backward,handle_switch, META_TAB_LIST_NORMAL_ALL_WORKSPACES, REVERSES_AND_REVERSED) +keybind (switch-panels, handle_switch, META_TAB_LIST_DOCKS, BINDING_REVERSES) +keybind (switch-panels-backward, handle_switch, META_TAB_LIST_DOCKS, REVERSES_AND_REVERSED) + +keybind (cycle-group, handle_cycle, META_TAB_LIST_GROUP, BINDING_REVERSES) +keybind (cycle-group-backward, handle_cycle, META_TAB_LIST_GROUP, REVERSES_AND_REVERSED) +keybind (cycle-windows, handle_cycle, META_TAB_LIST_NORMAL, BINDING_REVERSES) +keybind (cycle-windows-backward, handle_cycle, META_TAB_LIST_NORMAL, REVERSES_AND_REVERSED) +keybind (cycle-panels, handle_cycle, META_TAB_LIST_DOCKS, BINDING_REVERSES) +keybind (cycle-panels-backward, handle_cycle, META_TAB_LIST_DOCKS, REVERSES_AND_REVERSED) /***********************************/ -keybind (show_desktop, handle_show_desktop, 0, 0, "d", - _("Hide all normal windows and set focus to the desktop")) -keybind (panel_main_menu, handle_panel, - META_KEYBINDING_ACTION_PANEL_MAIN_MENU, 0, "F1", - _("Show the panel's main menu")) -keybind (panel_run_dialog, handle_panel, - META_KEYBINDING_ACTION_PANEL_RUN_DIALOG, 0, "F2", - _("Show the panel's \"Run Application\" dialog box")) +keybind (show-desktop, handle_show_desktop, 0, 0) +keybind (panel-main-menu, handle_panel, META_KEYBINDING_ACTION_PANEL_MAIN_MENU, 0) +keybind (panel-run-dialog, handle_panel, META_KEYBINDING_ACTION_PANEL_RUN_DIALOG, 0) /* Yes, the param is offset by one. Historical reasons. (Maybe worth fixing * at some point.) The description is NULL here because the stanza is * irregularly shaped in marco.schemas.in. This will probably be fixed * as well. */ -keybind (run_command_1, handle_run_command, 0, 0, NULL, NULL) -keybind (run_command_2, handle_run_command, 1, 0, NULL, NULL) -keybind (run_command_3, handle_run_command, 2, 0, NULL, NULL) -keybind (run_command_4, handle_run_command, 3, 0, NULL, NULL) -keybind (run_command_5, handle_run_command, 4, 0, NULL, NULL) -keybind (run_command_6, handle_run_command, 5, 0, NULL, NULL) -keybind (run_command_7, handle_run_command, 6, 0, NULL, NULL) -keybind (run_command_8, handle_run_command, 7, 0, NULL, NULL) -keybind (run_command_9, handle_run_command, 8, 0, NULL, NULL) -keybind (run_command_10, handle_run_command, 9, 0, NULL, NULL) -keybind (run_command_11, handle_run_command, 10, 0, NULL, NULL) -keybind (run_command_12, handle_run_command, 11, 0, NULL, NULL) -keybind (run_command_13, handle_run_command, 12, 0, NULL, NULL) -keybind (run_command_14, handle_run_command, 13, 0, NULL, NULL) -keybind (run_command_15, handle_run_command, 14, 0, NULL, NULL) -keybind (run_command_16, handle_run_command, 15, 0, NULL, NULL) -keybind (run_command_17, handle_run_command, 16, 0, NULL, NULL) -keybind (run_command_18, handle_run_command, 17, 0, NULL, NULL) -keybind (run_command_19, handle_run_command, 18, 0, NULL, NULL) -keybind (run_command_20, handle_run_command, 19, 0, NULL, NULL) -keybind (run_command_21, handle_run_command, 20, 0, NULL, NULL) -keybind (run_command_22, handle_run_command, 21, 0, NULL, NULL) -keybind (run_command_23, handle_run_command, 22, 0, NULL, NULL) -keybind (run_command_24, handle_run_command, 23, 0, NULL, NULL) -keybind (run_command_25, handle_run_command, 24, 0, NULL, NULL) -keybind (run_command_26, handle_run_command, 25, 0, NULL, NULL) -keybind (run_command_27, handle_run_command, 26, 0, NULL, NULL) -keybind (run_command_28, handle_run_command, 27, 0, NULL, NULL) -keybind (run_command_29, handle_run_command, 28, 0, NULL, NULL) -keybind (run_command_30, handle_run_command, 29, 0, NULL, NULL) -keybind (run_command_31, handle_run_command, 30, 0, NULL, NULL) -keybind (run_command_32, handle_run_command, 31, 0, NULL, NULL) - -keybind (run_command_screenshot, handle_run_command, 32, 0, "Print", - _("Take a screenshot")) -keybind (run_command_window_screenshot, handle_run_command, 33, 0,"Print", - _("Take a screenshot of a window")) - -keybind (run_command_terminal, handle_run_terminal, 0, 0, NULL, _("Run a terminal")) +keybind (run-comman-1, handle_run_command, 0, 0) +keybind (run-comman-2, handle_run_command, 1, 0) +keybind (run-comman-3, handle_run_command, 2, 0) +keybind (run-comman-4, handle_run_command, 3, 0) +keybind (run-comman-5, handle_run_command, 4, 0) +keybind (run-comman-6, handle_run_command, 5, 0) +keybind (run-comman-7, handle_run_command, 6, 0) +keybind (run-comman-8, handle_run_command, 7, 0) +keybind (run-comman-9, handle_run_command, 8, 0) +keybind (run-comman-10, handle_run_command, 9, 0) +keybind (run-comman-11, handle_run_command, 10, 0) +keybind (run-comman-12, handle_run_command, 11, 0) +keybind (run-comman-13, handle_run_command, 12, 0) +keybind (run-comman-14, handle_run_command, 13, 0) +keybind (run-comman-15, handle_run_command, 14, 0) +keybind (run-comman-16, handle_run_command, 15, 0) +keybind (run-comman-17, handle_run_command, 16, 0) +keybind (run-comman-18, handle_run_command, 17, 0) +keybind (run-comman-19, handle_run_command, 18, 0) +keybind (run-comman-20, handle_run_command, 19, 0) +keybind (run-comman-21, handle_run_command, 20, 0) +keybind (run-comman-22, handle_run_command, 21, 0) +keybind (run-comman-23, handle_run_command, 22, 0) +keybind (run-comman-24, handle_run_command, 23, 0) +keybind (run-comman-25, handle_run_command, 24, 0) +keybind (run-comman-26, handle_run_command, 25, 0) +keybind (run-comman-27, handle_run_command, 26, 0) +keybind (run-comman-28, handle_run_command, 27, 0) +keybind (run-comman-29, handle_run_command, 28, 0) +keybind (run-comman-30, handle_run_command, 29, 0) +keybind (run-comman-31, handle_run_command, 30, 0) +keybind (run-comman-32, handle_run_command, 31, 0) + +keybind (run-comman-screenshot, handle_run_command, 32, 0) +keybind (run-comman-window_screenshot, handle_run_command, 33, 0) + +keybind (run-comman-terminal, handle_run_terminal, 0, 0) /* No description because this is undocumented */ -keybind (set_spew_mark, handle_set_spew_mark, 0, 0, NULL, NULL) +keybind (set-spew-mark, handle_set_spew_mark, 0, 0) #undef REVERSES_AND_REVERSED @@ -258,70 +199,31 @@ keybind (set_spew_mark, handle_set_spew_mark, 0, 0, NULL, NULL) * if no window is active. */ -keybind (activate_window_menu, handle_activate_window_menu, 0, - BINDING_PER_WINDOW, "space", - _("Activate the window menu")) -keybind (toggle_fullscreen, handle_toggle_fullscreen, 0, BINDING_PER_WINDOW, - NULL, - _("Toggle fullscreen mode")) -keybind (toggle_maximized, handle_toggle_maximized, 0, BINDING_PER_WINDOW, "F10", - _("Toggle maximization state")) -keybind (toggle_above, handle_toggle_above, 0, BINDING_PER_WINDOW, NULL, - _("Toggle whether a window will always be visible over other windows")) -keybind (maximize, handle_maximize, 0, BINDING_PER_WINDOW, NULL, - _("Maximize window")) -keybind (unmaximize, handle_unmaximize, 0, BINDING_PER_WINDOW, "F5", - _("Restore window")) -keybind (toggle_shaded, handle_toggle_shaded, 0, BINDING_PER_WINDOW, NULL, - _("Toggle shaded state")) -keybind (minimize, handle_minimize, 0, BINDING_PER_WINDOW, "F9", - _("Minimize window")) -keybind (close, handle_close, 0, BINDING_PER_WINDOW, "F4", - _("Close window")) -keybind (begin_move, handle_begin_move, 0, BINDING_PER_WINDOW, "F7", - _("Move window")) -keybind (begin_resize, handle_begin_resize, 0, BINDING_PER_WINDOW, "F8", - _("Resize window")) -keybind (toggle_on_all_workspaces, handle_toggle_on_all_workspaces, 0, - BINDING_PER_WINDOW, NULL, - _("Toggle whether window is on all workspaces or just one")) - -keybind (move_to_workspace_1, handle_move_to_workspace, 0, BINDING_PER_WINDOW, - NULL, - _("Move window to workspace 1")) -keybind (move_to_workspace_2, handle_move_to_workspace, 1, BINDING_PER_WINDOW, - NULL, - _("Move window to workspace 2")) -keybind (move_to_workspace_3, handle_move_to_workspace, 2, BINDING_PER_WINDOW, - NULL, - _("Move window to workspace 3")) -keybind (move_to_workspace_4, handle_move_to_workspace, 3, BINDING_PER_WINDOW, - NULL, - _("Move window to workspace 4")) -keybind (move_to_workspace_5, handle_move_to_workspace, 4, BINDING_PER_WINDOW, - NULL, - _("Move window to workspace 5")) -keybind (move_to_workspace_6, handle_move_to_workspace, 5, BINDING_PER_WINDOW, - NULL, - _("Move window to workspace 6")) -keybind (move_to_workspace_7, handle_move_to_workspace, 6, BINDING_PER_WINDOW, - NULL, - _("Move window to workspace 7")) -keybind (move_to_workspace_8, handle_move_to_workspace, 7, BINDING_PER_WINDOW, - NULL, - _("Move window to workspace 8")) -keybind (move_to_workspace_9, handle_move_to_workspace, 8, BINDING_PER_WINDOW, - NULL, - _("Move window to workspace 9")) -keybind (move_to_workspace_10, handle_move_to_workspace, 9, BINDING_PER_WINDOW, - NULL, - _("Move window to workspace 10")) -keybind (move_to_workspace_11, handle_move_to_workspace, 10, BINDING_PER_WINDOW, - NULL, - _("Move window to workspace 11")) -keybind (move_to_workspace_12, handle_move_to_workspace, 11, BINDING_PER_WINDOW, - NULL, - _("Move window to workspace 12")) +keybind (activate-window-menu, handle_activate_window_menu, 0, BINDING_PER_WINDOW) +keybind (toggle-fullscreen, handle_toggle_fullscreen, 0, BINDING_PER_WINDOW) +keybind (toggle-maximized, handle_toggle_maximized, 0, BINDING_PER_WINDOW) +keybind (toggle-above, handle_toggle_above, 0, BINDING_PER_WINDOW) +keybind (maximize, handle_maximize, 0, BINDING_PER_WINDOW) +keybind (unmaximize, handle_unmaximize, 0, BINDING_PER_WINDOW) +keybind (toggle-shaded, handle_toggle_shaded, 0, BINDING_PER_WINDOW) +keybind (minimize, handle_minimize, 0, BINDING_PER_WINDOW) +keybind (close, handle_close, 0, BINDING_PER_WINDOW) +keybind (begin-move, handle_begin_move, 0, BINDING_PER_WINDOW) +keybind (begin-resize, handle_begin_resize, 0, BINDING_PER_WINDOW) +keybind (toggle-on-all-workspaces, handle_toggle_on_all_workspaces, 0, BINDING_PER_WINDOW) + +keybind (move-to-workspace-1, handle_move_to_workspace, 0, BINDING_PER_WINDOW) +keybind (move-to-workspace-2, handle_move_to_workspace, 1, BINDING_PER_WINDOW) +keybind (move-to-workspace-3, handle_move_to_workspace, 2, BINDING_PER_WINDOW) +keybind (move-to-workspace-4, handle_move_to_workspace, 3, BINDING_PER_WINDOW) +keybind (move-to-workspace-5, handle_move_to_workspace, 4, BINDING_PER_WINDOW) +keybind (move-to-workspace-6, handle_move_to_workspace, 5, BINDING_PER_WINDOW) +keybind (move-to-workspace-7, handle_move_to_workspace, 6, BINDING_PER_WINDOW) +keybind (move-to-workspace-8, handle_move_to_workspace, 7, BINDING_PER_WINDOW) +keybind (move-to-workspace-9, handle_move_to_workspace, 8, BINDING_PER_WINDOW) +keybind (move-to-workspace-10, handle_move_to_workspace, 9, BINDING_PER_WINDOW) +keybind (move-to-workspace-11, handle_move_to_workspace, 10, BINDING_PER_WINDOW) +keybind (move-to-workspace-12, handle_move_to_workspace, 11, BINDING_PER_WINDOW) /* META_MOTION_* are negative, and so distinct from workspace numbers, * which are always zero or positive. @@ -331,62 +233,44 @@ keybind (move_to_workspace_12, handle_move_to_workspace, 11, BINDING_PER_WINDOW, * workspace.h, of course. */ -keybind (move_to_workspace_left, handle_move_to_workspace, - META_MOTION_LEFT, BINDING_PER_WINDOW, "Left", - _("Move window one workspace to the left")) -keybind (move_to_workspace_right, handle_move_to_workspace, - META_MOTION_RIGHT, BINDING_PER_WINDOW, "Right", - _("Move window one workspace to the right")) -keybind (move_to_workspace_up, handle_move_to_workspace, - META_MOTION_UP, BINDING_PER_WINDOW, "Up", - _("Move window one workspace up")) -keybind (move_to_workspace_down, handle_move_to_workspace, - META_MOTION_DOWN, BINDING_PER_WINDOW, "Down", - _("Move window one workspace down")) - -keybind (raise_or_lower, handle_raise_or_lower, 0, BINDING_PER_WINDOW, NULL, - _("Raise window if it's covered by another window, otherwise lower it")) -keybind (raise, handle_raise, 0, BINDING_PER_WINDOW, NULL, - _("Raise window above other windows")) -keybind (lower, handle_lower, 0, BINDING_PER_WINDOW, NULL, - _("Lower window below other windows")) - -keybind (maximize_vertically, handle_maximize_vertically, 0, - BINDING_PER_WINDOW, NULL, - _("Maximize window vertically")) - -keybind (maximize_horizontally, handle_maximize_horizontally, 0, - BINDING_PER_WINDOW, NULL, - _("Maximize window horizontally")) - -keybind (move_to_corner_nw, handle_move_to_corner_nw, 0, - BINDING_PER_WINDOW, NULL, - _("Move window to north-west (top left) corner")) -keybind (move_to_corner_ne, handle_move_to_corner_ne, 0, - BINDING_PER_WINDOW, NULL, - _("Move window to north-east (top right) corner")) -keybind (move_to_corner_sw, handle_move_to_corner_sw, 0, - BINDING_PER_WINDOW, NULL, - _("Move window to south-west (bottom left) corner")) -keybind (move_to_corner_se, handle_move_to_corner_se, 0, - BINDING_PER_WINDOW, NULL, - _("Move window to south-east (bottom right) corner")) - -keybind (move_to_side_n, handle_move_to_side_n, 0, - BINDING_PER_WINDOW, NULL, - _("Move window to north (top) side of screen")) -keybind (move_to_side_s, handle_move_to_side_s, 0, - BINDING_PER_WINDOW, NULL, - _("Move window to south (bottom) side of screen")) -keybind (move_to_side_e, handle_move_to_side_e, 0, - BINDING_PER_WINDOW, NULL, - _("Move window to east (right) side of screen")) -keybind (move_to_side_w, handle_move_to_side_w, 0, - BINDING_PER_WINDOW, NULL, - _("Move window to west (left) side of screen")) -keybind (move_to_center, handle_move_to_center, 0, - BINDING_PER_WINDOW, NULL, - _("Move window to center of screen")) +keybind (move-to-workspace-left, handle_move_to_workspace, + META_MOTION_LEFT, BINDING_PER_WINDOW) +keybind (move-to-workspace-right, handle_move_to_workspace, + META_MOTION_RIGHT, BINDING_PER_WINDOW) +keybind (move-to-workspace-up, handle_move_to_workspace, + META_MOTION_UP, BINDING_PER_WINDOW) +keybind (move-to-workspace-down, handle_move_to_workspace, + META_MOTION_DOWN, BINDING_PER_WINDOW) + +keybind (raise-or-lower, handle_raise_or_lower, 0, BINDING_PER_WINDOW) +keybind (raise, handle_raise, 0, BINDING_PER_WINDOW) +keybind (lower, handle_lower, 0, BINDING_PER_WINDOW) + +keybind (maximize-vertically, handle_maximize_vertically, 0, + BINDING_PER_WINDOW) + +keybind (maximize-horizontally, handle_maximize_horizontally, 0, + BINDING_PER_WINDOW) + +keybind (move-to-corner-nw, handle_move_to_corner_nw, 0, + BINDING_PER_WINDOW) +keybind (move-to-corner-ne, handle_move_to_corner_ne, 0, + BINDING_PER_WINDOW) +keybind (move-to-corner-sw, handle_move_to_corner_sw, 0, + BINDING_PER_WINDOW) +keybind (move-to-corner-se, handle_move_to_corner_se, 0, + BINDING_PER_WINDOW) + +keybind (move-to-side-n, handle_move_to_side_n, 0, + BINDING_PER_WINDOW) +keybind (move-to-side-s, handle_move_to_side_s, 0, + BINDING_PER_WINDOW) +keybind (move-to-side-e, handle_move_to_side_e, 0, + BINDING_PER_WINDOW) +keybind (move-to-side-w, handle_move_to_side_w, 0, + BINDING_PER_WINDOW) +keybind (move-to-center, handle_move_to_center, 0, + BINDING_PER_WINDOW) /* eof all-keybindings.h */ diff --git a/src/include/prefs.h b/src/include/prefs.h index e2179595..a68d7ae8 100644 --- a/src/include/prefs.h +++ b/src/include/prefs.h @@ -97,10 +97,10 @@ gboolean meta_prefs_get_mate_animations (void); const char* meta_prefs_get_command (int i); -char* meta_prefs_get_mateconf_key_for_command (int i); +char* meta_prefs_get_settings_key_for_command (int i); const char* meta_prefs_get_terminal_command (void); -const char* meta_prefs_get_mateconf_key_for_terminal_command (void); +const char* meta_prefs_get_settings_key_for_terminal_command (void); void meta_prefs_get_button_layout (MetaButtonLayout *button_layout); diff --git a/src/marco.schemas.in.in b/src/marco.schemas.in.in deleted file mode 100644 index 818ba47c..00000000 --- a/src/marco.schemas.in.in +++ /dev/null @@ -1,611 +0,0 @@ - - - - - - - /schemas/apps/marco/general/mouse_button_modifier - /apps/marco/general/mouse_button_modifier - marco - string - <Alt> - - Modifier to use for modified window click actions - - Clicking a window while holding down this modifier key - will move the window (left click), resize the window - (middle click), or show the window menu (right click). - The middle and right click operations may be swapped - using the "resize_with_right_button" key. - Modifier is expressed as "<Alt>" or "<Super>" - for example. - - - - - - /schemas/apps/marco/general/resize_with_right_button - /apps/marco/general/resize_with_right_button - marco - bool - true - - Whether to resize with the right button - - Set this to true to resize with the right button and show a menu - with the middle button while holding down the key given in - "mouse_button_modifier"; set it to false to make it work the - opposite way around. - - - - - - /schemas/apps/marco/general/button_layout - /apps/marco/general/button_layout - marco - string - menu:minimize,maximize,close - - Arrangement of buttons on the titlebar - - Arrangement of buttons on the titlebar. The - value should be a string, such as - "menu:minimize,maximize,spacer,close"; the colon separates the - left corner of the window from the right corner, and - the button names are comma-separated. Duplicate buttons - are not allowed. Unknown button names are silently ignored - so that buttons can be added in future marco versions - without breaking older versions. - A special spacer tag can be used to insert some space between - two adjacent buttons. - - - - - - /schemas/apps/marco/general/focus_mode - /apps/marco/general/focus_mode - marco - string - click - - Window focus mode - - The window focus mode indicates how windows are activated. - It has three possible values; "click" means windows must - be clicked in order to focus them, "sloppy" means windows - are focused when the mouse enters the window, and "mouse" means - windows are focused when the mouse enters the window and - unfocused when the mouse leaves the window. - - - - - - /schemas/apps/marco/general/focus_new_windows - /apps/marco/general/focus_new_windows - marco - string - smart - - Control how new windows get focus - - This option provides additional control over how newly created - windows get focus. It has two possible values; "smart" applies - the user's normal focus mode, and "strict" results in windows - started from a terminal not being given focus. - - - - - - /schemas/apps/marco/general/raise_on_click - /apps/marco/general/raise_on_click - marco - bool - true - - Whether raising should be a side-effect of other user - interactions - - Setting this option to false can lead to buggy behavior, so - users are strongly discouraged from changing it from the default - of true. - - Many actions (e.g. clicking in the client area, moving or resizing the window) - normally raise the window as a side-effect. Setting this option to false, which - is strongly discouraged, will decouple raising from other user actions, and - ignore raise requests generated by applications. See - http://bugzilla.gnome.org/show_bug.cgi?id=445447#c6. - Even when this option is false, windows can - still be raised by an alt-left-click anywhere on the window, a - normal click on the window decorations, or by special messages - from pagers, such as activation requests from tasklist applets. - This option is currently disabled in click-to-focus mode. - - Note that the list of ways to raise windows when raise_on_click - is false does not include programmatic requests from - applications to raise windows; such requests will be ignored - regardless of the reason for the request. If you are an - application developer and have a user complaining that your - application does not work with this setting disabled, tell them - it is _their_ fault for breaking their window manager and that - they need to change this option back to true or live with the - "bug" they requested. - - - - - - /schemas/apps/marco/general/action_double_click_titlebar - /apps/marco/general/action_double_click_titlebar - marco - string - toggle_maximize - - Action on title bar double-click - - This option determines the effects of double-clicking on the - title bar. Current valid options are - 'toggle_shade', which will shade/unshade the window, - 'toggle_maximize' which will maximize/unmaximize the window, - 'toggle_maximize_horizontally' and 'toggle_maximize_vertically' - which will maximize/unmaximize the window in that direction only, - 'minimize' which will minimize the window, - 'shade' which will roll the window up, - 'menu' which will display the window menu, - 'lower' which will put the window behind all the others, - and 'none' which will not do anything. - - - - - - /schemas/apps/marco/general/action_middle_click_titlebar - /apps/marco/general/action_middle_click_titlebar - marco - string - lower - - Action on title bar middle-click - - This option determines the effects of middle-clicking on the - title bar. Current valid options are - 'toggle_shade', which will shade/unshade the window, - 'toggle_maximize' which will maximize/unmaximize the window, - 'toggle_maximize_horizontally' and 'toggle_maximize_vertically' - which will maximize/unmaximize the window in that direction only, - 'minimize' which will minimize the window, - 'shade' which will roll the window up, - 'menu' which will display the window menu, - 'lower' which will put the window behind all the others, - and 'none' which will not do anything. - - - - - - /schemas/apps/marco/general/action_right_click_titlebar - /apps/marco/general/action_right_click_titlebar - marco - string - menu - - Action on title bar right-click - - This option determines the effects of right-clicking on the - title bar. Current valid options are - 'toggle_shade', which will shade/unshade the window, - 'toggle_maximize' which will maximize/unmaximize the window, - 'toggle_maximize_horizontally' and 'toggle_maximize_vertically' - which will maximize/unmaximize the window in that direction only, - 'minimize' which will minimize the window, - 'shade' which will roll the window up, - 'menu' which will display the window menu, - 'lower' which will put the window behind all the others, - and 'none' which will not do anything. - - - - - - /schemas/apps/marco/general/auto_raise - /apps/marco/general/auto_raise - marco - bool - false - - Automatically raises the focused window - - If set to true, and the focus mode is either "sloppy" or "mouse" - then the focused window will be automatically raised after a - delay specified by the auto_raise_delay key. This is not related - to clicking on a window to raise it, nor to entering a window - during drag-and-drop. - - - - - - /schemas/apps/marco/general/auto_raise_delay - /apps/marco/general/auto_raise_delay - marco - int - 500 - - Delay in milliseconds for the auto raise option - - The time delay before raising a window if auto_raise is set to - true. The delay is given in thousandths of a second. - - - - - - /schemas/apps/marco/general/theme - /apps/marco/general/theme - marco - string - Spidey-Left - - Current theme - - The theme determines the appearance of window borders, - titlebar, and so forth. - - - - - - /schemas/apps/marco/general/titlebar_uses_system_font - /apps/marco/general/titlebar_uses_system_font - marco - bool - false - - Use standard system font in window titles - - If true, ignore the titlebar_font - option, and use the standard application font for window - titles. - - - - - - /schemas/apps/marco/general/titlebar_font - /apps/marco/general/titlebar_font - marco - string - Sans Bold 10 - - Window title font - - A font description string describing a font for window - titlebars. The size from the description will only be used if the - titlebar_font_size option is set to 0. Also, this option is - disabled if the titlebar_uses_desktop_font option is set to true. - - - - - - /schemas/apps/marco/general/num_workspaces - /apps/marco/general/num_workspaces - marco - int - 4 - - Number of workspaces - - Number of workspaces. Must be more than zero, and has a fixed - maximum to prevent making the desktop unusable by accidentally - asking for too many workspaces. - - - - - - /schemas/apps/marco/general/wrap_style - /apps/marco/general/wrap_style - marco - string - no wrap - - Workspace wrap style - - The wrap style is used to determine how to switch from one - workspace to another at the border of the workspace switcher. - When set to "no wrap", nothing will happen if you try to - switch to a workspace past the border of the workspace switcher. - If set to "classic", the old marco behavior is used: - the end of one row leads to the beginning of the next and - the end of a column leads to the beginning of the next. - If set to "toroidal", workspaces are connected like a doughnut: - the end of each row leads to its own beginning and the - end of each column leads to its own beginning. - - - - - - /schemas/apps/marco/general/visual_bell - /apps/marco/general/visual_bell - marco - bool - false - - Enable Visual Bell - - Turns on a visual indication when an application or the system - issues a 'bell' or 'beep'; useful for the hard-of-hearing and for - use in noisy environments. - - - - - - /schemas/apps/marco/general/audible_bell - /apps/marco/general/audible_bell - marco - bool - true - - System Bell is Audible - - Determines whether applications or the system can generate - audible 'beeps'; may be used in conjunction with 'visual bell' to - allow silent 'beeps'. - - - - - - /schemas/apps/marco/general/visual_bell_type - /apps/marco/general/visual_bell_type - marco - string - fullscreen - - Visual Bell Type - - Tells Marco how to implement the visual indication that the - system bell or another application 'bell' indicator has been - rung. Currently there are two valid values, "fullscreen", which - causes a fullscreen white-black flash, and "frame_flash" which - causes the titlebar of the application which sent the bell signal - to flash. If the application which sent the bell is unknown (as - is usually the case for the default "system beep"), the currently - focused window's titlebar is flashed. - - - - - - /schemas/apps/marco/general/compositing_manager - /apps/marco/general/compositing_manager - marco - bool - false - - Compositing Manager - - Determines whether Marco is a compositing manager. - - - - - - /schemas/apps/marco/general/compositing_fast_alt_tab - /apps/marco/general/compositing_fast_alt_tab - marco - bool - false - - Fast Alt-Tab Enabled - - Whether or not fast alt-tabbing is used when the compositing - manager is enabled. - - - - - - /schemas/apps/marco/workspace_names/name - /apps/marco/workspace_names/name_1 - /apps/marco/workspace_names/name_2 - /apps/marco/workspace_names/name_3 - /apps/marco/workspace_names/name_4 - /apps/marco/workspace_names/name_5 - /apps/marco/workspace_names/name_6 - /apps/marco/workspace_names/name_7 - /apps/marco/workspace_names/name_8 - /apps/marco/workspace_names/name_9 - /apps/marco/workspace_names/name_10 - /apps/marco/workspace_names/name_11 - /apps/marco/workspace_names/name_12 - /apps/marco/workspace_names/name_13 - /apps/marco/workspace_names/name_14 - /apps/marco/workspace_names/name_15 - /apps/marco/workspace_names/name_16 - marco - string - - - Name of workspace - - The name of a workspace. - - - - - - /schemas/apps/marco/general/reduced_resources - /apps/marco/general/reduced_resources - marco - bool - false - - If true, trade off usability for less resource usage - - If true, marco will give the user less feedback by using - wireframes, avoiding animations, or other means. This is a - significant reduction in usability for many users, but may allow - legacy applications to continue working, and may also be a - useful tradeoff for terminal servers. However, the wireframe - feature is disabled when accessibility is on. - - - - - - - - /schemas/apps/marco/global_keybindings/run_command - /apps/marco/global_keybindings/run_command_1 - /apps/marco/global_keybindings/run_command_2 - /apps/marco/global_keybindings/run_command_3 - /apps/marco/global_keybindings/run_command_4 - /apps/marco/global_keybindings/run_command_5 - /apps/marco/global_keybindings/run_command_6 - /apps/marco/global_keybindings/run_command_7 - /apps/marco/global_keybindings/run_command_8 - /apps/marco/global_keybindings/run_command_9 - /apps/marco/global_keybindings/run_command_10 - /apps/marco/global_keybindings/run_command_11 - /apps/marco/global_keybindings/run_command_12 - marco - string - disabled - - Run a defined command - - The keybinding that runs the correspondingly-numbered - command in /apps/marco/keybinding_commands - - The format looks like "<Control>a" or - "<Shift><Alt>F1". - - The parser is fairly liberal and allows lower or upper case, - and also abbreviations such as "<Ctl>" and - "<Ctrl>". If you set the option to the special string - "disabled", then there will be no keybinding for this - action. - - - - - - /schemas/apps/marco/keybinding_commands/command - /apps/marco/keybinding_commands/command_1 - /apps/marco/keybinding_commands/command_2 - /apps/marco/keybinding_commands/command_3 - /apps/marco/keybinding_commands/command_4 - /apps/marco/keybinding_commands/command_5 - /apps/marco/keybinding_commands/command_6 - /apps/marco/keybinding_commands/command_7 - /apps/marco/keybinding_commands/command_8 - /apps/marco/keybinding_commands/command_9 - /apps/marco/keybinding_commands/command_10 - /apps/marco/keybinding_commands/command_11 - /apps/marco/keybinding_commands/command_12 - marco - string - - - Commands to run in response to keybindings - - The /apps/marco/global_keybindings/run_command_N - keys define keybindings that correspond to these commands. - Pressing the keybinding for run_command_N will - execute command_N. - - - - - - /schemas/apps/marco/keybinding_commands/command_screenshot - /apps/marco/keybinding_commands/command_screenshot - marco - string - mate-screenshot - - The screenshot command - - The /apps/marco/global_keybindings/run_command_screenshot - key defines a keybinding which causes the command specified - by this setting to be invoked. - - - - - - /schemas/apps/marco/keybinding_commands/command_window_screenshot - /apps/marco/keybinding_commands/command_window_screenshot - marco - string - mate-screenshot --window - - The window screenshot command - - The /apps/marco/global_keybindings/run_command_window_screenshot - key defines a keybinding which causes the command specified - by this setting to be invoked. - - - - - - - - - - - /schemas/apps/marco/general/application_based - /apps/marco/general/application_based - marco - bool - false - - (Not implemented) Navigation works in terms of applications not windows - - If true, then Marco works in terms of applications rather than - windows. The concept is a bit abstract, but in general an - application-based setup is more like the Mac and less like - Windows. When you focus a window in application-based mode, all - the windows in the application will be raised. Also, in - application-based mode, focus clicks are not passed through to - windows in other applications. Application-based mode is, - however, largely unimplemented at the moment. - - - - - - /schemas/apps/marco/general/disable_workarounds - /apps/marco/general/disable_workarounds - marco - bool - false - - Disable misfeatures that are required by old or broken - applications - - Some applications disregard specifications in ways that result in - window manager misfeatures. This option puts Marco in a - rigorously correct mode, which gives a more consistent user - interface, provided one does not need to run any misbehaving - applications. - - - - - - - - - - diff --git a/src/org.mate.marco.gschema.xml b/src/org.mate.marco.gschema.xml new file mode 100644 index 00000000..b4bed502 --- /dev/null +++ b/src/org.mate.marco.gschema.xml @@ -0,0 +1,722 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + '<Alt>' + Modifier to use for modified window click actions + Clicking a window while holding down this modifier key will move the window (left click), resize the window (middle click), or show the window menu (right click). The middle and right click operations may be swapped using the "resize_with_right_button" key. Modifier is expressed as "<Alt>" or "<Super>" for example. + + + true + Whether to resize with the right button + Set this to true to resize with the right button and show a menu with the middle button while holding down the key given in "mouse_button_modifier"; set it to false to make it work the opposite way around. + + + 'menu:minimize,maximize,close' + Arrangement of buttons on the titlebar + Arrangement of buttons on the titlebar. The value should be a string, such as "menu:minimize,maximize,spacer,close"; the colon separates the left corner of the window from the right corner, and the button names are comma-separated. Duplicate buttons are not allowed. Unknown button names are silently ignored so that buttons can be added in future marco versions without breaking older versions. A special spacer tag can be used to insert some space between two adjacent buttons. + + + 'click' + Window focus mode + The window focus mode indicates how windows are activated. It has three possible values; "click" means windows must be clicked in order to focus them, "sloppy" means windows are focused when the mouse enters the window, and "mouse" means windows are focused when the mouse enters the window and unfocused when the mouse leaves the window. + + + 'smart' + Control how new windows get focus + This option provides additional control over how newly created windows get focus. It has two possible values; "smart" applies the user's normal focus mode, and "strict" results in windows started from a terminal not being given focus. + + + true + Whether raising should be a side-effect of other user interactions + Setting this option to false can lead to buggy behavior, so users are strongly discouraged from changing it from the default of true. Many actions (e.g. clicking in the client area, moving or resizing the window) normally raise the window as a side-effect. Setting this option to false, which is strongly discouraged, will decouple raising from other user actions, and ignore raise requests generated by applications. See http://bugzilla.gnome.org/show_bug.cgi?id=445447#c6. Even when this option is false, windows can still be raised by an alt-left-click anywhere on the window, a normal click on the window decorations, or by special messages from pagers, such as activation requests from tasklist applets. This option is currently disabled in click-to-focus mode. Note that the list of ways to raise windows when raise_on_click is false does not include programmatic requests from applications to raise windows; such requests will be ignored regardless of the reason for the request. If you are an application developer and have a user complaining that your application does not work with this setting disabled, tell them it is _their_ fault for breaking their window manager and that they need to change this option back to true or live with the "bug" they requested. + + + 'toggle_maximize' + Action on title bar double-click + This option determines the effects of double-clicking on the title bar. Current valid options are 'toggle_shade', which will shade/unshade the window, 'toggle_maximize' which will maximize/unmaximize the window, 'toggle_maximize_horizontally' and 'toggle_maximize_vertically' which will maximize/unmaximize the window in that direction only, 'minimize' which will minimize the window, 'shade' which will roll the window up, 'menu' which will display the window menu, 'lower' which will put the window behind all the others, and 'none' which will not do anything. + + + 'lower' + Action on title bar middle-click + This option determines the effects of middle-clicking on the title bar. Current valid options are 'toggle_shade', which will shade/unshade the window, 'toggle_maximize' which will maximize/unmaximize the window, 'toggle_maximize_horizontally' and 'toggle_maximize_vertically' which will maximize/unmaximize the window in that direction only, 'minimize' which will minimize the window, 'shade' which will roll the window up, 'menu' which will display the window menu, 'lower' which will put the window behind all the others, and 'none' which will not do anything. + + + 'menu' + Action on title bar right-click + This option determines the effects of right-clicking on the title bar. Current valid options are 'toggle_shade', which will shade/unshade the window, 'toggle_maximize' which will maximize/unmaximize the window, 'toggle_maximize_horizontally' and 'toggle_maximize_vertically' which will maximize/unmaximize the window in that direction only, 'minimize' which will minimize the window, 'shade' which will roll the window up, 'menu' which will display the window menu, 'lower' which will put the window behind all the others, and 'none' which will not do anything. + + + false + Automatically raises the focused window + If set to true, and the focus mode is either "sloppy" or "mouse" then the focused window will be automatically raised after a delay specified by the auto_raise_delay key. This is not related to clicking on a window to raise it, nor to entering a window during drag-and-drop. + + + 500 + Delay in milliseconds for the auto raise option + The time delay before raising a window if auto_raise is set to true. The delay is given in thousandths of a second. + + + 'Spidey-Left' + Current theme + The theme determines the appearance of window borders, titlebar, and so forth. + + + false + Use standard system font in window titles + If true, ignore the titlebar_font option, and use the standard application font for window titles. + + + 'Sans Bold 10' + Window title font + A font description string describing a font for window titlebars. The size from the description will only be used if the titlebar_font_size option is set to 0. Also, this option is disabled if the titlebar_uses_desktop_font option is set to true. + + + 4 + Number of workspaces + Number of workspaces. Must be more than zero, and has a fixed maximum to prevent making the desktop unusable by accidentally asking for too many workspaces. + + + 'no wrap' + Workspace wrap style + The wrap style is used to determine how to switch from one workspace to another at the border of the workspace switcher. When set to "no wrap", nothing will happen if you try to switch to a workspace past the border of the workspace switcher. If set to "classic", the old marco behavior is used: the end of one row leads to the beginning of the next and the end of a column leads to the beginning of the next. If set to "toroidal", workspaces are connected like a doughnut: the end of each row leads to its own beginning and the end of each column leads to its own beginning. + + + false + Enable Visual Bell + Turns on a visual indication when an application or the system issues a 'bell' or 'beep'; useful for the hard-of-hearing and for use in noisy environments. + + + true + System Bell is Audible + Determines whether applications or the system can generate audible 'beeps'; may be used in conjunction with 'visual bell' to allow silent 'beeps'. + + + 'fullscreen' + Visual Bell Type + Tells Marco how to implement the visual indication that the system bell or another application 'bell' indicator has been rung. Currently there are two valid values, "fullscreen", which causes a fullscreen white-black flash, and "frame_flash" which causes the titlebar of the application which sent the bell signal to flash. If the application which sent the bell is unknown (as is usually the case for the default "system beep"), the currently focused window's titlebar is flashed. + + + false + Compositing Manager + Determines whether Marco is a compositing manager. + + + false + Fast Alt-Tab Enabled + Whether or not fast alt-tabbing is used when the compositing manager is enabled. + + + false + If true, trade off usability for less resource usage + If true, marco will give the user less feedback by using wireframes, avoiding animations, or other means. This is a significant reduction in usability for many users, but may allow legacy applications to continue working, and may also be a useful tradeoff for terminal servers. However, the wireframe feature is disabled when accessibility is on. + + + false + (Not implemented) Navigation works in terms of applications not windows + If true, then Marco works in terms of applications rather than windows. The concept is a bit abstract, but in general an application-based setup is more like the Mac and less like Windows. When you focus a window in application-based mode, all the windows in the application will be raised. Also, in application-based mode, focus clicks are not passed through to windows in other applications. Application-based mode is, however, largely unimplemented at the moment. + + + false + Disable misfeatures that are required by old or broken applications + Some applications disregard specifications in ways that result in window manager misfeatures. This option puts Marco in a rigorously correct mode, which gives a more consistent user interface, provided one does not need to run any misbehaving applications. + + + + + + '' + Name of workspace + The name of a workspace. + + + '' + Name of workspace + The name of a workspace. + + + '' + Name of workspace + The name of a workspace. + + + '' + Name of workspace + The name of a workspace. + + + '' + Name of workspace + The name of a workspace. + + + '' + Name of workspace + The name of a workspace. + + + '' + Name of workspace + The name of a workspace. + + + '' + Name of workspace + The name of a workspace. + + + '' + Name of workspace + The name of a workspace. + + + '' + Name of workspace + The name of a workspace. + + + '' + Name of workspace + The name of a workspace. + + + '' + Name of workspace + The name of a workspace. + + + '' + Name of workspace + The name of a workspace. + + + '' + Name of workspace + The name of a workspace. + + + '' + Name of workspace + The name of a workspace. + + + '' + Name of workspace + The name of a workspace. + + + + + + 'disabled' + Run a defined command + The keybinding that runs the correspondingly-numbered command in /apps/marco/keybinding_commands The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + 'disabled' + Run a defined command + The keybinding that runs the correspondingly-numbered command in /apps/marco/keybinding_commands The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + 'disabled' + Run a defined command + The keybinding that runs the correspondingly-numbered command in /apps/marco/keybinding_commands The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + 'disabled' + Run a defined command + The keybinding that runs the correspondingly-numbered command in /apps/marco/keybinding_commands The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + 'disabled' + Run a defined command + The keybinding that runs the correspondingly-numbered command in /apps/marco/keybinding_commands The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + 'disabled' + Run a defined command + The keybinding that runs the correspondingly-numbered command in /apps/marco/keybinding_commands The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + 'disabled' + Run a defined command + The keybinding that runs the correspondingly-numbered command in /apps/marco/keybinding_commands The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + 'disabled' + Run a defined command + The keybinding that runs the correspondingly-numbered command in /apps/marco/keybinding_commands The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + 'disabled' + Run a defined command + The keybinding that runs the correspondingly-numbered command in /apps/marco/keybinding_commands The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + 'disabled' + Run a defined command + The keybinding that runs the correspondingly-numbered command in /apps/marco/keybinding_commands The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + 'disabled' + Run a defined command + The keybinding that runs the correspondingly-numbered command in /apps/marco/keybinding_commands The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + 'disabled' + Run a defined command + The keybinding that runs the correspondingly-numbered command in /apps/marco/keybinding_commands The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + 'disabled' + Switch to workspace 1 + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + 'disabled' + Switch to workspace 2 + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + 'disabled' + Switch to workspace 3 + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + 'disabled' + Switch to workspace 4 + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + 'disabled' + Switch to workspace 5 + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + 'disabled' + Switch to workspace 6 + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + 'disabled' + Switch to workspace 7 + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + 'disabled' + Switch to workspace 8 + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + 'disabled' + Switch to workspace 9 + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + 'disabled' + Switch to workspace 10 + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + 'disabled' + Switch to workspace 11 + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + 'disabled' + Switch to workspace 12 + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + '<Control><Alt>Left' + Switch to workspace on the left of the current workspace + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + '<Control><Alt>Right' + Switch to workspace on the right of the current workspace + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + '<Control><Alt>Up' + Switch to workspace above the current workspace + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + '<Control><Alt>Down' + Switch to workspace below the current workspace + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + 'disabled' + Move between windows of an application, using a popup window + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. This keybinding may be reversed by holding down the "shift" key; therefore, "shift" cannot be one of the keys it uses. + + + 'disabled' + Move backward between windows of an application, using a popup window + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. This keybinding may be reversed by holding down the "shift" key; therefore, "shift" cannot be one of the keys it uses. + + + '<Alt>Tab' + Move between windows, using a popup window + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. This keybinding may be reversed by holding down the "shift" key; therefore, "shift" cannot be one of the keys it uses. + + + 'disabled' + Move backward between windows, using a popup window + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. This keybinding may be reversed by holding down the "shift" key; therefore, "shift" cannot be one of the keys it uses. + + + 'disabled' + Move between windows on all workspaces, using a popup window + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. This keybinding may be reversed by holding down the "shift" key; therefore, "shift" cannot be one of the keys it uses. + + + 'disabled' + Move backward between windows on all workspaces, using a popup window + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. This keybinding may be reversed by holding down the "shift" key; therefore, "shift" cannot be one of the keys it uses. + + + '<Control><Alt>Tab' + Move between panels and the desktop, using a popup window + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. This keybinding may be reversed by holding down the "shift" key; therefore, "shift" cannot be one of the keys it uses. + + + 'disabled' + Move backward between panels and the desktop, using a popup window + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. This keybinding may be reversed by holding down the "shift" key; therefore, "shift" cannot be one of the keys it uses. + + + '<Alt>F6' + Move between windows of an application immediately + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. This keybinding may be reversed by holding down the "shift" key; therefore, "shift" cannot be one of the keys it uses. + + + 'disabled' + Move backward between windows of an application immediately + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. This keybinding may be reversed by holding down the "shift" key; therefore, "shift" cannot be one of the keys it uses. + + + '<Alt>Escape' + Move between windows immediately + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. This keybinding may be reversed by holding down the "shift" key; therefore, "shift" cannot be one of the keys it uses. + + + 'disabled' + Move backward between windows immediately + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. This keybinding may be reversed by holding down the "shift" key; therefore, "shift" cannot be one of the keys it uses. + + + '<Control><Alt>Escape' + Move between panels and the desktop immediately + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. This keybinding may be reversed by holding down the "shift" key; therefore, "shift" cannot be one of the keys it uses. + + + 'disabled' + Move backward between panels and the desktop immediately + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. This keybinding may be reversed by holding down the "shift" key; therefore, "shift" cannot be one of the keys it uses. + + + '<Control><Alt>d' + Hide all normal windows and set focus to the desktop + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + '<Alt>F1' + Show the panel's main menu + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + '<Alt>F2' + Show the panel's "Run Application" dialog box + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + 'Print' + Take a screenshot + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + '<Alt>Print' + Take a screenshot of a window + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + 'disabled' + Run a terminal + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + + + + ' ' + Commands to run in response to keybindings + The /apps/marco/global_keybindings/run_command_N keys define keybindings that correspond to these commands. Pressing the keybinding for run_command_N will execute command_N. + + + 'mate-screenshot' + The screenshot command + The /apps/marco/global_keybindings/run_command_screenshot key defines a keybinding which causes the command specified by this setting to be invoked. + + + 'mate-screenshot --window' + The window screenshot command + The /apps/marco/global_keybindings/run_command_window_screenshot key defines a keybinding which causes the command specified by this setting to be invoked. + + + + + + '<Alt>space' + Activate the window menu + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + 'disabled' + Toggle fullscreen mode + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + '<Alt>F10' + Toggle maximization state + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + 'disabled' + Toggle whether a window will always be visible over other windows + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + 'disabled' + Maximize window + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + '<Alt>F5' + Restore window + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + 'disabled' + Toggle shaded state + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + '<Alt>F9' + Minimize window + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + '<Alt>F4' + Close window + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + '<Alt>F7' + Move window + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + '<Alt>F8' + Resize window + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + 'disabled' + Toggle whether window is on all workspaces or just one + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + 'disabled' + Move window to workspace 1 + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + 'disabled' + Move window to workspace 2 + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + 'disabled' + Move window to workspace 3 + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + 'disabled' + Move window to workspace 4 + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + 'disabled' + Move window to workspace 5 + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + 'disabled' + Move window to workspace 6 + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + 'disabled' + Move window to workspace 7 + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + 'disabled' + Move window to workspace 8 + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + 'disabled' + Move window to workspace 9 + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + 'disabled' + Move window to workspace 10 + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + 'disabled' + Move window to workspace 11 + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + 'disabled' + Move window to workspace 12 + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + '<Control><Shift><Alt>Left' + Move window one workspace to the left + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + '<Control><Shift><Alt>Right' + Move window one workspace to the right + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + '<Control><Shift><Alt>Up' + Move window one workspace up + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + '<Control><Shift><Alt>Down' + Move window one workspace down + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + 'disabled' + Raise window if it's covered by another window, otherwise lower it + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + 'disabled' + Raise window above other windows + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + 'disabled' + Lower window below other windows + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + 'disabled' + Maximize window vertically + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + 'disabled' + Maximize window horizontally + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + 'disabled' + Move window to north-west (top left) corner + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + 'disabled' + Move window to north-east (top right) corner + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + 'disabled' + Move window to south-west (bottom left) corner + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + 'disabled' + Move window to south-east (bottom right) corner + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + 'disabled' + Move window to north (top) side of screen + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + 'disabled' + Move window to south (bottom) side of screen + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + 'disabled' + Move window to east (right) side of screen + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + 'disabled' + Move window to west (left) side of screen + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + 'disabled' + Move window to center of screen + The format looks like "<Control>a" or "<Shift><Alt>F1". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". If you set the option to the special string "disabled", then there will be no keybinding for this action. + + + + -- cgit v1.2.1