aboutsummaryrefslogtreecommitdiffhomepage
path: root/uzbl-core.c
diff options
context:
space:
mode:
authorGravatar Rob <rob.manea@gmail.com>2009-10-30 10:40:50 +0100
committerGravatar Rob <rob.manea@gmail.com>2009-10-30 10:40:50 +0100
commitb5299ae9bcbd1a43c2799676b6580e964192d769 (patch)
tree82cc868e620a1966c4b96a0c4cc6753d6b7571ea /uzbl-core.c
parent6c1ab4ab80943f4610d02db93b61a95c3c1fa69a (diff)
add STRING_ARRAY cl arguments when opening new windows
Diffstat (limited to 'uzbl-core.c')
-rw-r--r--uzbl-core.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/uzbl-core.c b/uzbl-core.c
index e6b427f..7b44c52 100644
--- a/uzbl-core.c
+++ b/uzbl-core.c
@@ -1079,11 +1079,18 @@ new_window_load_uri (const gchar * uri) {
g_string_append_printf (to_execute, "%s --uri '%s'", uzbl.state.executable_path, uri);
int i;
for (i = 0; entries[i].long_name != NULL; i++) {
- if ((entries[i].arg == G_OPTION_ARG_STRING) && (strcmp(entries[i].long_name,"uri")!=0) && (strcmp(entries[i].long_name,"name")!=0)) {
+ if ((entries[i].arg == G_OPTION_ARG_STRING) &&
+ !strcmp(entries[i].long_name,"uri") &&
+ !strcmp(entries[i].long_name,"name")) {
gchar** str = (gchar**)entries[i].arg_data;
- if (*str!=NULL) {
+ if (*str!=NULL)
g_string_append_printf (to_execute, " --%s '%s'", entries[i].long_name, *str);
- }
+ }
+ else if(entries[i].arg == G_OPTION_ARG_STRING_ARRAY) {
+ int j;
+ gchar **str = *((gchar ***)entries[i].arg_data);
+ for(j=0; str[j]; j++)
+ g_string_append_printf(to_execute, " --%s '%s'", entries[i].long_name, str[j]);
}
}
if (uzbl.state.verbose)