diff options
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") }, |