comparison sat/core/constants.py @ 2628:779351da2c13

core, frontends: replaced org\.goffi namespaces by org.salutatoi + fixed generation: generation of D-Bus bridge has been broken by black formatting tool, this patch fixes this.
author Goffi <goffi@goffi.org>
date Sun, 01 Jul 2018 20:37:58 +0200
parents 56f94936df1e
children 712cb4ff3e13
comparison
equal deleted inserted replaced
2627:163aab916bcf 2628:779351da2c13
170 170
171 ## Configuration ## 171 ## Configuration ##
172 if ( 172 if (
173 BaseDirectory 173 BaseDirectory
174 ): # skipped when xdg module is not available (should not happen in backend) 174 ): # skipped when xdg module is not available (should not happen in backend)
175 if "org.goffi.cagou.cagou" in BaseDirectory.__file__: 175 if "org.salutatoi.cagou.cagou" in BaseDirectory.__file__:
176 # FIXME: hack to make config read from the right location on Android 176 # FIXME: hack to make config read from the right location on Android
177 # TODO: fix it in a more proper way 177 # TODO: fix it in a more proper way
178 178
179 # we need to use Android API to get downloads directory 179 # we need to use Android API to get downloads directory
180 import os.path 180 import os.path
182 182
183 Environment = autoclass("android.os.Environment") 183 Environment = autoclass("android.os.Environment")
184 184
185 BaseDirectory = None 185 BaseDirectory = None
186 DEFAULT_CONFIG = { 186 DEFAULT_CONFIG = {
187 "local_dir": "/data/data/org.goffi.cagou.cagou/app", 187 "local_dir": "/data/data/org.salutatoi.cagou.cagou/app",
188 "media_dir": "/data/data/org.goffi.cagou.cagou/files/app/media", 188 "media_dir": "/data/data/org.salutatoi.cagou.cagou/files/app/media",
189 # FIXME: temporary location for downloads, need to call API properly 189 # FIXME: temporary location for downloads, need to call API properly
190 "downloads_dir": os.path.join( 190 "downloads_dir": os.path.join(
191 Environment.getExternalStoragePublicDirectory( 191 Environment.getExternalStoragePublicDirectory(
192 Environment.DIRECTORY_DOWNLOADS 192 Environment.DIRECTORY_DOWNLOADS
193 ).getAbsolutePath(), 193 ).getAbsolutePath(),
195 ), 195 ),
196 "pid_dir": "%(local_dir)s", 196 "pid_dir": "%(local_dir)s",
197 "log_dir": "%(local_dir)s", 197 "log_dir": "%(local_dir)s",
198 } 198 }
199 CONFIG_FILES = [ 199 CONFIG_FILES = [
200 "/data/data/org.goffi.cagou.cagou/files/app/android/" 200 "/data/data/org.salutatoi.cagou.cagou/files/app/android/"
201 + APP_NAME_FILE 201 + APP_NAME_FILE
202 + ".conf" 202 + ".conf"
203 ] 203 ]
204 else: 204 else:
205 205