PP3 sidecar files were triggering unwanted monitoring event (there was still some remaining even with Oduis' fix from issue #597). They are now filtered out : only files that have one of the retained (and then displayed) extensions are taken into account.

Works for both Windows and Linux (i don't know if MacOS version's is listening the directories).

Note that contrary to the Branch3 version of the patch, the pp3 files are updated too when ranking the thumbs because this information is now part of the pp3 file.
This commit is contained in:
natureh
2011-07-13 16:41:01 +02:00
parent db0130b4cd
commit b9b5e37ef2
16 changed files with 243 additions and 56 deletions

View File

@@ -49,6 +49,12 @@ class DirEntry {
}
};
class FilePanel;
/*
* Class:
* - handling the list of file (add/remove them)
* - handling the thumbnail toolbar,
* - monitoring the directory (for any change)
*/
class FileCatalog : public Gtk::VBox,
public DirSelectionListener,
public PreviewLoaderListener,
@@ -59,6 +65,7 @@ class FileCatalog : public Gtk::VBox,
#endif
{
private:
FilePanel* filepanel;
Gtk::HBox* hBox;
Glib::ustring selectedDirectory;
@@ -127,22 +134,20 @@ class FileCatalog : public Gtk::VBox,
FilterPanel* filterPanel;
Glib::RefPtr<Gio::FileMonitor> dirMonitor;
int previewsToLoad;
int previewsLoaded;
#ifdef WIN32
WinDirMonitor* wdMonitor;
public:
void winDirChanged ();
private:
#endif
std::vector<Glib::ustring> fileNameList;
std::set<Glib::ustring> editedFiles;
guint modifierKey; // any modifiers held when rank button was pressed
#ifndef _WIN32
Glib::RefPtr<Gio::FileMonitor> dirMonitor;
#else
WinDirMonitor* wdMonitor;
#endif
void addAndOpenFile (const Glib::ustring& fname);
void checkAndAddFile (Glib::RefPtr<Gio::File> info);
std::vector<Glib::ustring> getFileList ();
@@ -203,7 +208,6 @@ class FileCatalog : public Gtk::VBox,
void runFilterDialog ();
void on_realize();
void on_dir_changed (const Glib::RefPtr<Gio::File>& file, const Glib::RefPtr<Gio::File>& other_file, Gio::FileMonitorEvent event_type, bool internal);
void reparseDirectory ();
void _openImage (std::vector<Thumbnail*> tmb);
@@ -226,6 +230,13 @@ class FileCatalog : public Gtk::VBox,
bool CheckSidePanelsVisibility();
void toggleSidePanels();
#ifndef _WIN32
void on_dir_changed (const Glib::RefPtr<Gio::File>& file, const Glib::RefPtr<Gio::File>& other_file, Gio::FileMonitorEvent event_type, bool internal);
#else
void winDirChanged ();
#endif
};
#endif