aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/empathy-ft-manager.c9
-rw-r--r--src/empathy-ft-manager.ui13
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>