summaryrefslogtreecommitdiff
path: root/src/core/prefs.c
diff options
context:
space:
mode:
authorThomas Thurman <tthurman@gnome.org>2008-10-18 04:33:14 +0000
committerThomas James Alexander Thurman <tthurman@src.gnome.org>2008-10-18 04:33:14 +0000
commit493408167bc3a39e1b57b5217d8d7f394992addf (patch)
tree538795801b2a223f552e7bfd25cbdd886346ce4b /src/core/prefs.c
parenta8f1a61242fb10655e83ab6e64f3e701658301dc (diff)
downloadmetacity-493408167bc3a39e1b57b5217d8d7f394992addf.tar.gz
During a discussion with Rodney Dawes about making life easier for the
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. svn path=/trunk/; revision=3966
Diffstat (limited to 'src/core/prefs.c')
-rw-r--r--src/core/prefs.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/core/prefs.c b/src/core/prefs.c
index 130d52f6..8cc09472 100644
--- a/src/core/prefs.c
+++ b/src/core/prefs.c
@@ -1815,21 +1815,18 @@ meta_prefs_set_num_workspaces (int n_workspaces)
#endif /* HAVE_GCONF */
}
+#define item(name, suffix, param, flags, description, stroke) \
+ { #name suffix, NULL, flags & BINDING_REVERSES },
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
{ NULL, NULL, FALSE }
};
+#undef item
#ifndef HAVE_GCONF
typedef struct
@@ -1839,14 +1836,14 @@ 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) \
+#define item(name, suffix, param, flags, description, keystroke) \
{ #name suffix, keystroke },
#include "screen-bindings.h"
#undef item
@@ -1854,12 +1851,10 @@ static MetaSimpleKeyMapping screen_string_bindings[] = {
};
static MetaSimpleKeyMapping window_string_bindings[] = {
-#define ONLY_BOUND_BY_DEFAULT
-#define item(name, suffix, param, short, long, keystroke) \
+#define item(name, suffix, param, flags, description, keystroke) \
{ #name suffix, keystroke },
#include "window-bindings.h"
#undef item
-#undef ONLY_BOUND_BY_DEFAULT
{ NULL, NULL }
};