[Xfce4-commits] <postler:master> Swap progress bar and label and make it single-line

Christian Dywan noreply at xfce.org
Sun Jul 3 21:04:02 CEST 2011


Updating branch refs/heads/master
         to 504ebf02ae31f0d155f35360cd3b03d330c44b64 (commit)
       from a9e626d5bd333d60b7143707c597d940dcd7ebca (commit)

commit 504ebf02ae31f0d155f35360cd3b03d330c44b64
Author: Christian Dywan <christian at twotoasts.de>
Date:   Sun Jul 3 16:26:27 2011 +0200

    Swap progress bar and label and make it single-line

 postler/postler-bureau.vala  |    6 +++---
 postler/postler-service.vala |   10 ++++++----
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/postler/postler-bureau.vala b/postler/postler-bureau.vala
index 84187d7..5b10358 100644
--- a/postler/postler-bureau.vala
+++ b/postler/postler-bureau.vala
@@ -622,12 +622,12 @@ public class Postler.Bureau : Gtk.Window {
         statusitem.add (align);
         var statusbox = new Gtk.VBox (false, 4);
         align.add (statusbox);
-        statuslabel = new Gtk.Label ("");
+        progressbar = new Gtk.ProgressBar ();
+        statusbox.pack_end (progressbar, false, false, 0);
+        statuslabel = new Gtk.Label (null);
         statuslabel.justify = Gtk.Justification.CENTER;
         statuslabel.ellipsize = Pango.EllipsizeMode.END;
         statusbox.pack_end (statuslabel, false, false, 0);
-        progressbar = new Gtk.ProgressBar ();
-        statusbox.pack_end (progressbar, false, false, 0);
         statusitem.show_all ();
         align.set_no_show_all (true);
         align.hide ();
diff --git a/postler/postler-service.vala b/postler/postler-service.vala
index bb0713d..71dbd8d 100644
--- a/postler/postler-service.vala
+++ b/postler/postler-service.vala
@@ -365,17 +365,19 @@ namespace Postler {
             else if (msg.contains ("slave: ")) {
                 string[] pieces = msg.split (" ");
                 total = total - pieces[1].to_double ();
-                if (helper.folder == "INBOX") {
+                if (helper.folder == "INBOX")
                     helper.folder = _("Inbox");
-                }
             }
             else if (msg.contains ("S: ?")) {
                 double count = (((msg.split ("/"))[2]).split (" ") [0]).to_double ();
                 if (helper.folder.contains ("/"))
                     helper.folder = helper.folder.split ("/") [1];
+                if (helper.folder == "INBOX")
+                    helper.folder = _("Inbox");
+                else
+                    helper.folder = Postler.Folders.decode_foldername (helper.folder);
                 string state = _("Receiving %d of %d").printf ((int)count, (int)total);
-                helper.folder = Postler.Folders.decode_foldername (helper.folder);
-                progress (helper.display_name, helper.folder + "\n" + state,
+                progress (helper.display_name, state + " " + helper.folder,
                           total > count ? count / total : 0);
             }
             else if (!(msg.contains ("Synchronizing")) ) {



More information about the Xfce4-commits mailing list