forked from AuroraMiddleware/gtk
New convenience functions analogous to similar API on GtkRadioButton.
Thu Feb 19 00:09:35 2004 Matthias Clasen <maclas@gmx.de> * gtk/gtkradiomenuitem.h: * gtk/gtkradiomenuitem.c (gtk_radio_menu_item_new_from_widget): (gtk_radio_menu_item_new_with_label_from_widget): (gtk_radio_menu_item_new_with_mnemonic_from_widget): New convenience functions analogous to similar API on GtkRadioButton. (#51700, Vitaly Tishkov, patch by Soeren Sandmann)
This commit is contained in:
parent
d91e1cdd36
commit
b337db3a54
@ -1,3 +1,12 @@
|
|||||||
|
Thu Feb 19 00:09:35 2004 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
|
* gtk/gtkradiomenuitem.h:
|
||||||
|
* gtk/gtkradiomenuitem.c (gtk_radio_menu_item_new_from_widget):
|
||||||
|
(gtk_radio_menu_item_new_with_label_from_widget):
|
||||||
|
(gtk_radio_menu_item_new_with_mnemonic_from_widget): New
|
||||||
|
convenience functions analogous to similar API on GtkRadioButton.
|
||||||
|
(#51700, Vitaly Tishkov, patch by Soeren Sandmann)
|
||||||
|
|
||||||
Wed Feb 18 17:53:27 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
Wed Feb 18 17:53:27 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||||
|
|
||||||
* gdk/gdkwindow.c (gdk_window_get_bg_gc): Use a scratch GC in the
|
* gdk/gdkwindow.c (gdk_window_get_bg_gc): Use a scratch GC in the
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
Thu Feb 19 00:09:35 2004 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
|
* gtk/gtkradiomenuitem.h:
|
||||||
|
* gtk/gtkradiomenuitem.c (gtk_radio_menu_item_new_from_widget):
|
||||||
|
(gtk_radio_menu_item_new_with_label_from_widget):
|
||||||
|
(gtk_radio_menu_item_new_with_mnemonic_from_widget): New
|
||||||
|
convenience functions analogous to similar API on GtkRadioButton.
|
||||||
|
(#51700, Vitaly Tishkov, patch by Soeren Sandmann)
|
||||||
|
|
||||||
Wed Feb 18 17:53:27 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
Wed Feb 18 17:53:27 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||||
|
|
||||||
* gdk/gdkwindow.c (gdk_window_get_bg_gc): Use a scratch GC in the
|
* gdk/gdkwindow.c (gdk_window_get_bg_gc): Use a scratch GC in the
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
Thu Feb 19 00:09:35 2004 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
|
* gtk/gtkradiomenuitem.h:
|
||||||
|
* gtk/gtkradiomenuitem.c (gtk_radio_menu_item_new_from_widget):
|
||||||
|
(gtk_radio_menu_item_new_with_label_from_widget):
|
||||||
|
(gtk_radio_menu_item_new_with_mnemonic_from_widget): New
|
||||||
|
convenience functions analogous to similar API on GtkRadioButton.
|
||||||
|
(#51700, Vitaly Tishkov, patch by Soeren Sandmann)
|
||||||
|
|
||||||
Wed Feb 18 17:53:27 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
Wed Feb 18 17:53:27 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||||
|
|
||||||
* gdk/gdkwindow.c (gdk_window_get_bg_gc): Use a scratch GC in the
|
* gdk/gdkwindow.c (gdk_window_get_bg_gc): Use a scratch GC in the
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
Thu Feb 19 00:09:35 2004 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
|
* gtk/gtkradiomenuitem.h:
|
||||||
|
* gtk/gtkradiomenuitem.c (gtk_radio_menu_item_new_from_widget):
|
||||||
|
(gtk_radio_menu_item_new_with_label_from_widget):
|
||||||
|
(gtk_radio_menu_item_new_with_mnemonic_from_widget): New
|
||||||
|
convenience functions analogous to similar API on GtkRadioButton.
|
||||||
|
(#51700, Vitaly Tishkov, patch by Soeren Sandmann)
|
||||||
|
|
||||||
Wed Feb 18 17:53:27 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
Wed Feb 18 17:53:27 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||||
|
|
||||||
* gdk/gdkwindow.c (gdk_window_get_bg_gc): Use a scratch GC in the
|
* gdk/gdkwindow.c (gdk_window_get_bg_gc): Use a scratch GC in the
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
Thu Feb 19 00:09:35 2004 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
|
* gtk/gtkradiomenuitem.h:
|
||||||
|
* gtk/gtkradiomenuitem.c (gtk_radio_menu_item_new_from_widget):
|
||||||
|
(gtk_radio_menu_item_new_with_label_from_widget):
|
||||||
|
(gtk_radio_menu_item_new_with_mnemonic_from_widget): New
|
||||||
|
convenience functions analogous to similar API on GtkRadioButton.
|
||||||
|
(#51700, Vitaly Tishkov, patch by Soeren Sandmann)
|
||||||
|
|
||||||
Wed Feb 18 17:53:27 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
Wed Feb 18 17:53:27 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||||
|
|
||||||
* gdk/gdkwindow.c (gdk_window_get_bg_gc): Use a scratch GC in the
|
* gdk/gdkwindow.c (gdk_window_get_bg_gc): Use a scratch GC in the
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
Thu Feb 19 00:11:23 2004 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
|
* gtk/gtk-sections.txt: Add gtk_radio_menu_item_new_from_widget
|
||||||
|
gtk_radio_menu_item_new_with_label_from_widget,
|
||||||
|
gtk_radio_menu_item_new_with_mnemonic_from_widget.
|
||||||
|
|
||||||
2004-02-17 Federico Mena Quintero <federico@ximian.com>
|
2004-02-17 Federico Mena Quintero <federico@ximian.com>
|
||||||
|
|
||||||
* gtk/migrating-checklist.sgml: Add a missing semicolon to an
|
* gtk/migrating-checklist.sgml: Add a missing semicolon to an
|
||||||
|
@ -2402,6 +2402,9 @@ GtkRadioMenuItem
|
|||||||
gtk_radio_menu_item_new
|
gtk_radio_menu_item_new
|
||||||
gtk_radio_menu_item_new_with_label
|
gtk_radio_menu_item_new_with_label
|
||||||
gtk_radio_menu_item_new_with_mnemonic
|
gtk_radio_menu_item_new_with_mnemonic
|
||||||
|
gtk_radio_menu_item_new_from_widget
|
||||||
|
gtk_radio_menu_item_new_with_label_from_widget
|
||||||
|
gtk_radio_menu_item_new_with_mnemonic_from_widget
|
||||||
gtk_radio_menu_item_group
|
gtk_radio_menu_item_group
|
||||||
gtk_radio_menu_item_set_group
|
gtk_radio_menu_item_set_group
|
||||||
gtk_radio_menu_item_get_group
|
gtk_radio_menu_item_get_group
|
||||||
|
@ -169,6 +169,85 @@ gtk_radio_menu_item_new_with_mnemonic (GSList *group,
|
|||||||
return radio_menu_item;
|
return radio_menu_item;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gtk_radio_menu_item_new_from_widget:
|
||||||
|
* @group: An existing #GtkRadioMenuItem
|
||||||
|
*
|
||||||
|
* Creates a new #GtkRadioMenuItem adding it to the same group as @group.
|
||||||
|
*
|
||||||
|
* Return value: The new #GtkRadioMenuItem
|
||||||
|
*
|
||||||
|
* Since: 2.4
|
||||||
|
**/
|
||||||
|
GtkWidget *
|
||||||
|
gtk_radio_menu_item_new_from_widget (GtkRadioMenuItem *group)
|
||||||
|
{
|
||||||
|
GSList *list = NULL;
|
||||||
|
|
||||||
|
g_return_val_if_fail (GTK_IS_RADIO_MENU_ITEM (group), NULL);
|
||||||
|
|
||||||
|
if (group)
|
||||||
|
list = gtk_radio_menu_item_get_group (group);
|
||||||
|
|
||||||
|
return gtk_radio_menu_item_new (list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gtk_radio_menu_item_new_with_mnemonic_from_widget:
|
||||||
|
* @group: An existing #GtkRadioMenuItem
|
||||||
|
* @label: the text of the button, with an underscore in front of the
|
||||||
|
* mnemonic character
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*
|
||||||
|
* The new #GtkRadioMenuItem is added to the same group as @group.
|
||||||
|
*
|
||||||
|
* Return value: The new #GtkRadioMenuItem
|
||||||
|
*
|
||||||
|
* Since: 2.4
|
||||||
|
**/
|
||||||
|
GtkWidget *
|
||||||
|
gtk_radio_menu_item_new_with_mnemonic_from_widget (GtkRadioMenuItem *group,
|
||||||
|
const gchar *label)
|
||||||
|
{
|
||||||
|
GSList *list = NULL;
|
||||||
|
|
||||||
|
g_return_val_if_fail (GTK_IS_RADIO_MENU_ITEM (group), NULL);
|
||||||
|
|
||||||
|
if (group)
|
||||||
|
list = gtk_radio_menu_item_get_group (group);
|
||||||
|
|
||||||
|
return gtk_radio_menu_item_new_with_mnemonic (list, label);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gtk_radio_menu_item_new_with_label_from_widget:
|
||||||
|
* @group: an existing #GtkRadioMenuItem
|
||||||
|
* @label: the text for the label
|
||||||
|
*
|
||||||
|
* Creates a new GtkRadioMenuItem whose child is a simple GtkLabel.
|
||||||
|
* The new #GtkRadioMenuItem is added to the same group as @group.
|
||||||
|
*
|
||||||
|
* Return value: The new #GtkRadioMenuItem
|
||||||
|
*
|
||||||
|
* Since: 2.4
|
||||||
|
**/
|
||||||
|
GtkWidget *
|
||||||
|
gtk_radio_menu_item_new_with_label_from_widget (GtkRadioMenuItem *group,
|
||||||
|
const gchar *label)
|
||||||
|
{
|
||||||
|
GSList *list = NULL;
|
||||||
|
|
||||||
|
g_return_val_if_fail (GTK_IS_RADIO_MENU_ITEM (group), NULL);
|
||||||
|
|
||||||
|
if (group)
|
||||||
|
list = gtk_radio_menu_item_get_group (group);
|
||||||
|
|
||||||
|
return gtk_radio_menu_item_new_with_label (list, label);
|
||||||
|
}
|
||||||
|
|
||||||
GSList*
|
GSList*
|
||||||
gtk_radio_menu_item_get_group (GtkRadioMenuItem *radio_menu_item)
|
gtk_radio_menu_item_get_group (GtkRadioMenuItem *radio_menu_item)
|
||||||
{
|
{
|
||||||
|
@ -31,11 +31,7 @@
|
|||||||
#include <gdk/gdk.h>
|
#include <gdk/gdk.h>
|
||||||
#include <gtk/gtkcheckmenuitem.h>
|
#include <gtk/gtkcheckmenuitem.h>
|
||||||
|
|
||||||
|
G_BEGIN_DECLS
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif /* __cplusplus */
|
|
||||||
|
|
||||||
|
|
||||||
#define GTK_TYPE_RADIO_MENU_ITEM (gtk_radio_menu_item_get_type ())
|
#define GTK_TYPE_RADIO_MENU_ITEM (gtk_radio_menu_item_get_type ())
|
||||||
#define GTK_RADIO_MENU_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_RADIO_MENU_ITEM, GtkRadioMenuItem))
|
#define GTK_RADIO_MENU_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_RADIO_MENU_ITEM, GtkRadioMenuItem))
|
||||||
@ -58,7 +54,7 @@ struct _GtkRadioMenuItem
|
|||||||
struct _GtkRadioMenuItemClass
|
struct _GtkRadioMenuItemClass
|
||||||
{
|
{
|
||||||
GtkCheckMenuItemClass parent_class;
|
GtkCheckMenuItemClass parent_class;
|
||||||
|
|
||||||
/* Padding for future expansion */
|
/* Padding for future expansion */
|
||||||
void (*_gtk_reserved1) (void);
|
void (*_gtk_reserved1) (void);
|
||||||
void (*_gtk_reserved2) (void);
|
void (*_gtk_reserved2) (void);
|
||||||
@ -68,22 +64,25 @@ struct _GtkRadioMenuItemClass
|
|||||||
|
|
||||||
|
|
||||||
GType gtk_radio_menu_item_get_type (void) G_GNUC_CONST;
|
GType gtk_radio_menu_item_get_type (void) G_GNUC_CONST;
|
||||||
GtkWidget* gtk_radio_menu_item_new (GSList *group);
|
|
||||||
GtkWidget* gtk_radio_menu_item_new_with_label (GSList *group,
|
GtkWidget* gtk_radio_menu_item_new (GSList *group);
|
||||||
const gchar *label);
|
GtkWidget* gtk_radio_menu_item_new_with_label (GSList *group,
|
||||||
GtkWidget* gtk_radio_menu_item_new_with_mnemonic (GSList *group,
|
const gchar *label);
|
||||||
const gchar *label);
|
GtkWidget* gtk_radio_menu_item_new_with_mnemonic (GSList *group,
|
||||||
GSList* gtk_radio_menu_item_get_group (GtkRadioMenuItem *radio_menu_item);
|
const gchar *label);
|
||||||
void gtk_radio_menu_item_set_group (GtkRadioMenuItem *radio_menu_item,
|
GtkWidget* gtk_radio_menu_item_new_from_widget (GtkRadioMenuItem *group);
|
||||||
GSList *group);
|
GtkWidget *gtk_radio_menu_item_new_with_mnemonic_from_widget (GtkRadioMenuItem *group,
|
||||||
|
const gchar *label);
|
||||||
|
GtkWidget *gtk_radio_menu_item_new_with_label_from_widget (GtkRadioMenuItem *group,
|
||||||
|
const gchar *label);
|
||||||
|
GSList* gtk_radio_menu_item_get_group (GtkRadioMenuItem *radio_menu_item);
|
||||||
|
void gtk_radio_menu_item_set_group (GtkRadioMenuItem *radio_menu_item,
|
||||||
|
GSList *group);
|
||||||
|
|
||||||
#ifndef GTK_DISABLE_DEPRECATED
|
#ifndef GTK_DISABLE_DEPRECATED
|
||||||
#define gtk_radio_menu_item_group gtk_radio_menu_item_get_group
|
#define gtk_radio_menu_item_group gtk_radio_menu_item_get_group
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
G_END_DECLS
|
||||||
}
|
|
||||||
#endif /* __cplusplus */
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* __GTK_RADIO_MENU_ITEM_H__ */
|
#endif /* __GTK_RADIO_MENU_ITEM_H__ */
|
||||||
|
Loading…
Reference in New Issue
Block a user