[gtranslator] message-table: Fix tab signal connection
- From: Daniel Garcia Moreno <danigm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtranslator] message-table: Fix tab signal connection
- Date: Thu, 13 Sep 2018 16:41:09 +0000 (UTC)
commit 0028689ffb58edccdc02b88fae67c2132d9e7569
Author: Daniel GarcĂa Moreno <danigm wadobo com>
Date: Thu Sep 13 15:06:31 2018 +0200
message-table: Fix tab signal connection
src/gtr-message-table.c | 17 +++++------------
1 file changed, 5 insertions(+), 12 deletions(-)
---
diff --git a/src/gtr-message-table.c b/src/gtr-message-table.c
index 0b597f76..98b87f8c 100644
--- a/src/gtr-message-table.c
+++ b/src/gtr-message-table.c
@@ -260,6 +260,10 @@ gtr_message_table_set_property (GObject *object,
{
case PROP_TAB:
priv->tab = GTR_TAB (g_value_get_object (value));
+ g_signal_connect (priv->tab,
+ "showed-message", G_CALLBACK (showed_message_cb), table);
+ g_signal_connect (priv->tab,
+ "message-changed", G_CALLBACK (message_changed_cb), table);
break;
default:
@@ -327,18 +331,7 @@ gtr_message_table_class_init (GtrMessageTableClass * klass)
GtkWidget *
gtr_message_table_new (void)
{
- GtrMessageTable *obj =
- GTR_MESSAGE_TABLE (g_object_new (GTR_TYPE_MESSAGE_TABLE, NULL));
- GtrMessageTablePrivate *priv;
-
- priv = gtr_message_table_get_instance_private (obj);
-
- g_signal_connect (priv->tab,
- "showed-message", G_CALLBACK (showed_message_cb), obj);
- g_signal_connect (priv->tab,
- "message-changed", G_CALLBACK (message_changed_cb), obj);
-
- return GTK_WIDGET (obj);
+ return GTK_WIDGET (g_object_new (GTR_TYPE_MESSAGE_TABLE, NULL));
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]