diff options
author | randomguy3 <randomguy3@7c02a99a-9b00-45e3-bf44-6f3dd7fddb64> | 2012-01-09 11:38:49 +0000 |
---|---|---|
committer | randomguy3 <randomguy3@7c02a99a-9b00-45e3-bf44-6f3dd7fddb64> | 2012-01-09 11:38:49 +0000 |
commit | 469ddcf97d23d4b38a761345ba58f9761d757456 (patch) | |
tree | 49da3e0f9a2350060838fd6090dbee29da90475a /tikzit/src/linux/Menu.m | |
parent | c5f1d88491018af8a2e86ea55a439d730c759605 (diff) |
Don't bother with preambles if we can't do previews
git-svn-id: https://tikzit.svn.sourceforge.net/svnroot/tikzit/trunk@369 7c02a99a-9b00-45e3-bf44-6f3dd7fddb64
Diffstat (limited to 'tikzit/src/linux/Menu.m')
-rw-r--r-- | tikzit/src/linux/Menu.m | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/tikzit/src/linux/Menu.m b/tikzit/src/linux/Menu.m index c7eb16d..660f9e2 100644 --- a/tikzit/src/linux/Menu.m +++ b/tikzit/src/linux/Menu.m @@ -224,12 +224,20 @@ static void flip_vert_cb (GtkAction *action, MainWindow *window) { [pool drain]; } +#ifdef HAVE_POPPLER static void show_preamble_cb (GtkAction *action, MainWindow *window) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; [window editPreambles]; [pool drain]; } +static void show_preview_cb (GtkAction *action, MainWindow *window) { + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + [window showPreview]; + [pool drain]; +} +#endif + static void zoom_in_cb (GtkAction *action, MainWindow *window) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; [window zoomIn]; @@ -248,14 +256,6 @@ static void zoom_reset_cb (GtkAction *action, MainWindow *window) { [pool drain]; } -#ifdef HAVE_POPPLER -static void show_preview_cb (GtkAction *action, MainWindow *window) { - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - [window showPreview]; - [pool drain]; -} -#endif - static void input_mode_change_cb (GtkRadioAction *action, GtkRadioAction *current, MainWindow *window) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; [[window graphInputHandler] setMode:(InputMode)gtk_radio_action_get_current_value (action)]; @@ -357,8 +357,8 @@ static const gchar ui_info[] = " <menuitem action='ToolbarVisible'/>" " <menuitem action='StatusbarVisible'/>" */ -" <menuitem action='ShowPreamble'/>" #ifdef HAVE_POPPLER +" <menuitem action='ShowPreamble'/>" " <menuitem action='ShowPreview'/>" #endif " <menu action='Zoom'>" @@ -439,8 +439,10 @@ static GtkActionEntry static_entries[] = { /* ViewMenu */ { "ToolbarStyle", NULL, N_("_Toolbar style") }, +#ifdef HAVE_POPPLER { "ShowPreamble", NULL, N_("_Edit Preambles..."), NULL, N_("Edit the preambles used to generate the preview"), G_CALLBACK (show_preamble_cb) }, +#endif { "Zoom", NULL, N_("_Zoom") }, |