Merge branch 'upstream-2.25.55' into next-generation

Conflicts:

	configure.in
	src/Makefile.am
	src/core/screen-bindings.h
	src/metacity.schemas.in
This commit is contained in:
Tomas Frydrych 2008-12-18 11:00:19 +00:00
commit 9821453b5f
74 changed files with 25935 additions and 18497 deletions

476
ChangeLog
View File

@ -1,3 +1,479 @@
2008-12-16 Thomas Thurman <tthurman@gnome.org>
* NEWS: 2.25.55 release.
2008-12-15 Erwann Chenede <erwann.chenede@sun.com>
* configure.in: fix build on Solaris. Closes #564123.
2008-12-02 Thomas Thurman <tthurman@gnome.org>
* configure.in: Post-release bump to 2.25.55.
2008-12-02 Thomas Thurman <tthurman@gnome.org>
* NEWS: 2.25.34 release.
2008-12-02 Matt Kraai <kraai@ftbfs.org>
* src/core/iconcache.c: patches to fixes for -Wall. Closes #562939.
2008-12-01 Thomas Thurman <tthurman@gnome.org>
* configure.in: Post-release bump to 2.25.34.
2008-12-01 Thomas Thurman <tthurman@gnome.org>
* NEWS: 2.25.21 release.
2008-12-01 Thomas Thurman <tthurman@gnome.org>
* configure.in: gnome-doc-tools version doesn't need to be so high.
* src/compositor/compositor-xrender.c: disable the entire file if the
compositor is disabled.
* src/core/async-getprop.[ch]: fixes for -Wall
* src/core/iconcache.c: fixes for -Wall
* src/core/testasyncgetprop.c: fixes for -Wall
* src/core/xprops.c: fixes for -Wall
2008-11-26 Thomas Thurman <tthurman@gnome.org>
* tools/announce-wrangler.py: linked language codes to po files
* tools/commit-wrangler.py: print revision url
2008-11-26 Thomas Thurman <tthurman@gnome.org>
* tools/announce-wrangler.py: renamed ini file
* tools/commit-wrangler.py: rewriting in terms of moap
2008-11-25 Thomas Thurman <tthurman@gnome.org>
* configure.in: Post-release bump to 2.25.21.
2008-11-25 Thomas Thurman <tthurman@gnome.org>
* NEWS: 2.25.13 release.
2008-11-26 Thomas Thurman <tthurman@gnome.org>
* tools/announce-wrangler.py (added): script to produce announcements
2008-11-26 Thomas Thurman <tthurman@gnome.org>
* src/core/xprops.c: add casts (#562106)
2008-11-25 Thomas Thurman <tthurman@gnome.org>
* metacity.doap: change to standard description.
2008-11-23 Thomas Thurman <tthurman@gnome.org>
* configure.in: Post-release bump to 2.25.13.
2008-11-23 Thomas Thurman <tthurman@gnome.org>
* NEWS: 2.25.8 release.
2008-11-23 Thomas Thurman <tthurman@gnome.org>
* po/POTFILES.in: add new bindings file
2008-11-23 Daniel Macks <dmacks@netspace.org>
reviewed by: Thomas Thurman
* src/Makefile.am: reorder compiler flags so local includes come last.
Closes #562033.
2008-11-23 Daniel Macks <dmacks@netspace.org>
reviewed by: Thomas Thurman
* configure.in: only accept --enable-compositor if we find we can
actually composite. Closes #560990.
2008-11-23 Thomas Thurman <tthurman@gnome.org>
* src/core/display.c: remove apparently spurious warnings about
operations on window "none"
2008-11-23 Thomas Thurman <tthurman@gnome.org>
* src/core/util.c: Set _POSIX_C_SOURCE to 200112L as it should always
have been, in an attempt to close #561962.
2008-11-22 Thomas Thurman <tthurman@gnome.org>
* configure.in: Set -ansi so people stop complaining about C99.
2008-11-22 Thomas Thurman <tthurman@gnome.org>
* src/core/prefs.c: fix stupid infinite loop when GConf is turned off.
2008-11-22 Thomas Thurman <tthurman@gnome.org>
* src/core/prefs.c: fix two places where there was a warning
if GConf was turned off.
2008-11-22 Thomas Thurman <tthurman@gnome.org>
* src/core/all-keybindings.h: "backward", not "backwards" throughout.
2008-11-20 Thomas Thurman <tthurman@gnome.org>
* configure.in: turned on -Wall and -Werror in order to
trap as many problems as possible.
* src/ui/resizepopup.c: added correct #include.
* src/ui/theme-viewer.c: initialised variable.
* src/core/xprops.c: corrected cast.
* src/core/main.c: added warning if chdir() fails.
* src/core/schema-bindings.c: checking the return
result of fgets().
2008-11-20 Thomas Thurman <tthurman@gnome.org>
Merged screen and window keybinding tables so that
we can use just one file for the both. Also incidentally
closes #528337. Further efficiencies of scale to come.
* src/include/prefs.h: replace META_PREF_*_KEYBINDINGS
with META_PREF_KEYBINDINGS
* src/core/keybindings.c: replace *_bindings with key_bindings
and similar throughout; all window-based functions are now
guaranteed to receive a window so don't need to check for
themselves
(find_handler): moved so it can also be called from
rebuild_binding_table
* src/core/display-private.h: replace *_bindings with key_bindings
* src/core/prefs.c: update_*_binding becomes update_key_binding;
(change_notify): tidy up references to "enormous if statement"
since it's almost entirely gone now
* src/core/all-keybindings.h: new merged version of
screen-bindings.h and window-bindings.h.
2008-11-16 David Trowbridge <trowbrds@gmail.com>
This change adds support for the new _NET_WM_FULLSCREEN_MONITORS
property and client message. This allows client applications to request
that a fullscreen window cover more than one monitor.
* src/include/boxes.h:
* src/core/boxes.c: Add meta_rectangle_union
* src/core/window-private.h:
* src/core/window.c:
(meta_window_new_with_attrs, meta_window_free, set_net_wm_state,
meta_window_update_fullscreen_monitors, meta_window_client_message): Add
MetaWindow property to store fullscreen monitors field, update
_NET_WM_FULLSCREEN_MONITORS property on windows, and handle client
message.
* src/core/atomnames.h: Add _NET_WM_FULLSCREEN_MONITORS atom.
* src/core/constraints.c (setup_constraint_info): If
_NET_WM_FULLSCREEN_MONITORS is interesting, use the data stored in
MetaWindow::fullscreen_monitors to determine the fullscreen area instead
of the basic xinerama_info area.
2008-11-11 Thomas Thurman <tthurman@gnome.org>
Removed deprecated calls. Closes #560445.
* src/core/delete.c: remove deprecated g_strcasecmp.
* src/include/main.h: no actual deprecated call, but
a mention of one which was out of date.
2008-11-11 Maxim Ermilov <zaspire@rambler.ru>
Clean up #includes according to the GNOME Goal.
Closes #560449. Patch is 122467.
* src/core/place.c:
* src/ui/draw-workspace.h:
* src/ui/gradient.h:
* src/ui/metaaccellabel.c:
* src/ui/metaaccellabel.h:
* src/ui/preview-widget.c:
* src/ui/preview-widget.h:
* src/ui/resizepopup.c:
* src/ui/theme.c:
* src/ui/theme.h:
* src/ui/themewidget.h:
2008-11-10 Elijah Newren <newren gmail com>
* src/metacity.schemas.in.in: updated description of
raise_on_click:
http://bugzilla.gnome.org/show_bug.cgi?id=445447#c6
2008-11-08 Thomas Thurman <tthurman@gnome.org>
* configure.in: added dependency on Zenity
* src/core/keybindings.c: remove error_on_generic_command() and
error_on_terminal_command(); rewrite error_on_command
in terms of meta_show_dialog()
* src/core/util.c: add meta_show_dialog() to call Zenity
* src/include/util.h: ditto
2008-11-03 Olav Vitters <olav@bkor.dhs.org>
* src/ui/theme-parser.c: Fix build by readding accidentally removed
'}'.
2008-10-29 Thomas Thurman <tthurman@gnome.org>
* src/ui/theme-parser.c: variable names in messages should be
double-quoted. Closes #558309.
2008-10-28 Thomas Thurman <tthurman@gnome.org>
* src/include/screen-bindings.h: fix accidental name change of
run_command_terminal. Closes #557943.
2008-10-27 Thomas Thurman <tthurman@gnome.org>
* src/core/prefs.c (titlebar_handler, handle_preference_update_enum):
Add initialisation which I missed on the previous checkin. Also
an extra comment.
2008-10-27 Brian Cameron <brian.cameron@sun.com>
Fix some crashes with the new GDM 2.24. Closes #558058.
* src/ui/ui.c (meta_ui_parse_modifier): another null check
* src/core/prefs.c (titlebar_handler, button_layout_handler):
more null checks.
2008-10-26 Thomas Thurman <tthurman@gnome.org>
* src/core/prefs.c (mouse_button_mods_handler): Ignore values
of .../mouse_button_modifier key if the key's missing.
Closes Launchpad bug #258054, Launchpad bug #266929.
2008-10-23 Frederic Peters <fpeters@0d.be>
* doc/creating_themes/C/creating-metacity-themes.xml: added missing @id
on <book> top element.
2008-10-23 Frederic Peters <fpeters@0d.be>
* doc/creating_themes/Makefile.am:
* doc/creating_themes/C/creating_metacity_themes.xml: renamed document
to creating-metacity-themes to match other manuals usage of dashes.
2008-10-23 Thomas Thurman <tthurman@gnome.org>
* configure.in: Post-release bump to 2.25.8.
2008-10-23 Thomas Thurman <tthurman@gnome.org>
* NEWS: 2.25.5 release.
2008-10-23 Thomas Thurman <tthurman@gnome.org>
* src/core/schema-bindings.c: fix stupid thinko which
caused defaults to be incorrect
* src/include/window-bindings.h: "space" needs to be
lowercase
2008-10-23 Thomas Thurman <tthurman@gnome.org>
Support _NET_WM_STATE_STICKY (i.e. allow third-party apps to decide
whether a window is on all workspaces). Bug found by Ka-Hing
Cheung. Closes #557536.
* src/core/window.c (set_net_wm_state): report it
* src/core/window.c (meta_window_client_message): set sticky
if we receive it
* src/core/window-props.c: set sticky if we find it
* src/core/atomnames.h: add _NET_WM_STATE_STICKY
2008-10-22 Thomas Thurman <tthurman@gnome.org>
* src/core/schema-bindings.c: support builds outside tree properly.
* src/Makefile.am: ditto.
* po/POTFILES.skip: ditto.
2008-10-22 Thomas Thurman <tthurman@gnome.org>
* configure.in: Post-release bump to 2.25.5.
2008-10-22 Thomas Thurman <tthurman@gnome.org>
* NEWS: 2.25.3 release.
2008-10-22 Thomas Thurman <tthurman@gnome.org>
* configure.in: bump to 2.25.3 (thought the release script
had already done this)
2008-10-22 Thomas Thurman <tthurman@gnome.org>
Fixes to make distcheck work again.
* src/Makefile.am: include *-binding.h, and make the schema
building work when builddir != srcdir
* po/POTFILES.in (src/core/keybindings.): include *-binding.h
2008-10-22 Götz Waschk <waschk@mandriva.org>
* configure.in: add libm reference. Closes #557357.
2008-10-22 Murray Cumming <murrayc@murrayc.com>
* doc/creating_themes/C/creating_metacity_themes.xml:
Fixed various tags to make this validate.
Bug #557337
2008-10-22 Thomas Thurman <tthurman@gnome.org>
* NEWS: 2.25.2 release.
2008-10-22 Thomas Thurman <tthurman@gnome.org>
* NEWS: 2.25.2 release.
2008-10-22 Thomas Thurman <tthurman@gnome.org>
* NEWS: 2.25.2 release.
2008-10-22 Joe Marcus Clarke <marcus@freebsd.org>
* src/core/main.c (meta_finalize, sigterm_handler): new functions
* src/core/main.c (main): add sigterm_handler in case we receive
a SIGTERM. Closes #553980.
2008-10-22 Matthew Martin <mtt.martin@gmail.com>
* src/core/window.c (meta_window_set_demands_attention): minimised
windows are necessarily obscured. Closes #528927.
2008-10-22 Thomas Thurman <tthurman@gnome.org>
Slight transformation of the x-macros used in keybindings
to make them clearer: write handler names out in full
because the old suffix system was confusing to people
skim-reading, and switched the order of the last two
parameters so more would generally fit on a screen.
* src/core/keybindings.c, src/core/schema-bindings.c
src/core/prefs.c: sympathy changes
* src/core/window-bindings.h, src/core/screen-bindings.h:
transformation as above
2008-10-21 Christian Persch <chpe@gnome.org>
* src/Makefile.am: fix build when schemas are not installed.
Closes #557335.
2008-10-21 Tomas Frydrych <tf@linux.intel.com>
* src/core/screen-bindings.h: Fix off-by-one error.
* src/core/window-bindings.h: Fix off-by-one error.
Closes #557201.
2008-10-18 Thomas Thurman <tthurman@gnome.org>
During a discussion with Rodney Dawes about making life easier
for the translators, he pointed out that the short and long
forms of almost all the keybindings say much the same thing
in different words. I believe this is an unconscionable burden
to place on translators, and have therefore merged the short
and long descriptions into the short description. The long
is now a general explanation of the format, plus possibly a
notice about reversibility. Closes #469361, and should solve
the l10n issue previously mentioned.
* src/core/keybindings.c: reflect changes in *-bindings.h
* src/core/schema-bindings.c: reflect changes in *-bindings.h
* src/core/prefs.c: reflect changes in *-bindings.h
* src/core/window-bindings.h: Add flags field, always the same
currently, so that it's the same as screen-bindings.h.
Also, lose ONLY_BOUND_BY_DEFAULT, since we already had a
rather more elegant way to perform the same effect.
And merge the long and short descriptions.
* src/core/screen-bindings.h (, item): Merge the long and
short descriptions.
2008-10-17 Murray Cumming <murrayc@murrayc.com>
* configure.in: Call GNOME_DOC_INIT() so we can use the gnome-doc-utils
variables in our Makefile.am:
* doc/Makefile.am:
* doc/creating_themes/Makefile.am
* doc/creating_themes/C/creating_metacity_themes.xml:
Added this new DocBook document, converted from the HTML here
http://blogs.gnome.org/metacity/2008/05/30/themes/
This will be installed for yelp and can be translated and hosted on
library.gnome.org.
2008-10-15 Thomas Thurman <tthurman@gnome.org>
Since Patrick Niklaus's checkin of 2008-08-14 dealt with windows with
no icons not using fallback icons, we don't need fallback icons.
* src/ui/theme.h: remove fallback icons from struct.
* src/core/iconcache.c (meta_read_icons): don't look for fallbacks.
* src/*/ui.[ch] (meta_ui_get_fallback_icons): removed
* src/ui/theme-parser.c (typedef, parse_toplevel_element): don't
parse fallback specifications.
2008-10-13 Thomas Thurman <tthurman@gnome.org>
* po/POTFILES.in: add screen-bindings.h
2008-10-13 Thomas Thurman <tthurman@gnome.org>
* po/POTFILES.in: raw schemas is now .in.in
* po/LINGUAS: add Latin
2008-10-12 Thomas Thurman <tthurman@gnome.org>
Make the bindings in src/core/*-bindings.h generate
GConf schemas too. Note that there's an i18n issue
(documented in schema-bindings.c) which will be fixed
next checkin.
* src/core/schema-bindings.c: major fixup to make it
ready for use as part of the actual build process.
* src/Makefile.am: added magic to make it call schema-bindings
after it builds it.
* src/core/window-bindings.h: added comments;
also, window menu was listed variously as alt-Space
and alt-Print; it should have been alt-Space.
* src/metacity.schemas.in.in: renamed from s/\.in$//,
sentinel added for the generated bindings,
warning at the top now untrue, and removed.
2008-10-12 Thomas Thurman <tthurman@gnome.org>
Fix annoying bug where alt-tab and friends would jump
backwards a space on initial movement.
* src/core/screen-bindings.h: although reversed bindings
are necessarily reversible, don't set both bits in the
constant, or when we test for them we'll get confused.
2008-10-12 Thomas Thurman <tthurman@gnome.org>
An attempt to make life a little easier for our beloved translators;
this has the same behaviour as before, but removes over thirty
translation strings.
* src/core/session.c (start_element_handler): all "attribute not found
on element" strings are identical
* src/ui/theme-parser.c (locate_attributes): allow attribute names to
be preceded with "!" (in the code) to show they're required.
(parse_aspect_ratio, parse_distance, parse_toplevel_element,
parse_style_element, parse_gradient_element, static, parse_border,
parse_style_set_element, parse_draw_op_element): use the new "!"
prefix for locate_attributes(), or in some cases just the identical
constant, for generating this error.
* src/ui/theme.c (check_state, meta_theme_validate): add
translator comments
* src/ui/resizepopup.c (update_size_window): add
translator comments
2008-10-06 William Lachance <wrlach@gmail.com>
Pass modified mouse button events down to panel windows

131
NEWS
View File

@ -1,3 +1,134 @@
2.25.55
=======
Thanks to Erwann Chenede for improvements in this version.
- Fix build on Solaris (Erwann) (#564123)
Translations
Mattias Põldaru (et), Luca Ferretti (it)
2.25.34
=======
Thanks to Matt Kraai for improvements in this version.
- Fixes to Thomas's earlier fixes (Matt) (#562939)
Translations
None
2.25.21
=======
Thanks to Thomas Thurman for improvements in this version.
- Fixes to allow building without compositor again (Thomas)
- Fixes for -Wall problems (Thomas)
- Various tool updates (Thomas)
Translations: none
2.25.13
=======
Thanks to Thomas Thurman for improvements in this version.
- Add casts to fix failure to build from source on 64bit hosts (Thomas) (#562106)
- Added script to produce annoucements (Thomas)
Translations
Jorge González (es)
2.25.8
======
Thanks to Brian Cameron, Maxim Ermilov, Daniel Macks, Elijah Newren, Frederic
Peters, Thomas Thurman, David Trowbridge, and Olav Vitters for improvements in
this version.
- Reorder compiler flags (Daniel) (#562033)
- Fix compositor switch (Daniel) (#560990)
- Remove spurious warnings about operations on window "none" (Thomas)
- Fix _POSIX_C_SOURCE which was breaking OS X builds (Thomas) (#561962)
- -Werror -Wall and -ansi are now standard compile flags (Thomas)
- Merge screen and window keybindings files; fix minor alt-tab bug
in the process (Thomas) (#528337)
- Support _NET_WM_FULLSCREEN_MONITORS (David)
- Remove some deprecated calls (Thomas) (#560445)
- Clean up #includes (Maxim) (#560449)
- Update description of raise_on_click (Elijah)
- First dialogue delegated to zenity (Thomas)
- fix theme-parser typo (Olav)
- double-quote variable names in messages (Thomas) (#558309)
- fix accidental renaming of run_command_terminal (Thomas) (#557943)
- some null checks; problems exposed by new GDM (Brian) (#558058)
- ignore mouse button modifier if it's missing (Thomas) (Launchpad 258054, Launchpad 266929)
- fix docbook markup (Frederic)
Translations
Astur (ast), Jorge González (es), Thomas Thurman (la), Leonardo Ferreira
Fontenelle (pt_BR), Daniel Nylander (sv)
2.25.5
======
Thanks to Thomas Thurman for improvements in this version.
- Allow third-party apps to decide whether a window appears
on all workspaces (Thomas) (#557536)
- Fixed keybindings script (again) (Thomas)
Translations
David Planella (ca), Robert Millan (ca@valencia)
2.25.3
======
Brown paper bag release which fixes numerous build problems from last night's
release of 2.25.2. Apologies.
Thanks to Murray Cumming, Thomas Thurman, and Götz Waschk for improvements
in this version.
- Fix distcheck (Thomas) (#557356)
- add libm reference (Götz) (#557357)
- fix docbook tags (Murray) (#557337)
Translations
Yavor Doganov (bg), David Planella (ca), Robert Millan (ca@valencia), Kenneth
Nielsen (da), Hendrik Richter (de), Ivar Smolin (et), Claude Paroz (fr), Seán de
Búrca (ga), Launchpad Translations Administrators (hr), Gabor Kelemen (hu),
Thomas Thurman (la), Žygimantas Beručka (lt), Kjartan Maraas (nb), Duarte
Loreto (pt), Djavan Fagundes (pt_BR), Mugurel Tudor (ro), Pavol Šimo (sk),
Laurent Dhima (sq), Горан Ракић (sr), Theppitak Karoonboonyanan (th),
Funda Wang (zh_CN)
2.25.2
======
Thanks to Joe Marcus Clarke, Murray Cumming, Tomas Frydrych, William Lachance,
Matthew Martin, Christian Persch, Thomas Thurman, and Vincent Untz for
improvements in this version.
- Add handler for SIGTERM (Joe) (#553980)
- Minimised windows are necessarily obscured (Matthew) (#528927)
- Build fixes with the above (Christian, Tomas, Thomas) (#557335)
(#557201) (#469361)
- Changed keybindings to be in a single place (Thomas) (#469361)
- Add new document about themes (Murray)
- Remove obsolete support for fallback icons (Thomas)
- Pass modified mouse events to panels (William) (#554428)
- Change where desktop files should go (Vincent) (#549479)
Translations
Yavor Doganov (bg), David Planella (ca), Kenneth Nielsen (da), Hendrik
Richter (de), Ivar Smolin (et), Claude Paroz (fr), Seán de Búrca (ga), Launchpad
Translations Administrators (hr), Gabor Kelemen (hu), Thomas Thurman (la),
Žygimantas Beručka (lt), Kjartan Maraas (nb), Duarte Loreto (pt), Djavan
Fagundes (pt_BR), Mugurel Tudor (ro), Pavol Šimo (sk), Laurent Dhima (sq),
Горан Ракић (sr), Theppitak Karoonboonyanan (th), Funda Wang (zh_CN)
2.25.1
======

View File

@ -4,7 +4,7 @@ m4_define([metacity_major_version], [2])
m4_define([metacity_minor_version], [25])
# 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([metacity_micro_version], [2])
m4_define([metacity_micro_version], [55])
m4_define([metacity_version],
[metacity_major_version.metacity_minor_version.metacity_micro_version])
@ -231,17 +231,8 @@ fi
have_xrender=no
XCOMPOSITE_VERSION=0.2
AC_MSG_CHECKING([Xcomposite >= $XCOMPOSITE_VERSION])
if $PKG_CONFIG --atleast-version $XCOMPOSITE_VERSION xcomposite; then
have_xcomposite=yes
else
have_xcomposite=no
fi
AC_MSG_RESULT($have_xcomposite)
if test x$enable_compositor = xyes; then
have_xcomposite=yes
echo "CompositeExt support forced on"
elif test x$enable_compositor = xauto; then
echo "Building compositing manager by default now."
have_xcomposite=yes
@ -262,9 +253,18 @@ fi
AM_CONDITIONAL(WITH_CLUTTER, test "$have_clutter" = "yes")
if test x$have_xcomposite = xyes; then
echo "Building with CompositeExt"
AC_MSG_CHECKING([Xcomposite >= $XCOMPOSITE_VERSION])
if $PKG_CONFIG --atleast-version $XCOMPOSITE_VERSION xcomposite; then
AC_MSG_RESULT([yes])
else
AC_MSG_ERROR([no. Use --disable-compositor to disable.])
fi
fi
if test x$have_xcomposite = xyes; then
METACITY_PC_MODULES="$METACITY_PC_MODULES xcomposite >= $XCOMPOSITE_VERSION xfixes xrender xdamage"
AC_DEFINE(HAVE_COMPOSITE_EXTENSIONS, , [Building with compositing manager support])
AC_DEFINE(HAVE_COMPOSITE_EXTENSIONS, 1, [Building with compositing manager support])
echo "Building with compositing manager"
## force on render also
have_xrender=yes
@ -466,7 +466,7 @@ if test "x$found_xsync" = "xyes"; then
AC_DEFINE(HAVE_XSYNC, , [Have the Xsync extension library])
fi
METACITY_LIBS="$METACITY_LIBS $XSYNC_LIBS $RANDR_LIBS $SHAPE_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
METACITY_LIBS="$METACITY_LIBS $XSYNC_LIBS $RANDR_LIBS $SHAPE_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS -lm"
METACITY_MESSAGE_LIBS="$METACITY_MESSAGE_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
METACITY_WINDOW_DEMO_LIBS="$METACITY_WINDOW_DEMO_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
METACITY_PROPS_LIBS="$METACITY_PROPS_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
@ -524,16 +524,30 @@ else
GCONF_SCHEMAS_INSTALL_FALSE=
fi
AC_PATH_PROG(ZENITY, zenity, no)
if test x"$ZENITY" = xno; then
AC_MSG_ERROR([zenity not found in your path - needed for dialogs])
fi
AC_ARG_ENABLE(debug,
[ --enable-debug enable debugging],,
enable_debug=no)
if test "x$enable_debug" = "xyes"; then
CFLAGS="$CFLAGS -g -O -Wall"
CFLAGS="$CFLAGS -g -O"
fi
# Warnings are there for a reason
if test "x$GCC" = "xyes"; then
CFLAGS="$CFLAGS -Wall -Werror -ansi"
fi
# Use gnome-doc-utils:
GNOME_DOC_INIT([0.8.0])
AC_CONFIG_FILES([
Makefile
doc/Makefile
doc/creating_themes/Makefile
doc/man/Makefile
src/Makefile
src/wm-tester/Makefile

View File

@ -1,4 +1,4 @@
SUBDIRS = man
SUBDIRS = man creating_themes
EXTRA_DIST=theme-format.txt metacity-theme.dtd dialogs.txt code-overview.txt \
how-to-get-focus-right.txt

View File

@ -0,0 +1,286 @@
<?xml version="1.0"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://docbook.org/docbook/xml/4.5/docbookx.dtd" [
]>
<book id="index">
<bookinfo>
<title>Understanding Metacity Themes</title>
<authorgroup>
<author>
<firstname>Thomas</firstname>
<surname>Thurman</surname>
</author>
</authorgroup>
<abstract>
<para>
We very much appreciate any reports of inaccuracies or other errors in
this document. Contributions are also most welcome. Post your
suggestions, critiques or addenda to the <ulink
url="mailto:tthurman@gnome.org">team</ulink>.</para>
</abstract>
<copyright>
<year>2008</year>
<holder>Thomas Thurman</holder>
</copyright>
<legalnotice>
<para>
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2
or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
You may obtain a copy of the GNU Free Documentation License from the Free Software Foundation by visiting their Web site or by writing to: Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
</para>
</legalnotice>
</bookinfo>
<chapter id="sec-introduction">
<title>Introduction</title>
<para>This is an article about how to theme Metacity. It is a work in progress, and I have had to dig deeply to find some answers; I may well have made mistakes and I welcome corrections and suggestions.</para>
<para>GNOME lets you theme a bunch of different things, but we're only talking about <literal>window border</literal> themes here, which some people call Metacity themes; <ulink url="http://en.wikipedia.org/wiki/Metacity#Themes">Wikipedia begins a sentence</ulink> with &quot;Despite the incomplete state of Metacity theme development documentation&quot;, and though there <emphasis>is</emphasis> <ulink url="http://svn.gnome.org/viewvc/metacity/trunk/doc/theme-format.txt?view=markup">documentation in the source</ulink>, apparently not many people find it, and it's written more for programmers than theme designers. Glynn Foster also wrote <ulink url="http://developer.gnome.org/doc/tutorials/metacity/metacity-themes.html">a very good introduction to Metacity themes</ulink> (<ulink url="http://home.arcor.de/rybaczyk/documents/tutorials/metacity/metacity-themes.de.html">[de]</ulink>) six years ago, but things have changed a little since then. <ulink url="http://lists.freedesktop.org/archives/compiz/2006-September/000445.html">Metacity themes can also be used by Compiz</ulink>, and perhaps by other window managers for all I know.</para>
<para>So, a Metacity theme is a set of instructions about how to &quot;decorate&quot; (draw the borders around) a window. Presumably you don't want to style all windows identically, so the format lets you specify details for different kinds of window:</para>
<para>
<variablelist>
<varlistentry>
<term>state:</term><listitem><para>Every window must be in exactly one of these states: <literal>normal</literal>, <literal>dialog</literal>, <literal>modal dialog</literal> (i.e. a dialogue which means you can't interact with the rest of the program while it's up), <literal>menu</literal> (torn off from the main application, not that people do that much these days), <literal>utility</literal> (that is, palettes and toolboxes and things), and <literal>border</literal>. X also allows a window to explicitly ask to be undecorated, but of course we don't provide for those in a list of decoration instructions.</para></listitem>
</varlistentry>
<varlistentry>
<term>focused</term><listitem><para>Every window is either the active window (which X people call &quot;focused&quot;), or it isn't.</para></listitem>
</varlistentry>
<varlistentry>
<term>maximized</term><listitem><para>Every window is either (fully) maximised (horizontal and vertical only don't count), or it isn't.</para></listitem>
</varlistentry>
<varlistentry>
<term>shaded</term><listitem><para>Every window is either rolled up to show just its titlebar (which techies call &quot;shaded&quot; for some reason I can't fathom), or it isn't.</para></listitem>
</varlistentry>
</variablelist>
</para>
<para>
<itemizedlist>
<listitem><para><emphasis>If a window is not fully maximised and not shaded,</emphasis> it either allows horizontal resizing, or it doesn't.</para></listitem>
<listitem><para><emphasis>If a window is not fully maximised and not shaded,</emphasis> it either allows vertical resizing, or it doesn't.</para></listitem>
</itemizedlist>
</para>
</chapter>
<chapter>
<title>What's in the file</title>
<para>The files must be called either</para>
<para>
<itemizedlist>
<listitem><para>~/.themes/<varname>N</varname>/metacity-1/metacity-theme-<varname>V</varname>.xml
for a theme used only by you, or</para></listitem>
<listitem><para>/usr/share/themes/<varname>N</varname>/metacity-1/metacity-theme-<varname>V</varname>.xml
for a theme installed for all users.</para></listitem>
</itemizedlist>
</para>
<para>where <varname>N</varname> is the name of the theme and <varname>V</varname> is the version of the format. Version 2, <ulink url="http://svn.gnome.org/viewvc/metacity?view=revision&amp;revision=2973">introduced in October 2006</ulink>, adds a few extra features, but it's rarely used. Version 1 is the original format. The formats are fixed once they're stable for both backwards and forwards compatibility; <ulink url="http://bugzilla.gnome.org/show_bug.cgi?id=482165">new features</ulink> can't be added without introducing a new version number, which is why improvements come out rarely and in large clumps. <literal>metacity-1</literal> in the names is a fossil and doesn't mean version 1 of anything.</para>
<para>The metacity-theme-V.xml files are <ulink url="http://blogs.gnome.org/tthurman/2008/02/14/gmarkup/">GMarkup files</ulink>, which are very similar to XML. For now, you actually have to write these in a text editor or something; you can either start with a blank page, or modify a theme someone else has made. (I am thinking of writing a general theme editor program, but that'll have to wait until I've reduced Metacity's open bug queue a little.) If you want to see a fully-fledged one, you can look at <ulink url="http://svn.gnome.org/viewvc/metacity/trunk/src/themes/Atlanta/metacity-theme-1.xml?view=markup">the current version of &quot;Atlanta&quot;</ulink>, one of the simplest themes, but even that is quite complicated-looking at first.</para>
<para>So, let's talk about what actually goes inside the files. As in any XML file, &lt;!-<!-- x -->- &#8230; <!-- x -->&gt; are comments. At its most basic, it would go:</para>
<para>
<programlisting>
&lt;metacity_theme&gt;
&lt;!-<!-- x -->- Helper stuff: -<!-- x -->-&gt;
&lt;info &#8230;&gt; &lt;!-<!-- x -->- to be explained -<!-- x -->-&gt;
&lt;constant &#8230;&gt; &lt;!-<!-- x -->- maybe; to be explained -<!-- x -->-&gt;
&lt;draw_ops &#8230;&gt; &lt;!-<!-- x -->- maybe; to be explained -<!-- x -->-&gt;
&lt;!-<!-- x -->- Things we build the top level onto: -<!-- x -->-&gt;
&lt;frame_geometry &#8230;&gt; &lt;!-<!-- x -->- to be explained -<!-- x -->-&gt;
&lt;frame_style &#8230;&gt; &lt;!-<!-- x -->- to be explained -<!-- x -->-&gt;
&lt;frame_style_set &#8230;&gt; &lt;!-<!-- x -->- to be explained -<!-- x -->-&gt;
&lt;!-<!-- x -->- And the top level: -<!-- x -->-&gt;
&lt;window type=&quot;normal&quot; style_set=&quot;&#8230;&quot; /&gt;
&lt;window type=&quot;dialog&quot; style_set=&quot;&#8230;&quot; /&gt;
&lt;window type=&quot;modal_dialog&quot; style_set=&quot;&#8230;&quot; /&gt;
&lt;window type=&quot;menu&quot; style_set=&quot;&#8230;&quot; /&gt;
&lt;window type=&quot;utility&quot; style_set=&quot;&#8230;&quot; /&gt;
&lt;window type=&quot;border&quot; style_set=&quot;&#8230;&quot; /&gt;
&lt;/metacity_theme&gt;
</programlisting>
</para>
</chapter>
<chapter>
<title>Matching windows</title>
<para>
<variablelist>
<varlistentry>
<term>window</term><listitem><para>You see that at the top level we have a list of &lt;window&gt; tags, one for each window state we discussed above. The style_set argument of each of these gives the name of a frame_style_set.</para></listitem>
</varlistentry>
<varlistentry>
<term>frame_style_set:</term><listitem><para>tells Metacity how to draw windows according to whether they're focused or not, maximised or not, shaded or not, and allowing resizing vertically, horizontally, both, or neither. It looks like this:</para></listitem>
</varlistentry>
</variablelist>
</para>
<para>
<programlisting>
&lt;frame_style_set&gt;
&lt;frame focus=&quot;F&quot; state=&quot;S&quot; resize=&quot;R&quot; style=&quot;N&quot;/&gt;
&lt;frame&#8230; /&gt;
&#8230;
&lt;/frame_style_set&gt;
</programlisting>
</para>
<para>where:</para>
<para>
<variablelist>
<varlistentry>
<term>F</term><listitem><para>is yes for focused, no for unfocused.</para></listitem>
</varlistentry>
<varlistentry>
<term>S</term><listitem><para>combines the shaded and maximized flags: normal, maximized, shaded, or maximized_and_shaded.</para></listitem>
</varlistentry>
<varlistentry>
<term>R</term><listitem><para>represents resize permissions that the window gives us: none, vertical, horizontal, or both. Frame settings for maximised windows, which can't be resized, don't have this attribute.</para></listitem>
</varlistentry>
</variablelist>
</para>
<para>
<varname>N</varname> is the name of a <literal>frame_style</literal> to apply to a window which has these attributes.</para>
<para>A <literal>frame_style_set</literal> tag may also have a &quot;parent&quot; tag, which should be the name of another <literal>frame_style_set</literal>. This means that if Metacity wants to know about a kind of window which that <literal>frame_style_set</literal> doesn't describe, it should look in the parent. Most of the more complicated tags in Metacity theme files also have a &quot;parent&quot; attribute which work the same way. This is particularly useful because, taken together, all the <literal>frame_style_set</literal>s in a theme file must be capable of matching every possible kind of window; if a window turns up that they can't match, there will be an error at runtime.</para>
<para>Let's recap what we've seen so far. The combination of a <literal>window</literal>, which matches a window's state (normal, dialog, and so forth), with an entry in the corresponding <literal>frame_style_set</literal>, which matches its focus, shadedness, maximisedness, and resize permissions where relevant, will allow you to make a list of rules to match any window against. The next piece of this puzzle lets you specify what Metacity should do with such windows once it's matched them.</para>
</chapter>
<chapter>
<title>Actually drawing stuff</title>
<para><literal>frame_style:</literal> This is probably the most complicated part of the whole system. A <literal>frame_style</literal> a series of <emphasis><literal>piece</literal></emphasis>s and <emphasis><literal>button</literal></emphasis>s. It looks like this:</para>
<para>
<programlisting>
&lt;frame_style name=&quot;&#8230;&quot; geometry=&quot;G&quot;&gt;
&lt;piece position=&quot;P&quot;&gt;
&lt;draw_ops&gt;
&lt;/draw_ops&gt;
&lt;/piece&gt;
&#8230;
&lt;button function=&quot;F&quot; state=&quot;S&quot; draw_ops=&quot;D&quot;/&gt;
&lt;draw_ops&gt;
&lt;/draw_ops&gt;
&lt;/button&gt;
&#8230;
&lt;/frame_style&gt;
</programlisting>
</para>
<para>The <literal>pieces</literal> are pieces of the window frame. When Metacity draws a window frame, it renders its various pieces always in the same order. The bolded parts are all the possible values of P:</para>
<para>
<itemizedlist>
<listitem><para>the <literal>entire_background</literal>, covering the whole frame</para></listitem>
<listitem><para>the <literal>titlebar</literal>, covering the entire background of the titlebar</para></listitem>
<listitem><para>the <literal>titlebar_middle</literal>, the part of the titlebar that doesn't touch its edges</para></listitem>
<listitem><para>the <literal>left_titlebar_edge</literal>, <literal>right_titlebar_edge</literal>, <literal>top_titlebar_edge</literal>, and <literal>bottom_titlebar_edge</literal></para></listitem>
<listitem><para>the <literal>title</literal>, just exactly that area which is covered by the text on the titlebar</para></listitem>
<listitem><para>the <literal>left_edge</literal>, <literal>right_edge</literal>, and <literal>bottom_edge</literal> of the frame (yes, there is no top_edge: it's identical to top_titlebar_edge, isn't it?)</para></listitem>
<listitem><para>the <literal>overlay</literal>, which covers everything&#8211; the same as entire_background, but done last instead of first.</para></listitem>
</itemizedlist>
</para>
<para><emphasis>What</emphasis> Metacity draws in these pieces is decided by the theme. If a <literal>frame_style</literal> or its parents don't specify a particular piece, nothing will be drawn for that piece. You have two ways to specify what to draw: one is that the <literal>piece</literal> tag can have a <literal>draw_ops</literal> tag inside it which lists a sequence of drawing operations in Metacity's custom format. <ulink url="http://bugzilla.gnome.org/show_bug.cgi?id=107012">You might ask why we don't use SVG</ulink>; one answer is that SVG support wasn't very strong when this format was designed, and another answer is that these days you can use SVG all you like; just include it as an image and Metacity will know what to do.</para>
<para>An alternative to including a draw_ops tag inside a piece tag is to add a draw_ops attribute to the piece tag. Then you can add a draw_ops tag at top level (inside the metacity_theme tag) with a name attribute, and Metacity will use that. This is useful if you use similar draw_ops over and over.</para>
<para>I'm not going to document draw_ops at present, because this is already very long. I will write it up later and link it from here.</para>
<para>The <literal>button</literal> tag tells Metacity how, but not where, to draw buttons. Buttons are drawn after all the pieces are finished, and the way to draw them is also given using draw_ops. You ought to provide buttons for all the possible kinds of button; if you don't give one it won't be drawn, which is unfortunate for the user who wants to use it:</para>
<para>
<itemizedlist>
<listitem><para><literal>left_left_background</literal>, <literal>left_middle_background</literal>, and <literal>left_right_background</literal> don't represent buttons as such, but the background behind them, assuming there can be at most three buttons on the left. These days there can be more, so the extra ones also use left_middle_background.</para></listitem>
<listitem><para><literal>right_left_background</literal>, <literal>right_middle_background</literal>, and <literal>right_right_background</literal> similarly.</para></listitem>
<listitem><para><literal>close</literal>, <literal>minimize</literal>, <literal>maximize</literal> are the obvious original three buttons.</para></listitem>
<listitem><para><literal>menu</literal> is the menu button you can click to get a list of actions you can perform on the window.</para></listitem>
<listitem><para><literal>shade</literal>, <literal>above</literal>, <literal>stick</literal> are similar to the original buttons but only allowed in version 2</para></listitem>
<listitem><para><literal>unshade</literal>, <literal>unabove</literal>, <literal>unstick</literal> are the toggled versions of these buttons. Again, version 2 only.</para></listitem>
</itemizedlist>
</para>
<para>The reason there are toggled versions of shade, above, and stick, and not maximize, is that by the time you get this far you've probably already decided whether you're drawing a maximised window. So if you <emphasis>are</emphasis> drawing a maximised window, you can make the button called &quot;maximize&quot; look how you want the restore button to be; otherwise, make it look like you want the maximise button to be.</para>
<para>For each button tag you should also set a &quot;state&quot; attribute; this time the state is either <literal>normal</literal> (the way you see it most of the time), <literal>pressed</literal>, or <literal>prelight</literal> (this makes the buttons subtly light up when you hover over them). You only really need &quot;normal&quot;, but the others are good to have too.</para>
<para>The &quot;geometry&quot; attribute of a <literal>frame_style</literal> tag is the name of a&#8230;</para>
</chapter>
<chapter>
<title>Geometry</title>
<para>The <literal>geometry</literal> tag defines the sizes of things around the window. It is important, but not easy to explain, and again this file has gone on too long. I'll write it up later.</para>
</chapter>
<chapter>
<title>Other things which lie around a file</title>
<para>The most important other thing in a theme file is the metadata held in the <literal>info</literal> tag. This contains a set of tags each of which contains some text explaining something about the theme itself, in a sort of <ulink url="http://en.wikipedia.org/wiki/Dublin_Core">Dublin Core</ulink> sort of way. (Next time around, we should probably use the actual Dublin Core.) The tags are <literal>name</literal>, <literal>author</literal>, <literal>copyright</literal>, <literal>date</literal>, and <literal>description</literal>.</para>
<para>Version 1 of the format had a <literal>menu_icon</literal> tag at top level, which let themes specify the icons beside options in the menu you get from the menu icon. This has become redundant; the icons are taken from the icon theme! The tag can still be used in all formats, but does nothing and is deprecated.</para>
<para>Version 2 of the format has a <literal>fallback</literal> tag at top level, which let the theme specify what icon a window should be considered to have if it doesn't provide an icon of its own. This should also be taken from the icon theme, <ulink url="http://bugzilla.gnome.org/show_bug.cgi?id=524343">if anyone fancies fixing it</ulink>, and the tag should also then be deprecated. It shouldn't be hard.</para>
</chapter>
<chapter>
<title>When you're working on a theme</title>
<para>When you're editing a theme, you can view it without using it on the whole desktop using
<command>metacity-theme-viewer YourThemeName</command></para>
<para>and view it on the whole desktop using
<command>gconftool -<!-- x -->-type=string -<!-- x -->-set /apps/metacity/general/theme YourThemeName</command></para>
<para>Whenever you change the selected theme in GConf, Metacity will load the newly-chosen theme. This is how control-center does it. But when you change a theme, as you're working on it, you might want to ask Metacity to reload the theme which is currently used on the whole desktop to reflect your changes. You can do this using the little-known <command>metacity-message</command> program, with the command <literal>metacity-message reload-theme</literal>. This works by sending the ClientMessage <literal>_METACITY_RELOAD_THEME_MESSAGE</literal> to the root window, in case you're interested.</para>
<para>Once you're done with your theme, consider submitting it to <ulink url="http://art.gnome.org/themes/metacity/">the art.gnome.org site</ulink>, or <ulink url="http://www.gnome-look.org/index.php?xcontentmode=101">the gnome-look site</ulink>.</para>
</chapter>
<chapter>
<title>The future</title>
<para>Please feel free to link to this so people don't have to keep asking the basic questions and can start asking the deeper ones. One of the important deeper ones is: where should we go in the future? Since this format is becoming something of a de facto standard between window managers, should we set up some kind of freedesktop.org standards discussion? Would it be useful to spin off Metacity's theme parsing code into a separate, LGPL-licensed library so that other applications could use it more easily?</para>
<para>What would a version 3 of this format look like? Could we simplify the window / frame_style_set system? (I can imagine abolishing both, and being able to write <literal>&lt;frame_style for=&quot;normal+unfocused+maximized&quot;&gt;&#8230;</literal> and having Metacity assume it applied to all resize permissions and shadednesses.) Maybe we should try to do everything with SVG we can? Getting more wild and handwavey, is it worth keeping XML-like? Maybe if other window managers were dealing with the files, .ini-style files would be more universally useful? Or perhaps not. And then of course we need a decent graphical editor for it. I have a few ideas, but if anyone fancies jumping in...</para>
</chapter>
</book>

View File

@ -0,0 +1,24 @@
### This part of Makefile.am can be customized by you.
# gnome-doc-utils standard variables:
include $(top_srcdir)/gnome-doc-utils.make
dist-hook: doc-dist-hook
# The name of the directory in /usr/share/gnome/help/,
# and the name of the main .xml file:
DOC_MODULE = creating-metacity-themes
# The names of any files included via entity declarations.
DOC_ENTITIES =
# The names of any files included by xincluded (preferred):
DOC_INCLUDES =
# The names of any pictures:
DOC_FIGURES =
# The names of any locales for which documentation translations exist:
DOC_LINGUAS =

View File

@ -17,7 +17,7 @@
<created>2001-05-30</created>
<shortdesc xml:lang="en">
A simple GTK+ window manager that tries not to get in your way.
Metacity is a simple compositing window manager that integrates nicely with GNOME 2.
</shortdesc>
<description xml:lang="en">
A window manager for GNOME, with a focus on simplicity and usability

View File

@ -1,3 +1,89 @@
2008-12-12 Luca Ferretti <elle.uca@libero.it>
* it.po: Imported updated translation from gnome-2-24 branch.
2008-12-08 Priit Laes <plaes at svn dot gnome dot org>
* et.po: Translation updated by Mattias Põldaru
2008-11-23 Jorge Gonzalez <jorgegonz@svn.gnome.org>
* es.po: Updated Spanish translation
2008-11-14 Thomas Thurman <tthurman@gnome.org>
* la.po: Updated Latin translation
2008-11-14 Jorge Gonzalez <jorgegonz@svn.gnome.org>
* es.po: Updated Spanish translation
2008-11-09 Jorge Gonzalez <jorgegonz@svn.gnome.org>
* es.po: Updated Spanish translation
2008-11-08 Jorge Gonzalez <jorgegonz@svn.gnome.org>
* es.po: Updated Spanish translation
2008-11-03 Leonardo Ferreira Fontenelle <leonardof@gnome.org>
* pt_BR.po: Merged from branch gnome-2-24. Minor capitalization fix in
the Brazilian Portuguese translation.
2008-10-27 Og Maciel <ogmaciel@gnome.org>
* pt_BR.po: Updated Brazilian Portuguese translation by
Og Maciel.
2008-10-27 Daniel Nylander <po@danielnylander.se>
* sv.po: Updated Swedish translation.
2008-10-23 Gil Forcada <gforcada@gnome.org>
* LINGUAS: Added ast.
* ast.po: Added Asturian translation on behalf of Mikel González.
2008-10-22 Jordi Mallach <jordi@sindominio.net>
* ca@valencia.po: New Valencian (Southern Catalan) translation
based on the Catalan file.
* LINGUAS: Added Valencian (Southern Catalan) (ca@valencia).
2008-10-22 Jordi Mallach <jordi@sindominio.net>
* ca.po: Apply Catalan fixes from Robert Millan.
2008-10-17 Thomas Thurman <tthurman@gnome.org>
* la.po: Updated Latin translation.
2008-10-16 Marcel Telka <marcel@telka.sk>
* sk.po: Updated Slovak translation by Pavol Šimo.
2008-10-15 Thomas Thurman <tthurman@gnome.org>
* la.po: Updated Latin translation.
2008-10-15 Thomas Thurman <tthurman@gnome.org>
* la.po: Updated Latin translation.
2008-10-12 Kjartan Maraas <kmaraas@gnome.org>
* nb.po: Updated Norwegian bokmål translation.
2008-10-12 Theppitak Karoonboonyanan <thep@linux.thai.net>
* th.po: Updated Thai translation (merged from gnome-2-24 branch).
2008-10-11 Claude Paroz <claude@2xlibre.net>
* fr.po: Fixed minimize/unmaximize French translation (sync with 2.24) and
complete some other translations.
2008-09-30 Og Maciel <ogmaciel@gnome.org>
* pt_BR.po: Updated Brazilian Portuguese translation by Vladimir Melo.

View File

@ -3,6 +3,7 @@
am
ar
as
ast
az
be
be@latin
@ -11,6 +12,7 @@ bn
bn_IN
bs
ca
ca@valencia
cs
cy
da
@ -41,6 +43,7 @@ ka
kn
ko
ku
la
lt
lv
mg

View File

@ -13,12 +13,12 @@ src/core/screen.c
src/core/schema-bindings.c
src/core/session.c
src/core/util.c
src/core/window-bindings.h
src/core/window.c
src/core/window-props.c
src/core/xprops.c
src/include/all-keybindings.h
src/metacity.desktop.in
src/metacity.schemas.in
src/metacity.schemas.in.in
src/metacity-wm.desktop.in
src/tools/metacity-message.c
src/ui/frames.c

2
po/POTFILES.skip Normal file
View File

@ -0,0 +1,2 @@
src/metacity.schemas.in

2160
po/ast.po Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,13 +1,14 @@
# Catalan translation of Metacity.
# Copyright © 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
# Copyright © 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This file is distributed under the same license as the metacity package.
# Softcatala <info@softcatala.org>, 2002.
# Jesús Moreno <jmmolas@wanadoo.es>, 2002.
# Jordi Mallach <jordi@sindominio.net>, 2003, 2004, 2005, 2006, 2007.
# Jordi Mallach <jordi@sindominio.net>, 2003, 2004, 2005, 2006, 2007, 2008.
# David Planella <david.planella@gmail.com>, 2008.
#
msgid ""
msgstr ""
"Project-Id-Version: metacity 2.18\n"
"Project-Id-Version: metacity 2.24\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2008-09-27 18:26+0200\n"
"PO-Revision-Date: 2008-09-27 18:27+0200\n"
@ -1229,7 +1230,7 @@ msgstr "Canvia a l'espai de treball sota aquest"
#: ../src/metacity.schemas.in.h:97
msgid "Switch to workspace on the left"
msgstr "Canvia a l'espai de treball de la esquerra"
msgstr "Canvia a l'espai de treball de l'esquerra"
#: ../src/metacity.schemas.in.h:98
msgid "Switch to workspace on the right"
@ -2890,7 +2891,7 @@ msgid ""
"These windows do not support \"save current setup\" and will have to be "
"restarted manually next time you log in."
msgstr ""
"Aquestes finestres no suporten «desa la configuració actual» i es tindràn que "
"Aquestes finestres no suporten «desa la configuració actual» i s'hauran de "
"reiniciar manualment la pròxima vegada que entreu."
#: ../src/ui/metacity-dialog.c:310

4079
po/ca@valencia.po Normal file

File diff suppressed because it is too large Load Diff

4468
po/es.po

File diff suppressed because it is too large Load Diff

3464
po/et.po

File diff suppressed because it is too large Load Diff

1219
po/fr.po

File diff suppressed because it is too large Load Diff

4434
po/it.po

File diff suppressed because it is too large Load Diff

2182
po/la.po Normal file

File diff suppressed because it is too large Load Diff

2341
po/nb.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

5720
po/sk.po

File diff suppressed because it is too large Load Diff

2325
po/sv.po

File diff suppressed because it is too large Load Diff

266
po/th.po
View File

@ -11,8 +11,8 @@ msgid ""
msgstr ""
"Project-Id-Version: metacity\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2008-09-21 16:07+0700\n"
"PO-Revision-Date: 2008-09-21 16:35+0700\n"
"POT-Creation-Date: 2008-10-12 09:49+0700\n"
"PO-Revision-Date: 2008-10-12 11:50+0700\n"
"Last-Translator: Theppitak Karoonboonyanan <thep@linux.thai.net>\n"
"Language-Team: Thai <thai-l10n@googlegroups.com>\n"
"MIME-Version: 1.0\n"
@ -92,24 +92,24 @@ msgstr ""
msgid "Fatal IO error %d (%s) on display '%s'.\n"
msgstr "เกิดข้อผิดพลาดร้ายแรง %d (%s) ในการอ่านเขียนข้อมูลจากดิสเพลย์'%s'\n"
#: ../src/core/keybindings.c:924
#: ../src/core/keybindings.c:754
#, c-format
msgid ""
"Some other program is already using the key %s with modifiers %x as a "
"binding\n"
msgstr "โปรแกรมอื่นกำลังใช้ปุ่ม %s ร่วมกับปุ่ม %x เป็นปุ่มลัดอยู่แล้ว\n"
#: ../src/core/keybindings.c:2563
#: ../src/core/keybindings.c:2398
#, c-format
msgid "Error launching metacity-dialog to print an error about a command: %s\n"
msgstr "ไม่สามารถเปิดกล่องโต้ตอบ เพื่อแสดงข้อผิดพลาดของคำสั่ง: %s\n"
#: ../src/core/keybindings.c:2668
#: ../src/core/keybindings.c:2501
#, c-format
msgid "No command %d has been defined.\n"
msgstr "คำสั่ง %d ยังไม่ได้ถูกกำหนด\n"
#: ../src/core/keybindings.c:3705
#: ../src/core/keybindings.c:3514
#, c-format
msgid "No terminal command has been defined.\n"
msgstr "คำสั่งเปิดเทอร์มินัลยังไม่ได้ถูกกำหนด\n"
@ -233,24 +233,24 @@ msgstr "\"%s\" ที่พบในฐานข้อมูลข้อปร
msgid "Error setting number of workspaces to %d: %s\n"
msgstr "ไม่สามารถตั้งจำนวนพื้นที่ทำงานเป็น %d: %s\n"
#: ../src/core/prefs.c:2131 ../src/core/prefs.c:2643
#: ../src/core/prefs.c:2067 ../src/core/prefs.c:2579
#, c-format
msgid "Workspace %d"
msgstr "พื้นที่ทำงาน %d"
#: ../src/core/prefs.c:2161 ../src/core/prefs.c:2334
#: ../src/core/prefs.c:2097 ../src/core/prefs.c:2270
#, c-format
msgid ""
"\"%s\" found in configuration database is not a valid value for keybinding "
"\"%s\"\n"
msgstr "\"%s\" ที่พบในฐานข้อมูลค่าปรับแต่ง ไม่สามารถใช้เป็นปุ่มลัด \"%s\"\n"
#: ../src/core/prefs.c:2724
#: ../src/core/prefs.c:2660
#, c-format
msgid "Error setting name for workspace %d to \"%s\": %s\n"
msgstr "ไม่สามารถตั้งชื่อพื้นที่ทำงาน %d เป็น %s: %s\n"
#: ../src/core/prefs.c:2917
#: ../src/core/prefs.c:2853
#, c-format
msgid "Error setting compositor status: %s\n"
msgstr "เกิดข้อผิดพลาดขณะกำหนดสถานะ compositor: %s\n"
@ -285,7 +285,10 @@ msgstr "สกรีน %d บนดิสเพลย์ \"%s\" มีโปร
msgid "Could not release screen %d on display \"%s\"\n"
msgstr "ไม่สามารถปล่อยการควบคุมสกรีน %d บนดิสเพลย์ \"%s\"\n"
#: ../src/core/schema-bindings.c:77
#. XXX: TODO: find out what/how gdk i18ns the keycaps as, and add a
#. * translator comment
#.
#: ../src/core/schema-bindings.c:138
msgid ""
"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 "
@ -295,6 +298,21 @@ msgstr ""
"ตัวอ่านค่าคีย์ไม่สนใจว่าเป็นตัวพิมพ์ใหญ่หรือเล็ก และเข้าใจชื่อย่อ เช่น \"<Ctl>\" และ \"<Ctrl>\" "
"คุณสามารถตั้งค่าตัวเลือกเป็น \"disabled\" ได้ ถ้าไม่ต้องการปุ่มลัดสำหรับปฏิบัติการนี้"
#. These were more dissimilar at some point but have been regularised
#. * for the translators' benefit.
#.
#: ../src/core/schema-bindings.c:146
msgid ""
"Holding the \"shift\" key while using this binding reverses the direction of "
"movement."
msgstr "กดปุ่ม \"shift\" ค้างไว้ขณะกดปุ่มลัดนี้ จะเคลื่อนที่ในทิศย้อนกลับ"
#: ../src/core/schema-bindings.c:149
msgid ""
"Holding the \"shift\" key while using this binding makes the direction go "
"forward again."
msgstr "กดปุ่ม \"shift\" ค้างไว้ขณะกดปุ่มลัดนี้ จะเคลื่อนที่ในทิศเดิมอีกครั้ง"
#: ../src/core/session.c:837 ../src/core/session.c:844
#, c-format
msgid "Could not create directory '%s': %s\n"
@ -334,7 +352,7 @@ msgstr "พบแอตทริบิวต์ <metacity_session> แต่ว
#: ../src/core/session.c:1194
#, c-format
msgid "Unknown attribute %s on <metacity_session> element"
msgstr "ไม่รู้จักแอตทริบิวต์ %s ในอลิเมนต์ <metacity_session>"
msgstr "ไม่รู้จักแอตทริบิวต์ %s ในอลิเมนต์ <metacity_session>"
#: ../src/core/session.c:1211
#, c-format
@ -344,22 +362,22 @@ msgstr "มีแท็ก <window> ซ้อนด้านใน"
#: ../src/core/session.c:1269 ../src/core/session.c:1301
#, c-format
msgid "Unknown attribute %s on <window> element"
msgstr "ไม่รู้จักแอตทริบิวต์ %s ในอลิเมนต์ <window>"
msgstr "ไม่รู้จักแอตทริบิวต์ %s ในอลิเมนต์ <window>"
#: ../src/core/session.c:1373
#, c-format
msgid "Unknown attribute %s on <maximized> element"
msgstr "ไม่รู้จักแอตทริบิวต์ %s ในอลิเมนต์ <maximized>"
msgstr "ไม่รู้จักแอตทริบิวต์ %s ในอลิเมนต์ <maximized>"
#: ../src/core/session.c:1433
#, c-format
msgid "Unknown attribute %s on <geometry> element"
msgstr "ไม่รู้จักแอตทริบิวต์ %s ในอลิเมนต์ <geometry>"
msgstr "ไม่รู้จักแอตทริบิวต์ %s ในอลิเมนต์ <geometry>"
#: ../src/core/session.c:1453
#, c-format
msgid "Unknown element %s"
msgstr "ไม่รู้จักอลิเมนต์ %s"
msgstr "ไม่รู้จักอลิเมนต์ %s"
#: ../src/core/session.c:1879
#, c-format
@ -422,7 +440,7 @@ msgstr "ปุ่มลัดสำหรับสลับโหมดเต็
#: ../src/core/window-bindings.h:80 ../src/metacity.schemas.in.h:195
msgid "Toggle maximization state"
msgstr "สลับสถานะขยายเต็ม"
msgstr "สลับสถานะขยายแผ่"
#: ../src/core/window-bindings.h:81
msgid "The keybinding used to toggle maximization."
@ -441,7 +459,7 @@ msgstr ""
#: ../src/core/window-bindings.h:92 ../src/metacity.schemas.in.h:29
msgid "Maximize window"
msgstr "ขยายหน้าต่างเต็มจอ"
msgstr "ขยายแผ่หน้าต่างเต็มพื้นโต๊ะ"
#: ../src/core/window-bindings.h:93
msgid "The keybinding used to maximize a window."
@ -449,7 +467,7 @@ msgstr "ปุ่มลัดสำหรับขยายหน้าต่า
#: ../src/core/window-bindings.h:96 ../src/metacity.schemas.in.h:199
msgid "Unmaximize window"
msgstr "เลิกขยายหน้าต่างเต็ม"
msgstr "เลิกขยายแผ่หน้าต่าง"
#: ../src/core/window-bindings.h:97
msgid "The keybinding used to unmaximize a window."
@ -668,7 +686,7 @@ msgstr "ปุ่มลัดนี้ถอยหน้าต่างลงไ
#: ../src/core/window-bindings.h:232 ../src/metacity.schemas.in.h:31
msgid "Maximize window vertically"
msgstr "ขยายหน้าต่างเต็มด้านสูง"
msgstr "ขยายแผ่หน้าต่างเต็มด้านสูง"
#: ../src/core/window-bindings.h:233
msgid "This keybinding resizes a window to fill available vertical space."
@ -676,7 +694,7 @@ msgstr "ปุ่มลัดนี้ขยายหน้าต่างเพ
#: ../src/core/window-bindings.h:237 ../src/metacity.schemas.in.h:30
msgid "Maximize window horizontally"
msgstr "ขยายหน้าต่างเต็มด้านกว้าง"
msgstr "ขยายแผ่หน้าต่างเต็มด้านกว้าง"
#: ../src/core/window-bindings.h:238
msgid "This keybinding resizes a window to fill available horizontal space."
@ -767,7 +785,7 @@ msgid "This keybinding moves a window into the center of the screen."
msgstr "ปุ่มลัดนี้ย้ายหน้าต่างไปที่กลางหน้าจอ"
#. first time through
#: ../src/core/window.c:5643
#: ../src/core/window.c:5646
#, c-format
msgid ""
"Window %s sets SM_CLIENT_ID on itself, instead of on the WM_CLIENT_LEADER "
@ -783,7 +801,7 @@ msgstr ""
#. * MWM but not WM_NORMAL_HINTS are basically broken. We complain
#. * about these apps but make them work.
#.
#: ../src/core/window.c:6208
#: ../src/core/window.c:6211
#, c-format
msgid ""
"Window %s sets an MWM hint indicating it isn't resizable, but sets min size %"
@ -1532,8 +1550,8 @@ msgid ""
"Ctl&gt;\" and \"&lt;Ctrl&gt;\". If you set the option to the special string "
"\"disabled\", then there will be no keybinding for this action."
msgstr ""
"ปุ่มลัดสำหรับขยายหน้าต่างให้เต็มจอ รูปแบบคือ \"&lt;Control&gt;a\" หรือ \"&lt;Shift&gt;"
"&lt;Alt&gt;F1\" ตัวอ่านค่าคีย์ไม่สนใจว่าเป็นตัวพิมพ์ใหญ่หรือเล็ก และเข้าใจชื่อย่อ เช่น \"&lt;"
"ปุ่มลัดสำหรับขยายแผ่หน้าต่าง รูปแบบคือ \"&lt;Control&gt;a\" หรือ \"&lt;Shift&gt;&lt;"
"Alt&gt;F1\" ตัวอ่านค่าคีย์ไม่สนใจว่าเป็นตัวพิมพ์ใหญ่หรือเล็ก และเข้าใจชื่อย่อ เช่น \"&lt;"
"Ctl&gt;\" และ \"&lt;Ctrl&gt;\" คุณสามารถตั้งค่าตัวเลือกเป็น \"disabled\" ได้ "
"ถ้าไม่ต้องการปุ่มลัดสำหรับปฏิบัติการนี้"
@ -1990,8 +2008,8 @@ msgid ""
"Ctl&gt;\" and \"&lt;Ctrl&gt;\". If you set the option to the special string "
"\"disabled\", then there will be no keybinding for this action."
msgstr ""
"ปุ่มลัดสำหรับสลับสถานะขยายเต็ม รูปแบบคือ \"&lt;Control&gt;a\" หรือ \"&lt;Shift&gt;"
"&lt;Alt&gt;F1\" ตัวอ่านค่าคีย์ไม่สนใจว่าเป็นตัวพิมพ์ใหญ่หรือเล็ก และเข้าใจชื่อย่อ เช่น \"&lt;"
"ปุ่มลัดสำหรับสลับสถานะขยายแผ่ รูปแบบคือ \"&lt;Control&gt;a\" หรือ \"&lt;Shift&gt;&lt;"
"Alt&gt;F1\" ตัวอ่านค่าคีย์ไม่สนใจว่าเป็นตัวพิมพ์ใหญ่หรือเล็ก และเข้าใจชื่อย่อ เช่น \"&lt;"
"Ctl&gt;\" และ \"&lt;Ctrl&gt;\" คุณสามารถตั้งค่าตัวเลือกเป็น \"disabled\" ได้ "
"ถ้าไม่ต้องการปุ่มลัดสำหรับปฏิบัติการนี้"
@ -2031,10 +2049,10 @@ msgid ""
"Ctl&gt;\" and \"&lt;Ctrl&gt;\". If you set the option to the special string "
"\"disabled\", then there will be no keybinding for this action."
msgstr ""
"ปุ่มลัดสำหรับยกเลิกการขยายหน้าต่างเต็มพื้นโต๊ะ รูปแบบคือ \"&lt;Control&gt;a\" หรือ \"&lt;"
"Shift&gt;&lt;Alt&gt;F1\" ตัวอ่านค่าคีย์ไม่สนใจว่าเป็นตัวพิมพ์ใหญ่หรือเล็ก และเข้าใจชื่อย่อ "
"เช่น \"&lt;Ctl&gt;\" และ \"&lt;Ctrl&gt;\" คุณสามารถตั้งค่าตัวเลือกเป็น \"disabled\" "
"ได้ ถ้าไม่ต้องการปุ่มลัดสำหรับปฏิบัติการนี้"
"ปุ่มลัดสำหรับยกเลิกการขยายแผ่หน้าต่างเต็มพื้นโต๊ะ รูปแบบคือ \"&lt;Control&gt;a\" หรือ "
"\"&lt;Shift&gt;&lt;Alt&gt;F1\" ตัวอ่านค่าคีย์ไม่สนใจว่าเป็นตัวพิมพ์ใหญ่หรือเล็ก "
"และเข้าใจชื่อย่อ เช่น \"&lt;Ctl&gt;\" และ \"&lt;Ctrl&gt;\" คุณสามารถตั้งค่าตัวเลือกเป็น "
"\"disabled\" ได้ ถ้าไม่ต้องการปุ่มลัดสำหรับปฏิบัติการนี้"
#: ../src/metacity.schemas.in.h:164
msgid ""
@ -2197,10 +2215,10 @@ msgid ""
"option to the special string \"disabled\", then there will be no keybinding "
"for this action."
msgstr ""
"ปุ่มลัดนี้ย้ายหน้าต่างไปที่กลางหน้าจอ รูปแบบคือ \"&lt;Control&gt;a\" หรือ "
"\"&lt;Shift&gt;&lt;Alt&gt;F1\" ตัวอ่านค่าคีย์ไม่สนใจว่าเป็นตัวพิมพ์ใหญ่หรือเล็ก "
"และเข้าใจชื่อย่อ เช่น \"&lt;Ctl&gt;\" และ \"&lt;Ctrl&gt;\" คุณสามารถตั้งค่าตัวเลือกเป็น "
"\"disabled\" ได้ ถ้าไม่ต้องการปุ่มลัดสำหรับปฏิบัติการนี้"
"ปุ่มลัดนี้ย้ายหน้าต่างไปที่กลางหน้าจอ รูปแบบคือ \"&lt;Control&gt;a\" หรือ \"&lt;Shift&gt;"
"&lt;Alt&gt;F1\" ตัวอ่านค่าคีย์ไม่สนใจว่าเป็นตัวพิมพ์ใหญ่หรือเล็ก และเข้าใจชื่อย่อ เช่น \"&lt;"
"Ctl&gt;\" และ \"&lt;Ctrl&gt;\" คุณสามารถตั้งค่าตัวเลือกเป็น \"disabled\" ได้ "
"ถ้าไม่ต้องการปุ่มลัดสำหรับปฏิบัติการนี้"
#: ../src/metacity.schemas.in.h:179
msgid ""
@ -2326,10 +2344,10 @@ msgid ""
"option to the special string \"disabled\", then there will be no keybinding "
"for this action."
msgstr ""
"ปุ่มลัดนี้ใช้ขยายหน้าต่างเต็มความกว้างของพื้นโต๊ะ รูปแบบคือ \"&lt;Control&gt;a\" หรือ \"&lt;"
"Shift&gt;&lt;Alt&gt;F1\" ตัวอ่านค่าคีย์ไม่สนใจว่าเป็นตัวพิมพ์ใหญ่หรือเล็ก และเข้าใจชื่อย่อ "
"เช่น \"&lt;Ctl&gt;\" และ \"&lt;Ctrl&gt;\" คุณสามารถตั้งค่าตัวเลือกเป็น \"disabled\" "
"ได้ ถ้าไม่ต้องการปุ่มลัดสำหรับปฏิบัติการนี้"
"ปุ่มลัดนี้ใช้ขยายแผ่หน้าต่างเต็มความกว้างของพื้นโต๊ะ รูปแบบคือ \"&lt;Control&gt;a\" หรือ "
"\"&lt;Shift&gt;&lt;Alt&gt;F1\" ตัวอ่านค่าคีย์ไม่สนใจว่าเป็นตัวพิมพ์ใหญ่หรือเล็ก "
"และเข้าใจชื่อย่อ เช่น \"&lt;Ctl&gt;\" และ \"&lt;Ctrl&gt;\" คุณสามารถตั้งค่าตัวเลือกเป็น "
"\"disabled\" ได้ ถ้าไม่ต้องการปุ่มลัดสำหรับปฏิบัติการนี้"
#: ../src/metacity.schemas.in.h:188
msgid ""
@ -2340,7 +2358,7 @@ msgid ""
"option to the special string \"disabled\", then there will be no keybinding "
"for this action."
msgstr ""
"ปุ่มลัดนี้ใช้ขยายหน้าต่างเต็มความสูงของพื้นโต๊ะ รูปแบบคือ \"&lt;Control&gt;a\" หรือ \"&lt;"
"ปุ่มลัดนี้ใช้ขยายแผ่หน้าต่างเต็มความสูงของพื้นโต๊ะ รูปแบบคือ \"&lt;Control&gt;a\" หรือ \"&lt;"
"Shift&gt;&lt;Alt&gt;F1\" ตัวอ่านค่าคีย์ไม่สนใจว่าเป็นตัวพิมพ์ใหญ่หรือเล็ก และเข้าใจชื่อย่อ "
"เช่น \"&lt;Ctl&gt;\" และ \"&lt;Ctrl&gt;\" คุณสามารถตั้งค่าตัวเลือกเป็น \"disabled\" "
"ได้ ถ้าไม่ต้องการปุ่มลัดสำหรับปฏิบัติการนี้"
@ -2358,10 +2376,10 @@ msgid ""
msgstr ""
"ตัวเลือกนี้เลือกการปฏิบัติเมื่อดับเบิลคลิกที่แถบหัวหน้าต่าง ค่าตัวเลือกที่เป็นไปได้ในขณะนี้คือ "
"'toggle_shade' ซึ่งจะม้วนหรือคลี่หน้าต่าง, 'toggle_maximize' "
"ซึ่งจะขยายหรือยกเลิกการขยายหน้าต่างให้เต็มพื้นโต๊ะ, 'toggle_maximize_horizontally' และ "
"'toggle_maximize_vertically' "
"ซึ่งจะขยายหรือยกเลิกการขยายหน้าต่างในทิศทางที่กำหนดเท่านั้น, 'minimize' ซึ่งจะย่อหน้าต่างเก็บ, "
"'shade' ซึ่งจะม้วนหน้าต่างเก็บ, 'menu' ซึ่งจะแสดงเมนูหน้าต่าง, 'lower' "
"ซึ่งจะขยายแผ่หรือยกเลิกการขยายแผ่หน้าต่างให้เต็มพื้นโต๊ะ, 'toggle_maximize_horizontally' "
"และ 'toggle_maximize_vertically' "
"ซึ่งจะขยายแผ่หรือยกเลิกการขยายแผ่หน้าต่างในทิศทางที่กำหนดเท่านั้น, 'minimize' "
"ซึ่งจะย่อเก็บหน้าต่าง, 'shade' ซึ่งจะม้วนเก็บหน้าต่าง, 'menu' ซึ่งจะแสดงเมนูหน้าต่าง, 'lower' "
"ซึ่งจะนำหน้าต่างลงไปอยู่หลังหน้าต่างอื่นทั้งหมด, และ 'none' ซึ่งจะไม่ทำอะไรเลย"
#: ../src/metacity.schemas.in.h:190
@ -2377,10 +2395,10 @@ msgid ""
msgstr ""
"ตัวเลือกนี้เลือกการปฏิบัติเมื่อคลิกเมาส์ปุ่มกลางที่แถบหัวหน้าต่าง ค่าตัวเลือกที่เป็นไปได้ในขณะนี้คือ "
"'toggle_shade' ซึ่งจะม้วนหรือคลี่หน้าต่าง, 'toggle_maximize' "
"ซึ่งจะขยายหรือยกเลิกการขยายหน้าต่างให้เต็มพื้นโต๊ะ, 'toggle_maximize_horizontally' และ "
"'toggle_maximize_vertically' "
"ซึ่งจะขยายหรือยกเลิกการขยายหน้าต่างในทิศทางที่กำหนดเท่านั้น, 'minimize' ซึ่งจะย่อหน้าต่างเก็บ, "
"'shade' ซึ่งจะม้วนหน้าต่างเก็บ, 'menu' ซึ่งจะแสดงเมนูหน้าต่าง, 'lower' "
"ซึ่งจะขยายแผ่หรือยกเลิกการขยายแผ่หน้าต่างให้เต็มพื้นโต๊ะ, 'toggle_maximize_horizontally' "
"และ 'toggle_maximize_vertically' "
"ซึ่งจะขยายแผ่หรือยกเลิกการขยายแผ่หน้าต่างในทิศทางที่กำหนดเท่านั้น, 'minimize' "
"ซึ่งจะย่อเก็บหน้าต่าง, 'shade' ซึ่งจะม้วนเก็บหน้าต่าง, 'menu' ซึ่งจะแสดงเมนูหน้าต่าง, 'lower' "
"ซึ่งจะนำหน้าต่างลงไปอยู่หลังหน้าต่างอื่นทั้งหมด, และ 'none' ซึ่งจะไม่ทำอะไรเลย"
#: ../src/metacity.schemas.in.h:191
@ -2396,10 +2414,10 @@ msgid ""
msgstr ""
"ตัวเลือกนี้เลือกการปฏิบัติเมื่อคลิกเมาส์ปุ่มขวาที่แถบหัวหน้าต่าง ค่าตัวเลือกที่เป็นไปได้ในขณะนี้คือ "
"'toggle_shade' ซึ่งจะม้วนหรือคลี่หน้าต่าง, 'toggle_maximize' "
"ซึ่งจะขยายหรือยกเลิกการขยายหน้าต่างให้เต็มพื้นโต๊ะ, 'toggle_maximize_horizontally' และ "
"'toggle_maximize_vertically' "
"ซึ่งจะขยายหรือยกเลิกการขยายหน้าต่างในทิศทางที่กำหนดเท่านั้น, 'minimize' ซึ่งจะย่อหน้าต่างเก็บ, "
"'shade' ซึ่งจะม้วนหน้าต่างเก็บ, 'menu' ซึ่งจะแสดงเมนูหน้าต่าง, 'lower' "
"ซึ่งจะขยายแผ่หรือยกเลิกการขยายแผ่หน้าต่างให้เต็มพื้นโต๊ะ, 'toggle_maximize_horizontally' "
"และ 'toggle_maximize_vertically' "
"ซึ่งจะขยายแผ่หรือยกเลิกการขยายแผ่หน้าต่างในทิศทางที่กำหนดเท่านั้น, 'minimize' "
"ซึ่งจะย่อเก็บหน้าต่าง, 'shade' ซึ่งจะม้วนเก็บหน้าต่าง, 'menu' ซึ่งจะแสดงเมนูหน้าต่าง, 'lower' "
"ซึ่งจะนำหน้าต่างลงไปอยู่หลังหน้าต่างอื่นทั้งหมด, และ 'none' ซึ่งจะไม่ทำอะไรเลย"
#: ../src/metacity.schemas.in.h:192
@ -2460,11 +2478,11 @@ msgstr "ย่อเก็บหน้าต่าง"
#: ../src/ui/frames.c:1086
msgid "Maximize Window"
msgstr "ขยายหน้าต่างเต็ม"
msgstr "ขยายแผ่หน้าต่าง"
#: ../src/ui/frames.c:1089
msgid "Unmaximize Window"
msgstr "เลิกขยายหน้าต่างเต็ม"
msgstr "เลิกขยายแผ่หน้าต่าง"
#: ../src/ui/frames.c:1092
msgid "Roll Up Window"
@ -2498,12 +2516,12 @@ msgstr "ย่_อเก็บ"
#. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:72
msgid "Ma_ximize"
msgstr "ขย_ายเต็ม"
msgstr "ขย_ายแผ่"
#. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:74
msgid "Unma_ximize"
msgstr "เลิกขย_ายเต็ม"
msgstr "เลิกขย_ายแผ่"
#. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:76
@ -2753,7 +2771,7 @@ msgstr "ค่าเรขาคณิตของเฟรมไม่ได้
#: ../src/ui/theme.c:308
#, c-format
msgid "frame geometry does not specify dimension \"%s\" for border \"%s\""
msgstr "ค่าเรขาคณิตของเฟรมไม่ได้ระบุขนาด·\"%s\" สำหรับกรอบ \"%s\""
msgstr "ค่าเรขาคณิตของเฟรมไม่ได้ระบุขนาด \"%s\" สำหรับกรอบ \"%s\""
#: ../src/ui/theme.c:345
#, c-format
@ -2847,19 +2865,19 @@ msgstr "นิพจน์พิกัดมีอักขระ'%s' ซึ่
msgid ""
"Coordinate expression contains floating point number '%s' which could not be "
"parsed"
msgstr "นิพจน์พิกัดมีเลขจุดทศนิยม '%s'·ที่แจงค่าไม่ได้"
msgstr "นิพจน์พิกัดมีเลขจุดทศนิยม '%s' ที่แจงค่าไม่ได้"
#: ../src/ui/theme.c:1625
#, c-format
msgid "Coordinate expression contains integer '%s' which could not be parsed"
msgstr "นิพจน์พิกัดมีเลขจำนวนเต็ม·'%s' ที่แจงค่าไม่ได้"
msgstr "นิพจน์พิกัดมีเลขจำนวนเต็ม '%s' ที่แจงค่าไม่ได้"
#: ../src/ui/theme.c:1747
#, c-format
msgid ""
"Coordinate expression contained unknown operator at the start of this text: "
"\"%s\""
msgstr "นิพจน์พิกัดมีเครื่องหมายดำเนินการที่ไม่รู้จัก เริ่มจากตำแหน่ง·\"%s\""
msgstr "นิพจน์พิกัดมีเครื่องหมายดำเนินการที่ไม่รู้จัก เริ่มจากตำแหน่ง \"%s\""
#: ../src/ui/theme.c:1804
#, c-format
@ -2964,7 +2982,7 @@ msgid ""
"No frame style set for window type \"%s\" in theme \"%s\", add a <window "
"type=\"%s\" style_set=\"whatever\"/> element"
msgstr ""
"ไม่ได้กำหนดรูปแบบเฟรมสำหรับชนิดหน้าต่าง \"%s\" ในชุดตกแต่ง \"%s\", กรุณาเพิ่มอลิเมนต์ "
"ไม่ได้กำหนดรูปแบบเฟรมสำหรับชนิดหน้าต่าง \"%s\" ในชุดตกแต่ง \"%s\", กรุณาเพิ่มอลิเมนต์ "
"<window type=\"%s\" style_set=\"อะไรก็ตามแต่\"/>"
#: ../src/ui/theme.c:5231 ../src/ui/theme.c:5293 ../src/ui/theme.c:5356
@ -2986,12 +3004,12 @@ msgstr "บรรทัด %d อักขระ %d: %s"
#: ../src/ui/theme-parser.c:396
#, c-format
msgid "Attribute \"%s\" repeated twice on the same <%s> element"
msgstr "มีแอตทริบิวต์ \"%s\" ซ้ำสองอันในอลิเมนต์ <%s> เดียวกัน"
msgstr "มีแอตทริบิวต์ \"%s\" ซ้ำสองอันในอลิเมนต์ <%s> เดียวกัน"
#: ../src/ui/theme-parser.c:414 ../src/ui/theme-parser.c:439
#, c-format
msgid "Attribute \"%s\" is invalid on <%s> element in this context"
msgstr "ใช้แอตทริบิวต์ \"%s\" ในอลิเมนต์ <%s> ไม่ได้ตรงนี้"
msgstr "ใช้แอตทริบิวต์ \"%s\" ในอลิเมนต์ <%s> ไม่ได้ตรงนี้"
#: ../src/ui/theme-parser.c:500
#, c-format
@ -3040,7 +3058,7 @@ msgstr ""
#: ../src/ui/theme-parser.c:3191 ../src/ui/theme-parser.c:3198
#, c-format
msgid "No \"%s\" attribute on <%s> element"
msgstr "ขาดแอตทริบิวต์ \"%s\" ในอลิเมนต์ <%s>"
msgstr "ขาดแอตทริบิวต์ \"%s\" ในอลิเมนต์ <%s>"
#: ../src/ui/theme-parser.c:919 ../src/ui/theme-parser.c:990
#: ../src/ui/theme-parser.c:1032 ../src/ui/theme-parser.c:1143
@ -3071,12 +3089,12 @@ msgstr "คุณต้องกำหนดสีพื้นหลังเพ
#: ../src/ui/theme-parser.c:1203
#, c-format
msgid "Unknown type \"%s\" on <%s> element"
msgstr "ไม่รู้จักชนิด \"%s\" บนอีลิเมนต์ <%s>"
msgstr "ไม่รู้จักชนิด \"%s\" สำหรับอิลิเมนต์ <%s>"
#: ../src/ui/theme-parser.c:1214
#, c-format
msgid "Unknown style_set \"%s\" on <%s> element"
msgstr "ไม่รู้จัก style_set \"%s\" บนอีลิเมนต์ <%s>"
msgstr "ไม่รู้จัก style_set \"%s\" สำหรับอิลิเมนต์ <%s>"
#: ../src/ui/theme-parser.c:1222
#, c-format
@ -3098,18 +3116,18 @@ msgstr "ชุดตกแต่งมีไอคอนเล็กสำรอ
#: ../src/ui/theme-parser.c:3803 ../src/ui/theme-parser.c:3841
#, c-format
msgid "Element <%s> is not allowed below <%s>"
msgstr "ไม่อนุญาตให้มีอลิเมนต์ <%s> ภายใน <%s>"
msgstr "ไม่อนุญาตให้มีอลิเมนต์ <%s> ภายใน <%s>"
#: ../src/ui/theme-parser.c:1373 ../src/ui/theme-parser.c:1460
#: ../src/ui/theme-parser.c:1530
#, c-format
msgid "No \"name\" attribute on element <%s>"
msgstr "ขาดแอตทริบิวต์ \"name\" ในอลิเมนต์ <%s>"
msgstr "ขาดแอตทริบิวต์ \"name\" ในอลิเมนต์ <%s>"
#: ../src/ui/theme-parser.c:1380 ../src/ui/theme-parser.c:1467
#, c-format
msgid "No \"value\" attribute on element <%s>"
msgstr "ขาดแอตทริบิวต์ \"value\" ในอลิเมนต์ <%s>"
msgstr "ขาดแอตทริบิวต์ \"value\" ในอลิเมนต์ <%s>"
#: ../src/ui/theme-parser.c:1411 ../src/ui/theme-parser.c:1425
#: ../src/ui/theme-parser.c:1484
@ -3131,22 +3149,22 @@ msgstr "ไม่รู้จัก aspect ratio \"%s\""
#: ../src/ui/theme-parser.c:1537
#, c-format
msgid "No \"top\" attribute on element <%s>"
msgstr "ขาดแอตทริบิวต์ \"top\" ในอลิเมนต์ <%s>"
msgstr "ขาดแอตทริบิวต์ \"top\" ในอลิเมนต์ <%s>"
#: ../src/ui/theme-parser.c:1544
#, c-format
msgid "No \"bottom\" attribute on element <%s>"
msgstr "ขาดแอตทริบิวต์ \"bottom\" ในอลิเมนต์<%s>"
msgstr "ขาดแอตทริบิวต์ \"bottom\" ในอลิเมนต์<%s>"
#: ../src/ui/theme-parser.c:1551
#, c-format
msgid "No \"left\" attribute on element <%s>"
msgstr "ขาดแอตทริบิวต์ \"left\" ในอลิเมนต์<%s>"
msgstr "ขาดแอตทริบิวต์ \"left\" ในอลิเมนต์<%s>"
#: ../src/ui/theme-parser.c:1558
#, c-format
msgid "No \"right\" attribute on element <%s>"
msgstr "ขาดแอตทริบิวต์ \"right\" ในอลิเมนต์<%s>"
msgstr "ขาดแอตทริบิวต์ \"right\" ในอลิเมนต์<%s>"
#: ../src/ui/theme-parser.c:1590
#, c-format
@ -3158,27 +3176,27 @@ msgstr "ไม่รู้จักเส้นขอบ \"%s\""
#: ../src/ui/theme-parser.c:3023
#, c-format
msgid "No \"color\" attribute on element <%s>"
msgstr "ขาดแอตทริบิวต์ \"color\" ในอลิเมนต์<%s>"
msgstr "ขาดแอตทริบิวต์ \"color\" ในอลิเมนต์<%s>"
#: ../src/ui/theme-parser.c:1743
#, c-format
msgid "No \"x1\" attribute on element <%s>"
msgstr "ขาดแอตทริบิวต์ \"x1\" ในอลิเมนต์<%s>"
msgstr "ขาดแอตทริบิวต์ \"x1\" ในอลิเมนต์<%s>"
#: ../src/ui/theme-parser.c:1750 ../src/ui/theme-parser.c:2864
#, c-format
msgid "No \"y1\" attribute on element <%s>"
msgstr "ขาดแอตทริบิวต์ \"y1\" ในอลิเมนต์<%s>"
msgstr "ขาดแอตทริบิวต์ \"y1\" ในอลิเมนต์<%s>"
#: ../src/ui/theme-parser.c:1757
#, c-format
msgid "No \"x2\" attribute on element <%s>"
msgstr "ขาดแอตทริบิวต์ \"x2\" ในอลิเมนต์<%s>"
msgstr "ขาดแอตทริบิวต์ \"x2\" ในอลิเมนต์<%s>"
#: ../src/ui/theme-parser.c:1764 ../src/ui/theme-parser.c:2871
#, c-format
msgid "No \"y2\" attribute on element <%s>"
msgstr "ขาดแอตทริบิวต์ \"y2\" ในอลิเมนต์<%s>"
msgstr "ขาดแอตทริบิวต์ \"y2\" ในอลิเมนต์<%s>"
#: ../src/ui/theme-parser.c:1857 ../src/ui/theme-parser.c:1968
#: ../src/ui/theme-parser.c:2117 ../src/ui/theme-parser.c:2199
@ -3188,7 +3206,7 @@ msgstr "ขาดแอตทริบิวต์ \"y2\" ในอีลิเ
#: ../src/ui/theme-parser.c:3030
#, c-format
msgid "No \"x\" attribute on element <%s>"
msgstr "ขาดแอตทริบิวต์ \"x\" ในอลิเมนต์<%s>"
msgstr "ขาดแอตทริบิวต์ \"x\" ในอลิเมนต์<%s>"
#: ../src/ui/theme-parser.c:1864 ../src/ui/theme-parser.c:1975
#: ../src/ui/theme-parser.c:2124 ../src/ui/theme-parser.c:2206
@ -3197,7 +3215,7 @@ msgstr "ขาดแอตทริบิวต์ \"x\" ในอีลิเ
#: ../src/ui/theme-parser.c:2941 ../src/ui/theme-parser.c:3037
#, c-format
msgid "No \"y\" attribute on element <%s>"
msgstr "ขาดแอตทริบิวต์ \"y\" ในอลิเมนต์<%s>"
msgstr "ขาดแอตทริบิวต์ \"y\" ในอลิเมนต์<%s>"
#: ../src/ui/theme-parser.c:1871 ../src/ui/theme-parser.c:1982
#: ../src/ui/theme-parser.c:2131 ../src/ui/theme-parser.c:2213
@ -3206,7 +3224,7 @@ msgstr "ขาดแอตทริบิวต์ \"y\" ในอีลิเ
#: ../src/ui/theme-parser.c:2948
#, c-format
msgid "No \"width\" attribute on element <%s>"
msgstr "ขาดแอตทริบิวต์ \"width\" ในอลิเมนต์<%s>"
msgstr "ขาดแอตทริบิวต์ \"width\" ในอลิเมนต์<%s>"
#: ../src/ui/theme-parser.c:1878 ../src/ui/theme-parser.c:1989
#: ../src/ui/theme-parser.c:2138 ../src/ui/theme-parser.c:2220
@ -3215,37 +3233,37 @@ msgstr "ขาดแอตทริบิวต์ \"width\" ในอีลิ
#: ../src/ui/theme-parser.c:2955
#, c-format
msgid "No \"height\" attribute on element <%s>"
msgstr "ขาดแอตทริบิวต์ \"height\" ในอลิเมนต์<%s>"
msgstr "ขาดแอตทริบิวต์ \"height\" ในอลิเมนต์<%s>"
#: ../src/ui/theme-parser.c:1998
#, c-format
msgid "No \"start_angle\" or \"from\" attribute on element <%s>"
msgstr "ขาดแอตทริบิวต์ \"start_angle\" หรือ \"from\" ในอลิเมนต์ <%s>"
msgstr "ขาดแอตทริบิวต์ \"start_angle\" หรือ \"from\" ในอลิเมนต์ <%s>"
#: ../src/ui/theme-parser.c:2005
#, c-format
msgid "No \"extent_angle\" or \"to\" attribute on element <%s>"
msgstr "ขาดแอตทริบิวต์ \"extent_angle\" หรือ \"to\" ในอลิเมนต์ <%s>"
msgstr "ขาดแอตทริบิวต์ \"extent_angle\" หรือ \"to\" ในอลิเมนต์ <%s>"
#: ../src/ui/theme-parser.c:2014
#, c-format
msgid "No \"start_angle\" attribute on element <%s>"
msgstr "ขาดแอตทริบิวต์ \"start_angle\" ในอลิเมนต์ <%s>"
msgstr "ขาดแอตทริบิวต์ \"start_angle\" ในอลิเมนต์ <%s>"
#: ../src/ui/theme-parser.c:2021
#, c-format
msgid "No \"extent_angle\" attribute on element <%s>"
msgstr "ขาดแอตทริบิวต์ \"extent_angle\" ในอลิเมนต์ <%s>"
msgstr "ขาดแอตทริบิวต์ \"extent_angle\" ในอลิเมนต์ <%s>"
#: ../src/ui/theme-parser.c:2227
#, c-format
msgid "No \"alpha\" attribute on element <%s>"
msgstr "ขาดแอตทริบิวต์ \"alpha\" ในอลิเมนต์<%s>"
msgstr "ขาดแอตทริบิวต์ \"alpha\" ในอลิเมนต์<%s>"
#: ../src/ui/theme-parser.c:2299
#, c-format
msgid "No \"type\" attribute on element <%s>"
msgstr "ขาดแอตทริบิวต์ \"type\" ในอลิเมนต์<%s>"
msgstr "ขาดแอตทริบิวต์ \"type\" ในอลิเมนต์<%s>"
#: ../src/ui/theme-parser.c:2349
#, c-format
@ -3255,44 +3273,44 @@ msgstr "ไม่เข้าใจค่า \"%s\" สำหรับชนิ
#: ../src/ui/theme-parser.c:2436
#, c-format
msgid "No \"filename\" attribute on element <%s>"
msgstr "ขาดแอตทริบิวต์ \"filename\" ในอลิเมนต์ <%s>"
msgstr "ขาดแอตทริบิวต์ \"filename\" ในอลิเมนต์ <%s>"
#: ../src/ui/theme-parser.c:2461 ../src/ui/theme-parser.c:2980
#, c-format
msgid "Did not understand fill type \"%s\" for <%s> element"
msgstr "ไม่เข้าใจชนิดการเติม \"%s\" สำหรับอลิเมนต์ <%s>"
msgstr "ไม่เข้าใจชนิดการเติม \"%s\" สำหรับอลิเมนต์ <%s>"
#: ../src/ui/theme-parser.c:2609 ../src/ui/theme-parser.c:2744
#: ../src/ui/theme-parser.c:2850
#, c-format
msgid "No \"state\" attribute on element <%s>"
msgstr "ขาดแอตทริบิวต์ \"state\" ในอลิเมนต์ <%s>"
msgstr "ขาดแอตทริบิวต์ \"state\" ในอลิเมนต์ <%s>"
#: ../src/ui/theme-parser.c:2616 ../src/ui/theme-parser.c:2751
#, c-format
msgid "No \"shadow\" attribute on element <%s>"
msgstr "ขาดแอตทริบิวต์ \"shadow\" ในอลิเมนต์ <%s>"
msgstr "ขาดแอตทริบิวต์ \"shadow\" ในอลิเมนต์ <%s>"
#: ../src/ui/theme-parser.c:2623
#, c-format
msgid "No \"arrow\" attribute on element <%s>"
msgstr "ขาดแอตทริบิวต์ \"arrow\" ในอลิเมนต์ <%s>"
msgstr "ขาดแอตทริบิวต์ \"arrow\" ในอลิเมนต์ <%s>"
#: ../src/ui/theme-parser.c:2676 ../src/ui/theme-parser.c:2800
#: ../src/ui/theme-parser.c:2891
#, c-format
msgid "Did not understand state \"%s\" for <%s> element"
msgstr "ไม่เข้าใจค่า state \"%s\" สำหรับอลิเมนต์ <%s>"
msgstr "ไม่เข้าใจค่า state \"%s\" สำหรับอลิเมนต์ <%s>"
#: ../src/ui/theme-parser.c:2686 ../src/ui/theme-parser.c:2810
#, c-format
msgid "Did not understand shadow \"%s\" for <%s> element"
msgstr "ไม่เข้าใจค่า shadow \"%s\" สำหรับอลิเมนต์ <%s>"
msgstr "ไม่เข้าใจค่า shadow \"%s\" สำหรับอลิเมนต์ <%s>"
#: ../src/ui/theme-parser.c:2696
#, c-format
msgid "Did not understand arrow \"%s\" for <%s> element"
msgstr "ไม่เข้าใจค่า arrow \"%s\" สำหรับอลิเมนต์ <%s>"
msgstr "ไม่เข้าใจค่า arrow \"%s\" สำหรับอลิเมนต์ <%s>"
#: ../src/ui/theme-parser.c:3120 ../src/ui/theme-parser.c:3237
#, c-format
@ -3307,12 +3325,12 @@ msgstr "การรวม draw_ops \"%s\" ที่นี่จะทำให
#: ../src/ui/theme-parser.c:3314
#, c-format
msgid "No \"value\" attribute on <%s> element"
msgstr "ขาดแอตทริบิวต์ \"value\" ในอลิเมนต์ <%s>"
msgstr "ขาดแอตทริบิวต์ \"value\" ในอลิเมนต์ <%s>"
#: ../src/ui/theme-parser.c:3371
#, c-format
msgid "No \"position\" attribute on <%s> element"
msgstr "ขาดแอตทริบิวต์ \"position\" ในอลิเมนต์ <%s>"
msgstr "ขาดแอตทริบิวต์ \"position\" ในอลิเมนต์ <%s>"
#: ../src/ui/theme-parser.c:3380
#, c-format
@ -3332,12 +3350,12 @@ msgstr "ยังไม่ได้กำหนด <draw_ops> ชื่อ \"%s\
#: ../src/ui/theme-parser.c:3433
#, c-format
msgid "No \"function\" attribute on <%s> element"
msgstr "ขาดแอตทริบิวต์ \"function\" ในอลิเมนต์ <%s>"
msgstr "ขาดแอตทริบิวต์ \"function\" ในอลิเมนต์ <%s>"
#: ../src/ui/theme-parser.c:3441 ../src/ui/theme-parser.c:3557
#, c-format
msgid "No \"state\" attribute on <%s> element"
msgstr "ขาดแอตทริบิวต์ \"state\" ในอลิเมนต์ <%s>"
msgstr "ขาดแอตทริบิวต์ \"state\" ในอลิเมนต์ <%s>"
#: ../src/ui/theme-parser.c:3450
#, c-format
@ -3362,12 +3380,12 @@ msgstr "รูปแบบเฟรมมีปุ่มสำหรับฟั
#: ../src/ui/theme-parser.c:3549
#, c-format
msgid "No \"focus\" attribute on <%s> element"
msgstr "ขาดแอตทริบิวต์ \"focus\" ในอลิเมนต์ <%s>"
msgstr "ขาดแอตทริบิวต์ \"focus\" ในอลิเมนต์ <%s>"
#: ../src/ui/theme-parser.c:3565
#, c-format
msgid "No \"style\" attribute on <%s> element"
msgstr "ขาดแอตทริบิวต์ \"style\" ในอลิเมนต์ <%s>"
msgstr "ขาดแอตทริบิวต์ \"style\" ในอลิเมนต์ <%s>"
#: ../src/ui/theme-parser.c:3574
#, c-format
@ -3377,7 +3395,7 @@ msgstr "\"%s\" ไม่ใช่ค่าที่ใช้ได้สำห
#: ../src/ui/theme-parser.c:3583
#, c-format
msgid "\"%s\" is not a valid value for state attribute"
msgstr "\"%s\" ไม่ใช่ค่าที่ใช้ได้สำหรับแอตทริบิวต์·state"
msgstr "\"%s\" ไม่ใช่ค่าที่ใช้ได้สำหรับแอตทริบิวต์ state"
#: ../src/ui/theme-parser.c:3593
#, c-format
@ -3387,7 +3405,7 @@ msgstr "ไม่มีรูปแบบที่ชื่อ \"%s\" กำห
#: ../src/ui/theme-parser.c:3604
#, c-format
msgid "No \"resize\" attribute on <%s> element"
msgstr "ขาดแอตทริบิวต์ \"resize\" ในอลิเมนต์ <%s>"
msgstr "ขาดแอตทริบิวต์ \"resize\" ในอลิเมนต์ <%s>"
#: ../src/ui/theme-parser.c:3614 ../src/ui/theme-parser.c:3637
#, c-format
@ -3399,13 +3417,13 @@ msgstr "\"%s\" ไม่ใช่ค่าที่ใช้ได้สำห
msgid ""
"Should not have \"resize\" attribute on <%s> element for maximized/shaded "
"states"
msgstr "ไม่ควรมีแอตทริบิวต์ \"resize\" ในอีลิเมนต์ <%s> สำหรับสถานะขยายใหญ่สุด/พับเก็บ"
msgstr "ไม่ควรมีแอตทริบิวต์ \"resize\" ในอิลิเมนต์ <%s> สำหรับสถานะขยายแผ่/ม้วนเก็บ"
#: ../src/ui/theme-parser.c:3662
#, c-format
msgid ""
"Should not have \"resize\" attribute on <%s> element for maximized states"
msgstr "ไม่ควรมีแอตทริบิวต์ \"resize\" ในอีลิเมนต์ <%s> สำหรับสถานะขยายใหญ่สุด"
msgstr "ไม่ควรมีแอตทริบิวต์ \"resize\" ในอิลิเมนต์ <%s> สำหรับสถานะขยายแผ่"
#: ../src/ui/theme-parser.c:3676 ../src/ui/theme-parser.c:3698
#, c-format
@ -3422,58 +3440,60 @@ msgid ""
"Can't have a two draw_ops for a <piece> element (theme specified a draw_ops "
"attribute and also a <draw_ops> element, or specified two elements)"
msgstr ""
"ไม่สามารถมี draw_ops ซ้อนกันสองค่าสำหรับอลิเมนต์ <piece> "
"(ชุดตกแต่งอาจมีการกำหนดทั้งแอตทริบิวต์ draw_ops และอลิเมนต์ <draw_ops> "
"หรือไม่ก็กำหนดอลิเมนต์ซ้อนกันสองตัว)"
"ไม่สามารถมี draw_ops ซ้อนกันสองค่าสำหรับอลิเมนต์ <piece> "
"(ชุดตกแต่งอาจมีการกำหนดทั้งแอตทริบิวต์ draw_ops และอลิเมนต์ <draw_ops> "
"หรือไม่ก็กำหนดอลิเมนต์ซ้อนกันสองตัว)"
#: ../src/ui/theme-parser.c:3786
msgid ""
"Can't have a two draw_ops for a <button> element (theme specified a draw_ops "
"attribute and also a <draw_ops> element, or specified two elements)"
msgstr ""
"ไม่สามารถมี·draw_ops·ซ้อนกันสองค่าสำหรับอีลิเมนต์·<button>·"
"(ชุดตกแต่งอาจมีการกำหนดทั้งแอตทริบิวต์·draw_ops·และอีลิเมนต์·<draw_ops>·หรือไม่ก็กำหนดอีลิเมนต์ซ้อนกันสองตัว)"
"ไม่สามารถมี draw_ops ซ้อนกันสองค่าสำหรับอิลิเมนต์ <button> "
"(ชุดตกแต่งอาจมีการกำหนดทั้งแอตทริบิวต์ draw_ops และอิลิเมนต์ <draw_ops> "
"หรือไม่ก็กำหนดอิลิเมนต์ซ้อนกันสองตัว)"
#: ../src/ui/theme-parser.c:3824
msgid ""
"Can't have a two draw_ops for a <menu_icon> element (theme specified a "
"draw_ops attribute and also a <draw_ops> element, or specified two elements)"
msgstr ""
"ไม่สามารถมี·draw_ops·ซ้อนกันสองค่าสำหรับอีลิเมนต์·<menu_icon>·"
"(ชุดตกแต่งอาจมีการกำหนดทั้งแอตทริบิวต์·draw_ops·และอีลิเมนต์·<draw_ops>·หรือไม่ก็กำหนดอีลิเมนต์ซ้อนกันสองตัว)"
"ไม่สามารถมี draw_ops ซ้อนกันสองค่าสำหรับอิลิเมนต์ <menu_icon> "
"(ชุดตกแต่งอาจมีการกำหนดทั้งแอตทริบิวต์ draw_ops และอิลิเมนต์ <draw_ops> "
"หรือไม่ก็กำหนดอิลิเมนต์ซ้อนกันสองตัว)"
#: ../src/ui/theme-parser.c:3872
#, c-format
msgid "Outermost element in theme must be <metacity_theme> not <%s>"
msgstr "อลิเมนต์ชั้นนอกสุดของชุดตกแต่งต้องเป็น <metacity_theme> ไม่ใช่ <%s>"
msgstr "อลิเมนต์ชั้นนอกสุดของชุดตกแต่งต้องเป็น <metacity_theme> ไม่ใช่ <%s>"
#: ../src/ui/theme-parser.c:3892
#, c-format
msgid ""
"Element <%s> is not allowed inside a name/author/date/description element"
msgstr "ไม่อนุญาตให้มีอีลิเมนต์·<%s>·ภายในอีลิเมนต์ name/author/date/description"
msgstr "ไม่อนุญาตให้มีอิลิเมนต์ <%s> ภายในอิลิเมนต์ name/author/date/description"
#: ../src/ui/theme-parser.c:3897
#, c-format
msgid "Element <%s> is not allowed inside a <constant> element"
msgstr "ไม่อนุญาตให้มีอีลิเมนต์·<%s>·ภายในอีลิเมนต์ <constant>"
msgstr "ไม่อนุญาตให้มีอิลิเมนต์ <%s> ภายในอิลิเมนต์ <constant>"
#: ../src/ui/theme-parser.c:3909
#, c-format
msgid ""
"Element <%s> is not allowed inside a distance/border/aspect_ratio element"
msgstr "ไม่อนุญาตให้มีอีลิเมนต์·<%s>·ภายในอีลิเมนต์ distance/border/aspect_ratio"
msgstr "ไม่อนุญาตให้มีอิลิเมนต์ <%s> ภายในอิลิเมนต์ distance/border/aspect_ratio"
#: ../src/ui/theme-parser.c:3931
#, c-format
msgid "Element <%s> is not allowed inside a draw operation element"
msgstr "ไม่อนุญาตให้มีอีลิเมนต์·<%s>·ภายในอีลิเมนต์เกี่ยวกับคำสั่งวาด"
msgstr "ไม่อนุญาตให้มีอิลิเมนต์ <%s> ภายในอิลิเมนต์เกี่ยวกับคำสั่งวาด"
#: ../src/ui/theme-parser.c:3941 ../src/ui/theme-parser.c:3971
#: ../src/ui/theme-parser.c:3976 ../src/ui/theme-parser.c:3981
#, c-format
msgid "Element <%s> is not allowed inside a <%s> element"
msgstr "ไม่อนุญาตให้มีอีลิเมนต์·<%s>·ภายในอีลิเมนต์·<%s>"
msgstr "ไม่อนุญาตให้มีอิลิเมนต์ <%s> ภายในอิลิเมนต์ <%s>"
#: ../src/ui/theme-parser.c:4203
msgid "No draw_ops provided for frame piece"
@ -3486,7 +3506,7 @@ msgstr "ขาด draw_ops สำหรับปุ่ม"
#: ../src/ui/theme-parser.c:4270
#, c-format
msgid "No text is allowed inside element <%s>"
msgstr "ไม่อนุญาตให้มีข้อความภายในอลิเมนต์ <%s>"
msgstr "ไม่อนุญาตให้มีข้อความภายในอลิเมนต์ <%s>"
#: ../src/ui/theme-parser.c:4325
msgid "<name> specified twice for this theme"
@ -3516,7 +3536,7 @@ msgstr "หาแฟ้มที่ใช้การได้สำหรับ
#: ../src/ui/theme-parser.c:4692
#, c-format
msgid "Theme file %s did not contain a root <metacity_theme> element"
msgstr "แฟ้มชุดตกแต่ง %s ไม่มีอลิเมนต์ราก <metacity_theme>"
msgstr "แฟ้มชุดตกแต่ง %s ไม่มีอลิเมนต์ราก <metacity_theme>"
#: ../src/ui/theme-viewer.c:75
msgid "/_Windows"
@ -3684,7 +3704,7 @@ msgstr "การทดสอบนิพจน์ตำแหน่งให้
#: ../src/ui/theme-viewer.c:1246
msgid "position expression test returned FALSE but didn't set error"
msgstr "การทดสอบนิพจน์ตำแหน่งให้ค่าเท็จ·แต่ไม่มีรหัสข้อผิดพลาด"
msgstr "การทดสอบนิพจน์ตำแหน่งให้ค่าเท็จ แต่ไม่มีรหัสข้อผิดพลาด"
#: ../src/ui/theme-viewer.c:1250
msgid "Error was expected but none given"
@ -3708,7 +3728,7 @@ msgstr "ค่าของ x เป็น %d แต่ที่คาดหว
#: ../src/ui/theme-viewer.c:1265
#, c-format
msgid "y value was %d, %d was expected"
msgstr "ค่าของ·y·เป็น·%d·แต่ที่คาดหวังไว้น่าจะเป็น·%d"
msgstr "ค่าของ y เป็น %d แต่ที่คาดหวังไว้น่าจะเป็น %d"
#: ../src/ui/theme-viewer.c:1330
#, c-format

View File

@ -100,7 +100,8 @@ metacity_SOURCES= \
ui/theme.h \
ui/themewidget.c \
ui/themewidget.h \
ui/ui.c
ui/ui.c \
include/all-keybindings.h
if WITH_CLUTTER
metacity_SOURCES += \
@ -163,6 +164,15 @@ metacity_theme_viewer_SOURCES= \
metacity_dialog_SOURCES= \
ui/metacity-dialog.c
schema_bindings_SOURCES = \
core/schema-bindings.c \
metacity.schemas.in.in
schema_bindings_LDADD = @METACITY_LIBS@
metacity.schemas.in: schema_bindings ${srcdir}/metacity.schemas.in.in
@echo Generating keybinding schemas... ${srcdir}/metacity.schemas.in.in
${builddir}/schema_bindings ${srcdir}/metacity.schemas.in.in ${builddir}/metacity.schemas.in
bin_PROGRAMS=metacity metacity-theme-viewer
libexec_PROGRAMS=metacity-dialog
@ -176,7 +186,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
noinst_PROGRAMS=testboxes testgradient testasyncgetprop schema_bindings
testboxes_LDADD= @METACITY_LIBS@
testgradient_LDADD= @METACITY_LIBS@
@ -219,7 +229,7 @@ VARIABLES=stock_maximize_data $(srcdir)/stock_maximize.png \
stock_delete_data $(srcdir)/stock_delete.png
BUILT_SOURCES = inlinepixbufs.h
CLEANFILES = inlinepixbufs.h metacity.desktop metacity-wm.desktop metacity.schemas 50-metacity-desktop-key.xml 50-metacity-key.xml
CLEANFILES = inlinepixbufs.h metacity.desktop metacity-wm.desktop metacity.schemas metacity.schemas.in 50-metacity-desktop-key.xml 50-metacity-key.xml
inlinepixbufs.h: $(IMAGES)
$(GDK_PIXBUF_CSOURCE) --raw --build-list $(VARIABLES) >$(srcdir)/inlinepixbufs.h

View File

@ -26,6 +26,8 @@
#include <config.h>
#ifdef HAVE_COMPOSITE_EXTENSIONS
#include <stdlib.h>
#include <string.h>
#include <math.h>
@ -3060,3 +3062,6 @@ meta_compositor_xrender_new (MetaDisplay *display)
return NULL;
#endif
}
#endif /* HAVE_COMPOSITE_EXTENSIONS */

View File

@ -586,7 +586,7 @@ ag_task_get_reply_and_free (AgGetPropertyTask *task,
int *actual_format,
unsigned long *nitems,
unsigned long *bytesafter,
char **prop)
unsigned char **prop)
{
Display *dpy;
@ -615,7 +615,7 @@ ag_task_get_reply_and_free (AgGetPropertyTask *task,
*nitems = task->n_items;
*bytesafter = task->bytes_after;
*prop = task->data; /* pass out ownership of task->data */
*prop = (unsigned char*) task->data; /* pass out ownership of task->data */
SyncHandle ();

View File

@ -47,7 +47,7 @@ Status ag_task_get_reply_and_free (AgGetPropertyTask *task,
int *actual_format,
unsigned long *nitems,
unsigned long *bytesafter,
char **prop);
unsigned char **prop);
Bool ag_task_have_reply (AgGetPropertyTask *task);
Atom ag_task_get_property (AgGetPropertyTask *task);

View File

@ -197,6 +197,40 @@ meta_rectangle_equal (const MetaRectangle *src1,
(src1->height == src2->height));
}
void
meta_rectangle_union (const MetaRectangle *rect1,
const MetaRectangle *rect2,
MetaRectangle *dest)
{
int dest_x, dest_y;
int dest_w, dest_h;
dest_x = rect1->x;
dest_y = rect1->y;
dest_w = rect1->width;
dest_h = rect1->height;
if (rect2->x < dest_x)
{
dest_w += dest_x - rect2->x;
dest_x = rect2->x;
}
if (rect2->y < dest_y)
{
dest_h += dest_y - rect2->y;
dest_y = rect2->y;
}
if (rect2->x + rect2->width > dest_x + dest_w)
dest_w = rect2->x + rect2->width - dest_x;
if (rect2->y + rect2->height > dest_y + dest_h)
dest_h = rect2->y + rect2->height - dest_y;
dest->x = dest_x;
dest->y = dest_y;
dest->width = dest_w;
dest->height = dest_h;
}
gboolean
meta_rectangle_overlap (const MetaRectangle *rect1,
const MetaRectangle *rect2)

View File

@ -392,7 +392,27 @@ setup_constraint_info (ConstraintInfo *info,
meta_window_get_work_area_for_xinerama (window,
xinerama_info->number,
&info->work_area_xinerama);
info->entire_xinerama = xinerama_info->rect;
if (!window->fullscreen || window->fullscreen_monitors[0] == -1)
{
info->entire_xinerama = xinerama_info->rect;
}
else
{
int i = 0;
long monitor;
monitor = window->fullscreen_monitors[i];
info->entire_xinerama =
window->screen->xinerama_infos[monitor].rect;
for (i = 1; i <= 3; i++)
{
monitor = window->fullscreen_monitors[i];
meta_rectangle_union (&info->entire_xinerama,
&window->screen->xinerama_infos[monitor].rect,
&info->entire_xinerama);
}
}
cur_workspace = window->screen->active_workspace;
info->usable_screen_region =
@ -784,7 +804,9 @@ constrain_fullscreen (MetaWindow *window,
/* Determine whether constraint applies; exit if it doesn't */
if (!window->fullscreen)
return TRUE;
xinerama = info->entire_xinerama;
get_size_limits (window, info->fgeom, FALSE, &min_size, &max_size);
too_big = !meta_rectangle_could_fit_rect (&xinerama, &min_size);
too_small = !meta_rectangle_could_fit_rect (&max_size, &xinerama);

View File

@ -491,7 +491,7 @@ meta_window_present_delete_dialog (MetaWindow *window, guint32 timestamp)
if (w->xtransient_for == window->xwindow &&
w->res_class &&
g_strcasecmp (w->res_class, "metacity-dialog") == 0)
g_ascii_strcasecmp (w->res_class, "metacity-dialog") == 0)
{
meta_window_activate (w, timestamp);
break;

View File

@ -200,10 +200,8 @@ struct _MetaDisplay
int grab_resize_timeout_id;
/* Keybindings stuff */
MetaKeyBinding *screen_bindings;
int n_screen_bindings;
MetaKeyBinding *window_bindings;
int n_window_bindings;
MetaKeyBinding *key_bindings;
int n_key_bindings;
int min_keycode;
int max_keycode;
KeySym *keymap;

View File

@ -3264,9 +3264,10 @@ meta_display_begin_grab_op (MetaDisplay *display,
if (display->grab_op != META_GRAB_OP_NONE)
{
meta_warning ("Attempt to perform window operation %u on window %s when operation %u on %s already in effect\n",
op, window ? window->desc : "none", display->grab_op,
display->grab_window ? display->grab_window->desc : "none");
if (window)
meta_warning ("Attempt to perform window operation %u on window %s when operation %u on %s already in effect\n",
op, window->desc, display->grab_op,
display->grab_window ? display->grab_window->desc : "none");
return FALSE;
}

View File

@ -225,11 +225,12 @@ read_rgb_icon (MetaDisplay *display,
gulong nitems;
gulong bytes_after;
int result, err;
gulong *data;
guchar *data;
gulong *best;
int w, h;
gulong *best_mini;
int mini_w, mini_h;
gulong *data_as_long;
meta_error_trap_push_with_return (display);
type = None;
@ -239,8 +240,7 @@ read_rgb_icon (MetaDisplay *display,
display->atom__NET_WM_ICON,
0, G_MAXLONG,
False, XA_CARDINAL, &type, &format, &nitems,
&bytes_after, ((guchar **)&data));
&bytes_after, &data);
err = meta_error_trap_pop_with_return (display, TRUE);
if (err != Success ||
@ -253,7 +253,9 @@ read_rgb_icon (MetaDisplay *display,
return FALSE;
}
if (!find_best_size (data, nitems,
data_as_long = (gulong *)data;
if (!find_best_size (data_as_long, nitems,
ideal_width, ideal_height,
&w, &h, &best))
{
@ -261,7 +263,7 @@ read_rgb_icon (MetaDisplay *display,
return FALSE;
}
if (!find_best_size (data, nitems,
if (!find_best_size (data_as_long, nitems,
ideal_mini_width, ideal_mini_height,
&mini_w, &mini_h, &best_mini))
{
@ -464,6 +466,7 @@ get_kwm_win_icon (MetaDisplay *display,
int format;
gulong nitems;
gulong bytes_after;
guchar *data;
Pixmap *icons;
int err, result;
@ -478,7 +481,8 @@ get_kwm_win_icon (MetaDisplay *display,
False,
display->atom__KWM_WIN_ICON,
&type, &format, &nitems,
&bytes_after, (guchar **)&icons);
&bytes_after, &data);
icons = (Pixmap *)data;
err = meta_error_trap_pop_with_return (display, TRUE);
if (err != Success ||
@ -817,30 +821,14 @@ meta_read_icons (MetaScreen *screen,
if (icon_cache->want_fallback &&
icon_cache->origin < USING_FALLBACK_ICON)
{
GdkPixbuf *fallback_icon;
GdkPixbuf *fallback_mini_icon;
fallback_icon = NULL;
fallback_mini_icon = NULL;
get_fallback_icons (screen,
iconp,
ideal_width,
ideal_height,
mini_iconp,
ideal_mini_width,
ideal_mini_height);
meta_ui_get_fallback_icons(&fallback_icon, &fallback_mini_icon);
if (fallback_icon == NULL || fallback_mini_icon == NULL)
{
get_fallback_icons (screen,
iconp,
ideal_width,
ideal_height,
mini_iconp,
ideal_mini_width,
ideal_mini_height);
}
if (fallback_icon != NULL)
*iconp = fallback_icon;
if (fallback_mini_icon != NULL)
*mini_iconp = fallback_mini_icon;
replace_cache (icon_cache, USING_FALLBACK_ICON,
*iconp, *mini_iconp);

File diff suppressed because it is too large Load Diff

View File

@ -418,8 +418,8 @@ meta_clutter_init (GOptionContext *ctx, int *argc, char ***argv)
* try to use the environment variable METACITY_DISPLAY. If that
* also is NULL, use the default - :0.0
*/
static
void meta_select_display (gchar *display_name)
static void
meta_select_display (gchar *display_name)
{
gchar *envVar = "";
if (display_name)
@ -430,6 +430,23 @@ void meta_select_display (gchar *display_name)
/* DO NOT FREE envVar, putenv() sucks */
putenv (envVar);
}
static void
meta_finalize (void)
{
meta_display_close (meta_get_display (),
CurrentTime); /* I doubt correct timestamps matter here */
meta_session_shutdown ();
}
static void
sigterm_handler (int signum)
{
meta_finalize ();
exit (meta_exit_code);
}
/**
* This is where the story begins. It parses commandline options and
@ -471,13 +488,20 @@ main (int argc, char **argv)
g_strerror (errno));
#endif
act.sa_handler = &sigterm_handler;
if (sigaction (SIGTERM, &act, NULL) < 0)
g_printerr ("Failed to register SIGTERM handler: %s\n",
g_strerror (errno));
if (g_getenv ("METACITY_VERBOSE"))
meta_set_verbose (TRUE);
if (g_getenv ("METACITY_DEBUG"))
meta_set_debugging (TRUE);
if (g_get_home_dir ())
chdir (g_get_home_dir ());
if (chdir (g_get_home_dir ()) < 0)
meta_warning ("Could not change to home directory %s.\n",
g_get_home_dir ());
meta_print_self_identity ();
@ -630,11 +654,8 @@ main (int argc, char **argv)
g_main_loop_run (meta_main_loop);
meta_display_close (meta_get_display (),
CurrentTime); /* I doubt correct timestamps matter here */
meta_finalize ();
meta_session_shutdown ();
if (meta_restart_after_quit)
{
GError *err;

View File

@ -29,7 +29,7 @@
#include "place.h"
#include "workspace.h"
#include "prefs.h"
#include <gdk/gdkregion.h>
#include <gdk/gdk.h>
#include <math.h>
#include <stdlib.h>

View File

@ -74,8 +74,8 @@
static GConfClient *default_client = NULL;
static GList *changes = NULL;
static guint changed_idle;
#endif
static GList *listeners = NULL;
#endif
static gboolean use_system_font = FALSE;
static PangoFontDescription *titlebar_font = NULL;
@ -122,17 +122,13 @@ static gboolean live_hidden_windows = FALSE;
#ifdef HAVE_GCONF
static gboolean handle_preference_update_enum (const gchar *key, GConfValue *value);
static gboolean update_window_binding (const char *name,
const char *value);
static gboolean update_screen_binding (const char *name,
const char *value);
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_window_list_binding (const char *name,
GSList *value);
static gboolean update_screen_list_binding (const char *name,
GSList *value);
static gboolean update_key_list_binding (const char *name,
GSList *value);
static gboolean update_command (const char *name,
const char *value);
static gboolean update_workspace_name (const char *name,
@ -676,8 +672,11 @@ handle_preference_update_enum (const gchar *key, GConfValue *value)
* 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 (_("GConf key '%s' is set to an invalid value\n"),
key);
return TRUE;
@ -1003,6 +1002,7 @@ meta_prefs_remove_listener (MetaPrefsChangedFunc func,
/* Initialisation. */
/****************************************************************************/
#ifdef HAVE_GCONF
/* @@@ again, use glib's ability to tell you the size of the array */
static gchar *gconf_dirs_we_are_interested_in[] = {
"/apps/metacity",
@ -1012,6 +1012,7 @@ static gchar *gconf_dirs_we_are_interested_in[] = {
"/desktop/gnome/interface",
NULL,
};
#endif
void
meta_prefs_init (void)
@ -1122,17 +1123,13 @@ change_notify (GConfClient *client,
while (preference_update_handler[i]!=NULL)
{
if (preference_update_handler[i] (key, value))
goto out; /* Get rid of this when we're done with the if */
goto out; /* Get rid of this eventually */
i++;
}
/* Otherwise, use the enormous if statement. We'll move entries
* out of here as it becomes possible to deal with them in a
* more general way.
*/
if (g_str_has_prefix (key, KEY_WINDOW_BINDINGS_PREFIX))
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))
{
@ -1147,8 +1144,8 @@ change_notify (GConfClient *client,
list = value ? gconf_value_get_list (value) : NULL;
if (update_window_list_binding (key, list))
queue_changed (META_PREF_WINDOW_KEYBINDINGS);
if (update_key_list_binding (key, list))
queue_changed (META_PREF_KEYBINDINGS);
}
else
{
@ -1163,43 +1160,8 @@ change_notify (GConfClient *client,
str = value ? gconf_value_get_string (value) : NULL;
if (update_window_binding (key, str))
queue_changed (META_PREF_WINDOW_KEYBINDINGS);
}
}
else if (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 != GCONF_VALUE_LIST)
{
meta_warning (_("GConf key \"%s\" is set to an invalid type\n"),
key);
goto out;
}
list = value ? gconf_value_get_list (value) : NULL;
if (update_screen_list_binding (key, list))
queue_changed (META_PREF_SCREEN_KEYBINDINGS);
}
else
{
const char *str;
if (value && value->type != GCONF_VALUE_STRING)
{
meta_warning (_("GConf key \"%s\" is set to an invalid type\n"),
key);
goto out;
}
str = value ? gconf_value_get_string (value) : NULL;
if (update_screen_binding (key, str))
queue_changed (META_PREF_SCREEN_KEYBINDINGS);
if (update_key_binding (key, str))
queue_changed (META_PREF_KEYBINDINGS);
}
}
else if (g_str_has_prefix (key, KEY_COMMAND_PREFIX))
@ -1377,15 +1339,16 @@ titlebar_handler (MetaPreference pref,
const gchar *string_value,
gboolean *inform_listeners)
{
PangoFontDescription *new_desc;
PangoFontDescription *new_desc = NULL;
new_desc = pango_font_description_from_string (string_value);
if (string_value)
new_desc = pango_font_description_from_string (string_value);
if (new_desc == NULL)
{
meta_warning (_("Could not parse font description "
"\"%s\" from GConf key %s\n"),
string_value,
string_value ? string_value : "(null)",
KEY_TITLEBAR_FONT);
*inform_listeners = FALSE;
@ -1434,7 +1397,7 @@ mouse_button_mods_handler (MetaPreference pref,
meta_topic (META_DEBUG_KEYBINDINGS,
"Mouse button modifier has new gconf value \"%s\"\n",
string_value);
if (meta_ui_parse_modifier (string_value, &mods))
if (string_value && meta_ui_parse_modifier (string_value, &mods))
{
mouse_button_mods = mods;
}
@ -1529,16 +1492,17 @@ button_layout_handler (MetaPreference pref,
gboolean *inform_listeners)
{
MetaButtonLayout new_layout;
char **sides;
char **sides = NULL;
int i;
/* We need to ignore unknown button functions, for
* compat with future versions
*/
sides = g_strsplit (string_value, ":", 2);
if (string_value)
sides = g_strsplit (string_value, ":", 2);
if (sides[0] != NULL)
if (sides != NULL && sides[0] != NULL)
{
char **buttons;
int b;
@ -1598,7 +1562,7 @@ button_layout_handler (MetaPreference pref,
g_strfreev (buttons);
}
if (sides[0] != NULL && sides[1] != NULL)
if (sides != NULL && sides[0] != NULL && sides[1] != NULL)
{
char **buttons;
int b;
@ -1770,11 +1734,8 @@ meta_preference_to_string (MetaPreference pref)
case META_PREF_APPLICATION_BASED:
return "APPLICATION_BASED";
case META_PREF_SCREEN_KEYBINDINGS:
return "SCREEN_KEYBINDINGS";
case META_PREF_WINDOW_KEYBINDINGS:
return "WINDOW_KEYBINDINGS";
case META_PREF_KEYBINDINGS:
return "KEYBINDINGS";
case META_PREF_DISABLE_WORKAROUNDS:
return "DISABLE_WORKAROUNDS";
@ -1876,23 +1837,22 @@ meta_prefs_set_num_workspaces (int n_workspaces)
#endif /* HAVE_GCONF */
}
static MetaKeyPref screen_bindings[] = {
#define item(name, suffix, param, has_inverse, short, long, stroke) \
{ #name suffix, NULL, has_inverse },
#include "screen-bindings.h"
#undef item
{ NULL, NULL, FALSE}
};
static MetaKeyPref window_bindings[] = {
#define item(name, suffix, param, short, long, stroke) \
{ #name suffix, NULL, FALSE },
#include "window-bindings.h"
#undef item
#define keybind(name, handler, param, flags, stroke, description) \
{ #name, NULL, !!(flags & BINDING_REVERSES), !!(flags & BINDING_PER_WINDOW) },
static MetaKeyPref key_bindings[] = {
#include "all-keybindings.h"
{ NULL, NULL, FALSE }
};
#undef keybind
#ifndef HAVE_GCONF
/**
* A type to map names of keybindings (such as "switch_windows")
* to the binding strings themselves (such as "<Alt>Tab").
* It exists only when GConf is turned off in ./configure and
* functions as a sort of ersatz GConf.
*/
typedef struct
{
const char *name;
@ -1900,110 +1860,65 @@ typedef struct
} MetaSimpleKeyMapping;
/* FIXME: This would be neater if the array only contained entries whose
* default keystroke was non-null. You can do this by defining
* 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.
*/
static MetaSimpleKeyMapping screen_string_bindings[] = {
#define item(name, suffix, param, is_reverse, short, long, keystroke) \
{ #name suffix, keystroke },
#include "screen-bindings.h"
#undef item
{ NULL, NULL }
};
static MetaSimpleKeyMapping window_string_bindings[] = {
#define ONLY_BOUND_BY_DEFAULT
#define item(name, suffix, param, short, long, keystroke) \
{ #name suffix, keystroke },
#include "window-bindings.h"
#undef item
#undef ONLY_BOUND_BY_DEFAULT
{ NULL, NULL }
#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_GCONF */
static void
init_bindings (void)
{
#ifdef HAVE_GCONF
int i;
#ifdef HAVE_GCONF
int i = 0;
GError *err;
i = 0;
while (window_bindings[i].name)
while (key_bindings[i].name)
{
GSList *list_val, *tmp;
char *str_val;
char *key;
key = g_strconcat (KEY_WINDOW_BINDINGS_PREFIX, "/",
window_bindings[i].name, NULL);
key = g_strconcat (key_bindings[i].per_window?
KEY_WINDOW_BINDINGS_PREFIX:
KEY_SCREEN_BINDINGS_PREFIX,
"/",
key_bindings[i].name, NULL);
err = NULL;
str_val = gconf_client_get_string (default_client, key, &err);
cleanup_error (&err);
update_binding (&window_bindings[i], str_val);
update_binding (&key_bindings[i], str_val);
g_free (str_val);
g_free (key);
key = g_strconcat (KEY_WINDOW_BINDINGS_PREFIX, "/",
window_bindings[i].name,
key = g_strconcat (key_bindings[i].per_window?
KEY_WINDOW_BINDINGS_PREFIX:
KEY_SCREEN_BINDINGS_PREFIX,
"/",
key_bindings[i].name,
KEY_LIST_BINDINGS_SUFFIX, NULL);
err = NULL;
list_val = gconf_client_get_list (default_client, key, GCONF_VALUE_STRING, &err);
cleanup_error (&err);
update_list_binding (&window_bindings[i], list_val, META_LIST_OF_STRINGS);
tmp = list_val;
while (tmp)
{
g_free (tmp->data);
tmp = tmp->next;
}
g_slist_free (list_val);
g_free (key);
++i;
}
i = 0;
while (screen_bindings[i].name)
{
GSList *list_val, *tmp;
char *str_val;
char *key;
key = g_strconcat (KEY_SCREEN_BINDINGS_PREFIX, "/",
screen_bindings[i].name, NULL);
err = NULL;
str_val = gconf_client_get_string (default_client, key, &err);
cleanup_error (&err);
update_binding (&screen_bindings[i], str_val);
g_free (str_val);
g_free (key);
key = g_strconcat (KEY_SCREEN_BINDINGS_PREFIX, "/",
screen_bindings[i].name,
KEY_LIST_BINDINGS_SUFFIX, NULL);
err = NULL;
list_val = gconf_client_get_list (default_client, key, GCONF_VALUE_STRING, &err);
cleanup_error (&err);
update_list_binding (&screen_bindings[i], list_val, META_LIST_OF_STRINGS);
update_list_binding (&key_bindings[i], list_val, META_LIST_OF_STRINGS);
tmp = list_val;
while (tmp)
@ -2019,42 +1934,20 @@ init_bindings (void)
#else /* HAVE_GCONF */
int i = 0;
int which = 0;
while (window_string_bindings[i].name)
while (key_string_bindings[i].name)
{
if (window_string_bindings[i].keybinding == NULL)
continue;
/* Find which window_bindings entry this window_string_bindings entry
* corresponds to.
*/
while (strcmp(window_bindings[which].name,
window_string_bindings[i].name) != 0)
which++;
/* Set the binding */
update_binding (&window_bindings[which],
window_string_bindings[i].keybinding);
++i;
}
i = 0;
which = 0;
while (screen_string_bindings[i].name)
{
if (screen_string_bindings[i].keybinding == NULL)
if (key_string_bindings[i].keybinding == NULL) {
++i;
continue;
}
/* Find which window_bindings entry this window_string_bindings entry
* corresponds to.
*/
while (strcmp(screen_bindings[which].name,
screen_string_bindings[i].name) != 0)
while (strcmp(key_bindings[which].name,
key_string_bindings[i].name) != 0)
which++;
/* Set the binding */
update_binding (&screen_bindings[which],
screen_string_bindings[i].keybinding);
update_binding (&key_bindings[which],
key_string_bindings[i].keybinding);
++i;
}
@ -2141,7 +2034,7 @@ update_binding (MetaKeyPref *binding,
MetaVirtualModifier mods;
MetaKeyCombo *combo;
gboolean changed;
meta_topic (META_DEBUG_KEYBINDINGS,
"Binding \"%s\" has new gconf value \"%s\"\n",
binding->name, value ? value : "none");
@ -2174,8 +2067,8 @@ update_binding (MetaKeyPref *binding,
#ifdef HAVE_GCONF
/* Bug 329676: Bindings which can be shifted must not have no modifiers,
* nor only SHIFT as a modifier.
*/
* nor only SHIFT as a modifier.
*/
if (binding->add_shift &&
0 != keysym &&
@ -2209,6 +2102,11 @@ update_binding (MetaKeyPref *binding,
binding->name,
old_setting);
/* FIXME: add_shift is currently screen_bindings only, but
* there's no really good reason it should always be.
* So we shouldn't blindly add KEY_SCREEN_BINDINGS_PREFIX
* onto here.
*/
key = g_strconcat (KEY_SCREEN_BINDINGS_PREFIX, "/",
binding->name, NULL);
@ -2412,17 +2310,10 @@ find_and_update_binding (MetaKeyPref *bindings,
}
static gboolean
update_window_binding (const char *name,
update_key_binding (const char *name,
const char *value)
{
return find_and_update_binding (window_bindings, name, value);
}
static gboolean
update_screen_binding (const char *name,
const char *value)
{
return find_and_update_binding (screen_bindings, name, value);
return find_and_update_binding (key_bindings, name, value);
}
static gboolean
@ -2455,17 +2346,10 @@ find_and_update_list_binding (MetaKeyPref *bindings,
}
static gboolean
update_window_list_binding (const char *name,
update_key_list_binding (const char *name,
GSList *value)
{
return find_and_update_list_binding (window_bindings, name, value);
}
static gboolean
update_screen_list_binding (const char *name,
GSList *value)
{
return find_and_update_list_binding (screen_bindings, name, value);
return find_and_update_list_binding (key_bindings, name, value);
}
static gboolean
@ -2768,20 +2652,12 @@ meta_prefs_get_visual_bell_type (void)
}
void
meta_prefs_get_screen_bindings (const MetaKeyPref **bindings,
meta_prefs_get_key_bindings (const MetaKeyPref **bindings,
int *n_bindings)
{
*bindings = screen_bindings;
*n_bindings = (int) G_N_ELEMENTS (screen_bindings) - 1;
}
void
meta_prefs_get_window_bindings (const MetaKeyPref **bindings,
int *n_bindings)
{
*bindings = window_bindings;
*n_bindings = (int) G_N_ELEMENTS (window_bindings) - 1;
*bindings = key_bindings;
*n_bindings = (int) G_N_ELEMENTS (key_bindings) - 1;
}
MetaActionTitlebar
@ -2837,10 +2713,10 @@ meta_prefs_get_keybinding_action (const char *name)
{
int i;
i = G_N_ELEMENTS (screen_bindings) - 2; /* -2 for dummy entry at end */
i = G_N_ELEMENTS (key_bindings) - 2; /* -2 for dummy entry at end */
while (i >= 0)
{
if (strcmp (screen_bindings[i].name, name) == 0)
if (strcmp (key_bindings[i].name, name) == 0)
return (MetaKeyBindingAction) i;
--i;
@ -2860,12 +2736,13 @@ meta_prefs_get_window_binding (const char *name,
{
int i;
i = G_N_ELEMENTS (window_bindings) - 2; /* -2 for dummy entry at end */
i = G_N_ELEMENTS (key_bindings) - 2; /* -2 for dummy entry at end */
while (i >= 0)
{
if (strcmp (window_bindings[i].name, name) == 0)
if (key_bindings[i].per_window &&
strcmp (key_bindings[i].name, name) == 0)
{
GSList *s = window_bindings[i].bindings;
GSList *s = key_bindings[i].bindings;
while (s)
{

View File

@ -21,139 +21,170 @@
/** \file Schema bindings generator.
*
* This program simply takes the items given in the binding lists in
* window-bindings.h and scheme-bindings.h and turns them into a portion of
* This program simply takes the items given in the binding list in
* all-keybindings.h and turns them into a portion of
* the GConf .schemas file.
*
* FIXME: also need to make 50-metacity-desktop-key.xml
*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <errno.h>
#include <glib.h>
#include "config.h"
#define _(x) x
char *liberal, *could_go_backwards, *could_go_forwards;
static void single_stanza (gboolean is_window, const char *name,
const char *default_value,
gboolean can_reverse,
const char *description);
const char* window_string = \
" <schema>\n" \
" <key>/schemas/apps/metacity/%s_keybindings/%s%s</key>\n" \
" <applyto>/apps/metacity/%s_keybindings/%s%s</applyto>\n" \
" <owner>metacity</owner>\n" \
" <type>string</type>\n" \
" <default>%s</default>\n" \
" <locale name=\"C\">\n" \
" <short>%s</short>\n" \
" <long>\n" \
" %s %s\n" \
" </long>\n" \
" </locale>\n" \
" </schema>\n\n\n";
char *about_keybindings, *about_reversible_keybindings;
void
single_stanza (gboolean is_window, char *name, char *default_value,
gboolean can_reverse, gboolean going_backwards,
char *short_description, char *long_description)
char *source_filename, *target_filename;
FILE *source_file, *target_file;
static void
single_stanza (gboolean is_window, const char *name,
const char *default_value,
gboolean can_reverse,
const char *description)
{
char *keybinding_type = is_window? "window": "global";
char *escaped_default_value;
char *escaped_default_value, *escaped_description;
if (short_description == NULL || long_description == NULL)
/* it must be undocumented, so it can't be in this table */
return;
if (description==NULL)
return; /* it must be undocumented, so it can't go in this table */
/* Escape the text. The old values point at constants (literals, actually)
* so it doesn't matter that we lose the reference.
*/
short_description = g_markup_escape_text (short_description, -1);
long_description = g_markup_escape_text (long_description, -1);
escaped_description = g_markup_escape_text (description, -1);
escaped_default_value = default_value==NULL? "disabled":
g_markup_escape_text (default_value, -1);
escaped_default_value = g_markup_escape_text (
default_value? default_value: "disabled",
-1);
printf (" <schema>\n");
printf (" <key>/schemas/apps/metacity/%s_keybindings/%s</key>\n",
fprintf (target_file, " <schema>\n");
fprintf (target_file, " <key>/schemas/apps/metacity/%s_keybindings/%s</key>\n",
keybinding_type, name);
printf (" <applyto>/apps/metacity/%s_keybindings/%s</applyto>\n",
fprintf (target_file, " <applyto>/apps/metacity/%s_keybindings/%s</applyto>\n",
keybinding_type, name);
printf (" <owner>metacity</owner>\n");
printf (" <type>string</type>\n");
printf (" <default>%s</default>\n", escaped_default_value);
printf (" <locale name=\"C\">\n");
printf (" <short>%s</short>\n", short_description);
printf (" <long>\n");
printf (" %s\n", long_description);
if (can_reverse)
{
/* I don't think this is very useful, tbh: */
if (default_value != NULL)
{
printf (" (Traditionally %s)\n", escaped_default_value);
}
if (going_backwards)
printf (could_go_forwards);
else
printf (could_go_backwards);
}
fprintf (target_file, " <owner>metacity</owner>\n");
fprintf (target_file, " <type>string</type>\n");
fprintf (target_file, " <default>%s</default>\n", escaped_default_value);
printf (" </long>\n");
printf (" </locale>\n");
printf (" </schema>\n\n\n");
g_free (escaped_default_value);
g_free (short_description);
g_free (long_description);
fprintf (target_file, " <locale name=\"C\">\n");
fprintf (target_file, " <short>%s</short>\n", description);
fprintf (target_file, " <long>%s</long>\n",
can_reverse? about_reversible_keybindings:
about_keybindings);
fprintf (target_file, " </locale>\n");
fprintf (target_file, " </schema>\n\n");
g_free (escaped_description);
if (default_value!=NULL)
g_free (escaped_default_value);
}
void
static void produce_bindings ();
static void
produce_bindings ()
{
#define item(name, suffix, param, short, long, keystroke) \
single_stanza (TRUE, #name suffix, \
keystroke, \
FALSE, FALSE, \
short, long);
#include "window-bindings.h"
#undef item
/* 10240 is ridiculous overkill; we're writing the input file and
* the lines are always 80 chars or less.
*/
char buffer[10240];
#define item(name, suffix, param, flags, short, long, keystroke) \
single_stanza (FALSE, #name suffix, \
keystroke, \
source_file = fopen(source_filename, "r");
if (!source_file)
{
g_error ("Cannot compile without %s: %s\n",
source_filename, strerror (errno));
}
target_file = fopen(target_filename, "w");
if (!target_file)
{
g_error ("Cannot create %s: %s\n",
target_filename, strerror (errno));
}
while (fgets (buffer, sizeof (buffer), source_file))
{
if (strstr (buffer, "<!-- GENERATED -->"))
break;
fprintf (target_file, "%s", buffer);
}
if (!feof (source_file))
{
#define keybind(name, handler, param, flags, stroke, description) \
single_stanza ( \
flags & BINDING_PER_WINDOW, \
#name, \
stroke, \
flags & BINDING_REVERSES, \
flags & BINDING_IS_REVERSED, \
short, long);
#include "screen-bindings.h"
#undef item
description);
#include "all-keybindings.h"
#undef keybind
}
while (fgets (buffer, sizeof (buffer), source_file))
fprintf (target_file, "%s", buffer);
if (fclose (source_file)!=0)
g_error ("Cannot close %s: %s\n",
source_filename, strerror (errno));
if (fclose (target_file)!=0)
g_error ("Cannot close %s: %s\n",
target_filename, strerror (errno));
}
int
main ()
main (int argc, char **argv)
{
/* XXX: TODO: find out what/how gdk i18ns the keycaps as, and add a
* translator comment
if (argc!=3)
{
g_error ("Syntax: %s <source.in.in> <target.in>\n", argv[0]);
}
source_filename = argv[1];
target_filename = argv[2];
/* Translators: Please don't translate "Control", "Shift", etc, since these
* are hardcoded (in gtk/gtkaccelgroup.c; it's not metacity's fault).
* "disabled" must also stay as it is.
*/
liberal = g_markup_escape_text(_("The parser is fairly liberal and allows "\
about_keybindings = g_markup_escape_text(_( \
"The format looks like \"<Control>a\" or <Shift><Alt>F1\".\n\n"\
"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."), -1);
"\"disabled\", then there will be no keybinding for this action."),
-1);
/* These were more dissimilar at some point but have been regularised
* for the translators' benefit.
*/
could_go_backwards = g_markup_escape_text (_("Holding the \"shift\" key "
"while using this binding reverses the direction of movement."), -1);
could_go_forwards = g_markup_escape_text (_("Holding the \"shift\" key "
"while using this binding makes the direction go forward again."), -1);
about_reversible_keybindings = g_markup_escape_text(_( \
"The format looks like \"<Control>a\" or <Shift><Alt>F1\".\n\n"\
"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.\n\n"\
"This keybinding may be reversed by holding down the \"shift\" key; "
"therefore, \"shift\" cannot be one of the keys it uses."),
-1);
produce_bindings ();
g_free (about_keybindings);
g_free (about_reversible_keybindings);
g_free (could_go_forwards);
g_free (could_go_backwards);
g_free (liberal);
return 0;
}
/* eof schema-bindings.c */

View File

@ -1,307 +0,0 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/*
* Copyright (C) 2008 Thomas Thurman
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
/**
* A list of screen keybinding information.
*
* Each action which can have a keystroke bound to it is listed below.
* To use this file, define "item" to be a seven-argument macro (you can
* throw any of the arguments you please away), include this file,
* and then undefine the macro again.
*
* (If you aren't familiar with this technique, sometimes called "x-macros",
* see DDJ of May 2001: <http://www.ddj.com/cpp/184401387>.)
*
* This makes it possible to keep all information about all the keybindings
* in the same place. The only exception is the code to run when an action
* is actually invoked; while we *could* have put that in this file, it would
* have made debugging ridiculously difficult. Instead, each action should
* have a corresponding static function named handle_<name>() in
* keybindings.c.
*
* (This may merge with window-bindings.h at some point, but traditionally
* they have been separate concerns. Meanwhile, it is important that actions
* don't have names which clash between the two.)
*
* Currently, the GConf schemas in src/metacity.schemas also need to be
* updated separately. There is a program called schema-bindings.c in this
* directory which will fix that, but it needs integrating into the build
* process.
*
* The arguments to item() are:
* 1) the name of the binding; a bareword identifier
* (it's fine if it happens to clash with a C reserved word)
* 2) a string to add to the binding name to make the handler name
* (usually the empty string)
* 3) an integer parameter to pass to the handler
* 4) a set of boolean flags, ORed together:
* BINDING_PER_WINDOW - this is a window-based binding
* (not used in this file)
* BINDING_REVERSES - the binding can reverse if you hold down Shift
* BINDING_IS_REVERSED - the same, but the senses are reversed from the
* handler's point of view (let me know if I should
* explain this better)
*
* 5) a short description. Mostly, you won't use this.
* It must be marked translatable (i.e. inside "_(...)").
* 6) like short, except long. Don't include all the stuff about
* the parser being fairly liberal.
* 7) a string representing the default binding.
* If this is NULL, the action is unbound by default.
*
* Don't try to do XML entity escaping anywhere in the strings.
*/
#ifndef item
#error "item () must be defined when you include screen-bindings.h"
#endif
/***********************************/
#ifndef _BINDINGS_DEFINED_CONSTANTS
#define _BINDINGS_DEFINED_CONSTANTS 1
#define BINDING_PER_WINDOW 0x01
#define BINDING_REVERSES 0x02
#define BINDING_IS_REVERSED 0x06 /* REVERSES is implied */
/* FIXME: There is somewhere better for these; remove them */
#define PANEL_MAIN_MENU -1
#define PANEL_RUN_DIALOG -2
#endif /* _BINDINGS_DEFINED_CONSTANTS */
/***********************************/
item (switch_to_workspace, "_1", 0, 0,
_("Switch to workspace 1"),
_("The keybinding that switches to workspace 1."),
NULL)
item (switch_to_workspace, "_2", 1, 0,
_("Switch to workspace 2"),
_("The keybinding that switches to workspace 2."),
NULL)
item (switch_to_workspace, "_3", 2, 0,
_("Switch to workspace 3"),
_("The keybinding that switches to workspace 3."),
NULL)
item (switch_to_workspace, "_4", 3, 0,
_("Switch to workspace 4"),
_("The keybinding that switches to workspace 4."),
NULL)
item (switch_to_workspace, "_5", 4, 0,
_("Switch to workspace 5"),
_("The keybinding that switches to workspace 5."),
NULL)
item (switch_to_workspace, "_6", 5, 0,
_("Switch to workspace 6"),
_("The keybinding that switches to workspace 6."),
NULL)
item (switch_to_workspace, "_7", 6, 0,
_("Switch to workspace 7"),
_("The keybinding that switches to workspace 7."),
NULL)
item (switch_to_workspace, "_8", 7, 0,
_("Switch to workspace 8"),
_("The keybinding that switches to workspace 8."),
NULL)
item (switch_to_workspace, "_9", 8, 0,
_("Switch to workspace 9"),
_("The keybinding that switches to workspace 9."),
NULL)
item (switch_to_workspace, "_10", 9, 0,
_("Switch to workspace 10"),
_("The keybinding that switches to workspace 10."),
NULL)
item (switch_to_workspace, "_11", 10, 0,
_("Switch to workspace 11"),
_("The keybinding that switches to workspace 11."),
NULL)
item (switch_to_workspace, "_12", 11, 0,
_("Switch to workspace 12"),
_("The keybinding that switches to workspace 12."),
NULL)
/* META_MOTION_* are negative, and so distinct from workspace numbers,
* which are always zero or positive.
* If you make use of these constants, you will need to include workspace.h
* (which you're probably using already for other reasons anyway).
* If your definition of item() throws them away, you don't need to include
* workspace.h, of course.
*/
item (switch_to_workspace, "_left", META_MOTION_LEFT, 0,
_("Switch to workspace on the left"),
_("The keybinding that switches to the workspace on the left "
"of the current workspace."),
"<Control><Alt>Left")
item (switch_to_workspace, "_right", META_MOTION_RIGHT, 0,
_("Switch to workspace on the right"),
_("The keybinding that switches to the workspace on the right "
"of the current workspace."),
"<Control><Alt>Right")
item (switch_to_workspace, "_up", META_MOTION_UP, 0,
_("Switch to workspace above this one"),
_("The keybinding that switches to the workspace above "
"the current workspace."),
"<Control><Alt>Up")
item (switch_to_workspace, "_down", META_MOTION_DOWN, 0,
_("Switch to workspace below this one"),
_("The keybinding that switches to the workspace below "
"the current workspace."),
"<Control><Alt>Down")
/***********************************/
/* The ones which have inverses. These can't be bound to any keystroke
* containing Shift because Shift will invert their "backwards" state.
*
* TODO: "NORMAL" and "DOCKS" should be renamed to the same name as their
* action, for obviousness.
*/
item (switch, "_group", META_TAB_LIST_GROUP, BINDING_REVERSES,
_("Move between windows of an application with popup"),
_("The keybinding used to move focus between windows of an"
"application, using a popup window."), NULL)
item (switch, "_group_backwards", META_TAB_LIST_GROUP, BINDING_IS_REVERSED,
_("Move backwards between windows of an application with popup"),
_("The keybinding used to move focus backwards between windows"
"of an application, using a popup window."), NULL)
item (switch, "_windows", META_TAB_LIST_NORMAL, BINDING_REVERSES,
_("Move between windows with popup"),
_("The keybinding used to move focus between windows, "
"using a popup window."), "<Alt>Tab")
item (switch, "_windows_backwards",META_TAB_LIST_NORMAL, BINDING_IS_REVERSED,
_("Move focus backwards between windows using popup display"),
_("The keybinding used to move focus backwards between windows, "
"using a popup window."), NULL)
item (switch, "_panels", META_TAB_LIST_DOCKS, BINDING_REVERSES,
_("Move between panels and the desktop with popup"),
_("The keybinding used to move focus between panels and the desktop, "
"using a popup window."), "<Control><Alt>Tab")
item (switch, "_panels_backwards", META_TAB_LIST_DOCKS, BINDING_IS_REVERSED,
_("Move backwards between panels and the desktop with popup"),
_("The keybinding used to move focus backwards between panels "
"and the desktop, using a popup window."), NULL)
item (cycle, "_group", META_TAB_LIST_GROUP, BINDING_REVERSES,
_("Move between windows of an application immediately"),
_("The keybinding used to move focus between windows of an "
"application without a popup window."), "<Alt>F6")
item (cycle, "_group_backwards", META_TAB_LIST_GROUP, BINDING_IS_REVERSED,
_("Move backwards between windows of an application immediately"),
_("The keybinding used to move focus backwards between windows "
"of an application without a popup window."), NULL)
item (cycle, "_windows", META_TAB_LIST_NORMAL, BINDING_REVERSES,
_("Move between windows immediately"),
_("The keybinding used to move focus between windows without "
"a popup window."), "<Alt>Escape")
item (cycle, "_windows_backwards",META_TAB_LIST_NORMAL, BINDING_IS_REVERSED,
_("Move backwards between windows immediately"),
_("The keybinding used to move focus backwards between windows "
"without a popup window."), NULL)
item (cycle, "_panels", META_TAB_LIST_DOCKS, BINDING_REVERSES,
_("Move between panels and the desktop immediately"),
_("The keybinding used to move focus between panels and "
"the desktop, without a popup window."), "<Control><Alt>Escape")
item (cycle, "_panels_backwards", META_TAB_LIST_DOCKS, BINDING_IS_REVERSED,
_("Move backward between panels and the desktop immediately"),
_("The keybinding used to move focus backwards between panels and "
"the desktop, without a popup window."), NULL)
/***********************************/
item (show_desktop, "", 0, 0,
_("Hide all windows and focus desktop"),
_("The keybinding used to hide all normal windows and set the "
"focus to the desktop background."),
"<Control><Alt>d")
item (panel, "_main_menu", META_KEYBINDING_ACTION_PANEL_MAIN_MENU, 0,
_("Show the panel menu"),
_("The keybinding which shows the panel's main menu."),
"<Alt>F1")
item (panel, "_run_dialog", META_KEYBINDING_ACTION_PANEL_RUN_DIALOG, 0,
_("Show the panel run application dialog"),
_("The keybinding which display's the panel's \"Run Application\" "
"dialog box."),
"<Alt>F2")
/* Yes, the param is offset by one. Historical reasons. (Maybe worth fixing
* at some point.) The short and long are NULL here because the stanza is
* irregularly shaped in metacity.schemas.in. This will probably be fixed
* as well.
*/
item (run_command, "_1", 0, 0, NULL, NULL, NULL)
item (run_command, "_2", 1, 0, NULL, NULL, NULL)
item (run_command, "_3", 2, 0, NULL, NULL, NULL)
item (run_command, "_4", 3, 0, NULL, NULL, NULL)
item (run_command, "_5", 4, 0, NULL, NULL, NULL)
item (run_command, "_6", 5, 0, NULL, NULL, NULL)
item (run_command, "_7", 6, 0, NULL, NULL, NULL)
item (run_command, "_8", 7, 0, NULL, NULL, NULL)
item (run_command, "_9", 8, 0, NULL, NULL, NULL)
item (run_command, "_10", 9, 0, NULL, NULL, NULL)
item (run_command, "_11", 10, 0, NULL, NULL, NULL)
item (run_command, "_12", 11, 0, NULL, NULL, NULL)
item (run_command, "_13", 12, 0, NULL, NULL, NULL)
item (run_command, "_14", 13, 0, NULL, NULL, NULL)
item (run_command, "_15", 14, 0, NULL, NULL, NULL)
item (run_command, "_16", 15, 0, NULL, NULL, NULL)
item (run_command, "_17", 16, 0, NULL, NULL, NULL)
item (run_command, "_18", 17, 0, NULL, NULL, NULL)
item (run_command, "_19", 18, 0, NULL, NULL, NULL)
item (run_command, "_20", 19, 0, NULL, NULL, NULL)
item (run_command, "_21", 20, 0, NULL, NULL, NULL)
item (run_command, "_22", 21, 0, NULL, NULL, NULL)
item (run_command, "_23", 22, 0, NULL, NULL, NULL)
item (run_command, "_24", 23, 0, NULL, NULL, NULL)
item (run_command, "_25", 24, 0, NULL, NULL, NULL)
item (run_command, "_26", 25, 0, NULL, NULL, NULL)
item (run_command, "_27", 26, 0, NULL, NULL, NULL)
item (run_command, "_28", 27, 0, NULL, NULL, NULL)
item (run_command, "_29", 28, 0, NULL, NULL, NULL)
item (run_command, "_30", 29, 0, NULL, NULL, NULL)
item (run_command, "_31", 30, 0, NULL, NULL, NULL)
item (run_command, "_32", 31, 0, NULL, NULL, NULL)
item (run_command, "_screenshot", 32, 0,
_("Take a screenshot"),
_("The keybinding which invokes the panel's screenshot utility."),
"Print")
item (run_command, "_window_screenshot", 33, 0,
_("Take a screenshot of a window"),
_("The keybinding which invokes the panel's screenshot utility "
"to take a screenshot of a window."),
"<Alt>Print")
item (run_terminal, "", 0, 0,
_("Run a terminal"),
_("The keybinding which invokes a terminal."),
NULL)
/* No descriptions because this is undocumented */
item (set_spew_mark, "", 0, 0, NULL, NULL, NULL)
/* eof screen-bindings.h */

View File

@ -1191,8 +1191,8 @@ start_element_handler (GMarkupParseContext *context,
g_set_error (error,
G_MARKUP_ERROR,
G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE,
_("Unknown attribute %s on <metacity_session> element"),
name);
_("Unknown attribute %s on <%s> element"),
name, "metacity_session");
return;
}
@ -1266,8 +1266,8 @@ start_element_handler (GMarkupParseContext *context,
g_set_error (error,
G_MARKUP_ERROR,
G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE,
_("Unknown attribute %s on <window> element"),
name);
_("Unknown attribute %s on <%s> element"),
name, "window");
session_info_free (pd->info);
pd->info = NULL;
return;
@ -1298,8 +1298,8 @@ start_element_handler (GMarkupParseContext *context,
g_set_error (error,
G_MARKUP_ERROR,
G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE,
_("Unknown attribute %s on <window> element"),
name);
_("Unknown attribute %s on <%s> element"),
name, "window");
session_info_free (pd->info);
pd->info = NULL;
return;
@ -1370,8 +1370,8 @@ start_element_handler (GMarkupParseContext *context,
g_set_error (error,
G_MARKUP_ERROR,
G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE,
_("Unknown attribute %s on <maximized> element"),
name);
_("Unknown attribute %s on <%s> element"),
name, "maximized");
return;
}
@ -1430,8 +1430,8 @@ start_element_handler (GMarkupParseContext *context,
g_set_error (error,
G_MARKUP_ERROR,
G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE,
_("Unknown attribute %s on <geometry> element"),
name);
_("Unknown attribute %s on <%s> element"),
name, "geometry");
return;
}

View File

@ -187,7 +187,7 @@ try_get_reply (Display *xdisplay,
int actual_format;
unsigned long n_items;
unsigned long bytes_after;
char *data;
unsigned char *data;
char *name;
struct timeval current_time;
@ -421,7 +421,7 @@ run_speed_comparison (Display *xdisplay,
int actual_format;
unsigned long n_items;
unsigned long bytes_after;
char *data;
unsigned char *data;
assert (ag_task_have_reply (task));

View File

@ -23,7 +23,7 @@
*/
#define _GNU_SOURCE
#define _POSIX_C_SOURCE /* for fdopen() */
#define _POSIX_C_SOURCE 200112L /* for fdopen() */
#include <config.h>
#include "util.h"
@ -537,3 +537,75 @@ meta_gravity_to_string (int gravity)
break;
}
}
void
meta_show_dialog (const char *type,
const char *message,
const char *timeout,
const gint screen_number,
const char **columns,
const char **entries)
{
GError *error = NULL;
char *screen_number_text = g_strdup_printf("%d", screen_number);
/*
We want:
zenity --display X --screen S --title Metacity --error --text "There was an error running <tt>terminal</tt>:\n\nYour computer is on fire."
** with no pipes
zenity --display X --screen S --title Metacity --question --text "<big><b><tt>%s</tt> is not responding.</b></big>\n\n<i>You may choose to wait a short while for it to continue or force the application to quit entirely.</i>"
zenity --display X --screen S --title Metacity --list --timeout 240 --text "These windows do not support \"save current setup\" and will have to be restarted manually next time you log in." --column "Window" --column "Class" "Firefox" "foo" "Duke Nukem Forever" "bar"
*/
const char **argvl;
int i=0;
GPid child_pid;
argvl = g_malloc(sizeof (char*) *
(9 + (timeout?2:0))
);
argvl[i++] = "zenity";
argvl[i++] = type;
argvl[i++] = "--screen";
argvl[i++] = screen_number_text;
argvl[i++] = "--title";
/* Translators: This is the title used on dialog boxes */
argvl[i++] = _("Metacity");
argvl[i++] = "--text";
argvl[i++] = message;
if (timeout)
{
argvl[i++] = "--timeout";
argvl[i++] = timeout;
}
argvl[i] = NULL;
g_spawn_async_with_pipes (
"/",
(char**) argvl, /* ugh */
NULL,
G_SPAWN_SEARCH_PATH,
NULL, NULL,
&child_pid,
NULL, NULL, NULL,
&error
);
g_free (argvl);
g_free (screen_number_text);
if (error)
{
meta_warning ("%s\n", error->message);
g_error_free (error);
}
}
/* eof util.c */

View File

@ -1,293 +0,0 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/*
* Copyright (C) 2008 Thomas Thurman
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
/**
* \file A list of window keybinding information.
*
* Each action which can have a keystroke bound to it is listed below.
* To use this file, define "item" to be a six-argument macro (you can
* throw any of the arguments you please away), include this file,
* and then undefine the macro again.
*
* (If you aren't familiar with this technique, sometimes called "x-macros",
* see DDJ of May 2001: <http://www.ddj.com/cpp/184401387>.)
*
* This makes it possible to keep all information about all the keybindings
* in the same place. The only exception is the code to run when an action
* is actually invoked; while we *could* have put that in this file, it would
* have made debugging ridiculously difficult. Instead, each action should
* have a corresponding static function named handle_<name>() in
* keybindings.c.
*
* Currently, the GConf schemas in src/metacity.schemas also need to be
* updated separately. There is a program called schema-bindings.c in this
* directory which will fix that, but it needs integrating into the build
* process.
*
* The arguments to item() are:
* 1) name: the name of the binding; a bareword identifier
* 2) suffix: a string to add to the binding name to make the handler name
* (usually the empty string)
* 3) param: an integer parameter to pass to the handler
* 4) short: a short description. Mostly, you won't use this.
* It must be marked translatable (i.e. inside "_(...)").
* 5) long: like short, except long. Don't include all the stuff about
* the parser being fairly liberal.
* 6) keystroke: a string representing the default binding.
* If this is NULL, the action is unbound by default.
*
* Don't try to do XML entity escaping anywhere in the strings.
*
* Some code out there wants only the entries which have a default
* binding (i.e. whose sixth parameter is not NULL). You can get only these
* by defining ONLY_BOUND_BY_DEFAULT before you include this file.
*/
#ifndef item
#error "item () must be defined when you include window-bindings.h"
#endif
item (activate_window_menu, "", 0,
_("Activate window menu"),
_("The keybinding used to activate the window menu."),
"<Alt>Print")
#ifndef ONLY_BOUND_BY_DEFAULT
item (toggle_fullscreen, "", 0,
_("Toggle fullscreen mode"),
_("The keybinding used to toggle fullscreen mode."),
NULL)
item (toggle_maximized, "", 0,
_("Toggle maximization state"),
_("The keybinding used to toggle maximization."),
NULL)
item (toggle_above, "", 0,
_("Toggle always on top state"),
_("The keybinding used to toggle always on top. A window that is "
"always on top will always be visible over other overlapping "
"windows."),
NULL)
#endif /* ONLY_BOUND_BY_DEFAULT */
item (maximize, "", 0,
_("Maximize window"),
_("The keybinding used to maximize a window."),
"<Alt>F10")
item (unmaximize, "", 0,
_("Unmaximize window"),
_("The keybinding used to unmaximize a window."),
"<Alt>F5")
#ifndef ONLY_BOUND_BY_DEFAULT
item (toggle_shaded, "", 0,
_("Toggle shaded state"),
_("The keybinding used to toggle shaded/unshaded state."),
NULL)
#endif /* ONLY_BOUND_BY_DEFAULT */
item (minimize, "", 0,
_("Minimize window"),
_("The keybinding used to minimize a window."),
"<Alt>F9")
item (close, "", 0,
_("Close window"),
_("The keybinding used to close a window."),
"<Alt>F4")
item (begin_move, "", 0,
_("Move window"),
_("The keybinding used to enter \"move mode\" "
"and begin moving a window using the keyboard."),
"<Alt>F7")
item (begin_resize, "", 0,
_("Resize window"),
("The keybinding used to enter \"resize mode\" "
"and begin resizing a window using the keyboard."),
"<Alt>F8")
#ifndef ONLY_BOUND_BY_DEFAULT
item (toggle_on_all_workspaces, "", 0,
_("Toggle window on all workspaces"),
_("The keybinding used to toggle whether the window is on all "
"workspaces or just one."),
NULL)
item (move_to_workspace, "_1", 1,
_("Move window to workspace 1"),
_("The keybinding used to move a window to workspace 1."),
NULL)
item (move_to_workspace, "_2", 2,
_("Move window to workspace 2"),
_("The keybinding used to move a window to workspace 2."),
NULL)
item (move_to_workspace, "_3", 3,
_("Move window to workspace 3"),
_("The keybinding used to move a window to workspace 3."),
NULL)
item (move_to_workspace, "_4", 4,
_("Move window to workspace 4"),
_("The keybinding used to move a window to workspace 4."),
NULL)
item (move_to_workspace, "_5", 5,
_("Move window to workspace 5"),
_("The keybinding used to move a window to workspace 5."),
NULL)
item (move_to_workspace, "_6", 6,
_("Move window to workspace 6"),
_("The keybinding used to move a window to workspace 6."),
NULL)
item (move_to_workspace, "_7", 7,
_("Move window to workspace 7"),
_("The keybinding used to move a window to workspace 7."),
NULL)
item (move_to_workspace, "_8", 8,
_("Move window to workspace 8"),
_("The keybinding used to move a window to workspace 8."),
NULL)
item (move_to_workspace, "_9", 9,
_("Move window to workspace 9"),
_("The keybinding used to move a window to workspace 9."),
NULL)
item (move_to_workspace, "_10", 10,
_("Move window to workspace 10"),
_("The keybinding used to move a window to workspace 10."),
NULL)
item (move_to_workspace, "_11", 11,
_("Move window to workspace 11"),
_("The keybinding used to move a window to workspace 11."),
NULL)
item (move_to_workspace, "_12", 12,
_("Move window to workspace 12"),
_("The keybinding used to move a window to workspace 12."),
NULL)
#endif /* ONLY_BOUND_BY_DEFAULT */
/* META_MOTION_* are negative, and so distinct from workspace numbers,
* which are always zero or positive.
* If you make use of these constants, you will need to include workspace.h
* (which you're probably using already for other reasons anyway).
* If your definition of item() throws them away, you don't need to include
* workspace.h, of course.
*/
item (move_to_workspace, "_left", META_MOTION_LEFT,
_("Move window one workspace to the left"),
_("The keybinding used to move a window one workspace to the left."),
"<Control><Shift><Alt>Left")
item (move_to_workspace, "_right", META_MOTION_RIGHT,
_("Move window one workspace to the right"),
_("The keybinding used to move a window one workspace to the right."),
"<Control><Shift><Alt>Right")
item (move_to_workspace, "_up", META_MOTION_UP,
_("Move window one workspace up"),
_("The keybinding used to move a window one workspace up."),
"<Control><Shift><Alt>Up")
item (move_to_workspace, "_down", META_MOTION_DOWN,
_("Move window one workspace down"),
_("The keybinding used to move a window one workspace down."),
"<Control><Shift><Alt>Down")
#ifndef ONLY_BOUND_BY_DEFAULT
item (raise_or_lower, "", 0,
_("Raise obscured window, otherwise lower"),
_("This keybinding changes whether a window is above or below "
"other windows. If the window is covered by another one, it "
"raises the window above all others, and if the window is "
"already fully visible, it lowers it below all others."),
NULL)
item (raise, "", 0,
_("Raise window above other windows"),
_("This keybinding raises the window above other windows."),
NULL)
item (lower, "", 0,
_("Lower window below other windows"),
_("This keybinding lowers a window below other windows."),
NULL)
item (maximize_vertically, "", 0,
_("Maximize window vertically"),
_("This keybinding resizes a window to fill available "
"vertical space."),
NULL)
item (maximize_horizontally, "", 0,
_("Maximize window horizontally"),
_("This keybinding resizes a window to fill available "
"horizontal space."),
NULL)
item (move_to_corner_nw, "", 0,
_("Move window to north-west corner"),
_("This keybinding moves a window into the north-west (top left) "
"corner of the screen."),
NULL)
item (move_to_corner_ne, "", 0,
_("Move window to north-east corner"),
_("This keybinding moves a window into the north-east (top right) "
"corner of the screen."),
NULL)
item (move_to_corner_sw, "", 0,
_("Move window to south-west corner"),
_("This keybinding moves a window into the north-east (bottom left) "
"corner of the screen."),
NULL)
item (move_to_corner_se, "", 0,
_("Move window to south-east corner"),
_("This keybinding moves a window into the north-east (bottom right) "
"corner of the screen."),
NULL)
item (move_to_side_n, "", 0,
_("Move window to north side of screen"),
_("This keybinding moves a window against the north (top) "
"side of the screen."),
NULL)
item (move_to_side_s, "", 0,
_("Move window to south side of screen"),
_("This keybinding moves a window against the south (bottom) "
"side of the screen."),
NULL)
item (move_to_side_e, "", 0,
_("Move window to east side of screen"),
_("This keybinding moves a window against the east (right) "
"side of the screen."),
NULL)
item (move_to_side_w, "", 0,
_("Move window to west side of screen"),
_("This keybinding moves a window against the west (left) "
"side of the screen."),
NULL)
item (move_to_center, "", 0,
_("Move window to center of screen"),
_("This keybinding moves a window into the center "
"of the screen."),
NULL)
#endif /* ONLY_BOUND_BY_DEFAULT */
/* eof window-bindings.h */

View File

@ -124,6 +124,12 @@ struct _MetaWindow
/* Whether we're fullscreen */
guint fullscreen : 1;
/* Area to cover when in fullscreen mode. If _NET_WM_FULLSCREEN_MONITORS has
* been overridden (via a client message), the window will cover the union of
* these monitors. If not, this is the single monitor which the window's
* origin is on. */
long fullscreen_monitors[4];
/* Whether we're trying to constrain the window to be fully onscreen */
guint require_fully_onscreen : 1;
@ -405,6 +411,11 @@ void meta_window_unstick (MetaWindow *window);
void meta_window_make_fullscreen_internal (MetaWindow *window);
void meta_window_make_fullscreen (MetaWindow *window);
void meta_window_unmake_fullscreen (MetaWindow *window);
void meta_window_update_fullscreen_monitors (MetaWindow *window,
unsigned long top,
unsigned long bottom,
unsigned long left,
unsigned long right);
/* args to move are window pos, not frame pos */
void meta_window_move (MetaWindow *window,

View File

@ -580,6 +580,8 @@ reload_net_wm_state (MetaWindow *window,
window->wm_state_below = TRUE;
else if (value->v.atom_list.atoms[i] == window->display->atom__NET_WM_STATE_DEMANDS_ATTENTION)
window->wm_state_demands_attention = TRUE;
else if (value->v.atom_list.atoms[i] == window->display->atom__NET_WM_STATE_STICKY)
window->on_all_workspaces = TRUE;
++i;
}

View File

@ -249,7 +249,7 @@ meta_window_new_with_attrs (MetaDisplay *display,
gulong existing_wm_state;
gulong event_mask;
MetaMoveResizeFlags flags;
#define N_INITIAL_PROPS 18
#define N_INITIAL_PROPS 19
Atom initial_props[N_INITIAL_PROPS];
int i;
gboolean has_shape;
@ -471,6 +471,7 @@ meta_window_new_with_attrs (MetaDisplay *display,
window->maximize_vertically_after_placement = FALSE;
window->minimize_after_placement = FALSE;
window->fullscreen = FALSE;
window->fullscreen_monitors[0] = -1;
window->require_fully_onscreen = TRUE;
window->require_on_single_xinerama = TRUE;
window->require_titlebar_visible = TRUE;
@ -604,6 +605,7 @@ meta_window_new_with_attrs (MetaDisplay *display,
initial_props[i++] = display->atom__MOTIF_WM_HINTS;
initial_props[i++] = XA_WM_TRANSIENT_FOR;
initial_props[i++] = display->atom__NET_WM_USER_TIME_WINDOW;
initial_props[i++] = display->atom__NET_WM_FULLSCREEN_MONITORS;
g_assert (N_INITIAL_PROPS == i);
meta_window_reload_properties (window, initial_props, N_INITIAL_PROPS);
@ -1128,6 +1130,9 @@ meta_window_free (MetaWindow *window,
XDeleteProperty (window->display->xdisplay,
window->xwindow,
window->display->atom__NET_WM_STATE);
XDeleteProperty (window->display->xdisplay,
window->xwindow,
window->display->atom__NET_WM_FULLSCREEN_MONITORS);
set_wm_state (window, WithdrawnState);
meta_error_trap_pop (window->display, FALSE);
}
@ -1241,7 +1246,7 @@ static void
set_net_wm_state (MetaWindow *window)
{
int i;
unsigned long data[11];
unsigned long data[12];
i = 0;
if (window->shaded)
@ -1299,6 +1304,11 @@ set_net_wm_state (MetaWindow *window)
data[i] = window->display->atom__NET_WM_STATE_DEMANDS_ATTENTION;
++i;
}
if (window->on_all_workspaces)
{
data[i] = window->display->atom__NET_WM_STATE_STICKY;
++i;
}
meta_verbose ("Setting _NET_WM_STATE with %d atoms\n", i);
@ -1308,6 +1318,23 @@ set_net_wm_state (MetaWindow *window)
XA_ATOM,
32, PropModeReplace, (guchar*) data, i);
meta_error_trap_pop (window->display, FALSE);
if (window->fullscreen)
{
data[0] = window->fullscreen_monitors[0];
data[1] = window->fullscreen_monitors[1];
data[2] = window->fullscreen_monitors[2];
data[3] = window->fullscreen_monitors[3];
meta_verbose ("Setting _NET_WM_FULLSCREEN_MONITORS\n");
meta_error_trap_push (window->display);
XChangeProperty (window->display->xdisplay,
window->xwindow,
window->display->atom__NET_WM_FULLSCREEN_MONITORS,
XA_CARDINAL, 32, PropModeReplace,
(guchar*) data, 4);
meta_error_trap_pop (window->display, FALSE);
}
}
gboolean
@ -2893,6 +2920,34 @@ meta_window_unmake_fullscreen (MetaWindow *window)
}
}
void
meta_window_update_fullscreen_monitors (MetaWindow *window,
unsigned long top,
unsigned long bottom,
unsigned long left,
unsigned long right)
{
if ((int)top < window->screen->n_xinerama_infos &&
(int)bottom < window->screen->n_xinerama_infos &&
(int)left < window->screen->n_xinerama_infos &&
(int)right < window->screen->n_xinerama_infos)
{
window->fullscreen_monitors[0] = top;
window->fullscreen_monitors[1] = bottom;
window->fullscreen_monitors[2] = left;
window->fullscreen_monitors[3] = right;
}
else
{
window->fullscreen_monitors[0] = -1;
}
if (window->fullscreen)
{
meta_window_queue(window, META_QUEUE_MOVE_RESIZE);
}
}
void
meta_window_shade (MetaWindow *window,
guint32 timestamp)
@ -5072,9 +5127,19 @@ meta_window_client_message (MetaWindow *window,
{
if ((action == _NET_WM_STATE_ADD) ||
(action == _NET_WM_STATE_TOGGLE && !window->wm_state_demands_attention))
meta_window_set_demands_attention(window);
meta_window_set_demands_attention (window);
else
meta_window_unset_demands_attention(window);
meta_window_unset_demands_attention (window);
}
if (first == display->atom__NET_WM_STATE_STICKY ||
second == display->atom__NET_WM_STATE_STICKY)
{
if ((action == _NET_WM_STATE_ADD) ||
(action == _NET_WM_STATE_TOGGLE && !window->on_all_workspaces))
meta_window_stick (window);
else
meta_window_unstick (window);
}
return TRUE;
@ -5273,6 +5338,23 @@ meta_window_client_message (MetaWindow *window,
window_activate (window, timestamp, source_indication, NULL);
return TRUE;
}
else if (event->xclient.message_type ==
display->atom__NET_WM_FULLSCREEN_MONITORS)
{
MetaClientType source_indication;
gulong top, bottom, left, right;
meta_verbose ("_NET_WM_FULLSCREEN_MONITORS request for window '%s'\n",
window->desc);
top = event->xclient.data.l[0];
bottom = event->xclient.data.l[1];
left = event->xclient.data.l[2];
right = event->xclient.data.l[3];
source_indication = event->xclient.data.l[4];
meta_window_update_fullscreen_monitors (window, top, bottom, left, right);
}
return FALSE;
}
@ -8206,6 +8288,10 @@ meta_window_set_demands_attention (MetaWindow *window)
/* windows on other workspaces are necessarily obscured */
obscured = TRUE;
}
else if (window->minimized)
{
obscured = TRUE;
}
else
{
meta_window_get_outer_rect (window, &candidate_rect);
@ -8230,21 +8316,26 @@ meta_window_set_demands_attention (MetaWindow *window)
}
}
}
/* If the window's in full view, there's no point setting the flag. */
meta_topic (META_DEBUG_WINDOW_OPS,
"Not marking %s as needing attention because it's in full view\n",
window->desc);
return;
}
/* Otherwise, go ahead and set the flag. */
meta_topic (META_DEBUG_WINDOW_OPS,
"Marking %s as needing attention\n", window->desc);
window->wm_state_demands_attention = TRUE;
set_net_wm_state (window);
if (obscured)
{
meta_topic (META_DEBUG_WINDOW_OPS,
"Marking %s as needing attention\n",
window->desc);
window->wm_state_demands_attention = TRUE;
set_net_wm_state (window);
}
else
{
/* If the window's in full view, there's no point setting the flag. */
meta_topic (META_DEBUG_WINDOW_OPS,
"Not marking %s as needing attention because "
"it's in full view\n",
window->desc);
}
}
void

View File

@ -199,7 +199,7 @@ get_property (MetaDisplay *display,
False, req_type, &results->type, &results->format,
&results->n_items,
&results->bytes_after,
(guchar **)&results->prop) != Success ||
&results->prop) != Success ||
results->type == None)
{
if (results->prop)
@ -673,9 +673,9 @@ meta_prop_get_text_property (MetaDisplay *display,
/* From Xmd.h */
#ifndef cvtINT32toInt
#if SIZEOF_VOID_P == 8
#define cvtINT8toInt(val) (((val) & 0x00000080) ? ((val) | 0xffffffffffffff00) : (val))
#define cvtINT16toInt(val) (((val) & 0x00008000) ? ((val) | 0xffffffffffff0000) : (val))
#define cvtINT32toInt(val) (((val) & 0x80000000) ? ((val) | 0xffffffff00000000) : (val))
#define cvtINT8toInt(val) ((((unsigned int)val) & 0x00000080) ? (((unsigned int)val) | 0xffffffffffffff00) : ((unsigned int)val))
#define cvtINT16toInt(val) ((((unsigned int)val) & 0x00008000) ? (((unsigned int)val) | 0xffffffffffff0000) : ((unsigned int)val))
#define cvtINT32toInt(val) ((((unsigned int)val) & 0x80000000) ? (((unsigned int)val) | 0xffffffff00000000) : ((unsigned int)val))
#define cvtINT8toShort(val) cvtINT8toInt(val)
#define cvtINT16toShort(val) cvtINT16toInt(val)
#define cvtINT32toShort(val) cvtINT32toInt(val)
@ -1051,7 +1051,7 @@ meta_prop_get_values (MetaDisplay *display,
&results.type, &results.format,
&results.n_items,
&results.bytes_after,
(unsigned char **)(&results.prop)) != Success ||
&results.prop) != Success ||
results.type == None)
{
values[i].type = META_PROP_VALUE_INVALID;

View File

@ -0,0 +1,386 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/*
* Copyright (C) 2008 Thomas Thurman
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
/**
* A list of screen keybinding information.
*
* Each action which can have a keystroke bound to it is listed below.
* To use this file, define keybind() to be a seven-argument macro (you can
* throw any of the arguments you please away), include this file,
* and then undefine the macro again.
*
* (If you aren't familiar with this technique, sometimes called "x-macros",
* see DDJ of May 2001: <http://www.ddj.com/cpp/184401387>.)
*
* This makes it possible to keep all information about all the keybindings
* in the same place. The only exception is the code to run when an action
* is actually invoked; while we *could* have put that in this file, it would
* have made debugging ridiculously difficult. Instead, each action should
* have a corresponding static function named handle_<name>() in
* keybindings.c.
*
* The arguments to keybind() are:
* 1) the name of the binding; a bareword identifier
* (it's fine if it happens to clash with a C reserved word)
* 2) the name of the function which implements it.
* Clearly we could have guessed this from the binding very often,
* but we choose to write it in full for the benefit of grep.
* 3) an integer parameter to pass to the handler
* 4) a set of boolean flags, ORed together:
* BINDING_PER_WINDOW - this is a window-based binding.
* It is only valid if there is a
* current window, and will operate in
* some way on that window.
* BINDING_REVERSES - the binding can reverse if you hold down Shift
* BINDING_IS_REVERSED - the same, but the senses are reversed from the
* handler's point of view (let me know if I should
* 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.
*/
#ifndef keybind
#error "keybind () must be defined when you include screen-bindings.h"
#endif
/***********************************/
#ifndef _BINDINGS_DEFINED_CONSTANTS
#define _BINDINGS_DEFINED_CONSTANTS 1
#define BINDING_PER_WINDOW 0x01
#define BINDING_REVERSES 0x02
#define BINDING_IS_REVERSED 0x04
#endif /* _BINDINGS_DEFINED_CONSTANTS */
/***********************************/
/* 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"))
/* META_MOTION_* are negative, and so distinct from workspace numbers,
* which are always zero or positive.
* If you make use of these constants, you will need to include workspace.h
* (which you're probably using already for other reasons anyway).
* If your definition of keybind() throws them away, you don't need to include
* workspace.h, of course.
*/
keybind (switch_to_workspace_left, handle_switch_to_workspace,
META_MOTION_LEFT, 0, "<Control><Alt>Left",
_("Switch to workspace on the left of the current workspace"))
keybind (switch_to_workspace_right, handle_switch_to_workspace,
META_MOTION_RIGHT, 0, "<Control><Alt>Right",
_("Switch to workspace on the right of the current workspace"))
keybind (switch_to_workspace_up, handle_switch_to_workspace,
META_MOTION_UP, 0, "<Control><Alt>Up",
_("Switch to workspace above the current workspace"))
keybind (switch_to_workspace_down, handle_switch_to_workspace,
META_MOTION_DOWN, 0, "<Control><Alt>Down",
_("Switch to workspace below the current workspace"))
/***********************************/
/* The ones which have inverses. These can't be bound to any keystroke
* containing Shift because Shift will invert their "backward" state.
*
* TODO: "NORMAL" and "DOCKS" should be renamed to the same name as their
* action, for obviousness.
*
* TODO: handle_switch and handle_cycle should probably really be the
* 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, "<Alt>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_panels, handle_switch, META_TAB_LIST_DOCKS,
BINDING_REVERSES, "<Control><Alt>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, "<Alt>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, "<Alt>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, "<Control><Alt>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 (show_desktop, handle_show_desktop, 0, 0, "<Control><Alt>d",
_("Hide all normal windows and set focus to the desktop background"))
keybind (panel_main_menu, handle_panel,
META_KEYBINDING_ACTION_PANEL_MAIN_MENU, 0, "<Alt>F1",
_("Show the panel's main menu"))
keybind (panel_run_dialog, handle_panel,
META_KEYBINDING_ACTION_PANEL_RUN_DIALOG, 0, "<Alt>F2",
_("Show the panel's \"Run Application\" dialog box"))
/* 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 metacity.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,"<Alt>Print",
_("Take a screenshot of a window"))
keybind (run_command_terminal, handle_run_terminal, 0, 0, NULL, _("Run a terminal"))
/* No description because this is undocumented */
keybind (set_spew_mark, handle_set_spew_mark, 0, 0, NULL, NULL)
#undef REVERSES_AND_REVERSED
/************************ PER WINDOW BINDINGS ************************/
/* These take a window as an extra parameter; they have no effect
* if no window is active.
*/
keybind (activate_window_menu, handle_activate_window_menu, 0,
BINDING_PER_WINDOW, "<Alt>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, NULL,
_("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, "<Alt>F10",
_("Maximize window"))
keybind (unmaximize, handle_unmaximize, 0, BINDING_PER_WINDOW, "<Alt>F5",
_("Unmaximize window"))
keybind (toggle_shaded, handle_toggle_shaded, 0, BINDING_PER_WINDOW, NULL,
_("Toggle shaded state"))
keybind (minimize, handle_minimize, 0, BINDING_PER_WINDOW, "<Alt>F9",
_("Minimize window"))
keybind (close, handle_close, 0, BINDING_PER_WINDOW, "<Alt>F4",
_("Close window"))
keybind (begin_move, handle_begin_move, 0, BINDING_PER_WINDOW, "<Alt>F7",
_("Move window"))
keybind (begin_resize, handle_begin_resize, 0, BINDING_PER_WINDOW, "<Alt>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"))
/* META_MOTION_* are negative, and so distinct from workspace numbers,
* which are always zero or positive.
* If you make use of these constants, you will need to include workspace.h
* (which you're probably using already for other reasons anyway).
* If your definition of keybind() throws them away, you don't need to include
* workspace.h, of course.
*/
keybind (move_to_workspace_left, handle_move_to_workspace,
META_MOTION_LEFT, BINDING_PER_WINDOW, "<Control><Shift><Alt>Left",
_("Move window one workspace to the left"))
keybind (move_to_workspace_right, handle_move_to_workspace,
META_MOTION_RIGHT, BINDING_PER_WINDOW, "<Control><Shift><Alt>Right",
_("Move window one workspace to the right"))
keybind (move_to_workspace_up, handle_move_to_workspace,
META_MOTION_UP, BINDING_PER_WINDOW, "<Control><Shift><Alt>Up",
_("Move window one workspace up"))
keybind (move_to_workspace_down, handle_move_to_workspace,
META_MOTION_DOWN, BINDING_PER_WINDOW, "<Control><Shift><Alt>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_nw, 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"))
/* eof all-keybindings.h */

View File

@ -33,7 +33,7 @@
* again.
*
* If you also define EWMH_ATOMS_ONLY then you will only get _NET_WM_*
* hints rather than all of them.
* atoms rather than all of them.
*/
#ifndef item
@ -155,6 +155,8 @@ item(_NET_DESKTOP_VIEWPORT)
item(_NET_WM_USER_TIME_WINDOW)
item(_NET_WM_ACTION_ABOVE)
item(_NET_WM_ACTION_BELOW)
item(_NET_WM_STATE_STICKY)
item(_NET_WM_FULLSCREEN_MONITORS)
#if 0
/* We apparently never use: */

View File

@ -103,6 +103,11 @@ gboolean meta_rectangle_intersect (const MetaRectangle *src1,
gboolean meta_rectangle_equal (const MetaRectangle *src1,
const MetaRectangle *src2);
/* Find the bounding box of the union of two rectangles */
void meta_rectangle_union (const MetaRectangle *rect1,
const MetaRectangle *rect2,
MetaRectangle *dest);
/* overlap is similar to intersect but doesn't provide location of
* intersection information.
*/

View File

@ -35,7 +35,7 @@ typedef enum
/* exit immediately */
void meta_exit (MetaExitCode code);
/* g_main_quit() then fall out of main() */
/* g_main_loop_quit() then fall out of main() */
void meta_quit (MetaExitCode code);
void meta_restart (void);

View File

@ -44,8 +44,7 @@ typedef enum
META_PREF_TITLEBAR_FONT,
META_PREF_NUM_WORKSPACES,
META_PREF_APPLICATION_BASED,
META_PREF_WINDOW_KEYBINDINGS,
META_PREF_SCREEN_KEYBINDINGS,
META_PREF_KEYBINDINGS,
META_PREF_DISABLE_WORKAROUNDS,
META_PREF_COMMANDS,
META_PREF_TERMINAL_COMMAND,
@ -216,7 +215,8 @@ typedef struct
typedef struct
{
const char *name;
/* a list of MetaKeyCombos. Each of them is bound to
/**
* A list of MetaKeyCombos. Each of them is bound to
* this keypref. If one has keysym==modifiers==0, it is
* ignored. For historical reasons, the first entry is
* governed by the pref FOO and the remainder are
@ -224,14 +224,15 @@ typedef struct
*/
GSList *bindings;
/* for keybindings that can have shift or not like Alt+Tab */
gboolean add_shift;
/** for keybindings that can have shift or not like Alt+Tab */
gboolean add_shift:1;
/** for keybindings that apply only to a window */
gboolean per_window:1;
} MetaKeyPref;
void meta_prefs_get_screen_bindings (const MetaKeyPref **bindings,
int *n_bindings);
void meta_prefs_get_window_bindings (const MetaKeyPref **bindings,
int *n_bindings);
void meta_prefs_get_key_bindings (const MetaKeyPref **bindings,
int *n_bindings);
MetaKeyBindingAction meta_prefs_get_keybinding_action (const char *name);

View File

@ -204,9 +204,6 @@ MetaUIDirection meta_ui_get_direction (void);
GdkPixbuf *meta_ui_get_pixbuf_from_pixmap (Pixmap pmap);
void meta_ui_get_fallback_icons (GdkPixbuf **fallback_icon_p,
GdkPixbuf **fallback_mini_icon_p);
#include "tabpopup.h"
#endif

View File

@ -97,6 +97,13 @@ char* meta_g_utf8_strndup (const gchar *src, gsize n);
void meta_free_gslist_and_elements (GSList *list_to_deep_free);
void meta_show_dialog (const char *type,
const char *title,
const char *message,
gint timeout,
const char **columns,
const char **entries);
/* To disable verbose mode, we make these functions into no-ops */
#ifdef WITH_VERBOSE_MODE

File diff suppressed because it is too large Load Diff

522
src/metacity.schemas.in.in Normal file
View File

@ -0,0 +1,522 @@
<gconfschemafile>
<schemalist>
<!-- General preferences -->
<schema>
<key>/schemas/apps/metacity/general/mouse_button_modifier</key>
<applyto>/apps/metacity/general/mouse_button_modifier</applyto>
<owner>metacity</owner>
<type>string</type>
<default>&lt;Alt&gt;</default>
<locale name="C">
<short>Modifier to use for modified window click actions</short>
<long>
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).
Modifier is expressed as "&lt;Alt&gt;" or "&lt;Super&gt;"
for example.
</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/metacity/general/button_layout</key>
<applyto>/apps/metacity/general/button_layout</applyto>
<owner>metacity</owner>
<type>string</type>
<default>menu:minimize,maximize,close</default>
<locale name="C">
<short>Arrangement of buttons on the titlebar</short>
<long>
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 metacity versions
without breaking older versions.
A special spacer tag can be used to insert some space between
two adjacent buttons.
</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/metacity/general/focus_mode</key>
<applyto>/apps/metacity/general/focus_mode</applyto>
<owner>metacity</owner>
<type>string</type>
<default>click</default>
<locale name="C">
<short>Window focus mode</short>
<long>
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.
</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/metacity/general/focus_new_windows</key>
<applyto>/apps/metacity/general/focus_new_windows</applyto>
<owner>metacity</owner>
<type>string</type>
<default>smart</default>
<locale name="C">
<short>Control how new windows get focus</short>
<long>
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.
</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/metacity/general/raise_on_click</key>
<applyto>/apps/metacity/general/raise_on_click</applyto>
<owner>metacity</owner>
<type>bool</type>
<default>true</default>
<locale name="C">
<short>Whether raising should be a side-effect of other user
interactions</short>
<long>
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.
</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/metacity/general/action_double_click_titlebar</key>
<applyto>/apps/metacity/general/action_double_click_titlebar</applyto>
<owner>metacity</owner>
<type>string</type>
<default>toggle_maximize</default>
<locale name="C">
<short>Action on title bar double-click</short>
<long>
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.
</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/metacity/general/action_middle_click_titlebar</key>
<applyto>/apps/metacity/general/action_middle_click_titlebar</applyto>
<owner>metacity</owner>
<type>string</type>
<default>lower</default>
<locale name="C">
<short>Action on title bar middle-click</short>
<long>
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.
</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/metacity/general/action_right_click_titlebar</key>
<applyto>/apps/metacity/general/action_right_click_titlebar</applyto>
<owner>metacity</owner>
<type>string</type>
<default>menu</default>
<locale name="C">
<short>Action on title bar right-click</short>
<long>
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.
</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/metacity/general/auto_raise</key>
<applyto>/apps/metacity/general/auto_raise</applyto>
<owner>metacity</owner>
<type>bool</type>
<default>false</default>
<locale name="C">
<short>Automatically raises the focused window</short>
<long>
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.
</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/metacity/general/auto_raise_delay</key>
<applyto>/apps/metacity/general/auto_raise_delay</applyto>
<owner>metacity</owner>
<type>int</type>
<default>500</default>
<locale name="C">
<short>Delay in milliseconds for the auto raise option</short>
<long>
The time delay before raising a window if auto_raise is set to
true. The delay is given in thousandths of a second.
</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/metacity/general/theme</key>
<applyto>/apps/metacity/general/theme</applyto>
<owner>metacity</owner>
<type>string</type>
<default>Clearlooks</default>
<locale name="C">
<short>Current theme</short>
<long>
The theme determines the appearance of window borders,
titlebar, and so forth.
</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/metacity/general/titlebar_uses_system_font</key>
<applyto>/apps/metacity/general/titlebar_uses_system_font</applyto>
<owner>metacity</owner>
<type>bool</type>
<default>false</default>
<locale name="C">
<short>Use standard system font in window titles</short>
<long>
If true, ignore the titlebar_font
option, and use the standard application font for window
titles.
</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/metacity/general/titlebar_font</key>
<applyto>/apps/metacity/general/titlebar_font</applyto>
<owner>metacity</owner>
<type>string</type>
<default>Sans Bold 10</default>
<locale name="C">
<short>Window title font</short>
<long>
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.
</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/metacity/general/num_workspaces</key>
<applyto>/apps/metacity/general/num_workspaces</applyto>
<owner>metacity</owner>
<type>int</type>
<default>4</default>
<locale name="C">
<short>Number of workspaces</short>
<long>
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.
</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/metacity/general/visual_bell</key>
<applyto>/apps/metacity/general/visual_bell</applyto>
<owner>metacity</owner>
<type>bool</type>
<default>false</default>
<locale name="C">
<short>Enable Visual Bell</short>
<long>
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.
</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/metacity/general/audible_bell</key>
<applyto>/apps/metacity/general/audible_bell</applyto>
<owner>metacity</owner>
<type>bool</type>
<default>true</default>
<locale name="C">
<short>System Bell is Audible</short>
<long>
Determines whether applications or the system can generate
audible 'beeps'; may be used in conjunction with 'visual bell' to
allow silent 'beeps'.
</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/metacity/general/visual_bell_type</key>
<applyto>/apps/metacity/general/visual_bell_type</applyto>
<owner>metacity</owner>
<type>string</type>
<default>fullscreen</default>
<locale name="C">
<short>Visual Bell Type</short>
<long>
Tells Metacity 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.
</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/metacity/general/compositing_manager</key>
<applyto>/apps/metacity/general/compositing_manager</applyto>
<owner>metacity</owner>
<type>bool</type>
<default>false</default>
<locale name="C">
<short>Compositing Manager</short>
<long>
Determines whether Metacity is a compositing manager.
</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/metacity/workspace_names/name</key>
<applyto>/apps/metacity/workspace_names/name_1</applyto>
<applyto>/apps/metacity/workspace_names/name_2</applyto>
<applyto>/apps/metacity/workspace_names/name_3</applyto>
<applyto>/apps/metacity/workspace_names/name_4</applyto>
<applyto>/apps/metacity/workspace_names/name_5</applyto>
<applyto>/apps/metacity/workspace_names/name_6</applyto>
<applyto>/apps/metacity/workspace_names/name_7</applyto>
<applyto>/apps/metacity/workspace_names/name_8</applyto>
<applyto>/apps/metacity/workspace_names/name_9</applyto>
<applyto>/apps/metacity/workspace_names/name_10</applyto>
<applyto>/apps/metacity/workspace_names/name_11</applyto>
<applyto>/apps/metacity/workspace_names/name_12</applyto>
<applyto>/apps/metacity/workspace_names/name_13</applyto>
<applyto>/apps/metacity/workspace_names/name_14</applyto>
<applyto>/apps/metacity/workspace_names/name_15</applyto>
<applyto>/apps/metacity/workspace_names/name_16</applyto>
<owner>metacity</owner>
<type>string</type>
<default></default>
<locale name="C">
<short>Name of workspace</short>
<long>
The name of a workspace.
</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/metacity/general/reduced_resources</key>
<applyto>/apps/metacity/general/reduced_resources</applyto>
<owner>metacity</owner>
<type>bool</type>
<default>false</default>
<locale name="C">
<short>If true, trade off usability for less resource usage</short>
<long>
If true, metacity 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.
</long>
</locale>
</schema>
<!-- Keybindings -->
<schema>
<key>/schemas/apps/metacity/global_keybindings/run_command</key>
<applyto>/apps/metacity/global_keybindings/run_command_1</applyto>
<applyto>/apps/metacity/global_keybindings/run_command_2</applyto>
<applyto>/apps/metacity/global_keybindings/run_command_3</applyto>
<applyto>/apps/metacity/global_keybindings/run_command_4</applyto>
<applyto>/apps/metacity/global_keybindings/run_command_5</applyto>
<applyto>/apps/metacity/global_keybindings/run_command_6</applyto>
<applyto>/apps/metacity/global_keybindings/run_command_7</applyto>
<applyto>/apps/metacity/global_keybindings/run_command_8</applyto>
<applyto>/apps/metacity/global_keybindings/run_command_9</applyto>
<applyto>/apps/metacity/global_keybindings/run_command_10</applyto>
<applyto>/apps/metacity/global_keybindings/run_command_11</applyto>
<applyto>/apps/metacity/global_keybindings/run_command_12</applyto>
<owner>metacity</owner>
<type>string</type>
<default>disabled</default>
<locale name="C">
<short>Run a defined command</short>
<long>
The keybinding that runs the correspondingly-numbered
command in /apps/metacity/keybinding_commands
The format looks like "&lt;Control&gt;a" or
"&lt;Shift&gt;&lt;Alt&gt;F1".
The parser is fairly liberal and allows lower or upper case,
and also abbreviations such as "&lt;Ctl&gt;" and
"&lt;Ctrl&gt;". If you set the option to the special string
"disabled", then there will be no keybinding for this
action.
</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/metacity/keybinding_commands/command</key>
<applyto>/apps/metacity/keybinding_commands/command_1</applyto>
<applyto>/apps/metacity/keybinding_commands/command_2</applyto>
<applyto>/apps/metacity/keybinding_commands/command_3</applyto>
<applyto>/apps/metacity/keybinding_commands/command_4</applyto>
<applyto>/apps/metacity/keybinding_commands/command_5</applyto>
<applyto>/apps/metacity/keybinding_commands/command_6</applyto>
<applyto>/apps/metacity/keybinding_commands/command_7</applyto>
<applyto>/apps/metacity/keybinding_commands/command_8</applyto>
<applyto>/apps/metacity/keybinding_commands/command_9</applyto>
<applyto>/apps/metacity/keybinding_commands/command_10</applyto>
<applyto>/apps/metacity/keybinding_commands/command_11</applyto>
<applyto>/apps/metacity/keybinding_commands/command_12</applyto>
<owner>metacity</owner>
<type>string</type>
<default> </default>
<locale name="C">
<short>Commands to run in response to keybindings</short>
<long>
The /apps/metacity/global_keybindings/run_command_N
keys define keybindings that correspond to these commands.
Pressing the keybinding for run_command_N will
execute command_N.
</long>
</locale>
</schema>
<!-- Schemas below are generated by schema-bindings.c when this file
becomes metacity.schemas.in
-->
<!-- GENERATED -->
<!-- Not used and/or crackrock -->
<schema>
<key>/schemas/apps/metacity/general/application_based</key>
<applyto>/apps/metacity/general/application_based</applyto>
<owner>metacity</owner>
<type>bool</type>
<default>false</default>
<locale name="C">
<short>(Not implemented) Navigation works in terms of applications not windows</short>
<long>
If true, then Metacity 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.
</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/metacity/general/disable_workarounds</key>
<applyto>/apps/metacity/general/disable_workarounds</applyto>
<owner>metacity</owner>
<type>bool</type>
<default>false</default>
<locale name="C">
<short>Disable misfeatures that are required by old or broken
applications</short>
<long>
Some applications disregard specifications in ways that result in
window manager misfeatures. This option puts Metacity in a
rigorously correct mode, which gives a more consistent user
interface, provided one does not need to run any misbehaving
applications.
</long>
</locale>
</schema>
</schemalist>
</gconfschemafile>

View File

@ -28,9 +28,9 @@
#ifndef WNCK_DRAW_WORKSPACE_H
#define WNCK_DRAW_WORKSPACE_H
#include <gdk/gdkdrawable.h>
#include <gdk/gdk.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <gtk/gtkwidget.h>
#include <gtk/gtk.h>
typedef struct
{

View File

@ -25,7 +25,7 @@
#define META_GRADIENT_H
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <gdk/gdkcolor.h>
#include <gdk/gdk.h>
typedef enum
{

View File

@ -33,8 +33,7 @@
#include <config.h>
#include "metaaccellabel.h"
#include <gtk/gtkmain.h>
#include <gtk/gtkaccelmap.h>
#include <gtk/gtk.h>
#include <string.h>
#include "util.h"

View File

@ -34,7 +34,7 @@
#ifndef __META_ACCEL_LABEL_H__
#define __META_ACCEL_LABEL_H__
#include <gtk/gtklabel.h>
#include <gtk/gtk.h>
#include "common.h"
#ifdef __cplusplus

View File

@ -25,7 +25,7 @@
#define _XOPEN_SOURCE 600 /* for the maths routines over floats */
#include <math.h>
#include <gtk/gtkicontheme.h>
#include <gtk/gtk.h>
#include "preview-widget.h"
static void meta_preview_class_init (MetaPreviewClass *klass);

View File

@ -22,7 +22,7 @@
*/
#include "theme.h"
#include <gtk/gtkbin.h>
#include <gtk/gtk.h>
#ifndef META_PREVIEW_WIDGET_H
#define META_PREVIEW_WIDGET_H

View File

@ -24,10 +24,7 @@
#include <config.h>
#include "resizepopup.h"
#include "util.h"
#include <gtk/gtkwindow.h>
#include <gtk/gtklabel.h>
#include <gtk/gtkframe.h>
#include <gtk/gtkmain.h>
#include <gtk/gtk.h>
#include <gdk/gdkx.h>
struct _MetaResizePopup
@ -110,6 +107,9 @@ update_size_window (MetaResizePopup *popup)
g_return_if_fail (popup->size_window != NULL);
/* Translators: This represents the size of a window. The first number is
* the width of the window and the second is the height.
*/
str = g_strdup_printf (_("%d x %d"),
popup->horizontal_size,
popup->vertical_size);

File diff suppressed because it is too large Load Diff

View File

@ -486,7 +486,7 @@ preview_collection (int font_size,
i = 0;
while (i < META_FRAME_TYPE_LAST)
{
const char *title;
const char *title = NULL;
GtkWidget *contents;
GtkWidget *align;
double xalign, yalign;

View File

@ -57,9 +57,7 @@
#include "theme-parser.h"
#include "util.h"
#include "gradient.h"
#include <gtk/gtkwidget.h>
#include <gtk/gtkimage.h>
#include <gtk/gtkicontheme.h>
#include <gtk/gtk.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
@ -4628,6 +4626,10 @@ check_state (MetaFrameStyleSet *style_set,
if (get_style (style_set, state,
META_FRAME_RESIZE_NONE, i) == NULL)
{
/* Translators: This error occurs when a <frame> tag is missing
* in theme XML. The "<frame ...>" is intended as a noun phrase,
* and the "missing" qualifies it. You should translate "whatever".
*/
g_set_error (error, META_THEME_ERROR,
META_THEME_ERROR_FAILED,
_("Missing <frame state=\"%s\" resize=\"%s\" focus=\"%s\" style=\"whatever\"/>"),
@ -4824,6 +4826,10 @@ meta_theme_validate (MetaTheme *theme,
if (theme->readable_name == NULL)
{
/* Translators: This error means that a necessary XML tag (whose name
* is given in angle brackets) was not found in a given theme (whose
* name is given second, in quotation marks).
*/
g_set_error (error, META_THEME_ERROR, META_THEME_ERROR_FAILED,
_("No <%s> set for theme \"%s\""), "name", theme->name);
return FALSE;

View File

@ -27,7 +27,7 @@
#include "boxes.h"
#include "gradient.h"
#include "common.h"
#include <gtk/gtkrc.h>
#include <gtk/gtk.h>
typedef struct _MetaFrameStyle MetaFrameStyle;
typedef struct _MetaFrameStyleSet MetaFrameStyleSet;
@ -805,8 +805,6 @@ struct _MetaTheme
GHashTable *style_sets_by_name;
MetaFrameStyleSet *style_sets_by_type[META_FRAME_TYPE_LAST];
GdkPixbuf *fallback_icon, *fallback_mini_icon;
GQuark quark_width;
GQuark quark_height;
GQuark quark_object_width;

View File

@ -22,7 +22,7 @@
*/
#include "theme.h"
#include <gtk/gtkmisc.h>
#include <gtk/gtk.h>
#ifndef META_THEME_WIDGET_H
#define META_THEME_WIDGET_H

View File

@ -851,7 +851,7 @@ meta_ui_parse_modifier (const char *accel,
*mask = 0;
if (strcmp (accel, "disabled") == 0)
if (accel == NULL || strcmp (accel, "disabled") == 0)
return TRUE;
meta_ui_accelerator_parse (accel, &gdk_sym, &gdk_code, &gdk_mask);
@ -998,16 +998,3 @@ meta_ui_get_pixbuf_from_pixmap (Pixmap pmap)
return pixbuf;
}
void
meta_ui_get_fallback_icons (GdkPixbuf **fallback_icon_p,
GdkPixbuf **fallback_mini_icon_p)
{
MetaTheme *theme = meta_theme_get_current ();
if (fallback_icon_p)
*fallback_icon_p = theme->fallback_icon;
if (fallback_mini_icon_p)
*fallback_mini_icon_p = theme->fallback_mini_icon;
}

View File

@ -68,7 +68,7 @@ get_size (Display *d, Drawable draw,
int *xp, int *yp, int *widthp, int *heightp)
{
int x, y;
unsigned int width, height, border, depth;
unsigned int width=0, height=0, border=0, depth=0;
Window root;
XGetGeometry (d, draw, &root, &x, &y, &width, &height, &border, &depth);

159
tools/announce-wrangler.py Normal file
View File

@ -0,0 +1,159 @@
import commands
import xml.dom.minidom
import glob
import wordpresslib # http://www.blackbirdblog.it/programmazione/progetti/28
import ConfigParser
import os
import re
doaps = glob.glob("*.doap")
if len(doaps)==0:
print 'Please run this from the top-level directory.'
description=str(xml.dom.minidom.parse(doaps[0]).getElementsByTagName('shortdesc')[0].firstChild.toxml().strip())
program_name = doaps[0][:-5]
print program_name
markup = {
'text': {
'open': ' *',
'newline': ' ',
'close': '',
},
'html': {
'open': '<li>',
'newline': '',
'close': '</li>',
},
}
def text_list(list, type):
result = []
for entry in list:
result.append(markup[type]['open'])
for word in entry.split():
if len(result[-1]+word)>75:
result.append(markup[type]['newline'])
result[-1] = result[-1] + ' ' + word
if result[-1].strip()=='':
result = result[:-1]
result[-1] = result[-1] + markup[type]['close']
return '\n'.join(result)
news = file('NEWS')
news_entry = []
header_count = 0
while header_count<2:
line = news.readline().replace('\n', '')
news_entry.append(line)
if line.startswith('='):
header_count = header_count + 1
news.close()
version = news_entry[0]
news_entry = news_entry[2:-2]
print version
majorminor = '.'.join(version.split('.')[:2])
md5s = commands.getoutput('ssh master.gnome.org md5sum /ftp/pub/GNOME/sources/metacity/%s/%s-%s.tar*' % (majorminor, program_name, version)).split()
if len(md5s)!=4:
print 'WARNING: There were not two known tarballs'
md5_values = {}
for i in range(0, len(md5s), 2):
a = md5s[i+1]
md5_values[a[a.rindex('.'):]] = md5s[i]
print md5_values
changes = []
translations = ''
reading_changes = False
reading_translations = False
for line in news_entry:
line = line.replace('(#', '(GNOME bug ').strip()
if line.startswith('-'):
changes.append(line[2:])
reading_changes = True
elif reading_changes:
if line=='':
reading_changes = False
else:
changes[-1] = changes[-1] + ' ' + line
elif line=='Translations':
reading_translations = True
elif reading_translations:
translations = translations + ' ' + line
translations = translations[1:]
text_links = []
for i in ('.bz2', '.gz'):
text_links.append('%s http://download.gnome.org/sources/metacity/%s/%s-%s.tar%s' % (
md5_values[i], majorminor, program_name, version, i))
text_version = """\
What is it ?
============
%s
What's changed ?
================
%s
Translations:
%s
Where can I get it ?
====================
%s""" % (text_list([description], 'text'),
text_list(changes, 'text'),
text_list([translations], 'text'),
text_list(text_links, 'text'))
print "============ x8 x8 x8 ===== SEND THIS TO gnome-announce-list"
print text_version
print "============ x8 x8 x8 ===== ENDS"
translations = re.sub('\((.*)\)',
'(<a href="http://svn.gnome.org/viewvc/metacity/trunk/po/\\1.po">\\1</a>)',
translations)
html_version = """\
<b>What is it ?</b><br />
<ul>%s</ul>
<b>What's changed ?</b><br />
<ul>%s</ul>
<i>Translations:</i><br />
<ul>%s</ul>
<b>Where can I get it ?</b><br />
<ul>%s</ul>""" % (text_list([description], 'html'),
text_list(changes, 'html'),
text_list([translations], 'html'),
text_list(text_links, 'html'))
cp = ConfigParser.ConfigParser()
cp.read(os.environ['HOME']+'/.config/metacity/tools.ini')
wp = wordpresslib.WordPressClient(
cp.get('release-wrangler', 'blogurl'),
cp.get('release-wrangler', 'bloguser'),
cp.get('release-wrangler', 'blogpass'))
wp.selectBlog(cp.getint('release-wrangler', 'blognumber'))
post = wordpresslib.WordPressPost()
post.title = '%s %s released' % (program_name, version)
post.description = html_version
# appears to have been turned off-- ask jdub
#idPost = wp.newPost(post, False)
print html_version

View File

@ -26,6 +26,8 @@ import commands
import sys
import os
import posixpath
import ConfigParser
import re
# FIXME: Needs tidying into separate functions.
@ -83,85 +85,29 @@ def wordwrap(str, prefix=''):
#####################
change_filename = 'ChangeLog'
get_up_to_date()
discoveries = {}
cp = ConfigParser.ConfigParser()
cp.read(os.environ['HOME']+'/.config/metacity/tools.ini')
current_file = '?'
os.environ['CHANGE_LOG_NAME'] = cp.get('commit-wrangler', 'name')
os.environ['CHANGE_LOG_EMAIL_ADDRESS'] = cp.get('commit-wrangler', 'address')
diff = commands.getstatusoutput('svn diff --diff-cmd $(which diff) -x -up')[1]
for line in diff.split('\n'):
if line.startswith('---'):
current_file = line[4:line.find('\t')]
elif line.startswith('@@'):
atatpos = line.find('@@', 3)+3
discoveries.setdefault(current_file,{})[line[atatpos:line.find(' ',atatpos)]] = 1
# yes, I know this is MY username. I will come back and fix it
# later, but for now there is a lot else to do. FIXME
your_username = 'Thomas Thurman <tthurman@gnome.org>'
change_filename = posixpath.expanduser("~/.commit-wrangler.txt")
change = open(change_filename, 'w')
change.write('# You are checking in a single changeset.\n')
change.write('# The message below is the one which will be used\n')
change.write('# both in the checkin and the changelog.\n')
change.write('# Any lines starting with a "#" don\'t go in.\n')
change.write('#\n')
change.write('%s %s\n\n' % (
time.strftime('%Y-%m-%d',time.gmtime()),
your_username))
for filename in discoveries:
change.write(wordwrap('* %s (%s): something' % (
filename, ', '.join(discoveries[filename])),
' ')+'\n')
change.write('\n#\n#\n##############\n#\n#\n#\n')
change.write('# And this is the original diff:\n#\n#')
change.write(diff.replace('\n','\n#'))
change.write('\n#\n#\n##############\n# EOF\n')
change.close()
print commands.getoutput('moap cl prep')
time_before = os.stat(change_filename)[8]
os.system(favourite_editor()+' +6 %s ' % (change_filename))
if os.stat(change_filename)[8] == time_before:
print 'No change; aborting.'
print 'No change; aborting:'
print commands.getoutput('svn revert '+change_filename)
sys.exit(0)
# Update the changelog
changelog_new = open('ChangeLog.tmp', 'w')
changelog_justfunc = open(change_filename+'.justfunc', 'w')
change = open(change_filename, 'r')
for line in change.readlines():
if not line.startswith('#'):
changelog_new.write(line)
changelog_justfunc.write(line)
change.close()
changelog_justfunc.close()
checkin = commands.getoutput("moap cl ci")
changelog = open('ChangeLog', 'r')
for line in changelog.readlines():
changelog_new.write(line)
changelog.close()
changelog_new.close()
os.rename('ChangeLog.tmp', 'ChangeLog')
committing = commands.getstatusoutput('svn commit --file %s.justfunc' % (change_filename))[1]
print 'Committed: ', committing
checkin = committing[committing.find('Committed revision')+19:]
checkin = checkin[:checkin.find('.')]
# this number will be useful in the future for updating
# Bugzilla.
print
print 'http://svn.gnome.org/viewvc/metacity?rev=%s&view=rev' % (checkin)
print re.sub(".*Committed revision (\\d+).*", 'http://svn.gnome.org/viewvc/metacity?rev=\\1&view=rev', checkin)

View File

@ -62,7 +62,7 @@ def check_we_are_up_to_date():
changed = []
for line in commands.getoutput('/usr/bin/svn status').split('\n'):
if line!='' and (line[0]=='C' or line[0]=='M'):
if line.find('release-wrangler.py')==-1:
if line.find('release-wrangler.py')==-1 and line.find('ChangeLog')==-1:
# we should be insensitive to changes in this script itself
# to avoid chicken-and-egg problems
changed.append(line[1:].lstrip())