[DEVELOPMENT ENVIRONMENT]
* BUG: Be more careful when renaming the code after a control rename. [GB.DESKTOP] * BUG: Search in LXDE mime info cache files first if the current desktop is LXDE. git-svn-id: svn://localhost/gambas/trunk@5144 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
78081342bc
commit
6faa6fc510
3 changed files with 36 additions and 5 deletions
|
@ -3185,6 +3185,7 @@ Public Sub RenameControl(sOld As String, sNew As String)
|
|||
Dim iInd As Integer
|
||||
Dim sSym As String
|
||||
Dim bChange As Boolean
|
||||
Dim bInProc As Boolean
|
||||
|
||||
sOld = UCase(sOld)
|
||||
|
||||
|
@ -3195,6 +3196,23 @@ Public Sub RenameControl(sOld As String, sNew As String)
|
|||
sLine = Editor.Lines[iLine].Text
|
||||
aSym = Highlight.Analyze(sLine)
|
||||
bChange = False
|
||||
|
||||
If Not bInProc Then
|
||||
If IsCurrentProc() Then
|
||||
bInProc = True
|
||||
Else
|
||||
Continue
|
||||
Endif
|
||||
Else
|
||||
If IsCurrentEndProc() Then
|
||||
bInProc = False
|
||||
Continue
|
||||
Endif
|
||||
Endif
|
||||
|
||||
If aSym.Count Then
|
||||
If aSym[0] = "Dim" Then Continue
|
||||
Endif
|
||||
|
||||
For iInd = aSym.Max DownTo 0
|
||||
|
||||
|
@ -3206,7 +3224,12 @@ Public Sub RenameControl(sOld As String, sNew As String)
|
|||
If Not (sSym Begins (sOld & "_")) Then Continue
|
||||
Else
|
||||
If iInd > 0 Then
|
||||
If aSym[iInd - 1] = "." Or If aSym[iInd - 1] = "!" Then Continue
|
||||
sSym = aSym[iInd - 1]
|
||||
If sSym = "." Then
|
||||
If iInd <= 1 Or If aSym[iInd - 2] <> "ME" Then Continue
|
||||
Else If sSym = "!" Or If sSym = "AS" Or If sSym = "NEW" Then
|
||||
Continue
|
||||
Endif
|
||||
Endif
|
||||
Endif
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Gambas Project File 3.0
|
||||
# Compiled with Gambas 3.2.90
|
||||
# Compiled with Gambas 3.3.0
|
||||
Title=Desktop-neutral routines from Portland project
|
||||
Startup=Main
|
||||
Version=3.2.90
|
||||
|
|
|
@ -140,6 +140,7 @@ Public Sub Run(sPath As String)
|
|||
sExec = Replace(sExec, "%u", sPath)
|
||||
sExec = Replace(sExec, "%F", sPath)
|
||||
sExec = Replace(sExec, "%f", sPath)
|
||||
'' TODO: implement %i, %c & %k
|
||||
sExec = Replace(sExec, "%i", "")
|
||||
sExec = Replace(sExec, "%c", $sName)
|
||||
sExec = Replace(sExec, "%k", $sName)
|
||||
|
@ -273,10 +274,17 @@ Static Public Sub FindMime(MimeType As String) As DesktopFile[]
|
|||
|
||||
For Each sMime In aMime
|
||||
|
||||
sList = FindInMimeInfoCache("~/.local/share/applications/mimeinfo.cache", sMime)
|
||||
sList = ""
|
||||
|
||||
If Desktop.Type = "LXDE" Then
|
||||
If Not sList Then sList = FindInMimeInfoCache("~/.local/share/applications/mimeapps.list", sMime)
|
||||
Endif
|
||||
If Not sList Then sList = FindInMimeInfoCache("~/.local/share/applications/mimeinfo.cache", sMime)
|
||||
|
||||
If Desktop.Type = "LXDE" Then
|
||||
If Not sList Then sList = FindInMimeInfoCache("/usr/share/applications/mimeapps.list", sMime)
|
||||
Endif
|
||||
If Not sList Then sList = FindInMimeInfoCache("/usr/share/applications/mimeinfo.cache", sMime)
|
||||
If Not sList Then sList = FindInMimeInfoCache("~/.local/share/applications/mimeapps.list", sMime)
|
||||
If Not sList Then sList = FindInMimeInfoCache("/usr/share/applications/mimeapps.list", sMime)
|
||||
|
||||
For Each sList In Split(sList, ";", "", True)
|
||||
hProg = DesktopFile[sList]
|
||||
|
|
Loading…
Reference in a new issue