PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ pgui_create_progress_dialog()

static void pgui_create_progress_dialog ( )
static

Definition at line 2619 of file shp2pgsql-gui.c.

2620 {
2621  GtkWidget *vbox_progress, *table_progress;
2622 
2623  dialog_progress = gtk_dialog_new_with_buttons(_("Working..."), GTK_WINDOW(window_main), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL);
2624 
2625  gtk_window_set_modal(GTK_WINDOW(dialog_progress), TRUE);
2626  gtk_window_set_keep_above(GTK_WINDOW(dialog_progress), TRUE);
2627  gtk_window_set_default_size(GTK_WINDOW(dialog_progress), 640, -1);
2628 
2629  /* Use a vbox as the base container */
2630  vbox_progress = gtk_dialog_get_content_area(GTK_DIALOG(dialog_progress));
2631  gtk_box_set_spacing(GTK_BOX(vbox_progress), 15);
2632 
2633  /* Create a table within the vbox */
2634  table_progress = gtk_table_new(2, 1, TRUE);
2635  gtk_container_set_border_width (GTK_CONTAINER (table_progress), 12);
2636  gtk_table_set_row_spacings(GTK_TABLE(table_progress), 5);
2637  gtk_table_set_col_spacings(GTK_TABLE(table_progress), 10);
2638 
2639  /* Text for the progress bar */
2640  label_progress = gtk_label_new("");
2641  gtk_table_attach_defaults(GTK_TABLE(table_progress), label_progress, 0, 1, 0, 1);
2642 
2643  /* Progress bar for the import */
2644  progress = gtk_progress_bar_new();
2645  gtk_progress_bar_set_orientation(GTK_PROGRESS_BAR(progress), GTK_PROGRESS_LEFT_TO_RIGHT);
2646  gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(progress), 0.0);
2647  gtk_table_attach_defaults(GTK_TABLE(table_progress), progress, 0, 1, 1, 2);
2648 
2649  /* Add the table to the vbox */
2650  gtk_box_pack_start(GTK_BOX(vbox_progress), table_progress, FALSE, FALSE, 0);
2651 
2652  /* Add signal for cancel button */
2653  g_signal_connect(dialog_progress, "response", G_CALLBACK(pgui_action_progress_cancel), dialog_progress);
2654 
2655  /* Make sure we catch a delete event too */
2656  gtk_signal_connect(GTK_OBJECT(dialog_progress), "delete_event", GTK_SIGNAL_FUNC(pgui_action_progress_delete), NULL);
2657 
2658  return;
2659 }
#define TRUE
Definition: dbfopen.c:169
#define FALSE
Definition: dbfopen.c:168
static GtkWidget * label_progress
static GtkWidget * progress
static GtkWidget * dialog_progress
#define gtk_dialog_get_content_area(dialog)
Definition: shp2pgsql-gui.c:41
static void pgui_action_progress_cancel(GtkDialog *dialog, gint response_id, gpointer user_data)
static gint pgui_action_progress_delete(GtkWidget *widget, GdkEvent *event, gpointer data)
static GtkWidget * window_main
Definition: shp2pgsql-gui.c:50
#define _(String)
Definition: shpcommon.h:24

References _, dialog_progress, FALSE, gtk_dialog_get_content_area, label_progress, pgui_action_progress_cancel(), pgui_action_progress_delete(), progress, TRUE, and window_main.

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function: