[beast/devel: 30/35] GXK: use string_format() for gxk_status_printf, remove gxk_status_errnoprintf
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast/devel: 30/35] GXK: use string_format() for gxk_status_printf, remove gxk_status_errnoprintf
- Date: Tue, 14 May 2013 19:40:26 +0000 (UTC)
commit eac73563e8d02e1b458dd3ceb97fe2e01ec996b9
Author: Tim Janik <timj gnu org>
Date: Tue May 14 20:47:43 2013 +0200
GXK: use string_format() for gxk_status_printf, remove gxk_status_errnoprintf
beast-gtk/gxk/gxkstatusbar.cc | 61 -----------------------------------------
beast-gtk/gxk/gxkstatusbar.hh | 8 +-----
2 files changed, 1 insertions(+), 68 deletions(-)
---
diff --git a/beast-gtk/gxk/gxkstatusbar.cc b/beast-gtk/gxk/gxkstatusbar.cc
index ee962d9..f9c1484 100644
--- a/beast-gtk/gxk/gxkstatusbar.cc
+++ b/beast-gtk/gxk/gxkstatusbar.cc
@@ -267,67 +267,6 @@ gxk_status_set (gfloat percentage,
}
/**
- * @param percentage progress percentage
- * @param status_msg error status
- * @param message_fmt printf style message to be displayed
- *
- * Similar to gxk_status_set() but supports construction of
- * the message through a printf(3) style argument list.
- */
-void
-gxk_status_printf (gfloat percentage,
- const gchar *status_msg,
- const gchar *message_fmt,
- ...)
-{
- GxkStatusBar *sbar = status_bar_get_current ();
-
- if (sbar)
- {
- gchar *buffer;
- va_list args;
-
- va_start (args, message_fmt);
- buffer = g_strdup_vprintf (message_fmt, args);
- va_end (args);
-
- status_bar_set (sbar, percentage, buffer, status_msg);
- g_free (buffer);
- }
-}
-
-/**
- * @param libc_errno errno value
- * @param message_fmt printf style message to be displayed
- *
- * Similar to gxk_status_printf() but figures the error
- * status automatically from the passed in @a libc_errno.
- */
-void
-gxk_status_errnoprintf (gint libc_errno,
- const gchar *message_fmt,
- ...)
-{
- GxkStatusBar *sbar = status_bar_get_current ();
-
- if (sbar)
- {
- gchar *buffer;
- va_list args;
-
- va_start (args, message_fmt);
- buffer = g_strdup_vprintf (message_fmt, args);
- va_end (args);
-
- if (libc_errno)
- status_bar_set (sbar, GXK_STATUS_ERROR, buffer, g_strerror (libc_errno));
- else
- status_bar_set (sbar, GXK_STATUS_DONE, buffer, NULL);
- g_free (buffer);
- }
-}
-
-/**
* @param widget status bar window
*
* Push a window onto the stack of windows that have
diff --git a/beast-gtk/gxk/gxkstatusbar.hh b/beast-gtk/gxk/gxkstatusbar.hh
index 2011225..d50e415 100644
--- a/beast-gtk/gxk/gxkstatusbar.hh
+++ b/beast-gtk/gxk/gxkstatusbar.hh
@@ -35,13 +35,7 @@ void gxk_status_enable_error_bell (gboolean enable_error_be
void gxk_status_set (gfloat percentage,
const gchar *message,
const gchar *status_msg);
-void gxk_status_printf (gfloat percentage,
- const gchar *status_msg,
- const gchar *message_fmt,
- ...) G_GNUC_PRINTF (3, 4);
-void gxk_status_errnoprintf (gint libc_errno,
- const gchar *message_fmt,
- ...) G_GNUC_PRINTF (2, 3);
+#define gxk_status_printf(percentage, status_msg, ...) gxk_status_set (percentage, status_msg,
Rapicorn::string_format (__VA_ARGS__).c_str())
void gxk_status_clear (void);
void gxk_status_window_push (gpointer widget);
void gxk_status_window_pop (void);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]