Ejemplo n.º 1
0
 def _get_widget(self, conv):
     w = self._wstorage.setdefault(conv, conv_widget())
     if not hasattr(w, '_conv'):
         w._init(conv)
         connect_signal(w, 'modified', self._modified)
         connect_signal(w, 'keypress', self.keypress)
     return w
Ejemplo n.º 2
0
 def __init__(self, convobj):
     self.__size = None
     w = read_walker(convobj, self)
     connect_signal(w, 'yank', self.yank)
     self.__super.__init__(w)
     emit_signal(eband, 'frame_connect', self)
Ejemplo n.º 3
0
Archivo: cui.py Proyecto: dlobue/nara
def frame_con(w):
    connect_signal(w, 'modified', frame._invalidate)
Ejemplo n.º 4
0
Archivo: cui.py Proyecto: dlobue/nara
buffer_manager.register_support( qall, index_box)
buffer_manager.register_support(lines2, info_log)
buffer_manager.register_support(conv_container, read_box)

#listbox2 = buffer_manager.set_buffer(lines2)
listbox2 = buffer_manager.get_buffer(lines2)
#listbox = buffer_manager.get_buffer(qall)
listbox1 = buffer_manager.set_buffer(qall)

#buffer_manager.register_noremove(listbox)
#buffer_manager.register_noremove(listbox2)

def addLine(text):
    lines2.append(urwid.Text(text))
    listbox2.set_focus(len(lines2) - 1)

main = urwid.MainLoop(frame, palette, screen=urwid.curses_display.Screen(), handle_mouse=False)
#main = urwid.MainLoop(frame, palette, handle_mouse=False)

connect_signal(eband, 'log', addLine)
connect_signal(eband, 'redisplay', main.draw_screen)
connect_signal(eband, 'emergency', frame.exit)
connect_signal(eband, 'frame_connect', frame_con)


if __name__ == '__main__':
    main.run()
    #screen = Screen()
    #screen.main()