layers_dialog.c lc_dialog.c lc_dialogP.h

Thu Jun 24 22:49:41 BST 1999 Andy Thomas <alt@gimp.org>

	* layers_dialog.c
	* lc_dialog.c
	* lc_dialogP.h

	L&C&P previews are now updated on undo and layer movement
	operations.
This commit is contained in:
BST 1999 Andy Thomas 1999-06-24 21:54:48 +00:00 committed by Andy Thomas
parent af75ccbae9
commit 2b711ebbda
5 changed files with 24 additions and 6 deletions

View File

@ -1,3 +1,12 @@
Thu Jun 24 22:49:41 BST 1999 Andy Thomas <alt@gimp.org>
* layers_dialog.c
* lc_dialog.c
* lc_dialogP.h
L&C&P previews are now updated on undo and layer movement
operations.
Thu Jun 24 22:34:54 MEST 1999 Sven Neumann <sven@gimp.org>
* plug-ins/gap: some changes on request by the author Wolfgang Hofer

View File

@ -2383,6 +2383,7 @@ layer_widget_preview_redraw (LayerWidget *layer_widget,
*/
gdk_flush ();
}
lc_dialog_menu_preview_dirty(GTK_OBJECT(gimp_drawable_gimage(GIMP_DRAWABLE(layer_widget->layer))),NULL);
}
static void

View File

@ -2383,6 +2383,7 @@ layer_widget_preview_redraw (LayerWidget *layer_widget,
*/
gdk_flush ();
}
lc_dialog_menu_preview_dirty(GTK_OBJECT(gimp_drawable_gimage(GIMP_DRAWABLE(layer_widget->layer))),NULL);
}
static void

View File

@ -288,9 +288,9 @@ image_menu_preview_update_do(GimpImage *gimage)
return FALSE;
}
static void
menu_preview_dirty (GtkObject *obj,
gpointer client_data)
void
lc_dialog_menu_preview_dirty (GtkObject *obj,
gpointer client_data)
{
/* Update preview at a less busy time */
/* printf("menu_preview_dirty:: adding %p to obj %p\n",client_data,obj); */
@ -310,11 +310,16 @@ lc_dialog_image_menu_preview_update_cb (GtkWidget *widget,
{
GtkWidget *menu_preview;
GimpImage *gimage;
GimpImage *gimage_to_update = GIMP_IMAGE((GimpImage *)client_data);
GimpImage *gimage_to_update = (GimpImage *)client_data;
/* This is called via an idle function, so it is possible
* that the client_data no longer points to a GimpImage.. So don't
* pass it to the GIMP_IMAGE() cast function. We never deference
* it here anyways.
*/
menu_preview = (GtkWidget *)gtk_object_get_data(GTK_OBJECT(widget),"menu_preview");
gimage = GIMP_IMAGE((GimpImage *)gtk_object_get_data(GTK_OBJECT(widget),"menu_preview_gimage"));
/* printf("image_menu_preview_update::menu_preview = %p gimage %p gimage_to_update %d\n",menu_preview,gimage,gimage_to_update); */
if(menu_preview && gimage && gimage_to_update == gimage)
{
@ -591,7 +596,7 @@ lc_dialog_create_image_menu_cb (gpointer im,
/* Only add this signal once */
gtk_object_set_data(GTK_OBJECT (gimage),"menu_preview_dirty",(gpointer)1);
gtk_signal_connect_after (GTK_OBJECT (gimage), "dirty",
GTK_SIGNAL_FUNC(menu_preview_dirty),NULL);
GTK_SIGNAL_FUNC(lc_dialog_menu_preview_dirty),NULL);
}
gtk_object_set_data(GTK_OBJECT(menu_item),"menu_preview",wcolor_box);
gtk_object_set_data(GTK_OBJECT(menu_item),"menu_preview_gimage",gimage);

View File

@ -51,6 +51,8 @@ void paths_dialog_flush (void);
void layers_dialog_clear (void);
void channels_dialog_clear (void);
void lc_dialog_menu_preview_dirty (GtkObject *,gpointer);
/* Main dialog structure */
extern LCDialog *lc_dialog;