Example #1
0
void
gimp_tool_push_status (GimpTool    *tool,
                       GimpDisplay *display,
                       const gchar *format,
                       ...)
{
  GimpDisplayShell *shell;
  va_list           args;

  g_return_if_fail (GIMP_IS_TOOL (tool));
  g_return_if_fail (GIMP_IS_DISPLAY (display));
  g_return_if_fail (format != NULL);

  shell = GIMP_DISPLAY_SHELL (display->shell);

  va_start (args, format);

  gimp_statusbar_push_valist (GIMP_STATUSBAR (shell->statusbar),
                              G_OBJECT_TYPE_NAME (tool),
                              format, args);

  va_end (args);

  tool->status_displays = g_list_remove (tool->status_displays, display);
  tool->status_displays = g_list_prepend (tool->status_displays, display);
}
Example #2
0
void
gimp_tool_push_status (GimpTool    *tool,
                       GimpDisplay *display,
                       const gchar *format,
                       ...)
{
  GimpDisplayShell *shell;
  const gchar      *stock_id;
  va_list           args;

  g_return_if_fail (GIMP_IS_TOOL (tool));
  g_return_if_fail (GIMP_IS_DISPLAY (display));
  g_return_if_fail (format != NULL);

  shell = gimp_display_get_shell (display);

  stock_id = gimp_viewable_get_stock_id (GIMP_VIEWABLE (tool->tool_info));

  va_start (args, format);

  gimp_statusbar_push_valist (gimp_display_shell_get_statusbar (shell),
                              G_OBJECT_TYPE_NAME (tool), stock_id,
                              format, args);

  va_end (args);

  tool->status_displays = g_list_remove (tool->status_displays, display);
  tool->status_displays = g_list_prepend (tool->status_displays, display);
}