tazweb rev 183
Fix opening url in arg (we can have more tthan one --option --now
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Tue Mar 14 04:48:34 2017 +0100 (2017-03-14) |
parents | 311c2e5da64d |
children | 639b611287cb |
files | src/tazweb.c |
line diff
1.1 --- a/src/tazweb.c Tue Mar 14 04:02:11 2017 +0100 1.2 +++ b/src/tazweb.c Tue Mar 14 04:48:34 2017 +0100 1.3 @@ -562,7 +562,7 @@ 1.4 } 1.5 1.6 int 1.7 -main(int argc, char* argv[]) 1.8 +main(int argc, char *argv[]) 1.9 { 1.10 textdomain (GETTEXT_PACKAGE); 1.11 int c; 1.12 @@ -574,13 +574,13 @@ 1.13 /* Set flag */ 1.14 { "notoolbar", no_argument, ¬oolbar, 1 }, 1.15 { "nomenu", no_argument, &nomenu, 1 }, 1.16 + //{ "width", required_argument, &width, 'width' }, 1.17 /* No flag */ 1.18 { "help", no_argument, 0, 'h' }, 1.19 { "private", no_argument, 0, 'p' }, 1.20 { "useragent", required_argument, 0, 'u' }, 1.21 { "kiosk", no_argument, 0, 'k' }, 1.22 { "raw", no_argument, 0, 'r' }, 1.23 - { "width", required_argument, 0, 'w' }, 1.24 { 0, 0, 0, 0} 1.25 }; 1.26 1.27 @@ -626,7 +626,7 @@ 1.28 break; 1.29 1.30 case 'w': 1.31 - width = optarg; 1.32 + //width = optarg; 1.33 break; 1.34 1.35 case '?': 1.36 @@ -637,6 +637,7 @@ 1.37 1.38 argc -= optind; 1.39 argv += optind; 1.40 + 1.41 1.42 /* Initialize GTK */ 1.43 gtk_init(NULL, NULL); 1.44 @@ -648,9 +649,9 @@ 1.45 $HOME/.config/tazweb/bookmarks.txt"); 1.46 } 1.47 1.48 - /* Load the start page file or the url in argument */ 1.49 - uri =(char*)(argc > 1 ? argv[1] : WEBHOME); 1.50 - if (argv[1]) 1.51 + /* Load the start page or the url in argument */ 1.52 + uri =(char*)(argc == 1 ? argv[0] : WEBHOME); 1.53 + if (argv[0]) 1.54 check_requested_uri(); 1.55 1.56 tazweb_window = create_window(&webview);