public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Aaron Merey <amerey@redhat.com>
To: Patrick Monnerat <patrick@monnerat.net>
Cc: Patrick Monnerat via Gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH] gdb/debuginfod: Improve progress updates
Date: Thu, 13 Jan 2022 13:09:14 -0500	[thread overview]
Message-ID: <CAJDtP-Q+0PU=wtTduwU0dFQhxUTu8nN0j0d11o=5C5Rj3kOWaA@mail.gmail.com> (raw)
In-Reply-To: <27a35f00-d7eb-1d60-1869-7063caffd495@monnerat.net>

On Wed, Jan 12, 2022 at 6:35 PM Patrick Monnerat via Gdb-patches
<gdb-patches@sourceware.org> wrote:
> Currently, I have a graphical throbber triggered by calls to ui_out
> do_progress_notify() method. The message is displayed in the status bar,
> not in the throbber/progressbar widget.
>
> The widget occupied by the progressbar/throbber is also used to display
> some other kind of information while not downloading.
>
> I rely on calls to ui_out methods do_progress_start(),
> do_progress_notify() and do_progress_end() to multiplex this zone.

To keep the UI simple, for each download there is a line printed
indicating the name and type of file being downloaded as well as
the size, if available. If the size is unknown then the throbber is
displayed at the end of this line. If the size is known then the
progress bar is printed on the following line.

Do you think it would be better to print the throbber on its own line?

> In do_progress_notify(), I check if the argument is negative to know if
> I must deal with a progress bar or a throbber.

I do basically the same thing by checking total > 0. If <= 0 then the
transfer size is unknown, so we display the throbber in that case.

Thanks,
Aaron


  reply	other threads:[~2022-01-13 18:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-12  2:54 Aaron Merey
2022-01-12  3:27 ` Patrick Monnerat
2022-01-12 22:20   ` Aaron Merey
2022-01-12 23:35     ` Patrick Monnerat
2022-01-13 18:09       ` Aaron Merey [this message]
2022-01-13 19:46         ` Patrick Monnerat
2022-01-13 21:27     ` Tom Tromey
2022-01-13 23:11       ` Patrick Monnerat

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJDtP-Q+0PU=wtTduwU0dFQhxUTu8nN0j0d11o=5C5Rj3kOWaA@mail.gmail.com' \
    --to=amerey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=patrick@monnerat.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).