Making the codified theme file name mandatory (#3446)
...which mean that TooWaBlue.css can't be loaded until it has been reworked and renamed to the new mechanism. The default theme will be loaded instead.
This commit is contained in:
parent
55759c04e3
commit
17ff228177
@ -310,8 +310,9 @@ int main(int argc, char **argv)
|
|||||||
Gtk::Settings::get_for_screen(screen)->property_gtk_theme_name() = "Adwaita";
|
Gtk::Settings::get_for_screen(screen)->property_gtk_theme_name() = "Adwaita";
|
||||||
Gtk::Settings::get_for_screen(screen)->property_gtk_application_prefer_dark_theme() = true;
|
Gtk::Settings::get_for_screen(screen)->property_gtk_application_prefer_dark_theme() = true;
|
||||||
|
|
||||||
|
Glib::RefPtr<Glib::Regex> regex = Glib::Regex::create(THEMEREGEXSTR, Glib::RegexCompileFlags::REGEX_CASELESS);
|
||||||
Glib::ustring filename = Glib::build_filename(argv0, "themes", options.theme + ".css");
|
Glib::ustring filename = Glib::build_filename(argv0, "themes", options.theme + ".css");
|
||||||
if (!Glib::file_test(filename, Glib::FILE_TEST_EXISTS)) {
|
if (!regex->match(options.theme) || !Glib::file_test(filename, Glib::FILE_TEST_EXISTS)) {
|
||||||
options.theme = "RawTherapee-GTK";
|
options.theme = "RawTherapee-GTK";
|
||||||
// We're not testing GTK_MAJOR_VERSION == 3 here, since this branch requires Gtk3 only
|
// We're not testing GTK_MAJOR_VERSION == 3 here, since this branch requires Gtk3 only
|
||||||
if (GTK_MINOR_VERSION < 20) {
|
if (GTK_MINOR_VERSION < 20) {
|
||||||
|
@ -27,6 +27,8 @@
|
|||||||
#define STARTUPDIR_CUSTOM 2
|
#define STARTUPDIR_CUSTOM 2
|
||||||
#define STARTUPDIR_LAST 3
|
#define STARTUPDIR_LAST 3
|
||||||
|
|
||||||
|
#define THEMEREGEXSTR "^(.+)-GTK3-(\\d{1,2})?_(\\d{1,2})?\\.css$"
|
||||||
|
|
||||||
// Default bundled profile name to use for Raw images
|
// Default bundled profile name to use for Raw images
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#define DEFPROFILE_RAW "${G}\\Default"
|
#define DEFPROFILE_RAW "${G}\\Default"
|
||||||
|
@ -41,7 +41,7 @@ Preferences::Preferences (RTWindow *rtwindow)
|
|||||||
, parent (rtwindow)
|
, parent (rtwindow)
|
||||||
, splash (nullptr)
|
, splash (nullptr)
|
||||||
{
|
{
|
||||||
regex = Glib::Regex::create("^(.+)-GTK3-(\\d{1,2})?_(\\d{1,2})?\\.css$", Glib::RegexCompileFlags::REGEX_CASELESS);
|
regex = Glib::Regex::create(THEMEREGEXSTR, Glib::RegexCompileFlags::REGEX_CASELESS);
|
||||||
|
|
||||||
moptions.copyFrom (&options);
|
moptions.copyFrom (&options);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user