/* initialisation */
void osm_traces_init () {
/* Preferences */
- a_preferences_register_group ( VIKING_OSM_TRACES_PARAMS_GROUP_KEY, "OpenStreetMap traces" );
+ a_preferences_register_group ( VIKING_OSM_TRACES_PARAMS_GROUP_KEY, _("OpenStreetMap Traces") );
VikLayerParamData tmp;
tmp.s = "";
GtkWidget *tags_label, *tags_entry;
GtkComboBox *visibility;
const OsmTraceVis_t *vis_t;
- GtkTooltips* dialog_tips;
-
- dialog_tips = gtk_tooltips_new();
user_label = gtk_label_new(_("Email:"));
user_entry = gtk_entry_new();
gtk_entry_set_text(GTK_ENTRY(user_entry), default_user);
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dia)->vbox), user_label, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dia)->vbox), user_entry, FALSE, FALSE, 0);
- gtk_tooltips_set_tip (dialog_tips, user_entry,
- _("The email used as login"),
- _("Enter the email you use to login into www.openstreetmap.org."));
+ gtk_widget_set_tooltip_markup(GTK_WIDGET(user_entry),
+ _("The email used as login\n"
+ "<small>Enter the email you use to login into www.openstreetmap.org.</small>"));
password_label = gtk_label_new(_("Password:"));
password_entry = gtk_entry_new();
gtk_entry_set_visibility(GTK_ENTRY(password_entry), FALSE);
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dia)->vbox), password_label, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dia)->vbox), password_entry, FALSE, FALSE, 0);
- gtk_tooltips_set_tip (dialog_tips, password_entry,
- _("The password used to login"),
- _("Enter the password you use to login into www.openstreetmap.org."));
+ gtk_widget_set_tooltip_markup(GTK_WIDGET(password_entry),
+ _("The password used to login\n"
+ "<small>Enter the password you use to login into www.openstreetmap.org.</small>"));
name_label = gtk_label_new(_("File's name:"));
name_entry = gtk_entry_new();
gtk_entry_set_text(GTK_ENTRY(name_entry), name);
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dia)->vbox), name_label, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dia)->vbox), name_entry, FALSE, FALSE, 0);
- gtk_tooltips_set_tip (dialog_tips, name_entry,
- _("The name of the file on OSM"),
- _("This is the name of the file created on the server. "
- "This is not the name of the local file."));
+ gtk_widget_set_tooltip_markup(GTK_WIDGET(name_entry),
+ _("The name of the file on OSM\n"
+ "<small>This is the name of the file created on the server."
+ "This is not the name of the local file.</small>"));
description_label = gtk_label_new(_("Description:"));
description_entry = gtk_entry_new();
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dia)->vbox), description_label, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dia)->vbox), description_entry, FALSE, FALSE, 0);
- gtk_tooltips_set_tip (dialog_tips, description_entry,
- _("The description of the trace"),
- "");
+ gtk_widget_set_tooltip_text(GTK_WIDGET(description_entry),
+ _("The description of the trace"));
tags_label = gtk_label_new(_("Tags:"));
tags_entry = gtk_entry_new();
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dia)->vbox), tags_label, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dia)->vbox), tags_entry, FALSE, FALSE, 0);
- gtk_tooltips_set_tip (dialog_tips, tags_entry,
- _("The tags associated to the trace"),
- "");
+ gtk_widget_set_tooltip_text(GTK_WIDGET(tags_entry),
+ _("The tags associated to the trace"));
visibility = GTK_COMBO_BOX(gtk_combo_box_new_text ());
for (vis_t = OsmTraceVis; vis_t->combostr != NULL; vis_t++)
gtk_combo_box_set_active(visibility, 0);
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dia)->vbox), GTK_WIDGET(visibility), FALSE, FALSE, 0);
+ /* User should think about it first... */
+ gtk_dialog_set_default_response ( GTK_DIALOG(dia), GTK_RESPONSE_REJECT );
+
gtk_widget_show_all ( dia );
gtk_widget_grab_focus ( description_entry );