Mercurial > pidgin.yaz
comparison src/browser.c @ 5436:ad445074d239
[gaim-migrate @ 5818]
Another big commit. Ugh. I need a very smart regexp.
Core/UI split do_error_dialog(), and soon the mail dialogs! Yay! This
should work without problems at all, but standard disclaimer..
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Sun, 18 May 2003 19:59:02 +0000 |
parents | a2f26666de42 |
children | d1524728d491 |
comparison
equal
deleted
inserted
replaced
5435:a2f26666de42 | 5436:ad445074d239 |
---|---|
47 | 47 |
48 | 48 |
49 #include <gtk/gtk.h> | 49 #include <gtk/gtk.h> |
50 #include <gdk/gdkprivate.h> | 50 #include <gdk/gdkprivate.h> |
51 #include "gaim.h" | 51 #include "gaim.h" |
52 #include "notify.h" | |
52 | 53 |
53 #ifndef _WIN32 | 54 #ifndef _WIN32 |
54 | 55 |
55 | 56 |
56 | 57 |
422 int actual_format; | 423 int actual_format; |
423 unsigned long nitems, bytes_after; | 424 unsigned long nitems, bytes_after; |
424 unsigned char *data = 0; | 425 unsigned char *data = 0; |
425 | 426 |
426 if (window == NULL || GDK_WINDOW_OBJECT(window)->destroyed) { | 427 if (window == NULL || GDK_WINDOW_OBJECT(window)->destroyed) { |
427 do_error_dialog(_("Communication with the browser failed. Please close all " | 428 gaim_notify_error(NULL, NULL, |
428 "windows and try again."), NULL, GAIM_ERROR); | 429 _("Communication with the browser failed. " |
430 "Please close all windows and try again."), NULL); | |
429 gaim_debug(GAIM_DEBUG_WARNING, "browser", | 431 gaim_debug(GAIM_DEBUG_WARNING, "browser", |
430 "netscape_response_cb called with NULL window.\n"); | 432 "netscape_response_cb called with NULL window.\n"); |
431 return GDK_FILTER_CONTINUE; | 433 return GDK_FILTER_CONTINUE; |
432 } | 434 } |
433 | 435 |
449 &actual_type, &actual_format, | 451 &actual_type, &actual_format, |
450 &nitems, &bytes_after, | 452 &nitems, &bytes_after, |
451 &data) != Success | 453 &data) != Success |
452 || data == NULL || (data[0] != '1' && data[0] != '2')) { | 454 || data == NULL || (data[0] != '1' && data[0] != '2')) { |
453 | 455 |
454 do_error_dialog(_("Communication with the browser failed. Please close all " | 456 gaim_notify_error(NULL, NULL, |
455 "windows and try again."), NULL, GAIM_ERROR); | 457 _("Communication with the browser failed. " |
458 "Please close all windows and try again."), NULL); | |
456 } | 459 } |
457 | 460 |
458 if (data[0] == '1') { | 461 if (data[0] == '1') { |
459 /* Netscape isn't ready yet */ | 462 /* Netscape isn't ready yet */ |
460 gaim_debug(GAIM_DEBUG_ERROR, "browser", | 463 gaim_debug(GAIM_DEBUG_ERROR, "browser", |
582 | 585 |
583 case BROWSER_MANUAL: { | 586 case BROWSER_MANUAL: { |
584 char *space_free_url = NULL; | 587 char *space_free_url = NULL; |
585 | 588 |
586 if (!web_command[0]) { | 589 if (!web_command[0]) { |
587 do_error_dialog(_("Unable to launch your browser because the 'Manual' browser command has been chosen, but no command has been set."), NULL, GAIM_ERROR); | 590 gaim_notify_error(NULL, NULL, |
591 _("Unable to launch your browser because " | |
592 "the 'Manual' browser command has been " | |
593 "chosen, but no command has been set."), | |
594 NULL); | |
588 return; | 595 return; |
589 } | 596 } |
590 | 597 |
591 space_free_url = g_strdup(url); | 598 space_free_url = g_strdup(url); |
592 g_strdelimit(space_free_url, " ", '+'); | 599 g_strdelimit(space_free_url, " ", '+'); |
598 } break; | 605 } break; |
599 } | 606 } |
600 | 607 |
601 if (g_spawn_command_line_async(command, &error) == FALSE) { | 608 if (g_spawn_command_line_async(command, &error) == FALSE) { |
602 char *tmp = g_strdup_printf(_("There was an error launching your chosen browser: %s"), error->message); | 609 char *tmp = g_strdup_printf(_("There was an error launching your chosen browser: %s"), error->message); |
603 do_error_dialog(tmp, NULL, GAIM_ERROR); | 610 gaim_notify_error(NULL, NULL, tmp, NULL); |
604 g_free(tmp); | 611 g_free(tmp); |
605 g_error_free(error); | 612 g_error_free(error); |
606 } | 613 } |
607 | 614 |
608 g_free(command); | 615 g_free(command); |