diff options
author | portix <none@none> | 2012-11-01 21:50:56 +0100 |
---|---|---|
committer | portix <none@none> | 2012-11-01 21:50:56 +0100 |
commit | 6ae8d205fa646b0b860bd23b7b23762f970b2435 (patch) | |
tree | 3f09f396fd5438913595f606b810da3a8fc3071b /src | |
parent | 3282974ab06c3f20939026311388100526fce051 (diff) | |
download | dwb-6ae8d205fa646b0b860bd23b7b23762f970b2435.zip |
Remove command line option -s
Diffstat (limited to 'src')
-rw-r--r-- | src/application.c | 7 | ||||
-rw-r--r-- | src/scripts.c | 16 | ||||
-rw-r--r-- | src/scripts.h | 1 |
3 files changed, 0 insertions, 24 deletions
diff --git a/src/application.c b/src/application.c index bc705de8..7de9646d 100644 --- a/src/application.c +++ b/src/application.c @@ -39,7 +39,6 @@ static gboolean m_opt_force = false; static gboolean m_opt_enable_scripts = false; static gchar *m_opt_restore = NULL; static gchar **m_opt_exe = NULL; -static gchar **m_scripts = NULL; static GIOChannel *m_fallback_channel; static GOptionEntry options[] = { { "embed", 'e', 0, G_OPTION_ARG_INT64, &dwb.gui.wid, "Embed into window with window id wid", "wid"}, @@ -51,7 +50,6 @@ static GOptionEntry options[] = { { "profile", 'p', 0, G_OPTION_ARG_STRING, &dwb.misc.profile, "Load configuration for 'profile'", "profile" }, { "execute", 'x', 0, G_OPTION_ARG_STRING_ARRAY, &m_opt_exe, "Execute commands", NULL}, { "version", 'v', 0, G_OPTION_ARG_NONE, &m_opt_version, "Show version information and exit", NULL}, - { "scripts", 's', 0, G_OPTION_ARG_FILENAME_ARRAY, &m_scripts, "Execute a script", NULL}, { "enable-scripts", 'S', 0, G_OPTION_ARG_NONE, &m_opt_enable_scripts, "Enable javascript api", NULL}, { NULL } }; @@ -151,11 +149,6 @@ dwb_application_local_command_line(GApplication *app, gchar ***argv, gint *exit_ *exit_status = 1; return true; } - if (m_scripts != NULL) { - scripts_execute_scripts(m_scripts); - g_application_hold(app); - return true; - } char *appid = g_strconcat("org.bitbucket.dwb.", dwb.misc.profile, NULL); g_application_set_application_id(app, appid); g_free(appid); diff --git a/src/scripts.c b/src/scripts.c index a26f9cf3..dd0ae0db 100644 --- a/src/scripts.c +++ b/src/scripts.c @@ -2073,22 +2073,6 @@ scripts_init(gboolean force) { JSValueProtect(m_global_context, m_array_contructor); }/*}}}*/ -void -scripts_execute_scripts(char **scripts) { - g_return_if_fail(scripts != NULL); - m_commandline = true; - - scripts_init(true); - char *content; - for (int i=0; scripts[i] != NULL; i++) { - content = util_get_file_content(scripts[i], NULL); - if (content != NULL) { - scripts_init_script(scripts[i], content); - g_free(content); - } - } - apply_scripts(); -} gboolean scripts_execute_one(const char *script) { if (m_global_context != NULL) diff --git a/src/scripts.h b/src/scripts.h index 218b39ec..0a412069 100644 --- a/src/scripts.h +++ b/src/scripts.h @@ -67,7 +67,6 @@ void scripts_end(void); void scripts_init_script(const char *, const char *); void scripts_init(gboolean); void scripts_unbind(JSObjectRef); -void scripts_execute_scripts(char **scripts); DwbStatus scripts_eval_key(KeyMap *m, Arg *arg); gboolean scripts_execute_one(const char *script); void scripts_completion_activate(void); |