diff options
author | xclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4> | 2008-11-22 00:20:57 +0800 |
---|---|---|
committer | xclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4> | 2008-11-22 00:20:57 +0800 |
commit | efb043e67b7b355218837bf3fde92255ca1a4c02 (patch) | |
tree | 3f90d87aaf6da6aad49211d0b4c388db8e5316a8 /libempathy-gtk/empathy-ft-manager.c | |
parent | a33d377d43197e7401cf69e286147601f22f70c0 (diff) | |
download | gsoc2013-empathy-efb043e67b7b355218837bf3fde92255ca1a4c02.tar gsoc2013-empathy-efb043e67b7b355218837bf3fde92255ca1a4c02.tar.gz gsoc2013-empathy-efb043e67b7b355218837bf3fde92255ca1a4c02.tar.bz2 gsoc2013-empathy-efb043e67b7b355218837bf3fde92255ca1a4c02.tar.lz gsoc2013-empathy-efb043e67b7b355218837bf3fde92255ca1a4c02.tar.xz gsoc2013-empathy-efb043e67b7b355218837bf3fde92255ca1a4c02.tar.zst gsoc2013-empathy-efb043e67b7b355218837bf3fde92255ca1a4c02.zip |
Implement latest ft draft
git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@1849 4ee84921-47dd-4033-b63a-18d7a039a3e4
Diffstat (limited to 'libempathy-gtk/empathy-ft-manager.c')
-rw-r--r-- | libempathy-gtk/empathy-ft-manager.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/libempathy-gtk/empathy-ft-manager.c b/libempathy-gtk/empathy-ft-manager.c index 9064a518d..e9b8bd510 100644 --- a/libempathy-gtk/empathy-ft-manager.c +++ b/libempathy-gtk/empathy-ft-manager.c @@ -245,6 +245,7 @@ ft_manager_update_ft_row (EmpathyFTManager *ft_manager, gint percent; EmpFileTransferState state; EmpFileTransferStateChangeReason reason; + gboolean incoming; row_ref = ft_manager_get_row_from_tp_file (ft_manager, tp_file); g_return_if_fail (row_ref != NULL); @@ -255,15 +256,14 @@ ft_manager_update_ft_row (EmpathyFTManager *ft_manager, total_size = empathy_tp_file_get_size (tp_file); state = empathy_tp_file_get_state (tp_file); reason = empathy_tp_file_get_state_change_reason (tp_file); + incoming = empathy_tp_file_get_incoming (tp_file); switch (state) { - case EMP_FILE_TRANSFER_STATE_LOCAL_PENDING: - case EMP_FILE_TRANSFER_STATE_REMOTE_PENDING: + case EMP_FILE_TRANSFER_STATE_PENDING: case EMP_FILE_TRANSFER_STATE_OPEN: case EMP_FILE_TRANSFER_STATE_ACCEPTED: - case EMP_FILE_TRANSFER_STATE_NOT_OFFERED: - if (empathy_tp_file_get_incoming (tp_file)) + if (incoming) /* translators: first %s is filename, second %s is the contact name */ first_line_format = _("Receiving \"%s\" from %s"); else @@ -273,8 +273,8 @@ ft_manager_update_ft_row (EmpathyFTManager *ft_manager, first_line = g_strdup_printf (first_line_format, filename, contact_name); if (state == EMP_FILE_TRANSFER_STATE_OPEN - || state == EMP_FILE_TRANSFER_STATE_ACCEPTED - || state == EMP_FILE_TRANSFER_STATE_LOCAL_PENDING) + || (incoming && state == EMP_FILE_TRANSFER_STATE_ACCEPTED) + || (incoming && state == EMP_FILE_TRANSFER_STATE_PENDING)) { gchar *total_size_str; gchar *transferred_bytes_str; @@ -297,8 +297,6 @@ ft_manager_update_ft_row (EmpathyFTManager *ft_manager, g_free (total_size_str); } - else if (state == EMP_FILE_TRANSFER_STATE_NOT_OFFERED) - second_line = g_strdup (_("File not yet offered")); else second_line = g_strdup (_("Waiting the other participant's response")); @@ -952,7 +950,8 @@ empathy_ft_manager_add_tp_file (EmpathyFTManager *ft_manager, state = empathy_tp_file_get_state (tp_file); - if (state == EMP_FILE_TRANSFER_STATE_LOCAL_PENDING) + if (state == EMP_FILE_TRANSFER_STATE_PENDING && + empathy_tp_file_get_incoming (tp_file)) ft_manager_display_accept_dialog (ft_manager, tp_file); else ft_manager_add_tp_file_to_list (ft_manager, tp_file); |