Default browser changed to firefox and bugfix

parent eef33003
...@@ -42,8 +42,8 @@ int xnav_open_URL( pwr_tURL url) ...@@ -42,8 +42,8 @@ int xnav_open_URL( pwr_tURL url)
{ {
char cmd[200]; char cmd[200];
int sts; int sts;
pwr_sClass_WebBrowserConfig *config_p; pwr_sClass_WebBrowserConfig *config_p = 0;
char browser[40] = "netscape"; char browser[40] = "firefox";
pwr_tObjid config_objid; pwr_tObjid config_objid;
sts = gdh_GetClassList( pwr_cClass_WebBrowserConfig, &config_objid); sts = gdh_GetClassList( pwr_cClass_WebBrowserConfig, &config_objid);
...@@ -53,28 +53,29 @@ int xnav_open_URL( pwr_tURL url) ...@@ -53,28 +53,29 @@ int xnav_open_URL( pwr_tURL url)
if ( ODD(sts)) { if ( ODD(sts)) {
if ( strcmp( config_p->WebBrowser, "") != 0) if ( strcmp( config_p->WebBrowser, "") != 0)
strcpy( browser, config_p->WebBrowser); strcpy( browser, config_p->WebBrowser);
}
if ( strncmp( url, "$pwr_lang/", 10) == 0) { if ( strncmp( url, "$pwr_lang/", 10) == 0) {
// If file in $pwr_lang, check if file exist, else take en_us // If file in $pwr_lang, check if file exist, else take en_us
if ( Lng::current() != lng_eLanguage_en_us) { if ( Lng::current() != lng_eLanguage_en_us) {
pwr_tURL testurl; pwr_tURL testurl;
pwr_tTime t; pwr_tTime t;
replace_symbol( url, testurl, config_p); replace_symbol( url, testurl, config_p);
dcli_translate_filename( testurl, testurl); dcli_translate_filename( testurl, testurl);
sts = dcli_file_time( testurl, &t); sts = dcli_file_time( testurl, &t);
if ( EVEN(sts)) { if ( EVEN(sts)) {
// Try en_us // Try en_us
strcpy( testurl, "$pwr_doc/en_us/"); strcpy( testurl, "$pwr_doc/en_us/");
strcat( testurl, &url[10]); strcat( testurl, &url[10]);
strcpy( url, testurl); strcpy( url, testurl);
}
} }
} }
replace_symbol( url, url, config_p);
} }
replace_symbol( url, url, config_p);
if ( strcmp( browser, "mozilla") == 0 || if ( strcmp( browser, "mozilla") == 0 ||
strcmp( browser, "rt_mozilla") == 0) { strcmp( browser, "rt_mozilla") == 0) {
// Try remote display first // Try remote display first
...@@ -112,6 +113,10 @@ static int replace_symbol( pwr_tURL in, pwr_tURL out, ...@@ -112,6 +113,10 @@ static int replace_symbol( pwr_tURL in, pwr_tURL out,
else else
strncpy( url, in, sizeof(pwr_tURL)); strncpy( url, in, sizeof(pwr_tURL));
if ( !config) {
strcpy( out, url);
return XNAV__SUCCESS;
}
sym_start = 0; sym_start = 0;
t = tmp; t = tmp;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment