Commit 1b200856 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

renamed shell->cd_list to shell->filters and shell->cd_ui to

2002-03-15  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpdisplayshell.[ch]: renamed shell->cd_list to
	shell->filters and shell->cd_ui to shell->filters_dialog.

	* app/display/gimpdisplayshell-filter-dialog.c
	* app/display/gimpdisplayshell-filter.c
	* app/display/gimpdisplayshell-render.c
	* app/gui/dialogs-constructors.c: changed accordingly.

	* app/display/gimpdisplayshell-filter-dialog.c: cleaned up the GUI.
	Still deprecated GtkCLists around...

	* app/widgets/gimpeditor.[ch]: added gimp_editor_new().

	* app/gui/image-commands.[ch]
	* app/gui/menus.c: added "<Image>/Image/Crop Image" because i was
	sick of clicking 20 times just to crop to the current selection.

	* themes/Default/gtkrc: removed "gimp-dock-style" and changed
	"gimp-gtk-icons" to "gimp-default-style". Set our widget class
	style property defaults there.
parent bf4468bd
2002-03-15 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell.[ch]: renamed shell->cd_list to
shell->filters and shell->cd_ui to shell->filters_dialog.
* app/display/gimpdisplayshell-filter-dialog.c
* app/display/gimpdisplayshell-filter.c
* app/display/gimpdisplayshell-render.c
* app/gui/dialogs-constructors.c: changed accordingly.
* app/display/gimpdisplayshell-filter-dialog.c: cleaned up the GUI.
Still deprecated GtkCLists around...
* app/widgets/gimpeditor.[ch]: added gimp_editor_new().
* app/gui/image-commands.[ch]
* app/gui/menus.c: added "<Image>/Image/Crop Image" because i was
sick of clicking 20 times just to crop to the current selection.
* themes/Default/gtkrc: removed "gimp-dock-style" and changed
"gimp-gtk-icons" to "gimp-default-style". Set our widget class
style property defaults there.
2002-03-15 Sven Neumann <sven@gimp.org>
* plug-ins/common/colorify.c: applied a patch from Maurits Rijk
......
......@@ -27,7 +27,9 @@
#include "core/gimp.h"
#include "core/gimpcontext.h"
#include "core/gimpimage.h"
#include "core/gimpimage-crop.h"
#include "core/gimpimage-duplicate.h"
#include "core/gimpimage-mask.h"
#include "core/gimpimage-merge.h"
#include "core/gimpimage-resize.h"
#include "core/gimpimage-scale.h"
......@@ -182,6 +184,23 @@ image_scale_cmd_callback (GtkWidget *widget,
gtk_widget_show (image_scale->resize->resize_shell);
}
void
image_crop_cmd_callback (GtkWidget *widget,
gpointer data)
{
GimpDisplay *gdisp;
gint x1, y1, x2, y2;
return_if_no_display (gdisp, data);
if (! gimp_image_mask_bounds (gdisp->gimage, &x1, &y1, &x2, &y2))
{
g_message (_("Cannot crop because the current selection is empty."));
return;
}
gimp_image_crop (gdisp->gimage, x1, y1, x2, y2, FALSE, TRUE);
}
void
image_duplicate_cmd_callback (GtkWidget *widget,
gpointer data)
......
......@@ -31,6 +31,8 @@ void image_resize_cmd_callback (GtkWidget *widget,
gpointer data);
void image_scale_cmd_callback (GtkWidget *widget,
gpointer data);
void image_crop_cmd_callback (GtkWidget *widget,
gpointer data);
void image_duplicate_cmd_callback (GtkWidget *widget,
gpointer data);
......
......@@ -212,10 +212,10 @@ dialogs_display_filters_get (GimpDialogFactory *factory,
shell = GIMP_DISPLAY_SHELL (gdisp->shell);
if (! shell->cd_ui)
if (! shell->filters_dialog)
gimp_display_shell_filter_dialog_new (shell);
return shell->cd_ui;
return shell->filters_dialog;
}
return NULL;
......
......@@ -233,8 +233,8 @@ gimp_display_shell_init (GimpDisplayShell *shell)
shell->nav_dialog = NULL;
shell->nav_popup = NULL;
shell->cd_list = NULL;
shell->cd_ui = NULL;
shell->filters = NULL;
shell->filters_dialog = NULL;
gtk_window_set_wmclass (GTK_WINDOW (shell), "image_window", "Gimp");
gtk_window_set_resizable (GTK_WINDOW (shell), TRUE);
......@@ -839,6 +839,7 @@ gimp_display_shell_set_menu_sensitivity (GimpDisplayShell *shell)
gboolean aux = FALSE;
gboolean lm = FALSE;
gboolean lp = FALSE;
gboolean sel = FALSE;
gboolean alpha = FALSE;
gint lind = -1;
gint lnum = -1;
......@@ -857,6 +858,7 @@ gimp_display_shell_set_menu_sensitivity (GimpDisplayShell *shell)
fs = (gimp_image_floating_sel (gimage) != NULL);
aux = (gimp_image_get_active_channel (gimage) != NULL);
lp = ! gimp_image_is_empty (gimage);
sel = ! gimp_image_mask_is_empty (gimage);
drawable = gimp_image_active_drawable (gimage);
if (drawable)
......@@ -941,7 +943,7 @@ gimp_display_shell_set_menu_sensitivity (GimpDisplayShell *shell)
SET_SENSITIVE ("View/Zoom", gdisp);
if (gdisp)
{
SET_ACTIVE ("View/Toggle Selection", ! shell->select->hidden);
SET_ACTIVE ("View/Toggle Selection", ! shell->select->hidden);
SET_ACTIVE ("View/Toggle Layer Boundary", ! shell->select->layer_hidden);
SET_ACTIVE ("View/Toggle Rulers",
GTK_WIDGET_VISIBLE (shell->origin) ? 1 : 0);
......@@ -957,13 +959,14 @@ gimp_display_shell_set_menu_sensitivity (GimpDisplayShell *shell)
SET_SENSITIVE ("Image/Mode", gdisp);
if (gdisp)
{
SET_SENSITIVE ("Image/Mode/RGB", (base_type != GIMP_RGB));
SET_SENSITIVE ("Image/Mode/Grayscale", (base_type != GIMP_GRAY));
SET_SENSITIVE ("Image/Mode/RGB", (base_type != GIMP_RGB));
SET_SENSITIVE ("Image/Mode/Grayscale", (base_type != GIMP_GRAY));
SET_SENSITIVE ("Image/Mode/Indexed...", (base_type != GIMP_INDEXED));
}
SET_SENSITIVE ("Image/Crop Image", gdisp && sel);
SET_SENSITIVE ("Image/Merge Visible Layers...", gdisp && !fs && !aux && lp);
SET_SENSITIVE ("Image/Flatten Image", gdisp && !fs && !aux && lp);
SET_SENSITIVE ("Image/Flatten Image", gdisp && !fs && !aux && lp);
SET_SENSITIVE ("Layer/Stack", gdisp);
if (gdisp)
......@@ -982,19 +985,19 @@ gimp_display_shell_set_menu_sensitivity (GimpDisplayShell *shell)
!fs && !aux && lp && alpha && lind < (lnum - 1));
}
SET_SENSITIVE ("Layer/New Layer...", gdisp);
SET_SENSITIVE ("Layer/New Layer...", gdisp);
SET_SENSITIVE ("Layer/Duplicate Layer", gdisp && !fs && !aux && lp);
SET_SENSITIVE ("Layer/Anchor Layer", gdisp && fs && !aux && lp);
SET_SENSITIVE ("Layer/Merge Down", gdisp && !fs && !aux && lp);
SET_SENSITIVE ("Layer/Delete Layer", gdisp && !aux && lp);
SET_SENSITIVE ("Layer/Anchor Layer", gdisp && fs && !aux && lp);
SET_SENSITIVE ("Layer/Merge Down", gdisp && !fs && !aux && lp);
SET_SENSITIVE ("Layer/Delete Layer", gdisp && !aux && lp);
SET_SENSITIVE ("Layer/Layer Boundary Size...", gdisp && !aux && lp);
SET_SENSITIVE ("Layer/Layer to Imagesize", gdisp && !aux && lp);
SET_SENSITIVE ("Layer/Scale Layer...", gdisp && !aux && lp);
SET_SENSITIVE ("Layer/Layer to Imagesize", gdisp && !aux && lp);
SET_SENSITIVE ("Layer/Scale Layer...", gdisp && !aux && lp);
SET_SENSITIVE ("Layer/Transform/Offset...", lp);
SET_SENSITIVE ("Layer/Colors", gdisp);
SET_SENSITIVE ("Layer/Colors", gdisp);
SET_SENSITIVE ("Layer/Colors/Auto", gdisp);
if (gdisp)
......
......@@ -102,8 +102,8 @@ struct _GimpDisplayShell
NavigationDialog *nav_dialog; /* image navigation dialog */
NavigationDialog *nav_popup; /* navigation popup */
GList *cd_list; /* color display conversion stuff */
GtkWidget *cd_ui; /* color display filter dialog */
GList *filters; /* color display conversion stuff */
GtkWidget *filters_dialog; /* color display filter dialog */
};
struct _GimpDisplayShellClass
......
......@@ -31,6 +31,8 @@
#include "core/gimpimage.h"
#include "widgets/gimpeditor.h"
#include "gimpdisplay.h"
#include "gimpdisplayshell.h"
#include "gimpdisplayshell-filter.h"
......@@ -39,6 +41,16 @@
#include "libgimp/gimpintl.h"
#define LIST_WIDTH 150
#define LIST_HEIGHT 100
#define UPDATE_DISPLAY(shell) G_STMT_START \
{ \
gimp_display_shell_expose_full (shell); \
gimp_display_shell_flush (shell); \
} G_STMT_END
typedef struct _ColorDisplayDialog ColorDisplayDialog;
struct _ColorDisplayDialog
......@@ -58,132 +70,104 @@ struct _ColorDisplayDialog
GList *old_nodes;
GList *conf_nodes;
GtkWidget *buttons[5];
GtkWidget *add_button;
GtkWidget *remove_button;
GtkWidget *up_button;
GtkWidget *down_button;
GtkWidget *configure_button;
};
enum
{
BUTTON_ADD,
BUTTON_REMOVE,
BUTTON_UP,
BUTTON_DOWN,
BUTTON_CONFIGURE
};
typedef void (*ButtonCallback) (GtkWidget *, gpointer);
typedef struct _ButtonInfo ButtonInfo;
struct _ButtonInfo
{
const gchar *label;
ButtonCallback callback;
};
static void make_dialog (ColorDisplayDialog *cdd);
static void color_display_ok_callback (GtkWidget *widget,
gpointer data);
static void color_display_cancel_callback (GtkWidget *widget,
gpointer data);
static void color_display_add_callback (GtkWidget *widget,
gpointer data);
static void color_display_remove_callback (GtkWidget *widget,
gpointer data);
static void color_display_up_callback (GtkWidget *widget,
gpointer data);
static void color_display_down_callback (GtkWidget *widget,
gpointer data);
static void color_display_configure_callback (GtkWidget *widget,
gpointer data);
static void src_list_populate (const char *name,
gpointer data);
static void dest_list_populate (GList *node_list,
GtkWidget *dest);
static void select_src (GtkWidget *widget,
gint row,
gint column,
GdkEventButton *event,
gpointer data);
static void unselect_src (GtkWidget *widget,
gint row,
gint column,
GdkEventButton *event,
gpointer data);
static void select_dest (GtkWidget *widget,
gint row,
gint column,
GdkEventButton *event,
gpointer data);
static void unselect_dest (GtkWidget *widget,
gint row,
gint column,
GdkEventButton *event,
gpointer data);
static void color_display_update_up_and_down (ColorDisplayDialog *cdd);
static void make_dialog (ColorDisplayDialog *cdd);
static void color_display_ok_callback (GtkWidget *widget,
gpointer data);
static void color_display_cancel_callback (GtkWidget *widget,
gpointer data);
static void color_display_add_callback (GtkWidget *widget,
gpointer data);
static void color_display_remove_callback (GtkWidget *widget,
gpointer data);
static void color_display_up_callback (GtkWidget *widget,
gpointer data);
static void color_display_down_callback (GtkWidget *widget,
gpointer data);
static void color_display_configure_callback (GtkWidget *widget,
gpointer data);
static void src_list_populate (const char *name,
gpointer data);
static void dest_list_populate (GList *node_list,
GtkWidget *dest);
static void select_src (GtkWidget *widget,
gint row,
gint column,
GdkEventButton *event,
gpointer data);
static void unselect_src (GtkWidget *widget,
gint row,
gint column,
GdkEventButton *event,
gpointer data);
static void select_dest (GtkWidget *widget,
gint row,
gint column,
GdkEventButton *event,
gpointer data);
static void unselect_dest (GtkWidget *widget,
gint row,
gint column,
GdkEventButton *event,
gpointer data);
static void color_display_update_up_and_down(ColorDisplayDialog *cdd);
#define LIST_WIDTH 180
#define LIST_HEIGHT 180
#define UPDATE_DISPLAY(shell) G_STMT_START \
{ \
gimp_display_shell_expose_full (shell); \
gimp_display_shell_flush (shell); \
} G_STMT_END
static void
make_dialog (ColorDisplayDialog *cdd)
{
GtkWidget *hbox;
GtkWidget *editor;
GtkWidget *scrolled_win;
GtkWidget *vbbox;
GtkWidget *vbox;
GtkWidget *image;
gchar *titles[2];
gint i;
static ButtonInfo buttons[] =
{
{ N_("Add"), color_display_add_callback },
{ N_("Remove"), color_display_remove_callback },
{ N_("Up"), color_display_up_callback },
{ N_("Down"), color_display_down_callback },
{ N_("Configure"), color_display_configure_callback }
};
cdd->dialog = gimp_dialog_new (_("Color Display Filters"), "display_color",
gimp_standard_help_func,
"dialogs/display_filters/display_filters.html",
GTK_WIN_POS_NONE,
FALSE, TRUE, FALSE,
cdd->dialog = gimp_dialog_new (_("Color Display Filters"), "display_filters",
gimp_standard_help_func,
"dialogs/display_filters/display_filters.html",
GTK_WIN_POS_NONE,
FALSE, TRUE, FALSE,
GTK_STOCK_CANCEL, color_display_cancel_callback,
cdd, NULL, NULL, FALSE, TRUE,
GTK_STOCK_CANCEL, color_display_cancel_callback,
cdd, NULL, NULL, FALSE, TRUE,
GTK_STOCK_OK, color_display_ok_callback,
cdd, NULL, NULL, TRUE, FALSE,
GTK_STOCK_OK, color_display_ok_callback,
cdd, NULL, NULL, TRUE, FALSE,
NULL);
NULL);
hbox = gtk_hbox_new (FALSE, 4);
hbox = gtk_hbox_new (FALSE, 6);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 6);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (cdd->dialog)->vbox), hbox,
TRUE, TRUE, 4);
TRUE, TRUE, 0);
scrolled_win = gtk_scrolled_window_new (NULL, NULL);
gtk_container_set_border_width (GTK_CONTAINER (scrolled_win), 5);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_win),
GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
gtk_box_pack_start (GTK_BOX (hbox), scrolled_win, TRUE, TRUE, 0);
gtk_widget_show (scrolled_win);
titles[0] = _("Available Filters");
titles[1] = NULL;
cdd->src = gtk_clist_new_with_titles (1, titles);
gtk_widget_set_usize (cdd->src, LIST_WIDTH, LIST_HEIGHT);
gtk_widget_set_size_request (cdd->src, LIST_WIDTH, LIST_HEIGHT);
gtk_clist_column_titles_passive (GTK_CLIST (cdd->src));
gtk_clist_set_auto_sort (GTK_CLIST (cdd->src), TRUE);
gtk_container_add (GTK_CONTAINER (scrolled_win), cdd->src);
gtk_widget_show (cdd->src);
g_signal_connect (G_OBJECT (cdd->src), "select_row",
G_CALLBACK (select_src),
......@@ -192,23 +176,93 @@ make_dialog (ColorDisplayDialog *cdd)
G_CALLBACK (unselect_src),
cdd);
vbbox = gtk_vbutton_box_new ();
gtk_vbutton_box_set_layout_default (GTK_BUTTONBOX_START);
gtk_box_pack_start (GTK_BOX (hbox), vbbox, FALSE, FALSE, 2);
vbox = gtk_vbox_new (FALSE, 0);
gtk_box_pack_start (GTK_BOX (hbox), vbox, FALSE, FALSE, 0);
gtk_widget_show (vbox);
cdd->add_button = gtk_button_new ();
gtk_box_pack_start (GTK_BOX (vbox), cdd->add_button, FALSE, FALSE, 16);
gtk_widget_set_sensitive (cdd->add_button, FALSE);
gtk_widget_show (cdd->add_button);
image = gtk_image_new_from_stock (GTK_STOCK_GO_FORWARD, GTK_ICON_SIZE_BUTTON);
gtk_container_add (GTK_CONTAINER (cdd->add_button), image);
gtk_widget_show (image);
gimp_help_set_help_data (cdd->add_button,
_("Add the selected filter to the list of "
"active filters."), NULL);
g_signal_connect (G_OBJECT (cdd->add_button), "clicked",
G_CALLBACK (color_display_add_callback),
cdd);
cdd->remove_button = gtk_button_new ();
gtk_box_pack_start (GTK_BOX (vbox), cdd->remove_button, FALSE, FALSE, 0);
gtk_widget_set_sensitive (cdd->remove_button, FALSE);
gtk_widget_show (cdd->remove_button);
image = gtk_image_new_from_stock (GTK_STOCK_GO_BACK, GTK_ICON_SIZE_BUTTON);
gtk_container_add (GTK_CONTAINER (cdd->remove_button), image);
gtk_widget_show (image);
gimp_help_set_help_data (cdd->remove_button,
_("Remove the selected filter from the list of "
"active filters."), NULL);
g_signal_connect (G_OBJECT (cdd->remove_button), "clicked",
G_CALLBACK (color_display_remove_callback),
cdd);
editor = gimp_editor_new ();
gtk_box_pack_start (GTK_BOX (hbox), editor, TRUE, TRUE, 0);
gtk_widget_show (editor);
cdd->up_button =
gimp_editor_add_button (GIMP_EDITOR (editor),
GTK_STOCK_GO_UP,
_("Move the selected filter up"),
NULL,
G_CALLBACK (color_display_up_callback),
NULL,
cdd);
cdd->down_button =
gimp_editor_add_button (GIMP_EDITOR (editor),
GTK_STOCK_GO_DOWN,
_("Move the selected filter down"),
NULL,
G_CALLBACK (color_display_down_callback),
NULL,
cdd);
cdd->configure_button =
gimp_editor_add_button (GIMP_EDITOR (editor),
GIMP_STOCK_EDIT,
_("Configure the selected filter"),
NULL,
G_CALLBACK (color_display_configure_callback),
NULL,
cdd);
gtk_widget_set_sensitive (cdd->up_button, FALSE);
gtk_widget_set_sensitive (cdd->down_button, FALSE);
gtk_widget_set_sensitive (cdd->configure_button, FALSE);
scrolled_win = gtk_scrolled_window_new (NULL, NULL);
gtk_container_set_border_width (GTK_CONTAINER (scrolled_win), 5);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_win),
GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
gtk_box_pack_start (GTK_BOX (hbox), scrolled_win, TRUE, TRUE, 0);
gtk_container_add (GTK_CONTAINER (editor), scrolled_win);
gtk_widget_show (scrolled_win);
titles[0] = _("Active Filters");
titles[1] = NULL;
cdd->dest = gtk_clist_new_with_titles (1, titles);
gtk_widget_set_usize (cdd->dest, LIST_WIDTH, LIST_HEIGHT);
gtk_widget_set_size_request (cdd->dest, LIST_WIDTH, LIST_HEIGHT);
gtk_clist_column_titles_passive (GTK_CLIST (cdd->dest));
gtk_container_add (GTK_CONTAINER (scrolled_win), cdd->dest);
gtk_widget_show (cdd->dest);
g_signal_connect (G_OBJECT (cdd->dest), "select_row",
G_CALLBACK (select_dest),
......@@ -217,19 +271,7 @@ make_dialog (ColorDisplayDialog *cdd)
G_CALLBACK (unselect_dest),
cdd);
for (i = 0; i < 5; i++)
{
cdd->buttons[i] =
gtk_button_new_with_label (gettext (buttons[i].label));
gtk_box_pack_start (GTK_BOX (vbbox), cdd->buttons[i], FALSE, FALSE, 0);
g_signal_connect (G_OBJECT (cdd->buttons[i]), "clicked",
G_CALLBACK (buttons[i].callback),
cdd);
gtk_widget_set_sensitive (cdd->buttons[i], FALSE);
}
gtk_widget_show_all (hbox);
gtk_widget_show (hbox);
}
static void
......@@ -241,13 +283,13 @@ color_display_ok_callback (GtkWidget *widget,
GList *list;
gtk_widget_destroy (GTK_WIDGET (cdd->dialog));
shell->cd_ui = NULL;
shell->filters_dialog = NULL;
if (cdd->modified)
{
for (list = cdd->old_nodes; list; list = g_list_next (list))
{
if (! g_list_find (shell->cd_list, list->data))
if (! g_list_find (shell->filters, list->data))
gimp_display_shell_filter_detach_destroy (shell, list->data);
}
......@@ -267,12 +309,12 @@ color_display_cancel_callback (GtkWidget *widget,
GList *next;
gtk_widget_destroy (GTK_WIDGET (cdd->dialog));
shell->cd_ui = NULL;
shell->filters_dialog = NULL;
if (cdd->modified)
{
list = shell->cd_list;
shell->cd_list = cdd->old_nodes;
list = shell->filters;
shell->filters = cdd->old_nodes;
while (list)
{
......@@ -291,9 +333,10 @@ color_display_cancel_callback (GtkWidget *widget,
static void
color_display_update_up_and_down (ColorDisplayDialog *cdd)
{
gtk_widget_set_sensitive (cdd->buttons[BUTTON_UP], cdd->dest_row > 0);
gtk_widget_set_sensitive (cdd->buttons[BUTTON_DOWN], cdd->dest_row >= 0 &&
cdd->dest_row < GTK_CLIST (cdd->dest)->rows - 1);
gtk_widget_set_sensitive (cdd->up_button, cdd->dest_row > 0);
gtk_widget_set_sensitive (cdd->down_button,
cdd->dest_row >= 0 &&
cdd->dest_row < GTK_CLIST (cdd->dest)->rows - 1);
}
static void
......@@ -442,16 +485,16 @@ gimp_display_shell_filter_dialog_new (GimpDisplayShell *shell)
color_display_foreach (src_list_populate, cdd->src);
cdd->old_nodes = shell->cd_list;
dest_list_populate (shell->cd_list, cdd->dest);
shell->cd_list = g_list_copy (cdd->old_nodes);
cdd->old_nodes = shell->filters;
dest_list_populate (shell->filters, cdd->dest);
shell->filters = g_list_copy (cdd->old_nodes);
cdd->shell = shell;
cdd->src_row = -1;
cdd->dest_row = -1;
shell->cd_ui = cdd->dialog;
shell->filters_dialog = cdd->dialog;
}
static void
......@@ -490,7 +533,7 @@ select_src (GtkWidget *widget,
cdd->src_row = row;
gtk_widget_set_sensitive (cdd->buttons[BUTTON_ADD], TRUE);
gtk_widget_set_sensitive (cdd->add_button, TRUE);
}
static void
......@@ -504,7 +547,7 @@ unselect_src (GtkWidget *widget,
cdd->src_row = -1;
gtk_widget_set_sensitive (cdd->buttons[BUTTON_ADD], FALSE);
gtk_widget_set_sensitive (cdd->add_button, FALSE);
}
static void
......@@ -518,8 +561,8 @@ select_dest (GtkWidget *widget,
cdd->dest_row = row;
gtk_widget_set_sensitive (cdd->buttons[BUTTON_REMOVE], TRUE);
gtk_widget_set_sensitive (cdd->buttons[BUTTON_CONFIGURE], TRUE);
gtk_widget_set_sensitive (cdd->remove_button, TRUE);
gtk_widget_set_sensitive (cdd->configure_button, TRUE);
color_display_update_up_and_down (cdd);
}
......@@ -535,8 +578,8 @@ unselect_dest (GtkWidget *widget,
cdd->dest_row = -1;
gtk_widget_set_sensitive (cdd->buttons[BUTTON_REMOVE], FALSE);
gtk_widget_set_sensitive (cdd->buttons[BUTTON_CONFIGURE], FALSE);
gtk_widget_set_sensitive (cdd->remove_button, FALSE);
gtk_widget_set_sensitive (cdd->configure_button, FALSE);
color_display_update_up_and_down (cdd);
}
......
......@@ -103,9 +103,9 @@ gimp_color_display_unregister (const gchar *name)
{
shell = GIMP_DISPLAY_SHELL (refs->data);
node = g_list_find_custom (shell->cd_list, (gpointer) name,
node = g_list_find_custom (shell->filters, (gpointer) name,
(GCompareFunc) node_name_compare);
shell->cd_list = g_list_remove_link (shell->cd_list, node);
shell->filters = g_list_remove_link (shell->filters, node);
gimp_display_shell_filter_detach_real (shell, node->data, FALSE);
......@@ -181,7 +181,7 @@ gimp_display_shell_filter_attach (GimpDisplayShell *shell,
node->cd_convert = info->methods.convert;
shell->cd_list = g_list_append (shell->cd_list, node);
shell->filters = g_list_append (shell->filters, node);
return node;
}
......@@ -215,7 +215,7 @@ gimp_display_shell_filter_attach_clone (GimpDisplayShell *shell,
node->cd_convert = info->methods.convert;
shell->cd_list = g_list_append (shell->cd_list, node);
shell->filters = g_list_append (shell->filters, node);
return node;
}
......@@ -231,7 +231,7 @@ gimp_display_shell_filter_detach (GimpDisplayShell *shell,
{
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
shell->cd_list = g_list_remove (shell->cd_list, node);
shell->filters = g_list_remove (shell->filters, node);
}
void
......@@ -242,7 +242,7 @@ gimp_display_shell_filter_detach_destroy (GimpDisplayShell *shell,
gimp_display_shell_filter_detach_real (shell, node, TRUE);
shell->cd_list = g_list_remove (shell->cd_list, node);
shell->filters = g_list_remove (shell->filters, node);
}
void
......@@ -252,13 +252,13 @@ gimp_display_shell_filter_detach_all (GimpDisplayShell *shell)
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
for (list = shell->cd_list; list; list = g_list_next (list))
for (list = shell->filters; list; list = g_list_next (list))
{
gimp_display_shell_filter_detach_real (shell, list->data, TRUE);
}
g_list_free (shell->cd_list);
shell->cd_list = NULL;
g_list_free (shell->filters);
shell->filters = NULL;
}
static void
......@@ -296,7 +296,7 @@ gimp_display_shell_filter_reorder_up (GimpDisplayShell *shell,
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
g_return_if_fail (node != NULL);
node_list = g_list_find (shell->cd_list, node);
node_list = g_list_find (shell->filters, node);
if (node_list->prev)
{
......@@ -314,7 +314,7 @@ gimp_display_shell_filter_reorder_down (GimpDisplayShell *shell,
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
g_return_if_fail (node != NULL);
node_list = g_list_find (shell->cd_list, node);
node_list = g_list_find (shell->filters, node);
if (node_list->next)
{
......
......@@ -262,9 +262,11 @@ gimp_display_shell_render (GimpDisplayShell *shell,
(* render_funcs[image_type]) (&info);
/* apply filters to the rendered projection */