Mercurial > pidgin
comparison src/aim.c @ 3474:cfbdfe334975
[gaim-migrate @ 3525]
Rob McQueen removed aol_icon() and made Gaim use the pretty png as our
default icon. Thanks.
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Fri, 30 Aug 2002 03:14:05 +0000 |
parents | d33ec392a5e1 |
children | 36fd2bddddf6 |
comparison
equal
deleted
inserted
replaced
3473:0073a014e55b | 3474:cfbdfe334975 |
---|---|
224 GdkBitmap *mask; | 224 GdkBitmap *mask; |
225 | 225 |
226 GList *tmp; | 226 GList *tmp; |
227 | 227 |
228 if (mainwindow) { | 228 if (mainwindow) { |
229 gtk_widget_show(mainwindow); | 229 gtk_window_present(GTK_WINDOW(mainwindow)); |
230 return; | 230 return; |
231 } | 231 } |
232 | 232 |
233 mainwindow = gtk_window_new(GTK_WINDOW_TOPLEVEL); | 233 mainwindow = gtk_window_new(GTK_WINDOW_TOPLEVEL); |
234 gtk_window_set_wmclass(GTK_WINDOW(mainwindow), "login", "Gaim"); | 234 gtk_window_set_wmclass(GTK_WINDOW(mainwindow), "login", "Gaim"); |
235 gtk_window_set_policy(GTK_WINDOW(mainwindow), FALSE, FALSE, TRUE); | 235 gtk_window_set_policy(GTK_WINDOW(mainwindow), FALSE, FALSE, TRUE); |
236 gtk_signal_connect(GTK_OBJECT(mainwindow), "delete_event", | 236 gtk_signal_connect(GTK_OBJECT(mainwindow), "delete_event", |
237 GTK_SIGNAL_FUNC(cancel_logon), mainwindow); | 237 GTK_SIGNAL_FUNC(cancel_logon), mainwindow); |
238 gtk_window_set_title(GTK_WINDOW(mainwindow), _("Gaim - Login")); | 238 gtk_window_set_title(GTK_WINDOW(mainwindow), _("Gaim - Login")); |
239 gtk_widget_realize(mainwindow); | 239 gtk_widget_realize(mainwindow); |
240 aol_icon(mainwindow->window); | |
241 gdk_window_set_group(mainwindow->window, mainwindow->window); | 240 gdk_window_set_group(mainwindow->window, mainwindow->window); |
242 | 241 |
243 table = gtk_table_new(8, 2, FALSE); | 242 table = gtk_table_new(8, 2, FALSE); |
244 gtk_container_add(GTK_CONTAINER(mainwindow), table); | 243 gtk_container_add(GTK_CONTAINER(mainwindow), table); |
245 gtk_widget_show(table); | 244 gtk_widget_show(table); |
490 static int ui_main() | 489 static int ui_main() |
491 { | 490 { |
492 GIOChannel *channel; | 491 GIOChannel *channel; |
493 int UI_fd; | 492 int UI_fd; |
494 char name[256]; | 493 char name[256]; |
494 GList *icons = NULL; | |
495 GdkPixbuf *icon = NULL; | |
496 | |
497 /* use the nice PNG icon for all the windows */ | |
498 icon = gdk_pixbuf_new_from_file(DATADIR "/pixmaps/gaim.png",NULL); | |
499 if (icon) { | |
500 icons = g_list_append(icons,icon); | |
501 gtk_window_set_default_icon_list(icons); | |
502 g_object_unref(G_OBJECT(icon)); | |
503 } else { | |
504 debug_printf("Failed to load icon from %s/pixmaps/gaim.png\n",DATADIR); | |
505 } | |
495 | 506 |
496 g_snprintf(name, sizeof(name), "%s/gaim_%s.%d", g_get_tmp_dir(), g_get_user_name(), getpid()); | 507 g_snprintf(name, sizeof(name), "%s/gaim_%s.%d", g_get_tmp_dir(), g_get_user_name(), getpid()); |
497 | 508 |
498 UI_fd = open_socket(name); | 509 UI_fd = open_socket(name); |
499 if (UI_fd < 0) | 510 if (UI_fd < 0) |
710 /* show help message */ | 721 /* show help message */ |
711 if (opt_help) { | 722 if (opt_help) { |
712 show_usage(0, argv[0]); | 723 show_usage(0, argv[0]); |
713 return 0; | 724 return 0; |
714 } | 725 } |
715 /* show version window */ | 726 /* show version message */ |
716 if (opt_version) { | 727 if (opt_version) { |
717 gtk_init(&argc, &argv); | 728 printf("Gaim %s\n",VERSION); |
718 load_prefs(); | |
719 show_about(0, (void *)2); | |
720 gtk_main(); | |
721 return 0; | 729 return 0; |
722 } | 730 } |
723 | 731 |
724 load_prefs(); | 732 load_prefs(); |
725 | 733 |