/pidgin/main: e3155594ea98: Bugfix: focus lost after sending a m...

Tomasz Wasilczyk tomkiewicz at cpw.pidgin.im
Fri Aug 17 10:53:08 EDT 2012


Changeset: e3155594ea980e5611ef0e8567d76bb96e07d49c
Author:	 Tomasz Wasilczyk <tomkiewicz at cpw.pidgin.im>
Date:	 2012-08-17 16:53 +0200
Branch:	 default
URL: http://hg.pidgin.im/pidgin/main/rev/e3155594ea98

Description:

Bugfix: focus lost after sending a message; fix GTK+2 compile.

diffstat:

 pidgin/gtkconv.c           |  7 ++++++-
 pidgin/plugins/themeedit.c |  2 ++
 2 files changed, 8 insertions(+), 1 deletions(-)

diffs (36 lines):

diff --git a/pidgin/gtkconv.c b/pidgin/gtkconv.c
--- a/pidgin/gtkconv.c
+++ b/pidgin/gtkconv.c
@@ -339,7 +339,11 @@ static void
 conversation_entry_clear(PidginConversation *gtkconv)
 {
 	GtkWebView *webview = GTK_WEBVIEW(gtkconv->entry);
-	gtk_webview_load_html_string(webview, "");
+
+	//XXX: hotfix for not focused entry after sending a message
+	//gtk_webview_load_html_string(webview, "");
+	gtk_webview_load_html_string_with_selection(webview, "<div id='caret'></div>");
+
 #if 0
 	/* TODO WebKit */
 	gtk_source_undo_manager_begin_not_undoable_action(webview->undo_manager);
@@ -706,6 +710,7 @@ send_cb(GtkWidget *widget, PidginConvers
 
 	conversation_entry_clear(gtkconv);
 	gtkconv_set_unseen(gtkconv, PIDGIN_UNSEEN_NONE);
+	gtk_widget_grab_focus(gtkconv->entry); // XXX: doesn't work
 }
 
 static void
diff --git a/pidgin/plugins/themeedit.c b/pidgin/plugins/themeedit.c
--- a/pidgin/plugins/themeedit.c
+++ b/pidgin/plugins/themeedit.c
@@ -22,6 +22,8 @@
 #include "pidgin.h"
 #include "version.h"
 
+#include "gtk3compat.h"
+
 #include "theme-manager.h"
 
 #include "gtkblist.h"



More information about the Commits mailing list