[gimp] Bug 765326 - Status bar progress messages aren't always updated
- From: N/A <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Bug 765326 - Status bar progress messages aren't always updated
- Date: Sun, 8 May 2016 22:38:00 +0000 (UTC)
commit 48c20389517d16c36e8a26814e6ee6cc6f395995
Author: Ell <ell_se yahoo com>
Date: Wed Apr 20 08:48:17 2016 +0000
Bug 765326 - Status bar progress messages aren't always updated
Keep GimpStatusbar progress messages at the front of the list.
Previously, gimp_statusbar_push() and friends would push progress
messages behind temporary messages, and would push normal messages,
added after a progress had started, in front of progress messages.
This resulted in the progress bar text not being updated if a
temporary message was active at the time the progress started, or
if a normal message was pushed after the progress started.
This commit fixes this by always keeping progress messages at the
front of the message list.
app/display/gimpstatusbar.c | 30 +++++++++++++-----------------
1 files changed, 13 insertions(+), 17 deletions(-)
---
diff --git a/app/display/gimpstatusbar.c b/app/display/gimpstatusbar.c
index 538ed97..28f2dd1 100644
--- a/app/display/gimpstatusbar.c
+++ b/app/display/gimpstatusbar.c
@@ -701,19 +701,7 @@ gimp_statusbar_update (GimpStatusbar *statusbar)
GimpStatusbarMsg *msg = NULL;
if (statusbar->messages)
- {
- msg = statusbar->messages->data;
-
- /* only allow progress messages while the progress is active */
- if (statusbar->progress_active)
- {
- guint context_id = gimp_statusbar_get_context_id (statusbar,
- "progress");
-
- if (context_id != msg->context_id)
- return;
- }
- }
+ msg = statusbar->messages->data;
if (msg && msg->text)
{
@@ -1503,10 +1491,18 @@ gimp_statusbar_add_message (GimpStatusbar *statusbar,
/* find the position at which to insert the new message */
position = 0;
- /* temporary messages are in front of all other messages */
- if (statusbar->temp_timeout_id &&
- context_id != statusbar->temp_context_id)
- position++;
+ /* progress messages are always at the front of the list */
+ if (! (statusbar->progress_active &&
+ context_id == gimp_statusbar_get_context_id (statusbar, "progress")))
+ {
+ if (statusbar->progress_active)
+ position++;
+
+ /* temporary messages are in front of all other non-progress messages */
+ if (statusbar->temp_timeout_id &&
+ context_id != statusbar->temp_context_id)
+ position++;
+ }
statusbar->messages = g_slist_insert (statusbar->messages, msg, position);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]