@@ -73,10 +73,6 @@ def url_with_search(self):
7373 url = "%s#q=%s" % (self .app_url , self .search )
7474 return url
7575
76- def create_settings_path (self ):
77- if not os .path .exists (self .settings_path ()):
78- os .makedirs (self .settings_path ())
79-
8076 def settings_path (self , filepath = '' ):
8177 root = "%s/devdocs-desktop" % os .path .expanduser ('~/.config' )
8278 return os .path .join (root , filepath )
@@ -85,6 +81,14 @@ def file_path(self, filepath):
8581 root = os .path .dirname (os .path .realpath (__file__ ))
8682 return os .path .join (root , filepath )
8783
84+ def toggle_save_button (self , visible ):
85+ self .header_save .set_visible (visible )
86+ self .header_search .set_visible (not visible )
87+
88+ def create_settings_path (self ):
89+ if not os .path .exists (self .settings_path ()):
90+ os .makedirs (self .settings_path ())
91+
8892 def inject_custom_styles (self ):
8993 style = open (self .file_path ('styles/user.css' ), 'r' ).read ()
9094 frame = WebKit2 .UserContentInjectedFrames .ALL_FRAMES
@@ -101,9 +105,6 @@ def enable_persistent_cookies(self):
101105 self .cookies .set_accept_policy (policy )
102106 self .cookies .set_persistent_storage (filepath , storage )
103107
104- def toggle_save_button (self , visible ):
105- self .header_save .set_visible (visible )
106- self .header_search .set_visible (not visible )
107108
108109 def on_window_main_destroy (self , _event ):
109110 self .quit ()
0 commit comments