prototype action_message() with format function attribute and move it to
2009-02-06 Sven Neumann <sven@gimp.org> * 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
This commit is contained in:
parent
2b5df1f1ce
commit
2ca771ec55
2 changed files with 38 additions and 24 deletions
|
|
@ -1,3 +1,8 @@
|
|||
2009-02-06 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* 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 <sven@gimp.org>
|
||||
|
||||
* app/actions/tools-commands.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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue