Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions pyface/ui/qt4/action/status_bar_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from pyface.qt import QtGui


from traits.api import Any, Bool, HasTraits, List, Property, Str
from traits.api import Any, Bool, HasTraits, Int, List, Property, Str


class StatusBarManager(HasTraits):
Expand All @@ -38,6 +38,9 @@ class StatusBarManager(HasTraits):
# Whether the status bar is visible.
visible = Bool(True)

# Number of millisecond to display new messages for [default: indefinitely]
message_duration = Int

# ------------------------------------------------------------------------
# 'StatusBarManager' interface.
# ------------------------------------------------------------------------
Expand Down Expand Up @@ -126,4 +129,5 @@ def _show_messages(self):
# decide to put all but the first message into separate widgets. We
# probably also need to extend the API to allow a "message" to be a
# widget - depends on what wx is capable of.
self.status_bar.showMessage(" ".join(self.messages))
self.status_bar.showMessage(" ".join(self.messages),
msecs=self.message_duration)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think duration in seconds would be better. That is what pyface.timer uses.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed.