[GB.FORM]

* BUG: FileChooser: The Paths property now returns the selected path in 
  single mode and not a void array anymore.

[GB.FORM.DIALOG]
* BUG: Dialog.Open() in multiple mode works now.

[GB.FORM.MDI]
* BUG: Toolbar configuration dialog: the toolbar elements with a short text 
  are correctly displayed now.


git-svn-id: svn://localhost/gambas/trunk@6012 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
Benoît Minisini 2013-12-21 09:38:09 +00:00
parent 87df43bd18
commit ae979d6206
6 changed files with 35 additions and 18 deletions

View file

@ -1,8 +1,8 @@
# Gambas Project File 3.0
# Compiled with Gambas 3.4.0
# Compiled with Gambas 3.5.90
Title=Enhanced standard dialogs
Startup=Main
Version=3.4.0
Version=3.5.90
VersionFile=1
Component=gb.image
Component=gb.gui

View file

@ -79,19 +79,31 @@ End
Public Sub fchChoose_Activate()
Dim sPath As String
Dim aPath As String[]
If fchChoose.Multi Then
aPath = fchChoose.SelectedPaths
If aPath.Count = 0 Then Return
Paths = aPath
Else
sPath = fchChoose.SelectedPath
If Not sPath Or If IsDir(sPath) Then Return
Dialog.AutoExt = chkAutoExt.Value
If Dialog.AutoExt Then sPath = SetExtension(sPath)
Dialog.Path = sPath
If Not fchChoose.ReadOnly Then
If Exist(sPath) Then
If Message.Warning(("This file already exists.\n\nDo you want to overwrite it?"), ("&Overwrite"), ("Cancel")) = 2 Then Return
Endif
Endif
sPath = fchChoose.SelectedPath
If Not sPath Or If IsDir(sPath) Then Return
Dialog.AutoExt = chkAutoExt.Value
If Dialog.AutoExt Then sPath = SetExtension(sPath)
Dialog.Path = sPath
If fchChoose.Multi Then Paths = fchChoose.SelectedPaths
If Not fchChoose.ReadOnly Then
If Exist(sPath) Then
If Message.Warning(("This file already exists.\n\nDo you want to overwrite it?"), ("&Overwrite"), ("Cancel")) = 2 Then Return
Endif
Endif
Me.Close(True)
End

View file

@ -7,7 +7,7 @@ Public Sub Main()
' Dialog.AutoExt = True
' If Dialog.SaveFile() Then Return
' Print Dialog.Path
Dialog.OpenFile
Dialog.OpenFile(True)
End

View file

@ -75,11 +75,11 @@ msgstr "Annuler"
msgid "This shortcut is already used by the following action:"
msgstr "Ce raccourci est déjà utilisé par l'action suivante :"
#: FToolBar.class:1179
#: FToolBar.class:1195
msgid "Configure &1 toolbar"
msgstr "Configurer la barre d'outils &1"
#: FToolBar.class:1181
#: FToolBar.class:1197
msgid "Configure main toolbar"
msgstr "Configurer la barre d'outils principale"

View file

@ -159,8 +159,7 @@ Private Sub DrawItem(hCtrl As Control, sAction As String, bScreenshot As Boolean
Dim bText As Boolean
'If hItem.Tag Then hAction = MAction.Actions[hItem.Tag]
bText = Draw.W > (Draw.H * 2)
bText = Draw.W > Draw.H
Draw.FillRect(1, 1, Draw.W - 2, Draw.H - 2, Color.Background)

View file

@ -380,12 +380,18 @@ Public Function GetPaths() As String[]
Dim aPath As New String[]
Dim sFile As String
Dim sPath As String
If GetMulti() Then
For Each sFile In fvwChoose.Selection
aPath.Add(dvwChoose.Current &/ sFile)
Next
Else
sPath = GetPath()
If sPath Then aPath.Add(sPath)
Endif