gtk_menu_append(menu, gtk_separator_menu_item_new());
/* The "View" submenu. */
- gtk_menu_append(menu, menu_item = gtk_menu_item_new_with_label(_("View")));
+ menu_item = gtk_menu_item_new_with_label(_("View"));
+#ifdef WITH_HILDON
+ gtk_menu_append(menu, menu_item);
+#else
+ gtk_menu_bar_append(GTK_MENU_BAR(_menu_bar), GTK_WIDGET(menu_item));
+#endif
gtk_menu_item_set_submenu(GTK_MENU_ITEM(menu_item), submenu = gtk_menu_new());
gtk_menu_append(submenu, _menu_zoomin_item = gtk_menu_item_new_with_label(_("Zoom In")));
gtk_menu_append(submenu, _menu_zoomout_item = gtk_menu_item_new_with_label(_("Zoom Out")));
/* The "Auto-Center" submenu. */
gtk_menu_append(menu, menu_item = gtk_menu_item_new_with_label(_("Auto-Center")));
gtk_menu_item_set_submenu(GTK_MENU_ITEM(menu_item), submenu = gtk_menu_new());
- gtk_menu_append(submenu, _menu_ac_latlon_item
- = gtk_radio_menu_item_new_with_label(NULL, _("Lat/Lon")));
- gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM
- (_menu_ac_latlon_item),
- _center_mode == CENTER_LATLON);
- gtk_menu_append(submenu, _menu_ac_lead_item =
- gtk_radio_menu_item_new_with_label_from_widget
+ gtk_menu_append(submenu, _menu_ac_latlon_item = gtk_radio_menu_item_new_with_label(NULL, _("Lat/Lon")));
+ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(_menu_ac_latlon_item), _center_mode == CENTER_LATLON);
+ gtk_menu_append(submenu, _menu_ac_lead_item = gtk_radio_menu_item_new_with_label_from_widget
(GTK_RADIO_MENU_ITEM(_menu_ac_latlon_item), _("Lead")));
- gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(_menu_ac_lead_item),
- _center_mode == CENTER_LEAD);
- gtk_menu_append(submenu, _menu_ac_none_item =
- gtk_radio_menu_item_new_with_label_from_widget
+ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(_menu_ac_lead_item), _center_mode == CENTER_LEAD);
+ gtk_menu_append(submenu, _menu_ac_none_item = gtk_radio_menu_item_new_with_label_from_widget
(GTK_RADIO_MENU_ITEM(_menu_ac_latlon_item), _("None")));
- gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(_menu_ac_none_item),
- _center_mode < 0);
+ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(_menu_ac_none_item), _center_mode < 0);
/* The "Go to" submenu. */
- gtk_menu_append(menu, menu_item = gtk_menu_item_new_with_label(_("Go to")));
+ menu_item = gtk_menu_item_new_with_label(_("Go to"));
+#ifdef WITH_HILDON
+ gtk_menu_append(menu, menu_item);
+#else
+ gtk_menu_bar_append(GTK_MENU_BAR(_menu_bar), GTK_WIDGET(menu_item));
+#endif
gtk_menu_item_set_submenu(GTK_MENU_ITEM(menu_item), submenu = gtk_menu_new());
gtk_menu_append(submenu, _menu_goto_home = gtk_menu_item_new_with_label(_("Home")));
gtk_menu_append(submenu, _menu_goto_latlon = gtk_menu_item_new_with_label(_("Lat/Lon...")));
gtk_menu_append(submenu, _menu_goto_nearpoi = gtk_menu_item_new_with_label(_("Nearest POI")));
/* The "GPS" submenu. */
- gtk_menu_append(menu, menu_item
- = gtk_menu_item_new_with_label(_("GPS")));
- gtk_menu_item_set_submenu(GTK_MENU_ITEM(menu_item),
- submenu = gtk_menu_new());
- gtk_menu_append(submenu, _menu_enable_gps_item
- = gtk_check_menu_item_new_with_label(_("Enable GPS")));
- gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM
- (_menu_enable_gps_item), _enable_gps);
- gtk_menu_append(submenu, _menu_gps_show_info_item =
- gtk_check_menu_item_new_with_label(_("Show Information")));
- gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM
- (_menu_gps_show_info_item), _gps_info);
- gtk_menu_append(submenu, _menu_gps_details_item =
- gtk_menu_item_new_with_label(_("Details...")));
- gtk_widget_set_sensitive(GTK_WIDGET(_menu_gps_details_item),
- _enable_gps);
+ menu_item = gtk_menu_item_new_with_label(_("GPS"));
+#ifdef WITH_HILDON
+ gtk_menu_append(menu, menu_item);
+#else
+ gtk_menu_bar_append(GTK_MENU_BAR(_menu_bar), GTK_WIDGET(menu_item));
+#endif
+ gtk_menu_item_set_submenu(GTK_MENU_ITEM(menu_item), submenu = gtk_menu_new());
+ gtk_menu_append(submenu, _menu_enable_gps_item = gtk_check_menu_item_new_with_label(_("Enable GPS")));
+ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(_menu_enable_gps_item), _enable_gps);
+ gtk_menu_append(submenu, _menu_gps_show_info_item = gtk_check_menu_item_new_with_label(_("Show Information")));
+ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(_menu_gps_show_info_item), _gps_info);
+ gtk_menu_append(submenu, _menu_gps_details_item = gtk_menu_item_new_with_label(_("Details...")));
+ gtk_widget_set_sensitive(GTK_WIDGET(_menu_gps_details_item), _enable_gps);
gtk_menu_append(menu, gtk_separator_menu_item_new());
/* The other menu items. */