mirror of https://github.com/GNOME/gimp.git
app: remove gimp_display_shell_filter_new(), it's empty and useless
This commit is contained in:
parent
42a7d17d1a
commit
ec18b969a3
|
@ -54,16 +54,12 @@ gimp_display_shell_filter_set (GimpDisplayShell *shell,
|
|||
g_signal_handlers_disconnect_by_func (shell->filter_stack,
|
||||
gimp_display_shell_filter_changed,
|
||||
shell);
|
||||
|
||||
g_object_unref (shell->filter_stack);
|
||||
}
|
||||
|
||||
shell->filter_stack = stack;
|
||||
g_set_object (&shell->filter_stack, stack);
|
||||
|
||||
if (shell->filter_stack)
|
||||
{
|
||||
g_object_ref (shell->filter_stack);
|
||||
|
||||
g_signal_connect (shell->filter_stack, "changed",
|
||||
G_CALLBACK (gimp_display_shell_filter_changed),
|
||||
shell);
|
||||
|
@ -94,42 +90,6 @@ gimp_display_shell_has_filter (GimpDisplayShell *shell)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
GimpColorDisplayStack *
|
||||
gimp_display_shell_filter_new (GimpDisplayShell *shell)
|
||||
{
|
||||
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), NULL);
|
||||
|
||||
#if 0
|
||||
/* disabled because we use gimpdisplayshell-profile now, keep
|
||||
* the code around for reference.
|
||||
*/
|
||||
if (config->display_module)
|
||||
{
|
||||
GType type = g_type_from_name (config->display_module);
|
||||
|
||||
if (g_type_is_a (type, GIMP_TYPE_COLOR_DISPLAY))
|
||||
{
|
||||
GimpColorDisplay *display;
|
||||
GimpColorDisplayStack *stack;
|
||||
|
||||
display = g_object_new (type,
|
||||
"color-config", config,
|
||||
"color-managed", shell,
|
||||
NULL);
|
||||
|
||||
stack = gimp_color_display_stack_new ();
|
||||
|
||||
gimp_color_display_stack_add (stack, display);
|
||||
g_object_unref (display);
|
||||
|
||||
return stack;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/* private functions */
|
||||
|
||||
|
|
|
@ -24,8 +24,5 @@ void gimp_display_shell_filter_set (GimpDisplayShell *shell,
|
|||
|
||||
gboolean gimp_display_shell_has_filter (GimpDisplayShell *shell);
|
||||
|
||||
GimpColorDisplayStack *
|
||||
gimp_display_shell_filter_new (GimpDisplayShell *shell);
|
||||
|
||||
|
||||
#endif /* __GIMP_DISPLAY_SHELL_FILTER_H__ */
|
||||
|
|
|
@ -394,17 +394,16 @@ gimp_display_shell_init (GimpDisplayShell *shell)
|
|||
static void
|
||||
gimp_display_shell_constructed (GObject *object)
|
||||
{
|
||||
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (object);
|
||||
GimpDisplayConfig *config;
|
||||
GimpImage *image;
|
||||
GimpColorDisplayStack *filter;
|
||||
GtkWidget *grid;
|
||||
GtkWidget *gtk_image;
|
||||
GimpAction *action;
|
||||
gint image_width;
|
||||
gint image_height;
|
||||
gint shell_width;
|
||||
gint shell_height;
|
||||
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (object);
|
||||
GimpDisplayConfig *config;
|
||||
GimpImage *image;
|
||||
GtkWidget *grid;
|
||||
GtkWidget *gtk_image;
|
||||
GimpAction *action;
|
||||
gint image_width;
|
||||
gint image_height;
|
||||
gint shell_width;
|
||||
gint shell_height;
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->constructed (object);
|
||||
|
||||
|
@ -687,16 +686,6 @@ gimp_display_shell_constructed (GObject *object)
|
|||
/* show everything that is always shown */
|
||||
gtk_widget_show (GTK_WIDGET (shell->canvas));
|
||||
|
||||
/* add display filters */
|
||||
|
||||
filter = gimp_display_shell_filter_new (shell);
|
||||
|
||||
if (filter)
|
||||
{
|
||||
gimp_display_shell_filter_set (shell, filter);
|
||||
g_object_unref (filter);
|
||||
}
|
||||
|
||||
if (image)
|
||||
{
|
||||
gimp_display_shell_connect (shell);
|
||||
|
@ -738,8 +727,7 @@ gimp_display_shell_dispose (GObject *object)
|
|||
if (shell->selection)
|
||||
gimp_display_shell_selection_free (shell);
|
||||
|
||||
if (shell->filter_stack)
|
||||
gimp_display_shell_filter_set (shell, NULL);
|
||||
gimp_display_shell_filter_set (shell, NULL);
|
||||
|
||||
if (shell->filter_idle_id)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue