diff options
-rw-r--r-- | TODO | 1 | ||||
-rw-r--r-- | ranger/__init__.py | 8 | ||||
-rw-r--r-- | ranger/colorschemes/__init__.py | 5 | ||||
-rw-r--r-- | ranger/ext/relpath.py | 26 | ||||
-rw-r--r-- | ranger/fm.py | 2 | ||||
-rw-r--r-- | ranger/shared/mimetype.py | 2 |
6 files changed, 13 insertions, 31 deletions
diff --git a/TODO b/TODO index 11d23a22..41b5497e 100644 --- a/TODO +++ b/TODO @@ -80,4 +80,5 @@ Ideas ( ) #33 10/01/08 accelerate mousewheel speed ( ) #45 10/01/18 hooks for events like setting changes ( ) #53 10/01/23 merge fm and environment + ( ) #68 10/03/10 threads, to seperate ui and loading diff --git a/ranger/__init__.py b/ranger/__init__.py index 61df678d..5ffbf998 100644 --- a/ranger/__init__.py +++ b/ranger/__init__.py @@ -41,4 +41,12 @@ sys.path.append(CONFDIR) USAGE = '%prog [options] [path/filename]' +def relpath(*paths): + """returns the path relative to rangers library directory""" + return os.path.join(RANGERDIR, *paths) + +def relpath_conf(*paths): + """returns the path relative to rangers configuration directory""" + return os.path.join(CONFDIR, *paths) + from ranger.__main__ import main diff --git a/ranger/colorschemes/__init__.py b/ranger/colorschemes/__init__.py index ab3a7da0..ed5413d8 100644 --- a/ranger/colorschemes/__init__.py +++ b/ranger/colorschemes/__init__.py @@ -23,10 +23,10 @@ from os.path import expanduser, dirname, exists, join __all__ = get_all_modules(dirname(__file__)) from ranger.colorschemes import * -from ranger.ext.relpath import relpath_conf +from ranger import relpath_conf if exists(relpath_conf('colorschemes')): - initpy = relpath_conf('colorschemes/__init__.py') + initpy = relpath_conf('colorschemes', '__init__.py') if not exists(initpy): open(initpy, 'w').write("""# Automatically generated: from ranger.ext.get_all_modules import get_all_modules @@ -41,4 +41,3 @@ __all__ = get_all_modules(dirname(__file__)) from colorschemes import * except ImportError: pass - diff --git a/ranger/ext/relpath.py b/ranger/ext/relpath.py deleted file mode 100644 index ddca89a3..00000000 --- a/ranger/ext/relpath.py +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright (C) 2009, 2010 Roman Zimbelmann <romanz@lavabit.com> -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. - -import os -import ranger - -def relpath(*paths): - """returns the path relative to rangers library directory""" - return os.path.join(ranger.RANGERDIR, *paths) - -def relpath_conf(*paths): - """returns the path relative to rangers configuration directory""" - return os.path.join(ranger.CONFDIR, *paths) - diff --git a/ranger/fm.py b/ranger/fm.py index aa1f0493..d2250347 100644 --- a/ranger/fm.py +++ b/ranger/fm.py @@ -19,7 +19,7 @@ from collections import deque from ranger.actions import Actions from ranger.container import Bookmarks from ranger.runner import Runner -from ranger.ext.relpath import relpath_conf +from ranger import relpath_conf from ranger.ext.get_executables import get_executables from ranger import __version__ from ranger.fsobject import Loader diff --git a/ranger/shared/mimetype.py b/ranger/shared/mimetype.py index 93015a73..49af9632 100644 --- a/ranger/shared/mimetype.py +++ b/ranger/shared/mimetype.py @@ -13,7 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -from ranger.ext.relpath import relpath +from ranger import relpath class MimeTypeAware(object): mimetypes = {} __initialized = False |