PostGIS  3.7.0dev-r@@SVN_REVISION@@

◆ pgui_action_connection_okay()

static void pgui_action_connection_okay ( GtkWidget *  widget,
gpointer  data 
)
static

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

2546 {
2547  /* Update the configuration structure from the form */
2549 
2550  /* Make sure have a valid connection first */
2551  if (!pgui_validate_connection())
2552  {
2554  return;
2555  }
2556 
2557  if (!connection_test())
2558  {
2559  pgui_logf(_("Connection failed."));
2560 
2561  /* If the connection failed, display a warning before closing */
2562  pgui_seterr(_("Unable to connect to the database - please check your connection settings"));
2564  }
2565  else
2566  {
2567  pgui_logf(_("Connection succeeded."));
2568  }
2569 
2570 
2571  /* Hide the window after the test */
2572  gtk_widget_hide(GTK_WIDGET(window_conn));
2573 }
static void static void static void static void pgui_seterr(const char *fmt,...) __attribute__((format(printf
static void static void static void pgui_logf(const char *fmt,...) __attribute__((format(printf
static void pgui_raise_error_dialogue(void)
static int pgui_validate_connection()
static int connection_test(void)
static void update_conn_config_from_conn_ui(void)
static GtkWidget * window_conn
#define _(String)
Definition: shpcommon.h:24

References _, connection_test(), pgui_logf(), pgui_raise_error_dialogue(), pgui_seterr(), pgui_validate_connection(), update_conn_config_from_conn_ui(), and window_conn.

Referenced by pgui_create_connection_window().

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