示例#1
0
文件: boxes.py 项目: Stibbons/guake
 def on_rename(self, user_data):
     HidePrevention(self.get_toplevel()).prevent()
     dialog = RenameDialog(self.notebook.guake.window, self.label.get_text())
     r = dialog.run()
     if r == Gtk.ResponseType.ACCEPT:
         new_text = TabNameUtils.shorten(dialog.get_text(), self.notebook.guake.settings)
         page_num = self.notebook.find_tab_index_by_label(self)
         self.notebook.rename_page(page_num, new_text, True)
     dialog.destroy()
     HidePrevention(self.get_toplevel()).allow()
示例#2
0
文件: callbacks.py 项目: 0x29a/guake
 def on_rename_tab(self, *args):
     page_num = self.notebook.find_page_index_by_terminal(self.terminal)
     tab_text = self.notebook.get_tab_text_index(page_num)
     dialog = RenameDialog(self.window, tab_text)
     r = dialog.run()
     if r == Gtk.ResponseType.ACCEPT:
         new_text = TabNameUtils.shorten(dialog.get_text(), self.settings)
         self.notebook.rename_page(page_num, new_text, True)
     dialog.destroy()
示例#3
0
文件: boxes.py 项目: ncyrcus/guake
 def on_rename(self, user_data):
     HidePrevention(self.get_toplevel()).prevent()
     dialog = RenameDialog(self.notebook.guake.window, self.label.get_text())
     r = dialog.run()
     if r == Gtk.ResponseType.ACCEPT:
         new_text = TabNameUtils.shorten(dialog.get_text(), self.notebook.guake.settings)
         page_num = self.notebook.find_tab_index_by_label(self)
         self.notebook.rename_page(page_num, new_text, True)
     dialog.destroy()
     HidePrevention(self.get_toplevel()).allow()