diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 30ba81484..bd8f28ffb 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -164,6 +164,7 @@ IF(wxWidgets_FOUND) add_library(slic3r_gui STATIC ${GUI_LIBDIR}/MainFrame.cpp ${GUI_LIBDIR}/GUI.cpp + ${GUI_LIBDIR}/misc_ui.cpp ) #only build GUI lib if building with wx target_link_libraries (slic3r slic3r_gui ${wxWidgets_LIBRARIES}) diff --git a/src/GUI/GUI.hpp b/src/GUI/GUI.hpp index d4ee0461b..c693e847b 100644 --- a/src/GUI/GUI.hpp +++ b/src/GUI/GUI.hpp @@ -1,6 +1,7 @@ #ifndef GUI_HPP #define GUI_HPP #include "MainFrame.hpp" +#include "Notifier.hpp" namespace Slic3r { namespace GUI { diff --git a/src/GUI/MainFrame.cpp b/src/GUI/MainFrame.cpp index 56afce0dd..547c0757b 100644 --- a/src/GUI/MainFrame.cpp +++ b/src/GUI/MainFrame.cpp @@ -1,4 +1,5 @@ #include "MainFrame.hpp" +#include "misc_ui.hpp" #include #include @@ -137,7 +138,7 @@ void MainFrame::init_menubar() }); append_menu_item(menuHelp, _("Check for &Updates..."), _("Check for new Slic3r versions"), [=](wxCommandEvent& e) { -// parent->check_version(true); + check_version(true); }); append_menu_item(menuHelp, _("Slic3r &Manual"), _("Open the Slic3r manual in your browser"), [=](wxCommandEvent& e) { diff --git a/src/GUI/Notifier.hpp b/src/GUI/Notifier.hpp new file mode 100644 index 000000000..f7a9c0d92 --- /dev/null +++ b/src/GUI/Notifier.hpp @@ -0,0 +1,15 @@ +#ifndef NOTIFIER_HPP +#define NOTIFIER_HPP + +namespace Slic3r { namespace GUI { + +/// Class to perform window manager notifications using Growl and/or DBus XWindow + +class Notifier { +public: + Notifier() { } +}; + +}} // Namespace Slic3r::GUI + +#endif // NOTIFIER_HPP diff --git a/src/GUI/misc_ui.cpp b/src/GUI/misc_ui.cpp new file mode 100644 index 000000000..b509cf097 --- /dev/null +++ b/src/GUI/misc_ui.cpp @@ -0,0 +1,15 @@ +#include "misc_ui.hpp" +namespace Slic3r { namespace GUI { + + +#ifdef SLIC3R_DEV +void check_version(bool manual) { +} +#else +void check_version(bool manual) { +} + +#endif + +}} // namespace Slic3r::GUI + diff --git a/src/GUI/misc_ui.hpp b/src/GUI/misc_ui.hpp new file mode 100644 index 000000000..83ef2646c --- /dev/null +++ b/src/GUI/misc_ui.hpp @@ -0,0 +1,15 @@ +#ifndef MISC_UI_HPP +#define MISC_UI_HPP + +/// Common static (that is, free-standing) functions, not part of an object hierarchy. + +namespace Slic3r { namespace GUI { + +/// Performs a check via the Internet for a new version of Slic3r. +/// If this version of Slic3r was compiled with SLIC3R_DEV, check the development +/// space instead of release. +void check_version(bool manual = false); + +}} // namespace Slic3r::GUI + +#endif // MISC_UI_HPP