1
0
mirror of https://github.com/gryf/pygtktalog.git synced 2025-12-17 11:30:19 +01:00

* Cosmetic changes with displaying file details.

This commit is contained in:
2008-05-08 16:19:20 +00:00
parent 1eaad783f9
commit be69067396
3 changed files with 21 additions and 15 deletions

7
README
View File

@@ -34,8 +34,9 @@ Optional modules:
- pyExcelerator <http://sourceforge.net/projects/pyexcelerator> for export to
excel capability
Additional pyGTKtalog uses EXIF module by Gene Cash which is included in
sources and slightly updatetd to EXIF 2.2.
Additional pyGTKtalog uses pygtkmvc <http://pygtkmvc.sourceforge.net> by Roberto
Cavada and EXIF module by Gene Cash (slightly updatetd to EXIF 2.2 by me) which
are included in sources.
pyGTKtalog extensivly uses external programs in unix spirit, however there is
small possibility of using it Windows (probably with limitations) and quite big
@@ -54,7 +55,7 @@ That's it. Alternatively, if you like to put it in more system wide place, all
you have to do is:
- put pyGTKtalog directory into your destination of choice (/usr/local/share,
/opt or ~/ is typical choice)
/opt or ~/ is typical bet)
- copy pyGTKtalog shell script to /usr/bin, /usr/local/bin or in
other place, where PATH variable is pointing or you feel like.
- then modify pyGTKtalog line 6 to match right pygtktalog.py directory

View File

@@ -1532,19 +1532,24 @@ class MainController(Controller):
#self.view['description'].show()
set = self.model.get_file_info(file_id)
if __debug__ and 'debug' in set:
tag = buf.create_tag()
tag.set_property('weight', pango.WEIGHT_BOLD)
if __debug__ and 'fileinfo' in set:
buf.insert_with_tags(buf.get_end_iter(), "ID: ", tag)
buf.insert(buf.get_end_iter(), str(set['debug']['id']) + "\n")
buf.insert(buf.get_end_iter(), str(set['fileinfo']['id']) + "\n")
buf.insert_with_tags(buf.get_end_iter(), "Type: ", tag)
buf.insert(buf.get_end_iter(), str(set['fileinfo']['type']) + "\n")
if set['fileinfo']['type'] == 1:
buf.insert_with_tags(buf.get_end_iter(), "Directory: ", tag)
else:
buf.insert_with_tags(buf.get_end_iter(), "Filename: ", tag)
buf.insert(buf.get_end_iter(), set['filename'] + "\n")
buf.insert_with_tags(buf.get_end_iter(), "Date: ", tag)
buf.insert(buf.get_end_iter(), str(set['debug']['date']) + "\n")
buf.insert(buf.get_end_iter(), str(set['fileinfo']['date']) + "\n")
buf.insert_with_tags(buf.get_end_iter(), "Size: ", tag)
buf.insert(buf.get_end_iter(), str(set['debug']['size']) + "\n")
buf.insert_with_tags(buf.get_end_iter(), "Type: ", tag)
buf.insert(buf.get_end_iter(), str(set['debug']['type']) + "\n\n")
buf.insert(buf.get_end_iter(), str(set['fileinfo']['size']) + "\n")
if 'gthumb' in set:
tag = buf.create_tag()

View File

@@ -817,7 +817,7 @@ class MainModel(ModelMT):
self.db_cursor.execute(sql, (file_id,))
res = self.db_cursor.fetchone()
if res:
retval['debug'] = {'id': file_id,
retval['fileinfo'] = {'id': file_id,
'date': datetime.fromtimestamp(res[1]),
'size': res[2], 'type': res[3]}