comparison src/gtknotify.c @ 8278:b00f3ac97c1f

[gaim-migrate @ 9002] Mooga booga committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Tue, 17 Feb 2004 06:13:00 +0000
parents e6ed38d28636
children 980b3bd976ae
comparison
equal deleted inserted replaced
8277:e6ed38d28636 8278:b00f3ac97c1f
406 uri_command(const char *command, const gboolean sync) 406 uri_command(const char *command, const gboolean sync)
407 { 407 {
408 GError *error = NULL; 408 GError *error = NULL;
409 gint ret = 0; 409 gint ret = 0;
410 410
411 gaim_debug_misc("gtknotify", "Executing %s\n", command);
412
411 if (!gaim_program_is_valid(command)) { 413 if (!gaim_program_is_valid(command)) {
412 gchar *tmp = g_strdup_printf(_("The browser \"%s\" is invalid."), 414 gchar *tmp = g_strdup_printf(_("The browser command \"%s\" is invalid."),
413 command); 415 command);
414 gaim_notify_error(NULL, NULL, _("Unable to open URL"), tmp); 416 gaim_notify_error(NULL, NULL, _("Unable to open URL"), tmp);
417
415 g_free(tmp); 418 g_free(tmp);
416 419
417 } else if (sync) { 420 } else if (sync) {
418 gint status; 421 gint status;
419 422
420 if (!g_spawn_command_line_sync(command, NULL, NULL, &status, &error)) { 423 if (!g_spawn_command_line_sync(command, NULL, NULL, &status, &error)) {
421 char *tmp = g_strdup_printf( 424 char *tmp = g_strdup_printf(_("Error launching \"%s\": %s"),
422 _("Error launching \"command\": %s"), 425 command, error->message);
423 error->message);
424 426
425 gaim_notify_error(NULL, NULL, _("Unable to open URL"), tmp); 427 gaim_notify_error(NULL, NULL, _("Unable to open URL"), tmp);
426 428
427 g_free(tmp); 429 g_free(tmp);
428 g_error_free(error); 430 g_error_free(error);
430 ret = status; 432 ret = status;
431 } 433 }
432 434
433 } else { 435 } else {
434 if (!g_spawn_command_line_async(command, &error)) { 436 if (!g_spawn_command_line_async(command, &error)) {
435 char *tmp = g_strdup_printf( 437 char *tmp = g_strdup_printf(_("Error launching \"%s\": %s"),
436 _("Error launching \"command\": %s"), 438 command, error->message);
437 error->message);
438 439
439 gaim_notify_error(NULL, NULL, _("Unable to open URL"), tmp); 440 gaim_notify_error(NULL, NULL, _("Unable to open URL"), tmp);
440 441
441 g_free(tmp); 442 g_free(tmp);
442 g_error_free(error); 443 g_error_free(error);