[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pidgin-commits
Subject:    cpw.nader.asynclogging-3: 47c1a90d: Fixed not ever catching search
From:       morshed.nader () gmail ! com
Date:       2011-05-18 23:45:42
Message-ID: 20110518234542.5FF06AFD0A90 () rock ! pidgin ! im
[Download RAW message or body]

----------------------------------------------------------------------
Revision: 47c1a90defbd7efa7ea46a2a1d103c4cf32907a5
Parent:   081711acd2522e9a2b6c0fcc668e7381897dba83
Author:   morshed.nader@gmail.com
Date:     05/18/11 02:46:06
Branch:   im.pidgin.cpw.nader.asynclogging-3
URL: http://d.pidgin.im/viewmtn/revision/info/47c1a90defbd7efa7ea46a2a1d103c4cf32907a5

Changelog: 

Fixed not ever catching search errors in finch
Fixed finch repeatedly only adding the first log found to the window in view all logs

Changes against parent 081711acd2522e9a2b6c0fcc668e7381897dba83

  patched  finch/gntlog.c



============================================================
--- finch/gntlog.c	b3071e409cbd239f431f6ef8015d31c7e0dc3e90
+++ finch/gntlog.c	b61386f63df3f9f566f9f8dc6e83253391ff1e5b
@@ -241,9 +241,9 @@ finch_log_search_cb(GObject *object, GAs
 	text = purple_log_read_finish(log, res, NULL, &error);
 	finch_log_data->count--;
 
-	if (read == NULL) {
+	if (text == NULL) {
 		if (error->code != G_IO_ERROR_CANCELLED)
-			purple_debug_error("gntlog", "%s", error->message);
+			purple_debug_error("gntlog", "Error searching logs: %s\n", error->message);
 	} else if (finch_log_data->is_window_open) {
 		FinchLogViewer *lv = finch_log_data->log_viewer;
 		GntTree *tree = GNT_TREE(finch_log_viewer_get_tree(lv));
@@ -694,15 +694,14 @@ finch_log_sets_cb(GObject *object, GAsyn
 		finch_log_data_free(finch_log_data);
 	} else if (finch_log_data->is_window_open) {
 		FinchLogViewer *lv = finch_log_data->log_viewer;
-		GList *list = g_hash_table_get_keys(table), *n;
-		guint length = g_list_length(list);
+		GList *list = g_hash_table_get_keys(table);
 
-		if (length > 0) {
+		if (list != NULL) {
 			GCancellable *cancel = finch_log_viewer_get_list_cancel(lv);
 
 			finch_log_data->count = finch_log_data->total = 0;
 
-			for (n = list ; n != NULL; n = g_list_next(n)) {
+			for ( ; list != NULL; list = g_list_delete_link(list, list)) {
 				PurpleLogSet *set = list->data;
 
 				if (set->type != PURPLE_LOG_IM)
@@ -719,7 +718,6 @@ finch_log_sets_cb(GObject *object, GAsyn
 			}
 		}
 
-		g_list_free(list);
 		g_hash_table_unref(table);
 	} else {
 		finch_log_data_free(finch_log_data);


_______________________________________________
Commits mailing list
Commits@pidgin.im
http://pidgin.im/cgi-bin/mailman/listinfo/commits

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic