comparison src/gtkpounce.c @ 8235:63c7a16a2c09

[gaim-migrate @ 8958] A bunch of minor changes, much of it from Gary Kramlich (amc_grim/xgrimx): gaim-away_do_menu_leak.diff - plugs a memory leak in the do away menu code gaim-gtkpounce_smart_menu.diff - makes the buddy pounce menu only show currently online accounts so that we can edit them. With the current pounce dialog you can only edit pounces for accounts that are online, this stops users from inadvertently change the account for which a pounce belongs. gaim-remove_pouces_with_account.diff - removes pounces for an account when that account is deleted. It adds a function to pounce.[ch]; gaim_pounces_delete_all_from_account, the doxygen help has been added to punce.h so that it will generate it with the rest of the doxygen api. gaim-yahoo_segfault_on_self_pounce.diff - fixes a segfault which occurred with yahoo if you had a pounce set on yourself to message on signon. What was happening was that the display name was being set after the pounces were being executed. This fixes that. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Thu, 12 Feb 2004 05:26:52 +0000
parents 657b5acaec48
children a8431dd66cc5
comparison
equal deleted inserted replaced
8234:a2662eb5955b 8235:63c7a16a2c09
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 * 24 *
25 */ 25 */
26 #include "gtkinternal.h" 26 #include "gtkinternal.h"
27 27
28 #include "account.h"
28 #include "conversation.h" 29 #include "conversation.h"
29 #include "debug.h" 30 #include "debug.h"
30 #include "notify.h" 31 #include "notify.h"
31 #include "prpl.h" 32 #include "prpl.h"
32 #include "server.h" 33 #include "server.h"
696 697
697 for (bp = gaim_pounces_get_all(); bp != NULL; bp = bp->next) { 698 for (bp = gaim_pounces_get_all(); bp != NULL; bp = bp->next) {
698 pounce = (GaimPounce *)bp->data; 699 pounce = (GaimPounce *)bp->data;
699 buddy = gaim_pounce_get_pouncee(pounce); 700 buddy = gaim_pounce_get_pouncee(pounce);
700 701
702 /* Check if account is online, if not skip it */
703 if(!gaim_account_is_connected(pounce->pouncer))
704 continue;
705
701 /* Build the menu item */ 706 /* Build the menu item */
702 item = gtk_image_menu_item_new_with_label(buddy); 707 item = gtk_image_menu_item_new_with_label(buddy);
703 708
704 /* Create a pixmap for the protocol icon. */ 709 /* Create a pixmap for the protocol icon. */
705 pixbuf = create_prpl_icon(gaim_pounce_get_pouncer(pounce)); 710 pixbuf = create_prpl_icon(gaim_pounce_get_pouncer(pounce));
735 l != NULL; 740 l != NULL;
736 l = l->next) { 741 l = l->next) {
737 742
738 gtk_widget_destroy(GTK_WIDGET(l->data)); 743 gtk_widget_destroy(GTK_WIDGET(l->data));
739 } 744 }
740 745 g_list_free(l);
746
741 /* "New Buddy Pounce" */ 747 /* "New Buddy Pounce" */
742 item = gtk_menu_item_new_with_label(_("New Buddy Pounce")); 748 item = gtk_menu_item_new_with_label(_("New Buddy Pounce"));
743 gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); 749 gtk_menu_shell_append(GTK_MENU_SHELL(menu), item);
744 gtk_widget_show(item); 750 gtk_widget_show(item);
745 g_signal_connect(G_OBJECT(item), "activate", 751 g_signal_connect(G_OBJECT(item), "activate",