diff --git a/README b/README index bd9307d..9a34158 100644 --- a/README +++ b/README @@ -34,8 +34,9 @@ Optional modules: - 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 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 diff --git a/src/ctrls/c_main.py b/src/ctrls/c_main.py index 8510443..ff29e23 100644 --- a/src/ctrls/c_main.py +++ b/src/ctrls/c_main.py @@ -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) + 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_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_with_tags(buf.get_end_iter(), "Size: ", tag) - buf.insert(buf.get_end_iter(), str(set['debug']['size']) + "\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['debug']['type']) + "\n\n") + 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['fileinfo']['date']) + "\n") + buf.insert_with_tags(buf.get_end_iter(), "Size: ", tag) + buf.insert(buf.get_end_iter(), str(set['fileinfo']['size']) + "\n") if 'gthumb' in set: tag = buf.create_tag() diff --git a/src/models/m_main.py b/src/models/m_main.py index 009f73b..e17a004 100644 --- a/src/models/m_main.py +++ b/src/models/m_main.py @@ -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]}