Fix view space
parent
3fa80619d3
commit
d58455d2d7
|
@ -1,9 +1,11 @@
|
|||
#pragma once
|
||||
#include <functional>
|
||||
#include <gtkmm.h>
|
||||
#include <sirEdit/data/serialize.hpp>
|
||||
|
||||
namespace sirEdit {
|
||||
extern Gtk::Application* mainApplication;
|
||||
extern sirEdit::data::HistoricalView* views;
|
||||
|
||||
extern void loadFile(Gtk::Window* window, Gtk::FileChooserNative* chooser);
|
||||
extern void runInGui(std::function<void()> func);
|
||||
|
|
|
@ -6,13 +6,14 @@
|
|||
#include <unordered_map>
|
||||
|
||||
using namespace std;
|
||||
using namespace sirEdit;
|
||||
|
||||
|
||||
// INFO: Hack to to protect crashes after main program
|
||||
static Glib::RefPtr<Gtk::Builder>* _mainWindowBuild = new Glib::RefPtr<Gtk::Builder>();
|
||||
static Glib::RefPtr<Gtk::Builder>& mainWindowBuild = *_mainWindowBuild;
|
||||
|
||||
static sirEdit::data::HistoricalView* views;
|
||||
|
||||
static unordered_map<string, int> tabs;
|
||||
|
||||
extern void sirEdit::gui::openMainWindow(shared_ptr<sirEdit::data::Serializer> serializer, Glib::RefPtr<Gio::File> file) {
|
||||
|
|
|
@ -9,11 +9,14 @@
|
|||
|
||||
#include "gui/startupWindow.hpp"
|
||||
|
||||
#include <sirEdit/data/serialize.hpp>
|
||||
|
||||
using namespace sir::api;
|
||||
using namespace std;
|
||||
|
||||
namespace sirEdit {
|
||||
Gtk::Application* mainApplication;
|
||||
sirEdit::data::HistoricalView* views = nullptr;
|
||||
static Glib::Dispatcher* dispatcher;
|
||||
static list<std::function<void()>> dispatcher_funcs;
|
||||
static mutex dispatcher_mutex;
|
||||
|
@ -61,7 +64,10 @@ int main(int args, char** argv) {
|
|||
});
|
||||
sirEdit::gui::runStartupWindow();
|
||||
});
|
||||
return application->run(args, argv);
|
||||
auto reuslt = application->run(args, argv);
|
||||
if(sirEdit::views != nullptr)
|
||||
delete sirEdit::views;
|
||||
return reuslt;
|
||||
|
||||
// GTK startup
|
||||
//Gtk::Main gtkMain(args, argv);
|
||||
|
|
Loading…
Reference in New Issue