pidgin: 881232cf: Update the toolbar when the caret moves.

qulogic at pidgin.im qulogic at pidgin.im
Fri Jun 8 03:12:23 EDT 2012


----------------------------------------------------------------------
Revision: 881232cfad293c8791953716cb0f912a45c009e0
Parent:   1b1f16fa7a366753f87ab710ced6bcf4683a9480
Author:   qulogic at pidgin.im
Date:     06/08/12 01:22:19
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/881232cfad293c8791953716cb0f912a45c009e0

Changelog: 

Update the toolbar when the caret moves.

I'm not sure what that check was that I ended up removing, though.

Changes against parent 1b1f16fa7a366753f87ab710ced6bcf4683a9480

  patched  pidgin/gtkwebviewtoolbar.c

-------------- next part --------------
============================================================
--- pidgin/gtkwebviewtoolbar.c	b0bdca0ec76f6b7cfa4562e14810a809f7b3c1a4
+++ pidgin/gtkwebviewtoolbar.c	fcf1ea922fe132b3395e2306a0a5ee8aee508790
@@ -1126,17 +1126,11 @@ update_format_cb(GtkWebView *webview, Gt
 	update_buttons(toolbar);
 }
 
-#if 0
 static void
-mark_set_cb(GtkTextBuffer *buffer, GtkTextIter *location, GtkTextMark *mark,
-            GtkWebViewToolbar *toolbar)
+mark_set_cb(GtkWebView *webview, GtkWebViewToolbar *toolbar)
 {
-	if(mark != gtk_text_buffer_get_insert(buffer))
-		return;
-
 	update_buttons(toolbar);
 }
-#endif
 
 /* This comes from gtkmenutoolbutton.c from gtk+
  * Copyright (C) 2003 Ricardo Fernandez Pascual
@@ -1587,9 +1581,8 @@ gtk_webviewtoolbar_attach(GtkWebViewTool
 	                       G_CALLBACK(update_format_cb), toolbar);
 	g_signal_connect(G_OBJECT(webview), "format-updated",
 	                 G_CALLBACK(update_format_cb), toolbar);
-#if 0
-	g_signal_connect_after(G_OBJECT(GTK_WEBVIEW(webview)->text_buffer), "mark-set", G_CALLBACK(mark_set_cb), toolbar);
-#endif
+	g_signal_connect_after(G_OBJECT(webview), "selection-changed",
+	                       G_CALLBACK(mark_set_cb), toolbar);
 
 	buttons = gtk_webview_get_format_functions(GTK_WEBVIEW(webview));
 	update_buttons_cb(GTK_WEBVIEW(webview), buttons, toolbar);


More information about the Commits mailing list