diff options
author | Alex Merry <dev@randomguy3.me.uk> | 2013-03-22 15:59:02 +0000 |
---|---|---|
committer | Alex Merry <dev@randomguy3.me.uk> | 2013-03-22 15:59:02 +0000 |
commit | ce114d1100efb2c7635227e2aa1a5b738bc54b1f (patch) | |
tree | 8cd0582f01af471540f615ef2e1aab141f6d2a93 /tikzit/src/gtk/Application.m | |
parent | c27208f7a1051dcd5fa9c042d3eb87ae9a42f28f (diff) |
Add "space" shortcut to refresh preview without it grabbing focus
Diffstat (limited to 'tikzit/src/gtk/Application.m')
-rw-r--r-- | tikzit/src/gtk/Application.m | 19 |
1 files changed, 15 insertions, 4 deletions
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]; |