169 self.tabContextCloseOthersAct = self.__tabContextMenu.addAction( |
169 self.tabContextCloseOthersAct = self.__tabContextMenu.addAction( |
170 UI.PixmapCache.getIcon("tabCloseOther.png"), |
170 UI.PixmapCache.getIcon("tabCloseOther.png"), |
171 self.tr("Close Others"), self.__tabContextMenuCloseOthers) |
171 self.tr("Close Others"), self.__tabContextMenuCloseOthers) |
172 self.__tabContextMenu.addAction( |
172 self.__tabContextMenu.addAction( |
173 self.tr('Close All'), self.closeAllBrowsers) |
173 self.tr('Close All'), self.closeAllBrowsers) |
|
174 # TODO: Print |
174 ## self.__tabContextMenu.addSeparator() |
175 ## self.__tabContextMenu.addSeparator() |
175 ## self.__tabContextMenu.addAction( |
176 ## self.__tabContextMenu.addAction( |
176 ## UI.PixmapCache.getIcon("printPreview.png"), |
177 ## UI.PixmapCache.getIcon("printPreview.png"), |
177 ## self.tr('Print Preview'), self.__tabContextMenuPrintPreview) |
178 ## self.tr('Print Preview'), self.__tabContextMenuPrintPreview) |
178 ## self.__tabContextMenu.addAction( |
179 ## self.__tabContextMenu.addAction( |
268 index = self.__tabContextMenuIndex |
269 index = self.__tabContextMenuIndex |
269 for i in list(range(self.count() - 1, index, -1)) + \ |
270 for i in list(range(self.count() - 1, index, -1)) + \ |
270 list(range(index - 1, -1, -1)): |
271 list(range(index - 1, -1, -1)): |
271 self.closeBrowserAt(i) |
272 self.closeBrowserAt(i) |
272 |
273 |
|
274 # TODO: Print |
273 ## def __tabContextMenuPrint(self): |
275 ## def __tabContextMenuPrint(self): |
274 ## """ |
276 ## """ |
275 ## Private method to print the selected tab. |
277 ## Private method to print the selected tab. |
276 ## """ |
278 ## """ |
277 ## browser = self.widget(self.__tabContextMenuIndex) |
279 ## browser = self.widget(self.__tabContextMenuIndex) |
524 li = [] |
526 li = [] |
525 for index in range(self.count()): |
527 for index in range(self.count()): |
526 li.append(self.widget(index)) |
528 li.append(self.widget(index)) |
527 return li |
529 return li |
528 |
530 |
|
531 # TODO: Print |
529 ## @pyqtSlot() |
532 ## @pyqtSlot() |
530 ## def printBrowser(self, browser=None): |
533 ## def printBrowser(self, browser=None): |
531 ## """ |
534 ## """ |
532 ## Public slot called to print the displayed page. |
535 ## Public slot called to print the displayed page. |
533 ## |
536 ## |
534 ## @param browser reference to the browser to be printed (WebBrowserView) |
537 ## @param browser reference to the browser to be printed (WebBrowserView) |
535 ## """ |
538 ## """ |
536 ## if browser is None: |
539 ## if browser is None: |
537 ## browser = self.currentBrowser() |
540 ## browser = self.currentBrowser() |
538 ## |
541 ## |
|
542 ## browser.page().runJavaScript("window.print()") |
539 ## self.__printRequested(browser.page().mainFrame()) |
543 ## self.__printRequested(browser.page().mainFrame()) |
540 ## |
544 ## |
541 ## def __printRequested(self, frame): |
545 ## def __printRequested(self, frame): |
542 ## """ |
546 ## """ |
543 ## Private slot to handle a print request. |
547 ## Private slot to handle a print request. |