commit 46f6def1a5ac3a8d407713b4b04f530e3788e767
parent da3ec8f4f3408d50f29d5430883939a3f0ff4cff
Author: Kyle Milz <kmilz@ucalgary.ca>
Date: Sun, 14 Oct 2012 16:38:24 -0600
remove process_set_line function
Diffstat:
2 files changed, 0 insertions(+), 118 deletions(-)
diff --git a/src/commands.c b/src/commands.c
@@ -976,121 +976,6 @@ proxy(const Arg *arg, void *data)
}
Eina_Bool
-process_set_line(char *line) {
-#if 0
- char *c;
- int listlen, i;
- gboolean boolval;
- WebKitWebSettings *settings;
-
- settings = webkit_web_view_get_settings(webview);
- my_pair.line = line;
- c = search_word(0);
- if (!strlen(my_pair.what))
- return FALSE;
-
- while (isspace(*c) && *c)
- c++;
-
- if (*c == ':' || *c == '=')
- c++;
-
- my_pair.line = c;
- c = search_word(1);
-
- listlen = LENGTH(browsersettings);
- for (i = 0; i < listlen; i++) {
- if (strlen(browsersettings[i].name) == strlen(my_pair.what) && strncmp(browsersettings[i].name, my_pair.what, strlen(my_pair.what)) == 0) {
- /* mandatory argument not provided */
- if (strlen(my_pair.value) == 0)
- return FALSE;
- /* process qmark? */
- if (strlen(my_pair.what) == 5 && strncmp("qmark", my_pair.what, 5) == 0) {
- return (process_save_qmark(my_pair.value, webview));
- }
- /* interpret boolean values */
- if (browsersettings[i].boolval) {
- if (strncmp(my_pair.value, "on", 2) == 0 || strncmp(my_pair.value, "true", 4) == 0 || strncmp(my_pair.value, "ON", 2) == 0 || strncmp(my_pair.value, "TRUE", 4) == 0) {
- boolval = TRUE;
- } else if (strncmp(my_pair.value, "off", 3) == 0 || strncmp(my_pair.value, "false", 5) == 0 || strncmp(my_pair.value, "OFF", 3) == 0 || strncmp(my_pair.value, "FALSE", 5) == 0) {
- boolval = FALSE;
- } else {
- return FALSE;
- }
- } else if (browsersettings[i].colourval) {
- /* interpret as hexadecimal colour */
- if (!parse_colour(my_pair.value)) {
- return FALSE;
- }
- }
- if (browsersettings[i].var != NULL) {
- strncpy(browsersettings[i].var, my_pair.value, MAX_SETTING_SIZE);
- if (strlen(my_pair.value) > MAX_SETTING_SIZE - 1) {
- /* in this case, \0 will not have been copied */
- browsersettings[i].var[MAX_SETTING_SIZE - 1] = '\0';
- /* in case this string is also used for a webkit setting, make sure it's consistent */
- my_pair.value[MAX_SETTING_SIZE - 1] = '\0';
- give_feedback("String too long; automatically truncated!");
- }
- }
- if (strlen(browsersettings[i].webkit) > 0) {
- /* activate appropriate webkit setting */
- if (browsersettings[i].boolval) {
- g_object_set((GObject*)settings, browsersettings[i].webkit, boolval, NULL);
- } else if (browsersettings[i].intval) {
- g_object_set((GObject*)settings, browsersettings[i].webkit, atoi(my_pair.value), NULL);
- } else {
- g_object_set((GObject*)settings, browsersettings[i].webkit, my_pair.value, NULL);
- }
- webkit_web_view_set_settings(webview, settings);
- }
-
- if (strlen(my_pair.what) == 14) {
- if (strncmp("acceptlanguage", my_pair.what, 14) == 0) {
- g_object_set(G_OBJECT(session), "accept-language", acceptlanguage, NULL);
- } else if (strncmp("completioncase", my_pair.what, 14) == 0) {
- complete_case_sensitive = boolval;
- }
- } else if (strlen(my_pair.what) == 5 && strncmp("proxy", my_pair.what, 5) == 0) {
- toggle_proxy(boolval);
- } else if (strlen(my_pair.what) == 10 && strncmp("scrollbars", my_pair.what, 10) == 0) {
- toggle_scrollbars(boolval);
- } else if (strlen(my_pair.what) == 9 && strncmp("statusbar", my_pair.what, 9) == 0) {
- gtk_widget_set_visible(GTK_WIDGET(statusbar), boolval);
- } else if (strlen(my_pair.what) == 8 && strncmp("inputbox", my_pair.what, 8) == 0) {
- gtk_widget_set_visible(inputbox, boolval);
- } else if (strlen(my_pair.what) == 11 && strncmp("escapeinput", my_pair.what, 11) == 0) {
- escape_input_on_load = boolval;
- }
-
- /* SSL certificate checking */
- if (strlen(my_pair.what) == 9 && strncmp("strictssl", my_pair.what, 9) == 0) {
- if (boolval) {
- strict_ssl = TRUE;
- g_object_set(G_OBJECT(session), "ssl-strict", TRUE, NULL);
- } else {
- strict_ssl = FALSE;
- g_object_set(G_OBJECT(session), "ssl-strict", FALSE, NULL);
- }
- }
- if (strlen(my_pair.what) == 8 && strncmp("cabundle", my_pair.what, 8) == 0) {
- g_object_set(G_OBJECT(session), SOUP_SESSION_SSL_CA_FILE, ca_bundle, NULL);
- }
- if (strlen(my_pair.what) == 10 && strncmp("windowsize", my_pair.what, 10) == 0) {
- set_default_winsize(my_pair.value);
- }
-
- /* reload page? */
- if (browsersettings[i].reload)
- webkit_web_view_reload(webview);
- return TRUE;
- }
- }
-#endif
- return FALSE;
-}
-
-Eina_Bool
search_tag(const Arg * a, void *data)
{
#if 0
diff --git a/src/commands.h b/src/commands.h
@@ -33,9 +33,6 @@ Eina_Bool toggle_cookies(const Arg *, void *);
Eina_Bool window(const Arg *arg, void *data);
// static Eina_Bool fake_key_event(const Arg *, void *);
-Eina_Bool process_set_line(char *line);
-
-// extern char startpage[MAX_SETTING_SIZE];
/* command mapping */
static Command commands[] = {