mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-07-16 14:34:23 +03:00
Removed Strings.hpp, replaced with wxString
Fixed UTF8 rendering of status messages.
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
#include <wx/image.h>
|
||||
#include <wx/settings.h>
|
||||
|
||||
// Print now includes tbb, and tbb includes Windows. This breaks compilation of wxWidgets if included before wx.
|
||||
#include "../../libslic3r/Print.hpp"
|
||||
|
||||
#include <tbb/parallel_for.h>
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
#include "AboutDialog.hpp"
|
||||
#include "AppConfig.hpp"
|
||||
#include "ConfigSnapshotDialog.hpp"
|
||||
#include "ProgressStatusBar.hpp"
|
||||
#include "Utils.hpp"
|
||||
#include "MsgDialog.hpp"
|
||||
#include "ConfigWizard.hpp"
|
||||
@@ -114,6 +115,7 @@ void break_to_debugger()
|
||||
// Passing the wxWidgets GUI classes instantiated by the Perl part to C++.
|
||||
wxApp *g_wxApp = nullptr;
|
||||
wxFrame *g_wxMainFrame = nullptr;
|
||||
ProgressStatusBar *g_progress_status_bar = nullptr;
|
||||
wxNotebook *g_wxTabPanel = nullptr;
|
||||
wxPanel *g_wxPlater = nullptr;
|
||||
AppConfig *g_AppConfig = nullptr;
|
||||
@@ -207,6 +209,13 @@ void set_main_frame(wxFrame *main_frame)
|
||||
|
||||
wxFrame* get_main_frame() { return g_wxMainFrame; }
|
||||
|
||||
void set_progress_status_bar(ProgressStatusBar *prsb)
|
||||
{
|
||||
g_progress_status_bar = prsb;
|
||||
}
|
||||
|
||||
ProgressStatusBar* get_progress_status_bar() { return g_progress_status_bar; }
|
||||
|
||||
void set_tab_panel(wxNotebook *tab_panel)
|
||||
{
|
||||
g_wxTabPanel = tab_panel;
|
||||
|
||||
@@ -33,6 +33,7 @@ namespace Slic3r {
|
||||
class PresetBundle;
|
||||
class PresetCollection;
|
||||
class Print;
|
||||
class ProgressStatusBar;
|
||||
class AppConfig;
|
||||
class PresetUpdater;
|
||||
class DynamicPrintConfig;
|
||||
@@ -99,6 +100,7 @@ void break_to_debugger();
|
||||
// Passing the wxWidgets GUI classes instantiated by the Perl part to C++.
|
||||
void set_wxapp(wxApp *app);
|
||||
void set_main_frame(wxFrame *main_frame);
|
||||
void set_progress_status_bar(ProgressStatusBar *prsb);
|
||||
void set_tab_panel(wxNotebook *tab_panel);
|
||||
void set_plater(wxPanel *plater);
|
||||
void set_app_config(AppConfig *app_config);
|
||||
@@ -123,6 +125,7 @@ AppConfig* get_app_config();
|
||||
wxApp* get_app();
|
||||
PresetBundle* get_preset_bundle();
|
||||
wxFrame* get_main_frame();
|
||||
ProgressStatusBar* get_progress_status_bar();
|
||||
wxNotebook * get_tab_panel();
|
||||
wxNotebook* get_tab_panel();
|
||||
|
||||
|
||||
@@ -135,7 +135,7 @@ void ProgressStatusBar::embed(wxFrame *frame)
|
||||
|
||||
void ProgressStatusBar::set_status_text(const std::string& txt)
|
||||
{
|
||||
self->SetStatusText(txt);
|
||||
self->SetStatusText(wxString::FromUTF8(txt.c_str()));
|
||||
}
|
||||
|
||||
void ProgressStatusBar::show_cancel_button()
|
||||
|
||||
Reference in New Issue
Block a user