X-Git-Url: https://git.street.me.uk/andy/viking.git/blobdiff_plain/0e6076a1a298736d20a92607e5617c47a3a4490b..bd5e571ac6338d3fe04102d73e3328678eb964bd:/src/vikgeoreflayer.c?ds=sidebyside diff --git a/src/vikgeoreflayer.c b/src/vikgeoreflayer.c index 72201680..2c5e9237 100644 --- a/src/vikgeoreflayer.c +++ b/src/vikgeoreflayer.c @@ -437,6 +437,12 @@ static gboolean georef_layer_dialog ( VikGeorefLayer **vgl, gpointer vp, GtkWind GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, NULL ); + /* Default to reject as user really needs to specify map file first */ + gtk_dialog_set_default_response ( GTK_DIALOG(dialog), GTK_RESPONSE_REJECT ); + GtkWidget *response_w = NULL; +#if GTK_CHECK_VERSION (2, 20, 0) + response_w = gtk_dialog_get_widget_for_response ( GTK_DIALOG(dialog), GTK_RESPONSE_REJECT ); +#endif GtkWidget *table, *wfp_hbox, *wfp_label, *wfp_button, *ce_label, *ce_spin, *cn_label, *cn_spin, *xlabel, *xspin, *ylabel, *yspin, *imagelabel, *imageentry; GtkWidget *pass_along[4]; @@ -509,6 +515,9 @@ static gboolean georef_layer_dialog ( VikGeorefLayer **vgl, gpointer vp, GtkWind pass_along[3] = cn_spin; g_signal_connect_swapped ( G_OBJECT(wfp_button), "clicked", G_CALLBACK(georef_layer_dialog_load), pass_along ); + if ( response_w ) + gtk_widget_grab_focus ( response_w ); + gtk_widget_show_all ( table ); if ( gtk_dialog_run ( GTK_DIALOG(dialog) ) == GTK_RESPONSE_ACCEPT )