[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
r6031 - trunk/gnue-forms/src/uidrivers/curses/widgets
From: |
reinhard |
Subject: |
r6031 - trunk/gnue-forms/src/uidrivers/curses/widgets |
Date: |
Thu, 22 Jul 2004 11:03:34 -0500 (CDT) |
Author: reinhard
Date: 2004-07-22 11:03:33 -0500 (Thu, 22 Jul 2004)
New Revision: 6031
Modified:
trunk/gnue-forms/src/uidrivers/curses/widgets/form.py
Log:
Nicer "messageBox" handling.
Modified: trunk/gnue-forms/src/uidrivers/curses/widgets/form.py
===================================================================
--- trunk/gnue-forms/src/uidrivers/curses/widgets/form.py 2004-07-22
15:39:57 UTC (rev 6030)
+++ trunk/gnue-forms/src/uidrivers/curses/widgets/form.py 2004-07-22
16:03:33 UTC (rev 6031)
@@ -19,7 +19,7 @@
# write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
-# $Id: $
+# $Id$
import curses
@@ -109,11 +109,20 @@
'Error': curses.color_pair (6) + curses.A_BOLD + curses.A_BLINK
}
+ yes = _("Yes")
+ no = _("No")
+ ok = _("Ok")
+
(y, x) = self.__window.getmaxyx ()
+
self.__window.addstr (y - 2, 1, message, attr [kind])
- yes = _("Yes")
- no = _("No")
+ if kind == 'Question':
+ self.__window.addstr (y - 1, 1, '(' + yes [:1] + ')' + yes [1:] + '/' + \
+ '(' + no [:1] + ')' + no [1:] + ' ? ')
+ else:
+ self.__window.addstr (y - 1, 1, '[' + ok + ']', attr [kind])
+ self.__window.move (y - 1, 2)
if kind == 'Question':
validKeys = {ord (yes [0]): True,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- r6031 - trunk/gnue-forms/src/uidrivers/curses/widgets,
reinhard <=