/soc/2015/igor.gajowiak/chatlog: 3cdfccba426b: Temporarily hooke...

Igor Gajowiak <[email protected]>
Newsgroups gmane.comp.gnome.gaim.cvs
Message-ID <[email protected]>
Changeset: 3cdfccba426b618547cdbc5876ebab86d56d320e
Author:	 Igor Gajowiak <[email protected]>
Date:	 2015-08-06 00:21 +0200
Branch:	 default
URL: https://hg.pidgin.im/soc/2015/igor.gajowiak/chatlog/rev/3cdfccba426b

Description:

Temporarily hooked importing messages to UI.

diffstat:

 pidgin/gtkgenericlog.c |  15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diffs (28 lines):

diff --git a/pidgin/gtkgenericlog.c b/pidgin/gtkgenericlog.c
--- a/pidgin/gtkgenericlog.c
+++ b/pidgin/gtkgenericlog.c
@@ -68,10 +68,23 @@ on_export_item_clicked(GtkAction *action
 	printf("on_export_item_clicked\n");
 }
 
+static void on_import_finished(gboolean status, guint msg_count)
+{
+	printf("on_import_finished %d %u\n", status, msg_count);
+}
+
 static void
 on_import_item_clicked(GtkAction *action, gpointer data)
 {
-	printf("on_import_item_clicked\n");
+	PurpleGenericLog * log = purple_genericlog_find_by_id(
+		"genericlog-legacylog");
+	if (!log) {
+		printf("Legacy log not found!!!\n");
+		return;
+	}
+
+	if (!purple_genericlog_import_msgs(log, on_import_finished, NULL))
+		printf("Failed to start import!!!\n");
 }
 
 static void

_______________________________________________
Commits mailing list
[email protected]
https://pidgin.im/cgi-bin/mailman/listinfo/commits
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.