Changeset 4141 for lliurex-store/trunk/fuentes
- Timestamp:
- Apr 7, 2017, 11:52:32 AM (4 years ago)
- Location:
- lliurex-store/trunk/fuentes/lliurex-store-gui/usr/share/lliurex-store/lliurex-store-gui
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
lliurex-store/trunk/fuentes/lliurex-store-gui/usr/share/lliurex-store/lliurex-store-gui/Core.py
r4116 r4141 51 51 self.ui_path=RSRC_DIR+"lliurex-store.ui" 52 52 53 try: 54 cache_dir=os.environ["XDG_CACHE_HOME"] 55 except: 56 cache_dir=os.expanduser("~/.cache/") 57 58 self.tmp_store_dir=cache_dir+"/lliurex-store/" 59 60 if not os.path.exists(self.tmp_store_dir): 61 os.makedirs(self.tmp_store_dir) 62 53 63 self.dprint("INIT...") 54 64 -
lliurex-store/trunk/fuentes/lliurex-store-gui/usr/share/lliurex-store/lliurex-store-gui/DetailsBox.py
r4131 r4141 20 20 _ = gettext.gettext 21 21 22 23 TMP_STORE_DIR=os.path.expanduser("~/.cache/")24 22 25 23 … … 285 283 else: 286 284 info["name"]=None 287 if os.path.exists( TMP_STORE_DIR+info["image_id"]):285 if os.path.exists(self.core.tmp_store_dir+info["image_id"]): 288 286 289 info["image_path"]= TMP_STORE_DIR+info["image_id"]287 info["image_path"]=self.core.tmp_store_dir+info["image_id"] 290 288 self.app_banner.set_from_file(info) 291 289 else: -
lliurex-store/trunk/fuentes/lliurex-store-gui/usr/share/lliurex-store/lliurex-store-gui/MainMenu.py
r4134 r4141 25 25 26 26 HOME_CONTENT_URL="http://svn.lliurex.net/xenial/lliurex-store/trunk/fuentes/lliurex-store-gui/usr/share/lliurex-store/lliurex-store-gui/rsrc/home_content.json" 27 #HOME_CONTENT_URL="file:///srv/svn/xenial/lliurex-store/trunk/fuentes/lliurex-store-gui/home_content.json" 28 #TMP_STORE_DIR="/tmp/.lliurex-store/" 29 TMP_STORE_DIR=os.path.expanduser("~/.cache/") 27 30 28 31 29 class MainMenu(Gtk.VBox): … … 120 118 res=urllib2.urlopen(req) 121 119 122 f=open( TMP_STORE_DIR+"home_content.json","w")120 f=open(self.core.tmp_store_dir+"home_content.json","w") 123 121 f.write(res.read().decode("utf-8")) 124 122 f.close() 125 123 126 124 127 f=open( TMP_STORE_DIR+"home_content.json")125 f=open(self.core.tmp_store_dir+"home_content.json") 128 126 self.home_info=json.load(f) 129 127 -
lliurex-store/trunk/fuentes/lliurex-store-gui/usr/share/lliurex-store/lliurex-store-gui/Screenshot.py
r4130 r4141 18 18 self.set_transition_duration(250) 19 19 20 self.image_dir="/tmp/.lliurex-store/" 20 try: 21 cache_dir=os.environ["XDG_CACHE_HOME"] 22 except: 23 cache_dir=os.expanduser("~/.cache/") 24 25 self.image_dir=cache_dir+"/lliurex-store/" 26 21 27 if not os.path.exists(self.image_dir): 22 28 os.makedirs(self.image_dir) -
lliurex-store/trunk/fuentes/lliurex-store-gui/usr/share/lliurex-store/lliurex-store-gui/ScreenshotViewer.py
r4115 r4141 17 17 self.html_skel='<html><body bgcolor=black><div align=center><iframe height=97% width=90% align=center src="%%URL%%" frameborder="0" allowfullscreen></iframe></div></body></html>' 18 18 self.border=20 19 20 try: 21 cache_dir=os.environ["XDG_CACHE_HOME"] 22 except: 23 cache_dir=os.expanduser("~/.cache/") 24 25 self.image_dir=cache_dir+"/lliurex-store/" 26 19 27 20 28 self.revealer=Gtk.Revealer() … … 121 129 if not current_id_is_url: 122 130 123 image=Gtk.Image.new_from_file( "/tmp/.lliurex-store/"+current_id)131 image=Gtk.Image.new_from_file(self.image_dir+current_id) 124 132 125 133 pixbuf=image.get_pixbuf() … … 160 168 def screenshot_button_clicked(self,widget,current_id): 161 169 162 image=Gtk.Image.new_from_file( "/tmp/.lliurex-store/"+current_id)170 image=Gtk.Image.new_from_file(self.image_dir+current_id) 163 171 164 172 pixbuf=image.get_pixbuf()
Note: See TracChangeset
for help on using the changeset viewer.