* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
/*
#include "gtkprivate.h"
#include "gtkintl.h"
#include "a11y/gtkradiomenuitemaccessible.h"
-#include "a11y/gtkradiosubmenuitemaccessible.h"
/**
* SECTION:gtkradiomenuitem
/**
* gtk_radio_menu_item_new:
- * @group: the group to which the radio menu item is to be attached
+ * @group: (element-type GtkRadioMenuItem): the group to which the
+ * radio menu item is to be attached
*
* Creates a new #GtkRadioMenuItem.
*
/**
* gtk_radio_menu_item_set_group:
* @radio_menu_item: a #GtkRadioMenuItem.
- * @group: the new group.
+ * @group: (element-type GtkRadioMenuItem): the new group.
*
* Sets the group of a radio menu item, or changes it.
*/
/**
* gtk_radio_menu_item_new_with_mnemonic:
- * @group: group the radio menu item is inside
+ * @group: (element-type GtkRadioMenuItem): group the radio menu item is inside
* @label: the text of the button, with an underscore in front of the
* mnemonic character
- * @returns: a new #GtkRadioMenuItem
*
* Creates a new #GtkRadioMenuItem containing a label. The label
* will be created using gtk_label_new_with_mnemonic(), so underscores
* in @label indicate the mnemonic for the menu item.
- **/
+ *
+ * Returns: a new #GtkRadioMenuItem
+ */
GtkWidget*
gtk_radio_menu_item_new_with_mnemonic (GSList *group,
const gchar *label)
}
/**
- * gtk_radio_menu_item_new_from_widget:
+ * gtk_radio_menu_item_new_from_widget: (constructor)
* @group: An existing #GtkRadioMenuItem
*
* Creates a new #GtkRadioMenuItem adding it to the same group as @group.
}
/**
- * gtk_radio_menu_item_new_with_mnemonic_from_widget:
+ * gtk_radio_menu_item_new_with_mnemonic_from_widget: (constructor)
* @group: An existing #GtkRadioMenuItem
* @label: the text of the button, with an underscore in front of the
* mnemonic character
}
/**
- * gtk_radio_menu_item_new_with_label_from_widget:
+ * gtk_radio_menu_item_new_with_label_from_widget: (constructor)
* @group: an existing #GtkRadioMenuItem
* @label: the text for the label
*
return radio_menu_item->priv->group;
}
-static AtkObject *
-gtk_radio_menu_item_get_accessible (GtkWidget *widget)
-{
- GObject *object;
- AtkObject *accessible;
-
- /* FIXME this is not really right, submenus can come and go */
- if (gtk_menu_item_get_submenu (GTK_MENU_ITEM (widget)))
- object = g_object_new (GTK_TYPE_RADIO_SUBMENU_ITEM_ACCESSIBLE, NULL);
- else
- object = g_object_new (GTK_TYPE_RADIO_MENU_ITEM_ACCESSIBLE, NULL);
-
- accessible = ATK_OBJECT (object);
- atk_object_initialize (accessible, widget);
-
- accessible->role = ATK_ROLE_RADIO_MENU_ITEM;
-
- return accessible;
-}
-
static void
gtk_radio_menu_item_class_init (GtkRadioMenuItemClass *klass)
{
gobject_class->get_property = gtk_radio_menu_item_get_property;
widget_class->destroy = gtk_radio_menu_item_destroy;
- widget_class->get_accessible = gtk_radio_menu_item_get_accessible;
+
+ gtk_widget_class_set_accessible_type (widget_class, GTK_TYPE_RADIO_MENU_ITEM_ACCESSIBLE);
menu_item_class->activate = gtk_radio_menu_item_activate;