def __spawn_terminal(self, fd, buf): # Undo terminal mode changes from sys_builtin.py import termios attrs = termios.tcgetattr(fd) # If you change this, be sure to update sys_builtin.py attrs[1] = attrs[1] | (termios.OPOST) termios.tcsetattr(fd, termios.TCSANOW, attrs) buf = buf.replace('\n', '\r\n') from hotwire_ui.shell import locate_current_window title = 'Terminal' # FIXME hotwin = locate_current_window(self.__text) from hotwire.sysdep.term import Terminal term = Terminal.getInstance().get_terminal_widget_ptyfd(None, fd, title, initbuf=buf) hotwin.new_win_widget(term, title) self._buf.insert_markup('\n\n<b>(%s)</b>' % (_('Entered Terminal Compatibility Mode'),))
def __on_new_window_activated(self, menu, path): _logger.debug("got new window for %s", path) from hotwire_ui.shell import locate_current_window hwin = locate_current_window(self._table) hwin.new_win_hotwire(initcwd=path, initcmd='ls')
def __launch_inspector(self, o): from hotwire_ui.oinspect import InspectWindow from hotwire_ui.shell import locate_current_window w = InspectWindow(o, parent=locate_current_window(self._table)) w.show_all()
def handle_inspector(text2): from hotwire_ui.shell import locate_current_window inspect = InspectWindow(o, parent=locate_current_window(self.get_widget())) inspect.show_all()