[beast/devel: 29/35] GXK: gxk_scroll_text_aprintf: use string_format() which is type-safe and locale-stable
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast/devel: 29/35] GXK: gxk_scroll_text_aprintf: use string_format() which is type-safe and locale-stable
- Date: Tue, 14 May 2013 19:40:21 +0000 (UTC)
commit 2ad87ff522bc21408bf646e12ce2bef80a45a037
Author: Tim Janik <timj gnu org>
Date: Tue May 14 20:46:47 2013 +0200
GXK: gxk_scroll_text_aprintf: use string_format() which is type-safe and locale-stable
beast-gtk/gxk/gxktexttools.cc | 27 ---------------------------
beast-gtk/gxk/gxktexttools.hh | 4 +---
2 files changed, 1 insertions(+), 30 deletions(-)
---
diff --git a/beast-gtk/gxk/gxktexttools.cc b/beast-gtk/gxk/gxktexttools.cc
index 809044f..8270a3e 100644
--- a/beast-gtk/gxk/gxktexttools.cc
+++ b/beast-gtk/gxk/gxktexttools.cc
@@ -1592,33 +1592,6 @@ gxk_scroll_text_append_file_tsm (GtkWidget *sctext,
/**
* @param sctext a scroll text widget as returned from gxk_scroll_text_create()
- * @param text_fmt printf(3) style format string
- *
- * Append @a text_fmt to the textual contents of this @a sctext.
- */
-void
-gxk_scroll_text_aprintf (GtkWidget *sctext,
- const gchar *text_fmt,
- ...)
-{
- g_return_if_fail (GXK_IS_SCROLL_TEXT (sctext));
-
- if (text_fmt)
- {
- va_list args;
- gchar *buffer;
-
- va_start (args, text_fmt);
- buffer = g_strdup_vprintf (text_fmt, args);
- va_end (args);
-
- gxk_scroll_text_append (sctext, buffer);
- g_free (buffer);
- }
-}
-
-/**
- * @param sctext a scroll text widget as returned from gxk_scroll_text_create()
* @return a GtkTextView widget
*
* Return the internally used GtkTextView of this @a sctext.
diff --git a/beast-gtk/gxk/gxktexttools.hh b/beast-gtk/gxk/gxktexttools.hh
index 0d975ac..c4494e4 100644
--- a/beast-gtk/gxk/gxktexttools.hh
+++ b/beast-gtk/gxk/gxktexttools.hh
@@ -57,9 +57,7 @@ void gxk_scroll_text_append_file (GtkWidget *sctext,
const gchar *file_name);
void gxk_scroll_text_append_file_tsm (GtkWidget *sctext,
const gchar *file_name);
-void gxk_scroll_text_aprintf (GtkWidget *sctext,
- const gchar *text_fmt,
- ...) G_GNUC_PRINTF (2, 3);
+#define gxk_scroll_text_aprintf(sctext, ...) gxk_scroll_text_append (sctext,
Rapicorn::string_format (__VA_ARGS__).c_str())
void gxk_scroll_text_pop_indent (GtkWidget *sctext);
GtkTextView* gxk_scroll_text_get_text_view (GtkWidget *sctext);
void gxk_text_add_tsm_path (const gchar *path);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]