[gnome-shell] Revert "main: Make sure that --mode parameter is valid"
- From: Florian MÃllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] Revert "main: Make sure that --mode parameter is valid"
- Date: Thu, 24 May 2012 17:34:19 +0000 (UTC)
commit a277569d311af9fc6d8d892037b827fb94fbe611
Author: Florian MÃllner <fmuellner gnome org>
Date: Thu May 24 19:33:25 2012 +0200
Revert "main: Make sure that --mode parameter is valid"
This reverts commit a7a46bbe1cac8d3512679637cd75e53e9e98c121.
Conflicts:
js/ui/sessionMode.js
js/ui/sessionMode.js | 5 -----
src/main.c | 6 ------
src/shell-global-private.h | 1 -
src/shell-global.c | 15 ---------------
4 files changed, 0 insertions(+), 27 deletions(-)
---
diff --git a/js/ui/sessionMode.js b/js/ui/sessionMode.js
index ab9c61b..a987828 100644
--- a/js/ui/sessionMode.js
+++ b/js/ui/sessionMode.js
@@ -75,11 +75,6 @@ const _modes = {
}
};
-function modeExists(mode) {
- let modes = Object.getOwnPropertyNames(_modes);
- return modes.indexOf(mode) != -1;
-}
-
function listModes() {
let modes = Object.getOwnPropertyNames(_modes);
for (let i = 0; i < modes.length; i++)
diff --git a/src/main.c b/src/main.c
index 1f20039..9852890 100644
--- a/src/main.c
+++ b/src/main.c
@@ -393,12 +393,6 @@ main (int argc, char **argv)
_shell_global_init ("session-mode", session_mode, NULL);
- if (!_shell_global_has_valid_session_mode (shell_global_get ()))
- {
- g_printerr ("\"%s\" is not a valid mode.\n", session_mode);
- exit(1);
- }
-
ecode = meta_run ();
if (g_getenv ("GNOME_SHELL_ENABLE_CLEANUP"))
diff --git a/src/shell-global-private.h b/src/shell-global-private.h
index 194312d..786719f 100644
--- a/src/shell-global-private.h
+++ b/src/shell-global-private.h
@@ -13,7 +13,6 @@ void _shell_global_set_plugin (ShellGlobal *global,
GjsContext *_shell_global_get_gjs_context (ShellGlobal *global);
-gboolean _shell_global_has_valid_session_mode (ShellGlobal *global);
gboolean _shell_global_check_xdnd_event (ShellGlobal *global,
XEvent *xev);
diff --git a/src/shell-global.c b/src/shell-global.c
index ab3b59e..10fb0b3 100644
--- a/src/shell-global.c
+++ b/src/shell-global.c
@@ -585,21 +585,6 @@ shell_global_set_stage_input_mode (ShellGlobal *global,
}
}
-gboolean
-_shell_global_has_valid_session_mode (ShellGlobal *global)
-{
- char *script;
- int status;
-
- script = g_strdup_printf ("imports.ui.environment.init();"
- "imports.ui.sessionMode.modeExists('%s') || 1;",
- global->session_mode);
- gjs_context_eval (global->js_context, script, -1, "<sessionMode.js>", &status, NULL);
- g_free (script);
-
- return status == 0;
-}
-
/**
* shell_global_set_cursor:
* @global: A #ShellGlobal
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]