summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-04-23 13:32:44 +0200
committerhut <hut@lavabit.com>2010-04-23 13:33:45 +0200
commitc135aa1c193877d06e6a01f1445577811786f479 (patch)
tree50955de643994f110ace72a5f195e3a8fff95ad3
parent1f2ffbb34f63ffb0440795c4a6a0b9d93b3ab84f (diff)
downloadranger-c135aa1c193877d06e6a01f1445577811786f479.tar.gz
main: new function "load_apps"
-rw-r--r--ranger/__main__.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/ranger/__main__.py b/ranger/__main__.py
index 3ae71fc0..f22c2336 100644
--- a/ranger/__main__.py
+++ b/ranger/__main__.py
@@ -127,6 +127,19 @@ def load_settings(fm, clean):
 	fm.apps = apps.CustomApplications()
 
 
+def load_apps(fm, clean):
+	if not clean:
+		allow_access_to_confdir(ranger.arg.confdir, True)
+		try:
+			import apps
+		except ImportError:
+			from ranger.defaults import apps
+		allow_access_to_confdir(ranger.arg.confdir, False)
+	else:
+		from ranger.defaults import apps
+	fm.apps = apps.CustomApplications()
+
+
 def main():
 	"""initialize objects and run the filemanager"""
 	try:
ref='#n21'>21
22
23
24
25
26
27
28
29
30