changeset 22472:723c7f610d2d

merge of 'c27bb03d64e205ff26669ccc173b7429cad093eb' and 'eced0f42ca756a36e09e9f4adbb007d835ff8795'
author Stu Tomlinson <stu@nosnilmot.com>
date Thu, 13 Mar 2008 01:38:04 +0000
parents f693749f82d2 (diff) bc8e0c7c6419 (current diff)
children 8aa07f5d1524
files
diffstat 3 files changed, 12 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/plugins/joinpart.c	Wed Mar 12 07:19:28 2008 +0000
+++ b/libpurple/plugins/joinpart.c	Thu Mar 13 01:38:04 2008 +0000
@@ -77,7 +77,7 @@
 {
 	PurpleConvChat *chat;
 	int threshold;
-	struct joinpart_key *key;
+	struct joinpart_key key;
 	time_t *last_said;
 
 	g_return_val_if_fail(conv != NULL, FALSE);
@@ -94,10 +94,9 @@
 		return FALSE;
 
 	/* Only show the notice if the user has spoken recently. */
-	key = g_new(struct joinpart_key, 1);
-	key->conv = conv;
-	key->user = g_strdup(name);
-	last_said = g_hash_table_lookup(users, key);
+	key.conv = conv;
+	key.user = (gchar *)name;
+	last_said = g_hash_table_lookup(users, &key);
 	if (last_said != NULL)
 	{
 		int delay = purple_prefs_get_int(DELAY_PREF);
--- a/pidgin/gtkplugin.c	Wed Mar 12 07:19:28 2008 +0000
+++ b/pidgin/gtkplugin.c	Thu Mar 13 01:38:04 2008 +0000
@@ -81,9 +81,7 @@
 
 		config = pidgin_plugin_pref_create_frame(frame);
 
-		/* XXX According to bug #1407047 this broke saving pluging preferences, I'll look at fixing it correctly later.
-		purple_plugin_pref_frame_destroy(frame);
-		*/
+		plugin->info->prefs_info->frame = frame;
 	}
 
 	return config;
@@ -212,6 +210,12 @@
 			plugin_pref_dialogs = NULL;
 		}
 		gtk_widget_destroy(d);
+
+		if (plug->info->prefs_info && plug->info->prefs_info->frame) {
+			purple_plugin_pref_frame_destroy(plug->info->prefs_info->frame);
+			plug->info->prefs_info->frame = NULL;
+		}
+
 		break;
 	}
 }
--- a/pidgin/plugins/cap/cap.c	Wed Mar 12 07:19:28 2008 +0000
+++ b/pidgin/plugins/cap/cap.c	Thu Mar 13 01:38:04 2008 +0000
@@ -113,11 +113,8 @@
 
 	stats = g_hash_table_lookup(_buddy_stats, buddy->name);
 	if(!stats) {
-		stats = g_malloc(sizeof(CapStatistics));
+		stats = g_malloc0(sizeof(CapStatistics));
 		stats->last_message = -1;
-		stats->last_message_status_id = NULL;
-		stats->last_status_id = NULL;
-		stats->prediction = NULL;
 		stats->buddy = buddy;
 		stats->last_seen = -1;
 		stats->last_status_id = "";