eric6/Plugins/VcsPlugins/vcsMercurial/HgServeDialog.py

changeset 7493
1696e91a5393
parent 7360
9190402e4505
child 7502
426f64d419f0
equal deleted inserted replaced
7492:39e3ed0bc0c6 7493:1696e91a5393
32 def __init__(self, vcs, path, parent=None): 32 def __init__(self, vcs, path, parent=None):
33 """ 33 """
34 Constructor 34 Constructor
35 35
36 @param vcs reference to the vcs object 36 @param vcs reference to the vcs object
37 @param path path of the repository to serve (string) 37 @type Hg
38 @param path path of the repository to serve
39 @type str
38 @param parent reference to the parent widget (QWidget) 40 @param parent reference to the parent widget (QWidget)
39 """ 41 """
40 super(HgServeDialog, self).__init__(parent) 42 super(HgServeDialog, self).__init__(parent)
41 43
42 self.vcs = vcs 44 self.vcs = vcs
43 self.__repoPath = path 45 self.__repoPath = path
44 46
45 self.__styles = ["paper", "coal", "gitweb", "monoblue", "spartan", ] 47 self.__styles = ["paper", "coal", "gitweb", "monoblue", "spartan", ]
46 48
47 self.setWindowTitle(self.tr("Mercurial Server")) 49 self.setWindowTitle(self.tr("Mercurial Server"))
50
51 if e5App().usesDarkPalette():
52 iconSuffix = "dark"
53 else:
54 iconSuffix = "light"
48 55
49 self.__startAct = QAction( 56 self.__startAct = QAction(
50 UI.PixmapCache.getIcon( 57 UI.PixmapCache.getIcon(
51 os.path.join("VcsPlugins", "vcsMercurial", "icons", 58 os.path.join("VcsPlugins", "vcsMercurial", "icons",
52 "startServer.png")), 59 "startServer-{0}.svg".format(iconSuffix))),
53 self.tr("Start Server"), self) 60 self.tr("Start Server"), self)
54 self.__startAct.triggered.connect(self.__startServer) 61 self.__startAct.triggered.connect(self.__startServer)
55 self.__stopAct = QAction( 62 self.__stopAct = QAction(
56 UI.PixmapCache.getIcon( 63 UI.PixmapCache.getIcon(
57 os.path.join("VcsPlugins", "vcsMercurial", "icons", 64 os.path.join("VcsPlugins", "vcsMercurial", "icons",
58 "stopServer.png")), 65 "stopServer-{0}.svg".format(iconSuffix))),
59 self.tr("Stop Server"), self) 66 self.tr("Stop Server"), self)
60 self.__stopAct.triggered.connect(self.__stopServer) 67 self.__stopAct.triggered.connect(self.__stopServer)
61 self.__browserAct = QAction( 68 self.__browserAct = QAction(
62 UI.PixmapCache.getIcon("home.png"), 69 UI.PixmapCache.getIcon("home.png"),
63 self.tr("Start Browser"), self) 70 self.tr("Start Browser"), self)

eric ide

mercurial