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:
@ -4,7 +4,6 @@ const Clutter = imports.gi.Clutter;
|
||||
const GLib = imports.gi.GLib;
|
||||
const Gio = imports.gi.Gio;
|
||||
const GObject = imports.gi.GObject;
|
||||
const Gtk = imports.gi.Gtk;
|
||||
const Meta = imports.gi.Meta;
|
||||
const Signals = imports.signals;
|
||||
const Shell = imports.gi.Shell;
|
||||
@ -686,10 +685,10 @@ var SearchResults = class {
|
||||
|
||||
navigateFocus(direction) {
|
||||
let rtl = this.actor.get_text_direction() == Clutter.TextDirection.RTL;
|
||||
if (direction == Gtk.DirectionType.TAB_BACKWARD ||
|
||||
direction == (rtl ? Gtk.DirectionType.RIGHT
|
||||
: Gtk.DirectionType.LEFT) ||
|
||||
direction == Gtk.DirectionType.UP) {
|
||||
if (direction == St.DirectionType.TAB_BACKWARD ||
|
||||
direction == (rtl ? St.DirectionType.RIGHT
|
||||
: St.DirectionType.LEFT) ||
|
||||
direction == St.DirectionType.UP) {
|
||||
this.actor.navigate_focus(null, direction, false);
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user