def __on_drag_data_received(self, tv, context, x, y, selection, info, etime): model = tv.get_model() sel_data = selection.data from hotwire_ui.shell import locate_current_shell hw = locate_current_shell(self._table) hw.do_copy_url_drag_to_dir(sel_data, self.context.get_cwd())
def __on_show_command(self, overview, cmd): _logger.debug("showing command %s", cmd) target = None for child in self.__cmd_notebook.get_children(): if child.cmd_header.get_pipeline() == cmd.get_pipeline(): target = child break if target: pgnum = self.__cmd_notebook.page_num(target) self.__cmd_notebook.set_current_page(pgnum) self.__action_group.get_action("Overview").activate() from hotwire_ui.shell import locate_current_shell hw = locate_current_shell(self) hw.grab_focus()
def open_output(self, do_prev=False, dry_run=False): nth = self.__cmd_notebook.get_current_page() n_pages = self.__cmd_notebook.get_n_pages() _logger.debug("histmode: %s do_prev: %s nth: %s n_pages: %s", self.__history_visible, do_prev, nth, n_pages) if do_prev and nth > 0: target_nth = nth - 1 elif (not do_prev) and nth < n_pages-1: target_nth = nth + 1 else: return False if dry_run: return True self.__cmd_notebook.set_current_page(target_nth) from hotwire_ui.shell import locate_current_shell hw = locate_current_shell(self) hw.grab_focus()
def __on_copypath_activated(self, menu, path): _logger.debug("got copypath for %s", path) from hotwire_ui.shell import locate_current_shell hw = locate_current_shell(self._table) hw.append_text(path)
def __on_row_activated(self, tv, path, vc): iter = self._model.get_iter(path) self._onclick_iter(iter) from hotwire_ui.shell import locate_current_shell hw = locate_current_shell(self._table) hw.grab_focus()