[GB.DESKTOP]

* NEW: Start supporting KDE5.


git-svn-id: svn://localhost/gambas/trunk@7069 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
Benoît Minisini 2015-05-10 10:48:09 +00:00
parent c88939b765
commit 145f4c1442
4 changed files with 12 additions and 10 deletions

View file

@ -17,11 +17,11 @@ Path="gb.desktop.gambas"
LastCommit="[GB.DESKTOP]\n* BUG: Change the Mime loading code so it not fail on the first readed glob2 file\n and read all the available files.\n---- Cette ligne et les suivantes seront ignorées ----\n\nM .project\nM .settings\nM .src/DesktopMime.class\nM .src/Tests/Form11.form\nA .src/Tests/Module1.module\nM .startup"
[OpenFile]
File[1]=".src/Desktop.class:84.13"
Active=3
File[2]=".src/_Desktop_Passwords.class:71.46"
File[1]=".src/Desktop.class:239.22"
Active=2
File[2]=".src/_Desktop_Passwords.class:120.2"
Count=15
File[3]=".src/Main.module:10.62"
File[3]=".src/Main.module:122.2"
File[4]="xdg-utils/xdg-open:343.37"
File[5]=".src/DesktopMime.class:107.2"
File[6]=".src/DesktopFile.class:462.0"

View file

@ -193,6 +193,8 @@ Static Private Sub GetDesktop() As String
If Application.Env["KDE_FULL_SESSION"] Then
If Application.Env["KDE_SESSION_VERSION"] = "4" Then
$sDesktop = "KDE4"
Else If Application.Env["KDE_SESSION_VERSION"] = "5" Then
$sDesktop = "KDE5"
Else
$sDesktop = "KDE"
Endif
@ -235,7 +237,7 @@ Static Public Sub OpenTerminal(Optional {Dir} As String) ', Optional Command As
Case "KDE"
sExec = "konsole"
Case "KDE4"
Case "KDE4", "KDE5"
If {Dir} Then
sExec = "konsole --workdir " & Shell$({Dir})
bNoDir = True

View file

@ -32,7 +32,7 @@ Private Sub OpenWallet()
$sSecretTool = System.Find("secret-tool")
If Not $sSecretTool Then Component.Load("gb.desktop.gnome.keyring")
Case "KDE4"
Case "KDE4", "KDE5"
Shell "qdbus org.kde.kwalletd /modules/kwalletd localWallet" To sResult
sWallet = Trim(Split(sResult, "\n")[0])
@ -75,7 +75,7 @@ Public Sub _get((Key) As String) As String
Return _Keyring.GetPassword(Key)
Endif
Case "KDE4"
Case "KDE4", "KDE5"
Shell Subst("qdbus org.kde.kwalletd /modules/kwalletd readPassword &1 &2 &3 &4", $sKDEWalletId, Shell$(Application.Name), Shell$(Key), Shell$(Application.Title)) To sResult
sResult = Replace(sResult, "\n", "")
@ -107,7 +107,7 @@ Public Sub _put(Value As String, (Key) As String)
_Keyring.SetPassword(Key, Value)
Endif
Case "KDE4"
Case "KDE4", "KDE5"
Shell Subst("qdbus org.kde.kwalletd /modules/kwalletd writePassword &1 &2 &3 &4 &5 >/dev/null 2>&&1", $sKDEWalletId, Shell$(Application.Name), Shell$(Key), Shell$(Value), Shell$(Application.Title)) Wait
@ -119,7 +119,7 @@ Private Function Enabled_Read() As Boolean
Select Case Desktop.Type
Case "KDE", "KDE4"
Case "KDE", "KDE4", "KDE5"
Return True

View file

@ -2,7 +2,7 @@ Module1
Desktop-neutral routines from Portland project
0
0
3.6.90
3.7.90
gb.image
gb.gui