diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-04-07 19:11:30 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-04-07 20:07:20 +0800 |
commit | ceb451e3260ee114562f9f31324d1cd2206ba971 (patch) | |
tree | 3793724e67d052b7b8055df9d94b2f3f163a23a5 /src | |
parent | 53138664c59afe454c5d3ade01ae9c9a1d87193b (diff) | |
download | gsoc2013-empathy-ceb451e3260ee114562f9f31324d1cd2206ba971.tar gsoc2013-empathy-ceb451e3260ee114562f9f31324d1cd2206ba971.tar.gz gsoc2013-empathy-ceb451e3260ee114562f9f31324d1cd2206ba971.tar.bz2 gsoc2013-empathy-ceb451e3260ee114562f9f31324d1cd2206ba971.tar.lz gsoc2013-empathy-ceb451e3260ee114562f9f31324d1cd2206ba971.tar.xz gsoc2013-empathy-ceb451e3260ee114562f9f31324d1cd2206ba971.tar.zst gsoc2013-empathy-ceb451e3260ee114562f9f31324d1cd2206ba971.zip |
ft-manager: add a 'Close' button (#646084)
Diffstat (limited to 'src')
-rw-r--r-- | src/empathy-ft-manager.c | 9 | ||||
-rw-r--r-- | src/empathy-ft-manager.ui | 13 |
2 files changed, 21 insertions, 1 deletions
diff --git a/src/empathy-ft-manager.c b/src/empathy-ft-manager.c index 3ef95db4a..edb470cbb 100644 --- a/src/empathy-ft-manager.c +++ b/src/empathy-ft-manager.c @@ -71,7 +71,8 @@ enum { RESPONSE_OPEN = 1, RESPONSE_STOP = 2, - RESPONSE_CLEAR = 3 + RESPONSE_CLEAR = 3, + RESPONSE_CLOSE = 4 }; G_DEFINE_TYPE (EmpathyFTManager, empathy_ft_manager, G_TYPE_OBJECT); @@ -894,6 +895,8 @@ ft_manager_response_cb (GtkWidget *widget, gint response, EmpathyFTManager *manager) { + EmpathyFTManagerPriv *priv = GET_PRIV (manager); + switch (response) { case RESPONSE_CLEAR: @@ -905,6 +908,10 @@ ft_manager_response_cb (GtkWidget *widget, case RESPONSE_STOP: ft_manager_stop (manager); break; + case RESPONSE_CLOSE: + if (!close_window (manager)) + gtk_widget_destroy (priv->window); + break; case GTK_RESPONSE_NONE: case GTK_RESPONSE_DELETE_EVENT: /* Do nothing */ diff --git a/src/empathy-ft-manager.ui b/src/empathy-ft-manager.ui index c21e56bd9..803d010bc 100644 --- a/src/empathy-ft-manager.ui +++ b/src/empathy-ft-manager.ui @@ -73,6 +73,18 @@ <property name="position">2</property> </packing> </child> + <child> + <object class="GtkButton" id="close_button"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="can_default">True</property> + <property name="label">gtk-close</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="position">3</property> + </packing> + </child> </object> <packing> <property name="expand">False</property> @@ -85,6 +97,7 @@ <action-widget response="3">clear_button</action-widget> <action-widget response="1">open_button</action-widget> <action-widget response="2">abort_button</action-widget> + <action-widget response="4">close_button</action-widget> </action-widgets> </object> </interface> |