From 453fb848aa17d594f6acd45daca8fcdd785e969a Mon Sep 17 00:00:00 2001 From: gryf Date: Wed, 14 May 2008 11:29:13 +0000 Subject: [PATCH] * Added CZYTAJTO (polish README file). * Changed katalog file extension from .pgt into or .tgz. * Removed compression choice form preferences. --- README | 11 +-- resources/glade/config.glade | 155 +++++++++++++++++------------------ resources/glade/foo.glade | 130 ----------------------------- src/views/v_dialogs.py | 18 ++-- 4 files changed, 92 insertions(+), 222 deletions(-) delete mode 100644 resources/glade/foo.glade diff --git a/README b/README index 6e4de58..ecd7e08 100644 --- a/README +++ b/README @@ -25,14 +25,12 @@ REQUIREMENTS pyGTKtalog is written in python with following dependencies: - python 2.4 or higher -- pygtk +- pygtk 2.10 or higher - pysqlite2 (unnecessary, if python 2.5 is used) Optional modules: - PIL for image manipulation -- pyExcelerator for export to - excel capability Additional pyGTKtalog uses pygtkmvc by Roberto Cavada and EXIF module by Gene Cash (slightly updatetd to EXIF 2.2 by me) which @@ -118,14 +116,13 @@ Removed: - anidb link/imdb link Maybe in future versions. Now text file descriptions/notes and tags have to be enough for good and fast information search. -- file information (date, size, etc) (50%) (no need for?) NOTES ===== -Catalog file is tared and optionaly gziped sqlite database and directories with -images and thumbnails. If there are more images, the size of catalog file will -grow. So be carefull with adding big images in your catalog file! +Catalog file is tared and gziped sqlite database and directories with images and +thumbnails. If there are more images, the size of catalog file will grow. So be +carefull with adding big images in your catalog file! BUGS ==== diff --git a/resources/glade/config.glade b/resources/glade/config.glade index 3a05aaf..481bbb6 100644 --- a/resources/glade/config.glade +++ b/resources/glade/config.glade @@ -89,16 +89,57 @@ 3 3 - + True 0 - Eject program: - ejt_entry + Mount point: + mnt_entry + + + + + + + 100 + True + True + + + 1 + 2 + + + + + + True + True + Browse... + True + 0 + + + + + 2 + 3 + + + + + + + 100 + True + True + + + 1 + 2 1 2 - @@ -122,56 +163,15 @@ - - 100 - True - True - - - 1 - 2 - 1 - 2 - - - - - - True - True - Browse... - True - 0 - - - - - 2 - 3 - - - - - - - 100 - True - True - - - 1 - 2 - - - - - + True 0 - Mount point: - mnt_entry + Eject program: + ejt_entry + 1 + 2 @@ -257,7 +257,6 @@ - True True Compress collection True @@ -293,18 +292,14 @@ 3 3 - + True False - True - Browse... - True - 0 - + 0 + Image viewer: + mnt_entry - 2 - 3 @@ -323,14 +318,18 @@ - + True False - 0 - Image viewer: - mnt_entry + True + Browse... + True + 0 + + 2 + 3 @@ -612,7 +611,7 @@ 2 3 - + True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -620,19 +619,6 @@ 1 2 - 1 - 2 - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Command: - - - 1 - 2 @@ -648,7 +634,18 @@ - + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Command: + + + 1 + 2 + + + + True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -656,6 +653,8 @@ 1 2 + 1 + 2 diff --git a/resources/glade/foo.glade b/resources/glade/foo.glade deleted file mode 100644 index 89979e6..0000000 --- a/resources/glade/foo.glade +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - - True - window1 - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - True - False - True - False - False - GDK_WINDOW_TYPE_HINT_NORMAL - GDK_GRAVITY_NORTH_WEST - True - False - - - - - True - 0 - 0.5 - GTK_SHADOW_NONE - - - - True - 0.5 - 0.5 - 1 - 1 - 0 - 0 - 12 - 0 - - - - True - False - 0 - - - - True - label2 - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - - - 0 - True - True - - - - - - True - True - button1 - True - GTK_RELIEF_NORMAL - True - - - 0 - False - False - - - - - - - - - - True - <b>frame1</b> - False - True - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - label_item - - - - - - - diff --git a/src/views/v_dialogs.py b/src/views/v_dialogs.py index 95080fb..99ab18d 100644 --- a/src/views/v_dialogs.py +++ b/src/views/v_dialogs.py @@ -281,6 +281,7 @@ class ChooseDBFilename(object): f = gtk.FileFilter() f.set_name("Catalog files") f.add_pattern("*.pgt") + f.add_pattern("*.pgt.tgz") self.dialog.add_filter(f) f = gtk.FileFilter() f.set_name("All files") @@ -297,13 +298,15 @@ class ChooseDBFilename(object): response = self.dialog.run() if response == gtk.RESPONSE_OK: filename = self.dialog.get_filename() - if filename[-4] == '.': - if filename[-3:].lower() != 'pgt': - filename = filename + '.pgt' - else: - filename = filename[:-3] + 'pgt' + print filename, ' do ', + if filename[-8:].lower() != '.pgt.tgz' and \ + filename[-4:].lower() != '.pgt': + filename = filename + '.pgt.tgz' + elif filename[-4:].lower() == '.pgt': + filename = filename[:-4] + '.pgt.tgz' else: - filename = filename + '.pgt' + filename = filename[:-8] + '.pgt.tgz' + print filename self.__class__.URI = self.dialog.get_current_folder_uri() self.dialog.destroy() return filename @@ -316,7 +319,7 @@ class LoadDBFile(object): """Specific class for displaying openFile dialog. It has veryfication for file existence.""" - URI=None + URI = None def __init__(self, path=None): self.path = path @@ -335,6 +338,7 @@ class LoadDBFile(object): f = gtk.FileFilter() f.set_name("Catalog files") f.add_pattern("*.pgt") + f.add_pattern("*.pgt.tgz") self.dialog.add_filter(f) f = gtk.FileFilter() f.set_name("All files")