[gtk+/gtk-2-24] gail: use connect_object() for connecting to GtkTextBuffer signals
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-2-24] gail: use connect_object() for connecting to GtkTextBuffer signals
- Date: Mon, 5 Nov 2012 02:22:51 +0000 (UTC)
commit c5421263e4347c94dd0481249e6ae30a9d7ebecb
Author: Michael Natterer <mitch gimp org>
Date: Mon Nov 5 03:19:50 2012 +0100
gail: use connect_object() for connecting to GtkTextBuffer signals
because the user_data is the GtkTextView. This used to crash when the
text view got destroyed, and the buffer was used for another view.
Fixes bug #652204.
modules/other/gail/gailtextview.c | 20 ++++++++++++--------
1 files changed, 12 insertions(+), 8 deletions(-)
---
diff --git a/modules/other/gail/gailtextview.c b/modules/other/gail/gailtextview.c
index 985cb40..9979305 100644
--- a/modules/other/gail/gailtextview.c
+++ b/modules/other/gail/gailtextview.c
@@ -227,14 +227,18 @@ setup_buffer (GtkTextView *view,
gail_text_util_buffer_setup (gail_view->textutil, buffer);
/* Set up signal callbacks */
- g_signal_connect_data (buffer, "insert-text",
- (GCallback) _gail_text_view_insert_text_cb, view, NULL, 0);
- g_signal_connect_data (buffer, "delete-range",
- (GCallback) _gail_text_view_delete_range_cb, view, NULL, 0);
- g_signal_connect_data (buffer, "mark-set",
- (GCallback) _gail_text_view_mark_set_cb, view, NULL, 0);
- g_signal_connect_data (buffer, "changed",
- (GCallback) _gail_text_view_changed_cb, view, NULL, 0);
+ g_signal_connect_object (buffer, "insert-text",
+ (GCallback) _gail_text_view_insert_text_cb,
+ view, 0);
+ g_signal_connect_object (buffer, "delete-range",
+ (GCallback) _gail_text_view_delete_range_cb,
+ view, 0);
+ g_signal_connect_object (buffer, "mark-set",
+ (GCallback) _gail_text_view_mark_set_cb,
+ view, 0);
+ g_signal_connect_object (buffer, "changed",
+ (GCallback) _gail_text_view_changed_cb,
+ view, 0);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]