Porting following changsets to Default for the merge :
- 7faf00bc5cbe - 6f9407b451af
This commit is contained in:
@@ -50,7 +50,7 @@ endif (WIN32)
|
||||
|
||||
add_executable (rth ${EXTRA_SRC} ${BASESOURCEFILES})
|
||||
|
||||
set_target_properties (rth PROPERTIES COMPILE_FLAGS "${CMAKE_CXX_FLAGS}" OUTPUT_NAME rt)
|
||||
set_target_properties (rth PROPERTIES COMPILE_FLAGS "${CMAKE_CXX_FLAGS}" OUTPUT_NAME rawtherapee)
|
||||
#target_link_libraries (rth rtengine ${JPEG_LIBRARIES} ${PNG_LIBRARIES} ${ZLIB_LIBRARIES} ${TIFF_LIBRARIES} ${EXTRA_LIB} ${GOBJECT_LIBRARIES} ${GTHREAD_LIBRARIES}
|
||||
# ${GLIB2_LIBRARIES} ${GLIBMM_LIBRARIES} ${GTK_LIBRARIES} ${GTKMM_LIBRARIES} ${GIO_LIBRARIES} ${GIOMM_LIBRARIES} ${LCMS_LIBRARIES} ${IPTCDATA_LIBRARIES})
|
||||
target_link_libraries (rth rtengine ${JPEG_LIBRARIES} ${PNG_LIBRARIES} ${ZLIB_LIBRARIES} ${TIFF_LIBRARIES} ${GOBJECT_LIBRARIES} ${GTHREAD_LIBRARIES}
|
||||
|
@@ -667,9 +667,13 @@ void FileCatalog::refreshHeight () {
|
||||
void FileCatalog::_openImage (std::vector<Thumbnail*> tmb) {
|
||||
|
||||
if (enabled && listener!=NULL) {
|
||||
for (size_t i=0; i<tmb.size(); i++) {
|
||||
if (editedFiles.find (tmb[i]->getFileName())==editedFiles.end())
|
||||
listener->fileSelected (tmb[i]);
|
||||
bool continueToLoad=true;
|
||||
for (size_t i=0; i< tmb.size() && continueToLoad; i++) {
|
||||
if (editedFiles.find (tmb[i]->getFileName())==editedFiles.end()){
|
||||
listener->fileSelected (tmb[i]);
|
||||
if( !options.tabbedUI )
|
||||
continueToLoad = false;
|
||||
}
|
||||
tmb[i]->decreaseRef ();
|
||||
}
|
||||
}
|
||||
|
@@ -32,7 +32,6 @@ int fbinit (void* data) {
|
||||
|
||||
FilePanel::FilePanel () : parent(NULL) {
|
||||
|
||||
isloading = false;
|
||||
dirpaned = Gtk::manage ( new Gtk::HPaned () );
|
||||
dirpaned->set_position (options.dirBrowserWidth);
|
||||
|
||||
@@ -156,11 +155,9 @@ bool FilePanel::fileSelected (Thumbnail* thm) {
|
||||
return false;
|
||||
|
||||
// try to open the file
|
||||
// fileCatalog->setEnabled (false);
|
||||
if (isloading)
|
||||
return false;
|
||||
bool loading = thm->imageLoad( true );
|
||||
if( !loading ) return false;
|
||||
|
||||
isloading = true;
|
||||
ProgressConnector<rtengine::InitialImage*> *ld = new ProgressConnector<rtengine::InitialImage*>();
|
||||
ld->startFunc (sigc::bind(sigc::ptr_fun(&rtengine::InitialImage::load), thm->getFileName (), thm->getType()==FT_Raw, &error, parent->getProgressListener()),
|
||||
sigc::bind(sigc::mem_fun(*this,&FilePanel::imageLoaded), thm, ld) );
|
||||
@@ -188,7 +185,7 @@ bool FilePanel::imageLoaded( Thumbnail* thm, ProgressConnector<rtengine::Initial
|
||||
|
||||
parent->setProgress(0.);
|
||||
parent->setProgressStr("");
|
||||
isloading = false;
|
||||
thm->imageLoad( false );
|
||||
|
||||
return false; // MUST return false from idle function
|
||||
}
|
||||
|
@@ -51,7 +51,6 @@ class FilePanel : public Gtk::HPaned,
|
||||
Gtk::Notebook* rightNotebook;
|
||||
|
||||
int error;
|
||||
bool isloading;
|
||||
public:
|
||||
FilePanel ();
|
||||
|
||||
|
@@ -35,7 +35,7 @@ using namespace rtengine::procparams;
|
||||
|
||||
Thumbnail::Thumbnail (CacheManager* cm, const Glib::ustring& fname, CacheImageData* cf)
|
||||
: fname(fname), cfs(*cf), cachemgr(cm), ref(1), enqueueNumber(0), tpp(NULL),
|
||||
pparamsValid(false), needsReProcessing(true), lastImg(NULL),
|
||||
pparamsValid(false), needsReProcessing(true),imageLoading(false), lastImg(NULL),
|
||||
initial_(false) {
|
||||
|
||||
cfs.load (getCacheFileName ("data")+".txt");
|
||||
@@ -61,7 +61,7 @@ Thumbnail::Thumbnail (CacheManager* cm, const Glib::ustring& fname, CacheImageDa
|
||||
|
||||
Thumbnail::Thumbnail (CacheManager* cm, const Glib::ustring& fname, const std::string& md5)
|
||||
: fname(fname), cachemgr(cm), ref(1), enqueueNumber(0), tpp(NULL), pparamsValid(false),
|
||||
needsReProcessing(true), lastImg(NULL),
|
||||
needsReProcessing(true),imageLoading(false), lastImg(NULL),
|
||||
initial_(true) {
|
||||
|
||||
|
||||
@@ -728,3 +728,15 @@ bool Thumbnail::openDefaultViewer(int destination) {
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
bool Thumbnail::imageLoad(bool loading)
|
||||
{
|
||||
Glib::Mutex::Lock lock(mutex);
|
||||
bool previous = imageLoading;
|
||||
if( loading && !previous ){
|
||||
imageLoading = true;
|
||||
return true;
|
||||
}else if( !loading )
|
||||
imageLoading = false;
|
||||
return false;
|
||||
}
|
||||
|
@@ -48,6 +48,7 @@ class Thumbnail {
|
||||
bool pparamsValid;
|
||||
bool pparamsSet;
|
||||
bool needsReProcessing;
|
||||
bool imageLoading;
|
||||
|
||||
// these are the data of the result image of the last getthumbnailimage call (for caching purposes)
|
||||
unsigned char* lastImg;
|
||||
@@ -138,6 +139,7 @@ class Thumbnail {
|
||||
void saveThumbnail ();
|
||||
|
||||
bool openDefaultViewer(int destination);
|
||||
bool imageLoad(bool loading);
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user