286 tabs (HelpTabWidget |
286 tabs (HelpTabWidget |
287 """ |
287 """ |
288 E5ModelMenu.__init__(self, parent) |
288 E5ModelMenu.__init__(self, parent) |
289 |
289 |
290 self.__tabWidget = tabWidget |
290 self.__tabWidget = tabWidget |
|
291 self.__mw = parent |
291 |
292 |
292 self.__historyManager = None |
293 self.__historyManager = None |
293 self.__historyMenuModel = None |
294 self.__historyMenuModel = None |
294 self.__initialActions = [] |
295 self.__initialActions = [] |
295 self.__mostVisitedMenu = None |
296 self.__mostVisitedMenu = None |
369 act.setEnabled(self.__tabWidget.canRestoreClosedTab()) |
370 act.setEnabled(self.__tabWidget.canRestoreClosedTab()) |
370 self.addSeparator() |
371 self.addSeparator() |
371 |
372 |
372 act = self.addAction(UI.PixmapCache.getIcon("history.png"), |
373 act = self.addAction(UI.PixmapCache.getIcon("history.png"), |
373 self.tr("Show All History...")) |
374 self.tr("Show All History...")) |
374 act.triggered.connect(self.__showHistoryDialog) |
375 act.triggered.connect(self.showHistoryDialog) |
375 act = self.addAction(UI.PixmapCache.getIcon("historyClear.png"), |
376 act = self.addAction(UI.PixmapCache.getIcon("historyClear.png"), |
376 self.tr("Clear History...")) |
377 self.tr("Clear History...")) |
377 act.triggered.connect(self.__clearHistoryDialog) |
378 act.triggered.connect(self.__clearHistoryDialog) |
378 |
379 |
379 def setInitialActions(self, actions): |
380 def setInitialActions(self, actions): |
385 """ |
386 """ |
386 self.__initialActions = actions[:] |
387 self.__initialActions = actions[:] |
387 for act in self.__initialActions: |
388 for act in self.__initialActions: |
388 self.addAction(act) |
389 self.addAction(act) |
389 |
390 |
390 def __showHistoryDialog(self): |
391 def showHistoryDialog(self): |
391 """ |
392 """ |
392 Private slot to show the history dialog. |
393 Public slot to show the history dialog. |
393 """ |
394 """ |
394 from .HistoryDialog import HistoryDialog |
395 from .HistoryDialog import HistoryDialog |
395 dlg = HistoryDialog(self) |
396 dlg = HistoryDialog(self.__mw) |
396 dlg.openUrl.connect(self.openUrl) |
397 dlg.openUrl.connect(self.openUrl) |
397 dlg.newTab.connect(self.newTab) |
398 dlg.newTab.connect(self.newTab) |
398 dlg.newBackgroundTab.connect(self.newBackgroundTab) |
399 dlg.newBackgroundTab.connect(self.newBackgroundTab) |
399 dlg.newWindow.connect(self.newWindow) |
400 dlg.newWindow.connect(self.newWindow) |
400 dlg.newPrivateWindow.connect(self.newPrivateWindow) |
401 dlg.newPrivateWindow.connect(self.newPrivateWindow) |