From ce114d1100efb2c7635227e2aa1a5b738bc54b1f Mon Sep 17 00:00:00 2001 From: Alex Merry Date: Fri, 22 Mar 2013 15:59:02 +0000 Subject: Add "space" shortcut to refresh preview without it grabbing focus --- tikzit/src/gtk/Application.m | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'tikzit/src/gtk/Application.m') diff --git a/tikzit/src/gtk/Application.m b/tikzit/src/gtk/Application.m index bfde140..2720bb6 100644 --- a/tikzit/src/gtk/Application.m +++ b/tikzit/src/gtk/Application.m @@ -262,7 +262,7 @@ Application* app = nil; gtk_main_quit(); } -- (void) showPreamblesEditor { +- (void) presentPreamblesEditor { #ifdef HAVE_POPPLER if (preambleWindow == nil) { preambleWindow = [[PreambleEditor alloc] initWithPreambles:preambles]; @@ -272,11 +272,11 @@ Application* app = nil; #endif } -- (void) showContextWindow { +- (void) presentContextWindow { [contextWindow present]; } -- (void) showPreviewForDocument:(TikzDocument*)doc { +- (void) presentPreviewForDocument:(TikzDocument*)doc { #ifdef HAVE_POPPLER if (previewWindow == nil) { previewWindow = [[PreviewWindow alloc] initWithPreambles:preambles config:configFile]; @@ -287,7 +287,18 @@ Application* app = nil; #endif } -- (void) showSettingsDialog { +- (void) previewDocument:(TikzDocument*)doc { +#ifdef HAVE_POPPLER + if (previewWindow == nil) { + previewWindow = [[PreviewWindow alloc] initWithPreambles:preambles config:configFile]; + //[previewWindow setParentWindow:mainWindow]; + [previewWindow setDocument:doc]; + } + [previewWindow show]; +#endif +} + +- (void) presentSettingsDialog { if (settingsDialog == nil) { settingsDialog = [[SettingsDialog alloc] initWithConfiguration:configFile andStyleManager:styleManager]; -- cgit v1.2.3