Permalink
Browse files

migrate to gsettings

  • Loading branch information...
stefano-k committed Oct 1, 2012
1 parent 2c0d59c commit 7f595187a140a45ee5ba2fc2b9c068b46d829f79
Showing with 1,193 additions and 1,888 deletions.
  1. +4 −4 HACKING
  2. +13 −18 README
  3. +5 −32 configure.in
  4. +0 −3 po/POTFILES.in
  5. +4 −26 src/Makefile.am
  6. +21 −21 src/core/core.c
  7. +2 −2 src/core/keybindings.c
  8. +278 −911 src/core/prefs.c
  9. +3 −3 src/core/screen.c
  10. +139 −255 src/include/all-keybindings.h
  11. +2 −2 src/include/prefs.h
  12. +0 −611 src/marco.schemas.in.in
  13. +722 −0 src/org.mate.marco.gschema.xml
View
@@ -42,10 +42,10 @@ Minimal Building/Testing Environment
build a development version of Marco -- odds are, you may be able
to build marco from GIT without building any other modules.
As long as you have gtk+ >= 2.10 and MateConf with your distro (gtk+ >=
2.6 if you manually revert the change from bug 348633), you should
be able to install your distro's development packages
(e.g. gtk2-devel, MateConf-devel, startup-notification-devel on
As long as you have gtk+ >= 2.10 and GIO >= 2.25.10 with your distro
(gtk+ >= 2.6 if you manually revert the change from bug 348633), you
should be able to install your distro's development packages
(e.g. gtk2-devel, glib-devel, startup-notification-devel on
Fedora; also, remember to install the mate-common package which is
needed for building git versions of Mate modules like Marco) as
well as the standard development tools (gcc, autoconf, automake,
View
31 README
@@ -5,9 +5,7 @@ COMPILING MARCO
You need GTK+ 2.2. For startup notification to work you need
libstartup-notification at
http://www.freedesktop.org/software/startup-notification/ or on the
MATE ftp site. You also need MateConf (unless building a funky
extra-small embedded marco with --disable-mateconf, see below).
http://www.freedesktop.org/software/startup-notification/.
REPORTING BUGS AND SUBMITTING PATCHES
===
@@ -37,7 +35,6 @@ the theme engine.
You can strip about 70K from the marco binary by compiling with
options such as:
--disable-mateconf
--disable-sm
--disable-verbose-mode
--disable-startup-notification
@@ -83,25 +80,24 @@ MARCO FEATURES
and should work with KWin, fvwm2, and other EWMH-compliant WMs.)
- Has a simple theme system and a couple of extra themes come with it.
Change themes via mateconf-editor or mateconftool or MATE themes control
panel:
mateconftool-2 --type=string --set /apps/marco/general/theme Crux
mateconftool-2 --type=string --set /apps/marco/general/theme Gorilla
mateconftool-2 --type=string --set /apps/marco/general/theme Atlanta
mateconftool-2 --type=string --set /apps/marco/general/theme Bright
Change themes via gsettings:
gsettings set org.mate.Marco.general theme Crux
gsettings set org.mate.Marco.general theme Gorilla
gsettings set org.mate.Marco.general theme Atlanta
gsettings set org.mate.Marco.general theme Bright
See theme-format.txt for docs on the theme format. Use
marco-theme-viewer to preview themes.
- Change number of workspaces via mateconf-editor or mateconftool:
mateconftool-2 --type=int --set /apps/marco/general/num_workspaces 5
- Change number of workspaces via gsettings:
gsettings set org.mate.Marco.general num_workspaces 5
Can also change workspaces from MATE 2 pager.
- Change focus mode:
mateconftool-2 --type=string --set /apps/marco/general/focus_mode mouse
mateconftool-2 --type=string --set /apps/marco/general/focus_mode sloppy
mateconftool-2 --type=string --set /apps/marco/general/focus_mode click
gsettings set org.mate.Marco.general focus_mode mouse
gsettings set org.mate.Marco.general focus_mode sloppy
gsettings set org.mate.Marco.general focus_mode click
- Global keybinding defaults include:
@@ -116,10 +112,9 @@ MARCO FEATURES
Change keybindings for example:
unst mateconftool-2 --type=string --set /apps/marco/global_keybindings/switch_to_workspace_1 '<Alt>F1'
gsettings set org.mate.Marco.global-keybindings switch_to_workspace_1 '<Alt>F1'
Also try the MATE keyboard shortcuts control panel, or
mateconf-editor.
Also try the MATE keyboard shortcuts control panel.
See marco.schemas for all available bindings.
View
@@ -1,10 +1,10 @@
AC_PREREQ(2.50)
m4_define([marco_major_version], [1])
m4_define([marco_minor_version], [4])
m4_define([marco_minor_version], [0])
# Fibonacci sequence for micro version numbering:
# 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987
m4_define([marco_micro_version], [1])
m4_define([marco_micro_version], [0])
m4_define([marco_version],
[marco_major_version.marco_minor_version.marco_micro_version])
@@ -127,19 +127,12 @@ case "$with_gtk" in
CANBERRA_GTK=libcanberra-gtk3
;;
esac
GIO_MIN_VERSION=2.25.10
MARCO_PC_MODULES="gtk+-$GTK_API_VERSION >= $GTK_MIN_VERSION pango >= 1.2.0 $CANBERRA_GTK"
MARCO_PC_MODULES="gtk+-$GTK_API_VERSION >= $GTK_MIN_VERSION gio-2.0 >= $GIO_MIN_VERSION pango >= 1.2.0 $CANBERRA_GTK"
AC_SUBST(GTK_API_VERSION)
AC_ARG_ENABLE(mateconf,
AC_HELP_STRING([--disable-mateconf],
[disable mateconf usage, for embedded/size-sensitive non-MATE builds]),,
enable_mateconf=yes)
if test x$enable_mateconf = xyes; then
AC_DEFINE(HAVE_MATECONF,1,[Build with mateconf support])
MARCO_PC_MODULES="$MARCO_PC_MODULES mateconf-2.0 >= 1.1.0"
fi
GLIB_GSETTINGS
AC_ARG_ENABLE(verbose-mode,
AC_HELP_STRING([--disable-verbose-mode],
@@ -495,18 +488,6 @@ fi
AC_SUBST(GDK_PIXBUF_CSOURCE)
if test x$enable_mateconf = xyes; then
AC_PATH_PROG(MATECONFTOOL, mateconftool-2, no)
if test x"$MATECONFTOOL" = xno; then
AC_MSG_ERROR([mateconftool-2 executable not found in your path - should be installed with MateConf])
fi
AM_MATECONF_SOURCE_2
else
MATECONF_SCHEMAS_INSTALL_TRUE='#'
MATECONF_SCHEMAS_INSTALL_FALSE=
fi
AC_PATH_PROG(MATEDIALOG, matedialog, no)
if test x"$MATEDIALOG" = xno; then
AC_MSG_ERROR([matedialog not found in your path - needed for dialogs])
@@ -545,13 +526,6 @@ po/Makefile.in
AC_OUTPUT
if test x$enable_mateconf = xno; then
echo "*** WARNING WARNING WARNING WARNING WARNING"
echo "*** Building without MateConf. This means there's no"
echo "*** way to change prefs except hacking source code."
echo "*** This is intended for embedded systems etc., not for normal use."
fi
if test x$enable_verbose_mode = xno; then
echo "*** WARNING WARNING WARNING WARNING WARNING"
echo "*** Building without verbose mode"
@@ -568,7 +542,6 @@ marco-$VERSION (using gtk+-${GTK_API_VERSION}):
source code location: ${srcdir}
compiler: ${CC}
MateConf: ${enable_mateconf}
XFree86 Xinerama: ${use_xfree_xinerama}
Solaris Xinerama: ${use_solaris_xinerama}
Startup notification: ${have_startup_notification}
View
@@ -11,15 +11,12 @@ src/core/keybindings.c
src/core/main.c
src/core/prefs.c
src/core/screen.c
src/core/schema-bindings.c
src/core/session.c
src/core/util.c
src/core/window.c
src/core/window-props.c
src/core/xprops.c
src/include/all-keybindings.h
src/marco.desktop.in
src/marco.schemas.in.in
src/marco-wm.desktop.in
src/tools/marco-message.c
src/ui/frames.c
View
@@ -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,31 +170,19 @@ 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@
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
View
@@ -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 */
View
@@ -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"
Oops, something went wrong.

0 comments on commit 7f59518

Please sign in to comment.