comparison src/browser.c @ 4885:1bf59e3ac4ff

[gaim-migrate @ 5215] this makes the browser command work with or without the %s. Enjoy! committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Tue, 25 Mar 2003 01:29:37 +0000
parents 3fef2d45dce0
children 1cf4eb75e3ee
comparison
equal deleted inserted replaced
4884:5496d1704ee0 4885:1bf59e3ac4ff
568 return; 568 return;
569 } 569 }
570 570
571 space_free_url = g_strdup(url); 571 space_free_url = g_strdup(url);
572 g_strdelimit(space_free_url, " ", '+'); 572 g_strdelimit(space_free_url, " ", '+');
573 command = g_strdup_printf("%s %s", web_command, space_free_url); 573 if(strstr(web_command, "%s"))
574 g_free(space_free_url); 574 command = g_strdup_printf(web_command, space_free_url);
575 } break; 575 else
576 command = g_strdup_printf("%s %s", web_command, space_free_url);
577 g_free(space_free_url);
578 } break;
576 } 579 }
577 580
578 if (g_spawn_command_line_async(command, &error) == FALSE) { 581 if (g_spawn_command_line_async(command, &error) == FALSE) {
579 char *tmp = g_strdup_printf(_("There was an error launching your chosen browser: %s"), error->message); 582 char *tmp = g_strdup_printf(_("There was an error launching your chosen browser: %s"), error->message);
580 do_error_dialog(tmp, NULL, GAIM_ERROR); 583 do_error_dialog(tmp, NULL, GAIM_ERROR);