runDialog: Reload resource on 'rt'
Moving the default theme to a resource broke the 'rt' command; reload the resource before the theme to fix it. https://bugzilla.gnome.org/show_bug.cgi?id=738942
This commit is contained in:
parent
da8155cbe5
commit
0b9e68e305
@ -78,6 +78,7 @@ let _startDate;
|
||||
let _defaultCssStylesheet = null;
|
||||
let _cssStylesheet = null;
|
||||
let _a11ySettings = null;
|
||||
let _themeResource = null;
|
||||
|
||||
function _sessionUpdated() {
|
||||
if (sessionMode.isPrimary)
|
||||
@ -137,9 +138,7 @@ function _initializeUI() {
|
||||
Shell.WindowTracker.get_default();
|
||||
Shell.AppUsage.get_default();
|
||||
|
||||
let resource = Gio.Resource.load(global.datadir + '/gnome-shell-theme.gresource');
|
||||
resource._register();
|
||||
|
||||
reloadThemeResource();
|
||||
_loadDefaultStylesheet();
|
||||
|
||||
// Setup the stage hierarchy early
|
||||
@ -290,6 +289,14 @@ function setThemeStylesheet(cssStylesheet) {
|
||||
_cssStylesheet = cssStylesheet ? Gio.File.new_for_path(cssStylesheet) : null;
|
||||
}
|
||||
|
||||
function reloadThemeResource() {
|
||||
if (_themeResource)
|
||||
_themeResource._unregister();
|
||||
|
||||
_themeResource = Gio.Resource.load(global.datadir + '/gnome-shell-theme.gresource');
|
||||
_themeResource._register();
|
||||
}
|
||||
|
||||
/**
|
||||
* loadTheme:
|
||||
*
|
||||
|
@ -61,6 +61,7 @@ const RunDialog = new Lang.Class({
|
||||
|
||||
// rt is short for "reload theme"
|
||||
'rt': Lang.bind(this, function() {
|
||||
Main.reloadThemeResource();
|
||||
Main.loadTheme();
|
||||
})
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user