empathy r1899 - trunk/src
- From: xclaesse svn gnome org
- To: svn-commits-list gnome org
- Subject: empathy r1899 - trunk/src
- Date: Fri, 21 Nov 2008 16:24:17 +0000 (UTC)
Author: xclaesse
Date: Fri Nov 21 16:24:17 2008
New Revision: 1899
URL: http://svn.gnome.org/viewvc/empathy?rev=1899&view=rev
Log:
There is no reason to remove the FT if it's cancelled while the window was hidden.
Modified:
trunk/src/empathy-ft-manager.c
Modified: trunk/src/empathy-ft-manager.c
==============================================================================
--- trunk/src/empathy-ft-manager.c (original)
+++ trunk/src/empathy-ft-manager.c Fri Nov 21 16:24:17 2008
@@ -509,43 +509,18 @@
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]