sessionMode: Add allowExtensions property
Add a sessionMode.allowExtensions property, which determines whether installed and enabled extensions should be loaded or ignored. https://bugzilla.gnome.org/show_bug.cgi?id=676156
This commit is contained in:
parent
a3fcb8c284
commit
ab3173487d
@ -136,9 +136,6 @@ function _initUserSession() {
|
||||
|
||||
global.screen.override_workspace_layout(Meta.ScreenCorner.TOPLEFT, false, -1, 1);
|
||||
|
||||
ExtensionSystem.init();
|
||||
ExtensionSystem.loadExtensions();
|
||||
|
||||
Meta.keybindings_set_custom_handler('panel-run-dialog', function() {
|
||||
getRunDialog().open();
|
||||
});
|
||||
@ -229,6 +226,11 @@ function start() {
|
||||
if (sessionMode.sessionType == Shell.SessionType.USER)
|
||||
_initUserSession();
|
||||
|
||||
if (sessionMode.allowExtensions) {
|
||||
ExtensionSystem.init();
|
||||
ExtensionSystem.loadExtensions();
|
||||
}
|
||||
|
||||
if (sessionMode.hasOverview) {
|
||||
Meta.keybindings_set_custom_handler('panel-main-menu', function () {
|
||||
overview.toggle();
|
||||
|
@ -12,12 +12,14 @@ const _modes = {
|
||||
hasAppMenu: false,
|
||||
showCalendarEvents: false,
|
||||
allowSettings: false,
|
||||
allowExtensions: false,
|
||||
sessionType: Shell.SessionType.GDM },
|
||||
|
||||
'user': { hasOverview: true,
|
||||
hasAppMenu: true,
|
||||
showCalendarEvents: true,
|
||||
allowSettings: true,
|
||||
allowExtensions: true,
|
||||
sessionType: Shell.SessionType.USER }
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user