aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-ft-manager.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-04-07 19:11:23 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-04-07 19:11:23 +0800
commit53138664c59afe454c5d3ade01ae9c9a1d87193b (patch)
treef5c54900f7f36bd46171c6616817a2f9cc8d9d38 /src/empathy-ft-manager.c
parente02b5b2a9d3ae6cc0a27cb17b0969898d978d021 (diff)
downloadgsoc2013-empathy-53138664c59afe454c5d3ade01ae9c9a1d87193b.tar
gsoc2013-empathy-53138664c59afe454c5d3ade01ae9c9a1d87193b.tar.gz
gsoc2013-empathy-53138664c59afe454c5d3ade01ae9c9a1d87193b.tar.bz2
gsoc2013-empathy-53138664c59afe454c5d3ade01ae9c9a1d87193b.tar.lz
gsoc2013-empathy-53138664c59afe454c5d3ade01ae9c9a1d87193b.tar.xz
gsoc2013-empathy-53138664c59afe454c5d3ade01ae9c9a1d87193b.tar.zst
gsoc2013-empathy-53138664c59afe454c5d3ade01ae9c9a1d87193b.zip
factor out close_window()
Diffstat (limited to 'src/empathy-ft-manager.c')
-rw-r--r--src/empathy-ft-manager.c38
1 files changed, 22 insertions, 16 deletions
diff --git a/src/empathy-ft-manager.c b/src/empathy-ft-manager.c
index abe7975c4..3ef95db4a 100644
--- a/src/empathy-ft-manager.c
+++ b/src/empathy-ft-manager.c
@@ -868,6 +868,27 @@ ft_manager_stop (EmpathyFTManager *manager)
g_object_unref (handler);
}
+static gboolean
+close_window (EmpathyFTManager *manager)
+{
+ EmpathyFTManagerPriv *priv = GET_PRIV (manager);
+
+ DEBUG ("%p", manager);
+
+ /* remove all the completed/cancelled/errored transfers */
+ ft_manager_clear (manager);
+
+ if (g_hash_table_size (priv->ft_handler_to_row_ref) > 0)
+ {
+ /* There is still FTs on flight, just hide the window */
+ DEBUG ("Hiding window");
+ gtk_widget_hide (priv->window);
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
static void
ft_manager_response_cb (GtkWidget *widget,
gint response,
@@ -898,22 +919,7 @@ ft_manager_delete_event_cb (GtkWidget *widget,
GdkEvent *event,
EmpathyFTManager *manager)
{
- EmpathyFTManagerPriv *priv = GET_PRIV (manager);
-
- DEBUG ("%p", manager);
-
- /* remove all the completed/cancelled/errored transfers */
- ft_manager_clear (manager);
-
- if (g_hash_table_size (priv->ft_handler_to_row_ref) > 0)
- {
- /* There is still FTs on flight, just hide the window */
- DEBUG ("Hiding window");
- gtk_widget_hide (widget);
- return TRUE;
- }
-
- return FALSE;
+ return close_window (manager);
}
static void