summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorJavier Jardón <jjardon@gnome.org>2010-01-07 16:47:35 +0100
committerJavier Jardón <jjardon@gnome.org>2010-03-01 04:55:55 +0100
commit4f78f70b15f861cca115f578b0f3f4ad3ad087e7 (patch)
tree87166fea7e72454f79e388c8fef075570e081d9c /gtk
parent6a9d4d82031a3a51a0c0ac8197766b75cd38a0a4 (diff)
downloadgtk+-4f78f70b15f861cca115f578b0f3f4ad3ad087e7.tar.gz
Deprecate widget flag: GTK_WIDGET_DRAWABLE
Use gtk_widget_is_drawable() instead. https://bugzilla.gnome.org/show_bug.cgi?id=69872
Diffstat (limited to 'gtk')
-rw-r--r--gtk/gtkaccellabel.c2
-rw-r--r--gtk/gtkarrow.c9
-rw-r--r--gtk/gtkassistant.c8
-rw-r--r--gtk/gtkbutton.c13
-rw-r--r--gtk/gtkcalendar.c6
-rw-r--r--gtk/gtkcellview.c2
-rw-r--r--gtk/gtkcheckbutton.c11
-rw-r--r--gtk/gtkcheckmenuitem.c2
-rw-r--r--gtk/gtkcolorsel.c2
-rw-r--r--gtk/gtkcombobox.c2
-rw-r--r--gtk/gtkcontainer.c6
-rw-r--r--gtk/gtkdnd-quartz.c4
-rw-r--r--gtk/gtkdnd.c4
-rw-r--r--gtk/gtkentry.c20
-rw-r--r--gtk/gtkeventbox.c2
-rw-r--r--gtk/gtkexpander.c2
-rw-r--r--gtk/gtkfilechooserdialog.c2
-rw-r--r--gtk/gtkframe.c13
-rw-r--r--gtk/gtkhandlebox.c2
-rw-r--r--gtk/gtkhsv.c2
-rw-r--r--gtk/gtkimage.c2
-rw-r--r--gtk/gtklabel.c8
-rw-r--r--gtk/gtklistitem.c2
-rw-r--r--gtk/gtkmenu.c4
-rw-r--r--gtk/gtkmenubar.c4
-rw-r--r--gtk/gtkmenuitem.c4
-rw-r--r--gtk/gtkmisc.c14
-rw-r--r--gtk/gtknotebook.c16
-rw-r--r--gtk/gtkprogressbar.c8
-rw-r--r--gtk/gtkradiobutton.c5
-rw-r--r--gtk/gtkrange.c4
-rw-r--r--gtk/gtkruler.c10
-rw-r--r--gtk/gtkscrolledwindow.c4
-rw-r--r--gtk/gtkseparator.c2
-rw-r--r--gtk/gtkspinbutton.c4
-rw-r--r--gtk/gtktearoffmenuitem.c2
-rw-r--r--gtk/gtktextview.c2
-rw-r--r--gtk/gtktogglebutton.c2
-rw-r--r--gtk/gtktoolbar.c2
-rw-r--r--gtk/gtktooltip.c2
-rw-r--r--gtk/gtktreeitem.c8
-rw-r--r--gtk/gtkviewport.c4
-rw-r--r--gtk/gtkwidget.c12
-rw-r--r--gtk/gtkwidget.h4
-rw-r--r--gtk/tests/filechooser.c12
45 files changed, 136 insertions, 119 deletions
diff --git a/gtk/gtkaccellabel.c b/gtk/gtkaccellabel.c
index 6a4ddd9520..56b1a83e74 100644
--- a/gtk/gtkaccellabel.c
+++ b/gtk/gtkaccellabel.c
@@ -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;
diff --git a/gtk/gtkarrow.c b/gtk/gtkarrow.c
index e6fc3dc5ad..22a5870fe0 100644
--- a/gtk/gtkarrow.c
+++ b/gtk/gtkarrow.c
@@ -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);
diff --git a/gtk/gtkassistant.c b/gtk/gtkassistant.c
index 5fd6d83d3c..a1a63656bd 100644
--- a/gtk/gtkassistant.c
+++ b/gtk/gtkassistant.c
@@ -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);
diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c
index d776b6b83f..3c6f17b395 100644
--- a/gtk/gtkbutton.c
+++ b/gtk/gtkbutton.c
@@ -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);
diff --git a/gtk/gtkcalendar.c b/gtk/gtkcalendar.c
index 7203f15269..025860c345 100644
--- a/gtk/gtkcalendar.c
+++ b/gtk/gtkcalendar.c
@@ -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);
}
diff --git a/gtk/gtkcellview.c b/gtk/gtkcellview.c
index 7704495fbc..34f32411cf 100644
--- a/gtk/gtkcellview.c
+++ b/gtk/gtkcellview.c
@@ -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 */
diff --git a/gtk/gtkcheckbutton.c b/gtk/gtkcheckbutton.c
index 92d82f279b..6d15a05b0e 100644
--- a/gtk/gtkcheckbutton.c
+++ b/gtk/gtkcheckbutton.c
@@ -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);
diff --git a/gtk/gtkcheckmenuitem.c b/gtk/gtkcheckmenuitem.c
index 8bf0972688..4fb18c858a 100644
--- a/gtk/gtkcheckmenuitem.c
+++ b/gtk/gtkcheckmenuitem.c
@@ -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;
diff --git a/gtk/gtkcolorsel.c b/gtk/gtkcolorsel.c
index 2a8ca74cf8..413b4cfb35 100644
--- a/gtk/gtkcolorsel.c
+++ b/gtk/gtkcolorsel.c
@@ -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)
diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c
index 529a4a57e2..26da1cd6ed 100644
--- a/gtk/gtkcombobox.c
+++ b/gtk/gtkcombobox.c
@@ -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,
diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c
index f5a169ccdc..f66b05c953 100644
--- a/gtk/gtkcontainer.c
+++ b/gtk/gtkcontainer.c
@@ -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))
{
diff --git a/gtk/gtkdnd-quartz.c b/gtk/gtkdnd-quartz.c
index 6c5a5ae501..3d5a643ede 100644
--- a/gtk/gtkdnd-quartz.c
+++ b/gtk/gtkdnd-quartz.c
@@ -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);
}
diff --git a/gtk/gtkdnd.c b/gtk/gtkdnd.c
index 878dbf54dc..8146cdd968 100644
--- a/gtk/gtkdnd.c
+++ b/gtk/gtkdnd.c
@@ -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);
}
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index 61421903d9..5129943716 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -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)
diff --git a/gtk/gtkeventbox.c b/gtk/gtkeventbox.c
index b1a5035147..9c8f6ffbb6 100644
--- a/gtk/gtkeventbox.c
+++ b/gtk/gtkeventbox.c
@@ -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);
diff --git a/gtk/gtkexpander.c b/gtk/gtkexpander.c
index 2341123017..546a5520b5 100644
--- a/gtk/gtkexpander.c
+++ b/gtk/gtkexpander.c
@@ -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);
diff --git a/gtk/gtkfilechooserdialog.c b/gtk/gtkfilechooserdialog.c
index e88e361afa..11b6dea31d 100644
--- a/gtk/gtkfilechooserdialog.c
+++ b/gtk/gtkfilechooserdialog.c
@@ -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. */
diff --git a/gtk/gtkframe.c b/gtk/gtkframe.c
index d8a637b35e..7e1b7226ee 100644
--- a/gtk/gtkframe.c
+++ b/gtk/gtkframe.c
@@ -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);
diff --git a/gtk/gtkhandlebox.c b/gtk/gtkhandlebox.c
index e56d78be10..7a25be7a37 100644
--- a/gtk/gtkhandlebox.c
+++ b/gtk/gtkhandlebox.c
@@ -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);
diff --git a/gtk/gtkhsv.c b/gtk/gtkhsv.c
index ed8b44fbbc..10db08b89f 100644
--- a/gtk/gtkhsv.c
+++ b/gtk/gtkhsv.c
@@ -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;
diff --git a/gtk/gtkimage.c b/gtk/gtkimage.c
index bcd0a0afcd..8b9a9d5021 100644
--- a/gtk/gtkimage.c
+++ b/gtk/gtkimage.c
@@ -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);
}
diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c
index 9408de12a5..28a76fdf38 100644
--- a/gtk/gtklabel.c
+++ b/gtk/gtklabel.c
@@ -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;
diff --git a/gtk/gtklistitem.c b/gtk/gtklistitem.c
index f3aa6a1f79..cfa36853fc 100644
--- a/gtk/gtklistitem.c
+++ b/gtk/gtklistitem.c
@@ -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)
{
diff --git a/gtk/gtkmenu.c b/gtk/gtkmenu.c
index bbbe4c0727..31e92c3c93 100644
--- a/gtk/gtkmenu.c
+++ b/gtk/gtkmenu.c
@@ -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);
diff --git a/gtk/gtkmenubar.c b/gtk/gtkmenubar.c
index d051e3b79a..1d0f43c784 100644
--- a/gtk/gtkmenubar.c
+++ b/gtk/gtkmenubar.c
@@ -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);
diff --git a/gtk/gtkmenuitem.c b/gtk/gtkmenuitem.c
index cafddb563e..888883407d 100644
--- a/gtk/gtkmenuitem.c
+++ b/gtk/gtkmenuitem.c
@@ -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);
diff --git a/gtk/gtkmisc.c b/gtk/gtkmisc.c
index 2d102a54e7..e625f38b13 100644
--- a/gtk/gtkmisc.c
+++ b/gtk/gtkmisc.c
@@ -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));
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index 392afedd5a..f86af0e847 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -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);
diff --git a/gtk/gtkprogressbar.c b/gtk/gtkprogressbar.c
index e5f5554b8a..798c6b43ef 100644
--- a/gtk/gtkprogressbar.c
+++ b/gtk/gtkprogressbar.c
@@ -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));
g_object_notify (G_OBJECT (pbar), "orientation");
diff --git a/gtk/gtkradiobutton.c b/gtk/gtkradiobutton.c
index 5916378610..503fdb0f7a 100644
--- a/gtk/gtkradiobutton.c
+++ b/gtk/gtkradiobutton.c
@@ -686,9 +686,10 @@ gtk_radio_button_draw_indicator (GtkCheckButton *check_button,
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);
diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c
index 7c361e7896..5059a242e9 100644
--- a/gtk/gtkrange.c
+++ b/gtk/gtkrange.c
@@ -2599,9 +2599,11 @@ static gboolean
force_repaint (gpointer data)
{
GtkRange *range = GTK_RANGE (data);
+
range->layout->repaint_id = 0;
- if (GTK_WIDGET_DRAWABLE (range))
+ if (gtk_widget_is_drawable (GTK_WIDGET (range)))
gdk_window_process_updates (GTK_WIDGET (range)->window, FALSE);
+
return FALSE;
}
diff --git a/gtk/gtkruler.c b/gtk/gtkruler.c
index 6e581aecbb..ac3907a226 100644
--- a/gtk/gtkruler.c
+++ b/gtk/gtkruler.c
@@ -306,7 +306,7 @@ gtk_ruler_set_metric (GtkRuler *ruler,
ruler->metric = (GtkRulerMetric *) &ruler_metrics[metric];
- if (GTK_WIDGET_DRAWABLE (ruler))
+ if (gtk_widget_is_drawable (GTK_WIDGET (ruler)))
gtk_widget_queue_draw (GTK_WIDGET (ruler));
g_object_notify (G_OBJECT (ruler), "metric");
@@ -379,7 +379,7 @@ gtk_ruler_set_range (GtkRuler *ruler,
}
g_object_thaw_notify (G_OBJECT (ruler));
- if (GTK_WIDGET_DRAWABLE (ruler))
+ if (gtk_widget_is_drawable (GTK_WIDGET (ruler)))
gtk_widget_queue_draw (GTK_WIDGET (ruler));
}
@@ -554,7 +554,7 @@ static gboolean
gtk_ruler_expose (GtkWidget *widget,
GdkEventExpose *event)
{
- if (GTK_WIDGET_DRAWABLE (widget))
+ if (gtk_widget_is_drawable (widget))
{
GtkRuler *ruler = GTK_RULER (widget);
@@ -632,7 +632,7 @@ gtk_ruler_real_draw_ticks (GtkRuler *ruler)
PangoLayout *layout;
PangoRectangle logical_rect, ink_rect;
- if (!GTK_WIDGET_DRAWABLE (ruler))
+ if (!gtk_widget_is_drawable (widget))
return;
xthickness = widget->style->xthickness;
@@ -833,7 +833,7 @@ gtk_ruler_real_draw_pos (GtkRuler *ruler)
gint ythickness;
gdouble increment;
- if (GTK_WIDGET_DRAWABLE (ruler))
+ if (gtk_widget_is_drawable (widget))
{
xthickness = widget->style->xthickness;
ythickness = widget->style->ythickness;
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index 75b4121b13..8006fb674f 100644
--- a/gtk/gtkscrolledwindow.c
+++ b/gtk/gtkscrolledwindow.c
@@ -819,7 +819,7 @@ gtk_scrolled_window_set_shadow_type (GtkScrolledWindow *scrolled_window,
{
scrolled_window->shadow_type = type;
- if (GTK_WIDGET_DRAWABLE (scrolled_window))
+ if (gtk_widget_is_drawable (GTK_WIDGET (scrolled_window)))
gtk_widget_queue_draw (GTK_WIDGET (scrolled_window));
gtk_widget_queue_resize (GTK_WIDGET (scrolled_window));
@@ -1063,7 +1063,7 @@ static gboolean
gtk_scrolled_window_expose (GtkWidget *widget,
GdkEventExpose *event)
{
- if (GTK_WIDGET_DRAWABLE (widget))
+ if (gtk_widget_is_drawable (widget))
{
gtk_scrolled_window_paint (widget, &event->area);
diff --git a/gtk/gtkseparator.c b/gtk/gtkseparator.c
index 44976a1748..f69860c5be 100644
--- a/gtk/gtkseparator.c
+++ b/gtk/gtkseparator.c
@@ -184,7 +184,7 @@ gtk_separator_expose (GtkWidget *widget,
gint separator_width;
gint separator_height;
- if (!GTK_WIDGET_DRAWABLE (widget))
+ if (!gtk_widget_is_drawable (widget))
return FALSE;
gtk_widget_style_get (widget,
diff --git a/gtk/gtkspinbutton.c b/gtk/gtkspinbutton.c
index 8f4919495e..e9349cd07d 100644
--- a/gtk/gtkspinbutton.c
+++ b/gtk/gtkspinbutton.c
@@ -731,7 +731,7 @@ gtk_spin_button_expose (GtkWidget *widget,
{
GtkSpinButton *spin = GTK_SPIN_BUTTON (widget);
- if (GTK_WIDGET_DRAWABLE (widget))
+ if (gtk_widget_is_drawable (widget))
{
if (event->window == spin->panel)
{
@@ -804,7 +804,7 @@ gtk_spin_button_draw_arrow (GtkSpinButton *spin_button,
widget = GTK_WIDGET (spin_button);
- if (GTK_WIDGET_DRAWABLE (widget))
+ if (gtk_widget_is_drawable (widget))
{
width = spin_button_get_arrow_size (spin_button) + 2 * widget->style->xthickness;
diff --git a/gtk/gtktearoffmenuitem.c b/gtk/gtktearoffmenuitem.c
index f6615206e1..8bdb3bebbe 100644
--- a/gtk/gtktearoffmenuitem.c
+++ b/gtk/gtktearoffmenuitem.c
@@ -105,7 +105,7 @@ gtk_tearoff_menu_item_paint (GtkWidget *widget,
GtkArrowType arrow_type;
GtkTextDirection direction;
- if (GTK_WIDGET_DRAWABLE (widget))
+ if (gtk_widget_is_drawable (widget))
{
menu_item = GTK_MENU_ITEM (widget);
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index 80d356da4a..703001c026 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -4679,7 +4679,7 @@ gtk_text_view_draw_focus (GtkWidget *widget)
"interior-focus", &interior_focus,
NULL);
- if (GTK_WIDGET_DRAWABLE (widget))
+ if (gtk_widget_is_drawable (widget))
{
if (GTK_WIDGET_HAS_FOCUS (widget) && !interior_focus)
{
diff --git a/gtk/gtktogglebutton.c b/gtk/gtktogglebutton.c
index 3a07cfdc4c..4350d82ec1 100644
--- a/gtk/gtktogglebutton.c
+++ b/gtk/gtktogglebutton.c
@@ -419,7 +419,7 @@ static gint
gtk_toggle_button_expose (GtkWidget *widget,
GdkEventExpose *event)
{
- if (GTK_WIDGET_DRAWABLE (widget))
+ if (gtk_widget_is_drawable (widget))
{
GtkWidget *child = GTK_BIN (widget)->child;
GtkButton *button = GTK_BUTTON (widget);
diff --git a/gtk/gtktoolbar.c b/gtk/gtktoolbar.c
index 87e875486f..229a5d99aa 100644
--- a/gtk/gtktoolbar.c
+++ b/gtk/gtktoolbar.c
@@ -867,7 +867,7 @@ gtk_toolbar_expose (GtkWidget *widget,
border_width = GTK_CONTAINER (widget)->border_width;
- if (GTK_WIDGET_DRAWABLE (widget))
+ if (gtk_widget_is_drawable (widget))
{
gtk_paint_box (widget->style,
widget->window,
diff --git a/gtk/gtktooltip.c b/gtk/gtktooltip.c
index 36a99955e5..c94226cad3 100644
--- a/gtk/gtktooltip.c
+++ b/gtk/gtktooltip.c
@@ -553,7 +553,7 @@ child_location_foreach (GtkWidget *child,
struct ChildLocation *child_loc = data;
/* Ignore invisible widgets */
- if (!GTK_WIDGET_DRAWABLE (child))
+ if (!gtk_widget_is_drawable (child))
return;
x = 0;
diff --git a/gtk/gtktreeitem.c b/gtk/gtktreeitem.c
index 7b2ae9cea9..1cc74b02f6 100644
--- a/gtk/gtktreeitem.c
+++ b/gtk/gtktreeitem.c
@@ -212,7 +212,7 @@ gtk_tree_item_subtree_button_changed_state (GtkWidget *widget)
else
gdk_window_set_background (widget->window, &widget->style->bg[widget->state]);
- if (GTK_WIDGET_DRAWABLE (widget))
+ if (gtk_widget_is_drawable (widget))
gdk_window_clear_area (widget->window, 0, 0,
widget->allocation.width, widget->allocation.height);
}
@@ -603,7 +603,7 @@ gtk_tree_item_paint (GtkWidget *widget,
* line. (Like the way that the tree in Windows Explorer
* works).
*/
- if (GTK_WIDGET_DRAWABLE (widget))
+ if (gtk_widget_is_drawable (widget))
{
tree_item = GTK_TREE_ITEM(widget);
@@ -681,7 +681,7 @@ gtk_tree_item_expose_child (GtkWidget *child,
GdkEventExpose *event;
} *data = client_data;
- if (GTK_WIDGET_DRAWABLE (child) &&
+ if (gtk_widget_is_drawable (child) &&
!gtk_widget_get_has_window (child) &&
(child->window == data->event->window))
{
@@ -709,7 +709,7 @@ gtk_tree_item_expose (GtkWidget *widget,
GdkEventExpose *event;
} data;
- if (GTK_WIDGET_DRAWABLE (widget))
+ if (gtk_widget_is_drawable (widget))
{
gtk_tree_item_paint (widget, &event->area);
diff --git a/gtk/gtkviewport.c b/gtk/gtkviewport.c
index d650a4029e..b4411cfb27 100644
--- a/gtk/gtkviewport.c
+++ b/gtk/gtkviewport.c
@@ -671,7 +671,7 @@ static void
gtk_viewport_paint (GtkWidget *widget,
GdkRectangle *area)
{
- if (GTK_WIDGET_DRAWABLE (widget))
+ if (gtk_widget_is_drawable (widget))
{
GtkViewport *viewport = GTK_VIEWPORT (widget);
@@ -688,7 +688,7 @@ gtk_viewport_expose (GtkWidget *widget,
{
GtkViewport *viewport;
- if (GTK_WIDGET_DRAWABLE (widget))
+ if (gtk_widget_is_drawable (widget))
{
viewport = GTK_VIEWPORT (widget);
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 027e5b8fa8..25868a8bb6 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -3015,7 +3015,7 @@ gtk_widget_queue_draw_child (GtkWidget *widget)
GtkWidget *parent;
parent = widget->parent;
- if (parent && GTK_WIDGET_DRAWABLE (parent))
+ if (parent && gtk_widget_is_drawable (parent))
gtk_widget_queue_draw_area (parent,
widget->allocation.x,
widget->allocation.y,
@@ -3831,7 +3831,7 @@ gtk_widget_draw (GtkWidget *widget,
{
g_return_if_fail (GTK_IS_WIDGET (widget));
- if (GTK_WIDGET_DRAWABLE (widget))
+ if (gtk_widget_is_drawable (widget))
{
if (area)
gtk_widget_queue_draw_area (widget,
@@ -4284,7 +4284,7 @@ gtk_widget_real_can_activate_accel (GtkWidget *widget,
guint signal_id)
{
/* widgets must be onscreen for accels to take effect */
- return GTK_WIDGET_IS_SENSITIVE (widget) && GTK_WIDGET_DRAWABLE (widget) && gdk_window_is_viewable (widget->window);
+ return GTK_WIDGET_IS_SENSITIVE (widget) && gtk_widget_is_drawable (widget) && gdk_window_is_viewable (widget->window);
}
/**
@@ -5786,7 +5786,7 @@ gtk_widget_set_state (GtkWidget *widget,
gtk_widget_propagate_state (widget, &data);
- if (GTK_WIDGET_DRAWABLE (widget))
+ if (gtk_widget_is_drawable (widget))
gtk_widget_queue_draw (widget);
}
}
@@ -6073,7 +6073,7 @@ gtk_widget_set_app_paintable (GtkWidget *widget,
else
GTK_WIDGET_UNSET_FLAGS (widget, GTK_APP_PAINTABLE);
- if (GTK_WIDGET_DRAWABLE (widget))
+ if (gtk_widget_is_drawable (widget))
gtk_widget_queue_draw (widget);
g_object_notify (G_OBJECT (widget), "app-paintable");
@@ -6240,7 +6240,7 @@ gtk_widget_set_sensitive (GtkWidget *widget,
data.parent_sensitive = TRUE;
gtk_widget_propagate_state (widget, &data);
- if (GTK_WIDGET_DRAWABLE (widget))
+ if (gtk_widget_is_drawable (widget))
gtk_widget_queue_draw (widget);
g_object_notify (G_OBJECT (widget), "sensitive");
diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h
index 0f361f371c..ab056fe7bf 100644
--- a/gtk/gtkwidget.h
+++ b/gtk/gtkwidget.h
@@ -240,13 +240,17 @@ typedef enum
*/
#define GTK_WIDGET_VISIBLE(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_VISIBLE) != 0)
+#ifndef GTK_DISABLE_DEPRECATED
/**
* GTK_WIDGET_DRAWABLE:
* @wid: a #GtkWidget.
*
* Evaluates to %TRUE if the widget is mapped and visible.
+ *
+ * Deprecated: 2.20: Use gtk_widget_is_drawable() instead.
*/
#define GTK_WIDGET_DRAWABLE(wid) (GTK_WIDGET_VISIBLE (wid) && GTK_WIDGET_MAPPED (wid))
+#endif
/**
* GTK_WIDGET_SENSITIVE:
diff --git a/gtk/tests/filechooser.c b/gtk/tests/filechooser.c
index 300e15afda..6b99459232 100644
--- a/gtk/tests/filechooser.c
+++ b/gtk/tests/filechooser.c
@@ -531,7 +531,7 @@ test_widgets_for_current_action (GtkFileChooserDialog *dialog,
&& impl->save_folder_label == NULL
&& impl->save_folder_combo == NULL
&& impl->save_expander == NULL
- && GTK_IS_CONTAINER (impl->browse_widgets) && GTK_WIDGET_DRAWABLE (impl->browse_widgets));
+ && GTK_IS_CONTAINER (impl->browse_widgets) && gtk_widget_is_drawable (impl->browse_widgets));
}
else if (has_action (save_actions, G_N_ELEMENTS (save_actions), impl->action))
{
@@ -539,11 +539,11 @@ test_widgets_for_current_action (GtkFileChooserDialog *dialog,
* _gtk_file_chooser_entry_get_type(), which is a non-exported symbol.
* So, we just test impl->location_entry for being non-NULL
*/
- passed = passed && (GTK_IS_CONTAINER (impl->save_widgets) && GTK_WIDGET_DRAWABLE (impl->save_widgets)
- && impl->location_entry != NULL && GTK_WIDGET_DRAWABLE (impl->location_entry)
- && GTK_IS_LABEL (impl->save_folder_label) && GTK_WIDGET_DRAWABLE (impl->save_folder_label)
- && GTK_IS_COMBO_BOX (impl->save_folder_combo) && GTK_WIDGET_DRAWABLE (impl->save_folder_combo)
- && GTK_IS_EXPANDER (impl->save_expander) && GTK_WIDGET_DRAWABLE (impl->save_expander)
+ passed = passed && (GTK_IS_CONTAINER (impl->save_widgets) && gtk_widget_is_drawable (impl->save_widgets)
+ && impl->location_entry != NULL && gtk_widget_is_drawable (impl->location_entry)
+ && GTK_IS_LABEL (impl->save_folder_label) && gtk_widget_is_drawable (impl->save_folder_label)
+ && GTK_IS_COMBO_BOX (impl->save_folder_combo) && gtk_widget_is_drawable (impl->save_folder_combo)
+ && GTK_IS_EXPANDER (impl->save_expander) && gtk_widget_is_drawable (impl->save_expander)
&& GTK_IS_CONTAINER (impl->browse_widgets));
/* FIXME: we are in a SAVE mode; test the visibility and sensitivity of