Commit 4f78f70b authored by Javier Jardón's avatar Javier Jardón

Deprecate widget flag: GTK_WIDGET_DRAWABLE

Use gtk_widget_is_drawable() instead.

https://bugzilla.gnome.org/show_bug.cgi?id=69872
parent 6a9d4d82
......@@ -466,7 +466,7 @@ gtk_rotated_bin_expose (GtkWidget *widget,
gdouble s, c;
gdouble w, h;
if (GTK_WIDGET_DRAWABLE (widget))
if (gtk_widget_is_drawable (widget))
{
if (event->window == widget->window)
{
......
......@@ -369,7 +369,7 @@ gtk_mirror_bin_expose (GtkWidget *widget,
GtkMirrorBin *bin = GTK_MIRROR_BIN (widget);
gint width, height;
if (GTK_WIDGET_DRAWABLE (widget))
if (gtk_widget_is_drawable (widget))
{
if (event->window == widget->window)
{
......
......@@ -365,7 +365,7 @@ gtk_accel_label_expose_event (GtkWidget *widget,
direction = gtk_widget_get_direction (widget);
if (GTK_WIDGET_DRAWABLE (accel_label))
if (gtk_widget_is_drawable (widget))
{
guint ac_width;
......
......@@ -174,6 +174,8 @@ gtk_arrow_set (GtkArrow *arrow,
GtkArrowType arrow_type,
GtkShadowType shadow_type)
{
GtkWidget *widget;
g_return_if_fail (GTK_IS_ARROW (arrow));
if ( ((GtkArrowType) arrow->arrow_type != arrow_type)
......@@ -195,8 +197,9 @@ gtk_arrow_set (GtkArrow *arrow,
g_object_thaw_notify (G_OBJECT (arrow));
if (GTK_WIDGET_DRAWABLE (arrow))
gtk_widget_queue_draw (GTK_WIDGET (arrow));
widget = GTK_WIDGET (arrow);
if (gtk_widget_is_drawable (widget))
gtk_widget_queue_draw (widget);
}
}
......@@ -205,7 +208,7 @@ static gboolean
gtk_arrow_expose (GtkWidget *widget,
GdkEventExpose *event)
{
if (GTK_WIDGET_DRAWABLE (widget))
if (gtk_widget_is_drawable (widget))
{
GtkArrow *arrow = GTK_ARROW (widget);
GtkMisc *misc = GTK_MISC (widget);
......
......@@ -558,7 +558,7 @@ set_current_page (GtkAssistant *assistant,
GtkAssistantPage *old_page;
if (priv->current_page &&
GTK_WIDGET_DRAWABLE (priv->current_page->page))
gtk_widget_is_drawable (priv->current_page->page))
old_page = priv->current_page;
else
old_page = NULL;
......@@ -1276,11 +1276,11 @@ gtk_assistant_unmap (GtkWidget *widget)
gtk_widget_unmap (priv->header_image);
gtk_widget_unmap (priv->action_area);
if (GTK_WIDGET_DRAWABLE (priv->sidebar_image))
if (gtk_widget_is_drawable (priv->sidebar_image))
gtk_widget_unmap (priv->sidebar_image);
if (priv->current_page &&
GTK_WIDGET_DRAWABLE (priv->current_page->page))
gtk_widget_is_drawable (priv->current_page->page))
gtk_widget_unmap (priv->current_page->page);
g_slist_free (priv->visited_pages);
......@@ -1366,7 +1366,7 @@ gtk_assistant_expose (GtkWidget *widget,
GtkAssistantPrivate *priv = assistant->priv;
GtkContainer *container;
if (GTK_WIDGET_DRAWABLE (widget))
if (gtk_widget_is_drawable (widget))
{
container = GTK_CONTAINER (widget);
......
......@@ -1471,14 +1471,15 @@ _gtk_button_paint (GtkButton *button,
gboolean interior_focus;
gint focus_width;
gint focus_pad;
if (GTK_WIDGET_DRAWABLE (button))
widget = GTK_WIDGET (button);
if (gtk_widget_is_drawable (widget))
{
widget = GTK_WIDGET (button);
border_width = GTK_CONTAINER (widget)->border_width;
gtk_button_get_props (button, &default_border, &default_outside_border, NULL, &interior_focus);
gtk_widget_style_get (GTK_WIDGET (widget),
gtk_widget_style_get (widget,
"focus-line-width", &focus_width,
"focus-padding", &focus_pad,
NULL);
......@@ -1530,7 +1531,7 @@ _gtk_button_paint (GtkButton *button,
gint child_displacement_y;
gboolean displace_focus;
gtk_widget_style_get (GTK_WIDGET (widget),
gtk_widget_style_get (widget,
"child-displacement-y", &child_displacement_y,
"child-displacement-x", &child_displacement_x,
"displace-focus", &displace_focus,
......@@ -1568,7 +1569,7 @@ static gboolean
gtk_button_expose (GtkWidget *widget,
GdkEventExpose *event)
{
if (GTK_WIDGET_DRAWABLE (widget))
if (gtk_widget_is_drawable (widget))
{
GtkButton *button = GTK_BUTTON (widget);
......
......@@ -2666,7 +2666,7 @@ gtk_calendar_expose (GtkWidget *widget,
GtkCalendarPrivate *priv = GTK_CALENDAR_GET_PRIVATE (widget);
int i;
if (GTK_WIDGET_DRAWABLE (widget))
if (gtk_widget_is_drawable (widget))
{
if (event->window == priv->main_win)
calendar_paint_main (calendar);
......@@ -3728,7 +3728,7 @@ gtk_calendar_select_day (GtkCalendar *calendar,
selected_day = calendar->selected_day;
calendar->selected_day = 0;
if (GTK_WIDGET_DRAWABLE (GTK_WIDGET (calendar)))
if (gtk_widget_is_drawable (GTK_WIDGET (calendar)))
calendar_invalidate_day_num (calendar, selected_day);
}
......@@ -3737,7 +3737,7 @@ gtk_calendar_select_day (GtkCalendar *calendar,
/* Select the new day */
if (day != 0)
{
if (GTK_WIDGET_DRAWABLE (GTK_WIDGET (calendar)))
if (gtk_widget_is_drawable (GTK_WIDGET (calendar)))
calendar_invalidate_day_num (calendar, day);
}
......
......@@ -405,7 +405,7 @@ gtk_cell_view_expose (GtkWidget *widget,
cellview = GTK_CELL_VIEW (widget);
if (! GTK_WIDGET_DRAWABLE (widget))
if (!gtk_widget_is_drawable (widget))
return FALSE;
/* "blank" background */
......
......@@ -133,7 +133,7 @@ gtk_check_button_paint (GtkWidget *widget,
{
GtkCheckButton *check_button = GTK_CHECK_BUTTON (widget);
if (GTK_WIDGET_DRAWABLE (widget))
if (gtk_widget_is_drawable (widget))
{
gint border_width;
gint interior_focus;
......@@ -307,7 +307,7 @@ gtk_check_button_expose (GtkWidget *widget,
toggle_button = GTK_TOGGLE_BUTTON (widget);
bin = GTK_BIN (widget);
if (GTK_WIDGET_DRAWABLE (widget))
if (gtk_widget_is_drawable (widget))
{
if (toggle_button->draw_indicator)
{
......@@ -356,10 +356,11 @@ gtk_real_check_button_draw_indicator (GtkCheckButton *check_button,
gint focus_width;
gint focus_pad;
gboolean interior_focus;
if (GTK_WIDGET_DRAWABLE (check_button))
widget = GTK_WIDGET (check_button);
if (gtk_widget_is_drawable (widget))
{
widget = GTK_WIDGET (check_button);
button = GTK_BUTTON (check_button);
toggle_button = GTK_TOGGLE_BUTTON (check_button);
......
......@@ -441,7 +441,7 @@ gtk_real_check_menu_item_draw_indicator (GtkCheckMenuItem *check_menu_item,
GtkShadowType shadow_type;
gint x, y;
if (GTK_WIDGET_DRAWABLE (check_menu_item))
if (gtk_widget_is_drawable (GTK_WIDGET (check_menu_item)))
{
guint offset;
guint toggle_size;
......
......@@ -814,7 +814,7 @@ color_sample_draw_sample (GtkColorSelection *colorsel, int which)
priv = colorsel->private_data;
g_return_if_fail (priv->sample_area != NULL);
if (!GTK_WIDGET_DRAWABLE (priv->sample_area))
if (!gtk_widget_is_drawable (priv->sample_area))
return;
if (which == 0)
......
......@@ -2512,7 +2512,7 @@ gtk_combo_box_expose_event (GtkWidget *widget,
GtkComboBox *combo_box = GTK_COMBO_BOX (widget);
GtkComboBoxPrivate *priv = combo_box->priv;
if (GTK_WIDGET_DRAWABLE (widget) &&
if (gtk_widget_is_drawable (widget) &&
GTK_SHADOW_NONE != priv->shadow_type)
{
gtk_paint_shadow (widget->style, widget->window,
......
......@@ -2301,7 +2301,7 @@ gtk_container_focus_move (GtkContainer *container,
return TRUE;
}
}
else if (GTK_WIDGET_DRAWABLE (child) &&
else if (gtk_widget_is_drawable (child) &&
gtk_widget_is_ancestor (child, GTK_WIDGET (container)))
{
if (gtk_widget_child_focus (child, direction))
......@@ -2638,7 +2638,7 @@ gtk_container_expose (GtkWidget *widget,
g_return_val_if_fail (event != NULL, FALSE);
if (GTK_WIDGET_DRAWABLE (widget))
if (gtk_widget_is_drawable (widget))
{
data.container = widget;
data.event = event;
......@@ -2720,7 +2720,7 @@ gtk_container_propagate_expose (GtkContainer *container,
g_assert (child->parent == GTK_WIDGET (container));
if (GTK_WIDGET_DRAWABLE (child) &&
if (gtk_widget_is_drawable (child) &&
!gtk_widget_get_has_window (child) &&
(child->window == event->window))
{
......
......@@ -353,7 +353,7 @@ gtk_drag_highlight_expose (GtkWidget *widget,
{
gint x, y, width, height;
if (GTK_WIDGET_DRAWABLE (widget))
if (gtk_widget_is_drawable (widget))
{
cairo_t *cr;
......@@ -757,7 +757,7 @@ gtk_drag_find_widget (GtkWidget *widget,
gtk_container_forall (GTK_CONTAINER (widget), prepend_and_ref_widget, &children);
for (tmp_list = children; tmp_list; tmp_list = tmp_list->next)
{
if (!new_data.found && GTK_WIDGET_DRAWABLE (tmp_list->data))
if (!new_data.found && gtk_widget_is_drawable (tmp_list->data))
gtk_drag_find_widget (tmp_list->data, &new_data);
g_object_unref (tmp_list->data);
}
......
......@@ -1102,7 +1102,7 @@ gtk_drag_highlight_expose (GtkWidget *widget,
{
gint x, y, width, height;
if (GTK_WIDGET_DRAWABLE (widget))
if (gtk_widget_is_drawable (widget))
{
cairo_t *cr;
......@@ -1934,7 +1934,7 @@ gtk_drag_find_widget (GtkWidget *widget,
gtk_container_forall (GTK_CONTAINER (widget), prepend_and_ref_widget, &children);
for (tmp_list = children; tmp_list; tmp_list = tmp_list->next)
{
if (!new_data.found && GTK_WIDGET_DRAWABLE (tmp_list->data))
if (!new_data.found && gtk_widget_is_drawable (tmp_list->data))
gtk_drag_find_widget (tmp_list->data, &new_data);
g_object_unref (tmp_list->data);
}
......
......@@ -5579,7 +5579,7 @@ gtk_entry_draw_text (GtkEntry *entry)
if (gtk_entry_get_display_mode (entry) == DISPLAY_BLANK)
return;
if (GTK_WIDGET_DRAWABLE (entry))
if (gtk_widget_is_drawable (widget))
{
GdkColor text_color, bar_text_color;
gint pos_x, pos_y;
......@@ -5664,12 +5664,12 @@ static void
gtk_entry_draw_cursor (GtkEntry *entry,
CursorType type)
{
GtkWidget *widget = GTK_WIDGET (entry);
GdkKeymap *keymap = gdk_keymap_get_for_display (gtk_widget_get_display (GTK_WIDGET (entry)));
PangoDirection keymap_direction = gdk_keymap_get_direction (keymap);
if (GTK_WIDGET_DRAWABLE (entry))
if (gtk_widget_is_drawable (widget))
{
GtkWidget *widget = GTK_WIDGET (entry);
GdkRectangle cursor_location;
gboolean split_cursor;
PangoRectangle cursor_rect;
......@@ -5786,7 +5786,7 @@ gtk_entry_draw_cursor (GtkEntry *entry,
static void
gtk_entry_queue_draw (GtkEntry *entry)
{
if (GTK_WIDGET_DRAWABLE (entry))
if (gtk_widget_is_drawable (GTK_WIDGET (entry)))
gdk_window_invalidate_rect (entry->text_area, NULL, FALSE);
}
......@@ -9856,6 +9856,7 @@ void
gtk_entry_set_progress_fraction (GtkEntry *entry,
gdouble fraction)
{
GtkWidget *widget;
GtkEntryPrivate *private;
gdouble old_fraction;
gint x, y, width, height;
......@@ -9863,6 +9864,7 @@ gtk_entry_set_progress_fraction (GtkEntry *entry,
g_return_if_fail (GTK_IS_ENTRY (entry));
widget = GTK_WIDGET (entry);
private = GTK_ENTRY_GET_PRIVATE (entry);
if (private->progress_pulse_mode)
......@@ -9870,8 +9872,8 @@ gtk_entry_set_progress_fraction (GtkEntry *entry,
else
old_fraction = private->progress_fraction;
if (GTK_WIDGET_DRAWABLE (GTK_WIDGET (entry)))
get_progress_area (GTK_WIDGET(entry), &old_x, &old_y, &old_width, &old_height);
if (gtk_widget_is_drawable (widget))
get_progress_area (widget, &old_x, &old_y, &old_width, &old_height);
fraction = CLAMP (fraction, 0.0, 1.0);
......@@ -9879,12 +9881,12 @@ gtk_entry_set_progress_fraction (GtkEntry *entry,
private->progress_pulse_mode = FALSE;
private->progress_pulse_current = 0.0;
if (GTK_WIDGET_DRAWABLE (GTK_WIDGET (entry)))
if (gtk_widget_is_drawable (widget))
{
get_progress_area (GTK_WIDGET(entry), &x, &y, &width, &height);
get_progress_area (widget, &x, &y, &width, &height);
if ((x != old_x) || (y != old_y) || (width != old_width) || (height != old_height))
gtk_widget_queue_draw (GTK_WIDGET (entry));
gtk_widget_queue_draw (widget);
}
if (fraction != old_fraction)
......
......@@ -560,7 +560,7 @@ static gboolean
gtk_event_box_expose (GtkWidget *widget,
GdkEventExpose *event)
{
if (GTK_WIDGET_DRAWABLE (widget))
if (gtk_widget_is_drawable (widget))
{
if (gtk_widget_get_has_window (widget))
gtk_event_box_paint (widget, &event->area);
......
......@@ -897,7 +897,7 @@ static gboolean
gtk_expander_expose (GtkWidget *widget,
GdkEventExpose *event)
{
if (GTK_WIDGET_DRAWABLE (widget))
if (gtk_widget_is_drawable (widget))
{
GtkExpander *expander = GTK_EXPANDER (widget);
......
......@@ -187,7 +187,7 @@ file_chooser_widget_default_size_changed (GtkWidget *widget,
/* Unset any previously set size */
gtk_widget_set_size_request (GTK_WIDGET (dialog), -1, -1);
if (GTK_WIDGET_DRAWABLE (widget))
if (gtk_widget_is_drawable (widget))
{
/* Force a size request of everything before we start. This will make sure
* that widget->requisition is meaningful. */
......
......@@ -492,19 +492,22 @@ void
gtk_frame_set_shadow_type (GtkFrame *frame,
GtkShadowType type)
{
GtkWidget *widget;
g_return_if_fail (GTK_IS_FRAME (frame));
if ((GtkShadowType) frame->shadow_type != type)
{
widget = GTK_WIDGET (frame);
frame->shadow_type = type;
g_object_notify (G_OBJECT (frame), "shadow-type");
if (GTK_WIDGET_DRAWABLE (frame))
if (gtk_widget_is_drawable (widget))
{
gtk_widget_queue_draw (GTK_WIDGET (frame));
gtk_widget_queue_draw (widget);
}
gtk_widget_queue_resize (GTK_WIDGET (frame));
gtk_widget_queue_resize (widget);
}
}
......@@ -532,7 +535,7 @@ gtk_frame_paint (GtkWidget *widget,
GtkFrame *frame;
gint x, y, width, height;
if (GTK_WIDGET_DRAWABLE (widget))
if (gtk_widget_is_drawable (widget))
{
frame = GTK_FRAME (widget);
......@@ -588,7 +591,7 @@ static gboolean
gtk_frame_expose (GtkWidget *widget,
GdkEventExpose *event)
{
if (GTK_WIDGET_DRAWABLE (widget))
if (gtk_widget_is_drawable (widget))
{
gtk_frame_paint (widget, &event->area);
......
......@@ -961,7 +961,7 @@ gtk_handle_box_expose (GtkWidget *widget,
{
GtkHandleBox *hb;
if (GTK_WIDGET_DRAWABLE (widget))
if (gtk_widget_is_drawable (widget))
{
hb = GTK_HANDLE_BOX (widget);
......
......@@ -1271,7 +1271,7 @@ gtk_hsv_expose (GtkWidget *widget,
hsv = GTK_HSV (widget);
priv = hsv->priv;
if (!(GTK_WIDGET_DRAWABLE (widget) && event->window == widget->window))
if (!(event->window == widget->window && gtk_widget_is_drawable (widget)))
return FALSE;
rect.x = widget->allocation.x;
......
......@@ -1618,7 +1618,7 @@ animation_timeout (gpointer data)
gtk_widget_queue_draw (GTK_WIDGET (image));
if (GTK_WIDGET_DRAWABLE (image))
if (gtk_widget_is_drawable (GTK_WIDGET (image)))
gdk_window_process_updates (GTK_WIDGET (image)->window, TRUE);
}
......
......@@ -3449,13 +3449,15 @@ get_cursor_direction (GtkLabel *label)
static void
gtk_label_draw_cursor (GtkLabel *label, gint xoffset, gint yoffset)
{
GtkWidget *widget;
if (label->select_info == NULL)
return;
widget = GTK_WIDGET (label);
if (GTK_WIDGET_DRAWABLE (label))
if (gtk_widget_is_drawable (widget))
{
GtkWidget *widget = GTK_WIDGET (label);
PangoDirection keymap_direction;
PangoDirection cursor_direction;
PangoRectangle strong_pos, weak_pos;
......
......@@ -549,7 +549,7 @@ gtk_list_item_expose (GtkWidget *widget,
{
g_return_val_if_fail (widget != NULL, FALSE);
if (GTK_WIDGET_DRAWABLE (widget))
if (gtk_widget_is_drawable (widget))
{
if (widget->state == GTK_STATE_NORMAL)
{
......
......@@ -1905,7 +1905,7 @@ gtk_menu_reposition (GtkMenu *menu)
{
g_return_if_fail (GTK_IS_MENU (menu));
if (GTK_WIDGET_DRAWABLE (menu) && !menu->torn_off)
if (!menu->torn_off && gtk_widget_is_drawable (GTK_WIDGET (menu)))
gtk_menu_position (menu);
}
......@@ -2867,7 +2867,7 @@ gtk_menu_expose (GtkWidget *widget,
g_return_val_if_fail (GTK_IS_MENU (widget), FALSE);
g_return_val_if_fail (event != NULL, FALSE);
if (GTK_WIDGET_DRAWABLE (widget))
if (gtk_widget_is_drawable (widget))
{
gtk_menu_paint (widget, event);
......
......@@ -509,7 +509,7 @@ gtk_menu_bar_paint (GtkWidget *widget,
{
g_return_if_fail (GTK_IS_MENU_BAR (widget));
if (GTK_WIDGET_DRAWABLE (widget))
if (gtk_widget_is_drawable (widget))
{
gint border;
......@@ -533,7 +533,7 @@ gtk_menu_bar_expose (GtkWidget *widget,
g_return_val_if_fail (GTK_IS_MENU_BAR (widget), FALSE);
g_return_val_if_fail (event != NULL, FALSE);
if (GTK_WIDGET_DRAWABLE (widget))
if (gtk_widget_is_drawable (widget))
{
gtk_menu_bar_paint (widget, &event->area);
......
......@@ -1197,7 +1197,7 @@ gtk_menu_item_paint (GtkWidget *widget,
gint x, y;
gint border_width = GTK_CONTAINER (widget)->border_width;
if (GTK_WIDGET_DRAWABLE (widget))
if (gtk_widget_is_drawable (widget))
{
menu_item = GTK_MENU_ITEM (widget);
......@@ -1318,7 +1318,7 @@ gtk_menu_item_expose (GtkWidget *widget,
g_return_val_if_fail (GTK_IS_MENU_ITEM (widget), FALSE);
g_return_val_if_fail (event != NULL, FALSE);
if (GTK_WIDGET_DRAWABLE (widget))
if (gtk_widget_is_drawable (widget))
{
gtk_menu_item_paint (widget, &event->area);
......
......@@ -182,6 +182,8 @@ gtk_misc_set_alignment (GtkMisc *misc,
gfloat xalign,
gfloat yalign)
{
GtkWidget *widget;
g_return_if_fail (GTK_IS_MISC (misc));
if (xalign < 0.0)
......@@ -208,13 +210,9 @@ gtk_misc_set_alignment (GtkMisc *misc,
/* clear the area that was allocated before the change
*/
if (GTK_WIDGET_DRAWABLE (misc))
{
GtkWidget *widget;
widget = GTK_WIDGET (misc);
gtk_widget_queue_draw (widget);
}
widget = GTK_WIDGET (misc);
if (gtk_widget_is_drawable (widget))
gtk_widget_queue_draw (widget);
g_object_thaw_notify (G_OBJECT (misc));
}
......@@ -275,7 +273,7 @@ gtk_misc_set_padding (GtkMisc *misc,
requisition->width += misc->xpad * 2;
requisition->height += misc->ypad * 2;
if (GTK_WIDGET_DRAWABLE (misc))
if (gtk_widget_is_drawable (GTK_WIDGET (misc)))
gtk_widget_queue_resize (GTK_WIDGET (misc));
g_object_thaw_notify (G_OBJECT (misc));
......
......@@ -2311,7 +2311,7 @@ gtk_notebook_expose (GtkWidget *widget,
gtk_container_propagate_expose (GTK_CONTAINER (notebook),
notebook->cur_page->tab_label, event);
}
else if (GTK_WIDGET_DRAWABLE (widget))
else if (gtk_widget_is_drawable (widget))
{
gtk_notebook_paint (widget, &event->area);
if (notebook->show_tabs)
......@@ -2328,7 +2328,7 @@ gtk_notebook_expose (GtkWidget *widget,
pages = pages->next;
if (page->tab_label->window == event->window &&
GTK_WIDGET_DRAWABLE (page->tab_label))
gtk_widget_is_drawable (page->tab_label))
gtk_container_propagate_expose (GTK_CONTAINER (notebook),
page->tab_label, event);
}
......@@ -2343,7 +2343,7 @@ gtk_notebook_expose (GtkWidget *widget,
for (i = 0; i < N_ACTION_WIDGETS; i++)
{
if (priv->action_widget[i] &&
GTK_WIDGET_DRAWABLE (priv->action_widget[i]))
gtk_widget_is_drawable (priv->action_widget[i]))
gtk_container_propagate_expose (GTK_CONTAINER (notebook),
priv->action_widget[i], event);
}
......@@ -3272,7 +3272,7 @@ gtk_notebook_draw_focus (GtkWidget *widget,
{
GtkNotebook *notebook = GTK_NOTEBOOK (widget);
if (GTK_WIDGET_HAS_FOCUS (widget) && GTK_WIDGET_DRAWABLE (widget) &&
if (GTK_WIDGET_HAS_FOCUS (widget) && gtk_widget_is_drawable (widget) &&
notebook->show_tabs && notebook->cur_page &&
notebook->cur_page->tab_label->window == event->window)
{
......@@ -4837,7 +4837,7 @@ gtk_notebook_paint (GtkWidget *widget,
gboolean is_rtl;
gint tab_pos;
if (!GTK_WIDGET_DRAWABLE (widget))
if (!gtk_widget_is_drawable (widget))
return;
notebook = GTK_NOTEBOOK (widget);
......@@ -5014,7 +5014,9 @@ gtk_notebook_draw_arrow (GtkNotebook *notebook,
GtkArrowType arrow;
gboolean is_rtl, left;
if (GTK_WIDGET_DRAWABLE (notebook))
widget = GTK_WIDGET (notebook);
if (gtk_widget_is_drawable (widget))
{
gint scroll_arrow_hlength;
gint scroll_arrow_vlength;
......@@ -5022,8 +5024,6 @@ gtk_notebook_draw_arrow (GtkNotebook *notebook,
gtk_notebook_get_arrow_rect (notebook, &arrow_rect, nbarrow);
widget = GTK_WIDGET (notebook);
is_rtl = gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL;
left = (ARROW_IS_LEFT (nbarrow) && !is_rtl) ||
(!ARROW_IS_LEFT (nbarrow) && is_rtl);
......
......@@ -531,7 +531,7 @@ gtk_progress_bar_expose (GtkWidget *widget,
pbar = GTK_PROGRESS_BAR (widget);
if (GTK_WIDGET_DRAWABLE (widget) && pbar->dirty)
if (pbar->dirty && gtk_widget_is_drawable (widget))
gtk_progress_bar_paint (GTK_PROGRESS (pbar));
return GTK_WIDGET_CLASS (gtk_progress_bar_parent_class)->expose_event (widget, event);
......@@ -1048,7 +1048,7 @@ gtk_progress_bar_set_bar_style_internal (GtkProgressBar *pbar,
{
pbar->bar_style = bar_style;
if (GTK_WIDGET_DRAWABLE (GTK_WIDGET (pbar)))
if (gtk_widget_is_drawable (GTK_WIDGET (pbar)))
gtk_widget_queue_resize (GTK_WIDGET (pbar));
g_object_notify (G_OBJECT (pbar), "bar-style");
......@@ -1066,7 +1066,7 @@ gtk_progress_bar_set_discrete_blocks_internal (GtkProgressBar *pbar,
{
pbar->blocks = blocks;
if (GTK_WIDGET_DRAWABLE (GTK_WIDGET (pbar)))
if (gtk_widget_is_drawable (GTK_WIDGET (pbar)))
gtk_widget_queue_resize (GTK_WIDGET (pbar));
g_object_notify (G_OBJECT (pbar), "discrete-blocks");
......@@ -1227,7 +1227,7 @@ gtk_progress_bar_set_orientation (GtkProgressBar *pbar,
{
pbar->orientation = orientation;
if (GTK_WIDGET_DRAWABLE (GTK_WIDGET (pbar)))
if (gtk_widget_is_drawable (GTK_WIDGET (pbar)))
gtk_widget_queue_resize (GTK_WIDGET (pbar));