Fri, 25 May 2012 19:13:45 +0200
Did the second step in the enhanced VCS handling.
--- a/Project/Project.py Mon May 21 19:59:31 2012 +0200 +++ b/Project/Project.py Fri May 25 19:13:45 2012 +0200 @@ -1802,9 +1802,6 @@ return dlg = PropertiesDialog(self, True) - # TODO: add check box to dialog asking for a version controlled project - # option should be disabled, if no VCS is available - # create a separate function to determine availability of VCS systems if dlg.exec_() == QDialog.Accepted: self.closeProject() dlg.storeData()
--- a/Project/PropertiesDialog.py Mon May 21 19:59:31 2012 +0200 +++ b/Project/PropertiesDialog.py Fri May 25 19:13:45 2012 +0200 @@ -38,9 +38,6 @@ @param parent parent widget of this dialog (QWidget) @param name name of this dialog (string) """ - # TODO: add a checkbox to select if project should be version controlled - # only show the checkbox, if new is true - # disable checkbox, if no VCS is available super().__init__(parent) if name: self.setObjectName(name) @@ -118,6 +115,7 @@ self.vcsLabel.setText( self.trUtf8("The project is not version controlled.")) self.vcsInfoButton.hide() + self.vcsCheckBox.hide() else: self.languageComboBox.setCurrentIndex( self.languageComboBox.findText("Python3")) @@ -129,6 +127,8 @@ self.versionEdit.setText('0.1') self.vcsLabel.hide() self.vcsInfoButton.hide() + if not self.project.vcsSoftwareAvailable(): + self.vcsCheckBox.hide() @pyqtSlot() def on_dirButton_clicked(self): @@ -257,7 +257,7 @@ self.project.pdata["PROJECTTYPE"] = [projectType] self.project.pdata["EOL"] = [self.eolComboBox.currentIndex()] - # TODO: store state of VCS checkbox to self.project.vcsRequested + self.project.vcsRequested = self.vcsCheckBox.isChecked() if self.spellPropertiesDlg is not None: self.spellPropertiesDlg.storeData()
--- a/Project/PropertiesDialog.ui Mon May 21 19:59:31 2012 +0200 +++ b/Project/PropertiesDialog.ui Fri May 25 19:13:45 2012 +0200 @@ -7,7 +7,7 @@ <x>0</x> <y>0</y> <width>600</width> - <height>559</height> + <height>550</height> </rect> </property> <property name="maximumSize"> @@ -323,6 +323,16 @@ </layout> </item> <item> + <widget class="QCheckBox" name="vcsCheckBox"> + <property name="toolTip"> + <string>Select to create a version controlled project</string> + </property> + <property name="text"> + <string>Version Controlled Project</string> + </property> + </widget> + </item> + <item> <layout class="QHBoxLayout" name="_2"> <item> <widget class="QLabel" name="vcsLabel"> @@ -363,6 +373,9 @@ </widget> </item> </layout> + <zorder>buttonBox</zorder> + <zorder>vcsInfoButton</zorder> + <zorder>vcsCheckBox</zorder> </widget> <layoutdefault spacing="6" margin="6"/> <pixmapfunction>qPixmapFromMimeSource</pixmapfunction> @@ -382,6 +395,7 @@ <tabstop>authorEdit</tabstop> <tabstop>emailEdit</tabstop> <tabstop>descriptionEdit</tabstop> + <tabstop>vcsCheckBox</tabstop> <tabstop>vcsInfoButton</tabstop> <tabstop>buttonBox</tabstop> </tabstops>