summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryvesf <yvesf@d0e8fea9-7529-0410-93fb-d39fd5b9c1dd>2009-05-28 20:58:08 +0000
committeryvesf <yvesf@d0e8fea9-7529-0410-93fb-d39fd5b9c1dd>2009-05-28 20:58:08 +0000
commitdc54b1d8fd41da0994db73389ff85187f69cbaf7 (patch)
tree7b12b39f1e1878dce63c1dac4f4bece95e0e1139
parentd75b28f04fe0e112c426a002e749abc6a34fb76c (diff)
downloadomegle-dc54b1d8fd41da0994db73389ff85187f69cbaf7.tar.gz
omegle-dc54b1d8fd41da0994db73389ff85187f69cbaf7.zip
blah
git-svn-id: http://xapek.org/svn/common/omegle@1035 d0e8fea9-7529-0410-93fb-d39fd5b9c1dd
-rw-r--r--gui.py29
1 files changed, 18 insertions, 11 deletions
diff --git a/gui.py b/gui.py
index 31c0efb..7f38b65 100644
--- a/gui.py
+++ b/gui.py
@@ -3,35 +3,42 @@ import urwid
class Conversation(object):
def __init__(self):
- self.column1_text = urwid.Text("Test...")
- self.column1_text.set_layout('left', 'clip')
self.column1_edit = urwid.Edit(caption="Send: ")
self.column1_check = urwid.CheckBox("Link to other",state=True)
- self.column1 = urwid.ListBox([self.column1_text, self.column1_edit, self.column1_check])
+ self.column1_disconnect = urwid.Button("Disconnect", lambda x: self.text.set_text("Disconnect"))
+ self.column1 = urwid.ListBox([
+ self.column1_edit,
+ self.column1_check,
+ urwid.AttrWrap(self.column1_disconnect,'button')])
- self.column2_text = urwid.Text("Test...")
- self.column2_text.set_layout('left', 'clip')
self.column2_edit = urwid.Edit(caption="Send: ")
self.column2_check = urwid.CheckBox("Link to other",state=True)
- self.column2 = urwid.ListBox([self.column2_text, self.column2_edit, self.column2_check])
+ self.column2_disconnect = urwid.Button("Disconnect", lambda x: self.text.set_text("Disconnect"))
+ self.column2 = urwid.ListBox([
+ self.column2_edit,
+ self.column2_check,
+ urwid.AttrWrap(self.column2_disconnect,'button')])
self.columns = urwid.Columns([self.column1, self.column2],box_columns=[0,1])
- self.body = urwid.Frame(self.columns)
+
+ self.text = urwid.Text("Bla bal asdasd")
+ self.body = urwid.ListBox([urwid.Text("bla"), self.columns])
self.widget_header = urwid.Text("F1 ... | ... | F8 - EXIT")
self.top = urwid.Frame(body=self.body, header=urwid.AttrWrap(self.widget_header,'header'))
- self.focus_ring = [ [(self.columns, self.column1), (self.column1, 1)],
- [(self.columns, self.column1), (self.column1, 2)],
- [(self.columns, self.column2), (self.column2, 1)],
- [(self.columns, self.column2), (self.column2, 2)]
+ self.focus_ring = [ [(self.body,1), (self.columns, self.column1), (self.column1, 1)],
+ [(self.body,1), (self.columns, self.column1), (self.column1, 2)],
+ [(self.body,1), (self.columns, self.column2), (self.column2, 1)],
+ [(self.body,1), (self.columns, self.column2), (self.column2, 2)],
]
def main(self):
self.ui = urwid.curses_display.Screen()
self.ui.register_palette([
('header', 'black', 'dark cyan', 'standout'),
+ ('button', 'white', 'dark blue', 'standout'),
# ('I say', 'default', 'default', 'bold'),
])
self.ui.run_wrapper( self.run )