Mercurial > pidgin.yaz
changeset 1299:18c3874ea051
[gaim-migrate @ 1309]
sounds only once, auto login hides main window
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Tue, 19 Dec 2000 00:43:39 +0000 |
parents | 38f8096975ef |
children | 59f08eb64017 |
files | src/aim.c src/buddy.c src/gaim.h |
diffstat | 3 files changed, 12 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/aim.c Tue Dec 19 00:14:08 2000 +0000 +++ b/src/aim.c Tue Dec 19 00:43:39 2000 +0000 @@ -611,9 +611,6 @@ } } - if (!opt_acct) - auto_login(); - #ifdef USE_APPLET applet_widget_register_callback(APPLET_WIDGET(applet), "prefs", _("Preferences"), show_prefs, NULL); @@ -635,6 +632,9 @@ } else if (do_login_ret == -1) show_login(); + if (!opt_acct) + auto_login(); + gtk_main(); #endif /* USE_APPLET */
--- a/src/buddy.c Tue Dec 19 00:14:08 2000 +0000 +++ b/src/buddy.c Tue Dec 19 00:43:39 2000 +0000 @@ -1573,6 +1573,7 @@ GdkPixmap *pm; GdkBitmap *bm; int pos = buddy_number(gs->name, buddy->name); + b->sound = 0; b->name = g_strdup(buddy->name); b->show = g_strdup(buddy->show); @@ -1689,6 +1690,7 @@ gdk_bitmap_unref(bm); gtk_timeout_remove(b->log_timer); b->log_timer = 0; + b->sound = 0; } return 0; } @@ -1841,7 +1843,9 @@ if (!g_slist_find(bs->connlist, gc)) bs->connlist = g_slist_append(bs->connlist, gc); if (b->present == 1) { - play_sound(BUDDY_ARRIVE); + if (bs->sound != 2) + play_sound(BUDDY_ARRIVE); + bs->sound = 2; pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, NULL, (char **)login_icon_xpm); gtk_widget_hide(bs->pix); @@ -1891,7 +1895,9 @@ if (!bs->connlist) return; /* we won't do signoff updates for buddies that have already signed off */ - play_sound(BUDDY_LEAVE); + if (bs->sound != 1) + play_sound(BUDDY_LEAVE); + bs->sound = 1; bs->connlist = g_slist_remove(bs->connlist, gc); if (bs->log_timer > 0)