Merge branch 'gtk2' into pixelshift
This commit is contained in:
@@ -62,7 +62,7 @@ endif (WIN32)
|
||||
configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/config.h.in" "${CMAKE_CURRENT_BINARY_DIR}/config.h")
|
||||
|
||||
add_executable (rth ${EXTRA_SRC} ${BASESOURCEFILES})
|
||||
add_dependencies (rth AboutFile)
|
||||
add_dependencies (rth UpdateInfo)
|
||||
|
||||
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}
|
||||
|
@@ -203,7 +203,7 @@ int CacheImageData::save (const Glib::ustring& fname)
|
||||
} catch (Glib::Error&) {}
|
||||
|
||||
keyFile.set_string ("General", "MD5", md5);
|
||||
keyFile.set_string ("General", "Version", VERSION); // Application's version
|
||||
keyFile.set_string ("General", "Version", RTVERSION);
|
||||
keyFile.set_boolean ("General", "Supported", supported);
|
||||
keyFile.set_integer ("General", "Format", format);
|
||||
keyFile.set_boolean ("General", "RecentlySaved", recentlySaved);
|
||||
|
@@ -601,7 +601,6 @@ void FileBrowser::addEntry (FileBrowserEntry* entry)
|
||||
|
||||
void FileBrowser::addEntry_ (FileBrowserEntry* entry)
|
||||
{
|
||||
GThreadLock lock; // All GUI acces from idle_add callbacks or separate thread HAVE to be protected
|
||||
entry->selected = false;
|
||||
entry->drawable = false;
|
||||
entry->framed = editedFiles.find (entry->filename) != editedFiles.end();
|
||||
|
@@ -89,11 +89,7 @@ Glib::ustring fname_to_utf8 (const char* fname)
|
||||
}
|
||||
|
||||
// This recursive mutex will be used by gdk_threads_enter/leave instead of a simple mutex
|
||||
#ifdef WIN32
|
||||
static Glib::RecMutex myGdkRecMutex;
|
||||
#else
|
||||
static Glib::Threads::RecMutex myGdkRecMutex;
|
||||
#endif
|
||||
|
||||
static void myGdkLockEnter()
|
||||
{
|
||||
@@ -214,7 +210,7 @@ int main(int argc, char **argv)
|
||||
SetConsoleCtrlHandler( NULL, true );
|
||||
// Set title of console
|
||||
char consoletitle[128];
|
||||
sprintf(consoletitle, "RawTherapee %s Console", VERSION);
|
||||
sprintf(consoletitle, "RawTherapee %s Console", RTVERSION);
|
||||
SetConsoleTitle(consoletitle);
|
||||
// increase size of screen buffer
|
||||
COORD c;
|
||||
@@ -240,7 +236,7 @@ int main(int argc, char **argv)
|
||||
consoleOpened = true;
|
||||
|
||||
// printing RT's version in every case, particularly useful for the 'verbose' mode, but also for the batch processing
|
||||
std::cout << "RawTherapee, version " << VERSION << std::endl;
|
||||
std::cout << "RawTherapee, version " << RTVERSION << std::endl;
|
||||
std::cout << "WARNING: closing this window will close RawTherapee!" << std::endl << std::endl;
|
||||
}
|
||||
}
|
||||
@@ -263,7 +259,7 @@ int main(int argc, char **argv)
|
||||
|
||||
if (argc > 1 || options.rtSettings.verbose) {
|
||||
// printing RT's version in all case, particularly useful for the 'verbose' mode, but also for the batch processing
|
||||
std::cout << "RawTherapee, version " << VERSION << std::endl;
|
||||
std::cout << "RawTherapee, version " << RTVERSION << std::endl;
|
||||
#ifdef WIN32
|
||||
std::cout << "WARNING: closing this window will close RawTherapee!" << std::endl << std::endl;
|
||||
#endif
|
||||
|
@@ -46,8 +46,7 @@ Glib::ustring Options::rtdir;
|
||||
Glib::ustring Options::cacheBaseDir;
|
||||
|
||||
Options options;
|
||||
Glib::ustring versionString = VERSION;
|
||||
Glib::ustring versionSuffixString = VERSION_SUFFIX;
|
||||
Glib::ustring versionString = RTVERSION;
|
||||
Glib::ustring paramFileExtension = ".pp3";
|
||||
|
||||
Options::Options ()
|
||||
@@ -1864,7 +1863,7 @@ int Options::saveToFile (Glib::ustring fname)
|
||||
keyFile.set_string ("General", "Theme", theme);
|
||||
keyFile.set_boolean ("General", "SlimUI", slimUI);
|
||||
keyFile.set_boolean ("General", "UseSystemTheme", useSystemTheme);
|
||||
keyFile.set_string ("General", "Version", VERSION);
|
||||
keyFile.set_string ("General", "Version", RTVERSION);
|
||||
keyFile.set_string ("General", "DarkFramesPath", rtSettings.darkFramesPath);
|
||||
keyFile.set_string ("General", "FlatFieldsPath", rtSettings.flatFieldsPath);
|
||||
keyFile.set_boolean ("General", "Verbose", rtSettings.verbose);
|
||||
|
@@ -343,7 +343,6 @@ extern Glib::ustring argv0;
|
||||
extern Glib::ustring argv1;
|
||||
extern bool simpleEditor;
|
||||
extern Glib::ustring versionString;
|
||||
extern Glib::ustring versionSuffixString;
|
||||
extern Glib::ustring paramFileExtension;
|
||||
|
||||
#endif
|
||||
|
@@ -119,10 +119,6 @@ RTWindow::RTWindow ()
|
||||
#endif
|
||||
versionStr = "RawTherapee " + versionString;
|
||||
|
||||
if (!versionSuffixString.empty()) {
|
||||
versionStr += " " + versionSuffixString;
|
||||
}
|
||||
|
||||
set_title_decorated("");
|
||||
property_allow_shrink() = true;
|
||||
set_default_size(options.windowWidth, options.windowHeight);
|
||||
@@ -309,30 +305,6 @@ RTWindow::~RTWindow()
|
||||
}
|
||||
}
|
||||
|
||||
void RTWindow::findVerNumbers(int* numbers, Glib::ustring versionStr)
|
||||
{
|
||||
numbers[0] = numbers[1] = numbers[2] = numbers[3] = 0;
|
||||
int n = 0;
|
||||
|
||||
for (unsigned int i = 0; i < versionStr.length(); i++) {
|
||||
char chr = (char)versionStr.at(i);
|
||||
|
||||
if (chr >= '0' && chr <= '9') {
|
||||
numbers[n] *= 10;
|
||||
numbers[n] += (int)(chr - '0');
|
||||
} else {
|
||||
n++;
|
||||
|
||||
if (n > 4) {
|
||||
printf("Error: malformed version string; \"%s\" must follow this format: xx.xx.xx.xx. Admitting it's a developer version...\n", versionStr.c_str());
|
||||
// Reseting the already found numbers
|
||||
numbers[0] = numbers[1] = numbers[2] = numbers[3] = 100;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void RTWindow::on_realize ()
|
||||
{
|
||||
Gtk::Window::on_realize ();
|
||||
@@ -349,38 +321,20 @@ void RTWindow::on_realize ()
|
||||
|
||||
// Check if first run of this version, then display the Release Notes text
|
||||
if (options.version != versionString) {
|
||||
int prevVerNbr[4];
|
||||
int currVerNbr[4];
|
||||
findVerNumbers(prevVerNbr, options.version);
|
||||
findVerNumbers(currVerNbr, versionString);
|
||||
|
||||
// Now we can update the version parameter with the right value
|
||||
// Update the version parameter with the right value
|
||||
options.version = versionString;
|
||||
|
||||
bool showReleaseNotes = false;
|
||||
splash = new Splash (*this);
|
||||
splash->set_transient_for (*this);
|
||||
splash->signal_delete_event().connect( sigc::mem_fun(*this, &RTWindow::splashClosed) );
|
||||
|
||||
// Check if the current version is newer
|
||||
if (currVerNbr[0] > prevVerNbr[0]) {
|
||||
showReleaseNotes = true;
|
||||
} else if (currVerNbr[1] > prevVerNbr[1]) {
|
||||
showReleaseNotes = true;
|
||||
} else if (currVerNbr[2] > prevVerNbr[2]) {
|
||||
showReleaseNotes = true;
|
||||
}
|
||||
|
||||
if (showReleaseNotes) {
|
||||
// this is a first run!
|
||||
splash = new Splash (*this);
|
||||
splash->set_transient_for (*this);
|
||||
splash->signal_delete_event().connect( sigc::mem_fun(*this, &RTWindow::splashClosed) );
|
||||
|
||||
if (splash->hasReleaseNotes()) {
|
||||
splash->showReleaseNotes();
|
||||
splash->show ();
|
||||
} else {
|
||||
delete splash;
|
||||
splash = nullptr;
|
||||
}
|
||||
if (splash->hasReleaseNotes()) {
|
||||
splash->showReleaseNotes();
|
||||
splash->show ();
|
||||
} else {
|
||||
delete splash;
|
||||
splash = nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -27,7 +27,6 @@ extern Glib::ustring argv0;
|
||||
extern Glib::ustring creditsPath;
|
||||
extern Glib::ustring licensePath;
|
||||
extern Glib::ustring versionString;
|
||||
extern Glib::ustring versionSuffixString;
|
||||
|
||||
SplashImage::SplashImage ()
|
||||
{
|
||||
@@ -70,10 +69,6 @@ bool SplashImage::on_expose_event (GdkEventExpose* event)
|
||||
int w, h;
|
||||
Glib::ustring versionStr(versionString);
|
||||
|
||||
if (!versionSuffixString.empty()) {
|
||||
versionStr += " " + versionSuffixString;
|
||||
}
|
||||
|
||||
version = create_pango_layout (versionStr);
|
||||
version->set_markup("<span foreground=\"white\">" + versionStr + "</span>");
|
||||
version->get_pixel_size (w, h);
|
||||
|
@@ -4,9 +4,7 @@
|
||||
#ifndef _VERSION_
|
||||
#define _VERSION_
|
||||
|
||||
#define VERSION "${GIT_VERSION}"
|
||||
#define VERSION_SUFFIX "${VERSION_SUFFIX}"
|
||||
#define TAGDISTANCE ${GIT_TAGDISTANCE}
|
||||
#define RTVERSION "${GIT_DESCRIBE}"
|
||||
#define CACHEFOLDERNAME "RawTherapee${CACHE_NAME_SUFFIX}"
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user