|
1 # -*- coding: utf-8 -*- |
|
2 |
|
3 # Copyright (c) 2007 - 2022 Detlev Offenbach <detlev@die-offenbachs.de> |
|
4 # |
|
5 |
|
6 """ |
|
7 Module implementing the Subversion configuration page. |
|
8 """ |
|
9 |
|
10 from PyQt6.QtCore import pyqtSlot |
|
11 |
|
12 from Preferences.ConfigurationPages.ConfigurationPageBase import ( |
|
13 ConfigurationPageBase |
|
14 ) |
|
15 from .Ui_SubversionPage import Ui_SubversionPage |
|
16 |
|
17 |
|
18 class SubversionPage(ConfigurationPageBase, Ui_SubversionPage): |
|
19 """ |
|
20 Class implementing the Subversion configuration page. |
|
21 """ |
|
22 def __init__(self, plugin): |
|
23 """ |
|
24 Constructor |
|
25 |
|
26 @param plugin reference to the plugin object |
|
27 """ |
|
28 super().__init__() |
|
29 self.setupUi(self) |
|
30 self.setObjectName("SubversionPage") |
|
31 |
|
32 self.__plugin = plugin |
|
33 |
|
34 # set initial values |
|
35 self.logSpinBox.setValue(self.__plugin.getPreferences("LogLimit")) |
|
36 |
|
37 def save(self): |
|
38 """ |
|
39 Public slot to save the Subversion configuration. |
|
40 """ |
|
41 self.__plugin.setPreferences("LogLimit", self.logSpinBox.value()) |
|
42 |
|
43 @pyqtSlot() |
|
44 def on_configButton_clicked(self): |
|
45 """ |
|
46 Private slot to edit the Subversion config file. |
|
47 """ |
|
48 from QScintilla.MiniEditor import MiniEditor |
|
49 cfgFile = self.__plugin.getConfigPath() |
|
50 editor = MiniEditor(cfgFile, "Properties", self) |
|
51 editor.show() |
|
52 |
|
53 @pyqtSlot() |
|
54 def on_serversButton_clicked(self): |
|
55 """ |
|
56 Private slot to edit the Subversion servers file. |
|
57 """ |
|
58 from QScintilla.MiniEditor import MiniEditor |
|
59 serversFile = self.__plugin.getServersPath() |
|
60 editor = MiniEditor(serversFile, "Properties", self) |
|
61 editor.show() |