Commit 3795f9b9 authored by Michael Natterer's avatar Michael Natterer Committed by Michael Natterer

libgimpwidgets/gimpchainbutton.c libgimpwidgets/gimpcolorarea.c

2009-03-22  Michael Natterer  <mitch@gimp.org>

	* libgimpwidgets/gimpchainbutton.c
	* libgimpwidgets/gimpcolorarea.c
	* libgimpwidgets/gimpcolorbutton.c
	* libgimpwidgets/gimpcolorscale.c
	* libgimpwidgets/gimpcolorselect.c
	* libgimpwidgets/gimpdialog.c
	* libgimpwidgets/gimphelpui.c
	* libgimpwidgets/gimpmemsizeentry.c
	* libgimpwidgets/gimpoffsetarea.c
	* libgimpwidgets/gimppickbutton.c
	* libgimpwidgets/gimppixmap.c
	* libgimpwidgets/gimppreview.c
	* libgimpwidgets/gimppreviewarea.c
	* libgimpwidgets/gimpruler.c
	* libgimpwidgets/gimpscrolledpreview.c
	* libgimpwidgets/gimpwidgets.c: use accessors for various members
	of GTK+ structures that don't exist any longer when GSEAL_ENABLE
	is defined.


svn path=/trunk/; revision=28190
parent b8f47249
2009-03-22 Michael Natterer <mitch@gimp.org>
* libgimpwidgets/gimpchainbutton.c
* libgimpwidgets/gimpcolorarea.c
* libgimpwidgets/gimpcolorbutton.c
* libgimpwidgets/gimpcolorscale.c
* libgimpwidgets/gimpcolorselect.c
* libgimpwidgets/gimpdialog.c
* libgimpwidgets/gimphelpui.c
* libgimpwidgets/gimpmemsizeentry.c
* libgimpwidgets/gimpoffsetarea.c
* libgimpwidgets/gimppickbutton.c
* libgimpwidgets/gimppixmap.c
* libgimpwidgets/gimppreview.c
* libgimpwidgets/gimppreviewarea.c
* libgimpwidgets/gimpruler.c
* libgimpwidgets/gimpscrolledpreview.c
* libgimpwidgets/gimpwidgets.c: use accessors for various members
of GTK+ structures that don't exist any longer when GSEAL_ENABLE
is defined.
2009-03-19 Sven Neumann <sven@gimp.org>
* app/actions/context-actions.c (context_actions):
......
......@@ -443,7 +443,7 @@ gimp_chain_line_expose_event (GtkWidget *widget,
}
gtk_paint_polygon (gtk_widget_get_style (widget),
widget->window, GTK_STATE_NORMAL,
gtk_widget_get_window (widget), GTK_STATE_NORMAL,
shadow,
&event->area,
widget,
......
......@@ -334,7 +334,7 @@ gimp_color_area_expose (GtkWidget *widget,
buf = area->buf + event->area.y * area->rowstride + event->area.x * 3;
gdk_draw_rgb_image_dithalign (widget->window,
gdk_draw_rgb_image_dithalign (gtk_widget_get_window (widget),
style->black_gc,
event->area.x,
event->area.y,
......@@ -347,7 +347,7 @@ gimp_color_area_expose (GtkWidget *widget,
event->area.y);
if (area->draw_border)
gdk_draw_rectangle (widget->window,
gdk_draw_rectangle (gtk_widget_get_window (widget),
style->fg_gc[widget->state],
FALSE,
0, 0,
......@@ -712,20 +712,17 @@ gimp_color_area_drag_data_received (GtkWidget *widget,
guint time)
{
GimpColorArea *area = GIMP_COLOR_AREA (widget);
const guint16 *vals;
GimpRGB color;
guint16 *vals;
if (selection_data->length < 0)
return;
if ((selection_data->format != 16) ||
(selection_data->length != 8))
if (gtk_selection_data_get_length (selection_data) != 8 ||
gtk_selection_data_get_format (selection_data) != 16)
{
g_warning ("Received invalid color data");
g_warning ("%s: received invalid color data", G_STRFUNC);
return;
}
vals = (guint16 *)selection_data->data;
vals = (const guint16 *) gtk_selection_data_get_data (selection_data);
gimp_rgba_set (&color,
(gdouble) vals[0] / 0xffff,
......
......@@ -506,7 +506,8 @@ gimp_color_button_clicked (GtkButton *button)
gimp_color_selection_set_color (GIMP_COLOR_SELECTION (selection), &color);
gimp_color_selection_set_old_color (GIMP_COLOR_SELECTION (selection),
&color);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), selection);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
selection);
gtk_widget_show (selection);
g_signal_connect (selection, "color-changed",
......
......@@ -233,9 +233,10 @@ static gboolean
gimp_color_scale_expose (GtkWidget *widget,
GdkEventExpose *event)
{
GimpColorScale *scale = GIMP_COLOR_SCALE (widget);
GtkRange *range = GTK_RANGE (widget);
GtkStyle *style = gtk_widget_get_style (widget);
GimpColorScale *scale = GIMP_COLOR_SCALE (widget);
GtkRange *range = GTK_RANGE (widget);
GtkStyle *style = gtk_widget_get_style (widget);
GdkWindow *window = gtk_widget_get_window (widget);
GdkRectangle expose_area; /* Relative to widget->allocation */
GdkRectangle area;
gint focus = 0;
......@@ -302,7 +303,7 @@ gimp_color_scale_expose (GtkWidget *widget,
area.x += widget->allocation.x;
area.y += widget->allocation.y;
gtk_paint_box (style, widget->window,
gtk_paint_box (style, window,
sensitive ? GTK_STATE_ACTIVE : GTK_STATE_INSENSITIVE,
GTK_SHADOW_IN,
&area, widget, "trough",
......@@ -313,7 +314,7 @@ gimp_color_scale_expose (GtkWidget *widget,
switch (range->orientation)
{
case GTK_ORIENTATION_HORIZONTAL:
gdk_draw_rgb_image_dithalign (widget->window,
gdk_draw_rgb_image_dithalign (window,
style->black_gc,
x + trough_border + slider_size,
y + trough_border + 1,
......@@ -326,7 +327,7 @@ gimp_color_scale_expose (GtkWidget *widget,
break;
case GTK_ORIENTATION_VERTICAL:
gdk_draw_rgb_image_dithalign (widget->window,
gdk_draw_rgb_image_dithalign (window,
style->black_gc,
x + trough_border + 1,
y + trough_border + slider_size,
......@@ -343,7 +344,7 @@ gimp_color_scale_expose (GtkWidget *widget,
}
if (GTK_WIDGET_IS_SENSITIVE (widget) && GTK_WIDGET_HAS_FOCUS (range))
gtk_paint_focus (style, widget->window, GTK_WIDGET_STATE (widget),
gtk_paint_focus (style, window, GTK_WIDGET_STATE (widget),
&area, widget, "trough",
widget->allocation.x + range->range_rect.x,
widget->allocation.y + range->range_rect.y,
......@@ -381,12 +382,12 @@ gimp_color_scale_expose (GtkWidget *widget,
case GTK_ORIENTATION_HORIZONTAL:
for (w = area.width, x = area.x, y = area.y;
w > 0; w -= 2, x++, y++)
gdk_draw_line (widget->window, gc, x, y, x + w - 1, y);
gdk_draw_line (window, gc, x, y, x + w - 1, y);
break;
case GTK_ORIENTATION_VERTICAL:
for (h = area.height, x = area.x, y = area.y;
h > 0; h -= 2, x++, y++)
gdk_draw_line (widget->window, gc, x, y, x, y + h - 1);
gdk_draw_line (window, gc, x, y, x, y + h - 1);
break;
}
gdk_gc_set_clip_rectangle (gc, NULL);
......@@ -401,12 +402,12 @@ gimp_color_scale_expose (GtkWidget *widget,
case GTK_ORIENTATION_HORIZONTAL:
for (w = area.width, x = area.x, y = area.y + area.height - 1;
w > 0; w -= 2, x++, y--)
gdk_draw_line (widget->window, gc, x, y, x + w - 1, y);
gdk_draw_line (window, gc, x, y, x + w - 1, y);
break;
case GTK_ORIENTATION_VERTICAL:
for (h = area.height, x = area.x + area.width - 1, y = area.y;
h > 0; h -= 2, x--, y++)
gdk_draw_line (widget->window, gc, x, y, x, y + h - 1);
gdk_draw_line (window, gc, x, y, x, y + h - 1);
break;
}
gdk_gc_set_clip_rectangle (gc, NULL);
......
......@@ -624,7 +624,7 @@ gimp_color_select_xy_expose (GtkWidget *widget,
GimpColorSelect *select)
{
if (! select->gc)
select->gc = gdk_gc_new (widget->window);
select->gc = gdk_gc_new (gtk_widget_get_window (widget));
gimp_color_select_draw_xy_marker (select, &event->area);
......@@ -648,7 +648,7 @@ gimp_color_select_xy_events (GtkWidget *widget,
x = bevent->x;
y = bevent->y;
gdk_pointer_grab (select->xy_color->window, FALSE,
gdk_pointer_grab (gtk_widget_get_window (select->xy_color), FALSE,
GDK_POINTER_MOTION_HINT_MASK |
GDK_BUTTON_MOTION_MASK |
GDK_BUTTON_RELEASE_MASK,
......@@ -712,7 +712,7 @@ gimp_color_select_z_expose (GtkWidget *widget,
GimpColorSelect *select)
{
if (! select->gc)
select->gc = gdk_gc_new (widget->window);
select->gc = gdk_gc_new (gtk_widget_get_window (widget));
gimp_color_select_draw_z_marker (select, &event->area);
......@@ -735,7 +735,7 @@ gimp_color_select_z_events (GtkWidget *widget,
bevent = (GdkEventButton *) event;
z = bevent->y;
gdk_pointer_grab (select->z_color->window, FALSE,
gdk_pointer_grab (gtk_widget_get_window (select->z_color), FALSE,
GDK_POINTER_MOTION_HINT_MASK |
GDK_BUTTON_MOTION_MASK |
GDK_BUTTON_RELEASE_MASK,
......@@ -844,7 +844,7 @@ gimp_color_select_draw_z_marker (GimpColorSelect *select,
if (y >= miny && y < height)
{
gdk_gc_set_function (select->gc, GDK_INVERT);
gdk_draw_line (select->z_color->window,
gdk_draw_line (gtk_widget_get_window (select->z_color),
select->gc, minx, y, width - 1, y);
gdk_gc_set_function (select->gc, GDK_COPY);
}
......@@ -885,11 +885,11 @@ gimp_color_select_draw_xy_marker (GimpColorSelect *select,
}
if (y >= miny && y < height)
gdk_draw_line (select->xy_color->window,
gdk_draw_line (gtk_widget_get_window (select->xy_color),
select->gc, minx, y, width - 1, y);
if (x >= minx && x < width)
gdk_draw_line (select->xy_color->window,
gdk_draw_line (gtk_widget_get_window (select->xy_color),
select->gc, x, miny, x, height - 1);
gdk_gc_set_function (select->gc, GDK_COPY);
......
......@@ -135,11 +135,12 @@ gimp_dialog_constructor (GType type,
if (show_help_button && help_func && help_id)
{
GtkDialog *dialog = GTK_DIALOG (object);
GtkWidget *button = gtk_button_new_from_stock (GTK_STOCK_HELP);
GtkDialog *dialog = GTK_DIALOG (object);
GtkWidget *action_area = gtk_dialog_get_action_area (dialog);
GtkWidget *button = gtk_button_new_from_stock (GTK_STOCK_HELP);
gtk_box_pack_end (GTK_BOX (dialog->action_area), button, FALSE, TRUE, 0);
gtk_button_box_set_child_secondary (GTK_BUTTON_BOX (dialog->action_area),
gtk_box_pack_end (GTK_BOX (action_area), button, FALSE, TRUE, 0);
gtk_button_box_set_child_secondary (GTK_BUTTON_BOX (action_area),
button, TRUE);
gtk_widget_show (button);
......@@ -241,11 +242,11 @@ gimp_dialog_close (GtkDialog *dialog)
GtkWidget *widget = GTK_WIDGET (dialog);
if (widget->window)
if (gtk_widget_get_window (widget))
{
GdkEvent *event = gdk_event_new (GDK_DELETE);
event->any.window = g_object_ref (widget->window);
event->any.window = g_object_ref (gtk_widget_get_window (widget));
event->any.send_event = TRUE;
gtk_main_do_event (event);
......@@ -269,7 +270,7 @@ gimp_dialog_response (GtkDialog *dialog,
GList *children;
GList *list;
children = gtk_container_get_children (GTK_CONTAINER (dialog->action_area));
children = gtk_container_get_children (GTK_CONTAINER (gtk_dialog_get_action_area (dialog)));
for (list = children; list; list = g_list_next (list))
{
......
......@@ -453,7 +453,7 @@ gimp_context_help_idle_start (gpointer widget)
cursor = gdk_cursor_new_for_display (gtk_widget_get_display (invisible),
GDK_QUESTION_ARROW);
status = gdk_pointer_grab (invisible->window, TRUE,
status = gdk_pointer_grab (gtk_widget_get_window (invisible), TRUE,
GDK_BUTTON_PRESS_MASK |
GDK_BUTTON_RELEASE_MASK |
GDK_ENTER_NOTIFY_MASK |
......@@ -469,7 +469,7 @@ gimp_context_help_idle_start (gpointer widget)
return FALSE;
}
if (gdk_keyboard_grab (invisible->window, TRUE,
if (gdk_keyboard_grab (gtk_widget_get_window (invisible), TRUE,
GDK_CURRENT_TIME) != GDK_GRAB_SUCCESS)
{
gdk_display_pointer_ungrab (gtk_widget_get_display (invisible),
......
......@@ -128,13 +128,15 @@ gimp_memsize_entry_unit_callback (GtkWidget *widget,
{
entry->shift = shift;
entry->adjustment->value = CAST entry->value >> shift;
entry->adjustment->lower = CAST entry->lower >> shift;
entry->adjustment->upper = CAST entry->upper >> shift;
gtk_adjustment_value_changed (entry->adjustment);
gtk_adjustment_changed (entry->adjustment);
gtk_adjustment_configure (entry->adjustment,
CAST entry->value >> shift,
CAST entry->lower >> shift,
CAST entry->upper >> shift,
gtk_adjustment_get_step_increment (entry->adjustment),
gtk_adjustment_get_page_increment (entry->adjustment),
gtk_adjustment_get_page_size (entry->adjustment));
}
#undef CAST
}
......
......@@ -321,7 +321,7 @@ gimp_offset_area_realize (GtkWidget *widget)
cursor = gdk_cursor_new_for_display (gtk_widget_get_display (widget),
GDK_FLEUR);
gdk_window_set_cursor (widget->window, cursor);
gdk_window_set_cursor (gtk_widget_get_window (widget), cursor);
gdk_cursor_unref (cursor);
}
......@@ -344,7 +344,7 @@ gimp_offset_area_event (GtkWidget *widget,
switch (event->type)
{
case GDK_BUTTON_PRESS:
gdk_pointer_grab (widget->window, FALSE,
gdk_pointer_grab (gtk_widget_get_window (widget), FALSE,
(GDK_BUTTON1_MOTION_MASK |
GDK_BUTTON_RELEASE_MASK),
NULL, NULL, event->button.time);
......@@ -388,8 +388,9 @@ static gboolean
gimp_offset_area_expose_event (GtkWidget *widget,
GdkEventExpose *eevent)
{
GimpOffsetArea *area = GIMP_OFFSET_AREA (widget);
GtkStyle *style = gtk_widget_get_style (widget);
GimpOffsetArea *area = GIMP_OFFSET_AREA (widget);
GtkStyle *style = gtk_widget_get_style (widget);
GdkWindow *window = gtk_widget_get_window (widget);
GdkPixbuf *pixbuf;
gint w, h;
gint x, y;
......@@ -414,14 +415,14 @@ gimp_offset_area_expose_event (GtkWidget *widget,
if (pixbuf)
{
gdk_draw_pixbuf (widget->window, style->black_gc,
gdk_draw_pixbuf (window, style->black_gc,
pixbuf, 0, 0, x, y, w, h, GDK_RGB_DITHER_NORMAL, 0, 0);
gdk_draw_rectangle (widget->window, style->black_gc, FALSE,
gdk_draw_rectangle (window, style->black_gc, FALSE,
x, y, w - 1, h - 1);
}
else
{
gtk_paint_shadow (style, widget->window, GTK_STATE_NORMAL,
gtk_paint_shadow (style, window, GTK_STATE_NORMAL,
GTK_SHADOW_OUT,
NULL, widget, NULL,
x, y, w, h);
......@@ -456,7 +457,7 @@ gimp_offset_area_expose_event (GtkWidget *widget,
if (pixbuf)
{
GdkGC *gc = gdk_gc_new (widget->window);
GdkGC *gc = gdk_gc_new (window);
gint line = MIN (3, MIN (w, h));
gdk_gc_set_function (gc, GDK_INVERT);
......@@ -464,7 +465,7 @@ gimp_offset_area_expose_event (GtkWidget *widget,
GDK_LINE_SOLID, GDK_CAP_BUTT,
GDK_JOIN_ROUND);
gdk_draw_rectangle (widget->window, gc, FALSE,
gdk_draw_rectangle (window, gc, FALSE,
x + line / 2,
y + line / 2,
MAX (w - line, 1),
......@@ -474,7 +475,7 @@ gimp_offset_area_expose_event (GtkWidget *widget,
}
else
{
gdk_draw_rectangle (widget->window, style->black_gc, FALSE,
gdk_draw_rectangle (window, style->black_gc, FALSE,
x, y, w, h);
}
}
......
......@@ -224,13 +224,14 @@ gimp_pick_button_clicked (GtkButton *gtk_button)
widget = button->grab_widget;
timestamp = gtk_get_current_event_time ();
if (gdk_keyboard_grab (widget->window, FALSE, timestamp) != GDK_GRAB_SUCCESS)
if (gdk_keyboard_grab (gtk_widget_get_window (widget), FALSE,
timestamp) != GDK_GRAB_SUCCESS)
{
g_warning ("Failed to grab keyboard to do eyedropper");
return;
}
if (gdk_pointer_grab (widget->window, FALSE,
if (gdk_pointer_grab (gtk_widget_get_window (widget), FALSE,
GDK_BUTTON_RELEASE_MASK |
GDK_BUTTON_PRESS_MASK |
GDK_POINTER_MOTION_MASK,
......
......@@ -139,7 +139,7 @@ gimp_pixmap_create_from_xpm_d (GimpPixmap *pixmap)
style = gtk_widget_get_style (widget);
gdk_pixmap = gdk_pixmap_create_from_xpm_d (widget->window,
gdk_pixmap = gdk_pixmap_create_from_xpm_d (gtk_widget_get_window (widget),
&mask,
&style->bg[GTK_STATE_NORMAL],
pixmap->xpm_data);
......
......@@ -476,15 +476,17 @@ gimp_preview_invalidate_now (GimpPreview *preview)
if (toplevel && GTK_WIDGET_REALIZED (toplevel))
{
gdk_window_set_cursor (toplevel->window, preview->cursor_busy);
gdk_window_set_cursor (preview->area->window, preview->cursor_busy);
gdk_window_set_cursor (gtk_widget_get_window (toplevel),
preview->cursor_busy);
gdk_window_set_cursor (gtk_widget_get_window (preview->area),
preview->cursor_busy);
gdk_flush ();
g_signal_emit (preview, preview_signals[INVALIDATED], 0);
class->set_cursor (preview);
gdk_window_set_cursor (toplevel->window, NULL);
gdk_window_set_cursor (gtk_widget_get_window (toplevel), NULL);
}
else
{
......@@ -498,7 +500,8 @@ static void
gimp_preview_real_set_cursor (GimpPreview *preview)
{
if (GTK_WIDGET_REALIZED (preview->area))
gdk_window_set_cursor (preview->area->window, preview->default_cursor);
gdk_window_set_cursor (gtk_widget_get_window (preview->area),
preview->default_cursor);
}
static void
......
......@@ -238,7 +238,7 @@ gimp_preview_area_expose (GtkWidget *widget,
gint y = render.y - rect.y;
guchar *buf = area->buf + x * 3 + y * area->rowstride;
gdk_draw_rgb_image_dithalign (widget->window,
gdk_draw_rgb_image_dithalign (gtk_widget_get_window (widget),
style->fg_gc[widget->state],
render.x,
render.y,
......
......@@ -564,7 +564,7 @@ gimp_ruler_size_allocate (GtkWidget *widget,
if (GTK_WIDGET_REALIZED (widget))
{
gdk_window_move_resize (widget->window,
gdk_window_move_resize (gtk_widget_get_window (widget),
allocation->x, allocation->y,
allocation->width, allocation->height);
......@@ -660,7 +660,7 @@ gimp_ruler_expose (GtkWidget *widget,
gimp_ruler_draw_ticks (ruler);
gdk_draw_drawable (widget->window,
gdk_draw_drawable (gtk_widget_get_window (widget),
priv->non_gr_exp_gc,
priv->backing_store,
0, 0, 0, 0,
......@@ -925,7 +925,7 @@ gimp_ruler_draw_pos (GimpRuler *ruler)
if ((bs_width > 0) && (bs_height > 0))
{
cairo_t *cr = gdk_cairo_create (widget->window);
cairo_t *cr = gdk_cairo_create (gtk_widget_get_window (widget));
gdouble lower;
gdouble upper;
gdouble position;
......@@ -933,7 +933,7 @@ gimp_ruler_draw_pos (GimpRuler *ruler)
/* If a backing store exists, restore the ruler */
if (priv->backing_store)
gdk_draw_drawable (widget->window,
gdk_draw_drawable (gtk_widget_get_window (widget),
style->black_gc,
priv->backing_store,
priv->xsrc, priv->ysrc,
......@@ -1001,14 +1001,14 @@ gimp_ruler_make_pixmap (GimpRuler *ruler)
g_object_unref (priv->backing_store);
}
priv->backing_store = gdk_pixmap_new (widget->window,
priv->backing_store = gdk_pixmap_new (gtk_widget_get_window (widget),
widget->allocation.width,
widget->allocation.height,
-1);
if (!priv->non_gr_exp_gc)
{
priv->non_gr_exp_gc = gdk_gc_new (widget->window);
priv->non_gr_exp_gc = gdk_gc_new (gtk_widget_get_window (widget));
gdk_gc_set_exposures (priv->non_gr_exp_gc, FALSE);
}
}
......
......@@ -380,7 +380,7 @@ gimp_scrolled_preview_area_event (GtkWidget *area,
cursor = gdk_cursor_new_for_display (gtk_widget_get_display (area),
GDK_FLEUR);
if (gdk_pointer_grab (area->window, TRUE,
if (gdk_pointer_grab (gtk_widget_get_window (area), TRUE,
GDK_BUTTON_RELEASE_MASK |
GDK_BUTTON_MOTION_MASK |
GDK_POINTER_MOTION_HINT_MASK,
......@@ -603,7 +603,7 @@ gimp_scrolled_preview_nav_button_press (GtkWidget *widget,
gtk_widget_realize (area);
gtk_widget_show (area);
gdk_window_get_origin (widget->window, &x, &y);
gdk_window_get_origin (gtk_widget_get_window (widget), &x, &y);
adj = gtk_range_get_adjustment (GTK_RANGE (preview->hscr));
h = (adj->value / adj->upper) + (adj->page_size / adj->upper) / 2.0;
......@@ -625,11 +625,11 @@ gimp_scrolled_preview_nav_button_press (GtkWidget *widget,
cursor = gdk_cursor_new_for_display (gtk_widget_get_display (widget),
GDK_FLEUR);
gdk_pointer_grab (area->window, TRUE,
gdk_pointer_grab (gtk_widget_get_window (area), TRUE,
GDK_BUTTON_RELEASE_MASK |
GDK_BUTTON_MOTION_MASK |
GDK_POINTER_MOTION_HINT_MASK,
area->window, cursor,
gtk_widget_get_window (area), cursor,
event->time);
gdk_cursor_unref (cursor);
......@@ -688,7 +688,7 @@ gimp_scrolled_preview_nav_popup_event (GtkWidget *widget,
vadj->upper - vadj->page_size));
gtk_widget_queue_draw (widget);
gdk_window_process_updates (widget->window, FALSE);
gdk_window_process_updates (gtk_widget_get_window (widget), FALSE);
gdk_event_request_motions (mevent);
}
......@@ -729,7 +729,7 @@ gimp_scrolled_preview_nav_popup_expose (GtkWidget *widget,
w = MAX (1, ceil (w * (gdouble) widget->allocation.width));
h = MAX (1, ceil (h * (gdouble) widget->allocation.height));
cr = gdk_cairo_create (widget->window);
cr = gdk_cairo_create (gtk_widget_get_window (widget));
gdk_cairo_region (cr, event->region);
cairo_clip (cr);
......@@ -763,12 +763,13 @@ gimp_scrolled_preview_set_cursor (GimpPreview *preview)
if (preview->xmax - preview->xmin > preview->width ||
preview->ymax - preview->ymin > preview->height)
{
gdk_window_set_cursor (preview->area->window,
gdk_window_set_cursor (gtk_widget_get_window (preview->area),
GIMP_SCROLLED_PREVIEW (preview)->cursor_move);
}
else
{
gdk_window_set_cursor (preview->area->window, preview->default_cursor);
gdk_window_set_cursor (gtk_widget_get_window (preview->area),
preview->default_cursor);
}
}
......
......@@ -1073,9 +1073,12 @@ static GtkWidget *
find_mnemonic_widget (GtkWidget *widget,
gint level)
{
gboolean can_focus;
g_object_get (widget, "can-focus", &can_focus, NULL);
if (GTK_WIDGET_GET_CLASS (widget)->activate_signal ||
GTK_WIDGET_CAN_FOCUS (widget) ||
can_focus ||
GTK_WIDGET_GET_CLASS (widget)->mnemonic_activate !=
GTK_WIDGET_CLASS (g_type_class_peek (GTK_TYPE_WIDGET))->mnemonic_activate)
{
......
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