mirror of https://github.com/GNOME/gimp.git
app/widgets/gimpblobeditor.c app/widgets/gimpbrushselect.c
2009-03-22 Michael Natterer <mitch@gimp.org> * app/widgets/gimpblobeditor.c * app/widgets/gimpbrushselect.c * app/widgets/gimpcolorbar.c * app/widgets/gimpcolordialog.c * app/widgets/gimpcolorframe.c * app/widgets/gimpcontainergridview.c * app/widgets/gimpcontainerpopup.c * app/widgets/gimpcontainertreeview.c * app/widgets/gimpcontrollereditor.c * app/widgets/gimpcontrollerlist.c * app/widgets/gimpcursor.c * app/widgets/gimpcurveview.c * app/widgets/gimpdasheditor.c * app/widgets/gimpdialogfactory.c * app/widgets/gimpdnd-xds.c * app/widgets/gimpdockable.c * app/widgets/gimperrordialog.c * app/widgets/gimpfgbgeditor.c * app/widgets/gimpfgbgview.c * app/widgets/gimpfiledialog.c * app/widgets/gimpfontselect.c * app/widgets/gimpgradienteditor.c * app/widgets/gimpgradientselect.c * app/widgets/gimphandlebar.c * app/widgets/gimphistogrambox.c * app/widgets/gimphistogramview.c * app/widgets/gimpmessagedialog.c * app/widgets/gimpnavigationview.c * app/widgets/gimppaletteselect.c * app/widgets/gimppaletteview.c * app/widgets/gimppatternselect.c * app/widgets/gimpprogressbox.c * app/widgets/gimpprogressdialog.c * app/widgets/gimpscalebutton.c * app/widgets/gimpselectiondata.c * app/widgets/gimpsessioninfo.c * app/widgets/gimpsettingsbox.c * app/widgets/gimpstrokeeditor.c * app/widgets/gimptexteditor.c * app/widgets/gimptoolbox.c * app/widgets/gimpuimanager.c * app/widgets/gimpview-popup.c * app/widgets/gimpview.c * app/widgets/gimpviewabledialog.c * app/widgets/gimpwidgets-utils.c: use accessors for various members of GTK+ structures that don't exist any longer when GSEAL_ENABLE is defined. svn path=/trunk/; revision=28193
This commit is contained in:
parent
d3dcff66f7
commit
d85fb156b5
50
ChangeLog
50
ChangeLog
|
@ -1,3 +1,53 @@
|
|||
2009-03-22 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/widgets/gimpblobeditor.c
|
||||
* app/widgets/gimpbrushselect.c
|
||||
* app/widgets/gimpcolorbar.c
|
||||
* app/widgets/gimpcolordialog.c
|
||||
* app/widgets/gimpcolorframe.c
|
||||
* app/widgets/gimpcontainergridview.c
|
||||
* app/widgets/gimpcontainerpopup.c
|
||||
* app/widgets/gimpcontainertreeview.c
|
||||
* app/widgets/gimpcontrollereditor.c
|
||||
* app/widgets/gimpcontrollerlist.c
|
||||
* app/widgets/gimpcursor.c
|
||||
* app/widgets/gimpcurveview.c
|
||||
* app/widgets/gimpdasheditor.c
|
||||
* app/widgets/gimpdialogfactory.c
|
||||
* app/widgets/gimpdnd-xds.c
|
||||
* app/widgets/gimpdockable.c
|
||||
* app/widgets/gimperrordialog.c
|
||||
* app/widgets/gimpfgbgeditor.c
|
||||
* app/widgets/gimpfgbgview.c
|
||||
* app/widgets/gimpfiledialog.c
|
||||
* app/widgets/gimpfontselect.c
|
||||
* app/widgets/gimpgradienteditor.c
|
||||
* app/widgets/gimpgradientselect.c
|
||||
* app/widgets/gimphandlebar.c
|
||||
* app/widgets/gimphistogrambox.c
|
||||
* app/widgets/gimphistogramview.c
|
||||
* app/widgets/gimpmessagedialog.c
|
||||
* app/widgets/gimpnavigationview.c
|
||||
* app/widgets/gimppaletteselect.c
|
||||
* app/widgets/gimppaletteview.c
|
||||
* app/widgets/gimppatternselect.c
|
||||
* app/widgets/gimpprogressbox.c
|
||||
* app/widgets/gimpprogressdialog.c
|
||||
* app/widgets/gimpscalebutton.c
|
||||
* app/widgets/gimpselectiondata.c
|
||||
* app/widgets/gimpsessioninfo.c
|
||||
* app/widgets/gimpsettingsbox.c
|
||||
* app/widgets/gimpstrokeeditor.c
|
||||
* app/widgets/gimptexteditor.c
|
||||
* app/widgets/gimptoolbox.c
|
||||
* app/widgets/gimpuimanager.c
|
||||
* app/widgets/gimpview-popup.c
|
||||
* app/widgets/gimpview.c
|
||||
* app/widgets/gimpviewabledialog.c
|
||||
* app/widgets/gimpwidgets-utils.c: use accessors for various
|
||||
members of GTK+ structures that don't exist any longer when
|
||||
GSEAL_ENABLE is defined.
|
||||
|
||||
2009-03-22 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/display/gimpcanvas.c
|
||||
|
|
|
@ -197,7 +197,7 @@ gimp_blob_editor_expose (GtkWidget *widget,
|
|||
if (r0 < 2)
|
||||
return TRUE;
|
||||
|
||||
cr = gdk_cairo_create (widget->window);
|
||||
cr = gdk_cairo_create (gtk_widget_get_window (widget));
|
||||
|
||||
gimp_blob_editor_draw_blob (editor, cr,
|
||||
widget->allocation.width / 2.0,
|
||||
|
|
|
@ -132,6 +132,7 @@ gimp_brush_select_constructor (GType type,
|
|||
GObject *object;
|
||||
GimpPdbDialog *dialog;
|
||||
GimpBrushSelect *select;
|
||||
GtkWidget *content_area;
|
||||
GtkWidget *table;
|
||||
GtkAdjustment *spacing_adj;
|
||||
|
||||
|
@ -163,7 +164,9 @@ gimp_brush_select_constructor (GType type,
|
|||
5 * (GIMP_VIEW_SIZE_MEDIUM + 2));
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (dialog->view), 12);
|
||||
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), dialog->view);
|
||||
|
||||
content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
|
||||
gtk_container_add (GTK_CONTAINER (content_area), dialog->view);
|
||||
gtk_widget_show (dialog->view);
|
||||
|
||||
/* Create the frame and the table for the options */
|
||||
|
|
|
@ -204,7 +204,7 @@ gimp_color_bar_expose (GtkWidget *widget,
|
|||
break;
|
||||
}
|
||||
|
||||
gdk_draw_rgb_image (widget->window, style->black_gc,
|
||||
gdk_draw_rgb_image (gtk_widget_get_window (widget), style->black_gc,
|
||||
widget->allocation.x + x, widget->allocation.y + y,
|
||||
width, height,
|
||||
GDK_RGB_DITHER_NORMAL,
|
||||
|
|
|
@ -126,7 +126,7 @@ gimp_color_dialog_init (GimpColorDialog *dialog)
|
|||
|
||||
dialog->selection = gimp_color_selection_new ();
|
||||
gtk_container_set_border_width (GTK_CONTAINER (dialog->selection), 12);
|
||||
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox),
|
||||
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
|
||||
dialog->selection);
|
||||
gtk_widget_show (dialog->selection);
|
||||
|
||||
|
@ -277,10 +277,19 @@ gimp_color_dialog_new (GimpViewable *viewable,
|
|||
NULL);
|
||||
|
||||
if (viewable)
|
||||
gimp_viewable_dialog_set_viewable (GIMP_VIEWABLE_DIALOG (dialog),
|
||||
viewable, context);
|
||||
{
|
||||
gimp_viewable_dialog_set_viewable (GIMP_VIEWABLE_DIALOG (dialog),
|
||||
viewable, context);
|
||||
}
|
||||
else
|
||||
gtk_widget_hide (GIMP_VIEWABLE_DIALOG (dialog)->icon->parent->parent);
|
||||
{
|
||||
GtkWidget *parent;
|
||||
|
||||
parent = gtk_widget_get_parent (GIMP_VIEWABLE_DIALOG (dialog)->icon);
|
||||
parent = gtk_widget_get_parent (parent);
|
||||
|
||||
gtk_widget_hide (parent);
|
||||
}
|
||||
|
||||
dialog->wants_updates = wants_updates;
|
||||
|
||||
|
|
|
@ -277,7 +277,7 @@ gimp_color_frame_expose (GtkWidget *widget,
|
|||
gint w, h;
|
||||
gdouble scale;
|
||||
|
||||
cr = gdk_cairo_create (widget->window);
|
||||
cr = gdk_cairo_create (gtk_widget_get_window (widget));
|
||||
gdk_cairo_set_source_color (cr, &style->light[GTK_STATE_NORMAL]);
|
||||
|
||||
g_snprintf (buf, sizeof (buf), "%d", frame->number);
|
||||
|
|
|
@ -359,7 +359,7 @@ gimp_container_grid_view_menu_position (GtkMenu *menu,
|
|||
else
|
||||
widget = GTK_WIDGET (grid_view->wrap_box);
|
||||
|
||||
gdk_window_get_origin (widget->window, x, y);
|
||||
gdk_window_get_origin (gtk_widget_get_window (widget), x, y);
|
||||
|
||||
if (GTK_WIDGET_NO_WINDOW (widget))
|
||||
{
|
||||
|
|
|
@ -185,12 +185,13 @@ gimp_container_popup_map (GtkWidget *widget)
|
|||
* receive events. we filter away events outside this toplevel
|
||||
* away in button_press()
|
||||
*/
|
||||
if (gdk_pointer_grab (widget->window, TRUE,
|
||||
if (gdk_pointer_grab (gtk_widget_get_window (widget), TRUE,
|
||||
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK |
|
||||
GDK_POINTER_MOTION_MASK,
|
||||
NULL, NULL, GDK_CURRENT_TIME) == 0)
|
||||
{
|
||||
if (gdk_keyboard_grab (widget->window, TRUE, GDK_CURRENT_TIME) == 0)
|
||||
if (gdk_keyboard_grab (gtk_widget_get_window (widget), TRUE,
|
||||
GDK_CURRENT_TIME) == 0)
|
||||
{
|
||||
gtk_grab_add (widget);
|
||||
return;
|
||||
|
@ -402,7 +403,7 @@ gimp_container_popup_show (GimpContainerPopup *popup,
|
|||
g_return_if_fail (GTK_IS_WIDGET (widget));
|
||||
|
||||
gtk_widget_size_request (GTK_WIDGET (popup), &requisition);
|
||||
gdk_window_get_origin (widget->window, &orig_x, &orig_y);
|
||||
gdk_window_get_origin (gtk_widget_get_window (widget), &orig_x, &orig_y);
|
||||
|
||||
if (GTK_WIDGET_NO_WINDOW (widget))
|
||||
{
|
||||
|
|
|
@ -315,7 +315,7 @@ gimp_container_tree_view_menu_position (GtkMenu *menu,
|
|||
GtkWidget *widget = GTK_WIDGET (tree_view->view);
|
||||
GtkTreeIter selected_iter;
|
||||
|
||||
gdk_window_get_origin (widget->window, x, y);
|
||||
gdk_window_get_origin (gtk_widget_get_window (widget), x, y);
|
||||
|
||||
if (GTK_WIDGET_NO_WINDOW (widget))
|
||||
{
|
||||
|
|
|
@ -696,7 +696,7 @@ gimp_controller_editor_edit_clicked (GtkWidget *button,
|
|||
view = gimp_action_editor_new (gimp_ui_managers_from_name ("<Image>")->data,
|
||||
action_name, FALSE);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (view), 12);
|
||||
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (editor->edit_dialog)->vbox),
|
||||
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (editor->edit_dialog))),
|
||||
view);
|
||||
gtk_widget_show (view);
|
||||
|
||||
|
|
|
@ -645,7 +645,8 @@ gimp_controller_list_edit_clicked (GtkWidget *button,
|
|||
editor = gimp_controller_editor_new (list->dest_info,
|
||||
gimp_get_user_context (list->gimp));
|
||||
gtk_container_set_border_width (GTK_CONTAINER (editor), 12);
|
||||
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), editor);
|
||||
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
|
||||
editor);
|
||||
gtk_widget_show (editor);
|
||||
|
||||
g_object_set_data (G_OBJECT (list->dest_info), "gimp-controller-editor-dialog",
|
||||
|
|
|
@ -816,6 +816,6 @@ gimp_cursor_set (GtkWidget *widget,
|
|||
cursor_type,
|
||||
tool_cursor,
|
||||
modifier);
|
||||
gdk_window_set_cursor (widget->window, cursor);
|
||||
gdk_window_set_cursor (gtk_widget_get_window (widget), cursor);
|
||||
gdk_cursor_unref (cursor);
|
||||
}
|
||||
|
|
|
@ -356,7 +356,7 @@ gimp_curve_view_expose (GtkWidget *widget,
|
|||
width = widget->allocation.width - 2 * border - 1;
|
||||
height = widget->allocation.height - 2 * border - 1;
|
||||
|
||||
cr = gdk_cairo_create (widget->window);
|
||||
cr = gdk_cairo_create (gtk_widget_get_window (widget));
|
||||
|
||||
gdk_cairo_region (cr, event->region);
|
||||
cairo_clip (cr);
|
||||
|
@ -508,7 +508,7 @@ set_cursor (GimpCurveView *view,
|
|||
GdkDisplay *display = gtk_widget_get_display (GTK_WIDGET (view));
|
||||
GdkCursor *cursor = gdk_cursor_new_for_display (display, new_cursor);
|
||||
|
||||
gdk_window_set_cursor (GTK_WIDGET (view)->window, cursor);
|
||||
gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (view)), cursor);
|
||||
gdk_cursor_unref (cursor);
|
||||
|
||||
view->cursor_type = new_cursor;
|
||||
|
|
|
@ -238,7 +238,7 @@ gimp_dash_editor_expose (GtkWidget *widget,
|
|||
{
|
||||
GimpDashEditor *editor = GIMP_DASH_EDITOR (widget);
|
||||
GtkStyle *style = gtk_widget_get_style (widget);
|
||||
cairo_t *cr = gdk_cairo_create (widget->window);
|
||||
cairo_t *cr = gdk_cairo_create (gtk_widget_get_window (widget));
|
||||
gint x;
|
||||
gint w, h;
|
||||
|
||||
|
@ -348,7 +348,7 @@ gimp_dash_editor_button_press (GtkWidget *widget,
|
|||
|
||||
if (bevent->button == 1 && bevent->type == GDK_BUTTON_PRESS)
|
||||
{
|
||||
gdk_pointer_grab (widget->window, FALSE,
|
||||
gdk_pointer_grab (gtk_widget_get_window (widget), FALSE,
|
||||
GDK_BUTTON_RELEASE_MASK | GDK_BUTTON1_MOTION_MASK,
|
||||
NULL, NULL, bevent->time);
|
||||
index = dash_x_to_index (editor, bevent->x);
|
||||
|
|
|
@ -1505,7 +1505,7 @@ gimp_dialog_factories_show_foreach (gconstpointer key,
|
|||
gtk_widget_show (widget);
|
||||
|
||||
if (GTK_WIDGET_VISIBLE (widget))
|
||||
gdk_window_raise (widget->window);
|
||||
gdk_window_raise (gtk_widget_get_window (widget));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1540,8 +1540,8 @@ gimp_dialog_factories_set_busy_foreach (gconstpointer key,
|
|||
GIMP_CURSOR_MODIFIER_NONE);
|
||||
}
|
||||
|
||||
if (widget->window)
|
||||
gdk_window_set_cursor (widget->window, cursor);
|
||||
if (gtk_widget_get_window (widget))
|
||||
gdk_window_set_cursor (gtk_widget_get_window (widget), cursor);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1562,8 +1562,8 @@ gimp_dialog_factories_unset_busy_foreach (gconstpointer key,
|
|||
|
||||
if (GTK_IS_WIDGET (widget) && GTK_WIDGET_TOPLEVEL (widget))
|
||||
{
|
||||
if (widget->window)
|
||||
gdk_window_set_cursor (widget->window, NULL);
|
||||
if (gtk_widget_get_window (widget))
|
||||
gdk_window_set_cursor (gtk_widget_get_window (widget), NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -157,13 +157,15 @@ gimp_dnd_xds_save_image (GdkDragContext *context,
|
|||
uri, proc, GIMP_RUN_INTERACTIVE, FALSE,
|
||||
&error) == GIMP_PDB_SUCCESS)
|
||||
{
|
||||
gtk_selection_data_set (selection, selection->target, 8,
|
||||
(const guchar *) "S", 1);
|
||||
gtk_selection_data_set (selection,
|
||||
gtk_selection_data_get_target (selection),
|
||||
8, (const guchar *) "S", 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_selection_data_set (selection, selection->target, 8,
|
||||
(const guchar *) "E", 1);
|
||||
gtk_selection_data_set (selection,
|
||||
gtk_selection_data_get_target (selection),
|
||||
8, (const guchar *) "E", 1);
|
||||
|
||||
if (error)
|
||||
{
|
||||
|
@ -183,8 +185,9 @@ gimp_dnd_xds_save_image (GdkDragContext *context,
|
|||
}
|
||||
else
|
||||
{
|
||||
gtk_selection_data_set (selection, selection->target, 8,
|
||||
(const guchar *) "E", 1);
|
||||
gtk_selection_data_set (selection,
|
||||
gtk_selection_data_get_target (selection),
|
||||
8, (const guchar *) "E", 1);
|
||||
|
||||
gimp_message_literal (image->gimp, NULL, GIMP_MESSAGE_ERROR,
|
||||
_("The given filename does not have any known "
|
||||
|
|
|
@ -430,7 +430,7 @@ gimp_dockable_realize (GtkWidget *widget)
|
|||
GDK_BUTTON_MOTION_MASK |
|
||||
gtk_widget_get_events (widget));
|
||||
|
||||
dockable->title_window = gdk_window_new (widget->window,
|
||||
dockable->title_window = gdk_window_new (gtk_widget_get_window (widget),
|
||||
&attributes,
|
||||
(GDK_WA_X |
|
||||
GDK_WA_Y |
|
||||
|
@ -561,7 +561,7 @@ gimp_dockable_expose_event (GtkWidget *widget,
|
|||
|
||||
if (dockable->blink_counter & 1)
|
||||
{
|
||||
gtk_paint_box (style, widget->window,
|
||||
gtk_paint_box (style, gtk_widget_get_window (widget),
|
||||
GTK_STATE_SELECTED, GTK_SHADOW_NONE,
|
||||
&expose_area, widget, "",
|
||||
title_area.x, title_area.y,
|
||||
|
@ -589,7 +589,7 @@ gimp_dockable_expose_event (GtkWidget *widget,
|
|||
|
||||
text_y = title_area.y + (title_area.height - layout_height) / 2;
|
||||
|
||||
gtk_paint_layout (style, widget->window,
|
||||
gtk_paint_layout (style, gtk_widget_get_window (widget),
|
||||
(dockable->blink_counter & 1) ?
|
||||
GTK_STATE_SELECTED : widget->state, TRUE,
|
||||
&expose_area, widget, NULL,
|
||||
|
@ -1314,6 +1314,7 @@ gimp_dockable_title_changed (GimpDocked *docked,
|
|||
|
||||
gimp_dockable_get_title_area (dockable, &area);
|
||||
|
||||
gdk_window_invalidate_rect (GTK_WIDGET (dockable)->window, &area, FALSE);
|
||||
gdk_window_invalidate_rect (gtk_widget_get_window (GTK_WIDGET (dockable)),
|
||||
&area, FALSE);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -71,7 +71,7 @@ gimp_error_dialog_init (GimpErrorDialog *dialog)
|
|||
gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
|
||||
|
||||
dialog->vbox = gtk_vbox_new (FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
|
||||
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
|
||||
dialog->vbox, TRUE, TRUE, 0);
|
||||
gtk_widget_show (dialog->vbox);
|
||||
|
||||
|
|
|
@ -286,6 +286,7 @@ gimp_fg_bg_editor_expose (GtkWidget *widget,
|
|||
{
|
||||
GimpFgBgEditor *editor = GIMP_FG_BG_EDITOR (widget);
|
||||
GtkStyle *style = gtk_widget_get_style (widget);
|
||||
GdkWindow *window = gtk_widget_get_window (widget);
|
||||
gint width, height;
|
||||
gint default_w, default_h;
|
||||
gint swap_w, swap_h;
|
||||
|
@ -308,7 +309,7 @@ gimp_fg_bg_editor_expose (GtkWidget *widget,
|
|||
default_h = gdk_pixbuf_get_height (editor->default_icon);
|
||||
|
||||
if (default_w < width / 2 && default_h < height / 2)
|
||||
gdk_draw_pixbuf (widget->window, NULL, editor->default_icon,
|
||||
gdk_draw_pixbuf (window, NULL, editor->default_icon,
|
||||
0, 0, 0, height - default_h, default_w, default_h,
|
||||
GDK_RGB_DITHER_NORMAL, 0, 0);
|
||||
else
|
||||
|
@ -324,7 +325,7 @@ gimp_fg_bg_editor_expose (GtkWidget *widget,
|
|||
swap_h = gdk_pixbuf_get_height (editor->swap_icon);
|
||||
|
||||
if (swap_w < width / 2 && swap_h < height / 2)
|
||||
gdk_draw_pixbuf (widget->window, NULL, editor->swap_icon,
|
||||
gdk_draw_pixbuf (window, NULL, editor->swap_icon,
|
||||
0, 0, width - swap_w, 0, swap_w, swap_h,
|
||||
GDK_RGB_DITHER_NORMAL, 0, 0);
|
||||
else
|
||||
|
@ -347,7 +348,7 @@ gimp_fg_bg_editor_expose (GtkWidget *widget,
|
|||
{
|
||||
gimp_context_get_background (editor->context, &color);
|
||||
gimp_fg_bg_editor_draw_rect (editor,
|
||||
widget->window,
|
||||
window,
|
||||
style->fg_gc[0],
|
||||
(width - rect_w),
|
||||
(height - rect_h),
|
||||
|
@ -355,7 +356,7 @@ gimp_fg_bg_editor_expose (GtkWidget *widget,
|
|||
&color);
|
||||
}
|
||||
|
||||
gtk_paint_shadow (style, widget->window, GTK_STATE_NORMAL,
|
||||
gtk_paint_shadow (style, window, GTK_STATE_NORMAL,
|
||||
editor->active_color == GIMP_ACTIVE_COLOR_FOREGROUND ?
|
||||
GTK_SHADOW_OUT : GTK_SHADOW_IN,
|
||||
NULL, widget, NULL,
|
||||
|
@ -370,14 +371,14 @@ gimp_fg_bg_editor_expose (GtkWidget *widget,
|
|||
{
|
||||
gimp_context_get_foreground (editor->context, &color);
|
||||
gimp_fg_bg_editor_draw_rect (editor,
|
||||
widget->window,
|
||||
window,
|
||||
style->fg_gc[0],
|
||||
0, 0,
|
||||
rect_w, rect_h,
|
||||
&color);
|
||||
}
|
||||
|
||||
gtk_paint_shadow (style, widget->window, GTK_STATE_NORMAL,
|
||||
gtk_paint_shadow (style, window, GTK_STATE_NORMAL,
|
||||
editor->active_color == GIMP_ACTIVE_COLOR_BACKGROUND ?
|
||||
GTK_SHADOW_OUT : GTK_SHADOW_IN,
|
||||
NULL, widget, NULL,
|
||||
|
|
|
@ -205,8 +205,9 @@ static gboolean
|
|||
gimp_fg_bg_view_expose (GtkWidget *widget,
|
||||
GdkEventExpose *eevent)
|
||||
{
|
||||
GimpFgBgView *view = GIMP_FG_BG_VIEW (widget);
|
||||
GtkStyle *style = gtk_widget_get_style (widget);
|
||||
GimpFgBgView *view = GIMP_FG_BG_VIEW (widget);
|
||||
GtkStyle *style = gtk_widget_get_style (widget);
|
||||
GdkWindow *window = gtk_widget_get_window (widget);
|
||||
gint x, y;
|
||||
gint width, height;
|
||||
gint rect_w, rect_h;
|
||||
|
@ -228,8 +229,7 @@ gimp_fg_bg_view_expose (GtkWidget *widget,
|
|||
if (view->context)
|
||||
{
|
||||
gimp_context_get_background (view->context, &color);
|
||||
gimp_fg_bg_view_draw_rect (view,
|
||||
widget->window,
|
||||
gimp_fg_bg_view_draw_rect (view, window,
|
||||
style->fg_gc[0],
|
||||
x + width - rect_w + 1,
|
||||
y + height - rect_h + 1,
|
||||
|
@ -237,7 +237,7 @@ gimp_fg_bg_view_expose (GtkWidget *widget,
|
|||
&color);
|
||||
}
|
||||
|
||||
gtk_paint_shadow (style, widget->window, GTK_STATE_NORMAL,
|
||||
gtk_paint_shadow (style, window, GTK_STATE_NORMAL,
|
||||
GTK_SHADOW_IN,
|
||||
NULL, widget, NULL,
|
||||
x + width - rect_w, y + height - rect_h, rect_w, rect_h);
|
||||
|
@ -247,15 +247,14 @@ gimp_fg_bg_view_expose (GtkWidget *widget,
|
|||
if (view->context)
|
||||
{
|
||||
gimp_context_get_foreground (view->context, &color);
|
||||
gimp_fg_bg_view_draw_rect (view,
|
||||
widget->window,
|
||||
gimp_fg_bg_view_draw_rect (view, window,
|
||||
style->fg_gc[0],
|
||||
x + 1, y + 1,
|
||||
rect_w - 2, rect_h - 2,
|
||||
&color);
|
||||
}
|
||||
|
||||
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, rect_w, rect_h);
|
||||
|
|
|
@ -354,7 +354,7 @@ gimp_file_dialog_new (Gimp *gimp,
|
|||
|
||||
if (GIMP_GUI_CONFIG (gimp->config)->show_help_button && help_id)
|
||||
{
|
||||
GtkWidget *action_area = GTK_DIALOG (dialog)->action_area;
|
||||
GtkWidget *action_area = gtk_dialog_get_action_area (GTK_DIALOG (dialog));
|
||||
GtkWidget *button = gtk_button_new_from_stock (GTK_STOCK_HELP);
|
||||
|
||||
gtk_box_pack_end (GTK_BOX (action_area), button, FALSE, TRUE, 0);
|
||||
|
@ -384,8 +384,8 @@ gimp_file_dialog_new (Gimp *gimp,
|
|||
automatic_help_id);
|
||||
|
||||
dialog->progress = gimp_progress_box_new ();
|
||||
gtk_box_pack_end (GTK_BOX (GTK_DIALOG (dialog)->vbox), dialog->progress,
|
||||
FALSE, FALSE, 0);
|
||||
gtk_box_pack_end (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
|
||||
dialog->progress, FALSE, FALSE, 0);
|
||||
|
||||
return GTK_WIDGET (dialog);
|
||||
}
|
||||
|
@ -394,8 +394,9 @@ void
|
|||
gimp_file_dialog_set_sensitive (GimpFileDialog *dialog,
|
||||
gboolean sensitive)
|
||||
{
|
||||
GList *children;
|
||||
GList *list;
|
||||
GtkWidget *content_area;
|
||||
GList *children;
|
||||
GList *list;
|
||||
|
||||
g_return_if_fail (GIMP_IS_FILE_DIALOG (dialog));
|
||||
|
||||
|
@ -403,8 +404,9 @@ gimp_file_dialog_set_sensitive (GimpFileDialog *dialog,
|
|||
if (! dialog->progress)
|
||||
return;
|
||||
|
||||
children =
|
||||
gtk_container_get_children (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox));
|
||||
content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
|
||||
|
||||
children = gtk_container_get_children (GTK_CONTAINER (content_area));
|
||||
|
||||
for (list = children; list; list = g_list_next (list))
|
||||
{
|
||||
|
|
|
@ -77,6 +77,7 @@ gimp_font_select_constructor (GType type,
|
|||
{
|
||||
GObject *object;
|
||||
GimpPdbDialog *dialog;
|
||||
GtkWidget *content_area;
|
||||
|
||||
object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
|
||||
|
||||
|
@ -93,7 +94,9 @@ gimp_font_select_constructor (GType type,
|
|||
6 * (GIMP_VIEW_SIZE_MEDIUM + 2));
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (dialog->view), 12);
|
||||
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), dialog->view);
|
||||
|
||||
content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
|
||||
gtk_container_add (GTK_CONTAINER (content_area), dialog->view);
|
||||
gtk_widget_show (dialog->view);
|
||||
|
||||
return object;
|
||||
|
|
|
@ -777,7 +777,7 @@ gradient_editor_scrollbar_update (GtkAdjustment *adjustment,
|
|||
str2 = g_strdup_printf (_("Displaying [%0.4f, %0.4f]"),
|
||||
gtk_adjustment_get_value (adjustment),
|
||||
gtk_adjustment_get_value (adjustment) +
|
||||
adjustment->page_size);
|
||||
gtk_adjustment_get_page_size (adjustment));
|
||||
|
||||
gradient_editor_set_hint (editor, str1, str2, NULL, NULL);
|
||||
|
||||
|
@ -789,7 +789,7 @@ gradient_editor_scrollbar_update (GtkAdjustment *adjustment,
|
|||
gimp_view_renderer_gradient_set_offsets (renderer,
|
||||
gtk_adjustment_get_value (adjustment),
|
||||
gtk_adjustment_get_value (adjustment) +
|
||||
adjustment->page_size,
|
||||
gtk_adjustment_get_page_size (adjustment),
|
||||
editor->instant_update);
|
||||
gimp_gradient_editor_update (editor);
|
||||
}
|
||||
|
@ -1223,11 +1223,11 @@ control_expose (GtkWidget *widget,
|
|||
GimpGradientEditor *editor)
|
||||
{
|
||||
GtkAdjustment *adj = GTK_ADJUSTMENT (editor->scroll_data);
|
||||
cairo_t *cr = gdk_cairo_create (widget->window);
|
||||
cairo_t *cr = gdk_cairo_create (gtk_widget_get_window (widget));
|
||||
gint width;
|
||||
gint height;
|
||||
|
||||
gdk_drawable_get_size (widget->window, &width, &height);
|
||||
gdk_drawable_get_size (gtk_widget_get_window (widget), &width, &height);
|
||||
|
||||
control_draw (editor,
|
||||
GIMP_GRADIENT (GIMP_DATA_EDITOR (editor)->data),
|
||||
|
@ -1235,7 +1235,7 @@ control_expose (GtkWidget *widget,
|
|||
width, height,
|
||||
gtk_adjustment_get_value (adj),
|
||||
gtk_adjustment_get_value (adj) +
|
||||
adj->page_size);
|
||||
gtk_adjustment_get_page_size (adj));
|
||||
|
||||
cairo_destroy (cr);
|
||||
|
||||
|
@ -1894,7 +1894,8 @@ control_calc_p_pos (GimpGradientEditor *editor,
|
|||
* and the gradient control's handles.
|
||||
*/
|
||||
|
||||
return RINT ((pwidth - 1) * (pos - adjustment->value) / adjustment->page_size);
|
||||
return RINT ((pwidth - 1) * (pos - gtk_adjustment_get_value (adjustment)) /
|
||||
gtk_adjustment_get_page_size (adjustment));
|
||||
}
|
||||
|
||||
static gdouble
|
||||
|
@ -1906,7 +1907,8 @@ control_calc_g_pos (GimpGradientEditor *editor,
|
|||
|
||||
/* Calculate the gradient position that corresponds to widget's coordinates */
|
||||
|
||||
return adjustment->page_size * pos / (pwidth - 1) + adjustment->value;
|
||||
return (gtk_adjustment_get_page_size (adjustment) * pos / (pwidth - 1) +
|
||||
gtk_adjustment_get_value (adjustment));
|
||||
}
|
||||
|
||||
/***** Segment functions *****/
|
||||
|
|
|
@ -95,6 +95,7 @@ gimp_gradient_select_constructor (GType type,
|
|||
{
|
||||
GObject *object;
|
||||
GimpPdbDialog *dialog;
|
||||
GtkWidget *content_area;
|
||||
|
||||
object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
|
||||
|
||||
|
@ -114,7 +115,9 @@ gimp_gradient_select_constructor (GType type,
|
|||
6 * (GIMP_VIEW_SIZE_MEDIUM + 2));
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (dialog->view), 12);
|
||||
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), dialog->view);
|
||||
|
||||
content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
|
||||
gtk_container_add (GTK_CONTAINER (content_area), dialog->view);
|
||||
gtk_widget_show (dialog->view);
|
||||
|
||||
return object;
|
||||
|
|
|
@ -161,7 +161,7 @@ gimp_handle_bar_expose (GtkWidget *widget,
|
|||
y += widget->allocation.y;
|
||||
}
|
||||
|
||||
cr = gdk_cairo_create (widget->window);
|
||||
cr = gdk_cairo_create (gtk_widget_get_window (widget));
|
||||
|
||||
gdk_cairo_region (cr, eevent->region);
|
||||
cairo_clip (cr);
|
||||
|
@ -176,7 +176,7 @@ gimp_handle_bar_expose (GtkWidget *widget,
|
|||
if (bar->slider_adj[i])
|
||||
{
|
||||
bar->slider_pos[i] = ROUND ((gdouble) width *
|
||||
(bar->slider_adj[i]->value - bar->lower) /
|
||||
(gtk_adjustment_get_value (bar->slider_adj[i]) - bar->lower) /
|
||||
(bar->upper - bar->lower + 1));
|
||||
|
||||
cairo_set_source_rgb (cr, 0.5 * i, 0.5 * i, 0.5 * i);
|
||||
|
@ -325,14 +325,14 @@ gimp_handle_bar_set_adjustment (GimpHandleBar *bar,
|
|||
}
|
||||
|
||||
if (bar->slider_adj[0])
|
||||
bar->lower = bar->slider_adj[0]->lower;
|
||||
bar->lower = gtk_adjustment_get_lower (bar->slider_adj[0]);
|
||||
else
|
||||
bar->lower = bar->slider_adj[handle_no]->lower;
|
||||
bar->lower = gtk_adjustment_get_lower (bar->slider_adj[handle_no]);
|
||||
|
||||
if (bar->slider_adj[2])
|
||||
bar->upper = bar->slider_adj[2]->upper;
|
||||
bar->upper = gtk_adjustment_get_upper (bar->slider_adj[2]);
|
||||
else
|
||||
bar->upper = bar->slider_adj[handle_no]->upper;
|
||||
bar->upper = gtk_adjustment_get_upper (bar->slider_adj[handle_no]);
|
||||
|
||||
gimp_handle_bar_adjustment_changed (bar->slider_adj[handle_no], bar);
|
||||
}
|
||||
|
|
|
@ -196,8 +196,7 @@ gimp_histogram_box_low_adj_update (GtkAdjustment *adjustment,
|
|||
|
||||
if (box->view->start != value)
|
||||
{
|
||||
box->high_adj->lower = value;
|
||||
gtk_adjustment_changed (box->high_adj);
|
||||
gtk_adjustment_set_lower (box->high_adj, value);
|
||||
|
||||
gimp_histogram_view_set_range (box->view, value, box->view->end);
|
||||
}
|
||||
|
@ -211,8 +210,7 @@ gimp_histogram_box_high_adj_update (GtkAdjustment *adjustment,
|
|||
|
||||
if (box->view->end != value)
|
||||
{
|
||||
box->low_adj->upper = value;
|
||||
gtk_adjustment_changed (box->low_adj);
|
||||
gtk_adjustment_set_upper (box->low_adj, value);
|
||||
|
||||
gimp_histogram_view_set_range (box->view, box->view->start, value);
|
||||
}
|
||||
|
@ -224,10 +222,8 @@ gimp_histogram_box_histogram_range (GimpHistogramView *view,
|
|||
gint end,
|
||||
GimpHistogramBox *box)
|
||||
{
|
||||
box->high_adj->lower = start;
|
||||
box->low_adj->upper = end;
|
||||
gtk_adjustment_changed (box->high_adj);
|
||||
gtk_adjustment_changed (box->low_adj);
|
||||
gtk_adjustment_set_lower (box->high_adj, start);
|
||||
gtk_adjustment_set_upper (box->low_adj, end);
|
||||
|
||||
gtk_adjustment_set_value (box->low_adj, start);
|
||||
gtk_adjustment_set_value (box->high_adj, end);
|
||||
|
|
|
@ -278,8 +278,9 @@ static gboolean
|
|||
gimp_histogram_view_expose (GtkWidget *widget,
|
||||
GdkEventExpose *event)
|
||||
{
|
||||
GimpHistogramView *view = GIMP_HISTOGRAM_VIEW (widget);
|
||||
GtkStyle *style = gtk_widget_get_style (widget);
|
||||
GimpHistogramView *view = GIMP_HISTOGRAM_VIEW (widget);
|
||||
GtkStyle *style = gtk_widget_get_style (widget);
|
||||
GdkWindow *window = gtk_widget_get_window (widget);
|
||||
gint x;
|
||||
gint x1, x2;
|
||||
gint border;
|
||||
|
@ -303,14 +304,14 @@ gimp_histogram_view_expose (GtkWidget *widget,
|
|||
x1 = CLAMP (MIN (view->start, view->end), 0, 255);
|
||||
x2 = CLAMP (MAX (view->start, view->end), 0, 255);
|
||||
|
||||
gdk_draw_rectangle (widget->window,
|
||||
gdk_draw_rectangle (window,
|
||||
style->base_gc[GTK_STATE_NORMAL], TRUE,
|
||||
0, 0,
|
||||
widget->allocation.width,
|
||||
widget->allocation.height);
|
||||
|
||||
/* Draw the outer border */
|
||||
gdk_draw_rectangle (widget->window,
|
||||
gdk_draw_rectangle (window,
|
||||
style->dark_gc[GTK_STATE_NORMAL], FALSE,
|
||||
border, border,
|
||||
width - 1, height - 1);
|
||||
|
@ -338,7 +339,7 @@ gimp_histogram_view_expose (GtkWidget *widget,
|
|||
|
||||
for (x = 0; x < 3; x++)
|
||||
{
|
||||
rgb_gc[x] = gdk_gc_new_with_values (widget->window,
|
||||
rgb_gc[x] = gdk_gc_new_with_values (window,
|
||||
&values, GDK_GC_FUNCTION);
|
||||
|
||||
color.red = (x == 0 ? 0xFFFF : 0x0);
|
||||
|
@ -368,7 +369,7 @@ gimp_histogram_view_expose (GtkWidget *widget,
|
|||
|
||||
if (view->subdivisions > 1 && x >= (xstop * width / view->subdivisions))
|
||||
{
|
||||
gdk_draw_line (widget->window,
|
||||
gdk_draw_line (window,
|
||||
style->dark_gc[GTK_STATE_NORMAL],
|
||||
x + border, border,
|
||||
x + border, border + height - 1);
|
||||
|
@ -376,7 +377,7 @@ gimp_histogram_view_expose (GtkWidget *widget,
|
|||
}
|
||||
else if (in_selection)
|
||||
{
|
||||
gdk_draw_line (widget->window,
|
||||
gdk_draw_line (window,
|
||||
style->base_gc[GTK_STATE_SELECTED],
|
||||
x + border, border,
|
||||
x + border, border + height - 1);
|
||||
|
@ -434,10 +435,11 @@ gimp_histogram_view_draw_spike (GimpHistogramView *view,
|
|||
gint height,
|
||||
gint border)
|
||||
{
|
||||
gdouble value = 0.0;
|
||||
gdouble bg_value = 0.0;
|
||||
gint y;
|
||||
gint bg_y;
|
||||
GdkWindow *window = gtk_widget_get_window (GTK_WIDGET (view));
|
||||
gdouble value = 0.0;
|
||||
gdouble bg_value = 0.0;
|
||||
gint y;
|
||||
gint bg_y;
|
||||
|
||||
if (view->histogram)
|
||||
{
|
||||
|
@ -485,11 +487,11 @@ gimp_histogram_view_draw_spike (GimpHistogramView *view,
|
|||
}
|
||||
|
||||
if (bg_gc)
|
||||
gdk_draw_line (GTK_WIDGET (view)->window, bg_gc,
|
||||
gdk_draw_line (window, bg_gc,
|
||||
x + border, height + border - 1,
|
||||
x + border, height + border - bg_y - 1);
|
||||
|
||||
gdk_draw_line (GTK_WIDGET (view)->window, gc,
|
||||
gdk_draw_line (window, gc,
|
||||
x + border, height + border - 1,
|
||||
x + border, height + border - y - 1);
|
||||
}
|
||||
|
@ -504,7 +506,7 @@ gimp_histogram_view_button_press (GtkWidget *widget,
|
|||
{
|
||||
gint width;
|
||||
|
||||
gdk_pointer_grab (widget->window, FALSE,
|
||||
gdk_pointer_grab (gtk_widget_get_window (widget), FALSE,
|
||||
GDK_BUTTON_RELEASE_MASK | GDK_BUTTON1_MOTION_MASK,
|
||||
NULL, NULL, bevent->time);
|
||||
|
||||
|
|
|
@ -99,7 +99,7 @@ gimp_message_dialog_new (const gchar *title,
|
|||
"stock-id", stock_id,
|
||||
NULL);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
|
||||
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
|
||||
GTK_WIDGET (dialog->box), FALSE, FALSE, 0);
|
||||
gtk_widget_show (GTK_WIDGET (dialog->box));
|
||||
|
||||
|
|
|
@ -194,7 +194,7 @@ gimp_navigation_view_expose (GtkWidget *widget,
|
|||
|
||||
GTK_WIDGET_CLASS (parent_class)->expose_event (widget, event);
|
||||
|
||||
cr = gdk_cairo_create (widget->window);
|
||||
cr = gdk_cairo_create (gtk_widget_get_window (widget));
|
||||
|
||||
gdk_cairo_region (cr, event->region);
|
||||
cairo_clip (cr);
|
||||
|
|
|
@ -76,6 +76,7 @@ gimp_palette_select_constructor (GType type,
|
|||
{
|
||||
GObject *object;
|
||||
GimpPdbDialog *dialog;
|
||||
GtkWidget *content_area;
|
||||
|
||||
object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
|
||||
|
||||
|
@ -95,7 +96,9 @@ gimp_palette_select_constructor (GType type,
|
|||
8 * (GIMP_VIEW_SIZE_MEDIUM + 2));
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (dialog->view), 12);
|
||||
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), dialog->view);
|
||||
|
||||
content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
|
||||
gtk_container_add (GTK_CONTAINER (content_area), dialog->view);
|
||||
gtk_widget_show (dialog->view);
|
||||
|
||||
return object;
|
||||
|
|
|
@ -182,7 +182,7 @@ gimp_palette_view_expose (GtkWidget *widget,
|
|||
row = pal_view->selected->position / renderer->columns;
|
||||
col = pal_view->selected->position % renderer->columns;
|
||||
|
||||
cr = gdk_cairo_create (widget->window);
|
||||
cr = gdk_cairo_create (gtk_widget_get_window (widget));
|
||||
gdk_cairo_region (cr, eevent->region);
|
||||
cairo_clip (cr);
|
||||
|
||||
|
|
|
@ -78,6 +78,7 @@ gimp_pattern_select_constructor (GType type,
|
|||
{
|
||||
GObject *object;
|
||||
GimpPdbDialog *dialog;
|
||||
GtkWidget *content_area;
|
||||
|
||||
object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
|
||||
|
||||
|
@ -95,7 +96,9 @@ gimp_pattern_select_constructor (GType type,
|
|||
6 * (GIMP_VIEW_SIZE_MEDIUM + 2));
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (dialog->view), 12);
|
||||
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), dialog->view);
|
||||
|
||||
content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
|
||||
gtk_container_add (GTK_CONTAINER (content_area), dialog->view);
|
||||
gtk_widget_show (dialog->view);
|
||||
|
||||
return object;
|
||||
|
|
|
@ -131,7 +131,8 @@ gimp_progress_box_progress_start (GimpProgress *progress,
|
|||
box->value = 0.0;
|
||||
|
||||
if (GTK_WIDGET_DRAWABLE (box->progress))
|
||||
gdk_window_process_updates (box->progress->window, TRUE);
|
||||
gdk_window_process_updates (gtk_widget_get_window (box->progress),
|
||||
TRUE);
|
||||
|
||||
return progress;
|
||||
}
|
||||
|
@ -175,7 +176,8 @@ gimp_progress_box_progress_set_text (GimpProgress *progress,
|
|||
gtk_label_set_text (GTK_LABEL (box->label), message);
|
||||
|
||||
if (GTK_WIDGET_DRAWABLE (box->progress))
|
||||
gdk_window_process_updates (box->progress->window, TRUE);
|
||||
gdk_window_process_updates (gtk_widget_get_window (box->progress),
|
||||
TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -197,7 +199,8 @@ gimp_progress_box_progress_set_value (GimpProgress *progress,
|
|||
gtk_progress_bar_set_fraction (bar, box->value);
|
||||
|
||||
if (GTK_WIDGET_DRAWABLE (box->progress))
|
||||
gdk_window_process_updates (box->progress->window, TRUE);
|
||||
gdk_window_process_updates (gtk_widget_get_window (box->progress),
|
||||
TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -224,7 +227,8 @@ gimp_progress_box_progress_pulse (GimpProgress *progress)
|
|||
gtk_progress_bar_pulse (bar);
|
||||
|
||||
if (GTK_WIDGET_DRAWABLE (box->progress))
|
||||
gdk_window_process_updates (box->progress->window, TRUE);
|
||||
gdk_window_process_updates (gtk_widget_get_window (box->progress),
|
||||
TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -75,9 +75,11 @@ gimp_progress_dialog_class_init (GimpProgressDialogClass *klass)
|
|||
static void
|
||||
gimp_progress_dialog_init (GimpProgressDialog *dialog)
|
||||
{
|
||||
GtkWidget *content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
|
||||
|
||||
dialog->box = gimp_progress_box_new ();
|
||||
gtk_container_set_border_width (GTK_CONTAINER (dialog->box), 12);
|
||||
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), dialog->box);
|
||||
gtk_container_add (GTK_CONTAINER (content_area), dialog->box);
|
||||
gtk_widget_show (dialog->box);
|
||||
|
||||
g_signal_connect (dialog->box, "destroy",
|
||||
|
|
|
@ -96,8 +96,8 @@ gimp_scale_button_update_tooltip (GimpScaleButton *button)
|
|||
adj = gimp_gtk_scale_button_get_adjustment (GTK_SCALE_BUTTON (button));
|
||||
|
||||
value = gtk_adjustment_get_value (adj);
|
||||
lower = adj->lower;
|
||||
upper = adj->upper;
|
||||
lower = gtk_adjustment_get_lower (adj);
|
||||
upper = gtk_adjustment_get_upper (adj);
|
||||
|
||||
/* use U+2009 THIN SPACE to seperate the percent sign from the number */
|
||||
|
||||
|
@ -128,10 +128,12 @@ gimp_scale_button_image_expose (GtkWidget *widget,
|
|||
if (steps < 1)
|
||||
return TRUE;
|
||||
|
||||
value = 0.5 + ((adj->value - adj->lower) * (gdouble) steps /
|
||||
(adj->upper - adj->lower));
|
||||
value = 0.5 + ((gtk_adjustment_get_value (adj) -
|
||||
gtk_adjustment_get_lower (adj)) * (gdouble) steps /
|
||||
(gtk_adjustment_get_upper (adj) -
|
||||
gtk_adjustment_get_lower (adj)));
|
||||
|
||||
cr = gdk_cairo_create (widget->window);
|
||||
cr = gdk_cairo_create (gtk_widget_get_window (widget));
|
||||
|
||||
gdk_cairo_rectangle (cr, &event->area);
|
||||
cairo_clip (cr);
|
||||
|
|
|
@ -92,7 +92,8 @@ gimp_selection_data_set_uri_list (GtkSelectionData *selection,
|
|||
}
|
||||
}
|
||||
|
||||
gtk_selection_data_set (selection, selection->target,
|
||||
gtk_selection_data_set (selection,
|
||||
gtk_selection_data_get_target (selection),
|
||||
8, (guchar *) vals, strlen (vals));
|
||||
|
||||
g_free (vals);
|
||||
|
@ -104,24 +105,28 @@ gimp_selection_data_get_uri_list (GtkSelectionData *selection)
|
|||
GList *crap_list = NULL;
|
||||
GList *uri_list = NULL;
|
||||
GList *list;
|
||||
gint length;
|
||||
const gchar *data;
|
||||
const gchar *buffer;
|
||||
|
||||
g_return_val_if_fail (selection != NULL, NULL);
|
||||
|
||||
if ((selection->format != 8) || (selection->length < 1))
|
||||
length = gtk_selection_data_get_length (selection);
|
||||
|
||||
if (gtk_selection_data_get_format (selection) != 8 || length < 1)
|
||||
{
|
||||
g_warning ("Received invalid file data!");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
buffer = (const gchar *) selection->data;
|
||||
data = buffer = (const gchar *) gtk_selection_data_get_data (selection);
|
||||
|
||||
GIMP_LOG (DND, "raw buffer >>%s<<", buffer);
|
||||
|
||||
{
|
||||
gchar name_buffer[1024];
|
||||
|
||||
while (*buffer && (buffer - (gchar *) selection->data < selection->length))
|
||||
while (*buffer && (buffer - data < length))
|
||||
{
|
||||
gchar *name = name_buffer;
|
||||
gint len = 0;
|
||||
|
@ -288,7 +293,8 @@ gimp_selection_data_set_color (GtkSelectionData *selection,
|
|||
vals[2] = b + (b << 8);
|
||||
vals[3] = a + (a << 8);
|
||||
|
||||
gtk_selection_data_set (selection, selection->target,
|
||||
gtk_selection_data_set (selection,
|
||||
gtk_selection_data_get_target (selection),
|
||||
16, (const guchar *) vals, 8);
|
||||
}
|
||||
|
||||
|
@ -296,18 +302,19 @@ gboolean
|
|||
gimp_selection_data_get_color (GtkSelectionData *selection,
|
||||
GimpRGB *color)
|
||||
{
|
||||
guint16 *color_vals;
|
||||
const guint16 *color_vals;
|
||||
|
||||
g_return_val_if_fail (selection != NULL, FALSE);
|
||||
g_return_val_if_fail (color != NULL, FALSE);
|
||||
|
||||
if ((selection->format != 16) || (selection->length != 8))
|
||||
if (gtk_selection_data_get_format (selection) != 16 ||
|
||||
gtk_selection_data_get_length (selection) != 8)
|
||||
{
|
||||
g_warning ("Received invalid color data!");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
color_vals = (guint16 *) selection->data;
|
||||
color_vals = (const guint16 *) gtk_selection_data_get_data (selection);
|
||||
|
||||
gimp_rgba_set_uchar (color,
|
||||
(guchar) (color_vals[0] >> 8),
|
||||
|
@ -327,7 +334,8 @@ gimp_selection_data_set_stream (GtkSelectionData *selection,
|
|||
g_return_if_fail (stream != NULL);
|
||||
g_return_if_fail (stream_length > 0);
|
||||
|
||||
gtk_selection_data_set (selection, selection->target,
|
||||
gtk_selection_data_set (selection,
|
||||
gtk_selection_data_get_target (selection),
|
||||
8, (guchar *) stream, stream_length);
|
||||
}
|
||||
|
||||
|
@ -335,18 +343,22 @@ const guchar *
|
|||
gimp_selection_data_get_stream (GtkSelectionData *selection,
|
||||
gsize *stream_length)
|
||||
{
|
||||
gint length;
|
||||
|
||||
g_return_val_if_fail (selection != NULL, NULL);
|
||||
g_return_val_if_fail (stream_length != NULL, NULL);
|
||||
|
||||
if ((selection->format != 8) || (selection->length < 1))
|
||||
length = gtk_selection_data_get_length (selection);
|
||||
|
||||
if (gtk_selection_data_get_format (selection) != 8 || length < 1)
|
||||
{
|
||||
g_warning ("Received invalid data stream!");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
*stream_length = selection->length;
|
||||
*stream_length = length;
|
||||
|
||||
return (const guchar *) selection->data;
|
||||
return (const guchar *) gtk_selection_data_get_data (selection);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -360,7 +372,8 @@ gimp_selection_data_set_image (GtkSelectionData *selection,
|
|||
|
||||
str = g_strdup_printf ("%d:%d", get_pid (), gimp_image_get_ID (image));
|
||||
|
||||
gtk_selection_data_set (selection, selection->target,
|
||||
gtk_selection_data_set (selection,
|
||||
gtk_selection_data_get_target (selection),
|
||||
8, (guchar *) str, strlen (str));
|
||||
|
||||
g_free (str);
|
||||
|
@ -405,7 +418,8 @@ gimp_selection_data_set_component (GtkSelectionData *selection,
|
|||
str = g_strdup_printf ("%d:%d:%d", get_pid (), gimp_image_get_ID (image),
|
||||
(gint) channel);
|
||||
|
||||
gtk_selection_data_set (selection, selection->target,
|
||||
gtk_selection_data_set (selection,
|
||||
gtk_selection_data_get_target (selection),
|
||||
8, (guchar *) str, strlen (str));
|
||||
|
||||
g_free (str);
|
||||
|
@ -458,7 +472,8 @@ gimp_selection_data_set_item (GtkSelectionData *selection,
|
|||
|
||||
str = g_strdup_printf ("%d:%d", get_pid (), gimp_item_get_ID (item));
|
||||
|
||||
gtk_selection_data_set (selection, selection->target,
|
||||
gtk_selection_data_set (selection,
|
||||
gtk_selection_data_get_target (selection),
|
||||
8, (guchar *) str, strlen (str));
|
||||
|
||||
g_free (str);
|
||||
|
@ -507,7 +522,8 @@ gimp_selection_data_set_object (GtkSelectionData *selection,
|
|||
|
||||
str = g_strdup_printf ("%d:%p:%s", get_pid (), object, name);
|
||||
|
||||
gtk_selection_data_set (selection, selection->target,
|
||||
gtk_selection_data_set (selection,
|
||||
gtk_selection_data_get_target (selection),
|
||||
8, (guchar *) str, strlen (str));
|
||||
|
||||
g_free (str);
|
||||
|
@ -638,13 +654,14 @@ gimp_selection_data_get_name (GtkSelectionData *selection,
|
|||
{
|
||||
const gchar *name;
|
||||
|
||||
if ((selection->format != 8) || (selection->length < 1))
|
||||
if (gtk_selection_data_get_format (selection) != 8 ||
|
||||
gtk_selection_data_get_length (selection) < 1)
|
||||
{
|
||||
g_warning ("%s: received invalid selection data", strfunc);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
name = (const gchar *) selection->data;
|
||||
name = (const gchar *) gtk_selection_data_get_data (selection);
|
||||
|
||||
if (! g_utf8_validate (name, -1, NULL))
|
||||
{
|
||||
|
|
|
@ -471,14 +471,18 @@ gimp_session_info_set_geometry (GimpSessionInfo *info)
|
|||
void
|
||||
gimp_session_info_get_geometry (GimpSessionInfo *info)
|
||||
{
|
||||
GdkWindow *window;
|
||||
|
||||
g_return_if_fail (GIMP_IS_SESSION_INFO (info));
|
||||
g_return_if_fail (GTK_IS_WINDOW (info->widget));
|
||||
|
||||
if (info->widget->window)
|
||||
window = gtk_widget_get_window (info->widget);
|
||||
|
||||
if (window)
|
||||
{
|
||||
gint x, y;
|
||||
|
||||
gdk_window_get_root_origin (info->widget->window, &x, &y);
|
||||
gdk_window_get_root_origin (window, &x, &y);
|
||||
|
||||
/* Don't write negative values to the sessionrc, they are
|
||||
* interpreted as relative to the right, respective bottom edge
|
||||
|
@ -489,7 +493,7 @@ gimp_session_info_get_geometry (GimpSessionInfo *info)
|
|||
|
||||
if (! info->toplevel_entry || info->toplevel_entry->remember_size)
|
||||
{
|
||||
gdk_drawable_get_size (GDK_DRAWABLE (info->widget->window),
|
||||
gdk_drawable_get_size (GDK_DRAWABLE (window),
|
||||
&info->width, &info->height);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -616,6 +616,7 @@ gimp_settings_box_manage_activate (GtkWidget *widget,
|
|||
{
|
||||
GtkWidget *toplevel;
|
||||
GtkWidget *editor;
|
||||
GtkWidget *content_area;
|
||||
|
||||
if (box->editor_dialog)
|
||||
{
|
||||
|
@ -647,8 +648,9 @@ gimp_settings_box_manage_activate (GtkWidget *widget,
|
|||
box->config,
|
||||
box->container);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (editor), 12);
|
||||
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (box->editor_dialog)->vbox),
|
||||
editor);
|
||||
|
||||
content_area = gtk_dialog_get_content_area (GTK_DIALOG (box->editor_dialog));
|
||||
gtk_container_add (GTK_CONTAINER (content_area), editor);
|
||||
gtk_widget_show (editor);
|
||||
|
||||
gtk_widget_show (box->editor_dialog);
|
||||
|
|
|
@ -341,7 +341,7 @@ gimp_stroke_editor_paint_button (GtkWidget *widget,
|
|||
GtkAllocation *alloc = &widget->allocation;
|
||||
gint w = MIN (alloc->width, alloc->height) * 2 / 3;
|
||||
|
||||
gtk_paint_arrow (style, widget->window,
|
||||
gtk_paint_arrow (style, gtk_widget_get_window (widget),
|
||||
widget->state, GTK_SHADOW_IN,
|
||||
&event->area, widget, NULL,
|
||||
data ? GTK_ARROW_LEFT : GTK_ARROW_RIGHT, TRUE,
|
||||
|
|
|
@ -132,6 +132,7 @@ gimp_text_editor_new (const gchar *title,
|
|||
GtkTextBuffer *text_buffer)
|
||||
{
|
||||
GimpTextEditor *editor;
|
||||
GtkWidget *content_area;
|
||||
GtkWidget *toolbar;
|
||||
GtkWidget *scrolled_window;
|
||||
|
||||
|
@ -162,13 +163,14 @@ gimp_text_editor_new (const gchar *title,
|
|||
"<TextEditor>",
|
||||
editor, FALSE);
|
||||
|
||||
content_area = gtk_dialog_get_content_area (GTK_DIALOG (editor));
|
||||
|
||||
toolbar = gtk_ui_manager_get_widget (GTK_UI_MANAGER (editor->ui_manager),
|
||||
"/text-editor-toolbar");
|
||||
|
||||
if (toolbar)
|
||||
{
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (editor)->vbox), toolbar,
|
||||
FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (content_area), toolbar, FALSE, FALSE, 0);
|
||||
gtk_widget_show (toolbar);
|
||||
|
||||
/* language entry, disabled until it works */
|
||||
|
@ -205,8 +207,7 @@ gimp_text_editor_new (const gchar *title,
|
|||
GTK_POLICY_AUTOMATIC,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (scrolled_window), 2);
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (editor)->vbox),
|
||||
scrolled_window, TRUE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (content_area), scrolled_window, TRUE, TRUE, 0);
|
||||
gtk_widget_show (scrolled_window);
|
||||
|
||||
editor->view = gtk_text_view_new_with_buffer (text_buffer);
|
||||
|
@ -229,8 +230,8 @@ gimp_text_editor_new (const gchar *title,
|
|||
|
||||
editor->font_toggle =
|
||||
gtk_check_button_new_with_mnemonic (_("_Use selected font"));
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (editor)->vbox),
|
||||
editor->font_toggle, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (content_area), editor->font_toggle,
|
||||
FALSE, FALSE, 0);
|
||||
gtk_widget_show (editor->font_toggle);
|
||||
|
||||
g_signal_connect (editor->font_toggle, "toggled",
|
||||
|
|
|
@ -519,7 +519,7 @@ gimp_toolbox_expose_event (GtkWidget *widget,
|
|||
gdouble wilber_height;
|
||||
gdouble factor;
|
||||
|
||||
cr = gdk_cairo_create (widget->window);
|
||||
cr = gdk_cairo_create (gtk_widget_get_window (widget));
|
||||
gdk_cairo_rectangle (cr, &clip_rect);
|
||||
cairo_clip (cr);
|
||||
|
||||
|
|
|
@ -947,7 +947,7 @@ gimp_ui_manager_item_key_press (GtkWidget *widget,
|
|||
|
||||
if (! menu_item && GTK_IS_MENU (widget))
|
||||
{
|
||||
GdkWindow *window = GTK_MENU (widget)->toplevel->window;
|
||||
GdkWindow *window = gtk_widget_get_window (GTK_MENU (widget)->toplevel);
|
||||
gint x, y;
|
||||
|
||||
gdk_window_get_pointer (window, &x, &y, NULL);
|
||||
|
@ -1144,7 +1144,7 @@ window_to_alloc (GtkWidget *dest_widget,
|
|||
if (!GTK_WIDGET_NO_WINDOW (dest_widget) && dest_widget->parent)
|
||||
{
|
||||
gint wx, wy;
|
||||
gdk_window_get_position (dest_widget->window, &wx, &wy);
|
||||
gdk_window_get_position (gtk_widget_get_window (dest_widget), &wx, &wy);
|
||||
|
||||
/* Offset coordinates if widget->window is smaller than
|
||||
* widget->allocation.
|
||||
|
@ -1191,7 +1191,7 @@ find_widget_under_pointer (GdkWindow *window,
|
|||
* coordinates stay relative to the current window.
|
||||
* We end up with window == widget->window, coordinates relative to that.
|
||||
*/
|
||||
while (window && window != event_widget->window)
|
||||
while (window && window != gtk_widget_get_window (event_widget))
|
||||
{
|
||||
gint px, py;
|
||||
|
||||
|
|
|
@ -228,7 +228,7 @@ gimp_view_popup_timeout (GimpViewPopup *popup)
|
|||
gtk_container_add (GTK_CONTAINER (frame), view);
|
||||
gtk_widget_show (view);
|
||||
|
||||
gdk_window_get_origin (popup->widget->window, &x, &y);
|
||||
gdk_window_get_origin (gtk_widget_get_window (popup->widget), &x, &y);
|
||||
|
||||
x += popup->button_x - (popup->popup_width >> 1);
|
||||
y += popup->button_y - (popup->popup_height >> 1);
|
||||
|
|
|
@ -218,7 +218,7 @@ gimp_view_realize (GtkWidget *widget)
|
|||
|
||||
attributes_mask = GDK_WA_X | GDK_WA_Y;
|
||||
|
||||
view->event_window = gdk_window_new (widget->window,
|
||||
view->event_window = gdk_window_new (gtk_widget_get_window (widget),
|
||||
&attributes, attributes_mask);
|
||||
gdk_window_set_user_data (view->event_window, view);
|
||||
}
|
||||
|
@ -386,7 +386,7 @@ gimp_view_expose_event (GtkWidget *widget,
|
|||
if (GTK_WIDGET_DRAWABLE (widget))
|
||||
{
|
||||
gimp_view_renderer_draw (GIMP_VIEW (widget)->renderer,
|
||||
widget->window, widget,
|
||||
gtk_widget_get_window (widget), widget,
|
||||
&widget->allocation,
|
||||
&event->area);
|
||||
}
|
||||
|
|
|
@ -109,14 +109,14 @@ gimp_viewable_dialog_class_init (GimpViewableDialogClass *klass)
|
|||
static void
|
||||
gimp_viewable_dialog_init (GimpViewableDialog *dialog)
|
||||
{
|
||||
GtkWidget *content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
|
||||
GtkWidget *frame;
|
||||
GtkWidget *hbox;
|
||||
GtkWidget *vbox;
|
||||
|
||||
frame = gtk_frame_new (NULL);
|
||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_OUT);
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), frame,
|
||||
FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (content_area), frame, FALSE, FALSE, 0);
|
||||
gtk_widget_show (frame);
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 6);
|
||||
|
|
|
@ -162,7 +162,7 @@ gimp_button_menu_position (GtkWidget *button,
|
|||
}
|
||||
}
|
||||
|
||||
gdk_window_get_origin (button->window, x, y);
|
||||
gdk_window_get_origin (gtk_widget_get_window (button), x, y);
|
||||
|
||||
gtk_widget_size_request (GTK_WIDGET (menu), &menu_requisition);
|
||||
|
||||
|
@ -823,15 +823,15 @@ gimp_window_get_native (GtkWindow *window)
|
|||
|
||||
#ifdef GDK_WINDOWING_WIN32
|
||||
if (window && GTK_WIDGET_REALIZED (window))
|
||||
return (GdkNativeWindow)GDK_WINDOW_HWND (GTK_WIDGET (window)->window);
|
||||
return (GdkNativeWindow) GDK_WINDOW_HWND (gtk_widget_get_window (GTK_WIDGET (window)));
|
||||
#endif
|
||||
|
||||
#ifdef GDK_WINDOWING_X11
|
||||
if (window && GTK_WIDGET_REALIZED (window))
|
||||
return GDK_WINDOW_XID (GTK_WIDGET (window)->window);
|
||||
return GDK_WINDOW_XID (gtk_widget_get_window (GTK_WIDGET (window)));
|
||||
#endif
|
||||
|
||||
return (GdkNativeWindow)0;
|
||||
return (GdkNativeWindow) 0;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -839,7 +839,7 @@ gimp_window_transient_realized (GtkWidget *window,
|
|||
GdkWindow *parent)
|
||||
{
|
||||
if (GTK_WIDGET_REALIZED (window))
|
||||
gdk_window_set_transient_for (window->window, parent);
|
||||
gdk_window_set_transient_for (gtk_widget_get_window (window), parent);
|
||||
}
|
||||
|
||||
/* similar to what we have in libgimp/gimpui.c */
|
||||
|
@ -864,7 +864,8 @@ gimp_window_set_transient_for (GtkWindow *window,
|
|||
return;
|
||||
|
||||
if (GTK_WIDGET_REALIZED (window))
|
||||
gdk_window_set_transient_for (GTK_WIDGET (window)->window, parent);
|
||||
gdk_window_set_transient_for (gtk_widget_get_window (GTK_WIDGET (window)),
|
||||
parent);
|
||||
|
||||
g_signal_connect_object (window, "realize",
|
||||
G_CALLBACK (gimp_window_transient_realized),
|
||||
|
|
Loading…
Reference in New Issue