cpw.nader.asynclogging-3: 47c1a90d: Fixed not ever catching search errors in...
morshed.nader at gmail.com
morshed.nader at gmail.com
Wed May 18 19:45:42 EDT 2011
----------------------------------------------------------------------
Revision: 47c1a90defbd7efa7ea46a2a1d103c4cf32907a5
Parent: 081711acd2522e9a2b6c0fcc668e7381897dba83
Author: morshed.nader at 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
-------------- next part --------------
============================================================
--- 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);
More information about the Commits
mailing list