[gspell/wip/entry: 2/2] Entry: simplify signal connections
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gspell/wip/entry: 2/2] Entry: simplify signal connections
- Date: Fri, 28 Oct 2016 16:08:44 +0000 (UTC)
commit 7483c80330f9732b5fffa9e2c2445fb9738348cf
Author: Sébastien Wilmet <swilmet gnome org>
Date: Fri Oct 28 18:05:07 2016 +0200
Entry: simplify signal connections
gspell_entry is destroyed when gtk_entry is destroyed. gtk_entry cannot
send signals after gspell_entry is destroyed.
gspell/gspell-entry.c | 20 +++++++++-----------
1 files changed, 9 insertions(+), 11 deletions(-)
---
diff --git a/gspell/gspell-entry.c b/gspell/gspell-entry.c
index 2d30af9..06d3e73 100644
--- a/gspell/gspell-entry.c
+++ b/gspell/gspell-entry.c
@@ -196,17 +196,15 @@ set_entry (GspellEntry *gspell_entry,
g_assert (gspell_entry->entry == NULL);
gspell_entry->entry = gtk_entry;
- g_signal_connect_object (gtk_entry,
- "changed",
- G_CALLBACK (changed_before_cb),
- gspell_entry,
- 0);
-
- g_signal_connect_object (gtk_entry,
- "changed",
- G_CALLBACK (changed_after_cb),
- gspell_entry,
- G_CONNECT_AFTER);
+ g_signal_connect (gtk_entry,
+ "changed",
+ G_CALLBACK (changed_before_cb),
+ gspell_entry);
+
+ g_signal_connect_after (gtk_entry,
+ "changed",
+ G_CALLBACK (changed_after_cb),
+ gspell_entry);
g_assert (gspell_entry->notify_attributes_handler_id == 0);
gspell_entry->notify_attributes_handler_id =
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]