Commit 7acf8acc authored by Michael Natterer's avatar Michael Natterer Committed by Michael Natterer

also clone the "enabled" property.

2003-11-23  Michael Natterer  <mitch@convergence.de>

	* libgimpwidgets/gimpcolordisplay.c (gimp_color_display_clone):
	also clone the "enabled" property.

	* app/widgets/gimpcolordisplayeditor.c
	(gimp_color_display_editor_init): put the "enabled" toggle
	renderer to its own column so selecting a row doesn't always
	toggle "enabled".
parent 46f9a924
2003-11-23 Michael Natterer <mitch@convergence.de>
* libgimpwidgets/gimpcolordisplay.c (gimp_color_display_clone):
also clone the "enabled" property.
* app/widgets/gimpcolordisplayeditor.c
(gimp_color_display_editor_init): put the "enabled" toggle
renderer to its own column so selecting a row doesn't always
toggle "enabled".
2003-11-23 Raphaël Quinet <quinet@gamers.org>
* plug-ins/common/animoptimize.c: Allow the plug-in to register
......@@ -269,26 +269,27 @@ gimp_color_display_editor_init (GimpColorDisplayEditor *editor)
gtk_widget_set_size_request (tv, LIST_WIDTH, LIST_HEIGHT);
gtk_tree_view_set_headers_clickable (GTK_TREE_VIEW (tv), FALSE);
column = gtk_tree_view_column_new ();
gtk_tree_view_column_set_title (column, _("Active Filters"));
gtk_tree_view_insert_column (GTK_TREE_VIEW (tv), column, 0);
rend = gtk_cell_renderer_toggle_new ();
gtk_tree_view_column_pack_start (column, rend, FALSE);
gtk_tree_view_column_set_attributes (column, rend,
"active", DEST_COLUMN_ENABLED,
NULL);
g_signal_connect (rend, "toggled",
G_CALLBACK (gimp_color_display_editor_enable_toggled),
editor);
rend = gtk_cell_renderer_text_new ();
gtk_tree_view_column_pack_start (column, rend, FALSE);
gtk_tree_view_column_set_attributes (column, rend,
"text", DEST_COLUMN_NAME,
NULL);
column = gtk_tree_view_column_new_with_attributes (NULL, rend,
"active",
DEST_COLUMN_ENABLED,
NULL);
gtk_tree_view_insert_column (GTK_TREE_VIEW (tv), column, 0);
image = gtk_image_new_from_stock (GIMP_STOCK_VISIBLE, GTK_ICON_SIZE_MENU);
gtk_tree_view_column_set_widget (column, image);
gtk_widget_show (image);
gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (tv),
1, _("Active Filters"),
gtk_cell_renderer_text_new (),
"text", DEST_COLUMN_NAME,
NULL);
gtk_container_add (GTK_CONTAINER (scrolled_win), tv);
gtk_widget_show (tv);
......@@ -641,8 +642,6 @@ gimp_color_display_editor_reordered (GimpColorDisplayStack *stack,
GtkTreeIter iter;
gboolean iter_valid;
g_print ("reorder to %d\n", position);
for (iter_valid = gtk_tree_model_get_iter_first (GTK_TREE_MODEL (editor->dest),
&iter);
iter_valid;
......@@ -755,6 +754,8 @@ gimp_color_display_editor_enable_toggled (GtkCellRendererToggle *toggle,
-1);
gimp_color_display_set_enabled (display, ! enabled);
g_object_unref (display);
}
gtk_tree_path_free (path);
......
......@@ -125,7 +125,16 @@ gimp_color_display_clone (GimpColorDisplay *display)
g_return_val_if_fail (GIMP_IS_COLOR_DISPLAY (display), NULL);
if (GIMP_COLOR_DISPLAY_GET_CLASS (display)->clone)
return GIMP_COLOR_DISPLAY_GET_CLASS (display)->clone (display);
{
GimpColorDisplay *clone = NULL;
clone = GIMP_COLOR_DISPLAY_GET_CLASS (display)->clone (display);
if (clone)
clone->enabled = display->enabled;
return clone;
}
return NULL;
}
......
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