From 2ca771ec558fe2f352bf3b0cb2c776922b47984a Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Fri, 6 Feb 2009 10:09:33 +0000 Subject: [PATCH] prototype action_message() with format function attribute and move it to 2009-02-06 Sven Neumann * app/actions/actions.c: prototype action_message() with format function attribute and move it to the bottom of the file. svn path=/trunk/; revision=27991 --- ChangeLog | 5 ++++ app/actions/actions.c | 57 +++++++++++++++++++++++++------------------ 2 files changed, 38 insertions(+), 24 deletions(-) diff --git a/ChangeLog b/ChangeLog index c5aff8a192..fd39041bfe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-02-06 Sven Neumann + + * app/actions/actions.c: prototype action_message() with format + function attribute and move it to the bottom of the file. + 2009-02-06 Sven Neumann * app/actions/tools-commands.c diff --git a/app/actions/actions.c b/app/actions/actions.c index 85cde39a1b..85c7751636 100644 --- a/app/actions/actions.c +++ b/app/actions/actions.c @@ -93,6 +93,12 @@ #include "gimp-intl.h" +static void action_message (GimpDisplay *display, + GObject *object, + const gchar *format, + ...) G_GNUC_PRINTF(3,4); + + /* global variables */ GimpActionFactory *global_action_factory = NULL; @@ -382,30 +388,6 @@ action_data_get_widget (gpointer data) return dialogs_get_toolbox (); } -static void -action_message (GimpDisplay *display, - GObject *object, - gchar *format, - ...) -{ - GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (display->shell); - const gchar *stock_id = NULL; - va_list args; - - if (GIMP_IS_TOOL_OPTIONS (object)) - { - GimpToolInfo *tool_info = GIMP_TOOL_OPTIONS (object)->tool_info; - - stock_id = gimp_viewable_get_stock_id (GIMP_VIEWABLE (tool_info)); - } - - va_start (args, format); - gimp_statusbar_push_temp_valist (GIMP_STATUSBAR (shell->statusbar), - GIMP_MESSAGE_INFO, stock_id, - format, args); - va_end (args); -} - gdouble action_select_value (GimpActionSelectType select_type, gdouble value, @@ -618,3 +600,30 @@ action_select_object (GimpActionSelectType select_type, return gimp_container_get_child_by_index (container, select_index); } + + +/* private functions */ + +static void +action_message (GimpDisplay *display, + GObject *object, + const gchar *format, + ...) +{ + GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (display->shell); + const gchar *stock_id = NULL; + va_list args; + + if (GIMP_IS_TOOL_OPTIONS (object)) + { + GimpToolInfo *tool_info = GIMP_TOOL_OPTIONS (object)->tool_info; + + stock_id = gimp_viewable_get_stock_id (GIMP_VIEWABLE (tool_info)); + } + + va_start (args, format); + gimp_statusbar_push_temp_valist (GIMP_STATUSBAR (shell->statusbar), + GIMP_MESSAGE_INFO, stock_id, + format, args); + va_end (args); +}