Added help button to main menu #5566

Opens RawPedia in the default URI handler
This commit is contained in:
Morgan Hardwood 2019-12-16 23:42:48 +01:00
parent 4a25633bd7
commit d6f65dc8e2
3 changed files with 19 additions and 3 deletions

View File

@ -225,6 +225,7 @@ GENERAL_DISABLED;Disabled
GENERAL_ENABLE;Enable
GENERAL_ENABLED;Enabled
GENERAL_FILE;File
GENERAL_HELP;Help
GENERAL_LANDSCAPE;Landscape
GENERAL_NA;n/a
GENERAL_NO;No

View File

@ -383,8 +383,13 @@ RTWindow::RTWindow ()
iccProfileCreator->set_tooltip_markup (M ("MAIN_BUTTON_ICCPROFCREATOR"));
iccProfileCreator->signal_clicked().connect ( sigc::mem_fun (*this, &RTWindow::showICCProfileCreator) );
//Gtk::LinkButton* rtWeb = Gtk::manage (new Gtk::LinkButton ("http://rawtherapee.com")); // unused... but fail to be linked anyway !?
//Gtk::Button* preferences = Gtk::manage (new Gtk::Button (M("MAIN_BUTTON_PREFERENCES")+"..."));
Gtk::Button* helpBtn = Gtk::manage (new Gtk::Button ());
setExpandAlignProperties (helpBtn, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER);
helpBtn->set_relief(Gtk::RELIEF_NONE);
helpBtn->set_image (*Gtk::manage (new RTImage ("info.png")));
helpBtn->set_tooltip_markup (M ("GENERAL_HELP"));
helpBtn->signal_clicked().connect (sigc::mem_fun (*this, &RTWindow::showRawPedia));
Gtk::Button* preferences = Gtk::manage (new Gtk::Button ());
setExpandAlignProperties (preferences, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER);
preferences->set_relief(Gtk::RELIEF_NONE);
@ -392,7 +397,6 @@ RTWindow::RTWindow ()
preferences->set_tooltip_markup (M ("MAIN_BUTTON_PREFERENCES"));
preferences->signal_clicked().connect ( sigc::mem_fun (*this, &RTWindow::showPreferences) );
//btn_fullscreen = Gtk::manage( new Gtk::Button(M("MAIN_BUTTON_FULLSCREEN")));
btn_fullscreen = Gtk::manage ( new Gtk::Button());
setExpandAlignProperties (btn_fullscreen, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER);
btn_fullscreen->set_relief(Gtk::RELIEF_NONE);
@ -414,6 +418,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 (*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);
mainNB->set_action_widget (actionGrid, Gtk::PACK_END);
@ -422,6 +427,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 (*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);
mainNB->set_action_widget (actionGrid, Gtk::PACK_END);
@ -913,6 +919,14 @@ void RTWindow::writeToolExpandedStatus (std::vector<int> &tpOpen)
}
void RTWindow::showRawPedia()
{
const Glib::ustring& uri = "https://rawpedia.rawtherapee.com/";
guint32 err = 0;
RTWindow *rtWin = this;
rtWin->show_uri(uri, err);
}
void RTWindow::showICCProfileCreator ()
{
ICCProfileCreator *iccpc = new ICCProfileCreator (this);

View File

@ -90,6 +90,7 @@ public:
bool on_window_state_event (GdkEventWindowState* event) override;
void on_mainNB_switch_page (Gtk::Widget* widget, guint page_num);
void showRawPedia();
void showICCProfileCreator ();
void showPreferences ();
void on_realize () override;