Commit c5957f14 authored by Michael Natterer's avatar Michael Natterer 😴

app: remove the "filters_dialog" member from GimpDisplayShell

and attach the dialog using dialogs_attach_dialog().
parent 8ab530ff
......@@ -472,18 +472,21 @@ view_display_filters_cmd_callback (GtkAction *action,
gpointer data)
{
GimpDisplayShell *shell;
GtkWidget *dialog;
return_if_no_shell (shell, data);
if (! shell->filters_dialog)
#define FILTERS_DIALOG_KEY "gimp-display-filters-dialog"
dialog = dialogs_get_dialog (G_OBJECT (shell), FILTERS_DIALOG_KEY);
if (! dialog)
{
shell->filters_dialog = gimp_display_shell_filter_dialog_new (shell);
dialog = gimp_display_shell_filter_dialog_new (shell);
g_signal_connect (shell->filters_dialog, "destroy",
G_CALLBACK (gtk_widget_destroyed),
&shell->filters_dialog);
dialogs_attach_dialog (G_OBJECT (shell), FILTERS_DIALOG_KEY, dialog);
}
gtk_window_present (GTK_WINDOW (shell->filters_dialog));
gtk_window_present (GTK_WINDOW (dialog));
}
void
......
......@@ -159,7 +159,6 @@ struct _GimpDisplayShell
GimpColorDisplayStack *filter_stack; /* color display conversion stuff */
guint filter_idle_id;
GtkWidget *filters_dialog; /* color display filter dialog */
const Babl *filter_format; /* filter_buffer's format */
GeglBuffer *filter_buffer; /* buffer for display filters */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment