Solving issue 2274: "Adding a suffix to the version string"

This commit is contained in:
Hombrenatureh.510
2014-03-05 20:32:30 +01:00
parent fbf818ab71
commit 5d91a8850b
9 changed files with 24 additions and 4 deletions

View File

@@ -42,7 +42,8 @@ Glib::ustring Options::rtdir;
Glib::ustring Options::cacheBaseDir;
Options options;
Glib::ustring versionString = VERSION;
Glib::ustring versionString = VERSION;
Glib::ustring versionSuffixString = VERSION_SUFFIX;
Glib::ustring paramFileExtension = ".pp3";
Options::Options () {

View File

@@ -289,6 +289,7 @@ extern Glib::ustring argv0;
extern Glib::ustring argv1;
extern bool simpleEditor;
extern Glib::ustring versionString;
extern Glib::ustring versionSuffixString;
extern Glib::ustring paramFileExtension;
#endif

View File

@@ -113,7 +113,10 @@ RTWindow::RTWindow ()
gtkosx_application_ready (osxApp);
}
#endif
set_title("RawTherapee "+versionString);
Glib::ustring versionStr("RawTherapee "+versionString);
if (!versionSuffixString.empty())
versionStr += " "+versionSuffixString;
set_title(versionStr);
property_allow_shrink() = true;
set_default_size(options.windowWidth, options.windowHeight);
set_modal(false);

View File

@@ -25,6 +25,7 @@ extern Glib::ustring argv0;
extern Glib::ustring creditsPath;
extern Glib::ustring licensePath;
extern Glib::ustring versionString;
extern Glib::ustring versionSuffixString;
SplashImage::SplashImage () {
@@ -63,7 +64,10 @@ bool SplashImage::on_expose_event (GdkEventExpose* event) {
gc_->set_foreground(*textColor);
int w, h;
version = create_pango_layout (versionString);
Glib::ustring versionStr(versionString);
if (!versionSuffixString.empty())
versionStr += " "+versionSuffixString;
version = create_pango_layout (versionStr);
version->get_pixel_size (w, h);
window->draw_layout(gc_, pixbuf->get_width() - w - 4, pixbuf->get_height() - h - 4, version);

View File

@@ -5,6 +5,7 @@
#define _VERSION_
#define VERSION "${HG_VERSION}"
#define VERSION_SUFFIX "${VERSION_SUFFIX}"
#define TAGDISTANCE ${HG_TAGDISTANCE}
#define CACHEFOLDERNAME "RawTherapee${CACHE_NAME_SUFFIX}"