[DEVELOPMENT ENVIRONMENT]

* BUG: Fix and enhance Gambas 2 project conversion.

[GB.QT4]
* BUG: Allow control resizing whatever the arrangement of its container, 
  provided that its Ignore property is set.


git-svn-id: svn://localhost/gambas/trunk@2920 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
Benoît Minisini 2010-04-28 00:17:12 +00:00
parent dab2e24446
commit cc6dfc0e33
6 changed files with 59 additions and 38 deletions

View File

@ -2456,7 +2456,7 @@ msgid "There is no CHANGELOG entry for this release."
msgstr ""
#: FMakeInstall.class:309 FPropertyProject.class:1013 FSave.class:111
#: Project.module:2685
#: Project.module:2709
msgid "Continue"
msgstr ""
@ -5080,112 +5080,112 @@ msgstr ""
msgid "Cannot make executable."
msgstr ""
#: Project.module:2684
#: Project.module:2708
msgid "Some components are missing: &1"
msgstr ""
#: Project.module:2889
#: Project.module:2913
msgid "Cannot write project file."
msgstr ""
#: Project.module:2922
#: Project.module:2946
msgid "Unable to create desktop shortcut."
msgstr ""
#: Project.module:3183
#: Project.module:3207
msgid "The directory will be removed at the next commit."
msgstr ""
#: Project.module:3202
#: Project.module:3226
msgid "You must define a startup class or form!"
msgstr ""
#: Project.module:3234
#: Project.module:3258
msgid "Please type a name."
msgstr ""
#: Project.module:3238
#: Project.module:3262
msgid "This name contains a forbidden character:"
msgstr ""
#: Project.module:3242
#: Project.module:3266
msgid "The name cannot begins with a dot."
msgstr ""
#: Project.module:3246
#: Project.module:3270
msgid "This name is already used. Choose another one."
msgstr ""
#: Project.module:3277
#: Project.module:3301
msgid ""
"A class name must begin with a letter or an underscore, followed by any "
"letter or digit."
msgstr ""
#: Project.module:3325
#: Project.module:3349
msgid "Destination already exists"
msgstr ""
#: Project.module:3527
#: Project.module:3551
msgid "Unable to rename '&1'"
msgstr ""
#: Project.module:3649
#: Project.module:3673
msgid "Please type a project name."
msgstr ""
#: Project.module:3657
#: Project.module:3681
msgid "The project name cannot begin with a dot."
msgstr ""
#: Project.module:3660
#: Project.module:3684
msgid "Non-ASCII characters are forbidden in a project name."
msgstr ""
#: Project.module:3661
#: Project.module:3685
msgid ""
"The following characters are forbidden in a project name: ? * / \\ SPACE"
msgstr ""
#: Project.module:3671
#: Project.module:3695
msgid "The project directory already exists."
msgstr ""
#: Project.module:3673
#: Project.module:3697
msgid ""
"The project directory cannot be created because a file with the same name "
"already exists."
msgstr ""
#: Project.module:3719
#: Project.module:3743
msgid "Create source package"
msgstr ""
#: Project.module:3720
#: Project.module:3744
msgid "Source packages"
msgstr ""
#: Project.module:3996
#: Project.module:4020
msgid "Cannot copy file &1."
msgstr ""
#: Project.module:4045
#: Project.module:4069
msgid "Cannot create link &1."
msgstr ""
#: Project.module:4062
#: Project.module:4086
msgid "Cannot move a directory inside itself."
msgstr ""
#: Project.module:4126
#: Project.module:4150
msgid "Cannot move file &1."
msgstr ""
#: Project.module:4673
#: Project.module:4697
msgid "modified"
msgstr ""
#: Project.module:4753
#: Project.module:4777
msgid "Unable to update all forms."
msgstr ""

View File

@ -1,5 +1,5 @@
# Gambas Project File 3.0
# Compiled with Gambas 2.99.0 (r2896)
# Compiled with Gambas 2.99.0 (r2917)
Title=Gambas 3
Startup=Project
StackTrace=1

View File

@ -2,6 +2,7 @@
{ Form Form
MoveScaled(0,2.1429,69,17)
Background = Color.Background
Icon = Picture["img/16/magic.png"]
Persistent = True
Border = False
@ -12,6 +13,7 @@
Arrangement = Arrange.Horizontal
Border = Border.Plain
{ timHelp #Timer
#MoveScaled(0,8)
Delay = 100
}
{ lvwComp ListView

View File

@ -398,7 +398,7 @@ Public Function Open(sDir As String, Optional bInAnotherWindow As Boolean) As Bo
Config = New Settings(sDir &/ ".settings")
Inc $iNoRefresh
ReadProject
ReadProject(bSave)
If Not ReadOnly Then
If Not Exist(Project.Dir &/ ".hidden") Then Project.InsertDirectory(Project.Dir &/ ".hidden")
If bSave Then WriteProject(True)
@ -2433,8 +2433,23 @@ End
'
' End
Private Sub ConvertComponent(sComp As String) As String
Select Case sComp
Case "gb.qt"
Return "gb.qt4"
Case "gb.qt.ext"
Return "gb.qt4.ext"
Case "gb.qt.kde.html"
Return "gb.qt4.webkit"
Default
Return sComp
End Select
End
Public Sub ReadProject()
Public Sub ReadProject(Optional bConvert As Boolean)
Dim hFic As File
Dim sLig As String
@ -2527,7 +2542,16 @@ Public Sub ReadProject()
Endif
Case "library"
If Not Libraries.Exist(sVal) Then Libraries.Add(sVal)
If bConvert Then
sVal = ConvertComponent(sVal)
If CComponent.All.Exist(sVal) Then
Components.Add(sVal)
Else
aMissing.Add(sVal)
Endif
Else
If Not Libraries.Exis(sVal) Then Libraries.Add(sVal)
Endif
Case "tabsize"
TabSize = Val(sVal)

View File

@ -449,7 +449,7 @@ void CCONTAINER_decide(CWIDGET *control, bool *width, bool *height)
*width = *height = FALSE;
if (!THIS)
if (!THIS || control->flag.ignore)
return;
if ((THIS_ARRANGEMENT->mode == ARRANGE_VERTICAL)

View File

@ -145,12 +145,7 @@ static void load_exported_class(ARCHIVE *arch)
static void load_archive(ARCHIVE *arch, const char *path)
{
if (path)
arch->arch = ARCH_open(path);
else
arch->arch = NULL;
//if (arch != ARCHIVE_main)
arch->arch = ARCH_open(path);
load_exported_class(arch);
}