]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtktoolbar.c
Deprecate widget flag: GTK_WIDGET_MAPPED
[~andy/gtk] / gtk / gtktoolbar.c
index 70126ca2ab18e60c181c221943cfac49e5279c3c..3b3d9afae26a262d370ba0f4dc1e6bd3d9437915 100644 (file)
@@ -667,7 +667,7 @@ gtk_toolbar_init (GtkToolbar *toolbar)
 {
   GtkToolbarPrivate *priv;
   
-  GTK_WIDGET_UNSET_FLAGS (toolbar, GTK_CAN_FOCUS);
+  gtk_widget_set_can_focus (GTK_WIDGET (toolbar), FALSE);
   GTK_WIDGET_SET_FLAGS (toolbar, GTK_NO_WINDOW);
   
   priv = GTK_TOOLBAR_GET_PRIVATE (toolbar);
@@ -867,7 +867,7 @@ gtk_toolbar_expose (GtkWidget      *widget,
   
   border_width = GTK_CONTAINER (widget)->border_width;
   
-  if (GTK_WIDGET_DRAWABLE (widget))
+  if (gtk_widget_is_drawable (widget))
     {
       gtk_paint_box (widget->style,
                     widget->window,
@@ -1802,7 +1802,7 @@ gtk_toolbar_size_allocate (GtkWidget     *widget,
     {
       gtk_widget_hide (GTK_WIDGET (priv->arrow_button));
 
-      if (priv->menu && GTK_WIDGET_VISIBLE (priv->menu))
+      if (priv->menu && gtk_widget_get_visible (GTK_WIDGET (priv->menu)))
        gtk_menu_shell_deactivate (GTK_MENU_SHELL (priv->menu));
     }
 
@@ -1908,7 +1908,7 @@ gtk_toolbar_focus_home_or_end (GtkToolbar *toolbar,
       if (GTK_CONTAINER (toolbar)->focus_child == child)
        break;
       
-      if (GTK_WIDGET_MAPPED (child) && gtk_widget_child_focus (child, dir))
+      if (gtk_widget_get_mapped (child) && gtk_widget_child_focus (child, dir))
        break;
     }
   
@@ -1942,7 +1942,7 @@ gtk_toolbar_move_focus (GtkWidget        *widget,
     {
       GtkWidget *child = list->data;
       
-      if (try_focus && GTK_WIDGET_MAPPED (child) && gtk_widget_child_focus (child, dir))
+      if (try_focus && gtk_widget_get_mapped (child) && gtk_widget_child_focus (child, dir))
        break;
       
       if (child == GTK_CONTAINER (toolbar)->focus_child)
@@ -1977,7 +1977,7 @@ gtk_toolbar_focus (GtkWidget        *widget,
     {
       GtkWidget *child = list->data;
       
-      if (GTK_WIDGET_MAPPED (child) && gtk_widget_child_focus (child, dir))
+      if (gtk_widget_get_mapped (child) && gtk_widget_child_focus (child, dir))
        {
          result = TRUE;
          break;
@@ -2253,11 +2253,11 @@ logical_to_physical (GtkToolbar *toolbar,
 /**
  * gtk_toolbar_set_drop_highlight_item:
  * @toolbar: a #GtkToolbar
- * @tool_item: a #GtkToolItem, or %NULL to turn of highlighting
+ * @tool_item: (allow-none): a #GtkToolItem, or %NULL to turn of highlighting
  * @index_: a position on @toolbar
- * 
+ *
  * Highlights @toolbar to give an idea of what it would look like
- * if @item was added to @toolbar at the position indicated by @index_. 
+ * if @item was added to @toolbar at the position indicated by @index_.
  * If @item is %NULL, highlighting is turned off. In that case @index_ 
  * is ignored.
  *
@@ -2673,7 +2673,7 @@ gtk_toolbar_arrow_button_clicked (GtkWidget  *button,
   GtkToolbarPrivate *priv = GTK_TOOLBAR_GET_PRIVATE (toolbar);  
   
   if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->arrow_button)) &&
-      (!priv->menu || !GTK_WIDGET_VISIBLE (priv->menu)))
+      (!priv->menu || !gtk_widget_get_visible (GTK_WIDGET (priv->menu))))
     {
       /* We only get here when the button is clicked with the keyboard,
        * because mouse button presses result in the menu being shown so
@@ -3037,7 +3037,8 @@ gtk_toolbar_get_nth_item (GtkToolbar *toolbar,
  *
  * Retrieves the icon size for the toolbar. See gtk_toolbar_set_icon_size().
  *
- * Return value: the current icon size for the icons on the toolbar.
+ * Return value: (type int): the current icon size for the icons on
+ * the toolbar.
  **/
 GtkIconSize
 gtk_toolbar_get_icon_size (GtkToolbar *toolbar)
@@ -3194,7 +3195,8 @@ gtk_toolbar_finalize (GObject *object)
 /**
  * gtk_toolbar_set_icon_size:
  * @toolbar: A #GtkToolbar
- * @icon_size: The #GtkIconSize that stock icons in the toolbar shall have.
+ * @icon_size: (type int): The #GtkIconSize that stock icons in the
+ *     toolbar shall have.
  *
  * This function sets the size of stock icons in the toolbar. You
  * can call it both before you add the icons and after they've been
@@ -3518,9 +3520,9 @@ gtk_toolbar_remove_space (GtkToolbar *toolbar,
 /**
  * gtk_toolbar_append_widget:
  * @toolbar: a #GtkToolbar.
- * @widget: a #GtkWidget to add to the toolbar. 
- * @tooltip_text: the element's tooltip.
- * @tooltip_private_text: used for context-sensitive help about this toolbar element.
+ * @widget: a #GtkWidget to add to the toolbar.
+ * @tooltip_text: (allow-none): the element's tooltip.
+ * @tooltip_private_text: (allow-none): used for context-sensitive help about this toolbar element.
  *
  * Adds a widget to the end of the given toolbar.
  *
@@ -3542,9 +3544,9 @@ gtk_toolbar_append_widget (GtkToolbar  *toolbar,
 /**
  * gtk_toolbar_prepend_widget:
  * @toolbar: a #GtkToolbar.
- * @widget: a #GtkWidget to add to the toolbar. 
- * @tooltip_text: the element's tooltip.
- * @tooltip_private_text: used for context-sensitive help about this toolbar element.
+ * @widget: a #GtkWidget to add to the toolbar.
+ * @tooltip_text: (allow-none): the element's tooltip.
+ * @tooltip_private_text: (allow-none): used for context-sensitive help about this toolbar element.
  *
  * Adds a widget to the beginning of the given toolbar.
  *
@@ -3566,11 +3568,11 @@ gtk_toolbar_prepend_widget (GtkToolbar  *toolbar,
 /**
  * gtk_toolbar_insert_widget:
  * @toolbar: a #GtkToolbar.
- * @widget: a #GtkWidget to add to the toolbar. 
- * @tooltip_text: the element's tooltip.
- * @tooltip_private_text: used for context-sensitive help about this toolbar element.
+ * @widget: a #GtkWidget to add to the toolbar.
+ * @tooltip_text: (allow-none): the element's tooltip.
+ * @tooltip_private_text: (allow-none): used for context-sensitive help about this toolbar element.
  * @position: the number of widgets to insert this widget after.
- * 
+ *
  * Inserts a widget in the toolbar at the given position.
  *
  * Deprecated: 2.4: Use gtk_toolbar_insert() instead.
@@ -3593,7 +3595,7 @@ gtk_toolbar_insert_widget (GtkToolbar *toolbar,
  * gtk_toolbar_append_element:
  * @toolbar: a #GtkToolbar.
  * @type: a value of type #GtkToolbarChildType that determines what @widget will be.
- * @widget: a #GtkWidget, or %NULL.
+ * @widget: (allow-none): a #GtkWidget, or %NULL.
  * @text: the element's label.
  * @tooltip_text: the element's tooltip.
  * @tooltip_private_text: used for context-sensitive help about this toolbar element.
@@ -3636,7 +3638,7 @@ gtk_toolbar_append_element (GtkToolbar          *toolbar,
  * gtk_toolbar_prepend_element:
  * @toolbar: a #GtkToolbar.
  * @type: a value of type #GtkToolbarChildType that determines what @widget will be.
- * @widget: a #GtkWidget, or %NULL
+ * @widget: (allow-none): a #GtkWidget, or %NULL
  * @text: the element's label.
  * @tooltip_text: the element's tooltip.
  * @tooltip_private_text: used for context-sensitive help about this toolbar element.
@@ -3679,7 +3681,7 @@ gtk_toolbar_prepend_element (GtkToolbar          *toolbar,
  * @toolbar: a #GtkToolbar.
  * @type: a value of type #GtkToolbarChildType that determines what @widget
  *   will be.
- * @widget: a #GtkWidget, or %NULL. 
+ * @widget: (allow-none): a #GtkWidget, or %NULL. 
  * @text: the element's label.
  * @tooltip_text: the element's tooltip.
  * @tooltip_private_text: used for context-sensitive help about this toolbar element.
@@ -4115,7 +4117,7 @@ toolbar_content_visible (ToolbarContent *content,
     case TOOL_ITEM:
       item = content->u.tool_item.item;
       
-      if (!GTK_WIDGET_VISIBLE (item))
+      if (!gtk_widget_get_visible (GTK_WIDGET (item)))
        return FALSE;
       
       if (toolbar->orientation == GTK_ORIENTATION_HORIZONTAL &&
@@ -4131,7 +4133,7 @@ toolbar_content_visible (ToolbarContent *content,
       
     case COMPATIBILITY:
       if (content->u.compatibility.child.type != GTK_TOOLBAR_CHILD_SPACE)
-       return GTK_WIDGET_VISIBLE (content->u.compatibility.child.widget);
+       return gtk_widget_get_visible (content->u.compatibility.child.widget);
       else
        return TRUE;
       break;