merge with dev

This commit is contained in:
Desmis
2017-08-09 07:57:19 +02:00
50 changed files with 751 additions and 499 deletions

View File

@@ -255,6 +255,12 @@ RTWindow *create_rt_window()
Gtk::Settings::get_for_screen(screen)->property_gtk_theme_name() = "Adwaita";
Gtk::Settings::get_for_screen(screen)->property_gtk_application_prefer_dark_theme() = true;
#if defined(__APPLE__)
// This will force screen resolution regarding font, but I don't think it's compliant with Gtk guidelines...
// Do not confuse with screen scaling, where everything is scaled up !
screen->set_resolution (96.);
#endif
Glib::RefPtr<Glib::Regex> regex = Glib::Regex::create(THEMEREGEXSTR, Glib::RegexCompileFlags::REGEX_CASELESS);
Glib::ustring filename = Glib::build_filename(argv0, "themes", options.theme + ".css");
if (!regex->match(options.theme + ".css") || !Glib::file_test(filename, Glib::FILE_TEST_EXISTS)) {
@@ -411,6 +417,19 @@ private:
RTWindow *rtWindow;
};
void show_gimp_plugin_info_dialog(Gtk::Window *parent)
{
if (options.gimpPluginShowInfoDialog) {
Gtk::MessageDialog info(*parent, M("GIMP_PLUGIN_INFO"), false, Gtk::MESSAGE_INFO, Gtk::BUTTONS_OK, true);
Gtk::Box *box = info.get_message_area();
Gtk::CheckButton dontshowagain(M("DONT_SHOW_AGAIN"));
dontshowagain.show();
box->pack_start(dontshowagain);
info.run();
options.gimpPluginShowInfoDialog = !dontshowagain.get_active();
}
}
} // namespace
@@ -597,6 +616,9 @@ int main (int argc, char **argv)
Gtk::Main m(&argc, &argv);
gdk_threads_enter();
const std::unique_ptr<RTWindow> rtWindow(create_rt_window());
if (gimpPlugin) {
show_gimp_plugin_info_dialog(rtWindow.get());
}
m.run(*rtWindow);
gdk_threads_leave();