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 2520 of file shp2pgsql-gui.c.

2521 {
2522  /* Update the configuration structure from the form */
2524 
2525  /* Make sure have a valid connection first */
2526  if (!pgui_validate_connection())
2527  {
2529  return;
2530  }
2531 
2532  if (!connection_test())
2533  {
2534  pgui_logf(_("Connection failed."));
2535 
2536  /* If the connection failed, display a warning before closing */
2537  pgui_seterr(_("Unable to connect to the database - please check your connection settings"));
2539  }
2540  else
2541  {
2542  pgui_logf(_("Connection succeeded."));
2543  }
2544 
2545 
2546  /* Hide the window after the test */
2547  gtk_widget_hide(GTK_WIDGET(window_conn));
2548 }
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: