Deprecate widget flag: GTK_WIDGET_MAPPED

Use gtk_widget_get_mapped() instead.

https://bugzilla.gnome.org/show_bug.cgi?id=69872
This commit is contained in:
Javier Jardón 2010-03-02 05:19:28 +01:00 committed by Tristan Van Berkom
parent 8c1f5dbc03
commit e53efb120a
57 changed files with 164 additions and 154 deletions

View File

@ -13026,7 +13026,7 @@ create_input_dialog ()
} }
else else
{ {
if (!GTK_WIDGET_MAPPED(inputd)) if (!gtk_widget_get_mapped(inputd))
gtk_widget_show(inputd); gtk_widget_show(inputd);
else else
gdk_window_raise(inputd->window); gdk_window_raise(inputd->window);
@ -16017,7 +16017,7 @@ create_input_dialog ()
} }
else else
{ {
if (!GTK_WIDGET_MAPPED (inputd)) if (!gtk_widget_get_mapped (inputd))
gtk_widget_show (inputd); gtk_widget_show (inputd);
else else
gdk_window_raise (inputd->window); gdk_window_raise (inputd->window);

View File

@ -169,7 +169,7 @@ create_input_dialog ()
} }
else else
{ {
if (!GTK_WIDGET_MAPPED (inputd)) if (!gtk_widget_get_mapped (inputd))
gtk_widget_show (inputd); gtk_widget_show (inputd);
else else
gdk_window_raise (inputd->window); gdk_window_raise (inputd->window);

View File

@ -571,14 +571,14 @@ set_current_page (GtkAssistant *assistant,
g_signal_emit (assistant, signals [PREPARE], 0, priv->current_page->page); 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_set_child_visible (priv->current_page->page, TRUE);
gtk_widget_map (priv->current_page->page); gtk_widget_map (priv->current_page->page);
gtk_widget_map (priv->current_page->title); 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_set_child_visible (old_page->page, FALSE);
gtk_widget_unmap (old_page->page); gtk_widget_unmap (old_page->page);
@ -899,7 +899,7 @@ on_page_notify_visibility (GtkWidget *widget,
GtkAssistant *assistant = GTK_ASSISTANT (data); GtkAssistant *assistant = GTK_ASSISTANT (data);
/* update buttons state, flow may have changed */ /* 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); set_assistant_buttons_state (assistant);
} }
@ -1241,7 +1241,7 @@ gtk_assistant_map (GtkWidget *widget)
gtk_widget_map (priv->action_area); gtk_widget_map (priv->action_area);
if (gtk_widget_get_visible (priv->sidebar_image) && 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); gtk_widget_map (priv->sidebar_image);
/* if there's no default page, pick the first one */ /* if there's no default page, pick the first one */
@ -1259,7 +1259,7 @@ gtk_assistant_map (GtkWidget *widget)
if (page && if (page &&
gtk_widget_get_visible (page->page) && gtk_widget_get_visible (page->page) &&
!GTK_WIDGET_MAPPED (page->page)) !gtk_widget_get_mapped (page->page))
set_current_page (assistant, page); set_current_page (assistant, page);
GTK_WIDGET_CLASS (gtk_assistant_parent_class)->map (widget); 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 setting, for the cases where the
* initial page is != to 0 * 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->visited_pages = g_slist_prepend (priv->visited_pages,
priv->current_page); priv->current_page);

View File

@ -4615,7 +4615,7 @@ gtk_clist_unrealize (GtkWidget *widget)
/* freeze the list */ /* freeze the list */
clist->freeze_count++; clist->freeze_count++;
if (GTK_WIDGET_MAPPED (widget)) if (gtk_widget_get_mapped (widget))
gtk_clist_unmap (widget); gtk_clist_unmap (widget);
GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED); GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED);
@ -4684,7 +4684,7 @@ gtk_clist_map (GtkWidget *widget)
clist = GTK_CLIST (widget); clist = GTK_CLIST (widget);
if (!GTK_WIDGET_MAPPED (widget)) if (!gtk_widget_get_mapped (widget))
{ {
GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED); GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
@ -4693,7 +4693,7 @@ gtk_clist_map (GtkWidget *widget)
{ {
if (clist->column[i].button && if (clist->column[i].button &&
gtk_widget_get_visible (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); gtk_widget_map (clist->column[i].button);
} }
@ -4723,7 +4723,7 @@ gtk_clist_unmap (GtkWidget *widget)
clist = GTK_CLIST (widget); clist = GTK_CLIST (widget);
if (GTK_WIDGET_MAPPED (widget)) if (gtk_widget_get_mapped (widget))
{ {
GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED); GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED);
@ -4761,7 +4761,7 @@ gtk_clist_unmap (GtkWidget *widget)
/* unmap column buttons */ /* unmap column buttons */
for (i = 0; i < clist->columns; i++) for (i = 0; i < clist->columns; i++)
if (clist->column[i].button && 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); gtk_widget_unmap (clist->column[i].button);
/* freeze the list */ /* freeze the list */

View File

@ -1914,7 +1914,7 @@ gtk_combo_box_real_popup (GtkComboBox *combo_box)
if (!GTK_WIDGET_REALIZED (combo_box)) if (!GTK_WIDGET_REALIZED (combo_box))
return; return;
if (GTK_WIDGET_MAPPED (priv->popup_widget)) if (gtk_widget_get_mapped (priv->popup_widget))
return; return;
if (GTK_IS_MENU (priv->popup_widget)) if (GTK_IS_MENU (priv->popup_widget))
@ -3328,7 +3328,7 @@ list_popup_resize_idle (gpointer user_data)
GtkComboBoxPrivate *priv = combo_box->priv; GtkComboBoxPrivate *priv = combo_box->priv;
gint x, y, width, height; 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); gtk_combo_box_list_position (combo_box, &x, &y, &width, &height);

View File

@ -2657,7 +2657,7 @@ gtk_container_map_child (GtkWidget *child,
{ {
if (gtk_widget_get_visible (child) && if (gtk_widget_get_visible (child) &&
GTK_WIDGET_CHILD_VISIBLE (child) && GTK_WIDGET_CHILD_VISIBLE (child) &&
!GTK_WIDGET_MAPPED (child)) !gtk_widget_get_mapped (child))
gtk_widget_map (child); gtk_widget_map (child);
} }

View File

@ -667,7 +667,7 @@ gtk_drag_find_widget (GtkWidget *widget,
gint x_offset = 0; gint x_offset = 0;
gint y_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; return;
/* Note that in the following code, we only count the /* Note that in the following code, we only count the

View File

@ -1844,7 +1844,7 @@ gtk_drag_find_widget (GtkWidget *widget,
gint x_offset = 0; gint x_offset = 0;
gint y_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; return;
/* Note that in the following code, we only count the /* Note that in the following code, we only count the

View File

@ -2704,7 +2704,7 @@ gtk_entry_map (GtkWidget *widget)
EntryIconInfo *icon_info = NULL; EntryIconInfo *icon_info = NULL;
gint i; 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); GTK_WIDGET_CLASS (gtk_entry_parent_class)->map (widget);
@ -2728,7 +2728,7 @@ gtk_entry_unmap (GtkWidget *widget)
EntryIconInfo *icon_info = NULL; EntryIconInfo *icon_info = NULL;
gint i; gint i;
if (GTK_WIDGET_MAPPED (widget)) if (gtk_widget_get_mapped (widget))
{ {
for (i = 0; i < MAX_ICONS; i++) for (i = 0; i < MAX_ICONS; i++)
{ {
@ -3118,7 +3118,7 @@ gtk_entry_size_allocate (GtkWidget *widget,
gtk_entry_recompute (entry); gtk_entry_recompute (entry);
completion = gtk_entry_get_completion (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); _gtk_entry_completion_resize_popup (completion);
} }
} }
@ -6279,7 +6279,7 @@ paste_received (GtkClipboard *clipboard,
if (completion) if (completion)
{ {
if (GTK_WIDGET_MAPPED (completion->priv->popup_window)) if (gtk_widget_get_mapped (completion->priv->popup_window))
_gtk_entry_completion_popdown (completion); _gtk_entry_completion_popdown (completion);
if (!popup_completion && completion->priv->changed_id > 0) 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"); 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); 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"); 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); 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"); 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); 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"); 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); gdk_window_show_unraised (icon_info->window);
} }
@ -9301,7 +9301,7 @@ gtk_entry_completion_key_press (GtkWidget *widget,
gint matches, actions = 0; gint matches, actions = 0;
GtkEntryCompletion *completion = GTK_ENTRY_COMPLETION (user_data); 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; return FALSE;
matches = gtk_tree_model_iter_n_children (GTK_TREE_MODEL (completion->priv->filter_model), NULL); 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; 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); _gtk_entry_completion_popdown (old);
disconnect_completion_signals (entry, old); disconnect_completion_signals (entry, old);

View File

@ -834,7 +834,7 @@ gtk_entry_completion_popup_key_event (GtkWidget *widget,
{ {
GtkEntryCompletion *completion = GTK_ENTRY_COMPLETION (user_data); 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; return FALSE;
/* propagate event to the entry */ /* propagate event to the entry */
@ -850,7 +850,7 @@ gtk_entry_completion_popup_button_press (GtkWidget *widget,
{ {
GtkEntryCompletion *completion = GTK_ENTRY_COMPLETION (user_data); 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; return FALSE;
/* if we come here, it's usually time to popdown */ /* 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); GtkEntryCompletion *completion = GTK_ENTRY_COMPLETION (user_data);
GtkTreePath *path = NULL; GtkTreePath *path = NULL;
if (!GTK_WIDGET_MAPPED (completion->priv->popup_window)) if (!gtk_widget_get_mapped (completion->priv->popup_window))
return FALSE; return FALSE;
if (gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (widget), 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); GtkEntryCompletion *completion = GTK_ENTRY_COMPLETION (user_data);
GtkTreePath *path = NULL; GtkTreePath *path = NULL;
if (!GTK_WIDGET_MAPPED (completion->priv->popup_window)) if (!gtk_widget_get_mapped (completion->priv->popup_window))
return FALSE; return FALSE;
_gtk_entry_reset_im_context (GTK_ENTRY (completion->priv->entry)); _gtk_entry_reset_im_context (GTK_ENTRY (completion->priv->entry));
@ -1474,10 +1474,10 @@ _gtk_entry_completion_popup (GtkEntryCompletion *completion)
GList *renderers; GList *renderers;
GtkWidget *toplevel; GtkWidget *toplevel;
if (GTK_WIDGET_MAPPED (completion->priv->popup_window)) if (gtk_widget_get_mapped (completion->priv->popup_window))
return; return;
if (!GTK_WIDGET_MAPPED (completion->priv->entry)) if (!gtk_widget_get_mapped (completion->priv->entry))
return; return;
if (!gtk_widget_has_focus (completion->priv->entry)) if (!gtk_widget_has_focus (completion->priv->entry))
@ -1527,7 +1527,7 @@ _gtk_entry_completion_popup (GtkEntryCompletion *completion)
void void
_gtk_entry_completion_popdown (GtkEntryCompletion *completion) _gtk_entry_completion_popdown (GtkEntryCompletion *completion)
{ {
if (!GTK_WIDGET_MAPPED (completion->priv->popup_window)) if (!gtk_widget_get_mapped (completion->priv->popup_window))
return; return;
completion->priv->ignore_enter = FALSE; completion->priv->ignore_enter = FALSE;

View File

@ -1109,7 +1109,7 @@ update_preview_widget_visibility (GtkFileChooserDefault *impl)
else else
gtk_widget_hide (impl->preview_box); gtk_widget_hide (impl->preview_box);
if (!GTK_WIDGET_MAPPED (impl)) if (!gtk_widget_get_mapped (GTK_WIDGET (impl)))
emit_default_size_changed (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, * 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. * 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); browse_files_select_first_row (impl);
} }

View File

@ -200,7 +200,7 @@ file_chooser_widget_default_size_changed (GtkWidget *widget,
gtk_window_resize (GTK_WINDOW (dialog), default_width, default_height); 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 #if 0
/* FIXME: the code to restore the position does not work yet. It is not /* 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); ensure_default_response (dialog);
if (!GTK_WIDGET_MAPPED (priv->widget)) if (!gtk_widget_get_mapped (priv->widget))
gtk_widget_map (priv->widget); gtk_widget_map (priv->widget);
_gtk_file_chooser_embed_initial_focus (GTK_FILE_CHOOSER_EMBED (priv->widget)); _gtk_file_chooser_embed_initial_focus (GTK_FILE_CHOOSER_EMBED (priv->widget));

View File

@ -652,7 +652,7 @@ gtk_frame_size_allocate (GtkWidget *widget,
/* If the child allocation changed, that means that the frame is drawn /* If the child allocation changed, that means that the frame is drawn
* in a new place, so we must redraw the entire widget. * 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.x != frame->child_allocation.x ||
new_allocation.y != frame->child_allocation.y || new_allocation.y != frame->child_allocation.y ||
new_allocation.width != frame->child_allocation.width || new_allocation.width != frame->child_allocation.width ||

View File

@ -355,7 +355,7 @@ gtk_handle_box_map (GtkWidget *widget)
if (bin->child && if (bin->child &&
gtk_widget_get_visible (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_widget_map (bin->child);
if (hb->child_detached && !hb->float_window_mapped) if (hb->child_detached && !hb->float_window_mapped)

View File

@ -1834,7 +1834,7 @@ gtk_image_expose (GtkWidget *widget,
g_return_val_if_fail (GTK_IS_IMAGE (widget), FALSE); g_return_val_if_fail (GTK_IS_IMAGE (widget), FALSE);
g_return_val_if_fail (event != NULL, 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) GTK_IMAGE (widget)->storage_type != GTK_IMAGE_EMPTY)
{ {
GtkImage *image; GtkImage *image;

View File

@ -3710,7 +3710,7 @@ gtk_label_expose (GtkWidget *widget,
gtk_label_ensure_layout (label); 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')) label->text && (*label->text != '\0'))
{ {
get_layout_location (label, &x, &y); get_layout_location (label, &x, &y);
@ -4762,7 +4762,7 @@ gtk_label_ensure_select_info (GtkLabel *label)
if (GTK_WIDGET_REALIZED (label)) if (GTK_WIDGET_REALIZED (label))
gtk_label_create_window (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); gdk_window_show (label->select_info->window);
} }
} }

View File

@ -918,7 +918,7 @@ gtk_layout_map (GtkWidget *widget)
if (gtk_widget_get_visible (child->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); gtk_widget_map (child->widget);
} }
} }

View File

@ -487,7 +487,7 @@ gtk_list_unmap (GtkWidget *widget)
{ {
GtkList *list = GTK_LIST (widget); GtkList *list = GTK_LIST (widget);
if (!GTK_WIDGET_MAPPED (widget)) if (!gtk_widget_get_mapped (widget))
return; return;
GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED); GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED);

View File

@ -1461,7 +1461,7 @@ gtk_menu_popup (GtkMenu *menu,
while (tmp) while (tmp)
{ {
if (!GTK_WIDGET_MAPPED (tmp)) if (!gtk_widget_get_mapped (tmp))
{ {
viewable = FALSE; viewable = FALSE;
break; break;
@ -2918,7 +2918,7 @@ pointer_in_menu_window (GtkWidget *widget,
{ {
GtkMenu *menu = GTK_MENU (widget); GtkMenu *menu = GTK_MENU (widget);
if (GTK_WIDGET_MAPPED (menu->toplevel)) if (gtk_widget_get_mapped (menu->toplevel))
{ {
GtkMenuShell *menu_shell; GtkMenuShell *menu_shell;
gint window_x, window_y; gint window_x, window_y;

View File

@ -564,7 +564,7 @@ get_viewable_menu_bars (GtkWindow *window)
while (widget) while (widget)
{ {
if (!GTK_WIDGET_MAPPED (widget)) if (!gtk_widget_get_mapped (widget))
viewable = FALSE; viewable = FALSE;
widget = widget->parent; widget = widget->parent;

View File

@ -1344,7 +1344,7 @@ gtk_real_menu_item_select (GtkItem *item)
if (!touchscreen_mode && if (!touchscreen_mode &&
menu_item->submenu && 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 (menu_item->submenu)->tearoff_active))
{ {
_gtk_menu_item_popup_submenu (GTK_WIDGET (menu_item), TRUE); _gtk_menu_item_popup_submenu (GTK_WIDGET (menu_item), TRUE);

View File

@ -128,7 +128,7 @@ _gtk_mnemonic_hash_activate (GtkMnemonicHash *mnemonic_hash,
widget = GTK_WIDGET (list->data); widget = GTK_WIDGET (list->data);
if (gtk_widget_is_sensitive (widget) && if (gtk_widget_is_sensitive (widget) &&
GTK_WIDGET_MAPPED (widget) && gtk_widget_get_mapped (widget) &&
widget->window && widget->window &&
gdk_window_is_viewable (widget->window)) gdk_window_is_viewable (widget->window))
{ {

View File

@ -1743,7 +1743,7 @@ gtk_notebook_map (GtkWidget *widget)
if (notebook->cur_page && if (notebook->cur_page &&
gtk_widget_get_visible (notebook->cur_page->child) && 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); gtk_widget_map (notebook->cur_page->child);
for (i = 0; i < N_ACTION_WIDGETS; i++) for (i = 0; i < N_ACTION_WIDGETS; i++)
@ -1751,7 +1751,7 @@ gtk_notebook_map (GtkWidget *widget)
if (priv->action_widget[i] && if (priv->action_widget[i] &&
gtk_widget_get_visible (priv->action_widget[i]) && gtk_widget_get_visible (priv->action_widget[i]) &&
GTK_WIDGET_CHILD_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]); gtk_widget_map (priv->action_widget[i]);
} }
@ -1768,7 +1768,7 @@ gtk_notebook_map (GtkWidget *widget)
if (page->tab_label && if (page->tab_label &&
gtk_widget_get_visible (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); gtk_widget_map (page->tab_label);
} }
} }
@ -2160,7 +2160,7 @@ gtk_notebook_size_allocate (GtkWidget *widget,
gdk_window_move_resize (notebook->event_window, gdk_window_move_resize (notebook->event_window,
position.x, position.y, position.x, position.y,
position.width, position.height); position.width, position.height);
if (GTK_WIDGET_MAPPED (notebook)) if (gtk_widget_get_mapped (GTK_WIDGET (notebook)))
gdk_window_show_unraised (notebook->event_window); gdk_window_show_unraised (notebook->event_window);
} }
else else
@ -2619,7 +2619,7 @@ get_tab_at_pos (GtkNotebook *notebook, gint x, gint y)
page = children->data; page = children->data;
if (gtk_widget_get_visible (page->child) && 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) && (x >= page->allocation.x) &&
(y >= page->allocation.y) && (y >= page->allocation.y) &&
(x <= (page->allocation.x + page->allocation.width)) && (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) && if ((priv->operation != DRAG_OPERATION_REORDER || page != notebook->cur_page) &&
gtk_widget_get_visible (page->child) && gtk_widget_get_visible (page->child) &&
page->tab_label && page->tab_label &&
GTK_WIDGET_MAPPED (page->tab_label) && gtk_widget_get_mapped (page->tab_label) &&
page->pack == pack) page->pack == pack)
{ {
switch (notebook->tab_pos) switch (notebook->tab_pos)
@ -4439,7 +4439,7 @@ gtk_notebook_redraw_tabs (GtkNotebook *notebook)
widget = GTK_WIDGET (notebook); widget = GTK_WIDGET (notebook);
border = GTK_CONTAINER (notebook)->border_width; border = GTK_CONTAINER (notebook)->border_width;
if (!GTK_WIDGET_MAPPED (notebook) || !notebook->first_tab) if (!gtk_widget_get_mapped (widget) || !notebook->first_tab)
return; return;
page = notebook->first_tab->data; page = notebook->first_tab->data;
@ -4488,7 +4488,8 @@ gtk_notebook_redraw_tabs (GtkNotebook *notebook)
static void static void
gtk_notebook_redraw_arrows (GtkNotebook *notebook) 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; GdkRectangle rect;
gint i; gint i;
@ -4867,7 +4868,7 @@ gtk_notebook_paint (GtkWidget *widget,
if (!notebook->first_tab) if (!notebook->first_tab)
notebook->first_tab = notebook->children; 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); page = GTK_NOTEBOOK_PAGE (notebook->first_tab);
else else
page = notebook->cur_page; page = notebook->cur_page;
@ -4889,7 +4890,7 @@ gtk_notebook_paint (GtkWidget *widget,
} }
if (!NOTEBOOK_IS_TAB_LABEL_PARENT (notebook, notebook->cur_page) || 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_x = 0;
gap_width = 0; gap_width = 0;
@ -4935,7 +4936,7 @@ gtk_notebook_paint (GtkWidget *widget,
step, TRUE); step, TRUE);
if (!gtk_widget_get_visible (page->child)) if (!gtk_widget_get_visible (page->child))
continue; continue;
if (!GTK_WIDGET_MAPPED (page->tab_label)) if (!gtk_widget_get_mapped (page->tab_label))
showarrow = TRUE; showarrow = TRUE;
else if (page != notebook->cur_page) else if (page != notebook->cur_page)
gtk_notebook_draw_tab (notebook, page, area); gtk_notebook_draw_tab (notebook, page, area);
@ -4969,7 +4970,7 @@ gtk_notebook_draw_tab (GtkNotebook *notebook,
GtkWidget *widget; GtkWidget *widget;
if (!NOTEBOOK_IS_TAB_LABEL_PARENT (notebook, page) || 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)) (page->allocation.width == 0) || (page->allocation.height == 0))
return; return;
@ -6214,7 +6215,7 @@ gtk_notebook_switch_focus_tab (GtkNotebook *notebook,
return; return;
page = notebook->focus_tab->data; 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); gtk_notebook_redraw_tabs (notebook);
else else
gtk_notebook_pages_allocate (notebook); gtk_notebook_pages_allocate (notebook);

View File

@ -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); 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.x != paned->handle_pos.x ||
old_handle_pos.y != paned->handle_pos.y || old_handle_pos.y != paned->handle_pos.y ||
old_handle_pos.width != paned->handle_pos.width || 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_REALIZED (widget))
{ {
if (GTK_WIDGET_MAPPED (widget)) if (gtk_widget_get_mapped (widget))
gdk_window_show (paned->handle); gdk_window_show (paned->handle);
if (paned->priv->orientation == GTK_ORIENTATION_HORIZONTAL) 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 /* Now allocate the childen, making sure, when resizing not to
* overlap the windows * overlap the windows
*/ */
if (GTK_WIDGET_MAPPED (widget) && if (gtk_widget_get_mapped (widget) &&
((paned->priv->orientation == GTK_ORIENTATION_HORIZONTAL && ((paned->priv->orientation == GTK_ORIENTATION_HORIZONTAL &&
paned->child1->allocation.width < child1_allocation.width) || paned->child1->allocation.width < child1_allocation.width) ||
@ -1070,7 +1070,7 @@ gtk_paned_expose (GtkWidget *widget,
{ {
GtkPaned *paned = GTK_PANED (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->child1 && gtk_widget_get_visible (paned->child1) &&
paned->child2 && gtk_widget_get_visible (paned->child2)) paned->child2 && gtk_widget_get_visible (paned->child2))
{ {

View File

@ -217,7 +217,7 @@ gtk_plug_set_is_child (GtkPlug *plug,
* here, but don't bother remapping -- we will get mapped * here, but don't bother remapping -- we will get mapped
* by gtk_widget_set_parent (). * 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_widget_unmap (GTK_WIDGET (plug));
_gtk_window_set_is_toplevel (GTK_WINDOW (plug), FALSE); _gtk_window_set_is_toplevel (GTK_WINDOW (plug), FALSE);
@ -692,7 +692,7 @@ gtk_plug_map (GtkWidget *widget)
if (bin->child && if (bin->child &&
gtk_widget_get_visible (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_widget_map (bin->child);
_gtk_plug_windowing_map_toplevel (plug); _gtk_plug_windowing_map_toplevel (plug);

View File

@ -498,7 +498,7 @@ gtk_radio_button_focus (GtkWidget *widget,
{ {
GtkWidget *child = tmp_list->data; 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; new_focus = child;
break; break;
@ -534,7 +534,7 @@ gtk_radio_button_focus (GtkWidget *widget,
{ {
GtkWidget *child = tmp_list->data; 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; new_focus = child;
break; break;

View File

@ -230,7 +230,7 @@ gtk_recent_chooser_dialog_map (GtkWidget *widget)
GtkRecentChooserDialog *dialog = GTK_RECENT_CHOOSER_DIALOG (widget); GtkRecentChooserDialog *dialog = GTK_RECENT_CHOOSER_DIALOG (widget);
GtkRecentChooserDialogPrivate *priv = dialog->priv; GtkRecentChooserDialogPrivate *priv = dialog->priv;
if (!GTK_WIDGET_MAPPED (priv->chooser)) if (!gtk_widget_get_mapped (priv->chooser))
gtk_widget_map (priv->chooser); gtk_widget_map (priv->chooser);
GTK_WIDGET_CLASS (gtk_recent_chooser_dialog_parent_class)->map (widget); GTK_WIDGET_CLASS (gtk_recent_chooser_dialog_parent_class)->map (widget);

View File

@ -664,7 +664,7 @@ gtk_scale_set_value_pos (GtkScale *scale,
widget = GTK_WIDGET (scale); widget = GTK_WIDGET (scale);
_gtk_scale_clear_layout (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); gtk_widget_queue_resize (widget);
g_object_notify (G_OBJECT (scale), "value-pos"); g_object_notify (G_OBJECT (scale), "value-pos");

View File

@ -736,7 +736,7 @@ compute_dimension (GtkWidget *widget,
&tmp_widget_minimum_size, &tmp_widget_minimum_size,
&tmp_widget_natural_size); &tmp_widget_natural_size);
if (GTK_WIDGET_MAPPED (tmp_widget) || !group->ignore_hidden) if (gtk_widget_get_mapped (tmp_widget) || !group->ignore_hidden)
{ {
if (result_minimum_size < tmp_widget_minimum_size) if (result_minimum_size < tmp_widget_minimum_size)
result_minimum_size = tmp_widget_minimum_size; result_minimum_size = tmp_widget_minimum_size;

View File

@ -517,7 +517,7 @@ gtk_spin_button_destroy (GtkObject *object)
static void static void
gtk_spin_button_map (GtkWidget *widget) 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); GTK_WIDGET_CLASS (gtk_spin_button_parent_class)->map (widget);
gdk_window_show (GTK_SPIN_BUTTON (widget)->panel); gdk_window_show (GTK_SPIN_BUTTON (widget)->panel);
@ -527,7 +527,7 @@ gtk_spin_button_map (GtkWidget *widget)
static void static void
gtk_spin_button_unmap (GtkWidget *widget) 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)); gtk_spin_button_stop_spinning (GTK_SPIN_BUTTON (widget));

View File

@ -489,7 +489,7 @@ gtk_statusbar_set_has_resize_grip (GtkStatusbar *statusbar,
if (statusbar->has_resize_grip && statusbar->grip_window == NULL) if (statusbar->has_resize_grip && statusbar->grip_window == NULL)
{ {
gtk_statusbar_create_window (statusbar); gtk_statusbar_create_window (statusbar);
if (GTK_WIDGET_MAPPED (statusbar)) if (gtk_widget_get_mapped (GTK_WIDGET (statusbar)))
gdk_window_show (statusbar->grip_window); gdk_window_show (statusbar->grip_window);
} }
else if (!statusbar->has_resize_grip && statusbar->grip_window != NULL) else if (!statusbar->has_resize_grip && statusbar->grip_window != NULL)

View File

@ -1908,7 +1908,7 @@ gtk_toolbar_focus_home_or_end (GtkToolbar *toolbar,
if (GTK_CONTAINER (toolbar)->focus_child == child) if (GTK_CONTAINER (toolbar)->focus_child == child)
break; 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; break;
} }
@ -1942,7 +1942,7 @@ gtk_toolbar_move_focus (GtkWidget *widget,
{ {
GtkWidget *child = list->data; 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; break;
if (child == GTK_CONTAINER (toolbar)->focus_child) if (child == GTK_CONTAINER (toolbar)->focus_child)
@ -1977,7 +1977,7 @@ gtk_toolbar_focus (GtkWidget *widget,
{ {
GtkWidget *child = list->data; 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; result = TRUE;
break; break;

View File

@ -1199,7 +1199,7 @@ gtk_tool_item_set_use_drag_window (GtkToolItem *toolitem,
if (!toolitem->priv->drag_window && GTK_WIDGET_REALIZED (toolitem)) if (!toolitem->priv->drag_window && GTK_WIDGET_REALIZED (toolitem))
{ {
create_drag_window(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); gdk_window_show (toolitem->priv->drag_window);
} }
} }

View File

@ -1036,7 +1036,7 @@ gtk_tool_item_group_size_allocate (GtkWidget *widget,
{ {
gtk_tool_item_group_real_size_allocate (widget, allocation); 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); gdk_window_invalidate_rect (widget->window, NULL, FALSE);
} }

View File

@ -522,14 +522,14 @@ gtk_tree_map (GtkWidget *widget)
children = children->next; children = children->next;
if (gtk_widget_get_visible (child) && if (gtk_widget_get_visible (child) &&
!GTK_WIDGET_MAPPED (child)) !gtk_widget_get_mapped (child))
gtk_widget_map (child); gtk_widget_map (child);
if (GTK_TREE_ITEM (child)->subtree) if (GTK_TREE_ITEM (child)->subtree)
{ {
child = GTK_WIDGET (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); gtk_widget_map (child);
} }
} }
@ -725,7 +725,7 @@ gtk_tree_remove_items (GtkTree *tree,
g_message("* remove subtree associate at this item [%#x]\n", g_message("* remove subtree associate at this item [%#x]\n",
(int) GTK_TREE_ITEM(widget)->subtree); (int) GTK_TREE_ITEM(widget)->subtree);
#endif /* TREE_DEBUG */ #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_unmap (GTK_TREE_ITEM(widget)->subtree);
gtk_widget_unparent (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 #ifdef TREE_DEBUG
g_message("* unmap and unparent widget [%#x]\n", (int)widget); g_message("* unmap and unparent widget [%#x]\n", (int)widget);
#endif /* TREE_DEBUG */ #endif /* TREE_DEBUG */
if (GTK_WIDGET_MAPPED (widget)) if (gtk_widget_get_mapped (widget))
gtk_widget_unmap (widget); gtk_widget_unmap (widget);
gtk_widget_unparent (widget); gtk_widget_unparent (widget);

View File

@ -914,7 +914,7 @@ gtk_tree_item_remove_subtree (GtkTreeItem* item)
return; return;
} }
if (GTK_WIDGET_MAPPED (item->subtree)) if (gtk_widget_get_mapped (item->subtree))
gtk_widget_unmap (item->subtree); gtk_widget_unmap (item->subtree);
gtk_widget_unparent (item->subtree); gtk_widget_unparent (item->subtree);
@ -947,12 +947,12 @@ gtk_tree_item_map (GtkWidget *widget)
if(item->pixmaps_box && if(item->pixmaps_box &&
gtk_widget_get_visible (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); gtk_widget_map (item->pixmaps_box);
if (bin->child && if (bin->child &&
gtk_widget_get_visible (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_widget_map (bin->child);
gdk_window_show (widget->window); gdk_window_show (widget->window);
@ -970,12 +970,12 @@ gtk_tree_item_unmap (GtkWidget *widget)
if(item->pixmaps_box && if(item->pixmaps_box &&
gtk_widget_get_visible (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); gtk_widget_unmap (bin->child);
if (bin->child && if (bin->child &&
gtk_widget_get_visible (bin->child) && gtk_widget_get_visible (bin->child) &&
GTK_WIDGET_MAPPED (bin->child)) gtk_widget_get_mapped (bin->child))
gtk_widget_unmap (bin->child); gtk_widget_unmap (bin->child);
} }

View File

@ -1706,7 +1706,7 @@ gtk_tree_view_map_buttons (GtkTreeView *tree_view)
{ {
GList *list; 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)) if (GTK_TREE_VIEW_FLAG_SET (tree_view, GTK_TREE_VIEW_HEADERS_VISIBLE))
{ {
@ -1716,7 +1716,7 @@ gtk_tree_view_map_buttons (GtkTreeView *tree_view)
{ {
column = list->data; column = list->data;
if (gtk_widget_get_visible (column->button) && if (gtk_widget_get_visible (column->button) &&
!GTK_WIDGET_MAPPED (column->button)) !gtk_widget_get_mapped (column->button))
gtk_widget_map (column->button); gtk_widget_map (column->button);
} }
for (list = tree_view->priv->columns; list; list = list->next) for (list = tree_view->priv->columns; list; list = list->next)
@ -1752,7 +1752,7 @@ gtk_tree_view_map (GtkWidget *widget)
if (gtk_widget_get_visible (child->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); gtk_widget_map (child->widget);
} }
} }
@ -11016,7 +11016,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)); 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); gtk_tree_view_map_buttons (tree_view);
} }
else else
@ -12306,14 +12306,14 @@ gtk_tree_view_real_collapse_row (GtkTreeView *tree_view,
if (animate) if (animate)
add_expand_collapse_timeout (tree_view, tree, node, FALSE); 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)); gtk_widget_queue_resize (GTK_WIDGET (tree_view));
} }
g_signal_emit (tree_view, tree_view_signals[ROW_COLLAPSED], 0, &iter, path); 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 /* 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. */ * again. To do this, we fake a motion event and send it to ourselves. */

View File

@ -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 /* If our size changed, and we have a shadow, queue a redraw on widget->window to
* redraw the shadow correctly. * redraw the shadow correctly.
*/ */
if (GTK_WIDGET_MAPPED (widget) && if (gtk_widget_get_mapped (widget) &&
viewport->shadow_type != GTK_SHADOW_NONE && viewport->shadow_type != GTK_SHADOW_NONE &&
(widget->allocation.width != allocation->width || (widget->allocation.width != allocation->width ||
widget->allocation.height != allocation->height)) widget->allocation.height != allocation->height))

View File

@ -3211,9 +3211,9 @@ gtk_widget_real_show (GtkWidget *widget)
GTK_WIDGET_SET_FLAGS (widget, GTK_VISIBLE); GTK_WIDGET_SET_FLAGS (widget, GTK_VISIBLE);
if (widget->parent && if (widget->parent &&
GTK_WIDGET_MAPPED (widget->parent) && gtk_widget_get_mapped (widget->parent) &&
GTK_WIDGET_CHILD_VISIBLE (widget) && GTK_WIDGET_CHILD_VISIBLE (widget) &&
!GTK_WIDGET_MAPPED (widget)) !gtk_widget_get_mapped (widget))
gtk_widget_map (widget); gtk_widget_map (widget);
} }
} }
@ -3245,7 +3245,7 @@ gtk_widget_show_now (GtkWidget *widget)
g_return_if_fail (GTK_IS_WIDGET (widget)); g_return_if_fail (GTK_IS_WIDGET (widget));
/* make sure we will get event */ /* make sure we will get event */
if (!GTK_WIDGET_MAPPED (widget) && if (!gtk_widget_get_mapped (widget) &&
gtk_widget_is_toplevel (widget)) gtk_widget_is_toplevel (widget))
{ {
gtk_widget_show (widget); gtk_widget_show (widget);
@ -3296,7 +3296,7 @@ gtk_widget_real_hide (GtkWidget *widget)
{ {
GTK_WIDGET_UNSET_FLAGS (widget, GTK_VISIBLE); GTK_WIDGET_UNSET_FLAGS (widget, GTK_VISIBLE);
if (GTK_WIDGET_MAPPED (widget)) if (gtk_widget_get_mapped (widget))
gtk_widget_unmap (widget); gtk_widget_unmap (widget);
} }
} }
@ -3384,7 +3384,7 @@ gtk_widget_map (GtkWidget *widget)
g_return_if_fail (gtk_widget_get_visible (widget)); g_return_if_fail (gtk_widget_get_visible (widget));
g_return_if_fail (GTK_WIDGET_CHILD_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)) if (!GTK_WIDGET_REALIZED (widget))
gtk_widget_realize (widget); gtk_widget_realize (widget);
@ -3408,7 +3408,7 @@ gtk_widget_unmap (GtkWidget *widget)
{ {
g_return_if_fail (GTK_IS_WIDGET (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)) if (!gtk_widget_get_has_window (widget))
gdk_window_invalidate_rect (widget->window, &widget->allocation, FALSE); gdk_window_invalidate_rect (widget->window, &widget->allocation, FALSE);
@ -3620,7 +3620,7 @@ gtk_widget_queue_draw_area (GtkWidget *widget,
/* Just return if the widget or one of its ancestors isn't mapped */ /* Just return if the widget or one of its ancestors isn't mapped */
for (w = widget; w != NULL; w = w->parent) for (w = widget; w != NULL; w = w->parent)
if (!GTK_WIDGET_MAPPED (w)) if (!gtk_widget_get_mapped (w))
return; return;
/* Find the correct widget */ /* Find the correct widget */
@ -3672,7 +3672,7 @@ widget_add_child_draw_rectangle (GtkWidget *widget,
{ {
GdkRectangle child_rect; GdkRectangle child_rect;
if (!GTK_WIDGET_MAPPED (widget) || if (!gtk_widget_get_mapped (widget) ||
widget->window != widget->parent->window) widget->window != widget->parent->window)
return; return;
@ -4075,7 +4075,7 @@ gtk_widget_size_allocate (GtkWidget *widget,
g_signal_emit (widget, widget_signals[SIZE_ALLOCATE], 0, &real_allocation); 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) if (!gtk_widget_get_has_window (widget) && GTK_WIDGET_REDRAW_ON_ALLOC (widget) && position_changed)
{ {
@ -6024,7 +6024,7 @@ gtk_widget_get_mapped (GtkWidget *widget)
{ {
g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE); 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;
} }
/** /**
@ -6369,7 +6369,7 @@ gtk_widget_set_parent (GtkWidget *widget,
gtk_widget_get_visible (widget)) gtk_widget_get_visible (widget))
{ {
if (GTK_WIDGET_CHILD_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_map (widget);
gtk_widget_queue_resize (widget); gtk_widget_queue_resize (widget);
@ -7460,7 +7460,7 @@ gtk_widget_set_child_visible (GtkWidget *widget,
if (widget->parent && GTK_WIDGET_REALIZED (widget->parent)) 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_CHILD_VISIBLE (widget) &&
gtk_widget_get_visible (widget)) gtk_widget_get_visible (widget))
gtk_widget_map (widget); gtk_widget_map (widget);
@ -8766,7 +8766,7 @@ gtk_widget_real_map (GtkWidget *widget)
{ {
g_assert (GTK_WIDGET_REALIZED (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); GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
@ -8786,7 +8786,7 @@ gtk_widget_real_map (GtkWidget *widget)
static void static void
gtk_widget_real_unmap (GtkWidget *widget) gtk_widget_real_unmap (GtkWidget *widget)
{ {
if (GTK_WIDGET_MAPPED (widget)) if (gtk_widget_get_mapped (widget))
{ {
GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED); GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED);
@ -8828,7 +8828,7 @@ gtk_widget_real_realize (GtkWidget *widget)
static void static void
gtk_widget_real_unrealize (GtkWidget *widget) gtk_widget_real_unrealize (GtkWidget *widget)
{ {
if (GTK_WIDGET_MAPPED (widget)) if (gtk_widget_get_mapped (widget))
gtk_widget_real_unmap (widget); gtk_widget_real_unmap (widget);
GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED); GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED);

View File

@ -225,13 +225,17 @@ typedef enum
*/ */
#define GTK_WIDGET_REALIZED(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_REALIZED) != 0) #define GTK_WIDGET_REALIZED(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_REALIZED) != 0)
#ifndef GTK_DISABLE_DEPRECATED
/** /**
* GTK_WIDGET_MAPPED: * GTK_WIDGET_MAPPED:
* @wid: a #GtkWidget. * @wid: a #GtkWidget.
* *
* Evaluates to %TRUE if the widget is mapped. * 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) #define GTK_WIDGET_MAPPED(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_MAPPED) != 0)
#endif
#ifndef GTK_DISABLE_DEPRECATED #ifndef GTK_DISABLE_DEPRECATED
/** /**

View File

@ -271,7 +271,7 @@ gtk_win32_embed_widget_map (GtkWidget *widget)
if (bin->child && if (bin->child &&
gtk_widget_get_visible (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_widget_map (bin->child);
gdk_window_show (widget->window); gdk_window_show (widget->window);

View File

@ -1516,10 +1516,12 @@ void
gtk_window_set_startup_id (GtkWindow *window, gtk_window_set_startup_id (GtkWindow *window,
const gchar *startup_id) const gchar *startup_id)
{ {
GtkWindowPrivate *priv = GTK_WINDOW_GET_PRIVATE (window); GtkWindowPrivate *priv;
g_return_if_fail (GTK_IS_WINDOW (window)); g_return_if_fail (GTK_IS_WINDOW (window));
priv = GTK_WINDOW_GET_PRIVATE (window);
g_free (priv->startup_id); g_free (priv->startup_id);
priv->startup_id = g_strdup (startup_id); priv->startup_id = g_strdup (startup_id);
@ -1543,7 +1545,8 @@ gtk_window_set_startup_id (GtkWindow *window,
priv->startup_id); priv->startup_id);
/* If window is mapped, terminate the startup-notification too */ /* 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); gdk_notify_startup_complete_with_id (priv->startup_id);
} }
} }
@ -2437,7 +2440,7 @@ gtk_window_set_type_hint (GtkWindow *window,
GtkWindowPrivate *priv; GtkWindowPrivate *priv;
g_return_if_fail (GTK_IS_WINDOW (window)); 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); priv = GTK_WINDOW_GET_PRIVATE (window);
@ -4078,7 +4081,7 @@ gtk_window_get_size (GtkWindow *window,
if (width == NULL && height == NULL) if (width == NULL && height == NULL)
return; return;
if (GTK_WIDGET_MAPPED (window)) if (gtk_widget_get_mapped (GTK_WIDGET (window)))
{ {
gdk_drawable_get_size (GTK_WIDGET (window)->window, gdk_drawable_get_size (GTK_WIDGET (window)->window,
&w, &h); &w, &h);
@ -4157,7 +4160,7 @@ gtk_window_move (GtkWindow *window,
info = gtk_window_get_geometry_info (window, TRUE); 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 /* we have now sent a request with this position
* with currently-active constraints, so toggle flag. * with currently-active constraints, so toggle flag.
@ -4264,7 +4267,7 @@ gtk_window_get_position (GtkWindow *window,
if (window->gravity == GDK_GRAVITY_STATIC) 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; /* This does a server round-trip, which is sort of wrong;
* but a server round-trip is inevitable for * but a server round-trip is inevitable for
@ -4294,7 +4297,7 @@ gtk_window_get_position (GtkWindow *window,
gint x, y; gint x, y;
gint w, h; gint w, h;
if (GTK_WIDGET_MAPPED (widget)) if (gtk_widget_get_mapped (widget))
{ {
if (window->frame) if (window->frame)
gdk_window_get_frame_extents (window->frame, &frame_extents); gdk_window_get_frame_extents (window->frame, &frame_extents);
@ -4566,7 +4569,7 @@ gtk_window_map (GtkWidget *widget)
if (window->bin.child && if (window->bin.child &&
gtk_widget_get_visible (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); gtk_widget_map (window->bin.child);
if (window->frame) if (window->frame)
@ -4650,7 +4653,7 @@ static gboolean
gtk_window_map_event (GtkWidget *widget, gtk_window_map_event (GtkWidget *widget,
GdkEventAny *event) 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 /* we should be be unmapped, but are getting a MapEvent, this may happen
* to toplevel XWindows if mapping was intercepted by a window manager * to toplevel XWindows if mapping was intercepted by a window manager
@ -5700,9 +5703,10 @@ static GtkWindowPosition
get_effective_position (GtkWindow *window) get_effective_position (GtkWindow *window)
{ {
GtkWindowPosition pos = window->position; GtkWindowPosition pos = window->position;
if (pos == GTK_WIN_POS_CENTER_ON_PARENT && if (pos == GTK_WIN_POS_CENTER_ON_PARENT &&
(window->transient_parent == NULL || (window->transient_parent == NULL ||
!GTK_WIDGET_MAPPED (window->transient_parent))) !gtk_widget_get_mapped (GTK_WIDGET (window->transient_parent))))
pos = GTK_WIN_POS_NONE; pos = GTK_WIN_POS_NONE;
return pos; return pos;
@ -5880,7 +5884,7 @@ gtk_window_compute_configure_request (GtkWindow *window,
GdkRectangle monitor; GdkRectangle monitor;
gint ox, oy; 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) if (parent_widget->window != NULL)
monitor_num = gdk_screen_get_monitor_at_window (screen, monitor_num = gdk_screen_get_monitor_at_window (screen,
@ -7453,7 +7457,7 @@ gtk_window_set_screen (GtkWindow *window,
widget = GTK_WIDGET (window); widget = GTK_WIDGET (window);
previous_screen = window->screen; previous_screen = window->screen;
was_mapped = GTK_WIDGET_MAPPED (widget); was_mapped = gtk_widget_get_mapped (widget);
if (was_mapped) if (was_mapped)
gtk_widget_unmap (widget); gtk_widget_unmap (widget);

View File

@ -348,7 +348,7 @@ gail_select_watcher (GSignalInvocationHint *ihint,
widget = GTK_WIDGET (object); widget = GTK_WIDGET (object);
if (!GTK_WIDGET_MAPPED (widget)) if (!gtk_widget_get_mapped (widget))
{ {
g_signal_connect (widget, "map", g_signal_connect (widget, "map",
G_CALLBACK (gail_map_cb), G_CALLBACK (gail_map_cb),
@ -369,7 +369,7 @@ gail_finish_select (GtkWidget *widget)
menu_item = GTK_MENU_ITEM (widget); menu_item = GTK_MENU_ITEM (widget);
if (menu_item->submenu && 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 * If the submenu is not visble, wait until it is before

View File

@ -289,7 +289,7 @@ gail_button_real_initialize (AtkObject *obj,
label = get_label_from_button (widget, 0, FALSE); label = get_label_from_button (widget, 0, FALSE);
if (GTK_IS_LABEL (label)) if (GTK_IS_LABEL (label))
{ {
if (GTK_WIDGET_MAPPED (label)) if (gtk_widget_get_mapped (label))
gail_button_init_textutil (button, label); gail_button_init_textutil (button, label);
else else
g_signal_connect (label, g_signal_connect (label,

View File

@ -310,7 +310,7 @@ idle_do_action (gpointer data)
combo = GTK_COMBO (widget); 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.type = GDK_BUTTON_PRESS;
tmp_event.button.window = widget->window; tmp_event.button.window = widget->window;

View File

@ -319,7 +319,7 @@ idle_do_action (gpointer data)
combo_box = GTK_COMBO_BOX (widget); combo_box = GTK_COMBO_BOX (widget);
popup = gtk_combo_box_get_popup_accessible (combo_box); 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) if (do_popup)
gtk_combo_box_popup (combo_box); gtk_combo_box_popup (combo_box);
else else

View File

@ -257,7 +257,7 @@ gail_expander_real_initialize (AtkObject *obj,
ATK_OBJECT_CLASS (gail_expander_parent_class)->initialize (obj, data); ATK_OBJECT_CLASS (gail_expander_parent_class)->initialize (obj, data);
expander = GTK_WIDGET (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)); gail_expander_init_textutil (gail_expander, GTK_EXPANDER (expander));
else else
g_signal_connect (expander, g_signal_connect (expander,

View File

@ -134,7 +134,7 @@ gail_item_real_initialize (AtkObject *obj,
label = get_label_from_container (GTK_WIDGET (data)); label = get_label_from_container (GTK_WIDGET (data));
if (GTK_IS_LABEL (label)) if (GTK_IS_LABEL (label))
{ {
if (GTK_WIDGET_MAPPED (label)) if (gtk_widget_get_mapped (label))
gail_item_init_textutil (item, label); gail_item_init_textutil (item, label);
else else
g_signal_connect (label, g_signal_connect (label,

View File

@ -153,7 +153,7 @@ gail_label_real_initialize (AtkObject *obj,
widget = GTK_WIDGET (data); widget = GTK_WIDGET (data);
if (GTK_WIDGET_MAPPED (widget)) if (gtk_widget_get_mapped (widget))
gail_label_init_text_util (gail_label, widget); gail_label_init_text_util (gail_label, widget);
else else
g_signal_connect (widget, g_signal_connect (widget,

View File

@ -325,7 +325,7 @@ ensure_menus_unposted (GailMenuItem *menu_item)
widget = GTK_ACCESSIBLE (parent)->widget; widget = GTK_ACCESSIBLE (parent)->widget;
if (GTK_IS_MENU (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)); gtk_menu_shell_cancel (GTK_MENU_SHELL (widget));
return; return;
@ -352,7 +352,7 @@ idle_do_action (gpointer data)
item_parent = gtk_widget_get_parent (item); item_parent = gtk_widget_get_parent (item);
gtk_menu_shell_select_item (GTK_MENU_SHELL (item_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 * This is what is called when <Return> is pressed for a menu item
*/ */

View File

@ -203,7 +203,7 @@ gail_notebook_page_new (GtkNotebook *notebook,
label = get_label_from_notebook_page (page); label = get_label_from_notebook_page (page);
if (GTK_IS_LABEL (label)) if (GTK_IS_LABEL (label))
{ {
if (GTK_WIDGET_MAPPED (label)) if (gtk_widget_get_mapped (label))
gail_notebook_page_init_textutil (page, label); gail_notebook_page_init_textutil (page, label);
else else
g_signal_connect (label, g_signal_connect (label,

View File

@ -514,7 +514,7 @@ gail_widget_ref_state_set (AtkObject *accessible)
if (gtk_widget_get_visible (widget)) if (gtk_widget_get_visible (widget))
{ {
atk_state_set_add_state (state_set, ATK_STATE_VISIBLE); 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)) gail_widget_all_parents_visible (widget))
{ {
atk_state_set_add_state (state_set, ATK_STATE_SHOWING); 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); accessible = gtk_widget_get_accessible (widget);
atk_object_notify_state_change (accessible, ATK_STATE_SHOWING, atk_object_notify_state_change (accessible, ATK_STATE_SHOWING,
GTK_WIDGET_MAPPED (widget)); gtk_widget_get_mapped (widget));
return 1; return 1;
} }

View File

@ -240,7 +240,7 @@ gail_window_real_initialize (AtkObject *obj,
* Notify that tooltip is showing * Notify that tooltip is showing
*/ */
if (obj->role == ATK_ROLE_TOOL_TIP && 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); atk_object_notify_state_change (obj, ATK_STATE_SHOWING, 1);
} }

View File

@ -168,7 +168,7 @@ create_widget_via_emission (GtkWidgetProfiler *profiler)
if (!widget) if (!widget)
g_error ("The profiler emitted the \"create-widget\" signal but the signal handler returned no 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"); g_error ("The handler for \"create-widget\" must return an unmapped and unshown widget");
return widget; return widget;

View File

@ -6494,7 +6494,7 @@ list_toggle_sel_mode (GtkWidget *widget, gpointer data)
list = GTK_LIST (data); list = GTK_LIST (data);
if (!GTK_WIDGET_MAPPED (widget)) if (!gtk_widget_get_mapped (widget))
return; return;
i = gtk_option_menu_get_history (GTK_OPTION_MENU (widget)); 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); clist = GTK_CLIST (data);
if (!GTK_WIDGET_MAPPED (widget)) if (!gtk_widget_get_mapped (widget))
return; return;
i = gtk_option_menu_get_history (GTK_OPTION_MENU (widget)); 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); ctree = GTK_CTREE (data);
if (!GTK_WIDGET_MAPPED (widget)) if (!gtk_widget_get_mapped (widget))
return; return;
i = gtk_option_menu_get_history (GTK_OPTION_MENU (widget)); 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); ctree = GTK_CTREE (data);
if (!GTK_WIDGET_MAPPED (widget)) if (!gtk_widget_get_mapped (widget))
return; return;
i = gtk_option_menu_get_history (GTK_OPTION_MENU (widget)); 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); ctree = GTK_CTREE (data);
if (!GTK_WIDGET_MAPPED (widget)) if (!gtk_widget_get_mapped (widget))
return; return;
i = gtk_option_menu_get_history (GTK_OPTION_MENU (widget)); 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); ctree = GTK_CTREE (data);
if (!GTK_WIDGET_MAPPED (widget)) if (!gtk_widget_get_mapped (widget))
return; return;
i = gtk_option_menu_get_history (GTK_OPTION_MENU (widget)); i = gtk_option_menu_get_history (GTK_OPTION_MENU (widget));
@ -11694,7 +11694,7 @@ progressbar_toggle_orientation (GtkWidget *widget, gpointer data)
pdata = (ProgressData *) data; pdata = (ProgressData *) data;
if (!GTK_WIDGET_MAPPED (widget)) if (!gtk_widget_get_mapped (widget))
return; return;
i = gtk_option_menu_get_history (GTK_OPTION_MENU (widget)); 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; pdata = (ProgressData *) data;
if (!GTK_WIDGET_MAPPED (widget)) if (!gtk_widget_get_mapped (widget))
return; return;
i = gtk_option_menu_get_history (GTK_OPTION_MENU (widget)); i = gtk_option_menu_get_history (GTK_OPTION_MENU (widget));
@ -12104,7 +12104,7 @@ find_widget (GtkWidget *widget, FindWidgetData *data)
new_allocation = widget->allocation; new_allocation = widget->allocation;
if (data->found || !GTK_WIDGET_MAPPED (widget)) if (data->found || !gtk_widget_get_mapped (widget))
return; return;
/* Note that in the following code, we only count the /* Note that in the following code, we only count the

View File

@ -295,7 +295,7 @@ create_input_dialog (void)
} }
else else
{ {
if (!GTK_WIDGET_MAPPED(inputd)) if (!gtk_widget_get_mapped(inputd))
gtk_widget_show(inputd); gtk_widget_show(inputd);
else else
gdk_window_raise(inputd->window); gdk_window_raise(inputd->window);

View File

@ -2595,7 +2595,7 @@ cursor_set_callback (GtkTextBuffer *buffer,
text_view = GTK_TEXT_VIEW (user_data); 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)) mark == gtk_text_buffer_get_insert (buffer))
{ {
GdkWindow *tab_window; GdkWindow *tab_window;