PostGIS  2.1.10dev-r@@SVN_REVISION@@
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 2054 of file shp2pgsql-gui.c.

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

Referenced by pgui_create_import_file_table().

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

Here is the call graph for this function:

Here is the caller graph for this function: