From 413b5aac0bf0ff1bf22a18c0d5d157212497d051 Mon Sep 17 00:00:00 2001 From: jgoerzen Date: Thu, 25 Jul 2002 06:37:54 +0100 Subject: [PATCH] /offlineimap/head: changeset 192 Removed the old Log menu code; no longer necessary. --- offlineimap/head/debian/changelog | 8 ++++++- offlineimap/head/offlineimap/ui/Tk.py | 31 ++++++--------------------- 2 files changed, 14 insertions(+), 25 deletions(-) diff --git a/offlineimap/head/debian/changelog b/offlineimap/head/debian/changelog index 278cf29..54bba1f 100644 --- a/offlineimap/head/debian/changelog +++ b/offlineimap/head/debian/changelog @@ -6,7 +6,13 @@ offlineimap (3.2.1) unstable; urgency=low * Blinkenlights UI log window is now scrolled and has a new config file option "bufferlines" to specify the size of the scroll buffer. - * Make the Blinkenlights window non-resizable. + * The Blinkenlights window is now non-resizable when the log is disabled. + When the log is enabled, the window is resizable, and the changes in + size are reflected in the log widget. Therefore, the Bigger Log + and Smaller Log items can disappear, and the Log menu now becomes + a Show Log or a Hide Log menu option. No sub-menus necessary anymore. + This presents a much cleaner feel, more intuitive operation, and + faster navigation. -- John Goerzen Wed, 24 Jul 2002 17:04:04 -0500 diff --git a/offlineimap/head/offlineimap/ui/Tk.py b/offlineimap/head/offlineimap/ui/Tk.py index 5155372..ddcf1b2 100644 --- a/offlineimap/head/offlineimap/ui/Tk.py +++ b/offlineimap/head/offlineimap/ui/Tk.py @@ -401,50 +401,33 @@ class Blinkenlights(VerboseUI): s.gettf().setcolor('red') s._msg(version.banner) s.text.see(END) + #s.top.minsize(s.top.winfo_reqwidth(), + # s.top.winfo_reqheight() + s.menubar.winfo_reqheight()) if s.config.has_option("ui.Tk.Blinkenlights", "showlog") and \ s.config.getboolean("ui.Tk.Blinkenlights", "showlog"): s._togglelog() - def _largerlog(s): - s.loglines += 1 - s.text.configure(height = s.loglines) - - def _smallerlog(s): - if s.loglines >= 2: - s.loglines -= 1 - s.text.configure(height = s.loglines) - def _togglelog(s): + print "togglelog" if s.textenabled: s.oldtextheight = s.text.winfo_height() s.text.pack_forget() s.textenabled = 0 - s.menubar.delete('Log') - s.menubar.insert_command('Exit', label = 'Show Log', - command = s._togglelog) + s.menubar.entryconfig('Hide Log', label = 'Show Log') s.top.update() s.top.geometry("%dx%d" % (s.top.winfo_reqwidth(), s.top.winfo_reqheight())) s.top.update() s.top.resizable(width = 0, height = 0) + s.top.update() - else: + else: s.text.pack(side = BOTTOM, expand = 1, fill = BOTH) s.textenabled = 1 s.top.update() s.top.geometry("%dx%d" % (s.top.winfo_reqwidth(), s.top.winfo_height() + s.oldtextheight)) - s.menubar.delete('Show Log') - - logmenu = Menu(s.menubar, tearoff = 0, - activebackground = "#000030", - background = "#000030", foreground = "blue", - activeforeground = "white", - font = ("Helvetica", 8)) - logmenu.add_command(label = "Hide Log", command = s._togglelog) - logmenu.add_command(label = "Larger Log", command = s._largerlog) - logmenu.add_command(label = "Smaller Log", command = s._smallerlog) - s.menubar.insert_cascade('Exit', label = "Log", menu = logmenu) + s.menubar.entryconfig('Show Log', label = 'Hide Log') s._rescroll() s.top.resizable(width = 1, height = 1)