Skip to content

Commit

Permalink
Change how icon paths or determined for #167
Browse files Browse the repository at this point in the history
  • Loading branch information
jisaacks committed May 29, 2014
1 parent e5450eb commit ef6080f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions git_gutter.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ def lines_removed(self, lines):
self.bind_icons('deleted_dual', dual_lines)

def plugin_dir(self):
return os.path.split(os.path.dirname(os.path.realpath(__file__)))[1]
path = os.path.realpath(__file__)
root = os.path.split(os.path.dirname(path))[1]
return os.path.splitext(root)[0]

def icon_path(self, icon_name):
if icon_name in ['deleted_top','deleted_bottom','deleted_dual']:
Expand All @@ -89,7 +91,7 @@ def icon_path(self, icon_name):
path = 'Packages'
extn = '.png'

return os.path.join(path, self.plugin_dir(), 'icons', icon_name + extn)
return "/".join([path, self.plugin_dir(), 'icons', icon_name + extn])

def bind_icons(self, event, lines):
regions = self.lines_to_regions(lines)
Expand Down

0 comments on commit ef6080f

Please sign in to comment.