eric6/WebBrowser/Download/DownloadManager.py

changeset 7533
88261c96484b
parent 7360
9190402e4505
child 7628
f904d0eef264
equal deleted inserted replaced
7532:1358e9d67a1c 7533:88261c96484b
104 if selectedRowsCount == 1: 104 if selectedRowsCount == 1:
105 row = self.downloadsView.selectionModel().selectedRows()[0].row() 105 row = self.downloadsView.selectionModel().selectedRows()[0].row()
106 itm = self.__downloads[row] 106 itm = self.__downloads[row]
107 if itm.downloadedSuccessfully(): 107 if itm.downloadedSuccessfully():
108 menu.addAction( 108 menu.addAction(
109 UI.PixmapCache.getIcon("open.png"), 109 UI.PixmapCache.getIcon("open"),
110 self.tr("Open"), self.__contextMenuOpen) 110 self.tr("Open"), self.__contextMenuOpen)
111 elif itm.downloading(): 111 elif itm.downloading():
112 menu.addAction( 112 menu.addAction(
113 UI.PixmapCache.getIcon("stopLoading.png"), 113 UI.PixmapCache.getIcon("stopLoading"),
114 self.tr("Cancel"), self.__contextMenuCancel) 114 self.tr("Cancel"), self.__contextMenuCancel)
115 menu.addSeparator() 115 menu.addSeparator()
116 menu.addAction( 116 menu.addAction(
117 self.tr("Open Containing Folder"), 117 self.tr("Open Containing Folder"),
118 self.__contextMenuOpenFolder) 118 self.__contextMenuOpenFolder)
497 if self.activeDownloadsCount() == 0: 497 if self.activeDownloadsCount() == 0:
498 # all active downloads are done 498 # all active downloads are done
499 if success and e5App().activeWindow() is not self: 499 if success and e5App().activeWindow() is not self:
500 if WebBrowserWindow.notificationsEnabled(): 500 if WebBrowserWindow.notificationsEnabled():
501 WebBrowserWindow.showNotification( 501 WebBrowserWindow.showNotification(
502 UI.PixmapCache.getPixmap("downloads48.png"), 502 UI.PixmapCache.getPixmap("downloads48"),
503 self.tr("Downloads finished"), 503 self.tr("Downloads finished"),
504 self.tr("All files have been downloaded.") 504 self.tr("All files have been downloaded.")
505 ) 505 )
506 if not Preferences.getWebBrowser("DownloadManagerAutoClose"): 506 if not Preferences.getWebBrowser("DownloadManagerAutoClose"):
507 self.raise_() 507 self.raise_()

eric ide

mercurial