st: Add StDirectionType enum
In order to replace GTK+'s GtkDirectionType. It's bit-compatible with it, too. All callers have been updated to use it. This is a purely accessory change in terms of X11 Display usage cleanup, but helps see better what is left. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/317
This commit is contained in:
@ -3,7 +3,6 @@
|
||||
const Clutter = imports.gi.Clutter;
|
||||
const Gio = imports.gi.Gio;
|
||||
const GObject = imports.gi.GObject;
|
||||
const Gtk = imports.gi.Gtk;
|
||||
const Shell = imports.gi.Shell;
|
||||
const Signals = imports.signals;
|
||||
const St = imports.gi.St;
|
||||
@ -163,7 +162,7 @@ var Button = GObject.registerClass({
|
||||
if (symbol == Clutter.KEY_Left || symbol == Clutter.KEY_Right) {
|
||||
let group = global.focus_manager.get_group(this.actor);
|
||||
if (group) {
|
||||
let direction = (symbol == Clutter.KEY_Left) ? Gtk.DirectionType.LEFT : Gtk.DirectionType.RIGHT;
|
||||
let direction = (symbol == Clutter.KEY_Left) ? St.DirectionType.LEFT : St.DirectionType.RIGHT;
|
||||
group.navigate_focus(this.actor, direction, false);
|
||||
return Clutter.EVENT_STOP;
|
||||
}
|
||||
|
Reference in New Issue
Block a user