Commit e53efb12 authored by Javier Jardon's avatar Javier Jardon Committed by Tristan Van Berkom
Browse files

Deprecate widget flag: GTK_WIDGET_MAPPED

Use gtk_widget_get_mapped() instead.

https://bugzilla.gnome.org/show_bug.cgi?id=69872
parent 8c1f5dbc
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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 */
......
......@@ -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);
......
......@@ -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);
}
......
......@@ -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
......
......@@ -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
......
......@@ -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);
......
......@@ -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;
......
......@@ -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);
}
......
......@@ -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));
......
......@@ -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 ||
......
......@@ -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)
......
......@@ -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;
......
......@@ -3710,7 +3710,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);
......@@ -4762,7 +4762,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);
}
}
......
......@@ -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);
}
}
......
......@@ -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);
......
......@@ -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;
......
......@@ -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;
......
......@@ -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);
......
......@@ -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))
{
......
......@@ -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);
......
......@@ -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
*/