PostGIS  3.7.0dev-r@@SVN_REVISION@@

◆ pgui_log_va()

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

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

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