libgimpwidgets/gimpoffsetarea.c set a cursor to indicate that the area is

2007-07-20  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimpoffsetarea.c
	* plug-ins/print/print-preview.c: set a cursor to indicate that
	the area is interactive.

	* plug-ins/print/print-page-layout.c: minor dialog tweaks.

svn path=/trunk/; revision=22963
This commit is contained in:
Sven Neumann
2007-07-20 12:29:38 +00:00
committed by Sven Neumann
parent 5db980554c
commit 18d3c4835d
4 changed files with 89 additions and 56 deletions

View File

@ -41,6 +41,8 @@ enum
static void gimp_offset_area_resize (GimpOffsetArea *area);
static void gimp_offset_area_realize (GtkWidget *widget);
static void gimp_offset_area_size_allocate (GtkWidget *widget,
GtkAllocation *allocation);
static gboolean gimp_offset_area_event (GtkWidget *widget,
@ -72,9 +74,10 @@ gimp_offset_area_class_init (GimpOffsetAreaClass *klass)
G_TYPE_INT,
G_TYPE_INT);
widget_class->size_allocate = gimp_offset_area_size_allocate;
widget_class->realize = gimp_offset_area_realize;
widget_class->event = gimp_offset_area_event;
widget_class->expose_event = gimp_offset_area_expose_event;
widget_class->size_allocate = gimp_offset_area_size_allocate;
}
static void
@ -89,8 +92,7 @@ gimp_offset_area_init (GimpOffsetArea *area)
area->display_ratio_x = 1.0;
area->display_ratio_y = 1.0;
gtk_widget_add_events (GTK_WIDGET (area),
GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK);
gtk_widget_add_events (GTK_WIDGET (area), GDK_BUTTON_PRESS_MASK);
}
/**
@ -308,6 +310,19 @@ gimp_offset_area_size_allocate (GtkWidget *widget,
}
}
static void
gimp_offset_area_realize (GtkWidget *widget)
{
GdkCursor *cursor;
GTK_WIDGET_CLASS (parent_class)->realize (widget);
cursor = gdk_cursor_new_for_display (gtk_widget_get_display (widget),
GDK_FLEUR);
gdk_window_set_cursor (widget->window, cursor);
gdk_cursor_unref (cursor);
}
static gboolean
gimp_offset_area_event (GtkWidget *widget,
GdkEvent *event)