PostGIS 3.6.2dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

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

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