name consistency and method placement changes
This commit is contained in:
parent
870f40de3c
commit
e9bd2440b7
@ -119,7 +119,7 @@ class WindowController:
|
||||
if window.id == win_id:
|
||||
return window.get_views_count()
|
||||
|
||||
def return_views_from_window(self, win_id):
|
||||
def get_views_from_window(self, win_id):
|
||||
for window in self.windows:
|
||||
if window.id == win_id:
|
||||
return window.get_all_views()
|
||||
|
@ -7,6 +7,9 @@ import os
|
||||
|
||||
|
||||
class Path:
|
||||
def get_home(self):
|
||||
return os.path.expanduser("~") + self.subpath
|
||||
|
||||
def get_path(self):
|
||||
return "/" + "/".join(self.path)
|
||||
|
||||
@ -41,6 +44,3 @@ class Path:
|
||||
path = list( filter(None, home.replace("\\", "/").split('/')) )
|
||||
self.path = path
|
||||
self.load_directory()
|
||||
|
||||
def get_home(self):
|
||||
return os.path.expanduser("~") + self.subpath
|
||||
|
@ -91,6 +91,25 @@ class View(Settings, Launcher, Icon, Path):
|
||||
data.append([arr, self.hash_text(arr)])
|
||||
return data
|
||||
|
||||
def is_folder_locked(self, hash):
|
||||
if self.lock_folder:
|
||||
path_parts = self.get_path().split('/')
|
||||
file = self.get_path_part_from_hash(hash)
|
||||
|
||||
# Insure chilren folders are locked too.
|
||||
lockedFolderInPath = False
|
||||
for folder in self.locked_folders:
|
||||
if folder in path_parts:
|
||||
lockedFolderInPath = True
|
||||
break
|
||||
|
||||
return (file in self.locked_folders or lockedFolderInPath)
|
||||
else:
|
||||
return False
|
||||
|
||||
|
||||
|
||||
|
||||
def get_path_part_from_hash(self, hash):
|
||||
files = self.get_files()
|
||||
file = None
|
||||
@ -122,24 +141,6 @@ class View(Settings, Launcher, Icon, Path):
|
||||
}
|
||||
}
|
||||
|
||||
def is_folder_locked(self, hash):
|
||||
if self.lock_folder:
|
||||
path_parts = self.get_path().split('/')
|
||||
file = self.get_path_part_from_hash(hash)
|
||||
|
||||
# Insure chilren folders are locked too.
|
||||
lockedFolderInPath = False
|
||||
for folder in self.locked_folders:
|
||||
if folder in path_parts:
|
||||
lockedFolderInPath = True
|
||||
break
|
||||
|
||||
return (file in self.locked_folders or lockedFolderInPath)
|
||||
else:
|
||||
return False
|
||||
|
||||
|
||||
|
||||
def get_pixbuf_icon_str_combo(self):
|
||||
data = []
|
||||
dir = self.get_current_directory()
|
||||
|
Loading…
Reference in New Issue
Block a user