cpw.nader.asynclogging-3: f373ab07: Fixed up pidgin to get it to compile, st...

morshed.nader at gmail.com morshed.nader at gmail.com
Wed Jan 12 05:07:15 EST 2011


----------------------------------------------------------------------
Revision: f373ab07a2d37a3966fff0a7ac9db8e3101d6829
Parent:   5f58bd44e43d09bdb5d2b3e74482cfc7b1387e10
Author:   morshed.nader at gmail.com
Date:     01/12/11 05:02:41
Branch:   im.pidgin.cpw.nader.asynclogging-3
URL: http://d.pidgin.im/viewmtn/revision/info/f373ab07a2d37a3966fff0a7ac9db8e3101d6829

Changelog: 

Fixed up pidgin to get it to compile, still needs testing
Disabled the gtkperl plugin

Changes against parent 5f58bd44e43d09bdb5d2b3e74482cfc7b1387e10

  patched  pidgin/gtkblist.c
  patched  pidgin/gtkconv.c
  patched  pidgin/gtklog.c
  patched  pidgin/gtklog.h
  patched  pidgin/gtkutils.c
  patched  pidgin/plugins/Makefile.mingw
  patched  pidgin/plugins/history.c
  patched  pidgin/plugins/timestamp_format.c

-------------- next part --------------
============================================================
--- pidgin/plugins/history.c	4eb504f741acefd38c410540e6dbea15e7d31a40
+++ pidgin/plugins/history.c	119954807137f770eefde1f45c1778614603debc
@@ -25,7 +25,6 @@ typedef struct {
 	PurpleAccount *account;
 	PurpleConversation *conv;
 	PurpleLog *log;
-	PurpleLogReadFlags flags;
 	GCancellable *cancel;
 	const gchar *name;
 	const gchar *alias;
@@ -109,7 +108,7 @@ historize(PurpleConversation *c)
 
 					callback_data->count++;
 
-					purple_log_get_logs_async(PURPLE_LOG_IM, purple_buddy_get_name(buddy),
+					purple_logs_get_logs_async(PURPLE_LOG_IM, purple_buddy_get_name(buddy),
 						purple_buddy_get_account(buddy), G_PRIORITY_DEFAULT,
 						callback_data->cancel, historize_log_collector_cb, callback_data);
 				}
@@ -131,7 +130,7 @@ historize(PurpleConversation *c)
 
 		callback_data->count = 1;
 
-		purple_log_get_logs_async(PURPLE_LOG_CHAT, name, account, G_PRIORITY_DEFAULT,
+		purple_logs_get_logs_async(PURPLE_LOG_CHAT, name, account, G_PRIORITY_DEFAULT,
 			callback_data->cancel, historize_log_list_cb, callback_data);
 	}
 
@@ -161,12 +160,12 @@ get_last_log(GList *list, PurpleLog *las
 	} else
 		node = list;
 
-	for( ; node; node = g_list_next(node))
+	for( ; node != NULL; node = g_list_next(node))
 		if (purple_log_compare(last_log, node->data) > 0) {
-			purple_log_free(last_log);
+			g_object_unref(last_log);
 			last_log = node->data;
 		} else
-			purple_log_free(node->data);
+			g_object_unref(node->data);
 
 	g_list_free(list);
 
@@ -177,13 +176,16 @@ historize_log_read_cb(GObject *object, G
 historize_log_read_cb(GObject *object, GAsyncResult *res, gpointer userdata)
 {
 	_historize_callback_data *callback_data = userdata;
-	PurpleLog *log = callback_data->log;
+	PurpleLog *log = PURPLE_LOG(object);
+	PurpleLogReadFlags flags;
 	PidginConversation *gtkconv = PIDGIN_CONVERSATION(callback_data->conv);
 	GtkIMHtmlOptions options;
 	GtkIMHtml *imhtml = GTK_IMHTML(gtkconv->imhtml);
 	GError *err = NULL;
 	const gchar *header_date;
 	gchar *text, *escaped_alias, *header, *full_header, *text_backup, *protocol, *imhtml_text;
+	const struct tm *log_tm;
+	time_t log_time;
 
 	if (res == NULL) {
 		callback_data->count--;
@@ -205,15 +207,18 @@ historize_log_read_cb(GObject *object, G
 
 	protocol = g_strdup(gtk_imhtml_get_protocol_name(imhtml));
 	gtk_imhtml_set_protocol_name(imhtml,
-		purple_account_get_protocol_name(callback_data->log->account));
+		purple_account_get_protocol_name(purple_log_get_account(log)));
 
 	if (gtk_text_buffer_get_char_count(gtk_text_view_get_buffer(GTK_TEXT_VIEW(imhtml))))
 		gtk_imhtml_append_text(imhtml, "<br>", options);
 
-	if (log->tm)
-		header_date = purple_date_format_full(log->tm);
+	log_tm = purple_log_get_tm(log);
+	log_time = purple_log_get_time(log);
+
+	if (log_tm != NULL)
+		header_date = purple_date_format_full(log_tm);
 	else
-		header_date = purple_date_format_full(localtime(&log->time));
+		header_date = purple_date_format_full(localtime(&log_time));
 
 	escaped_alias = g_markup_escape_text(callback_data->alias, -1);
 	full_header = g_strdup_printf(_("Conversation with %s on %s"), escaped_alias, header_date);
@@ -225,14 +230,14 @@ historize_log_read_cb(GObject *object, G
 	g_free(escaped_alias);
 	g_free(full_header);
 
-	text = purple_log_read_finish(log, res, &err);
+	text = purple_log_read_finish(log, res, &flags, &err);
 
 	if (text == NULL)
 		text = err->message;
 	else
 		g_strchomp(text);
 
-	if (callback_data->flags & PURPLE_LOG_READ_NO_NEWLINE)
+	if (flags & PURPLE_LOG_READ_NO_NEWLINE)
 		options |= GTK_IMHTML_NO_NEWLINE;
 
 	//purple_conversation_write?
@@ -272,7 +277,7 @@ historize_log_list_cb(GObject *object, G
 		return;
 	}
 
-	list = purple_log_get_logs_finish(res, &err);
+	list = purple_log_get_logs_finish(PURPLE_LOG(object), res, &err);
 
 	if (list != NULL)
 		callback_data->log = get_last_log(list, callback_data->log);
@@ -293,8 +298,8 @@ historize_log_list_cb_done(_historize_ca
 	callback_data->count++;
 
 	if (callback_data->log != NULL)
-		purple_log_read_async(callback_data->log, &callback_data->flags,
-			G_PRIORITY_DEFAULT, callback_data->cancel, historize_log_read_cb,
+		purple_log_read_async(callback_data->log, G_PRIORITY_DEFAULT,
+			callback_data->cancel, historize_log_read_cb,
 			callback_data);
 	else
 		historize_log_read_cb(NULL, NULL, callback_data);
@@ -307,7 +312,7 @@ historize_log_collector_cb(GObject *obje
 	GList *list;
 	GError *err = NULL;
 
-	list = purple_log_get_logs_finish(res, &err);
+	list = purple_log_get_logs_finish(PURPLE_LOG(object), res, &err);
 
 	if (list != NULL)
 		callback_data->log = get_last_log(list, callback_data->log);
@@ -328,7 +333,7 @@ historize_log_collector_cb_done(_histori
 	callback_data->count++;
 
 	if (callback_data->log == NULL)
-		purple_log_get_logs_async(PURPLE_LOG_IM, callback_data->name,
+		purple_logs_get_logs_async(PURPLE_LOG_IM, callback_data->name,
 			callback_data->account, G_PRIORITY_DEFAULT, callback_data->cancel,
 			historize_log_list_cb, callback_data);
 	else
@@ -351,7 +356,7 @@ historize_log_free(_historize_callback_d
 historize_log_free(_historize_callback_data *callback_data)
 {
 	if (callback_data->log != NULL)
-		purple_log_free(callback_data->log);
+		g_object_unref(callback_data->log);
 
 	/* Why on earth does pidgin give us gulong to refer to our connected signal if it
 	   offers no API to disconnect it with!? */
============================================================
--- pidgin/gtkconv.c	0aa1483461a2917c9fba3b8f4d16d084aa18d136
+++ pidgin/gtkconv.c	e6b3b65d4b9834f95bdb00d08da77a61bd488775
@@ -1059,7 +1059,7 @@ menu_view_log_cb(gpointer data, guint ac
 {
 	PidginWindow *win = data;
 	PurpleConversation *conv;
-	PurpleLogType type;
+	PurpleLogChatType type;
 	PidginBuddyList *gtkblist;
 	GdkCursor *cursor;
 	const char *name;
============================================================
--- pidgin/gtkutils.c	37d6539d01772d33c28214a994dceb7a061cad8a
+++ pidgin/gtkutils.c	7e8dc75a29cbeef8fa53003567496d5f53d9fd90
@@ -2062,7 +2062,7 @@ add_completion_list_cb(GObject *object, 
 	GHashTable *sets;
 	GError *err = NULL;
 
-	sets = purple_log_get_log_sets_finish(res, &err);
+	sets = purple_log_get_log_sets_finish(PURPLE_LOG(object), res, &err);
 
 	if (sets == NULL && err->code != G_IO_ERROR_CANCELLED)
 		purple_debug_error("gtkutils", "Unable to get hash table: %s\n", err->message);
@@ -2116,7 +2116,7 @@ add_completion_list(PidginCompletionData
 
 	data->cancel = g_cancellable_new();
 
-	purple_log_get_log_sets_async(G_PRIORITY_DEFAULT, data->cancel,
+	purple_logs_get_log_sets_async(G_PRIORITY_DEFAULT, data->cancel,
 		add_completion_list_cb, data);
 }
 
============================================================
--- pidgin/gtkblist.c	6af89ce91a9b8d525df534bc6742642bb64fd1a4
+++ pidgin/gtkblist.c	08f2d208e2521d159ef421a6a9e6016484d1af0c
@@ -738,7 +738,7 @@ static void gtk_blist_menu_showlog_cb(Gt
 
 static void gtk_blist_menu_showlog_cb(GtkWidget *w, PurpleBlistNode *node)
 {
-	PurpleLogType type;
+	PurpleLogChatType type;
 	PurpleAccount *account;
 	char *name = NULL;
 
@@ -7828,7 +7828,7 @@ static void sort_method_log_activity(Pur
 		PurpleBuddy *buddy;
 		for (n = node->child; n; n = n->next) {
 			buddy = (PurpleBuddy*)n;
-			activity_score += purple_log_get_activity_score(PURPLE_LOG_IM, buddy->name, buddy->account);
+			activity_score += purple_log_get_activity_score(PURPLE_LOG_IM, buddy->name, buddy->account, NULL, NULL);
 		}
 		buddy_name = purple_contact_get_alias((PurpleContact*)node);
 	} else if(PURPLE_BLIST_NODE_IS_CHAT(node)) {
@@ -7864,7 +7864,7 @@ static void sort_method_log_activity(Pur
 		if(PURPLE_BLIST_NODE_IS_CONTACT(n)) {
 			for (n2 = n->child; n2; n2 = n2->next) {
                         	buddy = (PurpleBuddy*)n2;
-				this_log_activity_score += purple_log_get_activity_score(PURPLE_LOG_IM, buddy->name, buddy->account);
+				this_log_activity_score += purple_log_get_activity_score(PURPLE_LOG_IM, buddy->name, buddy->account, NULL, NULL);
 			}
 			this_buddy_name = purple_contact_get_alias((PurpleContact*)n);
 		} else {
============================================================
--- pidgin/gtklog.c	379ee451d8409fda74f354bbe91633f34da2f4f3
+++ pidgin/gtklog.c	5e3349ce68abea6a455b1ffa4c431f66b8da55f7
@@ -50,7 +50,7 @@ typedef struct {
 	GCancellable       *search_cancel; /**< A GCancellable to stop any searches */
 	GCancellable       *list_cancel;   /**< A GCancellable to stop any folder listings */
 	gboolean           selected;       /**< A gboolean to indicate the user has already selected a log */
-	PurpleLogType      type;           /**< The log type of the window */
+	PurpleLogChatType  type;           /**< The log type of the window */
 #if GTK_CHECK_VERSION(2, 20, 0)
 	GtkWidget          *spinner;       /**< A spinner to indicate a read is in progress */
 #endif
@@ -87,7 +87,7 @@ typedef struct {
 typedef struct {
 	PurpleAccount *account;
 	PurpleContact *contact;
-	PurpleLogType type;
+	PurpleLogChatType type;
 	gchar *buddyname;
 } log_viewer_hash_t;
 
@@ -250,10 +250,14 @@ log_get_date(PurpleLog *log)
 static const gchar *
 log_get_date(PurpleLog *log)
 {
-	if (log->tm)
-		return purple_date_format_full(log->tm);
-	else
-		return purple_date_format_full(localtime(&log->time));
+	const struct tm *tm = purple_log_get_tm(log);
+	time_t time;
+
+	if (tm != NULL)
+		return purple_date_format_full(tm);
+
+	time = purple_log_get_time(log);
+	return purple_date_format_full(localtime(&time));
 }
 
 static void
@@ -280,7 +284,7 @@ pidgin_log_search_cb(GObject *object, GA
 	GError *err = NULL;
 	gchar *text;
 
-	text = purple_log_read_finish(log, res, &err);
+	text = purple_log_read_finish(log, res, NULL, &err);
 	pidgin_log_data->count--;
 
 	if (text == NULL) {
@@ -376,7 +380,7 @@ search_cb(GtkWidget *button, PidginLogVi
 		callback_data->log_data = pidgin_log_data;
 		callback_data->log = log;
 
-		purple_log_read_async(log, NULL, G_PRIORITY_DEFAULT_IDLE, cancel,
+		purple_log_read_async(log, G_PRIORITY_DEFAULT_IDLE, cancel,
 			pidgin_log_search_cb, callback_data);
 	}
 
@@ -388,7 +392,6 @@ destroy_cb(GtkWidget *w, gint resp, log_
 {
 	PidginLogViewerEx *lv_ex = syslog_viewer;
 	PidginLogViewer *lv;
-	GList *logs;
 
 #ifdef G_OS_WIN32
 	if (resp == GTK_RESPONSE_HELP) {
@@ -411,7 +414,8 @@ destroy_cb(GtkWidget *w, gint resp, log_
 		if (log == NULL)
 			logdir = g_build_filename(purple_user_dir(), "logs", NULL);
 		else
-			logdir = purple_log_get_log_dir(log->type, log->name, log->account);
+			logdir = purple_log_get_log_dir(purple_log_get_chat_type(log),
+				purple_log_get_name(log), purple_log_get_account(log));
 
 		winpidgin_shell_execute(logdir, "explore", NULL);
 		g_free(logdir);
@@ -433,9 +437,7 @@ destroy_cb(GtkWidget *w, gint resp, log_
 
 	purple_request_close_with_handle(lv);
 
-	for (logs = lv->logs; logs != NULL; logs = g_list_next(logs)) 
-		purple_log_free(logs->data);
-
+	g_list_foreach(lv->logs, (GFunc) g_object_unref, NULL);
 	g_list_free(lv->logs);
 	g_free(lv->search);
 	g_free(lv);
@@ -487,9 +489,9 @@ pidgin_log_delete_log_cb(GObject *object
 	GError *err = NULL;
 	gboolean result;
 
-	/* Technically speaking, purple_log_delete_finish doesn't care about
+	/* Technically speaking, purple_log_remove_finish doesn't care about
 	   the first argument */
-	result = purple_log_delete_finish(NULL, res, &err);
+	result = purple_log_remove_finish(NULL, res, &err);
 
 	if (!result)
 		purple_notify_error(NULL, NULL, "Log Deletion Failed",
@@ -519,7 +521,7 @@ delete_log_cb(log_delete_callback_data *
 static void
 delete_log_cb(log_delete_callback_data *data)
 {
-	purple_log_delete_async(data->log_data->log, G_PRIORITY_DEFAULT, NULL,
+	purple_log_remove_async(data->log_data->log, G_PRIORITY_DEFAULT, NULL,
 		pidgin_log_delete_log_cb, data);
 }
 
@@ -537,31 +539,40 @@ log_delete_log_cb(GtkWidget *menuitem, l
 	PurpleBuddy *buddy;
 	PurpleChat *chat;
 	PurpleLog *log = data->log_data->log;
+	PurpleLogChatType chat_type;
 	const gchar *name, *time = log_get_date(log);
 	gchar *str;
 	void *handle;
 
-	if (log->type == PURPLE_LOG_IM) {
-		buddy = purple_find_buddy(log->account, log->name);
+	chat_type = purple_log_get_chat_type(log);
 
+	if (chat_type == PURPLE_LOG_IM) {
+		PurpleAccount *account = purple_log_get_account(log);
+		const gchar *log_name = purple_log_get_name(log);
+
+		buddy = purple_find_buddy(account, log_name);
+
 		if (buddy != NULL)
 			name = purple_buddy_get_contact_alias(buddy);
 		else
-			name = log->name;
+			name = log_name;
 
 		str = g_strdup_printf(_("Are you sure you want to permanently delete the log of the "
 			"conversation with %s which started at %s?"), name, time);
-	} else if (log->type == PURPLE_LOG_CHAT) {
-		chat = purple_blist_find_chat(log->account, log->name);
+	} else if (chat_type == PURPLE_LOG_CHAT) {
+		PurpleAccount *account = purple_log_get_account(log);
+		const gchar *log_name = purple_log_get_name(log);
 
+		chat = purple_blist_find_chat(account, log_name);
+
 		if (chat != NULL)
 			name = purple_chat_get_name(chat);
 		else
-			name = log->name;
+			name = log_name;
 
 		str = g_strdup_printf(_("Are you sure you want to permanently delete the log of the "
 			"conversation in %s which started at %s?"), name, time);
-	} else if (log->type == PURPLE_LOG_SYSTEM) {
+	} else if (chat_type == PURPLE_LOG_SYSTEM) {
 		str = g_strdup_printf(_("Are you sure you want to permanently delete the system log "
 			"which started at %s?"), time);
 	} else
@@ -615,7 +626,7 @@ log_show_popup_menu(GtkWidget *treeview,
 	menu = gtk_menu_new();
 	menuitem = gtk_menu_item_new_with_label(_("Delete Log..."));
 
-	if (!purple_log_is_deletable(data->log_data->log))
+	if (!purple_log_is_removable(data->log_data->log, NULL, NULL))
 		gtk_widget_set_sensitive(menuitem, FALSE);
 
 	g_signal_connect(menuitem, "activate", G_CALLBACK(log_delete_log_cb), data);
@@ -741,7 +752,7 @@ pidgin_log_read_cb(GObject *object, GAsy
 		GError *err = NULL;
 		gchar *text;
 
-		text = purple_log_read_finish(log, res, &err);
+		text = purple_log_read_finish(log, res, &lv->flags, &err);
 
 		if (text == NULL) {
 			if (err->code == G_IO_ERROR_CANCELLED) {
@@ -761,7 +772,7 @@ pidgin_log_read_cb(GObject *object, GAsy
 
 		gtk_imhtml_clear(imhtml);
 		gtk_imhtml_set_protocol_name(imhtml,
-			purple_account_get_protocol_name(log->account));
+			purple_account_get_protocol_name(purple_log_get_account(log)));
 
 		purple_signal_emit(pidgin_log_get_handle(), "log-displaying", lv, log);
 
@@ -788,6 +799,7 @@ log_select_cb(GtkTreeSelection *sel, Pid
 	_pidgin_log_data *pidgin_log_data;
 	PidginLogViewer *lv = lv_ex->lv;
 	PurpleLog *log = NULL;
+	PurpleLogChatType chat_type;
 	GtkTreeModel *model = GTK_TREE_MODEL(lv->treestore);
 	GtkTreeIter iter;
 	GCancellable *cancel;
@@ -801,15 +813,18 @@ log_select_cb(GtkTreeSelection *sel, Pid
 	if (log == NULL)
 		return;
 
-	if (log->type != PURPLE_LOG_SYSTEM) {
+	chat_type = purple_log_get_chat_type(log);
+
+	if (chat_type != PURPLE_LOG_SYSTEM) {
+		const gchar *log_name = purple_log_get_name(log);
 		gchar *title;
 
-		if (log->type == PURPLE_LOG_CHAT)
+		if (chat_type == PURPLE_LOG_CHAT)
 			title = g_strdup_printf(_("<span size='larger' weight='bold'>Conversation in %s on %s</span>"),
-				log->name, log_get_date(log));
+				log_name, log_get_date(log));
 		else
 			title = g_strdup_printf(_("<span size='larger' weight='bold'>Conversation with %s on %s</span>"),
-				log->name, log_get_date(log));
+				log_name, log_get_date(log));
 
 		gtk_label_set_markup(GTK_LABEL(lv->label), title);
 		g_free(title);
@@ -831,7 +846,7 @@ log_select_cb(GtkTreeSelection *sel, Pid
 	gtk_widget_show(lv_ex->spinner);
 #endif
 
-	purple_log_read_async(log, &lv->flags, G_PRIORITY_DEFAULT, cancel,
+	purple_log_read_async(log, G_PRIORITY_DEFAULT, cancel,
 		pidgin_log_read_cb, pidgin_log_data);
 
 	g_object_unref(cancel);
@@ -848,7 +863,6 @@ populate_log_tree(PidginLogViewerEx *lv_
      /* Logs are made from trees in real life.
         This is a tree made from logs */
 {
-	PurpleLog *log;
 	PidginLogViewer *lv = lv_ex->lv;
 	GtkTreeIter toplevel, child;
 	GList *logs;
@@ -858,14 +872,18 @@ populate_log_tree(PidginLogViewerEx *lv_
 	gtk_tree_store_clear(lv->treestore);
 
 	for (logs = lv->logs; logs != NULL; logs = g_list_next(logs)) {
-		log = logs->data;
+		PurpleLog *log = logs->data;
+		const struct tm *log_tm;
+		time_t log_time;
 
-		month = purple_utf8_strftime(_("%B %Y"), log->tm ? log->tm : localtime(&log->time));
+		log_tm = purple_log_get_tm(log);
+		log_time = purple_log_get_time(log);
+		month = purple_utf8_strftime(_("%B %Y"), log_tm != NULL ? log_tm : localtime(&log_time));
 
 		if (strcmp(month, prev_top_month) != 0) {
 			/* top level */
 			gtk_tree_store_append(lv->treestore, &toplevel, NULL);
-			gtk_tree_store_set(lv->treestore, &toplevel, 0, month, 1, NULL, 2, log->tm, -1);
+			gtk_tree_store_set(lv->treestore, &toplevel, 0, month, 1, NULL, 2, log_tm, -1);
 
 			strncpy(prev_top_month, month, sizeof(prev_top_month));
 		}
@@ -1045,16 +1063,20 @@ insert_log_viewer_log(PidginLogViewerEx 
 	GtkTreeStore *store;
 	GtkTreeIter insertion, inserted_month, month_iter, child;
 	const gchar *month;
+	const struct tm *log_tm;
 	struct tm *tm;
+	time_t log_time;
 
 	store = lv_ex->lv->treestore;
 	model = GTK_TREE_MODEL(store);
-	month = purple_utf8_strftime(_("%B %Y"), log->tm ? log->tm : localtime(&log->time));
+	log_tm = purple_log_get_tm(log);
+	log_time = purple_log_get_time(log);
+	month = purple_utf8_strftime(_("%B %Y"), log_tm != NULL ? log_tm : localtime(&log_time));
 
 	if (!gtk_tree_model_get_iter_first(model, &month_iter)) {
 		/* Appending the month */
 		gtk_tree_store_append(store, &inserted_month, NULL);
-		gtk_tree_store_set(store, &inserted_month, 0, month, 1, NULL, 2, log->tm, -1);
+		gtk_tree_store_set(store, &inserted_month, 0, month, 1, NULL, 2, log_tm, -1);
 
 		gtk_tree_store_append(store, &insertion, &inserted_month);
 		gtk_tree_store_set(store, &insertion, 0, log_get_date(log), 1, log, -1);
@@ -1065,7 +1087,7 @@ insert_log_viewer_log(PidginLogViewerEx 
 	do {
 		gtk_tree_model_get(model, &month_iter, 2, &tm, -1);
 
-		if (tm != NULL && tm->tm_mon == log->tm->tm_mon && tm->tm_year == log->tm->tm_year) {
+		if (tm != NULL && tm->tm_mon == log_tm->tm_mon && tm->tm_year == log_tm->tm_year) {
 			if (!gtk_tree_model_iter_children(model, &child, &month_iter)) {
 				/* Appending the log to the currently selected month */
 				gtk_tree_store_append(store, &insertion, &month_iter);
@@ -1077,7 +1099,7 @@ insert_log_viewer_log(PidginLogViewerEx 
 			do {
 				gtk_tree_model_get(model, &child, 1, &child_log, -1);
 
-				if (log->time > child_log->time) {
+				if (log_time > purple_log_get_time(child_log)) {
 					/* Prepending the log to the currently selected month */
 					gtk_tree_store_insert_before(store, &insertion, &month_iter, &child);
 					gtk_tree_store_set(store, &insertion, 0, log_get_date(log), 1, log, -1);
@@ -1092,12 +1114,12 @@ insert_log_viewer_log(PidginLogViewerEx 
 			gtk_tree_store_set(store, &insertion, 0, log_get_date(log), 1, log, -1);
 
 			return;
-		} else if (tm->tm_year < log->tm->tm_year ||
-			(tm->tm_year == log->tm->tm_year && tm->tm_mon < log->tm->tm_mon))
+		} else if (tm->tm_year < log_tm->tm_year ||
+			(tm->tm_year == log_tm->tm_year && tm->tm_mon < log_tm->tm_mon))
 		{
 			/* Prepending the month */
 			gtk_tree_store_insert_before(store, &inserted_month, NULL, &month_iter);
-			gtk_tree_store_set(store, &inserted_month, 0, month, 1, NULL, 2, log->tm, -1);
+			gtk_tree_store_set(store, &inserted_month, 0, month, 1, NULL, 2, log_tm, -1);
 
 			gtk_tree_store_append(store, &insertion, &inserted_month);
 			gtk_tree_store_set(store, &insertion, 0, log_get_date(log), 1, log, -1);
@@ -1109,7 +1131,7 @@ insert_log_viewer_log(PidginLogViewerEx 
 
 	/* Appending the month */
 	gtk_tree_store_append(store, &inserted_month, NULL);
-	gtk_tree_store_set(store, &inserted_month, 0, month, 1, NULL, 2, log->tm, -1);
+	gtk_tree_store_set(store, &inserted_month, 0, month, 1, NULL, 2, log_tm, -1);
 
 	gtk_tree_store_append(store, &insertion, &inserted_month);
 	gtk_tree_store_set(store, &insertion, 0, log_get_date(log), 1, log, -1);
@@ -1202,7 +1224,7 @@ pidgin_log_size_cb(GObject *object, GAsy
 	GError *err = NULL;
 	gssize log_size;
 
-	log_size = purple_log_get_total_size_finish(res, &err);
+	log_size = purple_log_get_total_size_finish(PURPLE_LOG(object), res, &err);
 	pidgin_log_data->count--;
 
 	if (log_size < 0) {
@@ -1243,7 +1265,7 @@ pidgin_log_list_cb(GObject *object, GAsy
 	GError *err = NULL;
 	GList *list;
 
-	list = purple_log_get_logs_finish(res, &err);
+	list = purple_log_get_logs_finish(PURPLE_LOG(object), res, &err);
 	pidgin_log_data->count--;
 
 	if (list == NULL) {
@@ -1266,7 +1288,7 @@ pidgin_log_system_list_cb(GObject *objec
 	GError *err = NULL;
 	GList *list;
 
-	list = purple_log_get_system_logs_finish(res, &err);
+	list = purple_log_get_system_logs_finish(PURPLE_LOG(object), res, &err);
 	pidgin_log_data->count--;
 
 	if (list == NULL) {
@@ -1283,7 +1305,7 @@ void
 }
 
 void
-pidgin_log_show(PurpleLogType type, const gchar *buddyname, PurpleAccount *account)
+pidgin_log_show(PurpleLogChatType type, const gchar *buddyname, PurpleAccount *account)
 {
 	log_viewer_hash_t *ht;
 	_pidgin_log_data *pidgin_log_data;
@@ -1353,9 +1375,9 @@ pidgin_log_show(PurpleLogType type, cons
 	cancel = g_cancellable_new();
 	pidgin_log_viewer_ex_set_list_cancel(lv_ex, cancel);
 
-	purple_log_get_logs_async(type, buddyname, account, G_PRIORITY_DEFAULT,
+	purple_logs_get_logs_async(type, buddyname, account, G_PRIORITY_DEFAULT,
 		cancel, pidgin_log_list_cb, pidgin_log_data);
-	purple_log_get_total_size_async(type, buddyname, account, G_PRIORITY_DEFAULT,
+	purple_logs_get_total_size_async(type, buddyname, account, G_PRIORITY_DEFAULT,
 		cancel, pidgin_log_size_cb, pidgin_log_data);
 
 	g_object_unref(cancel);
@@ -1438,9 +1460,9 @@ pidgin_log_show_contact(PurpleContact *c
 
 			pidgin_log_data->count = (pidgin_log_data->total += 2);
 
-			purple_log_get_logs_async(PURPLE_LOG_IM, buddy->name, buddy->account,
+			purple_logs_get_logs_async(PURPLE_LOG_IM, buddy->name, buddy->account,
 				G_PRIORITY_DEFAULT, cancel, pidgin_log_list_cb, pidgin_log_data);
-			purple_log_get_total_size_async(PURPLE_LOG_IM, buddy->name, buddy->account,
+			purple_logs_get_total_size_async(PURPLE_LOG_IM, buddy->name, buddy->account,
 				G_PRIORITY_DEFAULT, cancel, pidgin_log_size_cb, pidgin_log_data);
 		}
 	}
@@ -1481,7 +1503,7 @@ pidgin_syslog_show(void)
 			pidgin_log_data->count++;
 			pidgin_log_data->total++;
 
-			purple_log_get_system_logs_async(account, G_PRIORITY_DEFAULT, cancel,
+			purple_logs_get_system_logs_async(account, G_PRIORITY_DEFAULT, cancel,
 				pidgin_log_system_list_cb, pidgin_log_data);
 		}
 	}
============================================================
--- pidgin/gtklog.h	d2f68950e4d610a305124ca8efaeccc5f2b27839
+++ pidgin/gtklog.h	908b652405ccb703cfc5985446da0478f087fdab
@@ -70,7 +70,7 @@ G_BEGIN_DECLS
  * @param buddyname:   The buddy or chat name
  * @param account:     The account
  */
-void pidgin_log_show(PurpleLogType type, const gchar *buddyname, PurpleAccount *account);
+void pidgin_log_show(PurpleLogChatType chat_type, const gchar *buddyname, PurpleAccount *account);
 
 /**
  * Displays the logs for one contact
============================================================
--- pidgin/plugins/timestamp_format.c	b0110601005e3f55178aacef31208bb8ea8c09b3
+++ pidgin/plugins/timestamp_format.c	e8aa79a7ee7cc33022b0835cee71566907fdec71
@@ -144,7 +144,7 @@ static char *log_timestamp_cb(PurpleLog 
 
 	g_return_val_if_fail(log != NULL, NULL);
 
-	return timestamp_cb_common(log->conv, t, show_date, force, dates, FALSE);
+	return timestamp_cb_common(purple_log_get_conversation(log), t, show_date, force, dates, FALSE);
 }
 
 static void
@@ -223,7 +223,7 @@ plugin_load(PurplePlugin *plugin)
 
 	purple_signal_connect(pidgin_conversations_get_handle(), "conversation-timestamp",
 	                    plugin, PURPLE_CALLBACK(conversation_timestamp_cb), NULL);
-	purple_signal_connect(purple_log_get_handle(), "log-timestamp",
+	purple_signal_connect(purple_log_system_get_handle(), "log-timestamp",
 	                    plugin, PURPLE_CALLBACK(log_timestamp_cb), NULL);
 
 	klass = g_type_class_ref(GTK_TYPE_TEXT_VIEW);
============================================================
--- pidgin/plugins/Makefile.mingw	eb914f003734a16f54e0984e598b182ec201bbcd
+++ pidgin/plugins/Makefile.mingw	2ca9d675de9f481f12e31c48166361bea5373eb8
@@ -8,7 +8,7 @@ DISCO_PLUGIN := ./disco
 include $(PIDGIN_TREE_TOP)/libpurple/win32/global.mak
 
 DISCO_PLUGIN := ./disco
-GTKPERL_PLUGIN := ./perl
+#GTKPERL_PLUGIN := ./perl
 TICKER_PLUGIN := ./ticker
 TRANSPARENCY_PLUGIN := ./win32/transparency
 WINPREFS_PLUGIN := ./win32/winprefs
@@ -62,14 +62,14 @@ all: plugins
 
 all: plugins
 	$(MAKE) -C $(DISCO_PLUGIN) -f $(MINGW_MAKEFILE)
-	$(MAKE) -C $(GTKPERL_PLUGIN) -f $(MINGW_MAKEFILE)
+#	$(MAKE) -C $(GTKPERL_PLUGIN) -f $(MINGW_MAKEFILE)
 	$(MAKE) -C $(TICKER_PLUGIN) -f $(MINGW_MAKEFILE)
 	$(MAKE) -C $(TRANSPARENCY_PLUGIN) -f $(MINGW_MAKEFILE)
 	$(MAKE) -C $(WINPREFS_PLUGIN) -f $(MINGW_MAKEFILE)
 
 install: all $(PIDGIN_INSTALL_PLUGINS_DIR)
 	$(MAKE) -C $(DISCO_PLUGIN) -f $(MINGW_MAKEFILE) install
-	$(MAKE) -C $(GTKPERL_PLUGIN) -f $(MINGW_MAKEFILE) install
+#	$(MAKE) -C $(GTKPERL_PLUGIN) -f $(MINGW_MAKEFILE) install
 	$(MAKE) -C $(TICKER_PLUGIN) -f $(MINGW_MAKEFILE) install
 	$(MAKE) -C $(TRANSPARENCY_PLUGIN) -f $(MINGW_MAKEFILE) install
 	$(MAKE) -C $(WINPREFS_PLUGIN) -f $(MINGW_MAKEFILE) install
@@ -111,7 +111,7 @@ clean:
 clean:
 	rm -f *.o *.dll
 	$(MAKE) -C $(DISCO_PLUGIN) -f $(MINGW_MAKEFILE) clean
-	$(MAKE) -C $(GTKPERL_PLUGIN) -f $(MINGW_MAKEFILE) clean
+#	$(MAKE) -C $(GTKPERL_PLUGIN) -f $(MINGW_MAKEFILE) clean
 	$(MAKE) -C $(TICKER_PLUGIN) -f $(MINGW_MAKEFILE) clean
 	$(MAKE) -C $(TRANSPARENCY_PLUGIN) -f $(MINGW_MAKEFILE) clean
 	$(MAKE) -C $(WINPREFS_PLUGIN) -f $(MINGW_MAKEFILE) clean


More information about the Commits mailing list