Matthias Clasen
e499a09759
Drop gtkintl.h
...
Include gtkprivate.h for I_() and glib-i18n.h for
gettext macros.
2022-09-24 10:03:37 -04:00
Marco Melorio
da72cfea40
docs: Tag Gdk.ModifierType as flags
2021-11-07 18:14:15 +01:00
Emmanuele Bassi
c3ca48b249
Improve the gtk_accelerator_parse() docs
...
We need to escape the modifiers in angular brackets, or Markdown will
consider them as HTML tags.
We also should document the modifiers we're parsing.
2021-09-04 18:56:08 +01:00
Matthias Clasen
7fe0610b68
introspection: Stop using allow-none
...
allow-none has been deprecated for a long time
already. Instead use optional and nullable everywhere.
2021-05-20 19:17:49 -04:00
Matthias Clasen
8ba16eb4f1
Documentation fixes
...
Mostly fixing up indentation of continuation lines,
and other small cleanups.
2021-05-20 19:17:49 -04:00
Matthias Clasen
260a4db854
accelgroup: Convert docs
...
Drop an unused SECTION, and convert links.
2021-03-11 16:37:37 +00:00
Emmanuele Bassi
e8b6e6cad0
docs: Clean up the first paragraph for various symbols
...
The documentation engine will use the first paragraph as the summary for
a type or constant.
2021-03-11 16:37:30 +00:00
Christian Hergert
07bb07abbe
macos: port gtk to GDK_WINDOWING_MACOS
...
For the various uses of GDK_WINDOWING_QUARTZ, we need to use
alternatives from GDK_WINDOWING_MACOS.
Some minor loss of functionality is here, such as icons sent with
application menus. That can certainly be added back at a future
point.
2020-10-09 20:08:23 -07:00
Matthias Clasen
8562c623d3
Drop GtkAccelLabel
...
We no longer use this widget anywhere.
2020-08-04 23:05:18 -04:00
Benjamin Otte
d375dce9f5
Replace "gchar" with "char"
2020-07-25 00:47:36 +02:00
Benjamin Otte
d7266b25ba
Replace "gint" with "int"
2020-07-25 00:47:36 +02:00
Matthias Clasen
5f9bcd0409
accelgroup: Expand translator comment
...
Add details about the use of KP.
2020-05-25 22:50:03 -04:00
Matthias Clasen
bd3f4599ed
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #2778
See merge request GNOME/gtk!1966
2020-05-26 02:41:37 +00:00
Matthias Clasen
a55d179215
accelgroup: Drop some unused code
2020-05-25 20:56:09 -04:00
Emmanuele Bassi
7de9eb005e
Add a comment for translators
...
"KP" refers to the numeric keypad, in this context.
Fixes : #2783
2020-05-24 15:20:13 +01:00
Matthias Clasen
061f257e83
accelgroup: Use Unicode in string literals
...
Its 2020, non-ASCII characters are not taboo anymore.
2020-05-21 19:38:36 -04:00
Matthias Clasen
c58d9446f4
Differentiate keypad keysyms in accelerators
...
When displaying accelerators, differentiate keypad
symbols with a 'KP' prefix. Fixing a 17 year old bug.
Update expected output in accelerator tests.
Fixes : #227
2020-05-21 19:38:19 -04:00
Chun-wei Fan
d0a8d263ac
gtk/gtkaccelgroup.c: Fix build on Visual Studio
...
Visual Studio does not allow one to initialize structure members with
non-constant expressions, caused by using strlen(s), so fix this by
using sizeof(s) - 1 instead.
2020-04-29 15:02:03 +08:00
Timm Bäder
e583349956
accelgroup: Restructure gtk_accelerator_name
...
To fix invalid reads and make the function a bit shorter while we're at
it.
Fixes #2602
2020-04-17 15:21:00 +02:00
Matthias Clasen
ad1bc75dd2
accelgroup: Fix an invalid write
...
This was lost by accident in d110fddbce
.
Fixes : #2602
2020-04-10 08:24:03 -04:00
Matthias Clasen
70fbf8dbb6
accelgroup: Small documentation updates
...
Mention GtkShortcutTrigger, and remove references
to <Release>.
2020-04-06 16:32:03 -04:00
Matthias Clasen
1de7719e34
Drop gtk_accelerator_set_default_mod_mask
...
Our new approach to modifiers works with a fixed set,
there is really no need to customize the modifier
masks if the backends are all supposed to deliver
the same modifiers.
2020-04-06 16:32:03 -04:00
Matthias Clasen
c297d45b8a
gtk: Stop using modifier intents
...
Reviewing the existing settings, the only backend with
some differences in the modifier intent settings is OS X,
and we would rather have that implemented by interpreting
the existing modifiers in the appropriate way.
X11 Wayland Win32 OS X
primary ctrl ctrl ctrl mod2
mnemonic alt alt alt alt
context menu - - - ctrl
extend sel shift shift shift shift
modify sel ctrl ctrl ctrl mod2
no text alt|ctrl alt|ctrl alt|ctrl mod2|ctrl
shift group varies - - alt
GTK now uses the following modifiers:
primary ctrl
mnemonic alt
extend sel shift
modify sel ctrl
no text alt|ctrl
The context menu and shift group intents were not used
in GTK at all.
Update tests to no longer expect <Primary> to roundtrip
through the accelerator parsing and formatting code.
2020-04-06 16:32:03 -04:00
Matthias Clasen
5071367794
gtk: Remove handling of virtual modifiers
...
These are going away. We expect to just have
named modifiers in modifier masks now, so we
longer juggle 'real' and 'virtual' modifiers.
2020-04-06 15:13:54 -04:00
Matthias Clasen
d110fddbce
gtk: Stop using GDK_MODx_MASK
...
These are never used in practice, and we never want to
see them in the UI, so stop supporting them. This is
in preparation for cleaning up GdkModifierType.
2020-04-06 01:40:49 -04:00
Matthias Clasen
b02db72e17
Rename GDK_MOD1_MASK to GDK_ALT_MASK
...
We've hardcoded Mod1 = Alt for a long time, there is
no need to keep the confusing naming around anymore.
2020-04-06 01:40:49 -04:00
Matthias Clasen
4495bacfd1
gtk: Use display apis for keymap mapping
...
This removes the last uses of GdkKeymap from GTK.
2020-04-06 01:40:49 -04:00
Matthias Clasen
234a21905c
gtk: Stop using keymap apis
...
Stop using most keymap apis in GTK. Only a few calls
related to virtual modifiers are left.
2020-04-06 01:40:49 -04:00
Benjamin Otte
bb4fbe3d8f
accels: Remove GtkAccelGroup
2020-03-25 23:14:44 -04:00
Benjamin Otte
90a34312d4
accel: Add display arg to gtk_accelerator_parse_with_keycode()
...
It was using the default display unconditionally.
2020-03-25 23:14:28 -04:00
Benjamin Otte
580863b112
accelerators: Make gtk_accelerator_parse() return TRUE/FALSE
...
A parse function should return success or not. So do that.
2020-03-25 23:14:28 -04:00
Benjamin Otte
cdd33bbee6
accelgroup: Remove unneeded APIs
...
After the removal of GtkAccelMap, these things are no longer necessary.
2020-03-25 23:14:27 -04:00
Emmanuele Bassi
bca1f6b64f
gtk: Remove GtkAccelMap
...
Now that accel paths are gone, the object managing them isn't needed
anymore either.
2020-03-25 23:14:27 -04:00
Benjamin Otte
2244eeb727
gdk: Remove GDK_RELEASE_MASK
...
It was only ever supported by keybindings and those are gone now.
2020-03-25 23:14:27 -04:00
Benjamin Otte
90c7f4608a
accelgroup: Add gtk_accel_group_print_label()
2020-03-25 23:14:27 -04:00
Benjamin Otte
66102dacf1
accellabel: Move gtk_accelerator_get_label() code
...
The function lives in gtkaccelgroup.c, so there's no need to have that
call a private function in another source file. Instead, make that
other source file call gtk_accelerator_get_label() instead.
2020-03-25 23:14:27 -04:00
Benjamin Otte
c1ee2fd54a
accelgroup: Actually have a default mod mask
...
Don't just use a value without initializing it.
2020-03-25 22:36:03 -04:00
Matthias Clasen
31db615885
Revert "Merge branch 'disable-window-test' into 'master'"
...
This reverts commit 3ac4c76b18
, reversing
changes made to 6ec96d2e98
.
2020-03-19 18:03:16 -04:00
Benjamin Otte
ff6df33b6a
accels: Remove GtkAccelGroup
2020-03-18 23:00:51 -04:00
Benjamin Otte
94ef20ea36
accel: Add display arg to gtk_accelerator_parse_with_keycode()
...
It was using the default display unconditionally.
2020-03-18 23:00:51 -04:00
Benjamin Otte
87df17e4ce
accelerators: Make gtk_accelerator_parse() return TRUE/FALSE
...
A parse function should return success or not. So do that.
2020-03-18 23:00:51 -04:00
Benjamin Otte
4d0bab0c24
accelgroup: Remove unneeded APIs
...
After the removal of GtkAccelMap, these things are no longer necessary.
2020-03-18 23:00:51 -04:00
Emmanuele Bassi
b28da74e90
gtk: Remove GtkAccelMap
...
Now that accel paths are gone, the object managing them isn't needed
anymore either.
2020-03-18 23:00:51 -04:00
Benjamin Otte
8c23ccd86e
gdk: Remove GDK_RELEASE_MASK
...
It was only ever supported by keybindings and those are gone now.
2020-03-18 23:00:50 -04:00
Benjamin Otte
e050288d07
accelgroup: Add gtk_accel_group_print_label()
2020-03-18 23:00:50 -04:00
Benjamin Otte
93af53a2fc
accellabel: Move gtk_accelerator_get_label() code
...
The function lives in gtkaccelgroup.c, so there's no need to have that
call a private function in another source file. Instead, make that
other source file call gtk_accelerator_get_label() instead.
2020-03-18 23:00:50 -04:00
Benjamin Otte
4e3ac8f52b
accelgroup: Actually have a default mod mask
...
Don't just use a value without initializing it.
2020-03-18 23:00:50 -04:00
Matthias Clasen
2a7b5d8229
accelgroup: Fix a buffer overrun
...
gtk_accelerator_parse_with_keycode can
overrun its buffer for certain inputs.
Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/2325
2019-12-23 23:17:29 -05:00
Matthias Clasen
651a2b2e40
accel label: Make final
2019-05-26 21:01:33 -04:00
Matthias Clasen
8755d884f3
Remove a lot of Since annotations
...
4.0 will represent a clean epoch. We don't want to have
lots of noise in the docs about 2.x or 3.x.
2018-06-25 19:55:04 -04:00