11 |
11 |
12 from PyQt6.QtCore import QProcess, Qt, QSize |
12 from PyQt6.QtCore import QProcess, Qt, QSize |
13 from PyQt6.QtGui import QAction, QTextCursor, QBrush |
13 from PyQt6.QtGui import QAction, QTextCursor, QBrush |
14 from PyQt6.QtWidgets import QToolBar, QPlainTextEdit, QSpinBox, QComboBox |
14 from PyQt6.QtWidgets import QToolBar, QPlainTextEdit, QSpinBox, QComboBox |
15 |
15 |
16 from EricWidgets.EricApplication import ericApp |
16 from eric7.EricWidgets.EricApplication import ericApp |
17 from EricWidgets import EricMessageBox |
17 from eric7.EricWidgets import EricMessageBox |
18 from EricWidgets.EricMainWindow import EricMainWindow |
18 from eric7.EricWidgets.EricMainWindow import EricMainWindow |
19 |
19 |
20 import UI.PixmapCache |
20 from eric7.EricGui import EricPixmapCache |
21 import Preferences |
21 from eric7 import Preferences |
22 |
22 |
23 from .HgUtilities import getHgExecutable |
23 from .HgUtilities import getHgExecutable |
24 |
24 |
25 |
25 |
26 class HgServeDialog(EricMainWindow): |
26 class HgServeDialog(EricMainWindow): |
55 self.setWindowTitle(self.tr("Mercurial Server")) |
55 self.setWindowTitle(self.tr("Mercurial Server")) |
56 |
56 |
57 iconSuffix = "dark" if ericApp().usesDarkPalette() else "light" |
57 iconSuffix = "dark" if ericApp().usesDarkPalette() else "light" |
58 |
58 |
59 self.__startAct = QAction( |
59 self.__startAct = QAction( |
60 UI.PixmapCache.getIcon( |
60 EricPixmapCache.getIcon( |
61 os.path.join( |
61 os.path.join( |
62 "VcsPlugins", |
62 "VcsPlugins", |
63 "vcsMercurial", |
63 "vcsMercurial", |
64 "icons", |
64 "icons", |
65 "startServer-{0}.svg".format(iconSuffix), |
65 "startServer-{0}.svg".format(iconSuffix), |
68 self.tr("Start Server"), |
68 self.tr("Start Server"), |
69 self, |
69 self, |
70 ) |
70 ) |
71 self.__startAct.triggered.connect(self.__startServer) |
71 self.__startAct.triggered.connect(self.__startServer) |
72 self.__stopAct = QAction( |
72 self.__stopAct = QAction( |
73 UI.PixmapCache.getIcon( |
73 EricPixmapCache.getIcon( |
74 os.path.join( |
74 os.path.join( |
75 "VcsPlugins", |
75 "VcsPlugins", |
76 "vcsMercurial", |
76 "vcsMercurial", |
77 "icons", |
77 "icons", |
78 "stopServer-{0}.svg".format(iconSuffix), |
78 "stopServer-{0}.svg".format(iconSuffix), |
81 self.tr("Stop Server"), |
81 self.tr("Stop Server"), |
82 self, |
82 self, |
83 ) |
83 ) |
84 self.__stopAct.triggered.connect(self.__stopServer) |
84 self.__stopAct.triggered.connect(self.__stopServer) |
85 self.__browserAct = QAction( |
85 self.__browserAct = QAction( |
86 UI.PixmapCache.getIcon("home"), self.tr("Start Browser"), self |
86 EricPixmapCache.getIcon("home"), self.tr("Start Browser"), self |
87 ) |
87 ) |
88 self.__browserAct.triggered.connect(self.__startBrowser) |
88 self.__browserAct.triggered.connect(self.__startBrowser) |
89 |
89 |
90 self.__portSpin = QSpinBox(self) |
90 self.__portSpin = QSpinBox(self) |
91 self.__portSpin.setMinimum(2048) |
91 self.__portSpin.setMinimum(2048) |