PostGIS 3.7.0dev-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 2086 of file shp2pgsql-gui.c.

2091{
2092 const gchar *p, *q;
2093
2094 if (selection_data->data == NULL)
2095 {
2096 pgui_logf(_("Unable to process drag data."));
2097 return;
2098 }
2099
2100 p = (char*)selection_data->data;
2101 while (p)
2102 {
2103 /* Only process non-comments */
2104 if (*p != '#')
2105 {
2106 /* Trim leading whitespace */
2107 while (g_ascii_isspace(*p))
2108 p++;
2109 q = p;
2110 /* Scan to the end of the string (null or newline) */
2111 while (*q && (*q != '\n') && (*q != '\r'))
2112 q++;
2113 if (q > p)
2114 {
2115 /* Ignore terminating character */
2116 q--;
2117 /* Trim trailing whitespace */
2118 while (q > p && g_ascii_isspace(*q))
2119 q--;
2120 if (q > p)
2121 {
2122 process_single_uri(g_strndup(p, q - p + 1));
2123 }
2124 }
2125 }
2126 /* Skip to the next entry */
2127 p = strchr(p, '\n');
2128 if (p)
2129 p++;
2130 }
2131}
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: