[geary/wip/trash-714212] Fix trash/delete button toggle logic
- From: Charles Lindsay <clindsay src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/wip/trash-714212] Fix trash/delete button toggle logic
- Date: Sat, 21 Dec 2013 00:07:24 +0000 (UTC)
commit c21893d8ed48baf7342cd212c243a57e6d3ad8f2
Author: Charles Lindsay <chaz yorba org>
Date: Fri Dec 20 15:59:52 2013 -0800
Fix trash/delete button toggle logic
src/client/application/geary-controller.vala | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/src/client/application/geary-controller.vala b/src/client/application/geary-controller.vala
index b3cecd6..dc5d4d8 100644
--- a/src/client/application/geary-controller.vala
+++ b/src/client/application/geary-controller.vala
@@ -928,7 +928,8 @@ public class GearyController : Geary.BaseObject {
// by other utility methods
private void update_ui() {
update_tooltips();
- main_window.main_toolbar.update_trash_buttons(current_folder_supports_trash(),
+ main_window.main_toolbar.update_trash_buttons(
+ current_folder_supports_trash() || !(current_folder is Geary.FolderSupport.Remove),
current_account.can_support_archive());
}
@@ -1304,7 +1305,8 @@ public class GearyController : Geary.BaseObject {
}
private void on_shift_key(bool pressed) {
- main_window.main_toolbar.update_trash_buttons(!pressed && current_folder_supports_trash(),
+ main_window.main_toolbar.update_trash_buttons(
+ (!pressed && current_folder_supports_trash()) || !(current_folder is Geary.FolderSupport.Remove),
current_account.can_support_archive());
}
@@ -1914,8 +1916,7 @@ public class GearyController : Geary.BaseObject {
Geary.FolderPath? trash_path;
Geary.FolderSupport.Move? supports_move;
- // TODO: prompt instead for deleting outright when not supported.
- if (current_folder_supports_trash(out supports_move, out trash_path))
+ if (!current_folder_supports_trash(out supports_move, out trash_path))
debug("Folder %s doesn't support move or account %s doesn't have a trash folder",
current_folder.to_string(), current_account.to_string());
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]