See #3446: the theme filenames now includes a code for version handling.

The theme filename must use a template, that will be explained with this
example:

mytheme-GTK3-20_22.css

Everything before -GTK3... is the theme (short) name, the [-GTK3-] is a
mandatory part, 20 is the included version where support begins and 22
is the included version where the support ends. One of this two version
parameters can be ommited (but not both of course), which make RT
understand "is compatible from all version up to xx" (e.g.
mytheme-GTK3-_22.css) or "is compatible from version yy and above" (e.g.
mytheme-GTK3-20_.css)

The RawTherapee-GTK3-_19.css comes 'as is' from the gtk3 branch and has
still to be tuned.
This commit is contained in:
Hombre
2016-11-20 02:22:03 +01:00
parent 0ebac85970
commit 55759c04e3
5 changed files with 551 additions and 15 deletions

View File

@@ -56,7 +56,6 @@ Glib::ustring creditsPath;
Glib::ustring licensePath;
Glib::ustring argv1;
bool simpleEditor;
Glib::RefPtr<Gtk::CssProvider> cssForced;
Glib::RefPtr<Gtk::CssProvider> cssRT;
//Glib::Threads::Thread* mainThread;
@@ -313,7 +312,13 @@ int main(int argc, char **argv)
Glib::ustring filename = Glib::build_filename(argv0, "themes", options.theme + ".css");
if (!Glib::file_test(filename, Glib::FILE_TEST_EXISTS)) {
options.theme = "RawTherapee";
options.theme = "RawTherapee-GTK";
// We're not testing GTK_MAJOR_VERSION == 3 here, since this branch requires Gtk3 only
if (GTK_MINOR_VERSION < 20) {
options.theme = options.theme + "3-_19";
} else {
options.theme = options.theme + "3-20_";
}
filename = Glib::build_filename(argv0, "themes", options.theme + ".css");
}
cssRT = Gtk::CssProvider::create();