show message dialog about the expected usage when running RT as GIMP plugin
This commit is contained in:
@@ -2129,3 +2129,5 @@ ZOOMPANEL_ZOOMFITCROPSCREEN;Fit crop to screen\nShortcut: <b>Alt</b>-<b>f</b>
|
||||
ZOOMPANEL_ZOOMFITSCREEN;Fit whole image to screen\nShortcut: <b>f</b>
|
||||
ZOOMPANEL_ZOOMIN;Zoom In\nShortcut: <b>+</b>
|
||||
ZOOMPANEL_ZOOMOUT;Zoom Out\nShortcut: <b>-</b>
|
||||
GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP.
|
||||
DONT_SHOW_AGAIN;Don't show this message again.
|
||||
|
@@ -416,6 +416,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
|
||||
|
||||
|
||||
@@ -602,6 +615,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();
|
||||
|
||||
|
@@ -724,6 +724,7 @@ void Options::setDefaults ()
|
||||
lastProfilingReferenceDir = "";
|
||||
lastBWCurvesDir = "";
|
||||
lastLensProfileDir = "";
|
||||
gimpPluginShowInfoDialog = true;
|
||||
maxRecentFolders = 15;
|
||||
}
|
||||
|
||||
@@ -1852,6 +1853,9 @@ int Options::readFromFile (Glib::ustring fname)
|
||||
safeDirGet (keyFile, "Dialogs", "LastVibranceCurvesDir", lastVibranceCurvesDir);
|
||||
safeDirGet (keyFile, "Dialogs", "LastProfilingReferenceDir", lastProfilingReferenceDir);
|
||||
safeDirGet (keyFile, "Dialogs", "LastLensProfileDir", lastLensProfileDir);
|
||||
if (keyFile.has_key ("Dialogs", "GimpPluginShowInfoDialog")) {
|
||||
gimpPluginShowInfoDialog = keyFile.get_boolean("Dialogs", "GimpPluginShowInfoDialog");
|
||||
}
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------------------------------------
|
||||
@@ -2217,6 +2221,7 @@ int Options::saveToFile (Glib::ustring fname)
|
||||
keyFile.set_string ("Dialogs", "LastVibranceCurvesDir", lastVibranceCurvesDir);
|
||||
keyFile.set_string ("Dialogs", "LastProfilingReferenceDir", lastProfilingReferenceDir);
|
||||
keyFile.set_string ("Dialogs", "LastLensProfileDir", lastLensProfileDir);
|
||||
keyFile.set_boolean("Dialogs", "GimpPluginShowInfoDialog", gimpPluginShowInfoDialog);
|
||||
|
||||
keyData = keyFile.to_data ();
|
||||
|
||||
|
@@ -315,6 +315,7 @@ public:
|
||||
Glib::ustring lastProfilingReferenceDir;
|
||||
Glib::ustring lastBWCurvesDir;
|
||||
Glib::ustring lastLensProfileDir;
|
||||
bool gimpPluginShowInfoDialog;
|
||||
|
||||
size_t maxRecentFolders; // max. number of recent folders stored in options file
|
||||
std::vector<Glib::ustring> recentFolders; // List containing all recent folders
|
||||
|
Reference in New Issue
Block a user