From b1c43b32f88934ecaad5aadb56c41796a659995e Mon Sep 17 00:00:00 2001 From: Desmis Date: Thu, 30 Apr 2020 08:29:21 +0200 Subject: [PATCH] Enable Help Local adjustment with Rawpedia fr --- rtdata/languages/default | 1 + rtgui/rtwindow.cc | 15 +++++++++++++++ rtgui/rtwindow.h | 1 + 3 files changed, 17 insertions(+) diff --git a/rtdata/languages/default b/rtdata/languages/default index 25277d06d..e1897f99d 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -1335,6 +1335,7 @@ IPTCPANEL_TITLE;Title IPTCPANEL_TITLEHINT;Enter a short verbal and human readable name for the image, this may be the file name. IPTCPANEL_TRANSREFERENCE;Job ID IPTCPANEL_TRANSREFERENCEHINT;Enter a number or identifier needed for workflow control or tracking. +LOCAL_HELP;Help Local Adjustments MAIN_BUTTON_FULLSCREEN;Fullscreen MAIN_BUTTON_ICCPROFCREATOR;ICC Profile Creator MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 diff --git a/rtgui/rtwindow.cc b/rtgui/rtwindow.cc index a543c383c..9163a1162 100644 --- a/rtgui/rtwindow.cc +++ b/rtgui/rtwindow.cc @@ -385,6 +385,13 @@ RTWindow::RTWindow () iccProfileCreator->set_tooltip_markup (M ("MAIN_BUTTON_ICCPROFCREATOR")); iccProfileCreator->signal_clicked().connect ( sigc::mem_fun (*this, &RTWindow::showICCProfileCreator) ); + Gtk::Button* helpBtnloc = Gtk::manage (new Gtk::Button ()); + setExpandAlignProperties (helpBtnloc, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); + helpBtnloc->set_relief(Gtk::RELIEF_NONE); + helpBtnloc->set_image (*Gtk::manage (new RTImage ("questionmark.png"))); + helpBtnloc->set_tooltip_markup (M ("LOCAL_HELP")); + helpBtnloc->signal_clicked().connect (sigc::mem_fun (*this, &RTWindow::showRawPedialoc)); + Gtk::Button* helpBtn = Gtk::manage (new Gtk::Button ()); setExpandAlignProperties (helpBtn, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); helpBtn->set_relief(Gtk::RELIEF_NONE); @@ -420,6 +427,7 @@ RTWindow::RTWindow () actionGrid->set_orientation (Gtk::ORIENTATION_VERTICAL); actionGrid->attach_next_to (prProgBar, Gtk::POS_BOTTOM, 1, 1); actionGrid->attach_next_to (*iccProfileCreator, Gtk::POS_BOTTOM, 1, 1); + actionGrid->attach_next_to (*helpBtnloc, Gtk::POS_BOTTOM, 1, 1); actionGrid->attach_next_to (*helpBtn, Gtk::POS_BOTTOM, 1, 1); actionGrid->attach_next_to (*preferences, Gtk::POS_BOTTOM, 1, 1); actionGrid->attach_next_to (*btn_fullscreen, Gtk::POS_BOTTOM, 1, 1); @@ -429,6 +437,7 @@ RTWindow::RTWindow () actionGrid->set_orientation (Gtk::ORIENTATION_HORIZONTAL); actionGrid->attach_next_to (prProgBar, Gtk::POS_RIGHT, 1, 1); actionGrid->attach_next_to (*iccProfileCreator, Gtk::POS_RIGHT, 1, 1); + actionGrid->attach_next_to (*helpBtnloc, Gtk::POS_RIGHT, 1, 1); actionGrid->attach_next_to (*helpBtn, Gtk::POS_RIGHT, 1, 1); actionGrid->attach_next_to (*preferences, Gtk::POS_RIGHT, 1, 1); actionGrid->attach_next_to (*btn_fullscreen, Gtk::POS_RIGHT, 1, 1); @@ -927,6 +936,12 @@ void RTWindow::showRawPedia() gtk_show_uri(nullptr, "https://rawpedia.rawtherapee.com/", GDK_CURRENT_TIME, &gerror); } +void RTWindow::showRawPedialoc() +{ + GError* gerror = nullptr; + gtk_show_uri(nullptr, "https://rawpedia.rawtherapee.com/Local_Adjustments/fr", GDK_CURRENT_TIME, &gerror); +} + void RTWindow::showICCProfileCreator () { ICCProfileCreator *iccpc = new ICCProfileCreator (this); diff --git a/rtgui/rtwindow.h b/rtgui/rtwindow.h index 2d4e390e8..948fddff5 100644 --- a/rtgui/rtwindow.h +++ b/rtgui/rtwindow.h @@ -91,6 +91,7 @@ public: void on_mainNB_switch_page (Gtk::Widget* widget, guint page_num); void showRawPedia(); + void showRawPedialoc(); void showICCProfileCreator (); void showPreferences (); void on_realize () override;