Updated Help menu items to open localized web pages.

Updated links to PrusaSlicer-settings.
This commit is contained in:
bubnikv 2019-05-13 16:34:41 +02:00
parent 253b57e4a3
commit 3a0c27c6e5
7 changed files with 13 additions and 9 deletions

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 KiB

After

Width:  |  Height:  |  Size: 108 KiB

View File

@ -73,11 +73,8 @@ else ()
add_executable(PrusaSlicer PrusaSlicer.cpp PrusaSlicer.hpp) add_executable(PrusaSlicer PrusaSlicer.cpp PrusaSlicer.hpp)
endif () endif ()
if (NOT MSVC) if (NOT MSVC)
if(SLIC3R_GUI) # Binary name on unix like systems (OSX, Linux)
set_target_properties(PrusaSlicer PROPERTIES OUTPUT_NAME "PrusaSlicer-gui") set_target_properties(PrusaSlicer PROPERTIES OUTPUT_NAME "prusa-slicer")
else()
set_target_properties(PrusaSlicer PROPERTIES OUTPUT_NAME "PrusaSlicer-console")
endif()
endif () endif ()
target_link_libraries(PrusaSlicer libslic3r) target_link_libraries(PrusaSlicer libslic3r)

View File

@ -22,7 +22,7 @@ namespace Slic3r {
static const std::string VENDOR_PREFIX = "vendor:"; static const std::string VENDOR_PREFIX = "vendor:";
static const std::string MODEL_PREFIX = "model:"; static const std::string MODEL_PREFIX = "model:";
static const std::string VERSION_CHECK_URL = "https://raw.githubusercontent.com/prusa3d/Slic3r-settings/master/live/Slic3rPE.version"; static const std::string VERSION_CHECK_URL = "https://raw.githubusercontent.com/prusa3d/PrusaSlic3r-settings/master/live/PrusaSlicer.version";
void AppConfig::reset() void AppConfig::reset()
{ {

View File

@ -915,6 +915,11 @@ int GUI_App::extruders_cnt() const
preset.config.option<ConfigOptionFloats>("nozzle_diameter")->values.size(); preset.config.option<ConfigOptionFloats>("nozzle_diameter")->values.size();
} }
void GUI_App::open_web_page_localized(const std::string &http_address)
{
wxLaunchDefaultBrowser(http_address + "&lng=" + this->current_language_code());
}
void GUI_App::window_pos_save(wxTopLevelWindow* window, const std::string &name) void GUI_App::window_pos_save(wxTopLevelWindow* window, const std::string &name)
{ {
if (name.empty()) { return; } if (name.empty()) { return; }

View File

@ -171,6 +171,8 @@ public:
PrintHostJobQueue& printhost_job_queue() { return *m_printhost_job_queue.get(); } PrintHostJobQueue& printhost_job_queue() { return *m_printhost_job_queue.get(); }
void open_web_page_localized(const std::string &http_address);
private: private:
bool on_init_inner(); bool on_init_inner();
void window_pos_save(wxTopLevelWindow* window, const std::string &name); void window_pos_save(wxTopLevelWindow* window, const std::string &name);

View File

@ -545,16 +545,16 @@ void MainFrame::init_menubar()
auto helpMenu = new wxMenu(); auto helpMenu = new wxMenu();
{ {
append_menu_item(helpMenu, wxID_ANY, _(L("Prusa 3D &Drivers")), _(L("Open the Prusa3D drivers download page in your browser")), append_menu_item(helpMenu, wxID_ANY, _(L("Prusa 3D &Drivers")), _(L("Open the Prusa3D drivers download page in your browser")),
[this](wxCommandEvent&) { wxLaunchDefaultBrowser("http://www.prusa3d.com/drivers/"); }); [this](wxCommandEvent&) { wxGetApp().open_web_page_localized("https://www.prusa3d.com/downloads"); });
append_menu_item(helpMenu, wxID_ANY, _(L("Software &Releases")), _(L("Open the software releases page in your browser")), append_menu_item(helpMenu, wxID_ANY, _(L("Software &Releases")), _(L("Open the software releases page in your browser")),
[this](wxCommandEvent&) { wxLaunchDefaultBrowser("http://github.com/prusa3d/slic3r/releases"); }); [this](wxCommandEvent&) { wxLaunchDefaultBrowser("http://github.com/prusa3d/PrusaSlicer/releases"); });
//# my $versioncheck = $self->_append_menu_item($helpMenu, "Check for &Updates...", "Check for new Slic3r versions", sub{ //# my $versioncheck = $self->_append_menu_item($helpMenu, "Check for &Updates...", "Check for new Slic3r versions", sub{
//# wxTheApp->check_version(1); //# wxTheApp->check_version(1);
//# }); //# });
//# $versioncheck->Enable(wxTheApp->have_version_check); //# $versioncheck->Enable(wxTheApp->have_version_check);
append_menu_item(helpMenu, wxID_ANY, wxString::Format(_(L("%s &Website")), SLIC3R_APP_NAME), append_menu_item(helpMenu, wxID_ANY, wxString::Format(_(L("%s &Website")), SLIC3R_APP_NAME),
wxString::Format(_(L("Open the %s website in your browser")), SLIC3R_APP_NAME), wxString::Format(_(L("Open the %s website in your browser")), SLIC3R_APP_NAME),
[this](wxCommandEvent&) { wxLaunchDefaultBrowser("https://www.prusa3d.com/slic3r-prusa-edition/"); }); [this](wxCommandEvent&) { wxGetApp().open_web_page_localized("https://www.prusa3d.com/slicerweb"); });
// append_menu_item(helpMenu, wxID_ANY, wxString::Format(_(L("%s &Manual")), SLIC3R_APP_NAME), // append_menu_item(helpMenu, wxID_ANY, wxString::Format(_(L("%s &Manual")), SLIC3R_APP_NAME),
// wxString::Format(_(L("Open the %s manual in your browser")), SLIC3R_APP_NAME), // wxString::Format(_(L("Open the %s manual in your browser")), SLIC3R_APP_NAME),
// [this](wxCommandEvent&) { wxLaunchDefaultBrowser("http://manual.slic3r.org/"); }); // [this](wxCommandEvent&) { wxLaunchDefaultBrowser("http://manual.slic3r.org/"); });