def set_title_tab_title(self, widget): terminals = self.widgets['terminals'] scroll = terminals.get_nth_page(terminals.get_current_page()) label = terminals.get_tab_label(scroll) vte = scroll.get_child() vte.copy_clipboard() clipb = widget.get_clipboard(gtk.gdk.SELECTION_CLIPBOARD) text = clipb.wait_for_text() if len(text) > 20: text = text[0:17] + '...' label.set_title(text) self.set_window_title(text)
def do_set_title(self, widget): terminals = self.widgets['terminals'] scroll = terminals.get_nth_page(terminals.get_current_page()) vte = scroll.get_child() vte.copy_clipboard() clipb = widget.get_clipboard(gtk.gdk.SELECTION_CLIPBOARD) text = clipb.wait_for_text() if len(text) > 30: text = text[0:30] label = McmCheckbox(text) terminals.set_tab_label(scroll, label) self.set_window_title(text)
def do_copy(self, widget, var2=None, var3=None, var4=None): vte = self.get_current_terminal() vte.copy_clipboard() return True
def do_copy(self, widget, var2=None, var3=None, var4=None): terminals = self.widgets['terminals'] scroll = terminals.get_nth_page(terminals.get_current_page()) vte = scroll.get_child() vte.copy_clipboard() return True