Mercurial > pidgin.yaz
changeset 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 | a2662eb5955b |
children | a8431dd66cc5 |
files | COPYRIGHT ChangeLog src/account.c src/account.h src/away.c src/core.c src/gtkaccount.c src/gtkblist.c src/gtkpounce.c src/pounce.c src/pounce.h src/prefs.c src/prefs.h src/protocols/yahoo/yahoo.c |
diffstat | 14 files changed, 81 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/COPYRIGHT Thu Feb 12 03:12:54 2004 +0000 +++ b/COPYRIGHT Thu Feb 12 05:26:52 2004 +0000 @@ -122,4 +122,5 @@ Jason Willis Matt Wilson Ximian +Marco Ziech Jaroen Zwartepoorte
--- a/ChangeLog Thu Feb 12 03:12:54 2004 +0000 +++ b/ChangeLog Thu Feb 12 05:26:52 2004 +0000 @@ -7,7 +7,7 @@ accessibility tools (Marc Mulcahy) * Improved accessibility in conversation windows (Nathan Fredrickson) * Keyboard access to context menus via Shift+F10 (Marc Mulcahy) - * Non-ascii character support in AIM chats (Uli Luckas) + * Non-ascii character support in AIM chats (Uli Luckas and Marco Ziech) * Improved local IP address detection (Tim Ringenbach) * Local IP address information can be changed in Preferences (Tim Ringenbach) @@ -16,6 +16,9 @@ * Tabs now stay green when they are supposed to (Etan Reisner) * Offline accounts in account drop-down lists are now greyed (Etan Reisner) * Gadu-Gadu might actually connect again (Ignacy Gawedzki) + * Buddy pounces for an account are removed when the account is + deleted (Gary Kramlich) + * Various bug and memory leak fixes (Gary Kramlich) * Catalan translation updated (Xan (DXpublica)) * Danish translation updated (Morten Brix Pedersen (mbrix)) * English (British) translation updated (Luke Ross (lukeross))
--- a/src/account.c Thu Feb 12 03:12:54 2004 +0000 +++ b/src/account.c Thu Feb 12 05:26:52 2004 +0000 @@ -26,6 +26,7 @@ #include "account.h" #include "debug.h" #include "notify.h" +#include "pounce.h" #include "prefs.h" #include "prpl.h" #include "request.h" @@ -1443,6 +1444,7 @@ gaim_accounts_remove(account); + /* Remove this account's buddies */ for (gnode = gaim_get_blist()->root; gnode != NULL; gnode = gnode->next) { if (!GAIM_BLIST_NODE_IS_GROUP(gnode)) continue; @@ -1464,8 +1466,10 @@ } } } + gaim_blist_save(); - gaim_blist_save(); + /* Remove this account's pounces */ + gaim_pounce_destroy_all_by_account(account); gaim_account_destroy(account); } @@ -1654,5 +1658,11 @@ void gaim_accounts_uninit(void) { + if (accounts_save_timer != 0) { + g_source_remove(accounts_save_timer); + accounts_save_timer = 0; + gaim_accounts_sync(); + } + gaim_signals_unregister_by_instance(gaim_accounts_get_handle()); }
--- a/src/account.h Thu Feb 12 03:12:54 2004 +0000 +++ b/src/account.h Thu Feb 12 05:26:52 2004 +0000 @@ -571,7 +571,8 @@ * Deletes an account. * * This will remove any buddies from the buddy list that belong to this - * account, and will also destroy @a account. + * account, buddy pounces that belong to this account, and will also + * destroy @a account. * * @param account The account. */
--- a/src/away.c Thu Feb 12 03:12:54 2004 +0000 +++ b/src/away.c Thu Feb 12 05:26:52 2004 +0000 @@ -364,6 +364,7 @@ l = l->next; } + g_list_free(l); remmenu = gtk_menu_new();
--- a/src/core.c Thu Feb 12 03:12:54 2004 +0000 +++ b/src/core.c Thu Feb 12 05:26:52 2004 +0000 @@ -120,13 +120,10 @@ /* Transmission ends */ gaim_connections_disconnect_all(); - /* Record what we have before we blow it away... */ - gaim_prefs_sync(); - gaim_accounts_sync(); - gaim_debug(GAIM_DEBUG_INFO, "main", "Unloading all plugins\n"); gaim_plugins_destroy_all(); + /* Save .xml files, remove signals, etc. */ gaim_ssl_uninit(); gaim_pounces_uninit(); gaim_blist_uninit(); @@ -134,6 +131,7 @@ gaim_connections_uninit(); gaim_buddy_icons_uninit(); gaim_accounts_uninit(); + gaim_prefs_uninit(); gaim_signals_uninit();
--- a/src/gtkaccount.c Thu Feb 12 03:12:54 2004 +0000 +++ b/src/gtkaccount.c Thu Feb 12 05:26:52 2004 +0000 @@ -1160,8 +1160,6 @@ account_win_destroy_cb(NULL, NULL, dialog); - gaim_accounts_sync(); - return ret; }
--- a/src/gtkblist.c Thu Feb 12 03:12:54 2004 +0000 +++ b/src/gtkblist.c Thu Feb 12 05:26:52 2004 +0000 @@ -2524,7 +2524,10 @@ static void signed_on_off_cb(GaimConnection *gc, GaimBuddyList *blist) { + GaimGtkBuddyList *gtkblist = blist->ui_data; + gaim_gtk_blist_update_protocol_actions(); + gaim_gtkpounce_menu_build(gtkblist->bpmenu); } /* this is called on all sorts of signals, and we have no reason to pass
--- a/src/gtkpounce.c Thu Feb 12 03:12:54 2004 +0000 +++ b/src/gtkpounce.c Thu Feb 12 05:26:52 2004 +0000 @@ -25,6 +25,7 @@ */ #include "gtkinternal.h" +#include "account.h" #include "conversation.h" #include "debug.h" #include "notify.h" @@ -698,6 +699,10 @@ pounce = (GaimPounce *)bp->data; buddy = gaim_pounce_get_pouncee(pounce); + /* Check if account is online, if not skip it */ + if(!gaim_account_is_connected(pounce->pouncer)) + continue; + /* Build the menu item */ item = gtk_image_menu_item_new_with_label(buddy); @@ -737,7 +742,8 @@ gtk_widget_destroy(GTK_WIDGET(l->data)); } - + g_list_free(l); + /* "New Buddy Pounce" */ item = gtk_menu_item_new_with_label(_("New Buddy Pounce")); gtk_menu_shell_append(GTK_MENU_SHELL(menu), item);
--- a/src/pounce.c Thu Feb 12 03:12:54 2004 +0000 +++ b/src/pounce.c Thu Feb 12 05:26:52 2004 +0000 @@ -172,6 +172,26 @@ } void +gaim_pounce_destroy_all_by_account(GaimAccount *account) +{ + GaimAccount *pouncer; + GaimPounce *pounce; + GList *l, *l_next; + + + g_return_if_fail(account != NULL); + + for (l = gaim_pounces_get_all(); l != NULL; l = l_next) { + pounce = (GaimPounce *)l->data; + l_next = l->next; + + pouncer = gaim_pounce_get_pouncer(pounce); + if (pouncer == account) + gaim_pounce_destroy(pounce); + } +} + +void gaim_pounce_set_events(GaimPounce *pounce, GaimPounceEvent events) { g_return_if_fail(pounce != NULL); @@ -987,5 +1007,11 @@ void gaim_pounces_uninit() { + if (pounces_save_timer != 0) { + g_source_remove(pounces_save_timer); + pounces_save_timer = 0; + gaim_pounces_sync(); + } + gaim_signals_disconnect_by_handle(gaim_pounces_get_handle()); }
--- a/src/pounce.h Thu Feb 12 03:12:54 2004 +0000 +++ b/src/pounce.h Thu Feb 12 05:26:52 2004 +0000 @@ -104,6 +104,13 @@ void gaim_pounce_destroy(GaimPounce *pounce); /** + * Destroys all buddy pounces for the account + * + * @param account The account to remove all pounces from. + */ +void gaim_pounce_destroy_all_by_account(GaimAccount *account); + +/** * Sets the events a pounce should watch for. * * @param pounce The buddy pounce.
--- a/src/prefs.c Thu Feb 12 03:12:54 2004 +0000 +++ b/src/prefs.c Thu Feb 12 05:26:52 2004 +0000 @@ -131,6 +131,16 @@ gaim_prefs_add_int("/core/contact/idle_score", 1); } +void +gaim_prefs_uninit() +{ + if (prefs_save_timer != 0) { + g_source_remove(prefs_save_timer); + prefs_save_timer = 0; + gaim_prefs_sync(); + } +} + static char * get_path_dirname(const char *name) {
--- a/src/prefs.h Thu Feb 12 03:12:54 2004 +0000 +++ b/src/prefs.h Thu Feb 12 05:26:52 2004 +0000 @@ -63,6 +63,11 @@ void gaim_prefs_init(); /** + * Uninitializes the prefs subsystem. + */ +void gaim_prefs_uninit(void); + +/** * Add a new typeless pref. * * @param name The name of the pref
--- a/src/protocols/yahoo/yahoo.c Thu Feb 12 03:12:54 2004 +0000 +++ b/src/protocols/yahoo/yahoo.c Thu Feb 12 05:26:52 2004 +0000 @@ -2083,6 +2083,8 @@ gaim_connection_update_progress(gc, _("Connecting"), 1, 2); + gaim_connection_set_display_name(gc, gaim_account_get_username(account)); + yd->fd = -1; yd->friends = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, yahoo_friend_free); yd->confs = NULL;