[Xfce4-commits] <postler:master> Tweak Progress signal and connect action sensitivity
Christian Dywan
noreply at xfce.org
Wed Dec 15 11:22:01 CET 2010
Updating branch refs/heads/master
to d9d339e0d44cffa103d3aed0234663d4d6b3d9f5 (commit)
from 8df8611a1d2bd7d51068ff531aa6c963c42fd76d (commit)
commit d9d339e0d44cffa103d3aed0234663d4d6b3d9f5
Author: Christian Dywan <christian at twotoasts.de>
Date: Tue Dec 14 23:42:18 2010 +0100
Tweak Progress signal and connect action sensitivity
Indicating progress right away feels more responsive even
if connecting to the server takes a while, and making the
ReceiveMail action/ button insensitive increases feedback.
postler/postler-bureau.vala | 14 ++++++++++----
postler/postler-service.vala | 4 ++--
2 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/postler/postler-bureau.vala b/postler/postler-bureau.vala
index d2efb55..8fa3b66 100644
--- a/postler/postler-bureau.vala
+++ b/postler/postler-bureau.vala
@@ -543,11 +543,17 @@ public class Postler.Bureau : Gtk.Window {
if (text != null) {
statuslabel.label = text;
progressbar.fraction = fraction;
- statuslabel.show ();
- progressbar.show ();
+ if (!statuslabel.visible) {
+ statuslabel.show ();
+ progressbar.show ();
+ actions.get_action ("MailReceive").sensitive = false;
+ }
} else {
- statuslabel.hide ();
- progressbar.hide ();
+ if (statuslabel.visible) {
+ statuslabel.hide ();
+ progressbar.hide ();
+ actions.get_action ("MailReceive").sensitive = true;
+ }
}
});
diff --git a/postler/postler-service.vala b/postler/postler-service.vala
index d3c70d4..882028b 100644
--- a/postler/postler-service.vala
+++ b/postler/postler-service.vala
@@ -66,6 +66,7 @@ namespace Postler {
bool mbsync_done (IOChannel gio, IOCondition condition) {
GLib.debug ("Done: %d new messages", unread);
+ progress ("", 0.0);
if (unread > 0) {
Postler.App.send_notification (ngettext ("You have %d message",
"You have %d new messages", unread).printf (unread));
@@ -96,8 +97,6 @@ namespace Postler {
var tmp = msg.replace ("Selecting master ", "");
folder = tmp.replace ("...", "");
}
- } else {
- progress ("", 0.0);
}
}
@@ -127,6 +126,7 @@ namespace Postler {
try {
string command = accounts.get_receive_command (info);
execute_command_with_status (command, mbsync_input);
+ progress (_("Retrieving..."), 0.0);
} catch (Error error) {
return false;
}
More information about the Xfce4-commits
mailing list