simplified the code

This commit is contained in:
Sven Neumann 2005-02-21 01:08:44 +00:00
parent 5157dba5cb
commit 8ec495f481
1 changed files with 9 additions and 10 deletions

View File

@ -83,20 +83,19 @@ gimp_display_shell_filter_new (GimpColorConfig *config)
if (g_type_is_a (type, GIMP_TYPE_COLOR_DISPLAY))
{
GimpColorDisplay *display = gimp_color_display_new (type);
GimpColorDisplay *display;
GimpColorDisplayStack *stack;
if (display)
{
GimpColorDisplayStack *stack = gimp_color_display_stack_new ();
display = g_object_new (type,
"config", config,
NULL);
g_object_set (display, "config", config, NULL);
stack = gimp_color_display_stack_new ();
gimp_color_display_stack_add (stack, display);
gimp_color_display_stack_add (stack, display);
g_object_unref (display);
g_object_unref (display);
return stack;
}
return stack;
}
}