From 3f6569bd0695384903ab60b4cf6883a7de1ca8e9 Mon Sep 17 00:00:00 2001 From: gambas Date: Tue, 10 Oct 2017 18:44:00 +0200 Subject: [PATCH] Dialog.AskPassword() is a new method that displays a modal dialog box that asks for a user name and a password, and that can remember them. [GB.FORM.DIALOG] * NEW: Dialog.AskPassword() is a new method that displays a modal dialog box that asks for a user name and a password, and that can remember them provided that the gb.settings and gb.desktop components are loaded and the Dialog.Key property is set. * NEW: Dialog.User is a new property that returns the user entered in the ask password dialog. * NEW: Dialog.Password is a new property that returns the password entered in the ask password dialog. * NEW: Dialog.NoUser is a new property that tells the ask password dialog not to ask for a user. --- comp/src/gb.form.dialog/.icon.png | Bin 3754 -> 10656 bytes comp/src/gb.form.dialog/.lang/fr.mo | Bin 655 -> 902 bytes comp/src/gb.form.dialog/.lang/fr.po | 38 +++++-- comp/src/gb.form.dialog/.project | 4 +- comp/src/gb.form.dialog/.src/Dialog.class | 40 +++++++ .../gb.form.dialog/.src/FAskPassword.class | 103 ++++++++++++++++++ .../src/gb.form.dialog/.src/FAskPassword.form | 76 +++++++++++++ comp/src/gb.form.dialog/.src/Main.module | 8 +- 8 files changed, 258 insertions(+), 11 deletions(-) create mode 100644 comp/src/gb.form.dialog/.src/FAskPassword.class create mode 100644 comp/src/gb.form.dialog/.src/FAskPassword.form diff --git a/comp/src/gb.form.dialog/.icon.png b/comp/src/gb.form.dialog/.icon.png index 8748600ba47d0a4a6ca32a923a53fa6a66dfa7fd..4e185c57a4fcbd3c17a2c8164a10a2264e64b18a 100644 GIT binary patch literal 10656 zcmb_?byQT**Y+JcC8b+LknUy}kWx}oI;4>vLXd7L0qI7NkOoO*kOoOXKsrVckQA69 zzsv8d_gm}z^IPlAnqkgx&c0`#{p@Ey`^IW(st^;<5dZ){tfupXP}KDP+IIJnoPNE$t<*|qud=K`IpFB}hU{S_8Agp*o8fezmc>S@n`bbWjf%>=x)b}E9TC{K1^ZIz4Gmh*NN(Ro% z{l?(vja`k^52=b<^qwd(9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U^u_wo)hGA{kk)mJ_KA5O!B U3REXv8UO$Q07*qoM6N<$g7Lxw&Hw-a diff --git a/comp/src/gb.form.dialog/.lang/fr.mo b/comp/src/gb.form.dialog/.lang/fr.mo index 637deb55d211c008591d5b4c410e75b524d9b3b8..5440a4f3705375d5c81280f00961c188c8abb9b2 100644 GIT binary patch delta 515 zcmYk%J4*vW5C`x{OpKaDd>|+WTpL9&5Vi1yg$5B3i9}+5W><5Ny9>K}iAW%wr6Px& zAHeTnZ)GE>U}dGqL@LJLFtEx`>evJoG80+}b(Naj)sRx&aN=J0! z7}E;0r1F^Zly|PQX!MruzYY==qja`Ob^tLK5bp$HVIV#N#B4x(1BjV`_&yNx z0`VgtHV5JlK>QMjH5eiKgn)`ffqYpY4YI=+NCOdrHIR^CV31?512RAw!+|tV4;U~5 zNfsbxn)p#z7-SnrCxe=QS!z*vQD#Z%WGhA)CV%hAy^QXYZ!$V@8(8WZ8z>kUTA3J5 RR%2Q*`7V\n" "Language: fr\n" "MIME-Version: 1.0\n" @@ -11,13 +12,31 @@ msgstr "" #: .project:1 msgid "Enhanced standard dialogs" -msgstr "" +msgstr "-" -#: FDirDialog.form:32 FFontDialog.form:35 FInputDate.form:41 +#: FAskPassword.form:22 +msgid "Authentication" +msgstr "Identification" + +#: FAskPassword.form:51 +msgid "User" +msgstr "Utilisateur" + +#: FAskPassword.form:65 +msgid "Password" +msgstr "Mot de passe" + +#: FAskPassword.form:78 +msgid "Remember password" +msgstr "Se souvenir du mot de passe" + +#: FAskPassword.form:98 FDirDialog.form:32 FFontDialog.form:35 +#: FInputDate.form:41 msgid "OK" msgstr "OK" -#: FDirDialog.form:38 FFileDialog.class:107 FFontDialog.form:41 FInputDate.form:47 +#: FAskPassword.form:104 FDirDialog.form:38 FFileDialog.class:107 +#: FFontDialog.form:41 FInputDate.form:47 msgid "Cancel" msgstr "Annuler" @@ -26,8 +45,14 @@ msgid "&Overwrite" msgstr "&Remplacer" #: FFileDialog.class:107 -msgid "This file already exists.\n\nDo you want to overwrite it?" -msgstr "Ce fichier existe déjà.\n\nDésirez-vous le remplacer ?" +msgid "" +"This file already exists.\n" +"\n" +"Do you want to overwrite it?" +msgstr "" +"Ce fichier existe déjà.\n" +"\n" +"Désirez-vous le remplacer ?" #: FFileDialog.form:22 msgid "Automatic extension" @@ -36,4 +61,3 @@ msgstr "Extension automatique" #: FFontDialog.form:12 msgid "Select a font" msgstr "Sélectionnez une police" - diff --git a/comp/src/gb.form.dialog/.project b/comp/src/gb.form.dialog/.project index f6f2fe39a..6ccebd516 100644 --- a/comp/src/gb.form.dialog/.project +++ b/comp/src/gb.form.dialog/.project @@ -7,9 +7,11 @@ VersionFile=1 Component=gb.image Component=gb.gui Component=gb.form +Component=gb.desktop.x11 +Component=gb.desktop Component=gb.settings Authors="Benoît Minisini\nDavid Villalobos Cambronero" -Environment="GB_GUI=gb.gtk3" +Environment="GB_GUI=gb.qt5" TabSize=2 Translate=1 Language=en diff --git a/comp/src/gb.form.dialog/.src/Dialog.class b/comp/src/gb.form.dialog/.src/Dialog.class index b8de89f2f..450b13526 100644 --- a/comp/src/gb.form.dialog/.src/Dialog.class +++ b/comp/src/gb.form.dialog/.src/Dialog.class @@ -11,6 +11,10 @@ Static Property FixedOnly As Boolean Static Property Key As String +Static Property User As String +Static Property Read Password As String +Static Property NoUser As Boolean + Static Private $sKey As String Static Public Function OpenFile(Optional Multi As Boolean) As Boolean @@ -100,3 +104,39 @@ Static Private Sub Key_Write(Value As String) $sKey = Value End + +Static Public Sub AskPassword() As Boolean + + Return FAskPassword.Run() + +End + +Static Private Function Password_Read() As String + + Return FAskPassword.Password + +End + +Static Private Function NoUser_Read() As Boolean + + Return FAskPassword.NoUser + +End + +Static Private Sub NoUser_Write(Value As Boolean) + + FAskPassword.NoUser = Value + +End + +Static Private Function User_Read() As String + + Return FAskPassword.User + +End + +Static Private Sub User_Write(Value As String) + + FAskPassword.User = Value + +End diff --git a/comp/src/gb.form.dialog/.src/FAskPassword.class b/comp/src/gb.form.dialog/.src/FAskPassword.class new file mode 100644 index 000000000..a403e6d0a --- /dev/null +++ b/comp/src/gb.form.dialog/.src/FAskPassword.class @@ -0,0 +1,103 @@ +' Gambas class file + +Class Desktop + +Static Public NoUser As Boolean +Static Public (User) As String +Static Public Password As String + +Private $bHasDesktop As Boolean +Private $bHasSettings As Boolean +Private $sKey As String + +Public Sub Run() As Boolean + + ' Dim hWindow As Window + Dim bRet As Integer + Dim iBusy As Integer + + ' hWindow = New Window + ' hWindow.Move(0, 0, Screen.Width, Screen.Height) + ' hWindow.Background = Color.Black + ' hWindow.Opacity = 40 + ' hWindow.Border = False + ' hWindow.SkipTaskbar = True + ' hWindow.Show + + iBusy = Application.Busy + Application.Busy = 0 + + bRet = Not Me.ShowModal() + + Application.Busy = iBusy + + ' hWindow.Close + + Return bRet + +End + +Public Sub btnOK_Click() + + {User} = txtUser.Text + Password = txtPassword.Text + + If $sKey Then + Settings[$sKey &/ "User"] = txtUser.Text + Settings[$sKey &/ "Remember"] = chkRemember.Value + If $bHasDesktop And If chkRemember.Value Then + Desktop.Passwords[$sKey] = txtPassword.Text + Endif + Endif + + Me.Close(True) + +End + +Public Sub btnCancel_Click() + + Me.Close + +End + + +Public Sub Form_Open() + + $bHasSettings = Component.IsLoaded("gb.settings") + $bHasDesktop = Component.IsLoaded("gb.desktop") + + If Dialog.Title Then Me.Title = Dialog.Title + + If $bHasSettings And If Dialog.Key Then $sKey = "gb.form.dialog/FAskPassword/" &/ Dialog.Key + + If NoUser Then + txtUser.Enabled = False + Else If $sKey Then + txtUser.Text = Settings[$sKey &/ "User"] + Else + txtUser.Text = {User} + Endif + + If $bHasDesktop And If $sKey Then + chkRemember.Show + chkRemember.Value = Settings[$sKey &/ "Remember", False] + If chkRemember.Value Then + txtPassword.Text = Desktop.Passwords[$sKey] + Endif + Else + panPassword.H -= chkRemember.H + Endif + + If txtUser.Length Or If NoUser Then + txtPassword.SetFocus + Else + txtUser.SetFocus + Endif + +End + +Public Sub Form_Close() + + NoUser = False + +End diff --git a/comp/src/gb.form.dialog/.src/FAskPassword.form b/comp/src/gb.form.dialog/.src/FAskPassword.form new file mode 100644 index 000000000..ea23cb123 --- /dev/null +++ b/comp/src/gb.form.dialog/.src/FAskPassword.form @@ -0,0 +1,76 @@ +# Gambas Form File 3.0 + +{ Form Form + MoveScaled(0,0,57,21) + Text = ("Authentication") + Icon = Picture["icon:/small/security"] + Resizable = False + Stacking = Window.Above + Arrangement = Arrange.Vertical + AutoResize = True + Spacing = True + Margin = True + { panPassword HBox + MoveScaled(1,1,52,13) + Spacing = True + { PictureBox1 PictureBox + MoveScaled(1,1,8,11) + Picture = Picture["icon:/huge/security"] + AutoResize = True + } + { Panel4 VBox + MoveScaled(9,0,41,13) + Expand = True + Spacing = True + { HBox2 HBox + MoveScaled(0,0,39,4) + { Label1 Label + MoveScaled(0,0,13,4) + Text = ("User") + } + { txtUser TextBox + MoveScaled(21,0,17,4) + Expand = True + } + } + { HBox3 HBox + MoveScaled(0,5,40,4) + { Label2 Label + MoveScaled(0,0,13,4) + Text = ("Password") + } + { txtPassword TextBox + MoveScaled(21,0,17,4) + Expand = True + Password = True + } + } + { chkRemember CheckBox + MoveScaled(0,9,23,4) + Visible = False + Text = ("Remember password") + } + } + } + { Panel2 Panel + MoveScaled(20,15,3,1) + } + { HBox1 HBox + MoveScaled(1,16,51,4) + Spacing = True + { Panel1 Panel + MoveScaled(3,0,2,4) + Expand = True + } + { btnOK Button + MoveScaled(11,0,16,4) + Text = ("OK") + Default = True + } + { btnCancel Button + MoveScaled(30,0,16,4) + Text = ("Cancel") + Cancel = True + } + } +} diff --git a/comp/src/gb.form.dialog/.src/Main.module b/comp/src/gb.form.dialog/.src/Main.module index 8cca0e35b..37ff46a83 100644 --- a/comp/src/gb.form.dialog/.src/Main.module +++ b/comp/src/gb.form.dialog/.src/Main.module @@ -2,12 +2,14 @@ Public Sub Main() - ' Dialog.Title = "Save document" - Dialog.Filter = ["*.tar.gz", "Archive files", "*.png", "PNG files", "*.jpg;*.jpeg", "JPEG files", "*.bmp", "BMP files"] + Dialog.Title = "Commit" + ' Dialog.Filter = ["*.tar.gz", "Archive files", "*.png", "PNG files", "*.jpg;*.jpeg", "JPEG files", "*.bmp", "BMP files"] ' Dialog.AutoExt = True ' If Dialog.SaveFile() Then Return ' Print Dialog.Path - Dialog.OpenFile(True) + Dialog.Key = "test" + Dialog.NoUser = True + Dialog.AskPassword() End