PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ pgui_action_handle_file_drop()

static void pgui_action_handle_file_drop ( GtkWidget *  widget,
GdkDragContext *  dc,
gint  x,
gint  y,
GtkSelectionData *  selection_data,
guint  info,
guint  t,
gpointer  data 
)
static

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

2064 {
2065  const gchar *p, *q;
2066 
2067  if (selection_data->data == NULL)
2068  {
2069  pgui_logf(_("Unable to process drag data."));
2070  return;
2071  }
2072 
2073  p = (char*)selection_data->data;
2074  while (p)
2075  {
2076  /* Only process non-comments */
2077  if (*p != '#')
2078  {
2079  /* Trim leading whitespace */
2080  while (g_ascii_isspace(*p))
2081  p++;
2082  q = p;
2083  /* Scan to the end of the string (null or newline) */
2084  while (*q && (*q != '\n') && (*q != '\r'))
2085  q++;
2086  if (q > p)
2087  {
2088  /* Ignore terminating character */
2089  q--;
2090  /* Trim trailing whitespace */
2091  while (q > p && g_ascii_isspace(*q))
2092  q--;
2093  if (q > p)
2094  {
2095  process_single_uri(g_strndup(p, q - p + 1));
2096  }
2097  }
2098  }
2099  /* Skip to the next entry */
2100  p = strchr(p, '\n');
2101  if (p)
2102  p++;
2103  }
2104 }
static void process_single_uri(char *uri)
static void pgui_logf(const char *fmt,...)
#define _(String)
Definition: shpcommon.h:24

References _, pgui_logf(), and process_single_uri().

Referenced by pgui_create_import_file_table().

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