def _bind_views(self): self.languageview = contentbook.contentbook('Current File') self.contentview = contentbook.contentbook('Quick View') self.editorview = contentbook.Contentholder(show_tabs=False) self.bookview = contentbook.Contentholder() self.externalview = window.external_book() self.pluginview = contentbook.contentbook('Plugins') self.__viewbooks = {'content': self.contentview, 'view': self.bookview, 'plugin': self.pluginview, 'edit': self.editorview, 'ext': self.externalview, 'languages': self.languageview} self.bufferview = self.get_service('buffermanager').create_single_view() self.menubar = self.__uim.get_toplevels(gtk.UI_MANAGER_MENUBAR)[0] self.toolbar = self.__uim.get_toplevels(gtk.UI_MANAGER_TOOLBAR)[0]
def _bind_views(self): self.languageview = contentbook.contentbook('Current File') self.contentview = contentbook.contentbook('Quick View') self.editorview = contentbook.Contentholder(show_tabs=False) self.bookview = contentbook.Contentholder() self.externalview = window.external_book() self.pluginview = contentbook.contentbook('Plugins') self.__viewbooks = { 'content': self.contentview, 'view': self.bookview, 'plugin': self.pluginview, 'edit': self.editorview, 'ext': self.externalview, 'languages': self.languageview } self.bufferview = self.get_service( 'buffermanager').create_single_view() self.menubar = self.__uim.get_toplevels(gtk.UI_MANAGER_MENUBAR)[0] self.toolbar = self.__uim.get_toplevels(gtk.UI_MANAGER_TOOLBAR)[0]
def _pack_window(self): """Populate the window.""" bufferview = self.get_service('buffermanager').single_view pluginview = contentbook.contentbook('Plugins') for service in self.boss.services: if service.plugin_view_type is not None: pluginview.append_page(service.plugin_view) self.__uim.ensure_update() menubar = self.__uim.get_toplevels(gtk.UI_MANAGER_MENUBAR)[0] self.toolbar = self.__uim.get_toplevels(gtk.UI_MANAGER_TOOLBAR)[0] self.__window.drag_dest_set(gtk.DEST_DEFAULT_ALL, [('text/uri-list', 0, 0)], gtk.gdk.ACTION_COPY) self.__window.pack(menubar, self.toolbar, bufferview, pluginview)