summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdocs/tutorial/gtk-tut.sgml4
-rw-r--r--examples/scribble-xinput/scribble-xinput.c2
-rw-r--r--gtk/gtkassistant.c12
-rw-r--r--gtk/gtkclist.c10
-rw-r--r--gtk/gtkcombobox.c4
-rw-r--r--gtk/gtkcontainer.c2
-rw-r--r--gtk/gtkdnd-quartz.c2
-rw-r--r--gtk/gtkdnd.c2
-rw-r--r--gtk/gtkentry.c20
-rw-r--r--gtk/gtkentrycompletion.c14
-rw-r--r--gtk/gtkfilechooserdefault.c5
-rw-r--r--gtk/gtkfilechooserdialog.c4
-rw-r--r--gtk/gtkframe.c2
-rw-r--r--gtk/gtkhandlebox.c2
-rw-r--r--gtk/gtkimage.c2
-rw-r--r--gtk/gtklabel.c4
-rw-r--r--gtk/gtklayout.c2
-rw-r--r--gtk/gtklist.c2
-rw-r--r--gtk/gtkmenu.c4
-rw-r--r--gtk/gtkmenubar.c2
-rw-r--r--gtk/gtkmenuitem.c2
-rw-r--r--gtk/gtkmnemonichash.c2
-rw-r--r--gtk/gtknotebook.c27
-rw-r--r--gtk/gtkpaned.c8
-rw-r--r--gtk/gtkplug.c4
-rw-r--r--gtk/gtkradiobutton.c4
-rw-r--r--gtk/gtkrecentchooserdialog.c2
-rw-r--r--gtk/gtkscale.c2
-rw-r--r--gtk/gtksizegroup.c2
-rw-r--r--gtk/gtkspinbutton.c4
-rw-r--r--gtk/gtkstatusbar.c2
-rw-r--r--gtk/gtktoolbar.c6
-rw-r--r--gtk/gtktoolitem.c2
-rw-r--r--gtk/gtktoolitemgroup.c2
-rw-r--r--gtk/gtktree.c8
-rw-r--r--gtk/gtktreeitem.c10
-rw-r--r--gtk/gtktreeview.c12
-rw-r--r--gtk/gtkviewport.c2
-rw-r--r--gtk/gtkwidget.c30
-rw-r--r--gtk/gtkwidget.h4
-rw-r--r--gtk/gtkwin32embedwidget.c2
-rw-r--r--gtk/gtkwindow.c28
-rw-r--r--modules/other/gail/gail.c4
-rw-r--r--modules/other/gail/gailbutton.c2
-rw-r--r--modules/other/gail/gailcombo.c2
-rw-r--r--modules/other/gail/gailcombobox.c2
-rw-r--r--modules/other/gail/gailexpander.c2
-rw-r--r--modules/other/gail/gailitem.c2
-rw-r--r--modules/other/gail/gaillabel.c2
-rw-r--r--modules/other/gail/gailmenuitem.c4
-rw-r--r--modules/other/gail/gailnotebookpage.c2
-rw-r--r--modules/other/gail/gailwidget.c4
-rw-r--r--modules/other/gail/gailwindow.c2
-rw-r--r--perf/gtkwidgetprofiler.c2
-rw-r--r--tests/testgtk.c18
-rw-r--r--tests/testinput.c2
-rw-r--r--tests/testtext.c2
57 files changed, 164 insertions, 154 deletions
diff --git a/docs/tutorial/gtk-tut.sgml b/docs/tutorial/gtk-tut.sgml
index cc85082208..6565908110 100755
--- a/docs/tutorial/gtk-tut.sgml
+++ b/docs/tutorial/gtk-tut.sgml
@@ -13026,7 +13026,7 @@ create_input_dialog ()
}
else
{
- if (!GTK_WIDGET_MAPPED(inputd))
+ if (!gtk_widget_get_mapped(inputd))
gtk_widget_show(inputd);
else
gdk_window_raise(inputd->window);
@@ -16017,7 +16017,7 @@ create_input_dialog ()
}
else
{
- if (!GTK_WIDGET_MAPPED (inputd))
+ if (!gtk_widget_get_mapped (inputd))
gtk_widget_show (inputd);
else
gdk_window_raise (inputd->window);
diff --git a/examples/scribble-xinput/scribble-xinput.c b/examples/scribble-xinput/scribble-xinput.c
index 900a3ecd5e..697969e61a 100644
--- a/examples/scribble-xinput/scribble-xinput.c
+++ b/examples/scribble-xinput/scribble-xinput.c
@@ -169,7 +169,7 @@ create_input_dialog ()
}
else
{
- if (!GTK_WIDGET_MAPPED (inputd))
+ if (!gtk_widget_get_mapped (inputd))
gtk_widget_show (inputd);
else
gdk_window_raise (inputd->window);
diff --git a/gtk/gtkassistant.c b/gtk/gtkassistant.c
index 011334c35d..69e573c385 100644
--- a/gtk/gtkassistant.c
+++ b/gtk/gtkassistant.c
@@ -571,14 +571,14 @@ set_current_page (GtkAssistant *assistant,
g_signal_emit (assistant, signals [PREPARE], 0, priv->current_page->page);
- if (gtk_widget_get_visible (priv->current_page->page) && GTK_WIDGET_MAPPED (assistant))
+ if (gtk_widget_get_visible (priv->current_page->page) && gtk_widget_get_mapped (GTK_WIDGET (assistant)))
{
gtk_widget_set_child_visible (priv->current_page->page, TRUE);
gtk_widget_map (priv->current_page->page);
gtk_widget_map (priv->current_page->title);
}
- if (old_page && GTK_WIDGET_MAPPED (old_page->page))
+ if (old_page && gtk_widget_get_mapped (old_page->page))
{
gtk_widget_set_child_visible (old_page->page, FALSE);
gtk_widget_unmap (old_page->page);
@@ -899,7 +899,7 @@ on_page_notify_visibility (GtkWidget *widget,
GtkAssistant *assistant = GTK_ASSISTANT (data);
/* update buttons state, flow may have changed */
- if (GTK_WIDGET_MAPPED (assistant))
+ if (gtk_widget_get_mapped (GTK_WIDGET (assistant)))
set_assistant_buttons_state (assistant);
}
@@ -1241,7 +1241,7 @@ gtk_assistant_map (GtkWidget *widget)
gtk_widget_map (priv->action_area);
if (gtk_widget_get_visible (priv->sidebar_image) &&
- !GTK_WIDGET_MAPPED (priv->sidebar_image))
+ !gtk_widget_get_mapped (priv->sidebar_image))
gtk_widget_map (priv->sidebar_image);
/* if there's no default page, pick the first one */
@@ -1259,7 +1259,7 @@ gtk_assistant_map (GtkWidget *widget)
if (page &&
gtk_widget_get_visible (page->page) &&
- !GTK_WIDGET_MAPPED (page->page))
+ !gtk_widget_get_mapped (page->page))
set_current_page (assistant, page);
GTK_WIDGET_CLASS (gtk_assistant_parent_class)->map (widget);
@@ -1566,7 +1566,7 @@ gtk_assistant_set_current_page (GtkAssistant *assistant,
* initial page setting, for the cases where the
* initial page is != to 0
*/
- if (GTK_WIDGET_MAPPED (assistant))
+ if (gtk_widget_get_mapped (GTK_WIDGET (assistant)))
priv->visited_pages = g_slist_prepend (priv->visited_pages,
priv->current_page);
diff --git a/gtk/gtkclist.c b/gtk/gtkclist.c
index 2369bd7e5b..83a1fa0c5c 100644
--- a/gtk/gtkclist.c
+++ b/gtk/gtkclist.c
@@ -4615,7 +4615,7 @@ gtk_clist_unrealize (GtkWidget *widget)
/* freeze the list */
clist->freeze_count++;
- if (GTK_WIDGET_MAPPED (widget))
+ if (gtk_widget_get_mapped (widget))
gtk_clist_unmap (widget);
GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED);
@@ -4684,7 +4684,7 @@ gtk_clist_map (GtkWidget *widget)
clist = GTK_CLIST (widget);
- if (!GTK_WIDGET_MAPPED (widget))
+ if (!gtk_widget_get_mapped (widget))
{
GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
@@ -4693,7 +4693,7 @@ gtk_clist_map (GtkWidget *widget)
{
if (clist->column[i].button &&
gtk_widget_get_visible (clist->column[i].button) &&
- !GTK_WIDGET_MAPPED (clist->column[i].button))
+ !gtk_widget_get_mapped (clist->column[i].button))
gtk_widget_map (clist->column[i].button);
}
@@ -4723,7 +4723,7 @@ gtk_clist_unmap (GtkWidget *widget)
clist = GTK_CLIST (widget);
- if (GTK_WIDGET_MAPPED (widget))
+ if (gtk_widget_get_mapped (widget))
{
GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED);
@@ -4761,7 +4761,7 @@ gtk_clist_unmap (GtkWidget *widget)
/* unmap column buttons */
for (i = 0; i < clist->columns; i++)
if (clist->column[i].button &&
- GTK_WIDGET_MAPPED (clist->column[i].button))
+ gtk_widget_get_mapped (clist->column[i].button))
gtk_widget_unmap (clist->column[i].button);
/* freeze the list */
diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c
index 37c4942758..22416981e2 100644
--- a/gtk/gtkcombobox.c
+++ b/gtk/gtkcombobox.c
@@ -1914,7 +1914,7 @@ gtk_combo_box_real_popup (GtkComboBox *combo_box)
if (!GTK_WIDGET_REALIZED (combo_box))
return;
- if (GTK_WIDGET_MAPPED (priv->popup_widget))
+ if (gtk_widget_get_mapped (priv->popup_widget))
return;
if (GTK_IS_MENU (priv->popup_widget))
@@ -3328,7 +3328,7 @@ list_popup_resize_idle (gpointer user_data)
GtkComboBoxPrivate *priv = combo_box->priv;
gint x, y, width, height;
- if (priv->tree_view && GTK_WIDGET_MAPPED (priv->popup_window))
+ if (priv->tree_view && gtk_widget_get_mapped (priv->popup_window))
{
gtk_combo_box_list_position (combo_box, &x, &y, &width, &height);
diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c
index 2aa7ef6988..ed41566ecb 100644
--- a/gtk/gtkcontainer.c
+++ b/gtk/gtkcontainer.c
@@ -2657,7 +2657,7 @@ gtk_container_map_child (GtkWidget *child,
{
if (gtk_widget_get_visible (child) &&
GTK_WIDGET_CHILD_VISIBLE (child) &&
- !GTK_WIDGET_MAPPED (child))
+ !gtk_widget_get_mapped (child))
gtk_widget_map (child);
}
diff --git a/gtk/gtkdnd-quartz.c b/gtk/gtkdnd-quartz.c
index fe06230c59..1778c7fcdd 100644
--- a/gtk/gtkdnd-quartz.c
+++ b/gtk/gtkdnd-quartz.c
@@ -667,7 +667,7 @@ gtk_drag_find_widget (GtkWidget *widget,
gint x_offset = 0;
gint y_offset = 0;
- if (data->found || !GTK_WIDGET_MAPPED (widget) || !gtk_widget_get_sensitive (widget))
+ if (data->found || !gtk_widget_get_mapped (widget) || !gtk_widget_get_sensitive (widget))
return;
/* Note that in the following code, we only count the
diff --git a/gtk/gtkdnd.c b/gtk/gtkdnd.c
index 3488509417..5e7d5a4b90 100644
--- a/gtk/gtkdnd.c
+++ b/gtk/gtkdnd.c
@@ -1844,7 +1844,7 @@ gtk_drag_find_widget (GtkWidget *widget,
gint x_offset = 0;
gint y_offset = 0;
- if (data->found || !GTK_WIDGET_MAPPED (widget) || !gtk_widget_get_sensitive (widget))
+ if (data->found || !gtk_widget_get_mapped (widget) || !gtk_widget_get_sensitive (widget))
return;
/* Note that in the following code, we only count the
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index 104b88e9dd..4367cbdc0a 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -2704,7 +2704,7 @@ gtk_entry_map (GtkWidget *widget)
EntryIconInfo *icon_info = NULL;
gint i;
- if (GTK_WIDGET_REALIZED (widget) && !GTK_WIDGET_MAPPED (widget))
+ if (GTK_WIDGET_REALIZED (widget) && !gtk_widget_get_mapped (widget))
{
GTK_WIDGET_CLASS (gtk_entry_parent_class)->map (widget);
@@ -2728,7 +2728,7 @@ gtk_entry_unmap (GtkWidget *widget)
EntryIconInfo *icon_info = NULL;
gint i;
- if (GTK_WIDGET_MAPPED (widget))
+ if (gtk_widget_get_mapped (widget))
{
for (i = 0; i < MAX_ICONS; i++)
{
@@ -3118,7 +3118,7 @@ gtk_entry_size_allocate (GtkWidget *widget,
gtk_entry_recompute (entry);
completion = gtk_entry_get_completion (entry);
- if (completion && GTK_WIDGET_MAPPED (completion->priv->popup_window))
+ if (completion && gtk_widget_get_mapped (completion->priv->popup_window))
_gtk_entry_completion_resize_popup (completion);
}
}
@@ -6279,7 +6279,7 @@ paste_received (GtkClipboard *clipboard,
if (completion)
{
- if (GTK_WIDGET_MAPPED (completion->priv->popup_window))
+ if (gtk_widget_get_mapped (completion->priv->popup_window))
_gtk_entry_completion_popdown (completion);
if (!popup_completion && completion->priv->changed_id > 0)
@@ -7597,7 +7597,7 @@ gtk_entry_set_icon_from_pixbuf (GtkEntry *entry,
g_object_notify (G_OBJECT (entry), "secondary-icon-storage-type");
}
- if (GTK_WIDGET_MAPPED (entry))
+ if (gtk_widget_get_mapped (GTK_WIDGET (entry)))
gdk_window_show_unraised (icon_info->window);
}
@@ -7664,7 +7664,7 @@ gtk_entry_set_icon_from_stock (GtkEntry *entry,
g_object_notify (G_OBJECT (entry), "secondary-icon-storage-type");
}
- if (GTK_WIDGET_MAPPED (entry))
+ if (gtk_widget_get_mapped (GTK_WIDGET (entry)))
gdk_window_show_unraised (icon_info->window);
}
@@ -7734,7 +7734,7 @@ gtk_entry_set_icon_from_icon_name (GtkEntry *entry,
g_object_notify (G_OBJECT (entry), "secondary-icon-storage-type");
}
- if (GTK_WIDGET_MAPPED (entry))
+ if (gtk_widget_get_mapped (GTK_WIDGET (entry)))
gdk_window_show_unraised (icon_info->window);
}
@@ -7801,7 +7801,7 @@ gtk_entry_set_icon_from_gicon (GtkEntry *entry,
g_object_notify (G_OBJECT (entry), "secondary-icon-storage-type");
}
- if (GTK_WIDGET_MAPPED (entry))
+ if (gtk_widget_get_mapped (GTK_WIDGET (entry)))
gdk_window_show_unraised (icon_info->window);
}
@@ -9301,7 +9301,7 @@ gtk_entry_completion_key_press (GtkWidget *widget,
gint matches, actions = 0;
GtkEntryCompletion *completion = GTK_ENTRY_COMPLETION (user_data);
- if (!GTK_WIDGET_MAPPED (completion->priv->popup_window))
+ if (!gtk_widget_get_mapped (completion->priv->popup_window))
return FALSE;
matches = gtk_tree_model_iter_n_children (GTK_TREE_MODEL (completion->priv->filter_model), NULL);
@@ -9751,7 +9751,7 @@ gtk_entry_set_completion (GtkEntry *entry,
old->priv->completion_timeout = 0;
}
- if (GTK_WIDGET_MAPPED (old->priv->popup_window))
+ if (gtk_widget_get_mapped (old->priv->popup_window))
_gtk_entry_completion_popdown (old);
disconnect_completion_signals (entry, old);
diff --git a/gtk/gtkentrycompletion.c b/gtk/gtkentrycompletion.c
index c997e60a9f..68b758a9f6 100644
--- a/gtk/gtkentrycompletion.c
+++ b/gtk/gtkentrycompletion.c
@@ -834,7 +834,7 @@ gtk_entry_completion_popup_key_event (GtkWidget *widget,
{
GtkEntryCompletion *completion = GTK_ENTRY_COMPLETION (user_data);
- if (!GTK_WIDGET_MAPPED (completion->priv->popup_window))
+ if (!gtk_widget_get_mapped (completion->priv->popup_window))
return FALSE;
/* propagate event to the entry */
@@ -850,7 +850,7 @@ gtk_entry_completion_popup_button_press (GtkWidget *widget,
{
GtkEntryCompletion *completion = GTK_ENTRY_COMPLETION (user_data);
- if (!GTK_WIDGET_MAPPED (completion->priv->popup_window))
+ if (!gtk_widget_get_mapped (completion->priv->popup_window))
return FALSE;
/* if we come here, it's usually time to popdown */
@@ -867,7 +867,7 @@ gtk_entry_completion_list_button_press (GtkWidget *widget,
GtkEntryCompletion *completion = GTK_ENTRY_COMPLETION (user_data);
GtkTreePath *path = NULL;
- if (!GTK_WIDGET_MAPPED (completion->priv->popup_window))
+ if (!gtk_widget_get_mapped (completion->priv->popup_window))
return FALSE;
if (gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (widget),
@@ -905,7 +905,7 @@ gtk_entry_completion_action_button_press (GtkWidget *widget,
GtkEntryCompletion *completion = GTK_ENTRY_COMPLETION (user_data);
GtkTreePath *path = NULL;
- if (!GTK_WIDGET_MAPPED (completion->priv->popup_window))
+ if (!gtk_widget_get_mapped (completion->priv->popup_window))
return FALSE;
_gtk_entry_reset_im_context (GTK_ENTRY (completion->priv->entry));
@@ -1474,10 +1474,10 @@ _gtk_entry_completion_popup (GtkEntryCompletion *completion)
GList *renderers;
GtkWidget *toplevel;
- if (GTK_WIDGET_MAPPED (completion->priv->popup_window))
+ if (gtk_widget_get_mapped (completion->priv->popup_window))
return;
- if (!GTK_WIDGET_MAPPED (completion->priv->entry))
+ if (!gtk_widget_get_mapped (completion->priv->entry))
return;
if (!gtk_widget_has_focus (completion->priv->entry))
@@ -1527,7 +1527,7 @@ _gtk_entry_completion_popup (GtkEntryCompletion *completion)
void
_gtk_entry_completion_popdown (GtkEntryCompletion *completion)
{
- if (!GTK_WIDGET_MAPPED (completion->priv->popup_window))
+ if (!gtk_widget_get_mapped (completion->priv->popup_window))
return;
completion->priv->ignore_enter = FALSE;
diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c
index ecdcc01b58..c2f29e9cdd 100644
--- a/gtk/gtkfilechooserdefault.c
+++ b/gtk/gtkfilechooserdefault.c
@@ -1109,7 +1109,7 @@ update_preview_widget_visibility (GtkFileChooserDefault *impl)
else
gtk_widget_hide (impl->preview_box);
- if (!GTK_WIDGET_MAPPED (impl))
+ if (!gtk_widget_get_mapped (GTK_WIDGET (impl)))
emit_default_size_changed (impl);
}
@@ -6408,7 +6408,8 @@ pending_select_files_process (GtkFileChooserDefault *impl)
* that case, the chooser's selection should be what the caller expects,
* as the user can't see that something else got selected. See bug #165264.
*/
- if (GTK_WIDGET_MAPPED (impl) && impl->action == GTK_FILE_CHOOSER_ACTION_OPEN)
+ if (impl->action == GTK_FILE_CHOOSER_ACTION_OPEN &&
+ gtk_widget_get_mapped (GTK_WIDGET (impl)))
browse_files_select_first_row (impl);
}
diff --git a/gtk/gtkfilechooserdialog.c b/gtk/gtkfilechooserdialog.c
index 11b6dea31d..43a11ce037 100644
--- a/gtk/gtkfilechooserdialog.c
+++ b/gtk/gtkfilechooserdialog.c
@@ -200,7 +200,7 @@ file_chooser_widget_default_size_changed (GtkWidget *widget,
gtk_window_resize (GTK_WINDOW (dialog), default_width, default_height);
- if (!GTK_WIDGET_MAPPED (dialog))
+ if (!gtk_widget_get_mapped (GTK_WIDGET (dialog)))
{
#if 0
/* FIXME: the code to restore the position does not work yet. It is not
@@ -358,7 +358,7 @@ gtk_file_chooser_dialog_map (GtkWidget *widget)
ensure_default_response (dialog);
- if (!GTK_WIDGET_MAPPED (priv->widget))
+ if (!gtk_widget_get_mapped (priv->widget))
gtk_widget_map (priv->widget);
_gtk_file_chooser_embed_initial_focus (GTK_FILE_CHOOSER_EMBED (priv->widget));
diff --git a/gtk/gtkframe.c b/gtk/gtkframe.c
index 3e09e7bb07..ce0143515b 100644
--- a/gtk/gtkframe.c
+++ b/gtk/gtkframe.c
@@ -652,7 +652,7 @@ gtk_frame_size_allocate (GtkWidget *widget,
/* If the child allocation changed, that means that the frame is drawn
* in a new place, so we must redraw the entire widget.
*/
- if (GTK_WIDGET_MAPPED (widget) &&
+ if (gtk_widget_get_mapped (widget) &&
(new_allocation.x != frame->child_allocation.x ||
new_allocation.y != frame->child_allocation.y ||
new_allocation.width != frame->child_allocation.width ||
diff --git a/gtk/gtkhandlebox.c b/gtk/gtkhandlebox.c
index 9fc9fc35e6..e0e82909dd 100644
--- a/gtk/gtkhandlebox.c
+++ b/gtk/gtkhandlebox.c
@@ -355,7 +355,7 @@ gtk_handle_box_map (GtkWidget *widget)
if (bin->child &&
gtk_widget_get_visible (bin->child) &&
- !GTK_WIDGET_MAPPED (bin->child))
+ !gtk_widget_get_mapped (bin->child))
gtk_widget_map (bin->child);
if (hb->child_detached && !hb->float_window_mapped)
diff --git a/gtk/gtkimage.c b/gtk/gtkimage.c
index c92f7c69d7..e5bae41c09 100644
--- a/gtk/gtkimage.c
+++ b/gtk/gtkimage.c
@@ -1834,7 +1834,7 @@ gtk_image_expose (GtkWidget *widget,
g_return_val_if_fail (GTK_IS_IMAGE (widget), FALSE);
g_return_val_if_fail (event != NULL, FALSE);
- if (GTK_WIDGET_MAPPED (widget) &&
+ if (gtk_widget_get_mapped (widget) &&
GTK_IMAGE (widget)->storage_type != GTK_IMAGE_EMPTY)
{
GtkImage *image;
diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c
index 46016713dc..05bd53f1ce 100644
--- a/gtk/gtklabel.c
+++ b/gtk/gtklabel.c
@@ -3557,7 +3557,7 @@ gtk_label_expose (GtkWidget *widget,
gtk_label_ensure_layout (label);
- if (gtk_widget_get_visible (widget) && GTK_WIDGET_MAPPED (widget) &&
+ if (gtk_widget_get_visible (widget) && gtk_widget_get_mapped (widget) &&
label->text && (*label->text != '\0'))
{
get_layout_location (label, &x, &y);
@@ -4609,7 +4609,7 @@ gtk_label_ensure_select_info (GtkLabel *label)
if (GTK_WIDGET_REALIZED (label))
gtk_label_create_window (label);
- if (GTK_WIDGET_MAPPED (label))
+ if (gtk_widget_get_mapped (GTK_WIDGET (label)))
gdk_window_show (label->select_info->window);
}
}
diff --git a/gtk/gtklayout.c b/gtk/gtklayout.c
index b4c58fdeae..56c4118221 100644
--- a/gtk/gtklayout.c
+++ b/gtk/gtklayout.c
@@ -918,7 +918,7 @@ gtk_layout_map (GtkWidget *widget)
if (gtk_widget_get_visible (child->widget))
{
- if (!GTK_WIDGET_MAPPED (child->widget))
+ if (!gtk_widget_get_mapped (child->widget))
gtk_widget_map (child->widget);
}
}
diff --git a/gtk/gtklist.c b/gtk/gtklist.c
index 9b9f4f08a3..9235bf98fa 100644
--- a/gtk/gtklist.c
+++ b/gtk/gtklist.c
@@ -487,7 +487,7 @@ gtk_list_unmap (GtkWidget *widget)
{
GtkList *list = GTK_LIST (widget);
- if (!GTK_WIDGET_MAPPED (widget))
+ if (!gtk_widget_get_mapped (widget))
return;
GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED);
diff --git a/gtk/gtkmenu.c b/gtk/gtkmenu.c
index 220862304a..384e5efa0e 100644
--- a/gtk/gtkmenu.c
+++ b/gtk/gtkmenu.c
@@ -1461,7 +1461,7 @@ gtk_menu_popup (GtkMenu *menu,
while (tmp)
{
- if (!GTK_WIDGET_MAPPED (tmp))
+ if (!gtk_widget_get_mapped (tmp))
{
viewable = FALSE;
break;
@@ -2918,7 +2918,7 @@ pointer_in_menu_window (GtkWidget *widget,
{
GtkMenu *menu = GTK_MENU (widget);
- if (GTK_WIDGET_MAPPED (menu->toplevel))
+ if (gtk_widget_get_mapped (menu->toplevel))
{
GtkMenuShell *menu_shell;
gint window_x, window_y;
diff --git a/gtk/gtkmenubar.c b/gtk/gtkmenubar.c
index 9e533a682e..f1d0e1db3e 100644
--- a/gtk/gtkmenubar.c
+++ b/gtk/gtkmenubar.c
@@ -564,7 +564,7 @@ get_viewable_menu_bars (GtkWindow *window)
while (widget)
{
- if (!GTK_WIDGET_MAPPED (widget))
+ if (!gtk_widget_get_mapped (widget))
viewable = FALSE;
widget = widget->parent;
diff --git a/gtk/gtkmenuitem.c b/gtk/gtkmenuitem.c
index 5e474a8d69..dfa25cd2fc 100644
--- a/gtk/gtkmenuitem.c
+++ b/gtk/gtkmenuitem.c
@@ -1344,7 +1344,7 @@ gtk_real_menu_item_select (GtkItem *item)
if (!touchscreen_mode &&
menu_item->submenu &&
- (!GTK_WIDGET_MAPPED (menu_item->submenu) ||
+ (!gtk_widget_get_mapped (menu_item->submenu) ||
GTK_MENU (menu_item->submenu)->tearoff_active))
{
_gtk_menu_item_popup_submenu (GTK_WIDGET (menu_item), TRUE);
diff --git a/gtk/gtkmnemonichash.c b/gtk/gtkmnemonichash.c
index 210002fb93..6434e14402 100644
--- a/gtk/gtkmnemonichash.c
+++ b/gtk/gtkmnemonichash.c
@@ -128,7 +128,7 @@ _gtk_mnemonic_hash_activate (GtkMnemonicHash *mnemonic_hash,
widget = GTK_WIDGET (list->data);
if (gtk_widget_is_sensitive (widget) &&
- GTK_WIDGET_MAPPED (widget) &&
+ gtk_widget_get_mapped (widget) &&
widget->window &&
gdk_window_is_viewable (widget->window))
{
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index 2408fc1eae..f6e3b9de90 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -1743,7 +1743,7 @@ gtk_notebook_map (GtkWidget *widget)
if (notebook->cur_page &&
gtk_widget_get_visible (notebook->cur_page->child) &&
- !GTK_WIDGET_MAPPED (notebook->cur_page->child))
+ !gtk_widget_get_mapped (notebook->cur_page->child))
gtk_widget_map (notebook->cur_page->child);
for (i = 0; i < N_ACTION_WIDGETS; i++)
@@ -1751,7 +1751,7 @@ gtk_notebook_map (GtkWidget *widget)
if (priv->action_widget[i] &&
gtk_widget_get_visible (priv->action_widget[i]) &&
GTK_WIDGET_CHILD_VISIBLE (priv->action_widget[i]) &&
- !GTK_WIDGET_MAPPED (priv->action_widget[i]))
+ !gtk_widget_get_mapped (priv->action_widget[i]))
gtk_widget_map (priv->action_widget[i]);
}
@@ -1768,7 +1768,7 @@ gtk_notebook_map (GtkWidget *widget)
if (page->tab_label &&
gtk_widget_get_visible (page->tab_label) &&
- !GTK_WIDGET_MAPPED (page->tab_label))
+ !gtk_widget_get_mapped (page->tab_label))
gtk_widget_map (page->tab_label);
}
}
@@ -2160,7 +2160,7 @@ gtk_notebook_size_allocate (GtkWidget *widget,
gdk_window_move_resize (notebook->event_window,
position.x, position.y,
position.width, position.height);
- if (GTK_WIDGET_MAPPED (notebook))
+ if (gtk_widget_get_mapped (GTK_WIDGET (notebook)))
gdk_window_show_unraised (notebook->event_window);
}
else
@@ -2619,7 +2619,7 @@ get_tab_at_pos (GtkNotebook *notebook, gint x, gint y)
page = children->data;
if (gtk_widget_get_visible (page->child) &&
- page->tab_label && GTK_WIDGET_MAPPED (page->tab_label) &&
+ page->tab_label && gtk_widget_get_mapped (page->tab_label) &&
(x >= page->allocation.x) &&
(y >= page->allocation.y) &&
(x <= (page->allocation.x + page->allocation.width)) &&
@@ -2792,7 +2792,7 @@ get_drop_position (GtkNotebook *notebook,
if ((priv->operation != DRAG_OPERATION_REORDER || page != notebook->cur_page) &&
gtk_widget_get_visible (page->child) &&
page->tab_label &&
- GTK_WIDGET_MAPPED (page->tab_label) &&
+ gtk_widget_get_mapped (page->tab_label) &&
page->pack == pack)
{
switch (notebook->tab_pos)
@@ -4439,7 +4439,7 @@ gtk_notebook_redraw_tabs (GtkNotebook *notebook)
widget = GTK_WIDGET (notebook);
border = GTK_CONTAINER (notebook)->border_width;
- if (!GTK_WIDGET_MAPPED (notebook) || !notebook->first_tab)
+ if (!gtk_widget_get_mapped (widget) || !notebook->first_tab)
return;
page = notebook->first_tab->data;
@@ -4488,7 +4488,8 @@ gtk_notebook_redraw_tabs (GtkNotebook *notebook)
static void
gtk_notebook_redraw_arrows (GtkNotebook *notebook)
{
- if (GTK_WIDGET_MAPPED (notebook) && gtk_notebook_show_arrows (notebook))
+ if (gtk_widget_get_mapped (GTK_WIDGET (notebook)) &&
+ gtk_notebook_show_arrows (notebook))
{
GdkRectangle rect;
gint i;
@@ -4867,7 +4868,7 @@ gtk_notebook_paint (GtkWidget *widget,
if (!notebook->first_tab)
notebook->first_tab = notebook->children;
- if (!GTK_WIDGET_MAPPED (notebook->cur_page->tab_label))
+ if (!gtk_widget_get_mapped (notebook->cur_page->tab_label))
page = GTK_NOTEBOOK_PAGE (notebook->first_tab);
else
page = notebook->cur_page;
@@ -4889,7 +4890,7 @@ gtk_notebook_paint (GtkWidget *widget,
}
if (!NOTEBOOK_IS_TAB_LABEL_PARENT (notebook, notebook->cur_page) ||
- !GTK_WIDGET_MAPPED (notebook->cur_page->tab_label))
+ !gtk_widget_get_mapped (notebook->cur_page->tab_label))
{
gap_x = 0;
gap_width = 0;
@@ -4935,7 +4936,7 @@ gtk_notebook_paint (GtkWidget *widget,
step, TRUE);
if (!gtk_widget_get_visible (page->child))
continue;
- if (!GTK_WIDGET_MAPPED (page->tab_label))
+ if (!gtk_widget_get_mapped (page->tab_label))
showarrow = TRUE;
else if (page != notebook->cur_page)
gtk_notebook_draw_tab (notebook, page, area);
@@ -4969,7 +4970,7 @@ gtk_notebook_draw_tab (GtkNotebook *notebook,
GtkWidget *widget;
if (!NOTEBOOK_IS_TAB_LABEL_PARENT (notebook, page) ||
- !GTK_WIDGET_MAPPED (page->tab_label) ||
+ !gtk_widget_get_mapped (page->tab_label) ||
(page->allocation.width == 0) || (page->allocation.height == 0))
return;
@@ -6214,7 +6215,7 @@ gtk_notebook_switch_focus_tab (GtkNotebook *notebook,
return;
page = notebook->focus_tab->data;
- if (GTK_WIDGET_MAPPED (page->tab_label))
+ if (gtk_widget_get_mapped (page->tab_label))
gtk_notebook_redraw_tabs (notebook);
else
gtk_notebook_pages_allocate (notebook);
diff --git a/gtk/gtkpaned.c b/gtk/gtkpaned.c
index 17d401621c..e09a9807cd 100644
--- a/gtk/gtkpaned.c
+++ b/gtk/gtkpaned.c
@@ -894,7 +894,7 @@ gtk_paned_size_allocate (GtkWidget *widget,
child2_allocation.height = MAX (1, widget->allocation.y + widget->allocation.height - child2_allocation.y - border_width);
}
- if (GTK_WIDGET_MAPPED (widget) &&
+ if (gtk_widget_get_mapped (widget) &&
(old_handle_pos.x != paned->handle_pos.x ||
old_handle_pos.y != paned->handle_pos.y ||
old_handle_pos.width != paned->handle_pos.width ||
@@ -906,7 +906,7 @@ gtk_paned_size_allocate (GtkWidget *widget,
if (GTK_WIDGET_REALIZED (widget))
{
- if (GTK_WIDGET_MAPPED (widget))
+ if (gtk_widget_get_mapped (widget))
gdk_window_show (paned->handle);
if (paned->priv->orientation == GTK_ORIENTATION_HORIZONTAL)
@@ -930,7 +930,7 @@ gtk_paned_size_allocate (GtkWidget *widget,
/* Now allocate the childen, making sure, when resizing not to
* overlap the windows
*/
- if (GTK_WIDGET_MAPPED (widget) &&
+ if (gtk_widget_get_mapped (widget) &&
((paned->priv->orientation == GTK_ORIENTATION_HORIZONTAL &&
paned->child1->allocation.width < child1_allocation.width) ||
@@ -1070,7 +1070,7 @@ gtk_paned_expose (GtkWidget *widget,
{
GtkPaned *paned = GTK_PANED (widget);
- if (gtk_widget_get_visible (widget) && GTK_WIDGET_MAPPED (widget) &&
+ if (gtk_widget_get_visible (widget) && gtk_widget_get_mapped (widget) &&
paned->child1 && gtk_widget_get_visible (paned->child1) &&
paned->child2 && gtk_widget_get_visible (paned->child2))
{
diff --git a/gtk/gtkplug.c b/gtk/gtkplug.c
index 34fa4cb619..3f71796c5a 100644
--- a/gtk/gtkplug.c
+++ b/gtk/gtkplug.c
@@ -216,7 +216,7 @@ gtk_plug_set_is_child (GtkPlug *plug,
* here, but don't bother remapping -- we will get mapped
* by gtk_widget_set_parent ().
*/
- if (GTK_WIDGET_MAPPED (plug))
+ if (gtk_widget_get_mapped (GTK_WIDGET (plug)))
gtk_widget_unmap (GTK_WIDGET (plug));
_gtk_window_set_is_toplevel (GTK_WINDOW (plug), FALSE);
@@ -691,7 +691,7 @@ gtk_plug_map (GtkWidget *widget)
if (bin->child &&
gtk_widget_get_visible (bin->child) &&
- !GTK_WIDGET_MAPPED (bin->child))
+ !gtk_widget_get_mapped (bin->child))
gtk_widget_map (bin->child);
_gtk_plug_windowing_map_toplevel (plug);
diff --git a/gtk/gtkradiobutton.c b/gtk/gtkradiobutton.c
index cb1d1aad12..2da7a73541 100644
--- a/gtk/gtkradiobutton.c
+++ b/gtk/gtkradiobutton.c
@@ -498,7 +498,7 @@ gtk_radio_button_focus (GtkWidget *widget,
{
GtkWidget *child = tmp_list->data;
- if (GTK_WIDGET_MAPPED (child) && gtk_widget_is_sensitive (child))
+ if (gtk_widget_get_mapped (child) && gtk_widget_is_sensitive (child))
{
new_focus = child;
break;
@@ -534,7 +534,7 @@ gtk_radio_button_focus (GtkWidget *widget,
{
GtkWidget *child = tmp_list->data;
- if (GTK_WIDGET_MAPPED (child) && gtk_widget_is_sensitive (child))
+ if (gtk_widget_get_mapped (child) && gtk_widget_is_sensitive (child))
{
new_focus = child;
break;
diff --git a/gtk/gtkrecentchooserdialog.c b/gtk/gtkrecentchooserdialog.c
index abce5ea6da..058439af8d 100644
--- a/gtk/gtkrecentchooserdialog.c
+++ b/gtk/gtkrecentchooserdialog.c
@@ -230,7 +230,7 @@ gtk_recent_chooser_dialog_map (GtkWidget *widget)
GtkRecentChooserDialog *dialog = GTK_RECENT_CHOOSER_DIALOG (widget);
GtkRecentChooserDialogPrivate *priv = dialog->priv;
- if (!GTK_WIDGET_MAPPED (priv->chooser))
+ if (!gtk_widget_get_mapped (priv->chooser))
gtk_widget_map (priv->chooser);
GTK_WIDGET_CLASS (gtk_recent_chooser_dialog_parent_class)->map (widget);
diff --git a/gtk/gtkscale.c b/gtk/gtkscale.c
index 7e7a36c1d2..9e92d9cbd3 100644
--- a/gtk/gtkscale.c
+++ b/gtk/gtkscale.c
@@ -664,7 +664,7 @@ gtk_scale_set_value_pos (GtkScale *scale,
widget = GTK_WIDGET (scale);
_gtk_scale_clear_layout (scale);
- if (gtk_widget_get_visible (widget) && GTK_WIDGET_MAPPED (widget))
+ if (gtk_widget_get_visible (widget) && gtk_widget_get_mapped (widget))
gtk_widget_queue_resize (widget);
g_object_notify (G_OBJECT (scale), "value-pos");
diff --git a/gtk/gtksizegroup.c b/gtk/gtksizegroup.c
index fb63aeb962..a6bd13b328 100644
--- a/gtk/gtksizegroup.c
+++ b/gtk/gtksizegroup.c
@@ -677,7 +677,7 @@ compute_dimension (GtkWidget *widget,
gint dimension = compute_base_dimension (tmp_widget, mode);
- if (GTK_WIDGET_MAPPED (tmp_widget) || !group->ignore_hidden)
+ if (gtk_widget_get_mapped (tmp_widget) || !group->ignore_hidden)
{
if (dimension > result)
result = dimension;
diff --git a/gtk/gtkspinbutton.c b/gtk/gtkspinbutton.c
index 509f918137..315adc4e48 100644
--- a/gtk/gtkspinbutton.c
+++ b/gtk/gtkspinbutton.c
@@ -517,7 +517,7 @@ gtk_spin_button_destroy (GtkObject *object)
static void
gtk_spin_button_map (GtkWidget *widget)
{
- if (GTK_WIDGET_REALIZED (widget) && !GTK_WIDGET_MAPPED (widget))
+ if (GTK_WIDGET_REALIZED (widget) && !gtk_widget_get_mapped (widget))
{
GTK_WIDGET_CLASS (gtk_spin_button_parent_class)->map (widget);
gdk_window_show (GTK_SPIN_BUTTON (widget)->panel);
@@ -527,7 +527,7 @@ gtk_spin_button_map (GtkWidget *widget)
static void
gtk_spin_button_unmap (GtkWidget *widget)
{
- if (GTK_WIDGET_MAPPED (widget))
+ if (gtk_widget_get_mapped (widget))
{
gtk_spin_button_stop_spinning (GTK_SPIN_BUTTON (widget));
diff --git a/gtk/gtkstatusbar.c b/gtk/gtkstatusbar.c
index 04212be199..66959aa5ad 100644
--- a/gtk/gtkstatusbar.c
+++ b/gtk/gtkstatusbar.c
@@ -489,7 +489,7 @@ gtk_statusbar_set_has_resize_grip (GtkStatusbar *statusbar,
if (statusbar->has_resize_grip && statusbar->grip_window == NULL)
{
gtk_statusbar_create_window (statusbar);
- if (GTK_WIDGET_MAPPED (statusbar))
+ if (gtk_widget_get_mapped (GTK_WIDGET (statusbar)))
gdk_window_show (statusbar->grip_window);
}
else if (!statusbar->has_resize_grip && statusbar->grip_window != NULL)
diff --git a/gtk/gtktoolbar.c b/gtk/gtktoolbar.c
index 261bfc15c1..3b3d9afae2 100644
--- a/gtk/gtktoolbar.c
+++ b/gtk/gtktoolbar.c
@@ -1908,7 +1908,7 @@ gtk_toolbar_focus_home_or_end (GtkToolbar *toolbar,
if (GTK_CONTAINER (toolbar)->focus_child == child)
break;
- if (GTK_WIDGET_MAPPED (child) && gtk_widget_child_focus (child, dir))
+ if (gtk_widget_get_mapped (child) && gtk_widget_child_focus (child, dir))
break;
}
@@ -1942,7 +1942,7 @@ gtk_toolbar_move_focus (GtkWidget *widget,
{
GtkWidget *child = list->data;
- if (try_focus && GTK_WIDGET_MAPPED (child) && gtk_widget_child_focus (child, dir))
+ if (try_focus && gtk_widget_get_mapped (child) && gtk_widget_child_focus (child, dir))
break;
if (child == GTK_CONTAINER (toolbar)->focus_child)
@@ -1977,7 +1977,7 @@ gtk_toolbar_focus (GtkWidget *widget,
{
GtkWidget *child = list->data;
- if (GTK_WIDGET_MAPPED (child) && gtk_widget_child_focus (child, dir))
+ if (gtk_widget_get_mapped (child) && gtk_widget_child_focus (child, dir))
{
result = TRUE;
break;
diff --git a/gtk/gtktoolitem.c b/gtk/gtktoolitem.c
index 143e904b79..70ee769174 100644
--- a/gtk/gtktoolitem.c
+++ b/gtk/gtktoolitem.c
@@ -1199,7 +1199,7 @@ gtk_tool_item_set_use_drag_window (GtkToolItem *toolitem,
if (!toolitem->priv->drag_window && GTK_WIDGET_REALIZED (toolitem))
{
create_drag_window(toolitem);
- if (GTK_WIDGET_MAPPED (toolitem))
+ if (gtk_widget_get_mapped (GTK_WIDGET (toolitem)))
gdk_window_show (toolitem->priv->drag_window);
}
}
diff --git a/gtk/gtktoolitemgroup.c b/gtk/gtktoolitemgroup.c
index 2c644f033e..2344c484b3 100644
--- a/gtk/gtktoolitemgroup.c
+++ b/gtk/gtktoolitemgroup.c
@@ -1036,7 +1036,7 @@ gtk_tool_item_group_size_allocate (GtkWidget *widget,
{
gtk_tool_item_group_real_size_allocate (widget, allocation);
- if (GTK_WIDGET_MAPPED (widget))
+ if (gtk_widget_get_mapped (widget))
gdk_window_invalidate_rect (widget->window, NULL, FALSE);
}
diff --git a/gtk/gtktree.c b/gtk/gtktree.c
index d1d4ee8d20..8878ff6aa7 100644
--- a/gtk/gtktree.c
+++ b/gtk/gtktree.c
@@ -522,14 +522,14 @@ gtk_tree_map (GtkWidget *widget)
children = children->next;
if (gtk_widget_get_visible (child) &&
- !GTK_WIDGET_MAPPED (child))
+ !gtk_widget_get_mapped (child))
gtk_widget_map (child);
if (GTK_TREE_ITEM (child)->subtree)
{
child = GTK_WIDGET (GTK_TREE_ITEM (child)->subtree);
- if (gtk_widget_get_visible (child) && !GTK_WIDGET_MAPPED (child))
+ if (gtk_widget_get_visible (child) && !gtk_widget_get_mapped (child))
gtk_widget_map (child);
}
}
@@ -725,7 +725,7 @@ gtk_tree_remove_items (GtkTree *tree,
g_message("* remove subtree associate at this item [%#x]\n",
(int) GTK_TREE_ITEM(widget)->subtree);
#endif /* TREE_DEBUG */
- if (GTK_WIDGET_MAPPED (GTK_TREE_ITEM(widget)->subtree))
+ if (gtk_widget_get_mapped (GTK_TREE_ITEM(widget)->subtree))
gtk_widget_unmap (GTK_TREE_ITEM(widget)->subtree);
gtk_widget_unparent (GTK_TREE_ITEM(widget)->subtree);
@@ -736,7 +736,7 @@ gtk_tree_remove_items (GtkTree *tree,
#ifdef TREE_DEBUG
g_message("* unmap and unparent widget [%#x]\n", (int)widget);
#endif /* TREE_DEBUG */
- if (GTK_WIDGET_MAPPED (widget))
+ if (gtk_widget_get_mapped (widget))
gtk_widget_unmap (widget);
gtk_widget_unparent (widget);
diff --git a/gtk/gtktreeitem.c b/gtk/gtktreeitem.c
index 9b9e82fc5a..237bd7ffe1 100644
--- a/gtk/gtktreeitem.c
+++ b/gtk/gtktreeitem.c
@@ -914,7 +914,7 @@ gtk_tree_item_remove_subtree (GtkTreeItem* item)
return;
}
- if (GTK_WIDGET_MAPPED (item->subtree))
+ if (gtk_widget_get_mapped (item->subtree))
gtk_widget_unmap (item->subtree);
gtk_widget_unparent (item->subtree);
@@ -947,12 +947,12 @@ gtk_tree_item_map (GtkWidget *widget)
if(item->pixmaps_box &&
gtk_widget_get_visible (item->pixmaps_box) &&
- !GTK_WIDGET_MAPPED (item->pixmaps_box))
+ !gtk_widget_get_mapped (item->pixmaps_box))
gtk_widget_map (item->pixmaps_box);
if (bin->child &&
gtk_widget_get_visible (bin->child) &&
- !GTK_WIDGET_MAPPED (bin->child))
+ !gtk_widget_get_mapped (bin->child))
gtk_widget_map (bin->child);
gdk_window_show (widget->window);
@@ -970,12 +970,12 @@ gtk_tree_item_unmap (GtkWidget *widget)
if(item->pixmaps_box &&
gtk_widget_get_visible (item->pixmaps_box) &&
- GTK_WIDGET_MAPPED (item->pixmaps_box))
+ gtk_widget_get_mapped (item->pixmaps_box))
gtk_widget_unmap (bin->child);
if (bin->child &&
gtk_widget_get_visible (bin->child) &&
- GTK_WIDGET_MAPPED (bin->child))
+ gtk_widget_get_mapped (bin->child))
gtk_widget_unmap (bin->child);
}
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index ead022f75c..6f96ffdced 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -1702,7 +1702,7 @@ gtk_tree_view_map_buttons (GtkTreeView *tree_view)
{
GList *list;
- g_return_if_fail (GTK_WIDGET_MAPPED (tree_view));
+ g_return_if_fail (gtk_widget_get_mapped (GTK_WIDGET (tree_view)));
if (GTK_TREE_VIEW_FLAG_SET (tree_view, GTK_TREE_VIEW_HEADERS_VISIBLE))
{
@@ -1712,7 +1712,7 @@ gtk_tree_view_map_buttons (GtkTreeView *tree_view)
{
column = list->data;
if (gtk_widget_get_visible (column->button) &&
- !GTK_WIDGET_MAPPED (column->button))
+ !gtk_widget_get_mapped (column->button))
gtk_widget_map (column->button);
}
for (list = tree_view->priv->columns; list; list = list->next)
@@ -1748,7 +1748,7 @@ gtk_tree_view_map (GtkWidget *widget)
if (gtk_widget_get_visible (child->widget))
{
- if (!GTK_WIDGET_MAPPED (child->widget))
+ if (!gtk_widget_get_mapped (child->widget))
gtk_widget_map (child->widget);
}
}
@@ -10970,7 +10970,7 @@ gtk_tree_view_set_headers_visible (GtkTreeView *tree_view,
{
gdk_window_move_resize (tree_view->priv->bin_window, x, y + TREE_VIEW_HEADER_HEIGHT (tree_view), tree_view->priv->width, GTK_WIDGET (tree_view)->allocation.height - + TREE_VIEW_HEADER_HEIGHT (tree_view));
- if (GTK_WIDGET_MAPPED (tree_view))
+ if (gtk_widget_get_mapped (GTK_WIDGET (tree_view)))
gtk_tree_view_map_buttons (tree_view);
}
else
@@ -12260,14 +12260,14 @@ gtk_tree_view_real_collapse_row (GtkTreeView *tree_view,
if (animate)
add_expand_collapse_timeout (tree_view, tree, node, FALSE);
- if (GTK_WIDGET_MAPPED (tree_view))
+ if (gtk_widget_get_mapped (GTK_WIDGET (tree_view)))
{
gtk_widget_queue_resize (GTK_WIDGET (tree_view));
}
g_signal_emit (tree_view, tree_view_signals[ROW_COLLAPSED], 0, &iter, path);
- if (GTK_WIDGET_MAPPED (tree_view))
+ if (gtk_widget_get_mapped (GTK_WIDGET (tree_view)))
{
/* now that we've collapsed all rows, we want to try to set the prelight
* again. To do this, we fake a motion event and send it to ourselves. */
diff --git a/gtk/gtkviewport.c b/gtk/gtkviewport.c
index 5d707d96fc..d9e35fb0d2 100644
--- a/gtk/gtkviewport.c
+++ b/gtk/gtkviewport.c
@@ -761,7 +761,7 @@ gtk_viewport_size_allocate (GtkWidget *widget,
/* If our size changed, and we have a shadow, queue a redraw on widget->window to
* redraw the shadow correctly.
*/
- if (GTK_WIDGET_MAPPED (widget) &&
+ if (gtk_widget_get_mapped (widget) &&
viewport->shadow_type != GTK_SHADOW_NONE &&
(widget->allocation.width != allocation->width ||
widget->allocation.height != allocation->height))
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index ce73637746..c988cdd1b6 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -3197,9 +3197,9 @@ gtk_widget_real_show (GtkWidget *widget)
GTK_WIDGET_SET_FLAGS (widget, GTK_VISIBLE);
if (widget->parent &&
- GTK_WIDGET_MAPPED (widget->parent) &&
+ gtk_widget_get_mapped (widget->parent) &&
GTK_WIDGET_CHILD_VISIBLE (widget) &&
- !GTK_WIDGET_MAPPED (widget))
+ !gtk_widget_get_mapped (widget))
gtk_widget_map (widget);
}
}
@@ -3231,7 +3231,7 @@ gtk_widget_show_now (GtkWidget *widget)
g_return_if_fail (GTK_IS_WIDGET (widget));
/* make sure we will get event */
- if (!GTK_WIDGET_MAPPED (widget) &&
+ if (!gtk_widget_get_mapped (widget) &&
gtk_widget_is_toplevel (widget))
{
gtk_widget_show (widget);
@@ -3282,7 +3282,7 @@ gtk_widget_real_hide (GtkWidget *widget)
{
GTK_WIDGET_UNSET_FLAGS (widget, GTK_VISIBLE);
- if (GTK_WIDGET_MAPPED (widget))
+ if (gtk_widget_get_mapped (widget))
gtk_widget_unmap (widget);
}
}
@@ -3370,7 +3370,7 @@ gtk_widget_map (GtkWidget *widget)
g_return_if_fail (gtk_widget_get_visible (widget));
g_return_if_fail (GTK_WIDGET_CHILD_VISIBLE (widget));
- if (!GTK_WIDGET_MAPPED (widget))
+ if (!gtk_widget_get_mapped (widget))
{
if (!GTK_WIDGET_REALIZED (widget))
gtk_widget_realize (widget);
@@ -3394,7 +3394,7 @@ gtk_widget_unmap (GtkWidget *widget)
{
g_return_if_fail (GTK_IS_WIDGET (widget));
- if (GTK_WIDGET_MAPPED (widget))
+ if (gtk_widget_get_mapped (widget))
{
if (!gtk_widget_get_has_window (widget))
gdk_window_invalidate_rect (widget->window, &widget->allocation, FALSE);
@@ -3606,7 +3606,7 @@ gtk_widget_queue_draw_area (GtkWidget *widget,
/* Just return if the widget or one of its ancestors isn't mapped */
for (w = widget; w != NULL; w = w->parent)
- if (!GTK_WIDGET_MAPPED (w))
+ if (!gtk_widget_get_mapped (w))
return;
/* Find the correct widget */
@@ -3658,7 +3658,7 @@ widget_add_child_draw_rectangle (GtkWidget *widget,
{
GdkRectangle child_rect;
- if (!GTK_WIDGET_MAPPED (widget) ||
+ if (!gtk_widget_get_mapped (widget) ||
widget->window != widget->parent->window)
return;
@@ -4060,7 +4060,7 @@ gtk_widget_size_allocate (GtkWidget *widget,
g_signal_emit (widget, widget_signals[SIZE_ALLOCATE], 0, &real_allocation);
- if (GTK_WIDGET_MAPPED (widget))
+ if (gtk_widget_get_mapped (widget))
{
if (!gtk_widget_get_has_window (widget) && GTK_WIDGET_REDRAW_ON_ALLOC (widget) && position_changed)
{
@@ -6009,7 +6009,7 @@ gtk_widget_get_mapped (GtkWidget *widget)
{
g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE);
- return (GTK_WIDGET_FLAGS (widget) & GTK_MAPPED) != 0;
+ return (GTK_OBJECT_FLAGS (widget) & GTK_MAPPED) != 0;
}
/**
@@ -6354,7 +6354,7 @@ gtk_widget_set_parent (GtkWidget *widget,
gtk_widget_get_visible (widget))
{
if (GTK_WIDGET_CHILD_VISIBLE (widget) &&
- GTK_WIDGET_MAPPED (widget->parent))
+ gtk_widget_get_mapped (widget->parent))
gtk_widget_map (widget);
gtk_widget_queue_resize (widget);
@@ -7445,7 +7445,7 @@ gtk_widget_set_child_visible (GtkWidget *widget,
if (widget->parent && GTK_WIDGET_REALIZED (widget->parent))
{
- if (GTK_WIDGET_MAPPED (widget->parent) &&
+ if (gtk_widget_get_mapped (widget->parent) &&
GTK_WIDGET_CHILD_VISIBLE (widget) &&
gtk_widget_get_visible (widget))
gtk_widget_map (widget);
@@ -8751,7 +8751,7 @@ gtk_widget_real_map (GtkWidget *widget)
{
g_assert (GTK_WIDGET_REALIZED (widget));
- if (!GTK_WIDGET_MAPPED (widget))
+ if (!gtk_widget_get_mapped (widget))
{
GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
@@ -8771,7 +8771,7 @@ gtk_widget_real_map (GtkWidget *widget)
static void
gtk_widget_real_unmap (GtkWidget *widget)
{
- if (GTK_WIDGET_MAPPED (widget))
+ if (gtk_widget_get_mapped (widget))
{
GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED);
@@ -8813,7 +8813,7 @@ gtk_widget_real_realize (GtkWidget *widget)
static void
gtk_widget_real_unrealize (GtkWidget *widget)
{
- if (GTK_WIDGET_MAPPED (widget))
+ if (gtk_widget_get_mapped (widget))
gtk_widget_real_unmap (widget);
GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED);
diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h
index 6e0a96c598..fa33c723e6 100644
--- a/gtk/gtkwidget.h
+++ b/gtk/gtkwidget.h
@@ -225,13 +225,17 @@ typedef enum
*/
#define GTK_WIDGET_REALIZED(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_REALIZED) != 0)
+#ifndef GTK_DISABLE_DEPRECATED
/**
* GTK_WIDGET_MAPPED:
* @wid: a #GtkWidget.
*
* Evaluates to %TRUE if the widget is mapped.
+ *
+ * Deprecated: 2.20: Use gtk_widget_get_mapped() instead.
*/
#define GTK_WIDGET_MAPPED(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_MAPPED) != 0)
+#endif
#ifndef GTK_DISABLE_DEPRECATED
/**
diff --git a/gtk/gtkwin32embedwidget.c b/gtk/gtkwin32embedwidget.c
index 0d90d2bf8b..1c28eb4fe2 100644
--- a/gtk/gtkwin32embedwidget.c
+++ b/gtk/gtkwin32embedwidget.c
@@ -271,7 +271,7 @@ gtk_win32_embed_widget_map (GtkWidget *widget)
if (bin->child &&
gtk_widget_get_visible (bin->child) &&
- !GTK_WIDGET_MAPPED (bin->child))
+ !gtk_widget_get_mapped (bin->child))
gtk_widget_map (bin->child);
gdk_window_show (widget->window);
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 86a915a4a0..1695e18041 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -1516,9 +1516,11 @@ void
gtk_window_set_startup_id (GtkWindow *window,
const gchar *startup_id)
{
- GtkWindowPrivate *priv = GTK_WINDOW_GET_PRIVATE (window);
+ GtkWindowPrivate *priv;
g_return_if_fail (GTK_IS_WINDOW (window));
+
+ priv = GTK_WINDOW_GET_PRIVATE (window);
g_free (priv->startup_id);
priv->startup_id = g_strdup (startup_id);
@@ -1543,7 +1545,8 @@ gtk_window_set_startup_id (GtkWindow *window,
priv->startup_id);
/* If window is mapped, terminate the startup-notification too */
- if (GTK_WIDGET_MAPPED (window) && !disable_startup_notification)
+ if (gtk_widget_get_mapped (GTK_WIDGET (window)) &&
+ !disable_startup_notification)
gdk_notify_startup_complete_with_id (priv->startup_id);
}
}
@@ -2437,7 +2440,7 @@ gtk_window_set_type_hint (GtkWindow *window,
GtkWindowPrivate *priv;
g_return_if_fail (GTK_IS_WINDOW (window));
- g_return_if_fail (!GTK_WIDGET_MAPPED (window));
+ g_return_if_fail (!gtk_widget_get_mapped (GTK_WIDGET (window)));
priv = GTK_WINDOW_GET_PRIVATE (window);
@@ -4078,7 +4081,7 @@ gtk_window_get_size (GtkWindow *window,
if (width == NULL && height == NULL)
return;
- if (GTK_WIDGET_MAPPED (window))
+ if (gtk_widget_get_mapped (GTK_WIDGET (window)))
{
gdk_drawable_get_size (GTK_WIDGET (window)->window,
&w, &h);
@@ -4157,7 +4160,7 @@ gtk_window_move (GtkWindow *window,
info = gtk_window_get_geometry_info (window, TRUE);
- if (GTK_WIDGET_MAPPED (window))
+ if (gtk_widget_get_mapped (widget))
{
/* we have now sent a request with this position
* with currently-active constraints, so toggle flag.
@@ -4264,7 +4267,7 @@ gtk_window_get_position (GtkWindow *window,
if (window->gravity == GDK_GRAVITY_STATIC)
{
- if (GTK_WIDGET_MAPPED (widget))
+ if (gtk_widget_get_mapped (widget))
{
/* This does a server round-trip, which is sort of wrong;
* but a server round-trip is inevitable for
@@ -4294,7 +4297,7 @@ gtk_window_get_position (GtkWindow *window,
gint x, y;
gint w, h;
- if (GTK_WIDGET_MAPPED (widget))
+ if (gtk_widget_get_mapped (widget))
{
if (window->frame)
gdk_window_get_frame_extents (window->frame, &frame_extents);
@@ -4566,7 +4569,7 @@ gtk_window_map (GtkWidget *widget)
if (window->bin.child &&
gtk_widget_get_visible (window->bin.child) &&
- !GTK_WIDGET_MAPPED (window->bin.child))
+ !gtk_widget_get_mapped (window->bin.child))
gtk_widget_map (window->bin.child);
if (window->frame)
@@ -4650,7 +4653,7 @@ static gboolean
gtk_window_map_event (GtkWidget *widget,
GdkEventAny *event)
{
- if (!GTK_WIDGET_MAPPED (widget))
+ if (!gtk_widget_get_mapped (widget))
{
/* we should be be unmapped, but are getting a MapEvent, this may happen
* to toplevel XWindows if mapping was intercepted by a window manager
@@ -5700,9 +5703,10 @@ static GtkWindowPosition
get_effective_position (GtkWindow *window)
{
GtkWindowPosition pos = window->position;
+
if (pos == GTK_WIN_POS_CENTER_ON_PARENT &&
(window->transient_parent == NULL ||
- !GTK_WIDGET_MAPPED (window->transient_parent)))
+ !gtk_widget_get_mapped (GTK_WIDGET (window->transient_parent))))
pos = GTK_WIN_POS_NONE;
return pos;
@@ -5880,7 +5884,7 @@ gtk_window_compute_configure_request (GtkWindow *window,
GdkRectangle monitor;
gint ox, oy;
- g_assert (GTK_WIDGET_MAPPED (parent_widget)); /* established earlier */
+ g_assert (gtk_widget_get_mapped (parent_widget)); /* established earlier */
if (parent_widget->window != NULL)
monitor_num = gdk_screen_get_monitor_at_window (screen,
@@ -7453,7 +7457,7 @@ gtk_window_set_screen (GtkWindow *window,
widget = GTK_WIDGET (window);
previous_screen = window->screen;
- was_mapped = GTK_WIDGET_MAPPED (widget);
+ was_mapped = gtk_widget_get_mapped (widget);
if (was_mapped)
gtk_widget_unmap (widget);
diff --git a/modules/other/gail/gail.c b/modules/other/gail/gail.c
index 48a33d86af..133952c2bd 100644
--- a/modules/other/gail/gail.c
+++ b/modules/other/gail/gail.c
@@ -348,7 +348,7 @@ gail_select_watcher (GSignalInvocationHint *ihint,
widget = GTK_WIDGET (object);
- if (!GTK_WIDGET_MAPPED (widget))
+ if (!gtk_widget_get_mapped (widget))
{
g_signal_connect (widget, "map",
G_CALLBACK (gail_map_cb),
@@ -369,7 +369,7 @@ gail_finish_select (GtkWidget *widget)
menu_item = GTK_MENU_ITEM (widget);
if (menu_item->submenu &&
- !GTK_WIDGET_MAPPED (menu_item->submenu))
+ !gtk_widget_get_mapped (menu_item->submenu))
{
/*
* If the submenu is not visble, wait until it is before
diff --git a/modules/other/gail/gailbutton.c b/modules/other/gail/gailbutton.c
index 3a1ac3d468..e5f17e6627 100644
--- a/modules/other/gail/gailbutton.c
+++ b/modules/other/gail/gailbutton.c
@@ -289,7 +289,7 @@ gail_button_real_initialize (AtkObject *obj,
label = get_label_from_button (widget, 0, FALSE);
if (GTK_IS_LABEL (label))
{
- if (GTK_WIDGET_MAPPED (label))
+ if (gtk_widget_get_mapped (label))
gail_button_init_textutil (button, label);
else
g_signal_connect (label,
diff --git a/modules/other/gail/gailcombo.c b/modules/other/gail/gailcombo.c
index 1f10ecbec8..3f4213050c 100644
--- a/modules/other/gail/gailcombo.c
+++ b/modules/other/gail/gailcombo.c
@@ -310,7 +310,7 @@ idle_do_action (gpointer data)
combo = GTK_COMBO (widget);
- do_popup = !GTK_WIDGET_MAPPED (combo->popwin);
+ do_popup = !gtk_widget_get_mapped (combo->popwin);
tmp_event.button.type = GDK_BUTTON_PRESS;
tmp_event.button.window = widget->window;
diff --git a/modules/other/gail/gailcombobox.c b/modules/other/gail/gailcombobox.c
index d33e919b0c..f7dc403f33 100644
--- a/modules/other/gail/gailcombobox.c
+++ b/modules/other/gail/gailcombobox.c
@@ -319,7 +319,7 @@ idle_do_action (gpointer data)
combo_box = GTK_COMBO_BOX (widget);
popup = gtk_combo_box_get_popup_accessible (combo_box);
- do_popup = !GTK_WIDGET_MAPPED (GTK_ACCESSIBLE (popup)->widget);
+ do_popup = !gtk_widget_get_mapped (GTK_ACCESSIBLE (popup)->widget);
if (do_popup)
gtk_combo_box_popup (combo_box);
else
diff --git a/modules/other/gail/gailexpander.c b/modules/other/gail/gailexpander.c
index fd42659a04..1d46819469 100644
--- a/modules/other/gail/gailexpander.c
+++ b/modules/other/gail/gailexpander.c
@@ -257,7 +257,7 @@ gail_expander_real_initialize (AtkObject *obj,
ATK_OBJECT_CLASS (gail_expander_parent_class)->initialize (obj, data);
expander = GTK_WIDGET (data);
- if (GTK_WIDGET_MAPPED (expander))
+ if (gtk_widget_get_mapped (expander))
gail_expander_init_textutil (gail_expander, GTK_EXPANDER (expander));
else
g_signal_connect (expander,
diff --git a/modules/other/gail/gailitem.c b/modules/other/gail/gailitem.c
index 438cc256f0..308e1618de 100644
--- a/modules/other/gail/gailitem.c
+++ b/modules/other/gail/gailitem.c
@@ -134,7 +134,7 @@ gail_item_real_initialize (AtkObject *obj,
label = get_label_from_container (GTK_WIDGET (data));
if (GTK_IS_LABEL (label))
{
- if (GTK_WIDGET_MAPPED (label))
+ if (gtk_widget_get_mapped (label))
gail_item_init_textutil (item, label);
else
g_signal_connect (label,
diff --git a/modules/other/gail/gaillabel.c b/modules/other/gail/gaillabel.c
index 903e395e29..b7e06eb45b 100644
--- a/modules/other/gail/gaillabel.c
+++ b/modules/other/gail/gaillabel.c
@@ -153,7 +153,7 @@ gail_label_real_initialize (AtkObject *obj,
widget = GTK_WIDGET (data);
- if (GTK_WIDGET_MAPPED (widget))
+ if (gtk_widget_get_mapped (widget))
gail_label_init_text_util (gail_label, widget);
else
g_signal_connect (widget,
diff --git a/modules/other/gail/gailmenuitem.c b/modules/other/gail/gailmenuitem.c
index 5677552268..28095930f1 100644
--- a/modules/other/gail/gailmenuitem.c
+++ b/modules/other/gail/gailmenuitem.c
@@ -325,7 +325,7 @@ ensure_menus_unposted (GailMenuItem *menu_item)
widget = GTK_ACCESSIBLE (parent)->widget;
if (GTK_IS_MENU (widget))
{
- if (GTK_WIDGET_MAPPED (widget))
+ if (gtk_widget_get_mapped (widget))
gtk_menu_shell_cancel (GTK_MENU_SHELL (widget));
return;
@@ -352,7 +352,7 @@ idle_do_action (gpointer data)
item_parent = gtk_widget_get_parent (item);
gtk_menu_shell_select_item (GTK_MENU_SHELL (item_parent), item);
- item_mapped = GTK_WIDGET_MAPPED (item);
+ item_mapped = gtk_widget_get_mapped (item);
/*
* This is what is called when <Return> is pressed for a menu item
*/
diff --git a/modules/other/gail/gailnotebookpage.c b/modules/other/gail/gailnotebookpage.c
index 3027754253..a258d35a20 100644
--- a/modules/other/gail/gailnotebookpage.c
+++ b/modules/other/gail/gailnotebookpage.c
@@ -203,7 +203,7 @@ gail_notebook_page_new (GtkNotebook *notebook,
label = get_label_from_notebook_page (page);
if (GTK_IS_LABEL (label))
{
- if (GTK_WIDGET_MAPPED (label))
+ if (gtk_widget_get_mapped (label))
gail_notebook_page_init_textutil (page, label);
else
g_signal_connect (label,
diff --git a/modules/other/gail/gailwidget.c b/modules/other/gail/gailwidget.c
index 95d4302981..4d550f0ea7 100644
--- a/modules/other/gail/gailwidget.c
+++ b/modules/other/gail/gailwidget.c
@@ -514,7 +514,7 @@ gail_widget_ref_state_set (AtkObject *accessible)
if (gtk_widget_get_visible (widget))
{
atk_state_set_add_state (state_set, ATK_STATE_VISIBLE);
- if (gail_widget_on_screen (widget) && GTK_WIDGET_MAPPED (widget) &&
+ if (gail_widget_on_screen (widget) && gtk_widget_get_mapped (widget) &&
gail_widget_all_parents_visible (widget))
{
atk_state_set_add_state (state_set, ATK_STATE_SHOWING);
@@ -937,7 +937,7 @@ gail_widget_map_gtk (GtkWidget *widget)
accessible = gtk_widget_get_accessible (widget);
atk_object_notify_state_change (accessible, ATK_STATE_SHOWING,
- GTK_WIDGET_MAPPED (widget));
+ gtk_widget_get_mapped (widget));
return 1;
}
diff --git a/modules/other/gail/gailwindow.c b/modules/other/gail/gailwindow.c
index 851179a381..5582b3a541 100644
--- a/modules/other/gail/gailwindow.c
+++ b/modules/other/gail/gailwindow.c
@@ -240,7 +240,7 @@ gail_window_real_initialize (AtkObject *obj,
* Notify that tooltip is showing
*/
if (obj->role == ATK_ROLE_TOOL_TIP &&
- GTK_WIDGET_MAPPED (widget))
+ gtk_widget_get_mapped (widget))
atk_object_notify_state_change (obj, ATK_STATE_SHOWING, 1);
}
diff --git a/perf/gtkwidgetprofiler.c b/perf/gtkwidgetprofiler.c
index 937d8f5384..69827146f5 100644
--- a/perf/gtkwidgetprofiler.c
+++ b/perf/gtkwidgetprofiler.c
@@ -168,7 +168,7 @@ create_widget_via_emission (GtkWidgetProfiler *profiler)
if (!widget)
g_error ("The profiler emitted the \"create-widget\" signal but the signal handler returned no widget!");
- if (gtk_widget_get_visible (widget) || GTK_WIDGET_MAPPED (widget))
+ if (gtk_widget_get_visible (widget) || gtk_widget_get_mapped (widget))
g_error ("The handler for \"create-widget\" must return an unmapped and unshown widget");
return widget;
diff --git a/tests/testgtk.c b/tests/testgtk.c
index 7cd4660858..b440e1d96c 100644
--- a/tests/testgtk.c
+++ b/tests/testgtk.c
@@ -6494,7 +6494,7 @@ list_toggle_sel_mode (GtkWidget *widget, gpointer data)
list = GTK_LIST (data);
- if (!GTK_WIDGET_MAPPED (widget))
+ if (!gtk_widget_get_mapped (widget))
return;
i = gtk_option_menu_get_history (GTK_OPTION_MENU (widget));
@@ -6950,7 +6950,7 @@ clist_toggle_sel_mode (GtkWidget *widget, gpointer data)
clist = GTK_CLIST (data);
- if (!GTK_WIDGET_MAPPED (widget))
+ if (!gtk_widget_get_mapped (widget))
return;
i = gtk_option_menu_get_history (GTK_OPTION_MENU (widget));
@@ -7581,7 +7581,7 @@ ctree_toggle_line_style (GtkWidget *widget, gpointer data)
ctree = GTK_CTREE (data);
- if (!GTK_WIDGET_MAPPED (widget))
+ if (!gtk_widget_get_mapped (widget))
return;
i = gtk_option_menu_get_history (GTK_OPTION_MENU (widget));
@@ -7603,7 +7603,7 @@ ctree_toggle_expander_style (GtkWidget *widget, gpointer data)
ctree = GTK_CTREE (data);
- if (!GTK_WIDGET_MAPPED (widget))
+ if (!gtk_widget_get_mapped (widget))
return;
i = gtk_option_menu_get_history (GTK_OPTION_MENU (widget));
@@ -7619,7 +7619,7 @@ ctree_toggle_justify (GtkWidget *widget, gpointer data)
ctree = GTK_CTREE (data);
- if (!GTK_WIDGET_MAPPED (widget))
+ if (!gtk_widget_get_mapped (widget))
return;
i = gtk_option_menu_get_history (GTK_OPTION_MENU (widget));
@@ -7636,7 +7636,7 @@ ctree_toggle_sel_mode (GtkWidget *widget, gpointer data)
ctree = GTK_CTREE (data);
- if (!GTK_WIDGET_MAPPED (widget))
+ if (!gtk_widget_get_mapped (widget))
return;
i = gtk_option_menu_get_history (GTK_OPTION_MENU (widget));
@@ -11694,7 +11694,7 @@ progressbar_toggle_orientation (GtkWidget *widget, gpointer data)
pdata = (ProgressData *) data;
- if (!GTK_WIDGET_MAPPED (widget))
+ if (!gtk_widget_get_mapped (widget))
return;
i = gtk_option_menu_get_history (GTK_OPTION_MENU (widget));
@@ -11735,7 +11735,7 @@ progressbar_toggle_bar_style (GtkWidget *widget, gpointer data)
pdata = (ProgressData *) data;
- if (!GTK_WIDGET_MAPPED (widget))
+ if (!gtk_widget_get_mapped (widget))
return;
i = gtk_option_menu_get_history (GTK_OPTION_MENU (widget));
@@ -12104,7 +12104,7 @@ find_widget (GtkWidget *widget, FindWidgetData *data)
new_allocation = widget->allocation;
- if (data->found || !GTK_WIDGET_MAPPED (widget))
+ if (data->found || !gtk_widget_get_mapped (widget))
return;
/* Note that in the following code, we only count the
diff --git a/tests/testinput.c b/tests/testinput.c
index fb04c22a57..de65a4cc0e 100644
--- a/tests/testinput.c
+++ b/tests/testinput.c
@@ -295,7 +295,7 @@ create_input_dialog (void)
}
else
{
- if (!GTK_WIDGET_MAPPED(inputd))
+ if (!gtk_widget_get_mapped(inputd))
gtk_widget_show(inputd);
else
gdk_window_raise(inputd->window);
diff --git a/tests/testtext.c b/tests/testtext.c
index 0bbd7899b1..36247df711 100644
--- a/tests/testtext.c
+++ b/tests/testtext.c
@@ -2595,7 +2595,7 @@ cursor_set_callback (GtkTextBuffer *buffer,
text_view = GTK_TEXT_VIEW (user_data);
- if (GTK_WIDGET_MAPPED (text_view) &&
+ if (gtk_widget_get_mapped (GTK_WIDGET (text_view)) &&
mark == gtk_text_buffer_get_insert (buffer))
{
GdkWindow *tab_window;