1
0
mirror of https://github.com/wting/autojump synced 2024-10-27 20:34:07 +00:00

updated installer

This commit is contained in:
Pierre Gueth 2009-03-27 12:04:59 +01:00
parent 6174509f28
commit 9b87282791
2 changed files with 7 additions and 5 deletions

View File

@ -1,3 +1,6 @@
sudo mkdir -p /usr/share/autojump/
sudo cp icon.png /usr/share/autojump/
sudo cp jumpapplet /usr/bin/
sudo cp autojump /usr/bin/
sudo cp autojump.1 /usr/share/man/man1/
if [ -d "/etc/profile.d" ]; then

View File

@ -22,8 +22,6 @@ def action(validator,name=None):
return wrapper
#validator helper
always=lambda x: True
def has_child_dir(dirname):
def wrapper(path):
return os.path.isdir(os.path.join(path,dirname))
@ -81,7 +79,8 @@ def popup(sender,button,activation):
menu.popup(None,None,gtk.status_icon_position_menu,button,activation,sender)
def init():
icon=gtk.status_icon_new_from_file("icon.png")
if os.path.isfile("icon.png"): icon=gtk.status_icon_new_from_file("icon.png")
elif os.path.isfile("/usr/share/autojump/icon.png"): icon=gtk.status_icon_new_from_file("/usr/share/autojump/icon.png")
icon.set_visible(True)
icon.connect("popup-menu",popup)
@ -105,14 +104,14 @@ def cmake(sender,path):
subprocess.Popen(['cmake-gui','.']).wait()
sys.exit()
@action(always)
@action(os.path.isdir)
def terminal(sender,path):
if not os.fork():
os.chdir(path)
subprocess.Popen(['gnome-terminal']).wait()
sys.exit()
@action(always,"navigateur")
@action(os.path.isdir,"navigateur")
def nautilus(sender,path):
if not os.fork():
subprocess.Popen(['nautilus',path]).wait()