comparison src/rcfile.c @ 884:ff16ed0d2c8a

Improve ways to specify html browser (used for help, see bug 2015099). Two new rc file options were added: - helpers.html_browser.command_name - helpers.html_browser.command_line These are checked first before trying common browser locations. If these do not lead to a valid browser, then geeqie will search for geeqie_html_browser script in the path, then it will try various common browsers.
author zas_
date Sun, 13 Jul 2008 14:50:07 +0000
parents 3dd2cb78d0f9
children ad420f2eb789
comparison
equal deleted inserted replaced
883:391a9e3336db 884:ff16ed0d2c8a
574 574
575 575
576 WRITE_SUBTITLE("Shell command"); 576 WRITE_SUBTITLE("Shell command");
577 WRITE_CHAR(shell.path); 577 WRITE_CHAR(shell.path);
578 WRITE_CHAR(shell.options); 578 WRITE_CHAR(shell.options);
579
580
581 WRITE_SUBTITLE("Helpers");
582 secure_fprintf(ssi, "# Html browser\n");
583 secure_fprintf(ssi, "# command_name is: the binary's name to look for in the path\n");
584 secure_fprintf(ssi, "# If command_name is empty, the program will try various common html browsers\n");
585 secure_fprintf(ssi, "# command_line is:\n");
586 secure_fprintf(ssi, "# \"\" (empty string) = execute binary with html file path as command line\n");
587 secure_fprintf(ssi, "# \"string\" = execute string and use results for command line\n");
588 secure_fprintf(ssi, "# \"!string\" = use text following ! as command line, replacing optional %%s with html file path\n");
589 WRITE_CHAR(helpers.html_browser.command_name);
590 WRITE_CHAR(helpers.html_browser.command_line);
579 591
580 592
581 WRITE_SUBTITLE("External Programs"); 593 WRITE_SUBTITLE("External Programs");
582 secure_fprintf(ssi, "# Maximum of %d programs (external_1 through external_%d)\n", GQ_EDITOR_GENERIC_SLOTS, GQ_EDITOR_GENERIC_SLOTS); 594 secure_fprintf(ssi, "# Maximum of %d programs (external_1 through external_%d)\n", GQ_EDITOR_GENERIC_SLOTS, GQ_EDITOR_GENERIC_SLOTS);
583 secure_fprintf(ssi, "# external_%d through external_%d are used for file ops\n", GQ_EDITOR_GENERIC_SLOTS + 1, GQ_EDITOR_SLOTS); 595 secure_fprintf(ssi, "# external_%d through external_%d are used for file ops\n", GQ_EDITOR_GENERIC_SLOTS + 1, GQ_EDITOR_SLOTS);
937 949
938 /* Shell command */ 950 /* Shell command */
939 READ_CHAR(shell.path); 951 READ_CHAR(shell.path);
940 READ_CHAR(shell.options); 952 READ_CHAR(shell.options);
941 953
954 /* Helpers */
955 READ_CHAR(helpers.html_browser.command_name);
956 READ_CHAR(helpers.html_browser.command_line);
957
942 /* External Programs */ 958 /* External Programs */
943 959
944 if (is_numbered_option(option, "external_", &i)) 960 if (is_numbered_option(option, "external_", &i))
945 { 961 {
946 if (i > 0 && i <= GQ_EDITOR_SLOTS) 962 if (i > 0 && i <= GQ_EDITOR_SLOTS)