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
Matthias Clasen
3ac4c76b18
Merge branch 'disable-window-test' into 'master'
...
Disable window test
See merge request GNOME/gtk!1540
2020-03-19 19:35:42 +00:00
Matthias Clasen
89b537bd8a
Fix the action test
...
We have a test that enumerates the GtkText actions,
so when a new open appears, the test needs to be updated.
2020-03-19 14:29:37 -04:00
Matthias Clasen
7d5cfcf61d
Fix a compiler warning
2020-03-19 14:13:26 -04:00
Matthias Clasen
2e70b4c323
temporarily disable window test
...
This test was broken by the GdkToplevel refactoring,
and needs a big gtkwindow.c configure request cleanup
before it will work again.
2020-03-19 11:25:38 -04:00
Matthias Clasen
fcab0943bf
text view: Fix touch selection
...
We forgot to allocated that popover.
2020-03-19 09:46:53 -04:00
Matthias Clasen
c8fd6407a8
widget: Drop the ::popup-menu signal
...
This is now done in widgets which have context
menus.
2020-03-19 00:56:46 -04:00
Matthias Clasen
53f29ba427
placesview: Stop using ::popup-menu
...
This signal is going away.
2020-03-19 00:54:23 -04:00
Matthias Clasen
eb3f4b302f
filechooser: Stop using ::popup-menu
...
This signal is going away.
2020-03-19 00:24:53 -04:00
Matthias Clasen
59df45f3f7
mountoperation: Stop using ::popup-menu
...
We can just use a shortcut controller directly.
2020-03-18 23:00:51 -04:00
Matthias Clasen
98011e6273
gtk-demo: Stop emitting ::popup-menu
...
The signal was not used anyway, in the font explorer demo.
2020-03-18 23:00:51 -04:00
Matthias Clasen
f40965cc40
colorchooser: Stop using ::popup-menu
...
This signal is going away. Use an action instead.
2020-03-18 23:00:51 -04:00
Matthias Clasen
ab9b094f80
range: Remove ::popup-menu emission
...
This signal is going away, and having context menus
on sliders is not really a thing anyway.
2020-03-18 23:00:51 -04:00
Matthias Clasen
4bc60c6110
scrollbar: Remove :popup-menu forwarding
...
This signal is going away.
2020-03-18 23:00:51 -04:00
Matthias Clasen
48ace13635
emojichooser: Stop using ::popup-menu
...
This signal is going away. Use an action instead.
2020-03-18 23:00:51 -04:00
Matthias Clasen
908d996b4f
Use an action for the context menu keybinding
...
The ::popup-menu signal is going away.
2020-03-18 23:00:51 -04:00
Matthias Clasen
4e263b4042
Print mnemonic triggers clearly
2020-03-18 23:00:51 -04:00
Matthias Clasen
f5134a833c
inspector: Show shortcuts
...
At a tab that lists the shortcuts contained in a
GtkShortcutController.
2020-03-18 23:00:51 -04:00
Matthias Clasen
f7021e80a7
Only create a class shortcut controller if we have shortcuts
...
No point in creating objects that just hold empty lists.
2020-03-18 23:00:51 -04:00
Matthias Clasen
3e7d49a8d3
widget: Name the controllers
2020-03-18 23:00:51 -04:00
Matthias Clasen
5a6533d8fb
window: Name the the controllers
2020-03-18 23:00:51 -04:00
Matthias Clasen
5a6a9dc149
shortcutmanager: Name the controllers
...
This is helpful in the inspector.
2020-03-18 23:00:51 -04:00
Matthias Clasen
ad69899a9d
Move shortcut manager initialization code
...
It is just too ugly to use quarks across multiple
source files, so add a private helper function that
attaches the controllers.
2020-03-18 23:00:51 -04:00
Benjamin Otte
3cf56817e7
filechooser: Trigger the location popup via bindings
...
Simplifies code quite a bit.
2020-03-18 23:00:51 -04:00
Benjamin Otte
ff6df33b6a
accels: Remove GtkAccelGroup
2020-03-18 23:00:51 -04:00
Benjamin Otte
e944514664
testmenubutton: Don't create a GtkAccelGroup
...
It's unused.
2020-03-18 23:00:51 -04:00
Benjamin Otte
93bb3f7144
testsuite: Remove GtkAccelGroup usage
2020-03-18 23:00:51 -04:00
Benjamin Otte
17d9ba362c
widget: Remove gtk_widget_add_accelerator()
...
People should use shortcut controllers instead (global, capture).
A side effect of this is that GtkAccelLabel now lost its method to
magically look up accelerators to display. Somebody needs to add that
back later.
2020-03-18 23:00:51 -04:00
Benjamin Otte
b685d2c00a
doc tools: Create AccelLabel image without using GtkAccelGroup
2020-03-18 23:00:51 -04:00
Emmanuele Bassi
1a55f59f23
testgtk: Port keyval example to shortcut controllers
2020-03-18 23:00:51 -04:00
Benjamin Otte
29ced09dc4
shortcutcontroller: Implement GtkBuildable
...
Use it to allow adding shortcuts to the controller via the usual <child>
method.
2020-03-18 23:00:51 -04:00
Benjamin Otte
458fcba457
shortcutaction: INtegrate with GtkBuilder property parsing
...
<property name="action">action(win.quit)</property> style action
specifications now work for GtkShortcutAction properties.
2020-03-18 23:00:51 -04:00
Benjamin Otte
5218dd6a34
shortcuttrigger: Add gtk_shortcut_triger_new_parse_string()
...
And hook it up into the GtkBuilder infrastructure.
2020-03-18 23:00:51 -04:00
Benjamin Otte
df792a088d
application: Replace accelerator handling with shortcuts
...
API remains the same, but activation is now done via a
shortcutcontroller.
The code uses a controller with global scope so that the
shortcuts are managed with all the other global shortcuts.
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
673a0463e0
shortcuttrigger: Add hash(), equal(), and compare() functions
...
Those are useful for putting triggers in hash tables or getting sorted
output.
2020-03-18 23:00:51 -04:00
Benjamin Otte
0c81698911
shortcuts: Mananage managed shortcuts with a custom model
...
Reduce the amount of special casing by using a list model
for global and managed shortcuts, too.
This way, the ListModel API will work for the ShortcutController in the
GtkShortcutManager and GtkRoot.
The only special case remaining is shortcut activation, which needs to
pass the right widget to the controller in the global/managed case.
2020-03-18 23:00:51 -04:00
Benjamin Otte
a10a295515
shortcutaction: Add gtk_shortcut_action_to_string()
...
For all but the callback action, we can print something useful.
2020-03-18 23:00:51 -04:00
Benjamin Otte
3b595f5720
widget: Keep keybindings as a GListStore
...
This way, we can use shortcut_controller_new_for_model() and avoid all
the special casing about run_class.
2020-03-18 23:00:51 -04:00
Benjamin Otte
d14807b93d
shortcutcontroller: Add gtk_shortcut_controller_new_for_model()
...
This is mainly for internal use, but I can't see a reason to not have it
public for people who want to maintain their own lists.
I'm sure gnome-builder will never ever find a way to misuse it.
2020-03-18 23:00:51 -04:00
Benjamin Otte
538a1a0461
shortcutcontroller: Implement GListModel
...
After all, this controller is a list of shortcuts.
2020-03-18 23:00:51 -04:00
Benjamin Otte
067bd7019c
gtk-demo: Port the sliding puzzle demo to shortcuts
2020-03-18 23:00:51 -04:00
Benjamin Otte
4a4bfa0766
shortcut: Change the API for creating shortcuts
...
When creating shortcuts, there almost always are a trigger and an action
available for use. So make gtk_shortcut_new() take those as arguments.
Also add gtk_shortcut_new_with_arguments() so people can easily pass
those in, too.
2020-03-18 23:00:51 -04:00
Benjamin Otte
e6d0560a82
shortcut: Add GtkShortcutAction
...
Similar to GtkShortcutTrigger, GtkShortCutAction provides all the
different ways to activate a shortcut.
So far, these different ways are supported:
- do nothing
- Call a user-provided callback
- Call gtk_widget_activate()
- Call gtk_widget_mnemonic_activate()
- Emit an action signal
- Activate an action from the widget's action muxer
- Activate a GAction
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
ba3882de83
gtk: Remove accel paths
...
It's an outdated technology now that everybody is using GActionGroups.
If somebody wanted to support changeable shortcuts, they'd need to
reintroduce it in another way.
2020-03-18 23:00:51 -04:00
Benjamin Otte
20cfa2e280
Remove GtkMnemonicHash
...
It's not used anymore.
2020-03-18 23:00:51 -04:00
Emmanuele Bassi
a977094e18
window: Remove all old mnemonic handling API
2020-03-18 23:00:51 -04:00