PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ process_single_uri()

static void process_single_uri ( char *  uri)
static

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

References _, add_loader_file_config_to_list(), create_new_file_config(), and pgui_logf().

Referenced by pgui_action_handle_file_drop().

1978 {
1979  SHPLOADERCONFIG *loader_file_config;
1980  char *filename = NULL;
1981  char *hostname;
1982  GError *error = NULL;
1983 
1984  if (uri == NULL)
1985  {
1986  pgui_logf(_("Unable to process drag URI."));
1987  return;
1988  }
1989 
1990  filename = g_filename_from_uri(uri, &hostname, &error);
1991  g_free(uri);
1992 
1993  if (filename == NULL)
1994  {
1995  pgui_logf(_("Unable to process filename: %s\n"), error->message);
1996  g_error_free(error);
1997  return;
1998  }
1999 
2000  /* Create a new row in the listview */
2001  loader_file_config = create_new_file_config(filename);
2002  add_loader_file_config_to_list(loader_file_config);
2003 
2004  g_free(filename);
2005  g_free(hostname);
2006 
2007 }
#define _(String)
Definition: shpcommon.h:24
static void pgui_logf(const char *fmt,...)
static SHPLOADERCONFIG * create_new_file_config(const char *filename)
static void add_loader_file_config_to_list(SHPLOADERCONFIG *loader_file_config)
Here is the call graph for this function:
Here is the caller graph for this function: