sessionMode: Inherit from a more restrictive session mode by default

It makes more sense to define session modes in terms of what you're
adding to the bare shell, not in terms of what you're taking away
from the user session.

https://bugzilla.gnome.org/show_bug.cgi?id=683156
This commit is contained in:
Jasper St. Pierre 2012-09-03 22:26:37 -03:00
parent 59e2710137
commit 16e92a7ca3

View File

@ -6,20 +6,31 @@ const Signals = imports.signals;
const Main = imports.ui.main; const Main = imports.ui.main;
const Params = imports.misc.params; const Params = imports.misc.params;
const DEFAULT_MODE = 'user'; const DEFAULT_MODE = 'restrictive';
const _modes = { const _modes = {
'gdm': { 'restrictive': {
hasOverview: false, hasOverview: false,
showCalendarEvents: false, showCalendarEvents: false,
allowSettings: false, allowSettings: false,
allowExtensions: false, allowExtensions: false,
allowKeybindingsWhenModal: true, allowKeybindingsWhenModal: false,
hasRunDialog: false, hasRunDialog: false,
hasWorkspaces: false, hasWorkspaces: false,
hasWindows: false, hasWindows: false,
createUnlockDialog: Main.createGDMLoginDialog, isLocked: false,
createUnlockDialog: null,
components: [], components: [],
panel: {
left: [],
center: [],
right: []
},
},
'gdm': {
allowKeybindingsWhenModal: true,
createUnlockDialog: Main.createGDMLoginDialog,
panel: { panel: {
left: [], left: [],
center: ['dateMenu'], center: ['dateMenu'],
@ -29,16 +40,9 @@ const _modes = {
}, },
'lock-screen': { 'lock-screen': {
hasOverview: false,
showCalendarEvents: false,
allowSettings: false,
allowExtensions: false,
allowKeybindingsWhenModal: false,
hasRunDialog: false,
hasWorkspaces: false,
hasWindows: false,
isLocked: true, isLocked: true,
components: ['networkAgent', 'polkitAgent', 'telepathyClient'], components: ['networkAgent', 'polkitAgent', 'telepathyClient'],
createUnlockDialog: Main.createSessionUnlockDialog,
panel: { panel: {
left: ['userMenu'], left: ['userMenu'],
center: [], center: [],
@ -47,13 +51,6 @@ const _modes = {
}, },
'initial-setup': { 'initial-setup': {
hasOverview: false,
showCalendarEvents: false,
allowSettings: false,
allowExtensions: false,
allowKeybindingsWhenModal: false,
hasRunDialog: false,
hasWorkspaces: false,
components: ['keyring'], components: ['keyring'],
panel: { panel: {
left: [], left: [],
@ -67,12 +64,9 @@ const _modes = {
showCalendarEvents: true, showCalendarEvents: true,
allowSettings: true, allowSettings: true,
allowExtensions: true, allowExtensions: true,
allowKeybindingsWhenModal: false,
hasRunDialog: true, hasRunDialog: true,
hasWorkspaces: true, hasWorkspaces: true,
hasWindows: true, hasWindows: true,
createUnlockDialog: Main.createSessionUnlockDialog,
isLocked: false,
components: ['networkAgent', 'polkitAgent', 'telepathyClient', components: ['networkAgent', 'polkitAgent', 'telepathyClient',
'keyring', 'recorder', 'autorunManager', 'automountManager'], 'keyring', 'recorder', 'autorunManager', 'automountManager'],
panel: { panel: {