gimp r28190 - in trunk: . libgimpwidgets
- From: mitch svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r28190 - in trunk: . libgimpwidgets
- Date: Sun, 22 Mar 2009 15:42:42 +0000 (UTC)
Author: mitch
Date: Sun Mar 22 15:42:42 2009
New Revision: 28190
URL: http://svn.gnome.org/viewvc/gimp?rev=28190&view=rev
Log:
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.
Modified:
trunk/ChangeLog
trunk/libgimpwidgets/gimpchainbutton.c
trunk/libgimpwidgets/gimpcolorarea.c
trunk/libgimpwidgets/gimpcolorbutton.c
trunk/libgimpwidgets/gimpcolorscale.c
trunk/libgimpwidgets/gimpcolorselect.c
trunk/libgimpwidgets/gimpdialog.c
trunk/libgimpwidgets/gimphelpui.c
trunk/libgimpwidgets/gimpmemsizeentry.c
trunk/libgimpwidgets/gimpoffsetarea.c
trunk/libgimpwidgets/gimppickbutton.c
trunk/libgimpwidgets/gimppixmap.c
trunk/libgimpwidgets/gimppreview.c
trunk/libgimpwidgets/gimppreviewarea.c
trunk/libgimpwidgets/gimpruler.c
trunk/libgimpwidgets/gimpscrolledpreview.c
trunk/libgimpwidgets/gimpwidgets.c
Modified: trunk/libgimpwidgets/gimpchainbutton.c
==============================================================================
--- trunk/libgimpwidgets/gimpchainbutton.c (original)
+++ trunk/libgimpwidgets/gimpchainbutton.c Sun Mar 22 15:42:42 2009
@@ -443,7 +443,7 @@
}
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,
Modified: trunk/libgimpwidgets/gimpcolorarea.c
==============================================================================
--- trunk/libgimpwidgets/gimpcolorarea.c (original)
+++ trunk/libgimpwidgets/gimpcolorarea.c Sun Mar 22 15:42:42 2009
@@ -334,7 +334,7 @@
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 @@
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 @@
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,
Modified: trunk/libgimpwidgets/gimpcolorbutton.c
==============================================================================
--- trunk/libgimpwidgets/gimpcolorbutton.c (original)
+++ trunk/libgimpwidgets/gimpcolorbutton.c Sun Mar 22 15:42:42 2009
@@ -506,7 +506,8 @@
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",
Modified: trunk/libgimpwidgets/gimpcolorscale.c
==============================================================================
--- trunk/libgimpwidgets/gimpcolorscale.c (original)
+++ trunk/libgimpwidgets/gimpcolorscale.c Sun Mar 22 15:42:42 2009
@@ -233,9 +233,10 @@
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 @@
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 @@
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 @@
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 @@
}
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 @@
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 @@
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);
Modified: trunk/libgimpwidgets/gimpcolorselect.c
==============================================================================
--- trunk/libgimpwidgets/gimpcolorselect.c (original)
+++ trunk/libgimpwidgets/gimpcolorselect.c Sun Mar 22 15:42:42 2009
@@ -624,7 +624,7 @@
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 @@
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 @@
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 @@
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 @@
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 @@
}
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);
Modified: trunk/libgimpwidgets/gimpdialog.c
==============================================================================
--- trunk/libgimpwidgets/gimpdialog.c (original)
+++ trunk/libgimpwidgets/gimpdialog.c Sun Mar 22 15:42:42 2009
@@ -135,11 +135,12 @@
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 @@
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 @@
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))
{
Modified: trunk/libgimpwidgets/gimphelpui.c
==============================================================================
--- trunk/libgimpwidgets/gimphelpui.c (original)
+++ trunk/libgimpwidgets/gimphelpui.c Sun Mar 22 15:42:42 2009
@@ -453,7 +453,7 @@
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 @@
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),
Modified: trunk/libgimpwidgets/gimpmemsizeentry.c
==============================================================================
--- trunk/libgimpwidgets/gimpmemsizeentry.c (original)
+++ trunk/libgimpwidgets/gimpmemsizeentry.c Sun Mar 22 15:42:42 2009
@@ -128,13 +128,15 @@
{
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
}
Modified: trunk/libgimpwidgets/gimpoffsetarea.c
==============================================================================
--- trunk/libgimpwidgets/gimpoffsetarea.c (original)
+++ trunk/libgimpwidgets/gimpoffsetarea.c Sun Mar 22 15:42:42 2009
@@ -321,7 +321,7 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
}
else
{
- gdk_draw_rectangle (widget->window, style->black_gc, FALSE,
+ gdk_draw_rectangle (window, style->black_gc, FALSE,
x, y, w, h);
}
}
Modified: trunk/libgimpwidgets/gimppickbutton.c
==============================================================================
--- trunk/libgimpwidgets/gimppickbutton.c (original)
+++ trunk/libgimpwidgets/gimppickbutton.c Sun Mar 22 15:42:42 2009
@@ -224,13 +224,14 @@
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,
Modified: trunk/libgimpwidgets/gimppixmap.c
==============================================================================
--- trunk/libgimpwidgets/gimppixmap.c (original)
+++ trunk/libgimpwidgets/gimppixmap.c Sun Mar 22 15:42:42 2009
@@ -139,7 +139,7 @@
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);
Modified: trunk/libgimpwidgets/gimppreview.c
==============================================================================
--- trunk/libgimpwidgets/gimppreview.c (original)
+++ trunk/libgimpwidgets/gimppreview.c Sun Mar 22 15:42:42 2009
@@ -476,15 +476,17 @@
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 @@
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
Modified: trunk/libgimpwidgets/gimppreviewarea.c
==============================================================================
--- trunk/libgimpwidgets/gimppreviewarea.c (original)
+++ trunk/libgimpwidgets/gimppreviewarea.c Sun Mar 22 15:42:42 2009
@@ -238,7 +238,7 @@
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,
Modified: trunk/libgimpwidgets/gimpruler.c
==============================================================================
--- trunk/libgimpwidgets/gimpruler.c (original)
+++ trunk/libgimpwidgets/gimpruler.c Sun Mar 22 15:42:42 2009
@@ -564,7 +564,7 @@
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_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 @@
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 @@
/* 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 @@
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);
}
}
Modified: trunk/libgimpwidgets/gimpscrolledpreview.c
==============================================================================
--- trunk/libgimpwidgets/gimpscrolledpreview.c (original)
+++ trunk/libgimpwidgets/gimpscrolledpreview.c Sun Mar 22 15:42:42 2009
@@ -380,7 +380,7 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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);
}
}
Modified: trunk/libgimpwidgets/gimpwidgets.c
==============================================================================
--- trunk/libgimpwidgets/gimpwidgets.c (original)
+++ trunk/libgimpwidgets/gimpwidgets.c Sun Mar 22 15:42:42 2009
@@ -1073,9 +1073,12 @@
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)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]