Don't use GTK_WIDGET_*SET_FLAGS (wid, GTK_MAPPED)

Use new API instead: gtk_widget_set_mapped ()

https://bugzilla.gnome.org/show_bug.cgi?id=69872
This commit is contained in:
Javier Jardón 2010-03-06 12:02:21 +01:00
parent 1934de4b65
commit 74ed719fa4
14 changed files with 31 additions and 30 deletions

View File

@ -1235,7 +1235,7 @@ gtk_assistant_map (GtkWidget *widget)
GList *page_node;
GtkAssistantPage *page;
GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
gtk_widget_set_mapped (widget, TRUE);
gtk_widget_map (priv->header_image);
gtk_widget_map (priv->action_area);
@ -1271,7 +1271,7 @@ gtk_assistant_unmap (GtkWidget *widget)
GtkAssistant *assistant = GTK_ASSISTANT (widget);
GtkAssistantPrivate *priv = assistant->priv;
GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED);
gtk_widget_set_mapped (widget, FALSE);
gtk_widget_unmap (priv->header_image);
gtk_widget_unmap (priv->action_area);

View File

@ -4618,7 +4618,7 @@ gtk_clist_unrealize (GtkWidget *widget)
if (gtk_widget_get_mapped (widget))
gtk_clist_unmap (widget);
GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED);
gtk_widget_set_mapped (widget, FALSE);
/* detach optional row/cell styles */
if (gtk_widget_get_realized (widget))
@ -4686,7 +4686,7 @@ gtk_clist_map (GtkWidget *widget)
if (!gtk_widget_get_mapped (widget))
{
GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
gtk_widget_set_mapped (widget, TRUE);
/* map column buttons */
for (i = 0; i < clist->columns; i++)
@ -4725,7 +4725,7 @@ gtk_clist_unmap (GtkWidget *widget)
if (gtk_widget_get_mapped (widget))
{
GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED);
gtk_widget_set_mapped (widget, FALSE);
if (clist_has_grab (clist))
{

View File

@ -2665,7 +2665,7 @@ gtk_container_map_child (GtkWidget *child,
static void
gtk_container_map (GtkWidget *widget)
{
GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
gtk_widget_set_mapped (widget, TRUE);
gtk_container_forall (GTK_CONTAINER (widget),
gtk_container_map_child,
@ -2678,7 +2678,7 @@ gtk_container_map (GtkWidget *widget)
static void
gtk_container_unmap (GtkWidget *widget)
{
GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED);
gtk_widget_set_mapped (widget, FALSE);
if (gtk_widget_get_has_window (widget))
gdk_window_hide (widget->window);

View File

@ -348,7 +348,7 @@ gtk_handle_box_map (GtkWidget *widget)
GtkBin *bin;
GtkHandleBox *hb;
GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
gtk_widget_set_mapped (widget, TRUE);
bin = GTK_BIN (widget);
hb = GTK_HANDLE_BOX (widget);
@ -373,7 +373,7 @@ gtk_handle_box_unmap (GtkWidget *widget)
{
GtkHandleBox *hb;
GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED);
gtk_widget_set_mapped (widget, FALSE);
hb = GTK_HANDLE_BOX (widget);

View File

@ -908,7 +908,7 @@ gtk_layout_map (GtkWidget *widget)
GtkLayout *layout = GTK_LAYOUT (widget);
GList *tmp_list;
GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
gtk_widget_set_mapped (widget, TRUE);
tmp_list = layout->children;
while (tmp_list)

View File

@ -490,7 +490,7 @@ gtk_list_unmap (GtkWidget *widget)
if (!gtk_widget_get_mapped (widget))
return;
GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED);
gtk_widget_set_mapped (widget, FALSE);
if (list_has_grab (list))
{

View File

@ -1736,7 +1736,7 @@ gtk_notebook_map (GtkWidget *widget)
GList *children;
gint i;
GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
gtk_widget_set_mapped (widget, TRUE);
notebook = GTK_NOTEBOOK (widget);
priv = GTK_NOTEBOOK_GET_PRIVATE (notebook);
@ -1782,7 +1782,7 @@ gtk_notebook_unmap (GtkWidget *widget)
{
stop_scrolling (GTK_NOTEBOOK (widget));
GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED);
gtk_widget_set_mapped (widget, FALSE);
gdk_window_hide (GTK_NOTEBOOK (widget)->event_window);

View File

@ -708,7 +708,7 @@ gtk_plug_map (GtkWidget *widget)
GtkBin *bin = GTK_BIN (widget);
GtkPlug *plug = GTK_PLUG (widget);
GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
gtk_widget_set_mapped (widget, TRUE);
if (bin->child &&
gtk_widget_get_visible (bin->child) &&
@ -732,7 +732,7 @@ gtk_plug_unmap (GtkWidget *widget)
{
GtkPlug *plug = GTK_PLUG (widget);
GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED);
gtk_widget_set_mapped (widget, FALSE);
gdk_window_hide (widget->window);

View File

@ -513,7 +513,7 @@ gtk_tree_map (GtkWidget *widget)
GtkWidget *child;
GList *children;
GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
gtk_widget_set_mapped (widget, TRUE);
children = tree->children;
while (children)
@ -948,7 +948,7 @@ gtk_tree_unmap (GtkWidget *widget)
g_return_if_fail (GTK_IS_TREE (widget));
GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED);
gtk_widget_set_mapped (widget, FALSE);
gdk_window_hide (widget->window);
}

View File

@ -943,7 +943,7 @@ gtk_tree_item_map (GtkWidget *widget)
GtkBin *bin = GTK_BIN (widget);
GtkTreeItem* item = GTK_TREE_ITEM(widget);
GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
gtk_widget_set_mapped (widget, TRUE);
if(item->pixmaps_box &&
gtk_widget_get_visible (item->pixmaps_box) &&
@ -964,7 +964,7 @@ gtk_tree_item_unmap (GtkWidget *widget)
GtkBin *bin = GTK_BIN (widget);
GtkTreeItem* item = GTK_TREE_ITEM(widget);
GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED);
gtk_widget_set_mapped (widget, FALSE);
gdk_window_hide (widget->window);

View File

@ -1738,7 +1738,7 @@ gtk_tree_view_map (GtkWidget *widget)
GtkTreeView *tree_view = GTK_TREE_VIEW (widget);
GList *tmp_list;
GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
gtk_widget_set_mapped (widget, TRUE);
tmp_list = tree_view->priv->children;
while (tmp_list)

View File

@ -3551,7 +3551,8 @@ gtk_widget_unrealize (GtkWidget *widget)
g_object_ref (widget);
_gtk_tooltip_hide (widget);
g_signal_emit (widget, widget_signals[UNREALIZE], 0);
GTK_WIDGET_UNSET_FLAGS (widget, GTK_REALIZED | GTK_MAPPED);
gtk_widget_set_realized (widget, FALSE);
gtk_widget_set_mapped (widget, FALSE);
g_object_unref (widget);
}
}
@ -6031,9 +6032,9 @@ gtk_widget_set_mapped (GtkWidget *widget,
g_return_if_fail (GTK_IS_WIDGET (widget));
if (mapped)
GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
GTK_OBJECT_FLAGS (widget) |= GTK_MAPPED;
else
GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED);
GTK_OBJECT_FLAGS (widget) &= ~(GTK_MAPPED);
}
/**
@ -8753,7 +8754,7 @@ gtk_widget_real_map (GtkWidget *widget)
if (!gtk_widget_get_mapped (widget))
{
GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
gtk_widget_set_mapped (widget, TRUE);
if (gtk_widget_get_has_window (widget))
gdk_window_show (widget->window);
@ -8773,7 +8774,7 @@ gtk_widget_real_unmap (GtkWidget *widget)
{
if (gtk_widget_get_mapped (widget))
{
GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED);
gtk_widget_set_mapped (widget, FALSE);
if (gtk_widget_get_has_window (widget))
gdk_window_hide (widget->window);
@ -8816,7 +8817,7 @@ gtk_widget_real_unrealize (GtkWidget *widget)
if (gtk_widget_get_mapped (widget))
gtk_widget_real_unmap (widget);
GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED);
gtk_widget_set_mapped (widget, FALSE);
/* printf ("unrealizing %s\n", g_type_name (G_TYPE_FROM_INSTANCE (widget)));
*/

View File

@ -267,7 +267,7 @@ gtk_win32_embed_widget_map (GtkWidget *widget)
{
GtkBin *bin = GTK_BIN (widget);
GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
gtk_widget_set_mapped (widget, TRUE);
if (bin->child &&
gtk_widget_get_visible (bin->child) &&
@ -280,7 +280,7 @@ gtk_win32_embed_widget_map (GtkWidget *widget)
static void
gtk_win32_embed_widget_unmap (GtkWidget *widget)
{
GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED);
gtk_widget_set_mapped (widget, FALSE);
gdk_window_hide (widget->window);
}

View File

@ -4567,7 +4567,7 @@ gtk_window_map (GtkWidget *widget)
GdkWindow *toplevel;
gboolean auto_mnemonics;
GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
gtk_widget_set_mapped (widget, TRUE);
if (window->bin.child &&
gtk_widget_get_visible (window->bin.child) &&
@ -4677,7 +4677,7 @@ gtk_window_unmap (GtkWidget *widget)
GtkWindowGeometryInfo *info;
GdkWindowState state;
GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED);
gtk_widget_set_mapped (widget, FALSE);
if (window->frame)
gdk_window_withdraw (window->frame);
else