Skip to content

Commit

Permalink
tidy up detail
Browse files Browse the repository at this point in the history
  • Loading branch information
quintijn committed Feb 16, 2024
1 parent 233b6ff commit 2d33ed4
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/unimacro/UnimacroGrammars/_folders.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
import natlink
from natlinkcore import readwritefile
from natlinkcore import natlinktimer
from natlinkcore import natlinkstatus
from dtactions.unimacro import extenvvars
from dtactions import messagefunctions as mess
from dtactions import natlinkclipboard
Expand All @@ -73,7 +74,7 @@
# import natlinkcore.natlinkutils as natut

thisDir = str(Path(__file__).parent)

status = natlinkstatus.NatlinkStatus()
# for getting unicode explorer window titles:
GetWindowText = ctypes.windll.user32.GetWindowTextW
GetWindowTextLength = ctypes.windll.user32.GetWindowTextLengthW
Expand All @@ -95,10 +96,6 @@
doRecentFolderCommand = True
# some child windows have to behave as top window (specified in ini file):
# note: title is converted to lowercase, only full title is recognised
try:
thisGrammar
except NameError:
thisGrammar = None

ancestor = natbj.IniGrammar
class ThisGrammar(ancestor):
Expand Down Expand Up @@ -298,7 +295,7 @@ def fillInstanceVariables(self):
if self.trackFoldersInterval:
print(f'track active folder every {interval:f.1} seconds')
self.recentfoldersDict = {}
inipath = self.ini.getFilename()
# inipath = self.ini.getFilename()
self.pickleChangingData = Path(status.getUnimacroDataDirectory())/"recentfoldersdata.pickle"

## automatic tracking of recent folders :
Expand Down Expand Up @@ -2017,6 +2014,7 @@ def getValidDirectory(self, f, remote):
return tryF
fparts.pop(0)
print('_folders, no valid remote folder found for %s and remote: %s'% (f, remote))
return ''

def getValidFile(self, f, remote):
_fdrive, fdir = os.path.splitdrive(f)
Expand All @@ -2028,6 +2026,7 @@ def getValidFile(self, f, remote):
return tryF
fparts.pop(0)
print('_folders, no valid remote file found for %s and remote: %s'% (f, remote))
return ''


def gotResults(self, words,fullResults):
Expand Down

0 comments on commit 2d33ed4

Please sign in to comment.