self.statusbar.push(self.context_id, current_path)
gtk.main_iteration()
- def _new_page(self, child, title):
- """Create new notebook page with search output."""
- pages = self.nb.notebook.get_n_pages()
- self.nb.new_tab(child, title)
- child.show_all()
- self.nb.notebook.set_current_page(pages)
-
def run(self):
pass
def show_out_toplevel(self, outtype, results):
print 'Entering <' + outtype['name'] + '> output mode...'
out_submodule = __import__('files.' + outtype['name'], None, None, outtype)
-
self.out_toplevel = out_submodule.Gtk_Presentation(results).toplevel
-
- self._new_page(self.out_toplevel, outtype['label'])
+ self.nb.new_tab(self.out_toplevel, outtype['label'])
### out_submodule.Gtk_Presentation().show_results(results)
#==============================================================================
#==============================================================================
class NotebookWCloseBtns(object):
- """gtk.Notebook widget with close buttons."""
+ """gtk.Notebook widget with close buttons. Automatically show_all added
+ child and switch to new page."""
def __init__(self):
import gtk
self.notebook = gtk.Notebook()
def new_tab(self, child, title, noclose=False):
+ pages = self.notebook.get_n_pages()
self.notebook.append_page(child)
+ child.show_all()
label = self.create_tab_label(child, title, noclose)
label.show_all()
self.notebook.set_tab_label(child, label)
-
- pages = self.notebook.get_n_pages()
self.notebook.set_current_page(pages)
def create_tab_label(self, child, title, noclose):