[gnome-shell/wip/carlosg/osk-cldr: 24/35] keyboard: Drop message tray source, and tray focus handling
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/carlosg/osk-cldr: 24/35] keyboard: Drop message tray source, and tray focus handling
- Date: Wed, 6 Dec 2017 17:13:54 +0000 (UTC)
commit ba1880dc66ad68121ea4fc9069b9fce1c020cfa8
Author: Carlos Garnacho <carlosg gnome org>
Date: Sat Aug 5 12:20:29 2017 +0200
keyboard: Drop message tray source, and tray focus handling
These are long unused.
js/ui/keyboard.js | 49 -------------------------------------------------
1 files changed, 0 insertions(+), 49 deletions(-)
---
diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js
index 54b889b..17439b1 100644
--- a/js/ui/keyboard.js
+++ b/js/ui/keyboard.js
@@ -17,7 +17,6 @@ const InputSourceManager = imports.ui.status.keyboard;
const BoxPointer = imports.ui.boxpointer;
const Layout = imports.ui.layout;
const Main = imports.ui.main;
-const MessageTray = imports.ui.messageTray;
var KEYBOARD_REST_TIME = Layout.KEYBOARD_ANIMATION_TIME * 2 * 1000;
@@ -158,7 +157,6 @@ var Keyboard = new Lang.Class({
_init: function () {
this.actor = null;
- this._focusInTray = false;
this._focusInExtendedKeys = false;
this._focusCaretTracker = new FocusCaretTracker.FocusCaretTracker();
@@ -344,8 +342,6 @@ var Keyboard = new Lang.Class({
this._keyboard = null;
this.actor.destroy();
this.actor = null;
-
- this._destroySource();
},
_setupKeyboard: function() {
@@ -372,8 +368,6 @@ var Keyboard = new Lang.Class({
this._keyboardGroupAddedId = this._keyboard.connect('group-added', Lang.bind(this,
this._onGroupAdded));
this._keyboardGroupRemovedId = this._keyboard.connect('group-removed', Lang.bind(this,
this._onGroupRemoved));
this._focusNotifyId = global.stage.connect('notify::key-focus', Lang.bind(this,
this._onKeyFocusChanged));
-
- this._createSource();
},
_onKeyFocusChanged: function () {
@@ -386,12 +380,6 @@ var Keyboard = new Lang.Class({
if (this._focusInExtendedKeys || extendedKeysWereFocused)
return;
- // Ignore focus changes caused by message tray showing/hiding
- let trayWasFocused = this._focusInTray;
- this._focusInTray = (focus && Main.messageTray.actor.contains(focus));
- if (this._focusInTray || trayWasFocused)
- return;
-
let time = global.get_current_time();
if (!(focus instanceof Clutter.Text)) {
this.hide();
@@ -588,20 +576,6 @@ var Keyboard = new Lang.Class({
this._current_page.show();
},
- _createSource: function () {
- if (this._source == null) {
- this._source = new KeyboardSource(this);
- Main.messageTray.add(this._source);
- }
- },
-
- _destroySource: function () {
- if (this._source) {
- this._source.destroy();
- this._source = null;
- }
- },
-
shouldTakeEvent: function(event) {
let actor = event.get_source();
return Main.layoutManager.keyboardBox.contains(actor) ||
@@ -648,7 +622,6 @@ var Keyboard = new Lang.Class({
Main.layoutManager.keyboardIndex = monitor;
this._redraw();
Main.layoutManager.showKeyboard();
- this._destroySource();
},
hide: function () {
@@ -678,7 +651,6 @@ var Keyboard = new Lang.Class({
this._hideSubkeys();
Main.layoutManager.hideKeyboard();
- this._createSource();
},
_hideSubkeys: function() {
@@ -729,27 +701,6 @@ var Keyboard = new Lang.Class({
},
});
-var KeyboardSource = new Lang.Class({
- Name: 'KeyboardSource',
- Extends: MessageTray.Source,
-
- _init: function(keyboard) {
- this._keyboard = keyboard;
- this.parent(_("Keyboard"), 'input-keyboard-symbolic');
- this.keepTrayOnSummaryClick = true;
- },
-
- handleSummaryClick: function(button) {
- this.open();
- return true;
- },
-
- open: function() {
- // Show the OSK below the message tray
- this._keyboard.show(Main.layoutManager.bottomIndex);
- }
-});
-
var LocalAdapter = new Lang.Class({
Name: 'LocalAdapter',
Extends: Caribou.XAdapter,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]