Bugfix: focus lost after sending a message; fix GTK+2 compile.
authorTomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
Fri, 17 Aug 2012 16:53:00 +0200
changesete3155594ea98 pushlog
parent 7b12c4d2c6d7
child 481258ec30de
child 65e581a04a06
Bugfix: focus lost after sending a message; fix GTK+2 compile.
pidgin/gtkconv.c
pidgin/plugins/themeedit.c
     1.1 --- a/pidgin/gtkconv.c
     1.2 +++ b/pidgin/gtkconv.c
     1.3 @@ -339,7 +339,11 @@
     1.4  conversation_entry_clear(PidginConversation *gtkconv)
     1.5  {
     1.6  	GtkWebView *webview = GTK_WEBVIEW(gtkconv->entry);
     1.7 -	gtk_webview_load_html_string(webview, "");
     1.8 +
     1.9 +	//XXX: hotfix for not focused entry after sending a message
    1.10 +	//gtk_webview_load_html_string(webview, "");
    1.11 +	gtk_webview_load_html_string_with_selection(webview, "<div id='caret'></div>");
    1.12 +
    1.13  #if 0
    1.14  	/* TODO WebKit */
    1.15  	gtk_source_undo_manager_begin_not_undoable_action(webview->undo_manager);
    1.16 @@ -706,6 +710,7 @@
    1.17  
    1.18  	conversation_entry_clear(gtkconv);
    1.19  	gtkconv_set_unseen(gtkconv, PIDGIN_UNSEEN_NONE);
    1.20 +	gtk_widget_grab_focus(gtkconv->entry); // XXX: doesn't work
    1.21  }
    1.22  
    1.23  static void
     2.1 --- a/pidgin/plugins/themeedit.c
     2.2 +++ b/pidgin/plugins/themeedit.c
     2.3 @@ -22,6 +22,8 @@
     2.4  #include "pidgin.h"
     2.5  #include "version.h"
     2.6  
     2.7 +#include "gtk3compat.h"
     2.8 +
     2.9  #include "theme-manager.h"
    2.10  
    2.11  #include "gtkblist.h"