File tree Expand file tree Collapse file tree 1 file changed +3
-15
lines changed Expand file tree Collapse file tree 1 file changed +3
-15
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,9 @@ def mklist(obj):
27
27
28
28
class Settings (object ):
29
29
_file = resources .config_home ('settings' )
30
+ bookmarks = property (lambda self : mklist (self .values ['bookmarks' ]))
31
+ gui_state = property (lambda self : mkdict (self .values ['gui_state' ]))
32
+ recent = property (lambda self : mklist (self .values ['recent' ]))
30
33
31
34
def __init__ (self , verify = git .is_git_worktree ):
32
35
"""Load existing settings if they exist"""
@@ -39,7 +42,6 @@ def __init__(self, verify=git.is_git_worktree):
39
42
self .load ()
40
43
self .remove_missing ()
41
44
42
-
43
45
def remove_missing (self ):
44
46
missing_bookmarks = []
45
47
missing_recent = []
@@ -64,20 +66,6 @@ def remove_missing(self):
64
66
except :
65
67
pass
66
68
67
- # properties
68
- def _get_bookmarks (self ):
69
- return mklist (self .values ['bookmarks' ])
70
-
71
- def _get_gui_state (self ):
72
- return mkdict (self .values ['gui_state' ])
73
-
74
- def _get_recent (self ):
75
- return mklist (self .values ['recent' ])
76
-
77
- bookmarks = property (_get_bookmarks )
78
- gui_state = property (_get_gui_state )
79
- recent = property (_get_recent )
80
-
81
69
def add_bookmark (self , bookmark ):
82
70
"""Adds a bookmark to the saved settings"""
83
71
if bookmark not in self .bookmarks :
You can’t perform that action at this time.
0 commit comments