mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-05 20:16:05 +08:00
stubbed Notifier class and misc helper function
This commit is contained in:
parent
67f41d2c23
commit
1f22647e61
@ -164,6 +164,7 @@ IF(wxWidgets_FOUND)
|
|||||||
add_library(slic3r_gui STATIC
|
add_library(slic3r_gui STATIC
|
||||||
${GUI_LIBDIR}/MainFrame.cpp
|
${GUI_LIBDIR}/MainFrame.cpp
|
||||||
${GUI_LIBDIR}/GUI.cpp
|
${GUI_LIBDIR}/GUI.cpp
|
||||||
|
${GUI_LIBDIR}/misc_ui.cpp
|
||||||
)
|
)
|
||||||
#only build GUI lib if building with wx
|
#only build GUI lib if building with wx
|
||||||
target_link_libraries (slic3r slic3r_gui ${wxWidgets_LIBRARIES})
|
target_link_libraries (slic3r slic3r_gui ${wxWidgets_LIBRARIES})
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#ifndef GUI_HPP
|
#ifndef GUI_HPP
|
||||||
#define GUI_HPP
|
#define GUI_HPP
|
||||||
#include "MainFrame.hpp"
|
#include "MainFrame.hpp"
|
||||||
|
#include "Notifier.hpp"
|
||||||
|
|
||||||
namespace Slic3r { namespace GUI {
|
namespace Slic3r { namespace GUI {
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#include "MainFrame.hpp"
|
#include "MainFrame.hpp"
|
||||||
|
#include "misc_ui.hpp"
|
||||||
#include <wx/accel.h>
|
#include <wx/accel.h>
|
||||||
#include <wx/utils.h>
|
#include <wx/utils.h>
|
||||||
|
|
||||||
@ -137,7 +138,7 @@ void MainFrame::init_menubar()
|
|||||||
});
|
});
|
||||||
append_menu_item(menuHelp, _("Check for &Updates..."), _("Check for new Slic3r versions"), [=](wxCommandEvent& e)
|
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)
|
append_menu_item(menuHelp, _("Slic3r &Manual"), _("Open the Slic3r manual in your browser"), [=](wxCommandEvent& e)
|
||||||
{
|
{
|
||||||
|
15
src/GUI/Notifier.hpp
Normal file
15
src/GUI/Notifier.hpp
Normal file
@ -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
|
15
src/GUI/misc_ui.cpp
Normal file
15
src/GUI/misc_ui.cpp
Normal file
@ -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
|
||||||
|
|
15
src/GUI/misc_ui.hpp
Normal file
15
src/GUI/misc_ui.hpp
Normal file
@ -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
|
Loading…
x
Reference in New Issue
Block a user