[DEVELOPMENT ENVIRONMENT]

* NEW: The project property dialog tries its best to automatically check 
  dependencies when a component is selected. Dependencies automatically
  added but not explicitely checked by the user are displayed with a gray 
  check mark instead of a black one.


git-svn-id: svn://localhost/gambas/trunk@3287 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
Benoît Minisini 2010-11-08 18:06:52 +00:00
parent 453236f17f
commit 03692503ef
5 changed files with 177 additions and 91 deletions

View file

@ -134,7 +134,7 @@ msgstr ""
msgid "Image routines from the Imlib2 library"
msgstr ""
#: CComponent.class:105 FPropertyProject.class:2063
#: CComponent.class:105 FPropertyProject.class:2099
msgid "Image loading and saving"
msgstr ""
@ -242,15 +242,15 @@ msgstr ""
msgid "Web applications tools"
msgstr ""
#: CComponent.class:137 FPropertyProject.class:2051
#: CComponent.class:137 FPropertyProject.class:2087
msgid "Graphical form management"
msgstr ""
#: CComponent.class:138 FPropertyProject.class:2057
#: CComponent.class:138 FPropertyProject.class:2093
msgid "Event loop management"
msgstr ""
#: CComponent.class:140 FPropertyProject.class:2069
#: CComponent.class:140 FPropertyProject.class:2105
msgid "OpenGL display"
msgstr ""
@ -258,31 +258,31 @@ msgstr ""
msgid "Loading information on component &1..."
msgstr ""
#: CComponentBox.class:97
#: CComponentBox.class:100
msgid "Experimental"
msgstr ""
#: CComponentBox.class:99 FPropertyProject.class:1804
#: CComponentBox.class:102 FPropertyProject.class:1840
msgid "Not finished but stable"
msgstr ""
#: CComponentBox.class:205 ProjectItem.class:68
#: CComponentBox.class:224 ProjectItem.class:68
msgid "Authors"
msgstr ""
#: CComponentBox.class:212 FPropertyProject.class:2031
#: CComponentBox.class:231 FPropertyProject.class:2067
msgid "Requires"
msgstr ""
#: CComponentBox.class:214
#: CComponentBox.class:233
msgid "Excludes"
msgstr ""
#: CComponentBox.class:220
#: CComponentBox.class:239
msgid "Implements"
msgstr ""
#: CComponentBox.class:233 LibraryItem.class:58
#: CComponentBox.class:252 LibraryItem.class:58
msgid "Provides"
msgstr ""
@ -478,7 +478,7 @@ msgstr ""
#: FImportTable.class:39 FList.class:155 FMain.class:193
#: FMakeInstall.class:318 FMenu.class:1202 FNewConnection.class:317
#: FNewTable.class:165 FNewTranslation.class:70 FOpenProject.class:502
#: FOption.class:600 FPasteSpecial.class:279 FPropertyProject.class:1017
#: FOption.class:600 FPasteSpecial.class:279 FPropertyProject.class:1053
#: FReportBorderChooser.class:207 FReportCoordChooser.class:114
#: FSave.class:118 FSaveProjectAs.class:130 FSelectExtraFile.class:78
#: FSelectIcon.class:273 FSnippet.class:142 FTableChooser.class:144
@ -503,7 +503,7 @@ msgstr ""
msgid "Project commit"
msgstr ""
#: FCommit.class:195 FMakeInstall.class:1299 FPropertyProject.class:1585
#: FCommit.class:195 FMakeInstall.class:1299 FPropertyProject.class:1621
msgid "Description"
msgstr ""
@ -946,7 +946,7 @@ msgid "Style sheet"
msgstr ""
#: FCreateFile.class:791 FCreateProject.class:535 FImportTable.class:526
#: FPropertyProject.class:1607
#: FPropertyProject.class:1643
msgid "Options"
msgstr ""
@ -1096,7 +1096,7 @@ msgstr ""
msgid "Identification"
msgstr ""
#: FCreateProject.class:647 FPropertyProject.class:1574
#: FCreateProject.class:647 FPropertyProject.class:1610
msgid "Title"
msgstr ""
@ -1203,7 +1203,7 @@ msgstr ""
msgid "Add expression"
msgstr ""
#: FDebugInfo.class:1231 FMakeInstall.class:1599 FPropertyProject.class:2109
#: FDebugInfo.class:1231 FMakeInstall.class:1599 FPropertyProject.class:2145
msgid "&Add"
msgstr ""
@ -1212,7 +1212,7 @@ msgid "Remove current expression"
msgstr ""
#: FDebugInfo.class:1239 FMain.class:2605 FMakeInstall.class:1605
#: FOption.class:1579 FPropertyProject.class:1879
#: FOption.class:1579 FPropertyProject.class:1915
msgid "&Remove"
msgstr ""
@ -1614,7 +1614,7 @@ msgstr ""
msgid "Go to line"
msgstr ""
#: FHelpBrowser.class:22 FPropertyProject.class:1729
#: FHelpBrowser.class:22 FPropertyProject.class:1765
msgid "Default language"
msgstr ""
@ -1964,7 +1964,7 @@ msgstr ""
msgid "This file has not been modified since the last commit."
msgstr ""
#: FInfo.class:304 FOption.class:948 FPropertyProject.class:1518
#: FInfo.class:304 FOption.class:948 FPropertyProject.class:1554
msgid "General"
msgstr ""
@ -1980,7 +1980,7 @@ msgstr ""
msgid "Last modified"
msgstr ""
#: FInfo.class:390 FPropertyProject.class:1987
#: FInfo.class:390 FPropertyProject.class:2023
msgid "Versioning"
msgstr ""
@ -1996,7 +1996,7 @@ msgstr ""
msgid "Edit list property"
msgstr ""
#: FList.class:274 FMenu.class:924 FPropertyProject.class:1930
#: FList.class:274 FMenu.class:924 FPropertyProject.class:1966
msgid "&Insert"
msgstr ""
@ -2472,7 +2472,7 @@ msgstr ""
msgid "Properties"
msgstr ""
#: FMakeExecutable.class:18 FPropertyProject.class:1265
#: FMakeExecutable.class:18 FPropertyProject.class:1301
msgid "Gambas applications"
msgstr ""
@ -2532,7 +2532,7 @@ msgstr ""
msgid "There is no CHANGELOG entry for this release."
msgstr ""
#: FMakeInstall.class:318 FPropertyProject.class:1017 FSave.class:111
#: FMakeInstall.class:318 FPropertyProject.class:1053 FSave.class:111
#: Project.module:2856
msgid "Continue"
msgstr ""
@ -3046,11 +3046,11 @@ msgstr ""
msgid "Sort properties"
msgstr ""
#: FOption.class:1028 FPropertyProject.class:1660
#: FOption.class:1028 FPropertyProject.class:1696
msgid "No"
msgstr ""
#: FOption.class:1028 FPropertyProject.class:1660
#: FOption.class:1028 FPropertyProject.class:1696
msgid "Yes"
msgstr ""
@ -3078,7 +3078,7 @@ msgstr ""
msgid "Default tab size"
msgstr ""
#: FOption.class:1166 FPropertyProject.class:1635
#: FOption.class:1166 FPropertyProject.class:1671
msgid "space(s)"
msgstr ""
@ -3313,187 +3313,187 @@ msgstr ""
msgid "Snapping value is incorrect."
msgstr ""
#: FPropertyProject.class:441
#: FPropertyProject.class:453
msgid "These components are incompatible:<br>&1."
msgstr ""
#: FPropertyProject.class:454
#: FPropertyProject.class:466
msgid "The &1 component needs one of the following components:<br>&2."
msgstr ""
#: FPropertyProject.class:461
#: FPropertyProject.class:473
msgid "The &1 component needs the &2 component."
msgstr ""
#: FPropertyProject.class:866
#: FPropertyProject.class:902
msgid "Cannot write component description file."
msgstr ""
#: FPropertyProject.class:1008
#: FPropertyProject.class:1044
msgid "Unable to update project from repository."
msgstr ""
#: FPropertyProject.class:1010
#: FPropertyProject.class:1046
msgid "Project has been updated from repository successfully."
msgstr ""
#: FPropertyProject.class:1017
#: FPropertyProject.class:1053
msgid "You are going to cancel your changes!"
msgstr ""
#: FPropertyProject.class:1264
#: FPropertyProject.class:1300
msgid "Select a Gambas application"
msgstr ""
#: FPropertyProject.class:1275
#: FPropertyProject.class:1311
msgid "<b>&1</b> is already used as a library."
msgstr ""
#: FPropertyProject.class:1281
#: FPropertyProject.class:1317
msgid "<b>&1</b> does not export any class."
msgstr ""
#: FPropertyProject.class:1488
#: FPropertyProject.class:1524
msgid "GB_GUI=gb.qt4"
msgstr ""
#: FPropertyProject.class:1494
#: FPropertyProject.class:1530
msgid "GB_GUI=gb.gtk"
msgstr ""
#: FPropertyProject.class:1547
#: FPropertyProject.class:1583
msgid "Version"
msgstr ""
#: FPropertyProject.class:1597
#: FPropertyProject.class:1633
msgid "Author(s)"
msgstr ""
#: FPropertyProject.class:1612
#: FPropertyProject.class:1648
msgid "Edition"
msgstr ""
#: FPropertyProject.class:1623
#: FPropertyProject.class:1659
msgid "Tab size"
msgstr ""
#: FPropertyProject.class:1643
#: FPropertyProject.class:1679
msgid "Compilation"
msgstr ""
#: FPropertyProject.class:1654
#: FPropertyProject.class:1690
msgid "Module symbols are public by default"
msgstr ""
#: FPropertyProject.class:1671
#: FPropertyProject.class:1707
msgid "Form controls are public"
msgstr ""
#: FPropertyProject.class:1688
#: FPropertyProject.class:1724
msgid "Get version from program"
msgstr ""
#: FPropertyProject.class:1701 FTranslate.class:1523
#: FPropertyProject.class:1737 FTranslate.class:1523
msgid "Translation"
msgstr ""
#: FPropertyProject.class:1712
#: FPropertyProject.class:1748
msgid "Project is translatable"
msgstr ""
#: FPropertyProject.class:1744
#: FPropertyProject.class:1780
msgid "Debugging"
msgstr ""
#: FPropertyProject.class:1755
#: FPropertyProject.class:1791
msgid "Use a terminal emulator"
msgstr ""
#: FPropertyProject.class:1769
#: FPropertyProject.class:1805
msgid "Component"
msgstr ""
#: FPropertyProject.class:1780
#: FPropertyProject.class:1816
msgid "This project is a component"
msgstr ""
#: FPropertyProject.class:1797
#: FPropertyProject.class:1833
msgid "Component advancement"
msgstr ""
#: FPropertyProject.class:1804
#: FPropertyProject.class:1840
msgid "Finished and stable"
msgstr ""
#: FPropertyProject.class:1804
#: FPropertyProject.class:1840
msgid "Beta version"
msgstr ""
#: FPropertyProject.class:1808
#: FPropertyProject.class:1844
msgid "Components"
msgstr ""
#: FPropertyProject.class:1812
#: FPropertyProject.class:1848
msgid "Show only components used in project"
msgstr ""
#: FPropertyProject.class:1818
#: FPropertyProject.class:1854
msgid "Show components in beta version"
msgstr ""
#: FPropertyProject.class:1831
#: FPropertyProject.class:1867
msgid "About &component..."
msgstr ""
#: FPropertyProject.class:1842
#: FPropertyProject.class:1878
msgid "&Reset"
msgstr ""
#: FPropertyProject.class:1860
#: FPropertyProject.class:1896
msgid "Libraries"
msgstr ""
#: FPropertyProject.class:1873
#: FPropertyProject.class:1909
msgid "&Add..."
msgstr ""
#: FPropertyProject.class:1905
#: FPropertyProject.class:1941
msgid "Environment"
msgstr ""
#: FPropertyProject.class:1915
#: FPropertyProject.class:1951
msgid "Arguments"
msgstr ""
#: FPropertyProject.class:1958
#: FPropertyProject.class:1994
msgid "Environment variables"
msgstr ""
#: FPropertyProject.class:1992
#: FPropertyProject.class:2028
msgid "Changes since last commit"
msgstr ""
#: FPropertyProject.class:2005
#: FPropertyProject.class:2041
msgid "There is no change to commit."
msgstr ""
#: FPropertyProject.class:2014
#: FPropertyProject.class:2050
msgid "&Update"
msgstr ""
#: FPropertyProject.class:2020
#: FPropertyProject.class:2056
msgid "&Revert..."
msgstr ""
#: FPropertyProject.class:2026
#: FPropertyProject.class:2062
msgid "&Commit..."
msgstr ""
#: FPropertyProject.class:2036
#: FPropertyProject.class:2072
msgid "Features"
msgstr ""
#: FPropertyProject.class:2121
#: FPropertyProject.class:2157
msgid "Remove All"
msgstr ""

View file

@ -5,7 +5,7 @@ Inherits UserControl
Event Click
Property Read Key As String
Property Value As Boolean
Property Read Value As Boolean
Property Locked As Boolean
Property Expanded As Boolean
@ -20,6 +20,9 @@ Private txtInfo As TextLabel
Private panVBox As VBox
Private $bCheck As Boolean
Private $bGray As Boolean
Private $aComp As New String[]
Private $bLock As Boolean
Private $sKey As String
Private $sInfo As String
@ -131,14 +134,30 @@ End
Private Sub RefreshCheck()
picCheck.Picture = Picture[If($bCheck, "img/16/checked.png", "img/16/unchecked.png")]
Dim sImage As String
If $bCheck Then
If $bGray Then
sImage = "checked-gray"
Else
sImage = "checked"
Endif
Else
sImage = "unchecked"
Endif
picCheck.Picture = Picture["img/16/" & sImage & ".png"]
End
Public Sub picCheck_MouseDown()
If $bLock Then Return
$bCheck = Not $bCheck
If $bCheck And If Not $bGray Then
Uncheck("")
Else
Check("")
Endif
RefreshCheck
Raise Click
@ -150,12 +169,12 @@ Private Function Value_Read() As Boolean
End
Private Sub Value_Write(Value As Boolean)
$bCheck = Value
RefreshCheck
End
' Private Sub Value_Write(Value As Boolean)
'
' $bCheck = Value
' RefreshCheck
'
' End
Private Function Locked_Read() As Boolean
@ -275,3 +294,33 @@ Public Sub Watcher_Arrange()
Endif
End
Public Sub Check(Optional sComponent As String)
If $aComp.Exist(sComponent) Then Return
$aComp.Add(sComponent)
If Not $bCheck Then
$bCheck = True
$bGray = sComponent <> ""
Else
If Not sComponent Then $bGray = False
Endif
RefreshCheck
End
Public Sub Uncheck(Optional sComponent As String)
Dim iFind As Integer = $aComp.Find(sComponent)
If iFind < 0 Then Return
$aComp.Remove(iFind)
$bCheck = $aComp.Count > 0
If sComponent = "" Then $bGray = $bCheck
RefreshCheck
End

View file

@ -324,10 +324,19 @@ End
'
' END
Private Sub GetRequire(sComp As String) As String[]
Dim hComp As CComponent = CComponent.All[sComp]
Return hComp.Require
End
Private Sub RefreshComponents()
Dim sLib As String
Dim sDep As String
Dim hComp As CComponent
Dim hSep As Label
Dim aRemove As New String[]
@ -359,16 +368,19 @@ Private Sub RefreshComponents()
If $bShowUsed Then
If sLib <> "gb" And If Not Project.Components.Exist(hComp.Key) Then Continue
Endif
hCompBox = New CComponentBox(lstComponent, hComp, bDark)
hCompBox = New CComponentBox(lstComponent, hComp, bDark) As "Component"
bDark = Not bDark
$cComp[hComp.Key] = hCompBox
hCompBox.Locked = sLib = "gb" Or $bShowUsed
Next
For Each sLib In Project.Components
$cComp[sLib].Value = True
$cComp[sLib].Check("")
For Each sDep In GetRequire(sLib)
$cComp[sDep].Check(sLib)
Next
Next
$cComp["gb"].Value = True
$cComp["gb"].Check("")
CComponentBox.ResizeNames(lstComponent)
@ -468,17 +480,41 @@ Private Sub CheckComponentConfig() As Boolean
End
Private Function CheckComponent(sKey As String, bCheck As Boolean) As Boolean
' Private Function CheckComponent(sKey As String, bCheck As Boolean) As Boolean
'
' Dim bBefore As Boolean
' Dim sDep As String
'
' bBefore = IsChecked(sKey)
' If bBefore = bCheck Then Return
'
' If bCheck Then
' $cComp[sKey].Check("")
' For Each sDep In GetRequire(sKey)
' $cComp[sDep].Check(sKey)
' Next
' Else
' $cComp[sKey].Uncheck("")
' Endif
'
' End
Dim bBefore As Boolean
bBefore = IsChecked(sKey)
If bBefore = bCheck Then Return
$cComp[sKey].Value = bCheck
Public Sub Component_Click()
Dim hCompBox As CComponentBox = Last
Dim sDep As String
For Each sDep In GetRequire(hCompBox.Key)
If hCompBox.Value Then
$cComp[sDep].Check(hCompBox.Key)
Else
$cComp[sDep].Uncheck(hCompBox.Key)
Endif
Next
End
' PRIVATE FUNCTION CheckComponent(sKey AS String, bCheck AS Boolean) AS Boolean
'
' DIM hComp AS CComponent

Binary file not shown.

After

Width:  |  Height:  |  Size: 249 B

View file

@ -73,3 +73,4 @@
2 Francisco Mora Sánchez
1 Louviaux
1 Cooke Dylan
1 Leonardo Suárez Arce