PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ pgui_log_va()

void pgui_log_va ( const char *  fmt,
va_list  ap 
)
static

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

225 {
226  char msg[GUIMSG_LINE_MAXLEN+1];
227  GtkTextIter iter;
228 
229  if ( -1 == vsnprintf (msg, GUIMSG_LINE_MAXLEN, fmt, ap) ) return;
230  msg[GUIMSG_LINE_MAXLEN] = '\0';
231 
232  /* Append text to the end of the text area, scrolling if required to make it visible */
233  gtk_text_buffer_get_end_iter(textbuffer_log, &iter);
234  gtk_text_buffer_insert(textbuffer_log, &iter, msg, -1);
235  gtk_text_buffer_insert(textbuffer_log, &iter, "\n", -1);
236 
237  gtk_text_view_scroll_to_iter(GTK_TEXT_VIEW(textview_log), &iter, 0.0, TRUE, 0.0, 1.0);
238 
239  /* Allow GTK to process events */
240  while (gtk_events_pending())
241  gtk_main_iteration();
242 }
#define TRUE
Definition: dbfopen.c:169
def fmt
Definition: pixval.py:92
static GtkTextBuffer * textbuffer_log
Definition: shp2pgsql-gui.c:53
static GtkWidget * textview_log
Definition: shp2pgsql-gui.c:52
#define GUIMSG_LINE_MAXLEN

References pixval::fmt, GUIMSG_LINE_MAXLEN, textbuffer_log, textview_log, and TRUE.

Referenced by pgui_logf().

Here is the caller graph for this function: