PostGIS  2.2.8dev-r@@SVN_REVISION@@

◆ pgui_log_va()

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

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

References GUIMSG_LINE_MAXLEN, textbuffer_log, textview_log, and TRUE.

Referenced by pgui_logf().

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