summaryrefslogtreecommitdiffstats
path: root/gtk-gui.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-04-09 16:01:17 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-04-09 16:01:17 -0700
commit83a313f1ee1f09eab9571f978d84a8b55e9471e0 (patch)
tree2f15a8a59824412f2699eae70640dbb3c91680fb /gtk-gui.c
parent7cacbdf76222018c7287efd401b4e37a20af3ce4 (diff)
downloadsubsurface-83a313f1ee1f09eab9571f978d84a8b55e9471e0.tar.gz
Correctly conditionalize compilation for menu structure
Only call upload_all_dives_divelogs_cb() if we have both libzip and xslt. Reported-by: Jozef Ivanecký (dodo.sk@gmail.com) Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'gtk-gui.c')
-rw-r--r--gtk-gui.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/gtk-gui.c b/gtk-gui.c
index 755c8e1ef..eb07807b0 100644
--- a/gtk-gui.c
+++ b/gtk-gui.c
@@ -1572,7 +1572,9 @@ static GtkActionEntry menu_items[] = {
{ "Print", GTK_STOCK_PRINT, N_("Print..."), CTRLCHAR "P", NULL, G_CALLBACK(do_print) },
{ "ImportFile", NULL, N_("Import File(s)..."), CTRLCHAR "I", NULL, G_CALLBACK(import_files) },
{ "ExportUDDF", NULL, N_("Export UDDF..."), NULL, NULL, G_CALLBACK(export_all_dives_uddf_cb) },
+#if defined(LIBZIP) && defined(XSLT)
{ "UploadDivelogs", NULL, N_("Upload to divelogs.de..."), NULL, NULL, G_CALLBACK(upload_all_dives_divelogs_cb) },
+#endif
{ "DownloadLog", NULL, N_("Download From Dive Computer..."), CTRLCHAR "D", NULL, G_CALLBACK(download_dialog) },
{ "DownloadWeb", GTK_STOCK_CONNECT, N_("Download From Web Service..."), NULL, NULL, G_CALLBACK(webservice_download_dialog) },
{ "AddDive", GTK_STOCK_ADD, N_("Add Dive..."), NULL, NULL, G_CALLBACK(add_dive_cb) },
@@ -1614,9 +1616,11 @@ static const gchar* ui_string = " \
<menuitem name=\"Close\" action=\"CloseFile\" /> \
<separator name=\"Separator1\"/> \
<menuitem name=\"Import XML File\" action=\"ImportFile\" /> \
- <menuitem name=\"Export to UDDF File\" action=\"ExportUDDF\" /> \
- <menuitem name=\"Upload to divelogs.de\" action=\"UploadDivelogs\" /> \
- <separator name=\"Separator2\"/> \
+ <menuitem name=\"Export to UDDF File\" action=\"ExportUDDF\" />"
+#if defined(LIBZIP) && defined(XSLT)
+ "<menuitem name=\"Upload to divelogs.de\" action=\"UploadDivelogs\" />"
+#endif
+ "<separator name=\"Separator2\"/> \
<menuitem name=\"Print\" action=\"Print\" /> \
<separator name=\"Separator3\"/> \
<menuitem name=\"Preferences\" action=\"Preferences\" /> \