From abf1ba8cbf7487f6afee8eb26f461854f20f3926 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Minisini?= Date: Fri, 18 Sep 2015 00:41:43 +0000 Subject: [PATCH] [DEVELOPMENT ENVIRONMENT] * NEW: New project creation dialog based on template projects located in '/usr/share/gambas3/template' and in '~/.local/share/gambas3/template'. These are default directories, they may change according to your gambas installation prefix and home directory configuration. [TEMPLATES] * NEW: Project templates. There are only two at the moment, others will come. git-svn-id: svn://localhost/gambas/trunk@7321 867c0c6c-44f3-4631-809d-bfa615b0a4ec --- app/Makefile.am | 6 +- app/examples/Control/LCDLabel/.project | 2 +- app/src/gambas3/.icon.png | Bin 3392 -> 3396 bytes .../ProjectChooser/FProjectChooser.class | 2 +- app/src/gambas3/.src/FMain.class | 1 + app/src/gambas3/.src/Project.module | 9 +- .../gambas3/.src/Project/CProjectInfo.class | 46 +++ .../gambas3/.src/Project/CProjectList.class | 96 ++++- .../gambas3/.src/Project/FCreateProject.class | 194 ++++------ .../gambas3/.src/Project/FCreateProject.form | 273 ++------------ .../.src/Project/FCreateProjectOld.class | 289 +++++++++++++++ .../.src/Project/FCreateProjectOld.form | 341 ++++++++++++++++++ .../gambas3/.src/Project/FSaveProjectAs.class | 2 + app/src/gambas3/.src/Project/ProjectBox.class | 34 +- app/src/gambas3/{template => }/_fake_project | 0 comp/src/gb.args/.startup | 2 +- comp/src/gb.desktop/.startup | 2 +- comp/src/gb.form/.project | 2 +- comp/src/gb.form/.src/Main.module | 31 +- comp/src/gb.logging/.startup | 2 +- comp/src/gb.map/.startup | 2 +- comp/src/gb.markdown/.startup | 2 +- comp/src/gb.mysql/.startup | 2 +- comp/src/gb.net.pop3/.startup | 2 +- comp/src/gb.scanner/.startup | 2 +- comp/src/gb.util.web/.startup | 2 +- comp/src/gb.util/.startup | 2 +- gb.net.curl/src/gb.net.curl/.startup | 2 +- main/lib/db/gb.db/.startup | 2 +- main/tools/gbh3/.startup | 2 +- 30 files changed, 981 insertions(+), 373 deletions(-) create mode 100644 app/src/gambas3/.src/Project/FCreateProjectOld.class create mode 100644 app/src/gambas3/.src/Project/FCreateProjectOld.form rename app/src/gambas3/{template => }/_fake_project (100%) diff --git a/app/Makefile.am b/app/Makefile.am index d8530c7b0..f0db1715d 100644 --- a/app/Makefile.am +++ b/app/Makefile.am @@ -1,4 +1,4 @@ -EXTRA_DIST = reconf src spec mime desktop +EXTRA_DIST = reconf src spec mime desktop template install-exec-local: @if test "x$(ROOT)" != "x"; then \ @@ -43,6 +43,10 @@ install-exec-local: @echo "Installing the Gambas appdata file" @$(INSTALL) -d $(DESTDIR)$(datarootdir)/appdata @$(INSTALL) $(srcdir)/desktop/gambas3.appdata.xml $(DESTDIR)$(datarootdir)/appdata + + @echo "Installing the Gambas template projects" + $(INSTALL) -d $(DESTDIR)$(gbdatadir)/template; + cp -R $(srcdir)/template/* $(DESTDIR)$(gbdatadir)/template; uninstall-local: @rm -f $(DESTDIR)$(bindir)/gambas$(GAMBAS_VERSION) diff --git a/app/examples/Control/LCDLabel/.project b/app/examples/Control/LCDLabel/.project index 34ba2c710..74f5c57ed 100644 --- a/app/examples/Control/LCDLabel/.project +++ b/app/examples/Control/LCDLabel/.project @@ -1,5 +1,5 @@ # Gambas Project File 3.0 -# Compiled with Gambas 3.6.90 +# Compiled with Gambas 3.8.90 Title=PeriodicTimer Startup=FMain Icon=lcdlabel.png diff --git a/app/src/gambas3/.icon.png b/app/src/gambas3/.icon.png index 69ec1f0be7a30f051e1157bde1c19303f700c383..d40ca1299a6e87f616b87f65b99905e0e2a7fe3c 100644 GIT binary patch delta 3372 zcmV+{4b$?#8pIlqIe+#^L_t(|ob8%l7-+#j%~4^DCCm3I$+|7c zmb|jGyL$J1pQnH5TCF9(w(O}@e`lVVeV=FF=Y4+P=XX5^Tz|z?T*Xyf#Z~;jg_x}J zhg*9eGKfdDvc+Grm)M{~T{`X`Ro^$Oep*L(i7_bwKiJyWwrcK|6n+H8!pnio1WoaddSHtl{Cek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;4+8Bg0Rh@MGn=l%bCV yyT4d~!!YOIV@2SP!Xa35aJO&^w{QzrhyMY$U?-TJ!2`Si0000 "@" Then - - iPos = 1 - Do - iPos = InStr(sLine, "$(", iPos) - If iPos = 0 Then Break - iPos2 = InStr(sLine, ")", iPos) - sLine = Left(sLine, iPos - 1) & CStr($cVar[Mid$(sLine, iPos + 2, iPos2 - iPos - 2)]) & Mid(sLine, iPos2 + 1) - Loop - - sResult &= sLine & "\n" - - Endif - - Wend - - Return sResult - -End - - Private Sub CreateProject() As Boolean Dim sDir As String Dim sName As String - Dim hCtrl As Object Dim sPath As String - Dim sDest As String Dim bErr As Boolean + Dim hFile As File + Dim hDest As File + Dim sLine As String + Dim sTemp As String + 'DIM hIcon AS Picture If $bRepository Then @@ -131,50 +89,50 @@ Private Sub CreateProject() As Boolean Else sName = Trim(txtName.Text) - sDir = dchProject.SelectedPath &/ sName + sDir = dchProject.SelectedPath - $cVar["NAME"] = sName + Shell "cp -R " & Shell$($sTemplate) & " " & Shell$(sDir) & " 2>&1" To sTemp + If Process.LastValue Then Error.Raise(sTemp) - $cVar["TITLE"] = Trim(txtTitle.Text) - If Not $cVar["TITLE"] Then $cVar["TITLE"] = sName - $cVar["LANGUAGE"] = System.Language - - For Each hCtrl In lstType.Children - If hCtrl.Tag Then $cVar[hCtrl.Tag] = False - Next - $cVar[lstType.Current.Tag] = True + If sName <> File.Name($sTemplate) Then Move sDir &/ File.Name($sTemplate) To sDir &/ sName + sDir &/= sName - For Each hCtrl In svwOption.Children - If hCtrl.Tag Then $cVar[hCtrl.Tag] = hCtrl.Value - Next + Shell "rm -rf " & Shell$(sDir &/ ".lang") Wait + Kill sDir &/ "icon.png" - $cVar["GRAPHIC"] = $cVar["QT"] Or $cVar["GTK"] Or $cVar["GUI"] + sTemp = Temp$() - Try Rmdir sDir + hFile = Open sDir &/ ".project" + hDest = Open sTemp For Create - Mkdir sDir - Mkdir sDir &/ ".src" - Mkdir sDir &/ ".hidden" - - For Each sPath In Split(GetFile("template/list"), "\n", "", True) + For Each sLine In hFile.Lines - sDest = sPath - If Left(sDest) = "_" Then sDest = "." & Mid(sDest, 2) - - If InStr(sDest, "/") Then - Try Mkdir sDir &/ File.Dir(sDest) - Else If CModule.Ext.Exist(File.Ext(sDest)) - sDest = ".src" &/ sDest + If sLine Begins "# Compiled with" Then + Continue + Else If sLine Begins "Title=" Then + sLine = "Title=" & txtTitle.Text + Else If sLine Begins "Translate=" Then + If Not chkTranslate.Value Then Continue + sLine = "Translate=1" + Mkdir sDir &/ ".lang" + Else If sLine Begins "Version=" Then + sLine = "Version=0.0.1" + Else If sLine Begins "Description=" Then + Continue + Else If sLine Begins "Icon=" Then + Continue Endif - If File.Ext(sPath) = "png" Then - Copy "template" &/ File.Name(sPath) To sDir &/ sDest - Else - File.Save(sDir &/ sDest, GetFile("template" &/ File.Name(sPath))) - Endif + Print #hDest, sLine Next + Close #hFile + Close #hDest + + Kill sDir &/ ".project" + Copy sTemp To sDir &/ ".project" + Project.MakeDirectoryIcon(sDir) Endif @@ -209,6 +167,13 @@ Public Sub wizProject_BeforeChange() Select Case wizProject.Index + Case 0 + If Not $sTemplate Then + Balloon.Warning(("Please choose a template"), svwTemplate) + Stop Event + Endif + $bRepository = File.Name($sTemplate) = "~subversion" + Case 1 panRepository.Visible = $bRepository panIdent.Visible = Not $bRepository @@ -265,18 +230,12 @@ Public Sub wizProject_Close() End -Public Sub wizProject_Cancel() - - Me.Close - -End - -Public Sub lstType_Click() - - $bRepository = Left(lstType.Current.Tag) = "!" - svwOption.Enabled = Not $bRepository - -End +' Public Sub lstType_Click() +' +' $bRepository = Left(lstType.Current.Tag) = "!" +' svwOption.Enabled = Not $bRepository +' +' End Public Sub txtName_Change() @@ -287,3 +246,10 @@ Public Sub txtName_Change() Endif End + +Public Sub svwTemplate_MouseUp() + + $hTemplate.Current = Null + $sTemplate = "" + +End diff --git a/app/src/gambas3/.src/Project/FCreateProject.form b/app/src/gambas3/.src/Project/FCreateProject.form index b2b0d2508..e9ee14a75 100644 --- a/app/src/gambas3/.src/Project/FCreateProject.form +++ b/app/src/gambas3/.src/Project/FCreateProject.form @@ -1,14 +1,14 @@ # Gambas Form File 3.0 { Form Form - MoveScaled(0,0,87,70) + MoveScaled(0,0,84,72) Text = ("New project") Icon = Picture["icon:/small/new"] Persistent = True Arrangement = Arrange.Fill Margin = True { wizProject Wizard - MoveScaled(1,1,84,68) + MoveScaled(1,1,82,69) Arrangement = Arrange.Vertical Spacing = True Count = 3 @@ -18,250 +18,46 @@ Animated = True Index = 0 Text = ("Project type") - { HBox5 HBox - MoveScaled(1,0,81,58) + { Panel1 Panel + MoveScaled(1,1,80,54) + Background = Color.TextBackground Expand = True + Arrangement = Arrange.Vertical Spacing = True - { VBox3 VBox - MoveScaled(1,1,35,53) - Expand = True - Spacing = True - { Label5 Label - MoveScaled(1,1,25,3) - Font = Font["Bold"] - AutoResize = True - Text = ("Type") - } - { lstType ListContainer - MoveScaled(1,5,33,47) - Expand = True - { panDefaultType HBox - MoveScaled(0,0,32,6) - Tag = "GUI" - Mouse = Mouse.Pointing - Spacing = True - Margin = True - Padding = 4 - { PictureBox7 PictureBox - MoveScaled(1,1,5,5) - Picture = Picture["icon:/32/mouse"] - Stretch = True - Alignment = Align.Center - } - { Label11 Label - MoveScaled(8,1,22,5) - Expand = True - Text = ("Graphical application") - } - } - { HBox9 HBox - MoveScaled(0,7,32,6) - Tag = "QT" - Mouse = Mouse.Pointing - Spacing = True - Margin = True - Padding = 4 - { PictureBox2 PictureBox - MoveScaled(1,1,5,5) - Picture = Picture["img/logo/qt.png"] - Stretch = True - Alignment = Align.Center - } - { Label6 Label - MoveScaled(8,1,22,5) - Expand = True - Text = ("QT graphical application") - } - } - { HBox2 HBox - MoveScaled(0,13,32,6) - Tag = "GTK" - Mouse = Mouse.Pointing - Spacing = True - Margin = True - Padding = 4 - { PictureBox3 PictureBox - MoveScaled(1,1,5,5) - Picture = Picture["img/logo/gtk.png"] - Stretch = True - Alignment = Align.Center - } - { Label8 Label - MoveScaled(8,1,23,5) - Expand = True - Text = ("GTK+ graphical application") - } - } - { HBox3 HBox - MoveScaled(0,19,32,6) - Tag = "CONSOLE" - Mouse = Mouse.Pointing - Spacing = True - Margin = True - Padding = 4 - { PictureBox4 PictureBox - MoveScaled(1,1,5,5) - Picture = Picture["icon:/48/terminal"] - Stretch = True - Alignment = Align.Center - } - { Label9 Label - MoveScaled(8,1,22,5) - Expand = True - Text = ("Command-line application") - } - } - { HBox4 HBox - MoveScaled(0,25,32,6) - Tag = "GAME" - Mouse = Mouse.Pointing - Spacing = True - Margin = True - Padding = 4 - { PictureBox5 PictureBox - MoveScaled(1,1,5,5) - Picture = Picture["icon:/48/game"] - Stretch = True - Alignment = Align.Center - } - { Label13 Label - MoveScaled(8,1,22,5) - Expand = True - Text = ("SDL application") - } - } - { HBox1 HBox - MoveScaled(0,31,32,6) - Tag = "WEB" - Mouse = Mouse.Pointing - Spacing = True - Margin = True - Padding = 4 - { PictureBox1 PictureBox - MoveScaled(1,1,5,5) - Picture = Picture["img/logo/browser.png"] - Stretch = True - Alignment = Align.Center - } - { Label1 Label - MoveScaled(8,1,22,5) - Expand = True - Text = ("CGI Web application") - } - } - { Separator2 Separator - MoveScaled(-3,37,37,3) - } - { HBox8 HBox - MoveScaled(0,39,32,6) - Tag = "!SVN" - Mouse = Mouse.Pointing - Spacing = True - Margin = True - Padding = 4 - { PictureBox6 PictureBox - MoveScaled(1,1,5,5) - Picture = Picture["img/logo/subversion.png"] - Stretch = True - Alignment = Align.Center - } - { Label4 Label - MoveScaled(8,1,22,5) - Expand = True - Text = ("Application stored in a\nSubversion repository") - } - } + Margin = True + Border = Border.Plain + { Panel3 Panel + MoveScaled(6,4,38,4) + Visible = False + Arrangement = Arrange.Fill + Border = Border.Plain + { txtFilter ButtonBox + MoveScaled(1,0,24,4) + Foreground = Color.LightForeground + Picture = Picture["icon:/small/clear"] + Border = False } } - { VBox1 VBox - MoveScaled(37,1,41,56) + { svwTemplate ScrollView + MoveScaled(4,12,72,39) + Background = Color.TextBackground Expand = True + Arrangement = Arrange.Row Spacing = True - { Label12 Label - MoveScaled(1,1,25,3) - Font = Font["Bold"] - AutoResize = True - Text = ("Options") - } - { svwOption ScrollView - MoveScaled(1,5,39,50) - Background = Color.TextBackground - Expand = True - Arrangement = Arrange.Vertical - Padding = 4 - ScrollBar = Scroll.Vertical - { chkLocalize CheckBox - MoveScaled(1,0,37,4) - Tag = "TRANSLATE" - Text = ("Internationalization") - } - { CheckBox2 CheckBox - MoveScaled(1,4,37,4) - Tag = "DATABASE" - Text = ("Database access") - } - { CheckBox3 CheckBox - MoveScaled(1,8,37,4) - Tag = "NETWORK" - Text = ("Network programming") - } - { CheckBox7 CheckBox - MoveScaled(1,12,37,4) - Tag = "SETTINGS" - Text = ("Settings files management") - } - { CheckBox1 CheckBox - MoveScaled(1,16,37,4) - Tag = "REGEXP" - Text = ("Regular expressions") - } - { CheckBox4 CheckBox - MoveScaled(1,20,37,4) - Tag = "XML" - Text = ("XML / XSLT programming") - } - { CheckBox6 CheckBox - MoveScaled(1,24,37,4) - Tag = "OPENGL" - Text = ("OpenGL programming") - } - { CheckBox5 CheckBox - MoveScaled(1,28,37,4) - Tag = "IMAGE" - Text = ("Image processing") - } - { chkCtrlPublic2 CheckBox - MoveScaled(1,32,37,4) - Tag = "SCIENCE" - Text = ("Scientific computing") - } - { chkCtrlPublic CheckBox - MoveScaled(1,36,37,4) - Tag = "VISUAL" - Text = ("Visual Basic™ conversion help") - } - { Separator1 Separator - MoveScaled(1,41,37,3) - } - { CheckBox8 CheckBox - MoveScaled(1,44,35,4) - Tag = "COMPONENT" - Text = ("Component programming") - } - } + Border = False } } Index = 1 - Text = ("Project parent directory") + Text = ("Parent directory") { dchProject DirChooser - MoveScaled(2,1,81,56) + MoveScaled(4,3,73,50) Expand = True Root = "/" } Index = 2 - Text = ("Project information") + Text = ("Project details") { panIdent VBox - MoveScaled(0,0,80,31) + MoveScaled(1,0,80,39) Spacing = True { Label10 Label MoveScaled(0,0,25,3) @@ -277,7 +73,7 @@ Font = Font["Italic,-1"] Text = ("The project name is the name of the project directory.") } - { Panel1 HBox + { Panel2 HBox MoveScaled(0,11,74,2) Spacing = True { Label16 Label @@ -306,13 +102,20 @@ Font = Font["Italic,-1"] Text = ("The project title is the true name of the application.") } + { Panel4 Panel + MoveScaled(22,27,4,1) + } + { chkTranslate CheckBox + MoveScaled(1,29,43,3) + Text = ("Project is translatable") + } { chkOther CheckBox - MoveScaled(1,27,43,4) + MoveScaled(1,33,43,3) Text = ("Open in another window") } } { panRepository VBox - MoveScaled(0,32,81,25) + MoveScaled(1,40,81,18) Expand = True Spacing = True { Label7 Label @@ -330,7 +133,7 @@ Text = ("The project repository is directly sent to the 'svn checkout' command.") } { edtOutput TextEditor - MoveScaled(0,12,79,12) + MoveScaled(0,11,79,6) Font = Font["Monospace,-1"] Expand = True ReadOnly = True diff --git a/app/src/gambas3/.src/Project/FCreateProjectOld.class b/app/src/gambas3/.src/Project/FCreateProjectOld.class new file mode 100644 index 000000000..418269aaf --- /dev/null +++ b/app/src/gambas3/.src/Project/FCreateProjectOld.class @@ -0,0 +1,289 @@ +' Gambas class file + +Static Public InAnotherWindow As Boolean + +Static Private $sPath As String + +Static Private $cVar As New Collection(gb.IgnoreCase) +Static Private $bRepository As Boolean +Static Private $bAnother As Boolean + +Static Public Sub Run(Optional bAnother As Boolean) As String + + $bAnother = bAnother + Inc Application.Busy + If Me.ShowModal() Then Return $sPath + +End + +Public Sub Form_Open() + + 'dchProject.SelectedPath = Settings["/FCreateProject/Path", System.User.Home] + Settings.Read(Me) + lstType.Select(panDefaultType) + wizProject.Index = 0 + edtOutput.ReadConfig + edtOutput.Text = "" + chkOther.Visible = $bAnother + Settings.Read(dchProject, "dchProject") + + Dec Application.Busy + +End + +Private Sub GetTest(sTest As String) As Boolean + + Return Eval(sTest, $cVar) + +End + +Private Sub JumpFile(hFile As File, sBegin As String, sEnd As String, Optional sSearch As String) + + Dim sLine As String + Dim iLevel As Integer + + While Not Eof(hFile) + Line Input #hFile, sLine + sLine = Trim(sLine) + + If sSearch And If sLine = sSearch Then + If iLevel = 0 Then Return + Continue + Endif + + If sLine Begins sBegin & " " Then + Inc iLevel + Else If sLine = sEnd Then + If iLevel = 0 Then Return + Dec iLevel + Endif + + Wend + +End + + +Private Sub GetFile(sPath As String) As String + + Dim hFile As File + Dim sLine As String + Dim sTrim As String + Dim sResult As String + Dim iPos As Integer + Dim iPos2 As Integer + + hFile = Open sPath + While Not Eof(hFile) + Line Input #hFile, sLine + sTrim = Trim(sLine) + + If Left(sTrim, 4) = "@IF " Then + If Not GetTest(Mid$(sTrim, 5)) Then + JumpFile(hFile, "@IF", "@ENDIF", "@ELSE") + Endif + Else If sTrim = "@ELSE" Then + JumpFile(hFile, "@IF", "@ENDIF") + Else If Left(sTrim) <> "@" Then + + iPos = 1 + Do + iPos = InStr(sLine, "$(", iPos) + If iPos = 0 Then Break + iPos2 = InStr(sLine, ")", iPos) + sLine = Left(sLine, iPos - 1) & CStr($cVar[Mid$(sLine, iPos + 2, iPos2 - iPos - 2)]) & Mid(sLine, iPos2 + 1) + Loop + + sResult &= sLine & "\n" + + Endif + + Wend + + Return sResult + +End + + +Private Sub CreateProject() As Boolean + + Dim sDir As String + Dim sName As String + Dim hCtrl As Object + Dim sPath As String + Dim sDest As String + Dim bErr As Boolean + 'DIM hIcon AS Picture + + If $bRepository Then + + sPath = Trim(txtRepository.Text) + If Right(sPath) = "/" Then sPath = Left(sPath, -1) + + sDir = dchProject.SelectedPath + edtOutput.ReadOnly = False + bErr = VersionControl.CheckoutSVN(sPath, sDir, edtOutput) + edtOutput.ReadOnly = True + + If bErr Then Error.Raise(("Project checkout has failed.")) + + sDir &/= File.Name(sPath) + + Else + + sName = Trim(txtName.Text) + sDir = dchProject.SelectedPath &/ sName + + $cVar["NAME"] = sName + + $cVar["TITLE"] = Trim(txtTitle.Text) + If Not $cVar["TITLE"] Then $cVar["TITLE"] = sName + $cVar["LANGUAGE"] = System.Language + + For Each hCtrl In lstType.Children + If hCtrl.Tag Then $cVar[hCtrl.Tag] = False + Next + $cVar[lstType.Current.Tag] = True + + For Each hCtrl In svwOption.Children + If hCtrl.Tag Then $cVar[hCtrl.Tag] = hCtrl.Value + Next + + $cVar["GRAPHIC"] = $cVar["QT"] Or $cVar["GTK"] Or $cVar["GUI"] + + Try Rmdir sDir + + Mkdir sDir + Mkdir sDir &/ ".src" + Mkdir sDir &/ ".hidden" + + For Each sPath In Split(GetFile("template/list"), "\n", "", True) + + sDest = sPath + If Left(sDest) = "_" Then sDest = "." & Mid(sDest, 2) + + If InStr(sDest, "/") Then + Try Mkdir sDir &/ File.Dir(sDest) + Else If CModule.Ext.Exist(File.Ext(sDest)) + sDest = ".src" &/ sDest + Endif + + If File.Ext(sPath) = "png" Then + Copy "template" &/ File.Name(sPath) To sDir &/ sDest + Else + File.Save(sDir &/ sDest, GetFile("template" &/ File.Name(sPath))) + Endif + + Next + + Project.MakeDirectoryIcon(sDir) + + Endif + + $sPath = sDir + Return False + +Catch + + Message.Error(("Cannot create project!") & "\n\n" & Error.Text) + Return True + +End + + +Public Sub Form_Close() + + Settings.Write(dchProject, "dchProject") + Settings.Write(Me) + +End + +Public Sub dchProject_Icon(Path As String) + + If Exist(Path &/ ".project") Then + dchProject.Icon = Project.GetIcon(Path, 16) + Endif + +End + +Public Sub wizProject_BeforeChange() + + Select Case wizProject.Index + + Case 1 + panRepository.Visible = $bRepository + panIdent.Visible = Not $bRepository + If $bRepository Then + txtRepository.SetFocus + Else + txtName.SetFocus + txtName_Change + Endif + + End Select + +End + + +Public Sub wizProject_Close() + + Dim sMsg As String + + If $bRepository Then + + If Not Trim(txtRepository.Text) Then + txtRepository.SetFocus + Balloon.Warning(("Please enter the location of the repository."), txtRepository) + Return + Endif + + Else + + sMsg = Project.CheckProjectName(txtName.Text, dchProject.SelectedPath) + If sMsg + txtName.SetFocus + txtName.SelectAll + Balloon.Warning(sMsg, txtName) + Return + Endif + + Endif + + ' IF NOT dchProject.SelectedPath THEN + ' dchProject.SetFocus + ' 'tabProject.Index = 1 + ' Balloon.Warning(("Choose the project parent directory."), dchProject) + ' RETURN + ' ENDIF + + If CreateProject() Then Return + + Message(("The project has been successfully created.")) + + InAnotherWindow = chkOther.Value + + Me.Close(True) + +End + +Public Sub wizProject_Cancel() + + Me.Close + +End + +Public Sub lstType_Click() + + $bRepository = Left(lstType.Current.Tag) = "!" + svwOption.Enabled = Not $bRepository + +End + +Public Sub txtName_Change() + + If Trim(txtName.Text) Then + lblFinalDir.Text = dchProject.SelectedPath &/ Trim(txtName.Text) + Else + lblFinalDir.Text = dchProject.SelectedPath &/ "..." + Endif + +End diff --git a/app/src/gambas3/.src/Project/FCreateProjectOld.form b/app/src/gambas3/.src/Project/FCreateProjectOld.form new file mode 100644 index 000000000..b2b0d2508 --- /dev/null +++ b/app/src/gambas3/.src/Project/FCreateProjectOld.form @@ -0,0 +1,341 @@ +# Gambas Form File 3.0 + +{ Form Form + MoveScaled(0,0,87,70) + Text = ("New project") + Icon = Picture["icon:/small/new"] + Persistent = True + Arrangement = Arrange.Fill + Margin = True + { wizProject Wizard + MoveScaled(1,1,84,68) + Arrangement = Arrange.Vertical + Spacing = True + Count = 3 + TextFont = Font["Bold,+3"] + ShowIndex = True + Border = False + Animated = True + Index = 0 + Text = ("Project type") + { HBox5 HBox + MoveScaled(1,0,81,58) + Expand = True + Spacing = True + { VBox3 VBox + MoveScaled(1,1,35,53) + Expand = True + Spacing = True + { Label5 Label + MoveScaled(1,1,25,3) + Font = Font["Bold"] + AutoResize = True + Text = ("Type") + } + { lstType ListContainer + MoveScaled(1,5,33,47) + Expand = True + { panDefaultType HBox + MoveScaled(0,0,32,6) + Tag = "GUI" + Mouse = Mouse.Pointing + Spacing = True + Margin = True + Padding = 4 + { PictureBox7 PictureBox + MoveScaled(1,1,5,5) + Picture = Picture["icon:/32/mouse"] + Stretch = True + Alignment = Align.Center + } + { Label11 Label + MoveScaled(8,1,22,5) + Expand = True + Text = ("Graphical application") + } + } + { HBox9 HBox + MoveScaled(0,7,32,6) + Tag = "QT" + Mouse = Mouse.Pointing + Spacing = True + Margin = True + Padding = 4 + { PictureBox2 PictureBox + MoveScaled(1,1,5,5) + Picture = Picture["img/logo/qt.png"] + Stretch = True + Alignment = Align.Center + } + { Label6 Label + MoveScaled(8,1,22,5) + Expand = True + Text = ("QT graphical application") + } + } + { HBox2 HBox + MoveScaled(0,13,32,6) + Tag = "GTK" + Mouse = Mouse.Pointing + Spacing = True + Margin = True + Padding = 4 + { PictureBox3 PictureBox + MoveScaled(1,1,5,5) + Picture = Picture["img/logo/gtk.png"] + Stretch = True + Alignment = Align.Center + } + { Label8 Label + MoveScaled(8,1,23,5) + Expand = True + Text = ("GTK+ graphical application") + } + } + { HBox3 HBox + MoveScaled(0,19,32,6) + Tag = "CONSOLE" + Mouse = Mouse.Pointing + Spacing = True + Margin = True + Padding = 4 + { PictureBox4 PictureBox + MoveScaled(1,1,5,5) + Picture = Picture["icon:/48/terminal"] + Stretch = True + Alignment = Align.Center + } + { Label9 Label + MoveScaled(8,1,22,5) + Expand = True + Text = ("Command-line application") + } + } + { HBox4 HBox + MoveScaled(0,25,32,6) + Tag = "GAME" + Mouse = Mouse.Pointing + Spacing = True + Margin = True + Padding = 4 + { PictureBox5 PictureBox + MoveScaled(1,1,5,5) + Picture = Picture["icon:/48/game"] + Stretch = True + Alignment = Align.Center + } + { Label13 Label + MoveScaled(8,1,22,5) + Expand = True + Text = ("SDL application") + } + } + { HBox1 HBox + MoveScaled(0,31,32,6) + Tag = "WEB" + Mouse = Mouse.Pointing + Spacing = True + Margin = True + Padding = 4 + { PictureBox1 PictureBox + MoveScaled(1,1,5,5) + Picture = Picture["img/logo/browser.png"] + Stretch = True + Alignment = Align.Center + } + { Label1 Label + MoveScaled(8,1,22,5) + Expand = True + Text = ("CGI Web application") + } + } + { Separator2 Separator + MoveScaled(-3,37,37,3) + } + { HBox8 HBox + MoveScaled(0,39,32,6) + Tag = "!SVN" + Mouse = Mouse.Pointing + Spacing = True + Margin = True + Padding = 4 + { PictureBox6 PictureBox + MoveScaled(1,1,5,5) + Picture = Picture["img/logo/subversion.png"] + Stretch = True + Alignment = Align.Center + } + { Label4 Label + MoveScaled(8,1,22,5) + Expand = True + Text = ("Application stored in a\nSubversion repository") + } + } + } + } + { VBox1 VBox + MoveScaled(37,1,41,56) + Expand = True + Spacing = True + { Label12 Label + MoveScaled(1,1,25,3) + Font = Font["Bold"] + AutoResize = True + Text = ("Options") + } + { svwOption ScrollView + MoveScaled(1,5,39,50) + Background = Color.TextBackground + Expand = True + Arrangement = Arrange.Vertical + Padding = 4 + ScrollBar = Scroll.Vertical + { chkLocalize CheckBox + MoveScaled(1,0,37,4) + Tag = "TRANSLATE" + Text = ("Internationalization") + } + { CheckBox2 CheckBox + MoveScaled(1,4,37,4) + Tag = "DATABASE" + Text = ("Database access") + } + { CheckBox3 CheckBox + MoveScaled(1,8,37,4) + Tag = "NETWORK" + Text = ("Network programming") + } + { CheckBox7 CheckBox + MoveScaled(1,12,37,4) + Tag = "SETTINGS" + Text = ("Settings files management") + } + { CheckBox1 CheckBox + MoveScaled(1,16,37,4) + Tag = "REGEXP" + Text = ("Regular expressions") + } + { CheckBox4 CheckBox + MoveScaled(1,20,37,4) + Tag = "XML" + Text = ("XML / XSLT programming") + } + { CheckBox6 CheckBox + MoveScaled(1,24,37,4) + Tag = "OPENGL" + Text = ("OpenGL programming") + } + { CheckBox5 CheckBox + MoveScaled(1,28,37,4) + Tag = "IMAGE" + Text = ("Image processing") + } + { chkCtrlPublic2 CheckBox + MoveScaled(1,32,37,4) + Tag = "SCIENCE" + Text = ("Scientific computing") + } + { chkCtrlPublic CheckBox + MoveScaled(1,36,37,4) + Tag = "VISUAL" + Text = ("Visual Basic™ conversion help") + } + { Separator1 Separator + MoveScaled(1,41,37,3) + } + { CheckBox8 CheckBox + MoveScaled(1,44,35,4) + Tag = "COMPONENT" + Text = ("Component programming") + } + } + } + } + Index = 1 + Text = ("Project parent directory") + { dchProject DirChooser + MoveScaled(2,1,81,56) + Expand = True + Root = "/" + } + Index = 2 + Text = ("Project information") + { panIdent VBox + MoveScaled(0,0,80,31) + Spacing = True + { Label10 Label + MoveScaled(0,0,25,3) + Font = Font["Bold"] + Text = ("Project name") + Alignment = Align.BottomNormal + } + { txtName TextBox + MoveScaled(0,4,49,4) + } + { Label2 Label + MoveScaled(0,8,76,2) + Font = Font["Italic,-1"] + Text = ("The project name is the name of the project directory.") + } + { Panel1 HBox + MoveScaled(0,11,74,2) + Spacing = True + { Label16 Label + MoveScaled(0,0,23,2) + Font = Font["Italic,-1"] + AutoResize = True + Text = ("The project final directory is :") + } + { lblFinalDir Label + MoveScaled(24,0,39,2) + Font = Font["Bold,-1"] + Expand = True + } + } + { Label3 Label + MoveScaled(1,15,25,3) + Font = Font["Bold"] + Text = ("Project title") + Alignment = Align.BottomNormal + } + { txtTitle TextBox + MoveScaled(1,19,51,4) + } + { Label14 Label + MoveScaled(1,23,76,2) + Font = Font["Italic,-1"] + Text = ("The project title is the true name of the application.") + } + { chkOther CheckBox + MoveScaled(1,27,43,4) + Text = ("Open in another window") + } + } + { panRepository VBox + MoveScaled(0,32,81,25) + Expand = True + Spacing = True + { Label7 Label + MoveScaled(0,0,25,3) + Font = Font["Bold"] + Text = ("Repository") + Alignment = Align.BottomNormal + } + { txtRepository TextBox + MoveScaled(0,4,51,4) + } + { Label15 Label + MoveScaled(0,8,76,2) + Font = Font["Italic,-1"] + Text = ("The project repository is directly sent to the 'svn checkout' command.") + } + { edtOutput TextEditor + MoveScaled(0,12,79,12) + Font = Font["Monospace,-1"] + Expand = True + ReadOnly = True + } + } + Index = 0 + } +} diff --git a/app/src/gambas3/.src/Project/FSaveProjectAs.class b/app/src/gambas3/.src/Project/FSaveProjectAs.class index 9f48c774c..4563ffa82 100644 --- a/app/src/gambas3/.src/Project/FSaveProjectAs.class +++ b/app/src/gambas3/.src/Project/FSaveProjectAs.class @@ -79,6 +79,8 @@ Public Sub Form_Open() Settings.Read(Me) Settings.Read(dchProject, "dchProject") + dchProject.Bookmarks = Project.GetBookmarks() + End Public Sub Form_Close() diff --git a/app/src/gambas3/.src/Project/ProjectBox.class b/app/src/gambas3/.src/Project/ProjectBox.class index 777d38b34..d0fde470e 100644 --- a/app/src/gambas3/.src/Project/ProjectBox.class +++ b/app/src/gambas3/.src/Project/ProjectBox.class @@ -16,7 +16,9 @@ Property Selected As Boolean 'Property Read IdealHeight As Integer Property ShowAuthors As Boolean Property Read Info As CProjectInfo + Public Group As String ' for examples +Public Template As Boolean 'Static Private $hGradient As Image @@ -165,7 +167,11 @@ Public Sub DrawingArea_Draw() Paint.AntiAlias = False Paint.Rectangle(X, Y, W - 1, H - 1) - iBg = Color.Merge(Color.TextForeground, Color.TextBackground, 0.97) + If $bSelected Then + iBg = Color.LightBackground + Else + iBg = Color.Merge(Color.TextForeground, Color.TextBackground, 0.97) + Endif Paint.Background = iBg Paint.Fill(True) @@ -207,13 +213,29 @@ Public Sub DrawingArea_Draw() X += ICON_SIZE + P - sText = .Name + If Template Then + sText = .GetTranslatedTitle() + Else + sText = .Name + Endif 'Paint.Font = Font["+1"] Paint.Background = iCol Paint.DrawTextShadow(sText, X, Y, W, H, Align.TopLeft) Paint.DrawText(sText, X, Y, W, H, Align.TopLeft) - If bSmall Then + If Template Then + + X -= ICON_SIZE + P + + sText = .GetTranslatedDescription() + Paint.Font = Font["-1"] + + W = W - X - P * 2 + H = H - Y - ICON_SIZE + sText = Paint.TrimText(sText, W, H) + Paint.DrawText(sText, X, Y + ICON_SIZE + P, W, H) + + Else If bSmall Then WT = Paint.Font.TextWidth(sText & " ") @@ -236,6 +258,7 @@ Public Sub DrawingArea_Draw() Else Paint.Font.Bold = False + sText = .Version 'Paint.DrawTextShadow(sText, X + 1, Y + Paint.Font.Height + 1, Paint.W, Paint.H, Align.TopLeft, 4) Paint.DrawText(sText, X, Y + Paint.Font.Height, Paint.W, Paint.H, Align.TopLeft) @@ -272,6 +295,10 @@ Public Sub DrawingArea_Draw() Paint.DrawText(("Open in another window") & "…", X + P, Y, W - P * 2, H, Align.Normal) Endif + ' If Template And If $sPath = GetParent().Current Then + ' Paint.FillRect(0, 0, Paint.W, Paint.H, Color.SetAlpha(Color.SelectedBackground, 128)) + ' Endif + ' End Public Sub DrawingArea_Enter() @@ -402,6 +429,7 @@ Public Sub DrawingArea_MouseUp() Else Raise Click Endif + $hDrawingArea.Refresh Endif End diff --git a/app/src/gambas3/template/_fake_project b/app/src/gambas3/_fake_project similarity index 100% rename from app/src/gambas3/template/_fake_project rename to app/src/gambas3/_fake_project diff --git a/comp/src/gb.args/.startup b/comp/src/gb.args/.startup index 54435ddc6..8c5ba4cb6 100644 --- a/comp/src/gb.args/.startup +++ b/comp/src/gb.args/.startup @@ -2,6 +2,6 @@ MMain gb.args 0 0 -3.6.90 +3.8.90 diff --git a/comp/src/gb.desktop/.startup b/comp/src/gb.desktop/.startup index 112874996..d5b74233d 100644 --- a/comp/src/gb.desktop/.startup +++ b/comp/src/gb.desktop/.startup @@ -2,7 +2,7 @@ Form11 Desktop-neutral routines from Portland project 0 0 -3.7.90 +3.8.90 gb.image gb.gui diff --git a/comp/src/gb.form/.project b/comp/src/gb.form/.project index a57a6d221..aa590cf63 100644 --- a/comp/src/gb.form/.project +++ b/comp/src/gb.form/.project @@ -1,7 +1,7 @@ # Gambas Project File 3.0 # Compiled with Gambas 3.8.90 Title=More controls for graphical components -Startup=FTestDateChooser +Startup=Main Version=3.8.90 VersionFile=1 Component=gb.image diff --git a/comp/src/gb.form/.src/Main.module b/comp/src/gb.form/.src/Main.module index 2fc0cdd1d..387d62e6b 100644 --- a/comp/src/gb.form/.src/Main.module +++ b/comp/src/gb.form/.src/Main.module @@ -201,7 +201,36 @@ End Public Sub Main() - FTestBalloon.ShowModal + Dim hTask As CTaskDirSize + hTask = New CTaskDirSize("/home/benoit/gambas/3.0") As "Task" + + Wait 10 + +End + +Public Sub Task_Read(sData As String) + + Debug sData + +End + +Public Sub Task_Error(Data As String) + + Debug Data + +End + + +Public Sub Task_Kill() + + Dim sStr As String + Try sStr = Last.Value + If Error Then + Debug Error.Text + Else + Debug "->";; sStr + Endif + End diff --git a/comp/src/gb.logging/.startup b/comp/src/gb.logging/.startup index 72f3f26fb..04441318b 100644 --- a/comp/src/gb.logging/.startup +++ b/comp/src/gb.logging/.startup @@ -2,6 +2,6 @@ MTest gb.logging 0 0 -3.6.90 +3.8.90 diff --git a/comp/src/gb.map/.startup b/comp/src/gb.map/.startup index 4d6f28c18..1a5685c24 100644 --- a/comp/src/gb.map/.startup +++ b/comp/src/gb.map/.startup @@ -2,7 +2,7 @@ Form5 gb.map 0 0 -3.6.90 +3.8.90 gb.image gb.gui diff --git a/comp/src/gb.markdown/.startup b/comp/src/gb.markdown/.startup index 988cba6e2..b64ff5713 100644 --- a/comp/src/gb.markdown/.startup +++ b/comp/src/gb.markdown/.startup @@ -2,6 +2,6 @@ MTest Gambas markup syntax 0 0 -3.7.90 +3.8.90 diff --git a/comp/src/gb.mysql/.startup b/comp/src/gb.mysql/.startup index 605b3d72c..4f9a34cdc 100644 --- a/comp/src/gb.mysql/.startup +++ b/comp/src/gb.mysql/.startup @@ -2,7 +2,7 @@ modMain mysql 0 0 -3.6.90 +3.8.90 gb.db diff --git a/comp/src/gb.net.pop3/.startup b/comp/src/gb.net.pop3/.startup index ed51dea07..ff68fba96 100644 --- a/comp/src/gb.net.pop3/.startup +++ b/comp/src/gb.net.pop3/.startup @@ -2,7 +2,7 @@ MTest gb.net.pop3 0 0 -3.6.90 +3.8.90 gb.net gb.mime diff --git a/comp/src/gb.scanner/.startup b/comp/src/gb.scanner/.startup index bbca92e9b..c1337c218 100644 --- a/comp/src/gb.scanner/.startup +++ b/comp/src/gb.scanner/.startup @@ -2,7 +2,7 @@ Module2 gb.scanner 0 0 -3.7.0 +3.8.90 gb.image gb.gui diff --git a/comp/src/gb.util.web/.startup b/comp/src/gb.util.web/.startup index ee0d8f621..260ab93f7 100644 --- a/comp/src/gb.util.web/.startup +++ b/comp/src/gb.util.web/.startup @@ -2,6 +2,6 @@ MMain gb.util.web 0 0 -3.8.0 +3.8.90 diff --git a/comp/src/gb.util/.startup b/comp/src/gb.util/.startup index d26301b4c..5ea159c13 100644 --- a/comp/src/gb.util/.startup +++ b/comp/src/gb.util/.startup @@ -2,6 +2,6 @@ MMain Gambas utilities 0 0 -3.7.90 +3.8.90 diff --git a/gb.net.curl/src/gb.net.curl/.startup b/gb.net.curl/src/gb.net.curl/.startup index 53e2e06d4..7ac23e195 100644 --- a/gb.net.curl/src/gb.net.curl/.startup +++ b/gb.net.curl/src/gb.net.curl/.startup @@ -2,7 +2,7 @@ MMain gb.net.curl 0 0 -3.7.90 +3.8.90 gb.net gb.net.curl diff --git a/main/lib/db/gb.db/.startup b/main/lib/db/gb.db/.startup index 179f8aeee..6b2eac032 100644 --- a/main/lib/db/gb.db/.startup +++ b/main/lib/db/gb.db/.startup @@ -2,7 +2,7 @@ Main gb.db 0 0 -3.7.90 +3.8.90 gb.db diff --git a/main/tools/gbh3/.startup b/main/tools/gbh3/.startup index e79adfec4..d27ba3f85 100644 --- a/main/tools/gbh3/.startup +++ b/main/tools/gbh3/.startup @@ -2,6 +2,6 @@ MMain gbh3 0 0 -3.6.90 +3.8.90