Compare commits
6 Commits
cherry-pic
...
wip/textur
Author | SHA1 | Date | |
---|---|---|---|
![]() |
0507fef4cd | ||
![]() |
68c631223c | ||
![]() |
97b38c1950 | ||
![]() |
b098930e6d | ||
![]() |
45da60516c | ||
![]() |
c4b1ba48f2 |
@@ -39,7 +39,7 @@
|
||||
</description>
|
||||
</key>
|
||||
<key name="favorite-apps" type="as">
|
||||
<default>[ 'epiphany.desktop', 'evolution.desktop', 'rhythmbox.desktop', 'shotwell.desktop', 'org.gnome.Nautilus.desktop', 'org.gnome.Software.desktop' ]</default>
|
||||
<default>[ 'firefox.desktop', 'evolution.desktop', 'rhythmbox.desktop', 'shotwell.desktop', 'org.gnome.Nautilus.desktop', 'org.gnome.Software.desktop' ]</default>
|
||||
<summary>List of desktop file IDs for favorite applications</summary>
|
||||
<description>
|
||||
The applications corresponding to these identifiers
|
||||
|
@@ -824,6 +824,8 @@ StScrollBar {
|
||||
|
||||
.screencast-indicator { color: $warning_color; }
|
||||
|
||||
.remote-access-indicator { color: $warning_color; }
|
||||
|
||||
&.solid {
|
||||
background-color: black;
|
||||
/* transition from transparent to solid */
|
||||
|
@@ -130,6 +130,7 @@
|
||||
<file>ui/status/rfkill.js</file>
|
||||
<file>ui/status/volume.js</file>
|
||||
<file>ui/status/bluetooth.js</file>
|
||||
<file>ui/status/remoteAccess.js</file>
|
||||
<file>ui/status/screencast.js</file>
|
||||
<file>ui/status/system.js</file>
|
||||
<file>ui/status/thunderbolt.js</file>
|
||||
|
@@ -41,6 +41,7 @@ const RENAMED_DESKTOP_IDS = {
|
||||
'gnotravex.desktop': 'gnome-tetravex.desktop',
|
||||
'gnotski.desktop': 'gnome-klotski.desktop',
|
||||
'gtali.desktop': 'tali.desktop',
|
||||
'mozilla-firefox.desktop': 'firefox.desktop',
|
||||
'nautilus.desktop': 'org.gnome.Nautilus.desktop',
|
||||
'polari.desktop': 'org.gnome.Polari.desktop',
|
||||
'totem.desktop': 'org.gnome.Totem.desktop',
|
||||
|
@@ -264,7 +264,7 @@ var Background = new Lang.Class({
|
||||
(lm, aboutToSuspend) => {
|
||||
if (aboutToSuspend)
|
||||
return;
|
||||
this._refreshAnimation();
|
||||
this.emit('changed');
|
||||
});
|
||||
|
||||
this._settingsChangedSignalId = this._settings.connect('changed', () => {
|
||||
|
@@ -207,7 +207,13 @@ function _initializeUI() {
|
||||
return true;
|
||||
});
|
||||
|
||||
global.display.connect('gl-video-memory-purged', loadTheme);
|
||||
global.display.connect('gl-video-memory-purged', () => {
|
||||
let cache = St.TextureCache.get_default();
|
||||
|
||||
cache.clear();
|
||||
|
||||
loadTheme();
|
||||
});
|
||||
|
||||
// Provide the bus object for gnome-session to
|
||||
// initiate logouts.
|
||||
|
@@ -709,6 +709,7 @@ var AggregateMenu = new Lang.Class({
|
||||
this._bluetooth = null;
|
||||
}
|
||||
|
||||
this._remoteAccess = new imports.ui.status.remoteAccess.RemoteAccessApplet();
|
||||
this._power = new imports.ui.status.power.Indicator();
|
||||
this._rfkill = new imports.ui.status.rfkill.Indicator();
|
||||
this._volume = new imports.ui.status.volume.Indicator();
|
||||
@@ -729,6 +730,7 @@ var AggregateMenu = new Lang.Class({
|
||||
if (this._bluetooth) {
|
||||
this._indicators.add_child(this._bluetooth.indicators);
|
||||
}
|
||||
this._indicators.add_child(this._remoteAccess.indicators);
|
||||
this._indicators.add_child(this._rfkill.indicators);
|
||||
this._indicators.add_child(this._volume.indicators);
|
||||
this._indicators.add_child(this._power.indicators);
|
||||
@@ -743,6 +745,7 @@ var AggregateMenu = new Lang.Class({
|
||||
if (this._bluetooth) {
|
||||
this.menu.addMenuItem(this._bluetooth.menu);
|
||||
}
|
||||
this.menu.addMenuItem(this._remoteAccess.menu);
|
||||
this.menu.addMenuItem(this._location.menu);
|
||||
this.menu.addMenuItem(this._rfkill.menu);
|
||||
this.menu.addMenuItem(this._power.menu);
|
||||
|
81
js/ui/status/remoteAccess.js
Normal file
81
js/ui/status/remoteAccess.js
Normal file
@@ -0,0 +1,81 @@
|
||||
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||
|
||||
const Lang = imports.lang;
|
||||
const Meta = imports.gi.Meta;
|
||||
|
||||
const PanelMenu = imports.ui.panelMenu;
|
||||
const PopupMenu = imports.ui.popupMenu;
|
||||
|
||||
var RemoteAccessApplet = new Lang.Class({
|
||||
Name: 'RemoteAccessApplet',
|
||||
Extends: PanelMenu.SystemIndicator,
|
||||
|
||||
_init() {
|
||||
this.parent();
|
||||
|
||||
let backend = Meta.get_backend();
|
||||
let controller = backend.get_remote_access_controller();
|
||||
|
||||
if (!controller)
|
||||
return;
|
||||
|
||||
// We can't possibly know about all types of screen sharing on X11, so
|
||||
// showing these controls on X11 might give a false sense of security.
|
||||
// Thus, only enable these controls when using Wayland, where we are
|
||||
// in control of sharing.
|
||||
if (!Meta.is_wayland_compositor())
|
||||
return;
|
||||
|
||||
this._handles = new Set();
|
||||
this._indicator = null;
|
||||
this._menuSection = null;
|
||||
|
||||
controller.connect('new-handle', (controller, handle) => {
|
||||
this._onNewHandle(handle);
|
||||
});
|
||||
},
|
||||
|
||||
_ensureControls() {
|
||||
if (this._indicator)
|
||||
return;
|
||||
|
||||
this._indicator = this._addIndicator();
|
||||
this._indicator.icon_name = 'screen-shared-symbolic';
|
||||
this._indicator.add_style_class_name('remote-access-indicator');
|
||||
this._item =
|
||||
new PopupMenu.PopupSubMenuMenuItem(_("Screen is Being Shared"),
|
||||
true);
|
||||
this._item.menu.addAction(_("Turn off"),
|
||||
() => {
|
||||
for (let handle of this._handles)
|
||||
handle.stop();
|
||||
});
|
||||
this._item.icon.icon_name = 'screen-shared-symbolic';
|
||||
this.menu.addMenuItem(this._item);
|
||||
},
|
||||
|
||||
_sync() {
|
||||
if (this._handles.size == 0) {
|
||||
this._indicator.visible = false;
|
||||
this._item.actor.visible = false;
|
||||
} else {
|
||||
this._indicator.visible = true;
|
||||
this._item.actor.visible = true;
|
||||
}
|
||||
},
|
||||
|
||||
_onStopped(handle) {
|
||||
this._handles.delete(handle);
|
||||
this._sync();
|
||||
},
|
||||
|
||||
_onNewHandle(handle) {
|
||||
this._handles.add(handle);
|
||||
handle.connect('stopped', this._onStopped.bind(this));
|
||||
|
||||
if (this._handles.size == 1) {
|
||||
this._ensureControls();
|
||||
this._sync();
|
||||
}
|
||||
},
|
||||
});
|
@@ -399,9 +399,6 @@ get_gl_vendor (void)
|
||||
gboolean
|
||||
shell_util_need_background_refresh (void)
|
||||
{
|
||||
if (!clutter_check_windowing_backend (CLUTTER_WINDOWING_X11))
|
||||
return FALSE;
|
||||
|
||||
if (g_strcmp0 (get_gl_vendor (), "NVIDIA Corporation") == 0)
|
||||
return TRUE;
|
||||
|
||||
|
@@ -105,6 +105,18 @@ st_texture_cache_class_init (StTextureCacheClass *klass)
|
||||
G_TYPE_NONE, 1, G_TYPE_FILE);
|
||||
}
|
||||
|
||||
/* Evicts all cached textures */
|
||||
void
|
||||
st_texture_cache_clear (StTextureCache *cache)
|
||||
{
|
||||
GHashTableIter iter;
|
||||
gpointer key;
|
||||
gpointer value;
|
||||
|
||||
g_hash_table_remove_all (cache->priv->keyed_cache);
|
||||
g_signal_emit (cache, signals[ICON_THEME_CHANGED], 0);
|
||||
}
|
||||
|
||||
/* Evicts all cached textures for named icons */
|
||||
static void
|
||||
st_texture_cache_evict_icons (StTextureCache *cache)
|
||||
|
@@ -52,6 +52,7 @@ typedef enum {
|
||||
} StTextureCachePolicy;
|
||||
|
||||
StTextureCache* st_texture_cache_get_default (void);
|
||||
void st_texture_cache_clear (StTextureCache *cache);
|
||||
|
||||
ClutterActor *
|
||||
st_texture_cache_load_sliced_image (StTextureCache *cache,
|
||||
|
Reference in New Issue
Block a user