Mercurial > pidgin
diff src/buddy.c @ 644:b3900e312d8e
[gaim-migrate @ 654]
hopefully this will reduce pixmap leaks. we'll see though
committer: Tailor Script <tailor@pidgin.im>
| author | Eric Warmenhoven <eric@warmenhoven.org> |
|---|---|
| date | Tue, 08 Aug 2000 22:50:18 +0000 |
| parents | e33dfed611c9 |
| children | b3b5d9d18eea |
line wrap: on
line diff
--- a/src/buddy.c Tue Aug 08 22:47:47 2000 +0000 +++ b/src/buddy.c Tue Aug 08 22:50:18 2000 +0000 @@ -256,6 +256,7 @@ NULL, xpm); pic = gtk_pixmap_new(pm, bm); gtk_widget_show(pic); + gdk_pixmap_unref(pm); label = GTK_BIN(button)->child; gtk_container_remove(GTK_CONTAINER(button), label); gtk_container_add(GTK_CONTAINER(button), pic); @@ -922,6 +923,7 @@ b->caps = 0; gtk_widget_show(b->pix); + gdk_pixmap_unref(pm); b->label = gtk_label_new(buddy); gtk_misc_set_alignment(GTK_MISC(b->label), 0.0, 0.5); @@ -1586,12 +1588,14 @@ gtk_pixmap_set(GTK_PIXMAP(b->pix), pm, bm); if (display_options & OPT_DISP_SHOW_PIXMAPS) gtk_widget_show(b->pix); + gdk_pixmap_unref(pm); pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, NULL, (gchar **)login_icon_xpm); if ( ticker_prefs & OPT_DISP_SHOW_BUDDYTICKER ) BuddyTickerAddUser( b->name, pm, bm ); + gdk_pixmap_unref(pm); if (display_options & OPT_DISP_SHOW_LOGON) { struct conversation *c = find_conversation(b->name); @@ -1643,61 +1647,73 @@ pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, NULL, (gchar **)away_icon_xpm); gtk_pixmap_set(GTK_PIXMAP(b->pix), pm, bm); + gdk_pixmap_unref(pm); if ( ticker_prefs & OPT_DISP_SHOW_BUDDYTICKER ) { pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, NULL, (gchar **)away_icon_xpm); BuddyTickerSetPixmap(b->name, pm, bm); + gdk_pixmap_unref(pm); } } else if (b->uc & UC_AOL) { pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, NULL, (gchar **)aol_icon_xpm); gtk_pixmap_set(GTK_PIXMAP(b->pix), pm, bm); + gdk_pixmap_unref(pm); if ( ticker_prefs & OPT_DISP_SHOW_BUDDYTICKER ) { pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, NULL, (gchar **)aol_icon_xpm); BuddyTickerSetPixmap(b->name, pm, bm); + gdk_pixmap_unref(pm); } } else if (b->uc & UC_NORMAL) { pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, NULL, (gchar **)free_icon_xpm); gtk_pixmap_set(GTK_PIXMAP(b->pix), pm, bm); + gdk_pixmap_unref(pm); if ( ticker_prefs & OPT_DISP_SHOW_BUDDYTICKER ) { pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, NULL, (gchar **)free_icon_xpm); BuddyTickerSetPixmap(b->name, pm, bm); + gdk_pixmap_unref(pm); } } else if (b->uc & UC_ADMIN) { pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, NULL, (gchar **)admin_icon_xpm); gtk_pixmap_set(GTK_PIXMAP(b->pix), pm, bm); + gdk_pixmap_unref(pm); if ( ticker_prefs & OPT_DISP_SHOW_BUDDYTICKER ) { pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, NULL, (gchar **)admin_icon_xpm); BuddyTickerSetPixmap(b->name, pm, bm); + gdk_pixmap_unref(pm); } } else if (b->uc & UC_UNCONFIRMED) { pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, NULL, (gchar **)dt_icon_xpm); gtk_pixmap_set(GTK_PIXMAP(b->pix), pm, bm); + gdk_pixmap_unref(pm); if ( ticker_prefs & OPT_DISP_SHOW_BUDDYTICKER ) { pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, NULL, (gchar **)dt_icon_xpm); BuddyTickerSetPixmap(b->name, pm, bm); + gdk_pixmap_unref(pm); } } else { pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, NULL, (gchar **)no_icon_xpm); gtk_pixmap_set(GTK_PIXMAP(b->pix), pm, bm); + gdk_pixmap_unref(pm); if ( ticker_prefs & OPT_DISP_SHOW_BUDDYTICKER ) { pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, NULL, (gchar **)no_icon_xpm); BuddyTickerSetPixmap(b->name, pm, bm); + gdk_pixmap_unref(pm); } } if (display_options & OPT_DISP_SHOW_PIXMAPS) @@ -1727,12 +1743,14 @@ NULL, (gchar **)logout_icon_xpm); gtk_widget_hide(b->pix); gtk_pixmap_set(GTK_PIXMAP(b->pix), pm, bm); + if (display_options & OPT_DISP_SHOW_PIXMAPS) + gtk_widget_show(b->pix); + gdk_pixmap_unref(pm); pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, NULL, (gchar **)logout_icon_xpm); if ( ticker_prefs & OPT_DISP_SHOW_BUDDYTICKER ) BuddyTickerSetPixmap( b->name, pm, bm ); - if (display_options & OPT_DISP_SHOW_PIXMAPS) - gtk_widget_show(b->pix); + gdk_pixmap_unref(pm); if (display_options & OPT_DISP_SHOW_LOGON) { struct conversation *c = find_conversation(b->name); if (c) {
