summaryrefslogtreecommitdiffstats
path: root/Window.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Window.cpp')
-rw-r--r--Window.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/Window.cpp b/Window.cpp
index f69e148..af0357b 100644
--- a/Window.cpp
+++ b/Window.cpp
@@ -11,7 +11,8 @@ gboolean Window::deleteEvent(GtkWidget *widget, GdkEvent *event, Window *window)
}
Window::Window(GdkGLConfig *glconfig, WindowManager *manager)
- : uiManager(this), editor(this), drawer(this, glconfig), sidebar(&editor)
+ : uiManager(this), editor(this), drawer(this, glconfig), sidebar(&editor),
+ fileManager(this)
{
this->manager = manager;
@@ -53,6 +54,14 @@ void Window::update() {
void Window::handleAction(UIManager::Action action) {
switch(action) {
+ case UIManager::SAVE:
+ fileManager.save(GTK_WINDOW(window));
+ break;
+
+ case UIManager::SAVE_AS:
+ fileManager.saveAs(GTK_WINDOW(window));
+ break;
+
case UIManager::ZOOM_IN:
drawer.zoom(2);
break;