diff --git a/src/dialogs/tools.c b/src/dialogs/tools.c index c174d8a..cbf371e 100644 --- a/src/dialogs/tools.c +++ b/src/dialogs/tools.c @@ -82,7 +82,7 @@ return child; } - void gtk_entry_set_text_printf(GtkEntry *entry, const gchar *fmt, ...) + LIB3270_EXPORT void gtk_entry_set_printf(GtkEntry *entry, const gchar *fmt, ...) { va_list arg_ptr; va_start(arg_ptr, fmt); diff --git a/src/filetransfer/worker.c b/src/filetransfer/worker.c index 391acea..c084176 100644 --- a/src/filetransfer/worker.c +++ b/src/filetransfer/worker.c @@ -344,7 +344,7 @@ if(cfg->length) { - gtk_entry_set_text_printf(cfg->worker->field[PROGRESS_FIELD_TOTAL],"%lu",cfg->length); + gtk_entry_set_printf(cfg->worker->field[PROGRESS_FIELD_TOTAL],"%lu",cfg->length); } else { @@ -432,8 +432,8 @@ static gboolean bg_emit_update(struct bg_update * update) { // Update values - gtk_entry_set_text_printf(update->worker->field[PROGRESS_FIELD_CURRENT],"%lu",update->current); - gtk_entry_set_text_printf(update->worker->field[PROGRESS_FIELD_TOTAL],"%lu",update->total); + gtk_entry_set_printf(update->worker->field[PROGRESS_FIELD_CURRENT],"%lu",update->current); + gtk_entry_set_printf(update->worker->field[PROGRESS_FIELD_TOTAL],"%lu",update->total); if(update->total) { @@ -462,7 +462,7 @@ gtk_progress_bar_set_fraction(update->worker->pbar, ((gdouble) update->current) / ((gdouble) update->total)); } - gtk_entry_set_text_printf(update->worker->field[PROGRESS_FIELD_ETA],"%lu",update->total); + gtk_entry_set_printf(update->worker->field[PROGRESS_FIELD_ETA],"%lu",update->total); } diff --git a/src/include/internals.h b/src/include/internals.h index 937087c..708f00b 100644 --- a/src/include/internals.h +++ b/src/include/internals.h @@ -73,8 +73,6 @@ G_GNUC_INTERNAL void v3270_activity_list_save(GtkWidget *widget); G_GNUC_INTERNAL void v3270_activity_list_save_as(GtkWidget *widget); - G_GNUC_INTERNAL void gtk_entry_set_text_printf(GtkEntry *entry, const gchar *fmt, ...); - G_END_DECLS #endif // V3270_INTERNALS_H_INCLUDED diff --git a/src/include/v3270.h b/src/include/v3270.h index 769e90a..2d49e63 100644 --- a/src/include/v3270.h +++ b/src/include/v3270.h @@ -291,6 +291,10 @@ LIB3270_EXPORT GtkWidget * v3270_dialog_new(GtkWidget *widget, const gchar *title, const gchar *apply); + // Convenience + LIB3270_EXPORT void gtk_entry_set_printf(GtkEntry *entry, const gchar *fmt, ...) G_GNUC_PRINTF(2,3); + + G_END_DECLS #endif // V3270_H_INCLUDED -- libgit2 0.21.2