"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "comp/src/gb.desktop/.src/Main.module" between
gambas-3.16.2.tar.bz2 and gambas-3.16.3.tar.bz2

About: Gambas is a graphical development environment based on a Basic interpreter with object extensions, a bit like Visual Basic (requires Qt).

Main.module  (gambas-3.16.2.tar.bz2):Main.module  (gambas-3.16.3.tar.bz2)
skipping to change at line 104 skipping to change at line 104
Endif Endif
Next Next
End End
Private Function SearchPathVariable(sFileConfig As String, sDirectory As String) As String Private Function SearchPathVariable(sFileConfig As String, sDirectory As String) As String
Dim hFile As File Dim hFile As File
Dim sLine As String Dim sLine As String
Dim aLine As String[] Dim aLine As String[]
Dim sAltDirectory As String
Dim bFullPath As Boolean
sAltDirectory = "XDG_" & sDirectory & "_DIR"
hFile = Open sFileConfig For Input hFile = Open sFileConfig For Input
While Not Eof(hFile) While Not Eof(hFile)
Line Input #hFile, sLine Line Input #hFile, sLine
sLine = Trim(sLine) sLine = Trim(sLine)
If Not sLine Then Continue If Not sLine Then Continue
If Left(sLine) = "#" Then Continue If Left(sLine) = "#" Then Continue
If sLine Begins sAltDirectory Then
sDirectory = sAltDirectory
bFullPath = True
Break
Endif
If sLine Begins sDirectory Then Break If sLine Begins sDirectory Then Break
sLine = "" sLine = ""
Wend Wend
aLine = Scan(sLine, sDirectory & "=*") aLine = Scan(sLine, sDirectory & "=*")
If aLine.Count Then If aLine.Count Then
sLine = aLine[0] sLine = aLine[0]
If Left(sLine) = Chr$(34) Then sLine = Mid$(sLine, 2, -1) If Left(sLine) = Chr$(34) Then sLine = Mid$(sLine, 2, -1)
If sLine Begins "$HOME/" Then sLine = Replace(sLine, "$HOME", System.User.Ho me) If sLine Begins "$HOME/" Then sLine = Replace(sLine, "$HOME", System.User.Ho me)
If Not bFullPath Then sLine = User.Home &/ sLine
Return sLine Return sLine
Endif Endif
End End
Public Sub GetDesktop() As String Public Sub GetDesktop() As String
If Not $sDesktop Then If Not $sDesktop Then
If Application.Env["KDE_FULL_SESSION"] Then If Application.Env["KDE_FULL_SESSION"] Then
skipping to change at line 193 skipping to change at line 203
Dim sDir, sXdgConfigHome, sXdgConfigDirs, sFileConfig As String Dim sDir, sXdgConfigHome, sXdgConfigDirs, sFileConfig As String
sXdgConfigHome = Application.Env["XDG_CONFIG_HOME"] ' $XDG_CONFIG_HOME définie ? sXdgConfigHome = Application.Env["XDG_CONFIG_HOME"] ' $XDG_CONFIG_HOME définie ?
If Not sXdgConfigHome Then sXdgConfigHome = User.Home & "/.config" ' Sinon val . par défaut If Not sXdgConfigHome Then sXdgConfigHome = User.Home & "/.config" ' Sinon val . par défaut
sXdgConfigDirs = Application.Env["XDG_CONFIG_DIRS"] ' $XDG_CONFIG_DIRS définie ? sXdgConfigDirs = Application.Env["XDG_CONFIG_DIRS"] ' $XDG_CONFIG_DIRS définie ?
If Not sXdgConfigDirs Then sXdgConfigDirs = "/etc/xdg" ' Sinon val. par défaut If Not sXdgConfigDirs Then sXdgConfigDirs = "/etc/xdg" ' Sinon val. par défaut
sFileConfig = SearchPathConfig(sXdgConfigHome, sXdgConfigDirs) sFileConfig = SearchPathConfig(sXdgConfigHome, sXdgConfigDirs)
If sFileConfig Then If sFileConfig Then
sDir = SearchPathVariable(sFileConfig, "XDG_" & UCase(sType) & "_DIR") sDir = SearchPathVariable(sFileConfig, UCase(sType))
Else Else
sDir = System.User.Home &/ "Desktop" sDir = System.User.Home &/ "Desktop"
Endif Endif
Return sDir Return sDir
End End
Public Sub GetDataDir() As String[] Public Sub GetDataDir() As String[]
skipping to change at line 225 skipping to change at line 235
End End
Public Sub Main() Public Sub Main()
'Dim hMime As DesktopMime 'Dim hMime As DesktopMime
'DesktopFile.FromMime("application/vnd.oasis.opendocument.text") 'DesktopFile.FromMime("application/vnd.oasis.opendocument.text")
' hMime = DesktopMime.FromFile("/bin/ls") ' hMime = DesktopMime.FromFile("/bin/ls")
' Print hMime.Type ' Print hMime.Type
Print Desktop.Count Print Desktop.Path
Print Desktop.Showing
Desktop.Showing = True
End End
' Public Sub X11_PropertyNotify((Window) As Integer, Atom As Integer) ' Public Sub X11_PropertyNotify((Window) As Integer, Atom As Integer)
' '
' 'Debug Window;; X11.GetAtomName(Atom) ' 'Debug Window;; X11.GetAtomName(Atom)
' '
' If Window = X11.RootWindow And If Atom = _NET_CLIENT_LIST Then ' If Window = X11.RootWindow And If Atom = _NET_CLIENT_LIST Then
' Endif ' Endif
' '
 End of changes. 5 change blocks. 
4 lines changed or deleted 12 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)