eric6/WebBrowser/TabManager/TabManagerWidget.py

changeset 7533
88261c96484b
parent 7360
9190402e4505
child 7759
51aa6c6b66f7
equal deleted inserted replaced
7532:1358e9d67a1c 7533:88261c96484b
287 font.setBold(True) 287 font.setBold(True)
288 tabItem.setFont(0, font) 288 tabItem.setFont(0, font)
289 if not browser.isLoading(): 289 if not browser.isLoading():
290 tabItem.setIcon(0, browser.icon()) 290 tabItem.setIcon(0, browser.icon())
291 else: 291 else:
292 tabItem.setIcon(0, UI.PixmapCache.getIcon("loading.png")) 292 tabItem.setIcon(0, UI.PixmapCache.getIcon("loading"))
293 tabItem.setText(0, browser.title()) 293 tabItem.setText(0, browser.title())
294 tabItem.setToolTip(0, browser.title()) 294 tabItem.setToolTip(0, browser.title())
295 295
296 tabItem.setData(0, TabManagerWidget.WebBrowserRole, browser) 296 tabItem.setData(0, TabManagerWidget.WebBrowserRole, browser)
297 tabItem.setData(0, TabManagerWidget.WebWindowRole, mainWin) 297 tabItem.setData(0, TabManagerWidget.WebWindowRole, mainWin)
331 font.setBold(True) 331 font.setBold(True)
332 tabItem.setFont(0, font) 332 tabItem.setFont(0, font)
333 if not browser.isLoading(): 333 if not browser.isLoading():
334 tabItem.setIcon(0, browser.icon()) 334 tabItem.setIcon(0, browser.icon())
335 else: 335 else:
336 tabItem.setIcon(0, UI.PixmapCache.getIcon("loading.png")) 336 tabItem.setIcon(0, UI.PixmapCache.getIcon("loading"))
337 tabItem.setText(0, browser.title()) 337 tabItem.setText(0, browser.title())
338 tabItem.setToolTip(0, browser.title()) 338 tabItem.setToolTip(0, browser.title())
339 339
340 tabItem.setData(0, TabManagerWidget.WebBrowserRole, browser) 340 tabItem.setData(0, TabManagerWidget.WebBrowserRole, browser)
341 tabItem.setData(0, TabManagerWidget.WebWindowRole, mainWin) 341 tabItem.setData(0, TabManagerWidget.WebWindowRole, mainWin)
525 525
526 menu.addSeparator() 526 menu.addSeparator()
527 527
528 if self.__isBrowserSelected(): 528 if self.__isBrowserSelected():
529 act = menu.addAction( 529 act = menu.addAction(
530 UI.PixmapCache.getIcon("bookmark22.png"), 530 UI.PixmapCache.getIcon("bookmark22"),
531 self.tr("&Bookmark checked tabs")) 531 self.tr("&Bookmark checked tabs"))
532 act.setObjectName("bookmarkSelection") 532 act.setObjectName("bookmarkSelection")
533 act.triggered.connect(lambda: self.__processActions(act)) 533 act.triggered.connect(lambda: self.__processActions(act))
534 act = menu.addAction( 534 act = menu.addAction(
535 UI.PixmapCache.getIcon("tabClose.png"), 535 UI.PixmapCache.getIcon("tabClose"),
536 self.tr("&Close checked tabs")) 536 self.tr("&Close checked tabs"))
537 act.setObjectName("closeSelection") 537 act.setObjectName("closeSelection")
538 act.triggered.connect(lambda: self.__processActions(act)) 538 act.triggered.connect(lambda: self.__processActions(act))
539 539
540 menu.exec_(self.__tree.viewport().mapToGlobal(pos)) 540 menu.exec_(self.__tree.viewport().mapToGlobal(pos))
562 @return generated icon 562 @return generated icon
563 @rtype E5ClickableLabel 563 @rtype E5ClickableLabel
564 """ 564 """
565 icon = E5ClickableLabel() 565 icon = E5ClickableLabel()
566 icon.setPixmap( 566 icon.setPixmap(
567 UI.PixmapCache.getPixmap("tabManager.png").scaled(16, 16)) 567 UI.PixmapCache.getPixmap("tabManager").scaled(16, 16))
568 icon.setToolTip(self.tr("Show Tab Manager")) 568 icon.setToolTip(self.tr("Show Tab Manager"))
569 icon.clicked.connect(lambda: self.raiseTabManager(icon)) 569 icon.clicked.connect(lambda: self.raiseTabManager(icon))
570 570
571 return icon 571 return icon
572 572

eric ide

mercurial