Skip to content

Commit 36d9eeb

Browse files
committed
Added timeouts to statusbar events, to be made configurable (duration)
1 parent b3a722e commit 36d9eeb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

bpython/gtk_.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,12 @@ def __init__(self):
143143
self.context_id = self.get_context_id('Statusbar')
144144

145145
def message(self, s, n=3):
146+
self.clear()
146147
self.push(self.context_id, s)
148+
gobject.timeout_add(n*1000, self.clear)
149+
150+
def clear(self):
151+
self.pop(self.context_id)
147152

148153

149154
class SuggestionWindow(gtk.Window):
@@ -303,7 +308,6 @@ def file_prompt(self, s):
303308

304309
def notify(self, s, n=10):
305310
self.statusbar.message(s)
306-
307311

308312
class ReplWidget(gtk.TextView, repl.Repl):
309313
__gsignals__ = dict(button_press_event=None,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy