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})
|
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}
|
#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})
|
# ${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}
|
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) {
|
void FileCatalog::_openImage (std::vector<Thumbnail*> tmb) {
|
||||||
|
|
||||||
if (enabled && listener!=NULL) {
|
if (enabled && listener!=NULL) {
|
||||||
for (size_t i=0; i<tmb.size(); i++) {
|
bool continueToLoad=true;
|
||||||
if (editedFiles.find (tmb[i]->getFileName())==editedFiles.end())
|
for (size_t i=0; i< tmb.size() && continueToLoad; i++) {
|
||||||
listener->fileSelected (tmb[i]);
|
if (editedFiles.find (tmb[i]->getFileName())==editedFiles.end()){
|
||||||
|
listener->fileSelected (tmb[i]);
|
||||||
|
if( !options.tabbedUI )
|
||||||
|
continueToLoad = false;
|
||||||
|
}
|
||||||
tmb[i]->decreaseRef ();
|
tmb[i]->decreaseRef ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -32,7 +32,6 @@ int fbinit (void* data) {
|
|||||||
|
|
||||||
FilePanel::FilePanel () : parent(NULL) {
|
FilePanel::FilePanel () : parent(NULL) {
|
||||||
|
|
||||||
isloading = false;
|
|
||||||
dirpaned = Gtk::manage ( new Gtk::HPaned () );
|
dirpaned = Gtk::manage ( new Gtk::HPaned () );
|
||||||
dirpaned->set_position (options.dirBrowserWidth);
|
dirpaned->set_position (options.dirBrowserWidth);
|
||||||
|
|
||||||
@@ -156,11 +155,9 @@ bool FilePanel::fileSelected (Thumbnail* thm) {
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
// try to open the file
|
// try to open the file
|
||||||
// fileCatalog->setEnabled (false);
|
bool loading = thm->imageLoad( true );
|
||||||
if (isloading)
|
if( !loading ) return false;
|
||||||
return false;
|
|
||||||
|
|
||||||
isloading = true;
|
|
||||||
ProgressConnector<rtengine::InitialImage*> *ld = new ProgressConnector<rtengine::InitialImage*>();
|
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()),
|
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) );
|
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->setProgress(0.);
|
||||||
parent->setProgressStr("");
|
parent->setProgressStr("");
|
||||||
isloading = false;
|
thm->imageLoad( false );
|
||||||
|
|
||||||
return false; // MUST return false from idle function
|
return false; // MUST return false from idle function
|
||||||
}
|
}
|
||||||
|
@@ -51,7 +51,6 @@ class FilePanel : public Gtk::HPaned,
|
|||||||
Gtk::Notebook* rightNotebook;
|
Gtk::Notebook* rightNotebook;
|
||||||
|
|
||||||
int error;
|
int error;
|
||||||
bool isloading;
|
|
||||||
public:
|
public:
|
||||||
FilePanel ();
|
FilePanel ();
|
||||||
|
|
||||||
|
@@ -35,7 +35,7 @@ using namespace rtengine::procparams;
|
|||||||
|
|
||||||
Thumbnail::Thumbnail (CacheManager* cm, const Glib::ustring& fname, CacheImageData* cf)
|
Thumbnail::Thumbnail (CacheManager* cm, const Glib::ustring& fname, CacheImageData* cf)
|
||||||
: fname(fname), cfs(*cf), cachemgr(cm), ref(1), enqueueNumber(0), tpp(NULL),
|
: 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) {
|
initial_(false) {
|
||||||
|
|
||||||
cfs.load (getCacheFileName ("data")+".txt");
|
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)
|
Thumbnail::Thumbnail (CacheManager* cm, const Glib::ustring& fname, const std::string& md5)
|
||||||
: fname(fname), cachemgr(cm), ref(1), enqueueNumber(0), tpp(NULL), pparamsValid(false),
|
: fname(fname), cachemgr(cm), ref(1), enqueueNumber(0), tpp(NULL), pparamsValid(false),
|
||||||
needsReProcessing(true), lastImg(NULL),
|
needsReProcessing(true),imageLoading(false), lastImg(NULL),
|
||||||
initial_(true) {
|
initial_(true) {
|
||||||
|
|
||||||
|
|
||||||
@@ -728,3 +728,15 @@ bool Thumbnail::openDefaultViewer(int destination) {
|
|||||||
#endif
|
#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 pparamsValid;
|
||||||
bool pparamsSet;
|
bool pparamsSet;
|
||||||
bool needsReProcessing;
|
bool needsReProcessing;
|
||||||
|
bool imageLoading;
|
||||||
|
|
||||||
// these are the data of the result image of the last getthumbnailimage call (for caching purposes)
|
// these are the data of the result image of the last getthumbnailimage call (for caching purposes)
|
||||||
unsigned char* lastImg;
|
unsigned char* lastImg;
|
||||||
@@ -138,6 +139,7 @@ class Thumbnail {
|
|||||||
void saveThumbnail ();
|
void saveThumbnail ();
|
||||||
|
|
||||||
bool openDefaultViewer(int destination);
|
bool openDefaultViewer(int destination);
|
||||||
|
bool imageLoad(bool loading);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user