/dev/twasilczyk/imgupload: 262fbc598971: Imgupload: insert link;...

Tomasz Wasilczyk <[email protected]>
Newsgroups gmane.comp.gnome.gaim.cvs
Message-ID <[email protected]>
Changeset: 262fbc598971e701a06bc6d502a4f9cbdbce0fda
Author:	 Tomasz Wasilczyk <[email protected]>
Date:	 2014-05-19 18:44 +0200
Branch:	 default
URL: https://hg.pidgin.im/dev/twasilczyk/imgupload/rev/262fbc598971

Description:

Imgupload: insert link; first working version

diffstat:

 pidgin/plugins/imgupload.c |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (33 lines):

diff --git a/pidgin/plugins/imgupload.c b/pidgin/plugins/imgupload.c
--- a/pidgin/plugins/imgupload.c
+++ b/pidgin/plugins/imgupload.c
@@ -96,6 +96,8 @@ imgup_imgur_uploaded(PurpleHttpConnectio
 
 	result = json_object_get_object_member(result, "data");
 	url = json_object_get_string_member(result, "link");
+
+	/* TODO: pass image name here too */
 	imgup_upload_done(webview, url, NULL);
 }
 
@@ -139,9 +141,8 @@ imgup_upload_done(PidginWebView *webview
 {
 	g_object_steal_data(G_OBJECT(webview), "imgupload-hc");
 
-	/* TODO: pass image name here too */
-	purple_debug_fatal("imgupload", "Not yet implemented (got [%s|%s])",
-		url, title);
+	/* TODO: insert text or insert link */
+	pidgin_webview_insert_link(webview, url, title ? title : url);
 }
 
 static void
@@ -166,6 +167,8 @@ imgup_upload_start(PidginWebView *webvie
 	g_object_set_data_full(G_OBJECT(webview), "imgupload-hc",
 		hc, (GDestroyNotify)purple_http_conn_cancel);
 
+	/* TODO: please wait dialog */
+
 	return TRUE;
 }
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.