aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2008-11-22 00:24:17 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-11-22 00:24:17 +0800
commitff5f4865bfe8a51c3a515b8ba4a4c5a05f5e6aa2 (patch)
treefb1c85e370b1db7ecab5a3917141bbae836e60b0 /src
parentf139c32944d637b5c789dff6c1ccb1a9d267911d (diff)
downloadgsoc2013-empathy-ff5f4865bfe8a51c3a515b8ba4a4c5a05f5e6aa2.tar
gsoc2013-empathy-ff5f4865bfe8a51c3a515b8ba4a4c5a05f5e6aa2.tar.gz
gsoc2013-empathy-ff5f4865bfe8a51c3a515b8ba4a4c5a05f5e6aa2.tar.bz2
gsoc2013-empathy-ff5f4865bfe8a51c3a515b8ba4a4c5a05f5e6aa2.tar.lz
gsoc2013-empathy-ff5f4865bfe8a51c3a515b8ba4a4c5a05f5e6aa2.tar.xz
gsoc2013-empathy-ff5f4865bfe8a51c3a515b8ba4a4c5a05f5e6aa2.tar.zst
gsoc2013-empathy-ff5f4865bfe8a51c3a515b8ba4a4c5a05f5e6aa2.zip
There is no reason to remove the FT if it's cancelled while the window was hidden.
svn path=/trunk/; revision=1899
Diffstat (limited to 'src')
-rw-r--r--src/empathy-ft-manager.c41
1 files changed, 8 insertions, 33 deletions
diff --git a/src/empathy-ft-manager.c b/src/empathy-ft-manager.c
index 4314bc696..0873df361 100644
--- a/src/empathy-ft-manager.c
+++ b/src/empathy-ft-manager.c
@@ -509,43 +509,18 @@ ft_manager_state_changed_cb (EmpathyTpFile *tp_file,
GParamSpec *pspec,
EmpathyFTManager *ft_manager)
{
- gboolean remove;
-
- switch (empathy_tp_file_get_state (tp_file, NULL))
+ if (empathy_tp_file_get_state (tp_file, NULL) ==
+ EMP_FILE_TRANSFER_STATE_COMPLETED)
{
- case EMP_FILE_TRANSFER_STATE_COMPLETED:
- if (empathy_tp_file_is_incoming (tp_file))
- {
- GtkRecentManager *manager;
- const gchar *uri;
-
- manager = gtk_recent_manager_get_default ();
- uri = g_object_get_data (G_OBJECT (tp_file), "uri");
- gtk_recent_manager_add_item (manager, uri);
- }
-
- case EMP_FILE_TRANSFER_STATE_CANCELLED:
- /* Automatically remove file transfers if the
- * window if not visible. */
- /* FIXME how do the user know if the file transfer
- * failed? */
- remove = !GTK_WIDGET_VISIBLE (ft_manager->priv->window);
- break;
+ GtkRecentManager *manager;
+ const gchar *uri;
- default:
- remove = FALSE;
- break;
+ manager = gtk_recent_manager_get_default ();
+ uri = g_object_get_data (G_OBJECT (tp_file), "uri");
+ gtk_recent_manager_add_item (manager, uri);
}
- if (remove)
- {
- ft_manager_remove_file_from_list (ft_manager, tp_file);
- g_hash_table_remove (ft_manager->priv->tp_file_to_row_ref, tp_file);
- }
- else
- {
- ft_manager_update_ft_row (ft_manager, tp_file);
- }
+ ft_manager_update_ft_row (ft_manager, tp_file);
}
static void