Commit de5eafed authored by Alexander Larsson's avatar Alexander Larsson Committed by Alexander Larsson

Renamed gtk_button_new_stock() to gtk_button_new_from_stock() and removed

2001-03-21  Alexander Larsson  <alexl@redhat.com>

        * gtk/gtkbutton.[ch]:
	* gtk/gtkdialog.c:
	Renamed gtk_button_new_stock() to gtk_button_new_from_stock() and
	removed accel_group argument. Renamed gtk_button_new_accel() to
	gtk_button_new_with_mnemonic() and removed accel_group argument.

	* gtk/gtkcheckbutton.[ch]:
	New function gtk_check_button_new_with_mnemonic().

	* gtk/gtkentry.c:
	Override activate_mnemonic and just grab focus.

	* gtk/gtkitemfactory.c:
	Don't add menu uline accel group, instead use mnemonics support.

	* gtk/gtklabel.[ch]:
	New support for mnemonics.

	* gtk/gtkmarshal.list:
	Needed BOOLEAN:BOOLEAN for activate_mnemonic.

	* gtk/gtkmenu.[c]:
	* gtkmenushell.c:
	Use mnemonics instead of accel groups for uline
	support in menu items.
	Removed gtk_menu_get_uline_accel_group() and
	gtk_menu_ensure_uline_accel_group().

	* gtk/gtkmenuitem.c:
	Override activate_mnemonic to handle switching between
	menu items if there are collisions.

	* gtk/gtknotebook.c:
	Connect to activate_mnemonic on the tab_label, so that
	activating it switches to that notebook page.

	* gtk/gtkwidget.[ch]:
	Add activate_mnemonic signal. New function
	gtk_widget_activate_mnemonic() to emit it.
	Default implementation does activate/grab_focus.

	* gtk/gtkwindow.[ch]:
	Add support for mnemonics in windows.
	New functions:
	gtk_window_add_mnemonic, gtk_window_remove_mnemonic,
	gtk_window_activate_mnemonic, gtk_window_set_mnemonic_modifier

	* gtk/testgtk.c:
	Update to function name changes.
parent a24e9b10
2001-03-21 Alexander Larsson <alexl@redhat.com>
* gtk/gtkbutton.[ch]:
* gtk/gtkdialog.c:
Renamed gtk_button_new_stock() to gtk_button_new_from_stock() and
removed accel_group argument. Renamed gtk_button_new_accel() to
gtk_button_new_with_mnemonic() and removed accel_group argument.
* gtk/gtkcheckbutton.[ch]:
New function gtk_check_button_new_with_mnemonic().
* gtk/gtkentry.c:
Override activate_mnemonic and just grab focus.
* gtk/gtkitemfactory.c:
Don't add menu uline accel group, instead use mnemonics support.
* gtk/gtklabel.[ch]:
New support for mnemonics.
* gtk/gtkmarshal.list:
Needed BOOLEAN:BOOLEAN for activate_mnemonic.
* gtk/gtkmenu.[c]:
* gtkmenushell.c:
Use mnemonics instead of accel groups for uline
support in menu items.
Removed gtk_menu_get_uline_accel_group() and
gtk_menu_ensure_uline_accel_group().
* gtk/gtkmenuitem.c:
Override activate_mnemonic to handle switching between
menu items if there are collisions.
* gtk/gtknotebook.c:
Connect to activate_mnemonic on the tab_label, so that
activating it switches to that notebook page.
* gtk/gtkwidget.[ch]:
Add activate_mnemonic signal. New function
gtk_widget_activate_mnemonic() to emit it.
Default implementation does activate/grab_focus.
* gtk/gtkwindow.[ch]:
Add support for mnemonics in windows.
New functions:
gtk_window_add_mnemonic, gtk_window_remove_mnemonic,
gtk_window_activate_mnemonic, gtk_window_set_mnemonic_modifier
* gtk/testgtk.c:
Update to function name changes.
2001-03-21 Alexander Larsson <alexl@redhat.com>
* gtk/gtkimagemenuitem.[c]:
......
2001-03-21 Alexander Larsson <alexl@redhat.com>
* gtk/gtkbutton.[ch]:
* gtk/gtkdialog.c:
Renamed gtk_button_new_stock() to gtk_button_new_from_stock() and
removed accel_group argument. Renamed gtk_button_new_accel() to
gtk_button_new_with_mnemonic() and removed accel_group argument.
* gtk/gtkcheckbutton.[ch]:
New function gtk_check_button_new_with_mnemonic().
* gtk/gtkentry.c:
Override activate_mnemonic and just grab focus.
* gtk/gtkitemfactory.c:
Don't add menu uline accel group, instead use mnemonics support.
* gtk/gtklabel.[ch]:
New support for mnemonics.
* gtk/gtkmarshal.list:
Needed BOOLEAN:BOOLEAN for activate_mnemonic.
* gtk/gtkmenu.[c]:
* gtkmenushell.c:
Use mnemonics instead of accel groups for uline
support in menu items.
Removed gtk_menu_get_uline_accel_group() and
gtk_menu_ensure_uline_accel_group().
* gtk/gtkmenuitem.c:
Override activate_mnemonic to handle switching between
menu items if there are collisions.
* gtk/gtknotebook.c:
Connect to activate_mnemonic on the tab_label, so that
activating it switches to that notebook page.
* gtk/gtkwidget.[ch]:
Add activate_mnemonic signal. New function
gtk_widget_activate_mnemonic() to emit it.
Default implementation does activate/grab_focus.
* gtk/gtkwindow.[ch]:
Add support for mnemonics in windows.
New functions:
gtk_window_add_mnemonic, gtk_window_remove_mnemonic,
gtk_window_activate_mnemonic, gtk_window_set_mnemonic_modifier
* gtk/testgtk.c:
Update to function name changes.
2001-03-21 Alexander Larsson <alexl@redhat.com>
* gtk/gtkimagemenuitem.[c]:
......
2001-03-21 Alexander Larsson <alexl@redhat.com>
* gtk/gtkbutton.[ch]:
* gtk/gtkdialog.c:
Renamed gtk_button_new_stock() to gtk_button_new_from_stock() and
removed accel_group argument. Renamed gtk_button_new_accel() to
gtk_button_new_with_mnemonic() and removed accel_group argument.
* gtk/gtkcheckbutton.[ch]:
New function gtk_check_button_new_with_mnemonic().
* gtk/gtkentry.c:
Override activate_mnemonic and just grab focus.
* gtk/gtkitemfactory.c:
Don't add menu uline accel group, instead use mnemonics support.
* gtk/gtklabel.[ch]:
New support for mnemonics.
* gtk/gtkmarshal.list:
Needed BOOLEAN:BOOLEAN for activate_mnemonic.
* gtk/gtkmenu.[c]:
* gtkmenushell.c:
Use mnemonics instead of accel groups for uline
support in menu items.
Removed gtk_menu_get_uline_accel_group() and
gtk_menu_ensure_uline_accel_group().
* gtk/gtkmenuitem.c:
Override activate_mnemonic to handle switching between
menu items if there are collisions.
* gtk/gtknotebook.c:
Connect to activate_mnemonic on the tab_label, so that
activating it switches to that notebook page.
* gtk/gtkwidget.[ch]:
Add activate_mnemonic signal. New function
gtk_widget_activate_mnemonic() to emit it.
Default implementation does activate/grab_focus.
* gtk/gtkwindow.[ch]:
Add support for mnemonics in windows.
New functions:
gtk_window_add_mnemonic, gtk_window_remove_mnemonic,
gtk_window_activate_mnemonic, gtk_window_set_mnemonic_modifier
* gtk/testgtk.c:
Update to function name changes.
2001-03-21 Alexander Larsson <alexl@redhat.com>
* gtk/gtkimagemenuitem.[c]:
......
2001-03-21 Alexander Larsson <alexl@redhat.com>
* gtk/gtkbutton.[ch]:
* gtk/gtkdialog.c:
Renamed gtk_button_new_stock() to gtk_button_new_from_stock() and
removed accel_group argument. Renamed gtk_button_new_accel() to
gtk_button_new_with_mnemonic() and removed accel_group argument.
* gtk/gtkcheckbutton.[ch]:
New function gtk_check_button_new_with_mnemonic().
* gtk/gtkentry.c:
Override activate_mnemonic and just grab focus.
* gtk/gtkitemfactory.c:
Don't add menu uline accel group, instead use mnemonics support.
* gtk/gtklabel.[ch]:
New support for mnemonics.
* gtk/gtkmarshal.list:
Needed BOOLEAN:BOOLEAN for activate_mnemonic.
* gtk/gtkmenu.[c]:
* gtkmenushell.c:
Use mnemonics instead of accel groups for uline
support in menu items.
Removed gtk_menu_get_uline_accel_group() and
gtk_menu_ensure_uline_accel_group().
* gtk/gtkmenuitem.c:
Override activate_mnemonic to handle switching between
menu items if there are collisions.
* gtk/gtknotebook.c:
Connect to activate_mnemonic on the tab_label, so that
activating it switches to that notebook page.
* gtk/gtkwidget.[ch]:
Add activate_mnemonic signal. New function
gtk_widget_activate_mnemonic() to emit it.
Default implementation does activate/grab_focus.
* gtk/gtkwindow.[ch]:
Add support for mnemonics in windows.
New functions:
gtk_window_add_mnemonic, gtk_window_remove_mnemonic,
gtk_window_activate_mnemonic, gtk_window_set_mnemonic_modifier
* gtk/testgtk.c:
Update to function name changes.
2001-03-21 Alexander Larsson <alexl@redhat.com>
* gtk/gtkimagemenuitem.[c]:
......
2001-03-21 Alexander Larsson <alexl@redhat.com>
* gtk/gtkbutton.[ch]:
* gtk/gtkdialog.c:
Renamed gtk_button_new_stock() to gtk_button_new_from_stock() and
removed accel_group argument. Renamed gtk_button_new_accel() to
gtk_button_new_with_mnemonic() and removed accel_group argument.
* gtk/gtkcheckbutton.[ch]:
New function gtk_check_button_new_with_mnemonic().
* gtk/gtkentry.c:
Override activate_mnemonic and just grab focus.
* gtk/gtkitemfactory.c:
Don't add menu uline accel group, instead use mnemonics support.
* gtk/gtklabel.[ch]:
New support for mnemonics.
* gtk/gtkmarshal.list:
Needed BOOLEAN:BOOLEAN for activate_mnemonic.
* gtk/gtkmenu.[c]:
* gtkmenushell.c:
Use mnemonics instead of accel groups for uline
support in menu items.
Removed gtk_menu_get_uline_accel_group() and
gtk_menu_ensure_uline_accel_group().
* gtk/gtkmenuitem.c:
Override activate_mnemonic to handle switching between
menu items if there are collisions.
* gtk/gtknotebook.c:
Connect to activate_mnemonic on the tab_label, so that
activating it switches to that notebook page.
* gtk/gtkwidget.[ch]:
Add activate_mnemonic signal. New function
gtk_widget_activate_mnemonic() to emit it.
Default implementation does activate/grab_focus.
* gtk/gtkwindow.[ch]:
Add support for mnemonics in windows.
New functions:
gtk_window_add_mnemonic, gtk_window_remove_mnemonic,
gtk_window_activate_mnemonic, gtk_window_set_mnemonic_modifier
* gtk/testgtk.c:
Update to function name changes.
2001-03-21 Alexander Larsson <alexl@redhat.com>
* gtk/gtkimagemenuitem.[c]:
......
2001-03-21 Alexander Larsson <alexl@redhat.com>
* gtk/gtkbutton.[ch]:
* gtk/gtkdialog.c:
Renamed gtk_button_new_stock() to gtk_button_new_from_stock() and
removed accel_group argument. Renamed gtk_button_new_accel() to
gtk_button_new_with_mnemonic() and removed accel_group argument.
* gtk/gtkcheckbutton.[ch]:
New function gtk_check_button_new_with_mnemonic().
* gtk/gtkentry.c:
Override activate_mnemonic and just grab focus.
* gtk/gtkitemfactory.c:
Don't add menu uline accel group, instead use mnemonics support.
* gtk/gtklabel.[ch]:
New support for mnemonics.
* gtk/gtkmarshal.list:
Needed BOOLEAN:BOOLEAN for activate_mnemonic.
* gtk/gtkmenu.[c]:
* gtkmenushell.c:
Use mnemonics instead of accel groups for uline
support in menu items.
Removed gtk_menu_get_uline_accel_group() and
gtk_menu_ensure_uline_accel_group().
* gtk/gtkmenuitem.c:
Override activate_mnemonic to handle switching between
menu items if there are collisions.
* gtk/gtknotebook.c:
Connect to activate_mnemonic on the tab_label, so that
activating it switches to that notebook page.
* gtk/gtkwidget.[ch]:
Add activate_mnemonic signal. New function
gtk_widget_activate_mnemonic() to emit it.
Default implementation does activate/grab_focus.
* gtk/gtkwindow.[ch]:
Add support for mnemonics in windows.
New functions:
gtk_window_add_mnemonic, gtk_window_remove_mnemonic,
gtk_window_activate_mnemonic, gtk_window_set_mnemonic_modifier
* gtk/testgtk.c:
Update to function name changes.
2001-03-21 Alexander Larsson <alexl@redhat.com>
* gtk/gtkimagemenuitem.[c]:
......
2001-03-21 Alexander Larsson <alexl@redhat.com>
* gtk/gtkbutton.[ch]:
* gtk/gtkdialog.c:
Renamed gtk_button_new_stock() to gtk_button_new_from_stock() and
removed accel_group argument. Renamed gtk_button_new_accel() to
gtk_button_new_with_mnemonic() and removed accel_group argument.
* gtk/gtkcheckbutton.[ch]:
New function gtk_check_button_new_with_mnemonic().
* gtk/gtkentry.c:
Override activate_mnemonic and just grab focus.
* gtk/gtkitemfactory.c:
Don't add menu uline accel group, instead use mnemonics support.
* gtk/gtklabel.[ch]:
New support for mnemonics.
* gtk/gtkmarshal.list:
Needed BOOLEAN:BOOLEAN for activate_mnemonic.
* gtk/gtkmenu.[c]:
* gtkmenushell.c:
Use mnemonics instead of accel groups for uline
support in menu items.
Removed gtk_menu_get_uline_accel_group() and
gtk_menu_ensure_uline_accel_group().
* gtk/gtkmenuitem.c:
Override activate_mnemonic to handle switching between
menu items if there are collisions.
* gtk/gtknotebook.c:
Connect to activate_mnemonic on the tab_label, so that
activating it switches to that notebook page.
* gtk/gtkwidget.[ch]:
Add activate_mnemonic signal. New function
gtk_widget_activate_mnemonic() to emit it.
Default implementation does activate/grab_focus.
* gtk/gtkwindow.[ch]:
Add support for mnemonics in windows.
New functions:
gtk_window_add_mnemonic, gtk_window_remove_mnemonic,
gtk_window_activate_mnemonic, gtk_window_set_mnemonic_modifier
* gtk/testgtk.c:
Update to function name changes.
2001-03-21 Alexander Larsson <alexl@redhat.com>
* gtk/gtkimagemenuitem.[c]:
......
......@@ -319,9 +319,17 @@ gtk_button_new_with_label (const gchar *label)
return button;
}
/**
* gtk_button_new_from_stock:
* @stock_id: the name of the stock item
* @returns: a new #GtkButton
*
* Creates a new #GtkButton containing the image and text from a stock item.
* Some stock ids have preprocessor macros like #GTK_STOCK_BUTTON_OK and
* #GTK_STOCK_BUTTON_APPLY.
**/
GtkWidget*
gtk_button_new_stock (const gchar *stock_id,
GtkAccelGroup *accel_group)
gtk_button_new_from_stock (const gchar *stock_id)
{
GtkWidget *button;
GtkStockItem item;
......@@ -331,34 +339,12 @@ gtk_button_new_stock (const gchar *stock_id,
GtkWidget *label;
GtkWidget *image;
GtkWidget *hbox;
guint keyval;
button = gtk_button_new ();
label = gtk_label_new (NULL);
keyval = gtk_label_parse_uline (GTK_LABEL (label),
item.label);
if (keyval && accel_group)
{
gtk_widget_add_accelerator (button,
"clicked",
accel_group,
keyval,
GDK_MOD1_MASK,
GTK_ACCEL_LOCKED);
}
/* Also add the stock accelerator if one was specified. */
if (item.keyval && accel_group)
{
gtk_widget_add_accelerator (button,
"clicked",
accel_group,
item.keyval,
item.modifier,
GTK_ACCEL_LOCKED);
}
label = gtk_label_new_with_mnemonic (item.label);
gtk_label_set_mnemonic_widget (GTK_LABEL (label), button);
image = gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_BUTTON);
hbox = gtk_hbox_new (FALSE, 0);
......@@ -371,37 +357,37 @@ gtk_button_new_stock (const gchar *stock_id,
}
else
{
button = gtk_button_new_accel (stock_id, accel_group);
button = gtk_button_new_with_mnemonic (stock_id);
}
return button;
}
/**
* gtk_button_new_with_mnemonic:
* @label: The text of the button, with an underscore in front of the
* mnemonic character
* @returns: a new #GtkButton
*
* Creates a new #GtkButton containing a label.
* If characters in @label are preceded by an underscore, they are underlined
* indicating that they represent a keyboard accelerator called a mnemonic.
* Pressing Alt and that key activates the button.
**/
GtkWidget*
gtk_button_new_accel (const gchar *uline_label,
GtkAccelGroup *accel_group)
gtk_button_new_with_mnemonic (const gchar *label)
{
GtkWidget *button;
GtkWidget *label;
guint keyval;
GtkWidget *label_widget;
button = gtk_button_new ();
label = gtk_label_new (NULL);
keyval = gtk_label_parse_uline (GTK_LABEL (label), uline_label);
label_widget = gtk_label_new_with_mnemonic (label);
if (keyval && accel_group)
{
gtk_widget_add_accelerator (button,
"clicked",
accel_group,
keyval,
GDK_MOD1_MASK,
GTK_ACCEL_LOCKED);
}
gtk_label_set_mnemonic_widget (GTK_LABEL (label_widget), button);
gtk_container_add (GTK_CONTAINER (button), label);
gtk_widget_show (label);
gtk_container_add (GTK_CONTAINER (button), label_widget);
gtk_widget_show (label_widget);
return button;
}
......
......@@ -77,20 +77,18 @@ struct _GtkButtonClass
GtkType gtk_button_get_type (void) G_GNUC_CONST;
GtkWidget* gtk_button_new (void);
GtkWidget* gtk_button_new_with_label (const gchar *label);
GtkWidget* gtk_button_new_stock (const gchar *stock_id,
GtkAccelGroup *accel_group);
GtkWidget* gtk_button_new_accel (const gchar *uline_label,
GtkAccelGroup *accel_group);
void gtk_button_pressed (GtkButton *button);
void gtk_button_released (GtkButton *button);
void gtk_button_clicked (GtkButton *button);
void gtk_button_enter (GtkButton *button);
void gtk_button_leave (GtkButton *button);
void gtk_button_set_relief (GtkButton *button,
GtkReliefStyle newstyle);
GtkReliefStyle gtk_button_get_relief (GtkButton *button);
GtkWidget* gtk_button_new (void);
GtkWidget* gtk_button_new_with_label (const gchar *label);
GtkWidget* gtk_button_new_from_stock (const gchar *stock_id);
GtkWidget* gtk_button_new_with_mnemonic (const gchar *label);
void gtk_button_pressed (GtkButton *button);
void gtk_button_released (GtkButton *button);
void gtk_button_clicked (GtkButton *button);
void gtk_button_enter (GtkButton *button);
void gtk_button_leave (GtkButton *button);
void gtk_button_set_relief (GtkButton *button,
GtkReliefStyle newstyle);
GtkReliefStyle gtk_button_get_relief (GtkButton *button);
#ifdef __cplusplus
......
......@@ -123,6 +123,35 @@ gtk_check_button_new_with_label (const gchar *label)
return check_button;
}
/**
* gtk_check_button_new_with_mnemonic:
* @label: The text of the button, with an underscore in front of the
* mnemonic character
* @returns: a new #GtkCheckButton
*
* Creates a new #GtkCheckButton containing a label.
* If characters in @label are preceded by an underscore, they are underlined
* indicating that they represent a keyboard accelerator called a mnemonic.
* Pressing Alt and that key activates the checkbutton.
**/
GtkWidget*
gtk_check_button_new_with_mnemonic (const gchar *label)
{
GtkWidget *check_button;
GtkWidget *label_widget;
check_button = gtk_check_button_new ();
label_widget = gtk_label_new_with_mnemonic (label);
gtk_misc_set_alignment (GTK_MISC (label_widget), 0.0, 0.5);
gtk_label_set_mnemonic_widget (GTK_LABEL (label_widget), check_button);
gtk_container_add (GTK_CONTAINER (check_button), label_widget);
gtk_widget_show (label_widget);
return check_button;
}
/* This should only be called when toggle_button->draw_indicator
* is true.
*/
......
......@@ -66,8 +66,9 @@ struct _GtkCheckButtonClass
GtkType gtk_check_button_get_type (void) G_GNUC_CONST;
GtkWidget* gtk_check_button_new (void);
GtkWidget* gtk_check_button_new_with_label (const gchar *label);
GtkWidget* gtk_check_button_new (void);
GtkWidget* gtk_check_button_new_with_label (const gchar *label);
GtkWidget* gtk_check_button_new_with_mnemonic (const gchar *label);
#ifdef __cplusplus
......
......@@ -471,8 +471,7 @@ gtk_dialog_add_button (GtkDialog *dialog,
g_return_val_if_fail (GTK_IS_DIALOG (dialog), NULL);
g_return_val_if_fail (button_text != NULL, NULL);
button = gtk_button_new_stock (button_text,
gtk_window_get_default_accel_group (GTK_WINDOW (dialog)));
button = gtk_button_new_from_stock (button_text);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
......
......@@ -250,6 +250,8 @@ static void gtk_entry_paste (GtkEntry *entry,
static void gtk_entry_update_primary_selection (GtkEntry *entry);
static void gtk_entry_popup_menu (GtkEntry *entry,
GdkEventButton *event);
static gboolean gtk_entry_activate_mnemonic (GtkWidget *widget,
gboolean group_cycling);
static GtkWidgetClass *parent_class = NULL;
......@@ -341,6 +343,7 @@ gtk_entry_class_init (GtkEntryClass *class)
widget_class->style_set = gtk_entry_style_set;
widget_class->direction_changed = gtk_entry_direction_changed;
widget_class->state_changed = gtk_entry_state_changed;
widget_class->activate_mnemonic = gtk_entry_activate_mnemonic;
widget_class->drag_motion = gtk_entry_drag_motion;
widget_class->drag_leave = gtk_entry_drag_leave;
......@@ -3133,6 +3136,15 @@ activate_cb (GtkWidget *menuitem,
gtk_signal_emit_by_name (GTK_OBJECT (entry), signal);
}
static gboolean
gtk_entry_activate_mnemonic (GtkWidget *widget,
gboolean group_cycling)
{
gtk_widget_grab_focus (widget);
return TRUE;
}
static void
append_action_signal (GtkEntry *entry,
GtkWidget *menu,
......
......@@ -1228,24 +1228,7 @@ gtk_item_factory_create_item (GtkItemFactory *ifactory,
"GtkMisc::xalign", 0.0,
NULL);
accel_key = gtk_label_parse_uline (GTK_LABEL (label), name);
if (accel_key != GDK_VoidSymbol)
{
if (GTK_IS_MENU_BAR (parent))
gtk_widget_add_accelerator (widget,
"activate_item",
ifactory->accel_group,
accel_key, GDK_MOD1_MASK,
GTK_ACCEL_LOCKED);
if (GTK_IS_MENU (parent))
gtk_widget_add_accelerator (widget,
"activate_item",
gtk_menu_ensure_uline_accel_group (GTK_MENU (parent)),
accel_key, 0,
GTK_ACCEL_LOCKED);
}
gtk_label_set_text_with_mnemonic (GTK_LABEL (label), name);
}
g_free (name);
......
This diff is collapsed.
......@@ -29,6 +29,7 @@
#include <gdk/gdk.h>
#include <gtk/gtkmisc.h>
#include <gtk/gtkwindow.h>
#ifdef __cplusplus
......@@ -60,13 +61,16 @@ struct _GtkLabel
guint use_underline : 1;
guint use_markup : 1;
guint accel_keyval;
guint mnemonic_keyval;
gchar *text;
PangoAttrList *attrs;
PangoLayout *layout;
GtkWidget *mnemonic_widget;
GtkWindow *mnemonic_window;
GtkLabelSelectionInfo *select_info;
};
......@@ -75,8 +79,9 @@ struct _GtkLabelClass
GtkMiscClass parent_class;
};
GtkType gtk_label_get_type (void) G_GNUC_CONST;
GtkWidget *gtk_label_new (const char *str);
GtkType gtk_label_get_type (void) G_GNUC_CONST;
GtkWidget *gtk_label_new (const char *str);
GtkWidget *gtk_label_new_with_mnemonic (const char *str);
void gtk_label_set_text (GtkLabel *label,
const char *str);
......@@ -87,22 +92,26 @@ void gtk_label_set_attributes (GtkLabel *label,
void gtk_label_set_markup (GtkLabel *label,
const gchar *str);
guint gtk_label_set_markup_with_accel (GtkLabel *label,
const gchar *str);
guint gtk_label_get_accel_keyval (GtkLabel *label);
void gtk_label_set_justify (GtkLabel *label,
GtkJustification jtype);
void gtk_label_set_pattern (GtkLabel *label,
const gchar *pattern);
void gtk_label_set_line_wrap (GtkLabel *label,
gboolean wrap);
void gtk_label_set_markup_with_mnemonic (GtkLabel *label,
const gchar *str);
guint gtk_label_get_mnemonic_keyval (GtkLabel *label);
void gtk_label_set_justify (GtkLabel *label,
GtkJustification jtype);
void gtk_label_set_pattern (GtkLabel *label,
const gchar *pattern);
void gtk_label_set_line_wrap (GtkLabel *label,
gboolean wrap);
/* Convenience function to set the name and pattern by parsing
* a string with embedded underscores, and return the appropriate
* key symbol for the accelerator.
*/
guint gtk_label_parse_uline (GtkLabel *label,
const gchar *string);
guint gtk_label_parse_uline (GtkLabel *label,
const gchar *string);
void gtk_label_set_text_with_mnemonic (GtkLabel *label,
const gchar *string);
void gtk_label_set_mnemonic_widget (GtkLabel *label,
GtkWidget *widget);
void gtk_label_set_selectable (GtkLabel *label,
gboolean setting);
......
......@@ -25,6 +25,7 @@ BOOLEAN:BOXED
BOOLEAN:OBJECT,INT,INT,UINT
BOOLEAN:OBJECT,STRING,STRING,BOXED
BOOLEAN:VOID
BOOLEAN:BOOLEAN
ENUM:ENUM
INT:OBJECT,BOXED,BOXED
INT:POINTER
......
......@@ -25,6 +25,7 @@ BOOLEAN:BOXED
BOOLEAN:OBJECT,INT,INT,UINT
BOOLEAN:OBJECT,STRING,STRING,BOXED
BOOLEAN:VOID
BOOLEAN:BOOLEAN
ENUM:ENUM
INT:OBJECT,BOXED,BOXED
INT:POINTER
......
......@@ -116,7 +116,6 @@ static void gtk_menu_remove (GtkContainer *menu,
static GtkMenuShellClass *parent_class = NULL;
static const gchar *attach_data_key = "gtk-menu-attach-data";
static GQuark quark_uline_accel_group = 0;
GtkType
gtk_menu_get_type (void)
......@@ -248,6 +247,7 @@ gtk_menu_init (GtkMenu *menu)
NULL);