aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorDanielle Madeley <danielle.madeley@collabora.co.uk>2011-06-21 21:00:07 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-12-22 17:46:18 +0800
commit81ad14a2dbcb5d71ed7befff0c7e2d7516a24dcd (patch)
treebd54887c1997252af5f54e57f70e0d4ef96a1f87 /libempathy-gtk
parent88df5753cb658269ef9609825cd494ac463e0d6d (diff)
downloadgsoc2013-empathy-81ad14a2dbcb5d71ed7befff0c7e2d7516a24dcd.tar
gsoc2013-empathy-81ad14a2dbcb5d71ed7befff0c7e2d7516a24dcd.tar.gz
gsoc2013-empathy-81ad14a2dbcb5d71ed7befff0c7e2d7516a24dcd.tar.bz2
gsoc2013-empathy-81ad14a2dbcb5d71ed7befff0c7e2d7516a24dcd.tar.lz
gsoc2013-empathy-81ad14a2dbcb5d71ed7befff0c7e2d7516a24dcd.tar.xz
gsoc2013-empathy-81ad14a2dbcb5d71ed7befff0c7e2d7516a24dcd.tar.zst
gsoc2013-empathy-81ad14a2dbcb5d71ed7befff0c7e2d7516a24dcd.zip
Add a close signal, emitted by both cancel and apply
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-account-widget.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-account-widget.c b/libempathy-gtk/empathy-account-widget.c
index be195fd8b..68a91c902 100644
--- a/libempathy-gtk/empathy-account-widget.c
+++ b/libempathy-gtk/empathy-account-widget.c
@@ -21,6 +21,7 @@
* Martyn Russell <martyn@imendio.com>
* Cosimo Cecchi <cosimo.cecchi@collabora.co.uk>
* Jonathan Tellier <jonathan.tellier@gmail.com>
+ * Danielle Madeley <danielle.madeley@collabora.co.uk>
*/
#include <config.h>
@@ -130,6 +131,7 @@ enum {
HANDLE_APPLY,
ACCOUNT_CREATED,
CANCELLED,
+ CLOSE,
LAST_SIGNAL
};
@@ -890,6 +892,7 @@ account_widget_cancel_clicked_cb (GtkWidget *button,
EmpathyAccountWidget *self)
{
g_signal_emit (self, signals[CANCELLED], 0);
+ g_signal_emit (self, signals[CLOSE], 0, GTK_RESPONSE_CANCEL);
}
static void
@@ -954,6 +957,7 @@ account_widget_applied_cb (GObject *source_object,
tp_account_set_enabled_async (account, TRUE,
account_widget_account_enabled_cb, widget);
g_signal_emit (widget, signals[ACCOUNT_CREATED], 0, account);
+ // FIXME: should we emit a signal here?
}
else
{
@@ -981,6 +985,9 @@ account_widget_applied_cb (GObject *source_object,
priv->contains_pending_changes = FALSE;
+ /* announce the widget can be closed */
+ g_signal_emit (widget, signals[CLOSE], 0, GTK_RESPONSE_APPLY);
+
/* unref the widget - part of the workaround */
g_object_unref (widget);
}
@@ -2376,6 +2383,13 @@ empathy_account_widget_class_init (EmpathyAccountWidgetClass *klass)
G_TYPE_NONE,
0);
+ signals[CLOSE] =
+ g_signal_new ("close", G_TYPE_FROM_CLASS (klass),
+ G_SIGNAL_RUN_LAST, 0, NULL, NULL,
+ g_cclosure_marshal_VOID__INT,
+ G_TYPE_NONE,
+ 1, G_TYPE_INT);
+
g_type_class_add_private (klass, sizeof (EmpathyAccountWidgetPriv));
}