guibuilder_pel7x64builder0
6 years ago
19 changed files with 1586 additions and 429 deletions
@ -0,0 +1,111 @@
@@ -0,0 +1,111 @@
|
||||
From 2b643e95ed25fff907d46591dd7acd8ae86cf5e4 Mon Sep 17 00:00:00 2001 |
||||
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org> |
||||
Date: Thu, 21 Jun 2018 18:03:31 +0200 |
||||
Subject: [PATCH] appDisplay: Show full app name on hover |
||||
|
||||
--- |
||||
data/theme/gnome-shell-sass/_common.scss | 8 ++++ |
||||
js/ui/appDisplay.js | 48 ++++++++++++++++++++++++ |
||||
2 files changed, 56 insertions(+) |
||||
|
||||
diff --git a/data/theme/gnome-shell-sass/_common.scss b/data/theme/gnome-shell-sass/_common.scss |
||||
index f1aaea689..5bf01a540 100644 |
||||
--- a/data/theme/gnome-shell-sass/_common.scss |
||||
+++ b/data/theme/gnome-shell-sass/_common.scss |
||||
@@ -1402,6 +1402,14 @@ StScrollBar { |
||||
|
||||
} |
||||
|
||||
+ .app-well-hover-text { |
||||
+ text-align: center; |
||||
+ color: $osd_fg_color; |
||||
+ background-color: $osd_bg_color; |
||||
+ border-radius: 5px; |
||||
+ padding: 3px; |
||||
+ } |
||||
+ |
||||
.app-well-app-running-dot { //running apps indicator |
||||
width: 10px; height: 3px; |
||||
background-color: $selected_bg_color; |
||||
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js |
||||
index 74c772d50..070057c69 100644 |
||||
--- a/js/ui/appDisplay.js |
||||
+++ b/js/ui/appDisplay.js |
||||
@@ -1628,6 +1628,20 @@ var AppIcon = new Lang.Class({ |
||||
this.actor.connect('clicked', this._onClicked.bind(this)); |
||||
this.actor.connect('popup-menu', this._onKeyboardPopupMenu.bind(this)); |
||||
|
||||
+ this._hoverText = null; |
||||
+ this._hoverTimeoutId = 0; |
||||
+ |
||||
+ if (this.icon.label) { |
||||
+ this._hoverText = new St.Label({ style_class: 'app-well-hover-text', |
||||
+ text: this.icon.label.text, |
||||
+ visible: false }); |
||||
+ this._hoverText.clutter_text.line_wrap = true; |
||||
+ Main.layoutManager.addChrome(this._hoverText); |
||||
+ |
||||
+ this.actor.connect('notify::hover', this._syncHoverText.bind(this)); |
||||
+ this.connect('sync-tooltip', this._syncHoverText.bind(this)); |
||||
+ } |
||||
+ |
||||
this._menu = null; |
||||
this._menuManager = new PopupMenu.PopupMenuManager(this); |
||||
|
||||
@@ -1659,12 +1673,39 @@ var AppIcon = new Lang.Class({ |
||||
this.app.disconnect(this._stateChangedId); |
||||
this._stateChangedId = 0; |
||||
this._removeMenuTimeout(); |
||||
+ this._removeHoverTimeout(); |
||||
+ if (this._hoverText) |
||||
+ this._hoverText.destroy(); |
||||
+ this._hoverText = null; |
||||
}, |
||||
|
||||
_createIcon(iconSize) { |
||||
return this.app.create_icon_texture(iconSize); |
||||
}, |
||||
|
||||
+ _syncHoverText() { |
||||
+ if (this.shouldShowTooltip()) { |
||||
+ if (this._hoverTimeoutId) |
||||
+ return; |
||||
+ |
||||
+ this._hoverTimeoutId = Mainloop.timeout_add(300, () => { |
||||
+ this._hoverText.style = `max-width: ${2 * this.icon.iconSize}px;`; |
||||
+ this._hoverText.ensure_style(); |
||||
+ |
||||
+ let [x, y] = this.icon.label.get_transformed_position(); |
||||
+ let offset = (this._hoverText.width - this.icon.label.width) / 2; |
||||
+ this._hoverText.set_position(Math.floor(x - offset), Math.floor(y)); |
||||
+ this._hoverText.show(); |
||||
+ |
||||
+ this._hoverTimeoutId = 0; |
||||
+ return GLib.SOURCE_REMOVE; |
||||
+ }); |
||||
+ } else { |
||||
+ this._removeHoverTimeout(); |
||||
+ this._hoverText.hide(); |
||||
+ } |
||||
+ }, |
||||
+ |
||||
_removeMenuTimeout() { |
||||
if (this._menuTimeoutId > 0) { |
||||
Mainloop.source_remove(this._menuTimeoutId); |
||||
@@ -1672,6 +1713,13 @@ var AppIcon = new Lang.Class({ |
||||
} |
||||
}, |
||||
|
||||
+ _removeHoverTimeout() { |
||||
+ if (this._hoverTimeoutId > 0) { |
||||
+ Mainloop.source_remove(this._hoverTimeoutId); |
||||
+ this._hoverTimeoutId = 0; |
||||
+ } |
||||
+ }, |
||||
+ |
||||
_updateRunningStyle() { |
||||
if (this.app.state != Shell.AppState.STOPPED) |
||||
this._dot.show(); |
||||
-- |
||||
2.17.1 |
||||
|
@ -0,0 +1,55 @@
@@ -0,0 +1,55 @@
|
||||
From 6a796675bd7815087881b799ff5fc79e9ce2b0bf Mon Sep 17 00:00:00 2001 |
||||
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org> |
||||
Date: Mon, 16 Jul 2018 23:36:38 +0000 |
||||
Subject: [PATCH] keyboard: Handle no-window case in FocusTracker |
||||
|
||||
For windows, the cursor location needs to be adjusted by the frame |
||||
offsets. However we cannot assume that there is a window, as the |
||||
shell itself can have the key focus. |
||||
|
||||
https://gitlab.gnome.org/GNOME/gnome-shell/issues/414 |
||||
|
||||
|
||||
(cherry picked from commit 0dee82fb9fa974ebdb4dd77fd85535a6edf207fd) |
||||
--- |
||||
js/ui/keyboard.js | 18 +++++++++++++----- |
||||
1 file changed, 13 insertions(+), 5 deletions(-) |
||||
|
||||
diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js |
||||
index 5fcdf988a7..66653d6027 100644 |
||||
--- a/js/ui/keyboard.js |
||||
+++ b/js/ui/keyboard.js |
||||
@@ -533,17 +533,25 @@ var FocusTracker = new Lang.Class({ |
||||
}, |
||||
|
||||
_setCurrentRect(rect) { |
||||
- let frameRect = this._currentWindow.get_frame_rect(); |
||||
- rect.x -= frameRect.x; |
||||
- rect.y -= frameRect.y; |
||||
+ if (this._currentWindow) { |
||||
+ let frameRect = this._currentWindow.get_frame_rect(); |
||||
+ rect.x -= frameRect.x; |
||||
+ rect.y -= frameRect.y; |
||||
+ } |
||||
|
||||
this._rect = rect; |
||||
this.emit('position-changed'); |
||||
}, |
||||
|
||||
getCurrentRect() { |
||||
- let frameRect = this._currentWindow.get_frame_rect(); |
||||
- let rect = { x: this._rect.x + frameRect.x, y: this._rect.y + frameRect.y, width: this._rect.width, height: this._rect.height }; |
||||
+ let rect = { x: this._rect.x, y: this._rect.y, |
||||
+ width: this._rect.width, height: this._rect.height }; |
||||
+ |
||||
+ if (this._currentWindow) { |
||||
+ let frameRect = this._currentWindow.get_frame_rect(); |
||||
+ rect.x += frameRect.x; |
||||
+ rect.y += frameRect.y; |
||||
+ } |
||||
|
||||
return rect; |
||||
} |
||||
-- |
||||
2.17.1 |
||||
|
@ -0,0 +1,67 @@
@@ -0,0 +1,67 @@
|
||||
From 04a4a100e34e3ce8c34212ebb79e77b92ef8238d Mon Sep 17 00:00:00 2001 |
||||
From: Carlos Garnacho <carlosg@gnome.org> |
||||
Date: Tue, 18 Sep 2018 12:54:29 +0200 |
||||
Subject: [PATCH] keyboard: Listen to IbusPanelService::focus-in/out to track |
||||
focus changes |
||||
|
||||
In X11 there's no input panel state requests, so restore the previous behavior |
||||
that focused entries would always toggle the OSK on there. |
||||
--- |
||||
js/misc/ibusManager.js | 6 ++++++ |
||||
js/ui/keyboard.js | 16 ++++++++++++++++ |
||||
2 files changed, 22 insertions(+) |
||||
|
||||
diff --git a/js/misc/ibusManager.js b/js/misc/ibusManager.js |
||||
index 6452e492f..e6d4b5aec 100644 |
||||
--- a/js/misc/ibusManager.js |
||||
+++ b/js/misc/ibusManager.js |
||||
@@ -119,6 +119,12 @@ var IBusManager = new Lang.Class({ |
||||
let cursorLocation = { x, y, width: w, height: h }; |
||||
this.emit('set-cursor-location', cursorLocation); |
||||
}); |
||||
+ this._panelService.connect('focus-in', (panel, path) => { |
||||
+ // This is ibus' "no focus" input context, so should be ignored |
||||
+ if (!GLib.str_has_suffix(path, '/InputContext_1')) |
||||
+ this.emit ('focus-in'); |
||||
+ }); |
||||
+ this._panelService.connect('focus-out', () => { this.emit('focus-out'); }); |
||||
|
||||
try { |
||||
// IBus versions older than 1.5.10 have a bug which |
||||
diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js |
||||
index be0146344..491495c57 100644 |
||||
--- a/js/ui/keyboard.js |
||||
+++ b/js/ui/keyboard.js |
||||
@@ -519,6 +519,12 @@ var FocusTracker = new Lang.Class({ |
||||
|
||||
this._setCurrentRect(rect); |
||||
}); |
||||
+ this._ibusManager.connect('focus-in', () => { |
||||
+ this.emit('focus-changed', true); |
||||
+ }); |
||||
+ this._ibusManager.connect('focus-out', () => { |
||||
+ this.emit('focus-changed', false); |
||||
+ }); |
||||
}, |
||||
|
||||
get currentWindow() { |
||||
@@ -590,6 +596,16 @@ var Keyboard = new Lang.Class({ |
||||
this._animFocusedWindow = null; |
||||
this._oskFocusWindow = null; |
||||
}); |
||||
+ this._focusTracker.connect('focus-changed', (tracker, focused) => { |
||||
+ // Valid only for X11 |
||||
+ if (Meta.is_wayland_compositor()) |
||||
+ return; |
||||
+ |
||||
+ if (focused) |
||||
+ this.show(Main.layoutManager.focusIndex); |
||||
+ else |
||||
+ this.hide(); |
||||
+ }); |
||||
|
||||
Meta.get_backend().connect('last-device-changed', |
||||
(backend, deviceId) => { |
||||
-- |
||||
2.19.0 |
||||
|
@ -0,0 +1,265 @@
@@ -0,0 +1,265 @@
|
||||
From 5e252bd9d9c64cae3ef153338dfdd7638c4cd9e5 Mon Sep 17 00:00:00 2001 |
||||
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org> |
||||
Date: Thu, 14 Jun 2018 17:11:30 +0200 |
||||
Subject: [PATCH] build: Revert Python3 port |
||||
|
||||
This is mostly a revert of commit be3c3c64c1, with slight adjustments |
||||
due to the build system switch. |
||||
--- |
||||
meson.build | 2 +- |
||||
src/gnome-shell-extension-tool.in | 40 +++++++++++++++--------------- |
||||
src/gnome-shell-perf-tool.in | 41 ++++++++++++++++--------------- |
||||
3 files changed, 42 insertions(+), 41 deletions(-) |
||||
|
||||
diff --git a/meson.build b/meson.build |
||||
index 978ed6506..663a4d06f 100644 |
||||
--- a/meson.build |
||||
+++ b/meson.build |
||||
@@ -137,7 +137,7 @@ if get_option('man') |
||||
endif |
||||
|
||||
mutter_typelibdir = mutter_dep.get_pkgconfig_variable('typelibdir') |
||||
-python = find_program('python3') |
||||
+python = find_program('python2') |
||||
sassc = find_program('sassc') |
||||
|
||||
cc = meson.get_compiler('c') |
||||
diff --git a/src/gnome-shell-extension-tool.in b/src/gnome-shell-extension-tool.in |
||||
index f6c37629c..ab9c951ba 100755 |
||||
--- a/src/gnome-shell-extension-tool.in |
||||
+++ b/src/gnome-shell-extension-tool.in |
||||
@@ -14,7 +14,7 @@ except ImportError: |
||||
try: |
||||
import simplejson as json |
||||
except ImportError: |
||||
- print('The Python simplejson module is required') |
||||
+ print 'The Python simplejson module is required' |
||||
sys.exit(1) |
||||
|
||||
from gi.repository import Gio, GLib |
||||
@@ -88,36 +88,36 @@ function disable() { |
||||
} |
||||
|
||||
def create_extension(): |
||||
- print() |
||||
- print('''Name should be a very short (ideally descriptive) string. |
||||
+ print |
||||
+ print '''Name should be a very short (ideally descriptive) string. |
||||
Examples are: "Click To Focus", "Adblock", "Shell Window Shrinker". |
||||
-''') |
||||
- name = input('Name: ').strip() |
||||
- print() |
||||
- print('''Description is a single-sentence explanation of what your extension does. |
||||
+''' |
||||
+ name = raw_input('Name: ').strip() |
||||
+ print |
||||
+ print '''Description is a single-sentence explanation of what your extension does. |
||||
Examples are: "Make windows visible on click", "Block advertisement popups" |
||||
"Animate windows shrinking on minimize" |
||||
-''') |
||||
- description = input('Description: ').strip() |
||||
+''' |
||||
+ description = raw_input('Description: ').strip() |
||||
underifier = re.compile('[^A-Za-z]') |
||||
sample_uuid = underifier.sub('_', name) |
||||
# TODO use evolution data server |
||||
hostname = socket.gethostname() |
||||
sample_uuid = sample_uuid + '@' + hostname |
||||
|
||||
- print() |
||||
- print('''Uuid is a globally-unique identifier for your extension. |
||||
+ print |
||||
+ print '''Uuid is a globally-unique identifier for your extension. |
||||
This should be in the format of an email address (foo.bar@extensions.example.com), but |
||||
need not be an actual email address, though it's a good idea to base the uuid on your |
||||
email address. For example, if your email address is janedoe@example.com, you might |
||||
-use an extension title clicktofocus@janedoe.example.com.''') |
||||
- uuid = input('Uuid [%s]: ' % (sample_uuid, )).strip() |
||||
+use an extension title clicktofocus@janedoe.example.com.''' |
||||
+ uuid = raw_input('Uuid [%s]: ' % (sample_uuid, )).strip() |
||||
if uuid == '': |
||||
uuid = sample_uuid |
||||
|
||||
extension_path = os.path.join(os.path.expanduser('~/.local'), 'share', 'gnome-shell', 'extensions', uuid) |
||||
if os.path.exists(extension_path): |
||||
- print("Extension path %r already exists" % (extension_path, )) |
||||
+ print "Extension path %r already exists" % (extension_path, ) |
||||
sys.exit(0) |
||||
os.makedirs(extension_path) |
||||
meta = { 'name': name, |
||||
@@ -132,13 +132,13 @@ use an extension title clicktofocus@janedoe.example.com.''') |
||||
f.write(json.write(meta) + '\n') |
||||
f.close() |
||||
|
||||
- for filename, contents in SAMPLE_EXTENSION_FILES.items(): |
||||
+ for filename, contents in SAMPLE_EXTENSION_FILES.iteritems(): |
||||
path = os.path.join(extension_path, filename) |
||||
f = open(path, 'w') |
||||
f.write(contents) |
||||
f.close() |
||||
|
||||
- print("Created extension in %r" % (extension_path, )) |
||||
+ print "Created extension in %r" % (extension_path, ) |
||||
extensionjs_path = os.path.join(extension_path, 'extension.js') |
||||
subprocess.Popen(['xdg-open', extensionjs_path]) |
||||
|
||||
@@ -149,19 +149,19 @@ def enable_extension(uuid): |
||||
extensions = settings.get_strv(ENABLED_EXTENSIONS_KEY) |
||||
|
||||
if uuid in extensions: |
||||
- print("%r is already enabled." % (uuid,), file=sys.stderr) |
||||
+ print >> sys.stderr, "%r is already enabled." % (uuid,) |
||||
sys.exit(1) |
||||
|
||||
extensions.append(uuid) |
||||
settings.set_strv(ENABLED_EXTENSIONS_KEY, extensions) |
||||
- print("%r is now enabled." % (uuid,), file=sys.stderr) |
||||
+ print >> sys.stderr, "%r is now enabled." % (uuid,) |
||||
|
||||
def disable_extension(uuid): |
||||
settings = Gio.Settings(schema='org.gnome.shell') |
||||
extensions = settings.get_strv(ENABLED_EXTENSIONS_KEY) |
||||
|
||||
if uuid not in extensions: |
||||
- print("%r is not enabled or installed." % (uuid,), file=sys.stderr) |
||||
+ print >> sys.stderr, "%r is not enabled or installed." % (uuid,) |
||||
sys.exit(1) |
||||
|
||||
# Use a while loop here to remove *all* mentions instances |
||||
@@ -170,7 +170,7 @@ def disable_extension(uuid): |
||||
extensions.remove(uuid) |
||||
|
||||
settings.set_strv(ENABLED_EXTENSIONS_KEY, extensions) |
||||
- print("%r is now disabled." % (uuid,), file=sys.stderr) |
||||
+ print >> sys.stderr, "%r is now disabled." % (uuid,) |
||||
|
||||
def reload_extension(uuid): |
||||
settings = Gio.Settings(schema='org.gnome.shell') |
||||
diff --git a/src/gnome-shell-perf-tool.in b/src/gnome-shell-perf-tool.in |
||||
index b2a4521a3..55bfdf39f 100755 |
||||
--- a/src/gnome-shell-perf-tool.in |
||||
+++ b/src/gnome-shell-perf-tool.in |
||||
@@ -14,14 +14,15 @@ import subprocess |
||||
import sys |
||||
import tempfile |
||||
import base64 |
||||
-from configparser import RawConfigParser |
||||
+from ConfigParser import RawConfigParser |
||||
import hashlib |
||||
import hmac |
||||
-from http import client |
||||
-from urllib import parse |
||||
+import httplib |
||||
+import urlparse |
||||
+import urllib |
||||
|
||||
def show_version(option, opt_str, value, parser): |
||||
- print("GNOME Shell Performance Test @VERSION@") |
||||
+ print "GNOME Shell Performance Test @VERSION@" |
||||
sys.exit() |
||||
|
||||
def wait_for_dbus_name(wait_name): |
||||
@@ -40,7 +41,7 @@ def wait_for_dbus_name(wait_name): |
||||
None) |
||||
|
||||
def on_timeout(): |
||||
- print("\nFailed to start %s: timed out" % (wait_name,)) |
||||
+ print "\nFailed to start %s: timed out" % (wait_name,) |
||||
sys.exit(1) |
||||
GLib.timeout_add_seconds(7, on_timeout) |
||||
|
||||
@@ -130,15 +131,15 @@ def upload_performance_report(report_text): |
||||
base_url = config.get('upload', 'url') |
||||
system_name = config.get('upload', 'name') |
||||
secret_key = config.get('upload', 'key') |
||||
- except Exception as e: |
||||
- print("Can't read upload configuration from %s: %s" % (config_file, str(e))) |
||||
+ except Exception, e: |
||||
+ print "Can't read upload configuration from %s: %s" % (config_file, str(e)) |
||||
sys.exit(1) |
||||
|
||||
# Determine host, port and upload URL from provided data, we're |
||||
# a bit extra-careful about normalization since the URL is part |
||||
# of the signature. |
||||
|
||||
- split = parse.urlsplit(base_url) |
||||
+ split = urlparse.urlsplit(base_url) |
||||
scheme = split[0].lower() |
||||
netloc = split[1] |
||||
base_path = split[2] |
||||
@@ -150,7 +151,7 @@ def upload_performance_report(report_text): |
||||
host, port = m.group(1), None |
||||
|
||||
if scheme != "http": |
||||
- print("'%s' is not a HTTP URL" % base_url) |
||||
+ print "'%s' is not a HTTP URL" % base_url |
||||
sys.exit(1) |
||||
|
||||
if port is None: |
||||
@@ -165,7 +166,7 @@ def upload_performance_report(report_text): |
||||
normalized_base = "%s://%s:%d%s" % (scheme, host, port, base_path) |
||||
|
||||
upload_url = normalized_base + '/system/%s/upload' % system_name |
||||
- upload_path = parse.urlsplit(upload_url)[2] # path portion |
||||
+ upload_path = urlparse.urlsplit(upload_url)[2] # path portion |
||||
|
||||
# Create signature based on upload URL and the report data |
||||
|
||||
@@ -173,7 +174,7 @@ def upload_performance_report(report_text): |
||||
h = hmac.new(secret_key, digestmod=hashlib.sha1) |
||||
h.update(signature_data) |
||||
h.update(report_text) |
||||
- signature = parse.quote(base64.b64encode(h.digest()), "~") |
||||
+ signature = urllib.quote(base64.b64encode(h.digest()), "~") |
||||
|
||||
headers = { |
||||
'User-Agent': 'gnome-shell-performance-tool/@VERSION@', |
||||
@@ -181,15 +182,15 @@ def upload_performance_report(report_text): |
||||
'X-Shell-Signature': 'HMAC-SHA1 ' + signature |
||||
}; |
||||
|
||||
- connection = client.HTTPConnection(host, port) |
||||
+ connection = httplib.HTTPConnection(host, port) |
||||
connection.request('POST', upload_path, report_text, headers) |
||||
response = connection.getresponse() |
||||
|
||||
if response.status == 200: |
||||
- print("Performance report upload succeeded") |
||||
+ print "Performance report upload succeeded" |
||||
else: |
||||
- print("Performance report upload failed with status %d" % response.status) |
||||
- print(response.read()) |
||||
+ print "Performance report upload failed with status %d" % response.status |
||||
+ print response.read() |
||||
|
||||
def gnome_hwtest_log(*args): |
||||
command = ['gnome-hwtest-log', '-t', 'gnome-shell-perf-tool'] |
||||
@@ -206,7 +207,7 @@ def run_performance_test(): |
||||
|
||||
start_perf_helper() |
||||
|
||||
- for i in range(0, iters): |
||||
+ for i in xrange(0, iters): |
||||
# We create an empty temporary file that the shell will overwrite |
||||
# with the contents. |
||||
handle, output_file = tempfile.mkstemp(".json", "gnome-shell-perf.") |
||||
@@ -305,12 +306,12 @@ def run_performance_test(): |
||||
gnome_hwtest_log('--finished') |
||||
else: |
||||
# Write a human readable summary |
||||
- print('------------------------------------------------------------') |
||||
+ print '------------------------------------------------------------'; |
||||
for metric in sorted(metric_summaries.keys()): |
||||
summary = metric_summaries[metric] |
||||
- print("#", summary['description']) |
||||
- print(metric, ", ".join((str(x) for x in summary['values']))) |
||||
- print('------------------------------------------------------------') |
||||
+ print "#", summary['description'] |
||||
+ print metric, ", ".join((str(x) for x in summary['values'])) |
||||
+ print '------------------------------------------------------------'; |
||||
|
||||
return True |
||||
|
||||
-- |
||||
2.17.1 |
||||
|
Loading…
Reference in new issue