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>
This commit is contained in:
Dirk Hohndel 2013-04-09 16:01:17 -07:00
parent 7cacbdf762
commit 83a313f1ee

View file

@ -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\" /> \