Remove GTK+ deprecated symbols

https://bugzilla.gnome.org/show_bug.cgi?id=572325
This commit is contained in:
Javier Jardón 2010-04-13 19:34:04 +02:00
parent 6012559536
commit 825434bbcd
7 changed files with 26 additions and 18 deletions

View file

@ -118,7 +118,7 @@ static void
hbox_foreach (GtkWidget *widget,
gpointer data)
{
if (GTK_WIDGET_VISIBLE (widget)) {
if (gtk_widget_get_visible (widget)) {
gtk_widget_realize (widget);
gtk_widget_map (widget);
gtk_widget_ensure_style (widget);

View file

@ -258,9 +258,12 @@ new_adjustment (void)
static void
foo_scroll_area_init (FooScrollArea *scroll_area)
{
GTK_WIDGET_SET_FLAGS (scroll_area, GTK_NO_WINDOW);
GtkWidget *widget;
gtk_widget_set_redraw_on_allocate (GTK_WIDGET (scroll_area), FALSE);
widget = GTK_WIDGET (scroll_area);
gtk_widget_set_has_window (widget, FALSE);
gtk_widget_set_redraw_on_allocate (widget, FALSE);
scroll_area->priv = g_new0 (FooScrollAreaPrivate, 1);
scroll_area->priv->width = 0;
@ -276,7 +279,7 @@ foo_scroll_area_init (FooScrollArea *scroll_area)
scroll_area->priv->pixmap = NULL;
scroll_area->priv->update_region = gdk_region_new ();
gtk_widget_set_double_buffered (GTK_WIDGET (scroll_area), FALSE);
gtk_widget_set_double_buffered (widget, FALSE);
}
static void
@ -721,7 +724,7 @@ foo_scroll_area_realize (GtkWidget *widget)
GdkWindowAttr attributes;
gint attributes_mask;
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
gtk_widget_set_realized (widget, TRUE);
attributes.window_type = GDK_WINDOW_CHILD;
attributes.x = widget->allocation.x;
@ -1260,7 +1263,7 @@ foo_scrollbar_adjustment_changed (GtkAdjustment *adj,
g_assert_not_reached ();
}
if (GTK_WIDGET_REALIZED (widget))
if (gtk_widget_get_realized (widget))
{
foo_scroll_area_scroll (scroll_area, -dx, -dy);
@ -1461,15 +1464,20 @@ void
foo_scroll_area_invalidate_region (FooScrollArea *area,
GdkRegion *region)
{
GtkWidget *widget;
g_return_if_fail (FOO_IS_SCROLL_AREA (area));
widget = GTK_WIDGET (area);
gdk_region_union (area->priv->update_region, region);
if (GTK_WIDGET_REALIZED (area))
if (gtk_widget_get_realized (widget))
{
canvas_to_window (area, region);
gdk_window_invalidate_region (GTK_WIDGET (area)->window, region, TRUE);
gdk_window_invalidate_region (gtk_widget_get_window (widget),
region, TRUE);
window_to_canvas (area, region);
}

View file

@ -527,7 +527,7 @@ rebuild_current_monitor_label (App *app)
* theme's colors, since the label is always shown against a light
* pastel background. See bgo#556050
*/
gtk_widget_modify_fg (app->current_monitor_label, GTK_WIDGET_STATE (app->current_monitor_label), &black);
gtk_widget_modify_fg (app->current_monitor_label, gtk_widget_get_state (app->current_monitor_label), &black);
}
else
{
@ -2251,7 +2251,7 @@ get_output_for_window (GnomeRRConfig *configuration, GdkWindow *window)
static void
select_current_output_from_dialog_position (App *app)
{
if (GTK_WIDGET_REALIZED (app->dialog))
if (gtk_widget_get_realized (app->dialog))
app->current_output = get_output_for_window (app->current_configuration, app->dialog->window);
else
app->current_output = NULL;

View file

@ -549,7 +549,7 @@ xkb_layout_choose (GtkBuilder * dialog)
chooser_dialog);
toplevel = gtk_widget_get_toplevel (chooser);
if (GTK_WIDGET_TOPLEVEL (toplevel)) {
if (gtk_widget_is_toplevel (toplevel)) {
GdkRectangle *rect = gkbd_preview_load_position ();
if (rect != NULL) {
gtk_window_move (GTK_WINDOW (toplevel),

View file

@ -90,7 +90,7 @@ dnl ==============================================
dnl Check that we meet the dependencies
dnl ==============================================
COMMON_MODULES="gtk+-2.0 >= 2.18.0 dnl
COMMON_MODULES="gtk+-2.0 >= 2.20.0 dnl
glib-2.0 >= 2.17.4 dnl
gthread-2.0 dnl
gio-2.0 dnl

View file

@ -373,7 +373,7 @@ static gboolean
expose_event(GtkWidget *widget, GdkEventExpose *event, GdkPixmap *pixmap)
{
gdk_draw_drawable(widget->window,
widget->style->fg_gc[GTK_WIDGET_STATE (widget)],
widget->style->fg_gc[gtk_widget_get_state (widget)],
pixmap,
event->area.x, event->area.y,
event->area.x, event->area.y,

View file

@ -518,7 +518,7 @@ postpone_clicked_cb (GtkWidget *button,
return;
}
if (GTK_WIDGET_VISIBLE (priv->postpone_entry)) {
if (gtk_widget_get_visible (priv->postpone_entry)) {
gtk_widget_activate (priv->postpone_entry);
return;
}
@ -611,7 +611,7 @@ label_expose_event_cb (GtkLabel *label,
gtk_paint_layout (widget->style,
widget->window,
GTK_WIDGET_STATE (widget),
gtk_widget_get_state (widget),
FALSE,
&event->area,
widget,