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:
Florian Müllner 2012-05-17 02:08:56 +02:00
parent a3fcb8c284
commit ab3173487d
2 changed files with 7 additions and 3 deletions

View File

@ -136,9 +136,6 @@ function _initUserSession() {
global.screen.override_workspace_layout(Meta.ScreenCorner.TOPLEFT, false, -1, 1); global.screen.override_workspace_layout(Meta.ScreenCorner.TOPLEFT, false, -1, 1);
ExtensionSystem.init();
ExtensionSystem.loadExtensions();
Meta.keybindings_set_custom_handler('panel-run-dialog', function() { Meta.keybindings_set_custom_handler('panel-run-dialog', function() {
getRunDialog().open(); getRunDialog().open();
}); });
@ -229,6 +226,11 @@ function start() {
if (sessionMode.sessionType == Shell.SessionType.USER) if (sessionMode.sessionType == Shell.SessionType.USER)
_initUserSession(); _initUserSession();
if (sessionMode.allowExtensions) {
ExtensionSystem.init();
ExtensionSystem.loadExtensions();
}
if (sessionMode.hasOverview) { if (sessionMode.hasOverview) {
Meta.keybindings_set_custom_handler('panel-main-menu', function () { Meta.keybindings_set_custom_handler('panel-main-menu', function () {
overview.toggle(); overview.toggle();

View File

@ -12,12 +12,14 @@ const _modes = {
hasAppMenu: false, hasAppMenu: false,
showCalendarEvents: false, showCalendarEvents: false,
allowSettings: false, allowSettings: false,
allowExtensions: false,
sessionType: Shell.SessionType.GDM }, sessionType: Shell.SessionType.GDM },
'user': { hasOverview: true, 'user': { hasOverview: true,
hasAppMenu: true, hasAppMenu: true,
showCalendarEvents: true, showCalendarEvents: true,
allowSettings: true, allowSettings: true,
allowExtensions: true,
sessionType: Shell.SessionType.USER } sessionType: Shell.SessionType.USER }
}; };