]> granicus.if.org Git - postgis/commitdiff
Display "Creating Index..." text within the progress dialog rather than within the...
authorMark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
Sat, 14 Jan 2012 13:10:27 +0000 (13:10 +0000)
committerMark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
Sat, 14 Jan 2012 13:10:27 +0000 (13:10 +0000)
This should make it more obvious to users that something is still happening in the case that
they are building on a index on larger shapefiles which can often take quite some time.

git-svn-id: http://svn.osgeo.org/postgis/trunk@8814 b70326c6-7e19-0410-871a-916f4a2858ee

loader/shp2pgsql-gui.c

index abe49409bf94151633acb3326ba3d1aaf97077cc..080c8e586105a00e9f08f2874636ceee6ff2bbde 100644 (file)
@@ -1185,9 +1185,14 @@ pgui_action_import(GtkWidget *widget, gpointer data)
                                        goto import_cleanup;
                        }
 
+                       /* Just in case index creation takes a long time, update the progress text */
                        if (state->config->createindex)
                        {
-                               pgui_logf(_("Creating spatial index...\n"));
+                               gtk_label_set_text(GTK_LABEL(label_progress), _("Creating spatial index..."));
+                               
+                               /* Allow GTK events to get a look in */
+                               while (gtk_events_pending())
+                                       gtk_main_iteration();
                        }
 
                        /* Send the footer to the server */