After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 724281 - Statusbar displays removed message
Statusbar displays removed message
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks: 734603
 
 
Reported: 2014-02-13 11:45 UTC by Phillip Wood
Modified: 2014-08-14 17:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Statusbar: Remove matching messages before popping (2.42 KB, patch)
2014-02-13 11:46 UTC, Phillip Wood
committed Details | Review

Description Phillip Wood 2014-02-13 11:45:31 UTC
If the context ids of the top two messages are the same as the id to
be removed then gtk_statusbar_remove_all displays the second to top
message before it is removed and does not update the displayed message
when this message is removed so it is left displaying a message that
it shouldn't be. For example

/* Status bar empty */
gtk_statusbar_push (s, 0, "One");
/* Status bar displays "One" */
gtk_statusbar_push (s, 0, "Two");
/* Status bar displays "Two" */
gtk_statusbar_remove_all (s, 0);
/* Status bar displays "One" when it should be empty */"Two"
Comment 1 Phillip Wood 2014-02-13 11:46:22 UTC
Created attachment 268998 [details] [review]
Statusbar: Remove matching messages before popping

gtk_statusbar_remove_all was popping the top message if it's
context_id matched before removing other matching messages from the
stack. This meant that if the context_id of the second top message
matched it was displayed when the top message was popped and then
removed from the list of messages without updating the display. Fix
this by removing all the matching messages below the top one before
popping it if it matches.
Comment 2 Phillip Wood 2014-04-29 13:09:08 UTC
Any chance of a review? It's a simple bug with a simple fix so wouldn't take long.
Comment 3 Benjamin Otte (Company) 2014-08-14 17:54:07 UTC
Pushed the fix and a reftest to go with it. Thanks for the patch!

Attachment 268998 [details] pushed as e853007 - Statusbar: Remove matching messages before popping