Commit a75a0d49 authored by Owen Taylor's avatar Owen Taylor Committed by Owen Taylor

Consistently use GdkModifierType. (#66950, Mark Patton)

Tue Jan 29 21:50:28 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkaccelmap.[ch] gtk/gtkbindings.[ch] gtk/gtkwidget.[ch]:
        Consistently use GdkModifierType. (#66950, Mark Patton)

        * gtk/gtkimagemenuitem.c (gtk_image_menu_item_new_from_stock):
        For consistency with gtk_button_new_from_stock(), fall back
        to gtk_image_menu_item_new_with_mnemnonic(). (#65944,
        Havoc Pennington)

        * gtk/gtkitemfactory.[ch] (gtk_item_factory_path_from_widget):
        Make G_CONST_RETURN. (#68527, Matt Wilson)
parent 36655ffa
Tue Jan 29 21:50:28 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkaccelmap.[ch] gtk/gtkbindings.[ch] gtk/gtkwidget.[ch]:
Consistently use GdkModifierType. (#66950, Mark Patton)
* gtk/gtkimagemenuitem.c (gtk_image_menu_item_new_from_stock):
For consistency with gtk_button_new_from_stock(), fall back
to gtk_image_menu_item_new_with_mnemnonic(). (#65944,
Havoc Pennington)
* gtk/gtkitemfactory.[ch] (gtk_item_factory_path_from_widget):
Make G_CONST_RETURN. (#68527, Matt Wilson)
Tue Jan 29 20:56:13 2002 Owen Taylor <otaylor@redhat.com> Tue Jan 29 20:56:13 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtk[vh]scale.c (gtk_[vh]scale_new_with_range): Document * gtk/gtk[vh]scale.c (gtk_[vh]scale_new_with_range): Document
......
Tue Jan 29 21:50:28 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkaccelmap.[ch] gtk/gtkbindings.[ch] gtk/gtkwidget.[ch]:
Consistently use GdkModifierType. (#66950, Mark Patton)
* gtk/gtkimagemenuitem.c (gtk_image_menu_item_new_from_stock):
For consistency with gtk_button_new_from_stock(), fall back
to gtk_image_menu_item_new_with_mnemnonic(). (#65944,
Havoc Pennington)
* gtk/gtkitemfactory.[ch] (gtk_item_factory_path_from_widget):
Make G_CONST_RETURN. (#68527, Matt Wilson)
Tue Jan 29 20:56:13 2002 Owen Taylor <otaylor@redhat.com> Tue Jan 29 20:56:13 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtk[vh]scale.c (gtk_[vh]scale_new_with_range): Document * gtk/gtk[vh]scale.c (gtk_[vh]scale_new_with_range): Document
......
Tue Jan 29 21:50:28 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkaccelmap.[ch] gtk/gtkbindings.[ch] gtk/gtkwidget.[ch]:
Consistently use GdkModifierType. (#66950, Mark Patton)
* gtk/gtkimagemenuitem.c (gtk_image_menu_item_new_from_stock):
For consistency with gtk_button_new_from_stock(), fall back
to gtk_image_menu_item_new_with_mnemnonic(). (#65944,
Havoc Pennington)
* gtk/gtkitemfactory.[ch] (gtk_item_factory_path_from_widget):
Make G_CONST_RETURN. (#68527, Matt Wilson)
Tue Jan 29 20:56:13 2002 Owen Taylor <otaylor@redhat.com> Tue Jan 29 20:56:13 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtk[vh]scale.c (gtk_[vh]scale_new_with_range): Document * gtk/gtk[vh]scale.c (gtk_[vh]scale_new_with_range): Document
......
Tue Jan 29 21:50:28 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkaccelmap.[ch] gtk/gtkbindings.[ch] gtk/gtkwidget.[ch]:
Consistently use GdkModifierType. (#66950, Mark Patton)
* gtk/gtkimagemenuitem.c (gtk_image_menu_item_new_from_stock):
For consistency with gtk_button_new_from_stock(), fall back
to gtk_image_menu_item_new_with_mnemnonic(). (#65944,
Havoc Pennington)
* gtk/gtkitemfactory.[ch] (gtk_item_factory_path_from_widget):
Make G_CONST_RETURN. (#68527, Matt Wilson)
Tue Jan 29 20:56:13 2002 Owen Taylor <otaylor@redhat.com> Tue Jan 29 20:56:13 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtk[vh]scale.c (gtk_[vh]scale_new_with_range): Document * gtk/gtk[vh]scale.c (gtk_[vh]scale_new_with_range): Document
......
Tue Jan 29 21:50:28 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkaccelmap.[ch] gtk/gtkbindings.[ch] gtk/gtkwidget.[ch]:
Consistently use GdkModifierType. (#66950, Mark Patton)
* gtk/gtkimagemenuitem.c (gtk_image_menu_item_new_from_stock):
For consistency with gtk_button_new_from_stock(), fall back
to gtk_image_menu_item_new_with_mnemnonic(). (#65944,
Havoc Pennington)
* gtk/gtkitemfactory.[ch] (gtk_item_factory_path_from_widget):
Make G_CONST_RETURN. (#68527, Matt Wilson)
Tue Jan 29 20:56:13 2002 Owen Taylor <otaylor@redhat.com> Tue Jan 29 20:56:13 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtk[vh]scale.c (gtk_[vh]scale_new_with_range): Document * gtk/gtk[vh]scale.c (gtk_[vh]scale_new_with_range): Document
......
Tue Jan 29 21:50:28 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkaccelmap.[ch] gtk/gtkbindings.[ch] gtk/gtkwidget.[ch]:
Consistently use GdkModifierType. (#66950, Mark Patton)
* gtk/gtkimagemenuitem.c (gtk_image_menu_item_new_from_stock):
For consistency with gtk_button_new_from_stock(), fall back
to gtk_image_menu_item_new_with_mnemnonic(). (#65944,
Havoc Pennington)
* gtk/gtkitemfactory.[ch] (gtk_item_factory_path_from_widget):
Make G_CONST_RETURN. (#68527, Matt Wilson)
Tue Jan 29 20:56:13 2002 Owen Taylor <otaylor@redhat.com> Tue Jan 29 20:56:13 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtk[vh]scale.c (gtk_[vh]scale_new_with_range): Document * gtk/gtk[vh]scale.c (gtk_[vh]scale_new_with_range): Document
......
Tue Jan 29 21:50:28 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkaccelmap.[ch] gtk/gtkbindings.[ch] gtk/gtkwidget.[ch]:
Consistently use GdkModifierType. (#66950, Mark Patton)
* gtk/gtkimagemenuitem.c (gtk_image_menu_item_new_from_stock):
For consistency with gtk_button_new_from_stock(), fall back
to gtk_image_menu_item_new_with_mnemnonic(). (#65944,
Havoc Pennington)
* gtk/gtkitemfactory.[ch] (gtk_item_factory_path_from_widget):
Make G_CONST_RETURN. (#68527, Matt Wilson)
Tue Jan 29 20:56:13 2002 Owen Taylor <otaylor@redhat.com> Tue Jan 29 20:56:13 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtk[vh]scale.c (gtk_[vh]scale_new_with_range): Document * gtk/gtk[vh]scale.c (gtk_[vh]scale_new_with_range): Document
......
...@@ -125,9 +125,9 @@ _gtk_accel_path_is_valid (const gchar *accel_path) ...@@ -125,9 +125,9 @@ _gtk_accel_path_is_valid (const gchar *accel_path)
* "&lt;Gimp-Toolbox&gt;/File/Dialogs/Tool Options...". * "&lt;Gimp-Toolbox&gt;/File/Dialogs/Tool Options...".
*/ */
void void
gtk_accel_map_add_entry (const gchar *accel_path, gtk_accel_map_add_entry (const gchar *accel_path,
guint accel_key, guint accel_key,
guint accel_mods) GdkModifierType accel_mods)
{ {
AccelEntry *entry; AccelEntry *entry;
...@@ -589,7 +589,7 @@ static void ...@@ -589,7 +589,7 @@ static void
accel_map_print (gpointer data, accel_map_print (gpointer data,
const gchar *accel_path, const gchar *accel_path,
guint accel_key, guint accel_key,
guint accel_mods, GdkModifierType accel_mods,
gboolean changed) gboolean changed)
{ {
GString *gstring = g_string_new (changed ? NULL : "; "); GString *gstring = g_string_new (changed ? NULL : "; ");
......
...@@ -29,14 +29,14 @@ G_BEGIN_DECLS ...@@ -29,14 +29,14 @@ G_BEGIN_DECLS
typedef void (*GtkAccelMapForeach) (gpointer data, typedef void (*GtkAccelMapForeach) (gpointer data,
const gchar *accel_path, const gchar *accel_path,
guint accel_key, guint accel_key,
guint accel_mods, GdkModifierType accel_mods,
gboolean changed); gboolean changed);
/* --- public API --- */ /* --- public API --- */
void gtk_accel_map_add_entry (const gchar *accel_path, void gtk_accel_map_add_entry (const gchar *accel_path,
guint accel_key, guint accel_key,
guint accel_mods); GdkModifierType accel_mods);
gboolean gtk_accel_map_lookup_entry (const gchar *accel_path, gboolean gtk_accel_map_lookup_entry (const gchar *accel_path,
GtkAccelKey *key); GtkAccelKey *key);
gboolean gtk_accel_map_change_entry (const gchar *accel_path, gboolean gtk_accel_map_change_entry (const gchar *accel_path,
......
...@@ -109,9 +109,9 @@ binding_entries_compare (gconstpointer a, ...@@ -109,9 +109,9 @@ binding_entries_compare (gconstpointer a,
} }
static GtkBindingEntry* static GtkBindingEntry*
binding_entry_new (GtkBindingSet *binding_set, binding_entry_new (GtkBindingSet *binding_set,
guint keyval, guint keyval,
guint modifiers) GdkModifierType modifiers)
{ {
GtkBindingEntry *entry; GtkBindingEntry *entry;
...@@ -222,8 +222,8 @@ binding_entry_destroy (GtkBindingEntry *entry) ...@@ -222,8 +222,8 @@ binding_entry_destroy (GtkBindingEntry *entry)
} }
static GtkBindingEntry* static GtkBindingEntry*
binding_ht_lookup_list (guint keyval, binding_ht_lookup_list (guint keyval,
guint modifiers) GdkModifierType modifiers)
{ {
GtkBindingEntry lookup_entry = { 0 }; GtkBindingEntry lookup_entry = { 0 };
...@@ -237,9 +237,9 @@ binding_ht_lookup_list (guint keyval, ...@@ -237,9 +237,9 @@ binding_ht_lookup_list (guint keyval,
} }
static GtkBindingEntry* static GtkBindingEntry*
binding_ht_lookup_entry (GtkBindingSet *set, binding_ht_lookup_entry (GtkBindingSet *set,
guint keyval, guint keyval,
guint modifiers) GdkModifierType modifiers)
{ {
GtkBindingEntry lookup_entry = { 0 }; GtkBindingEntry lookup_entry = { 0 };
GtkBindingEntry *entry; GtkBindingEntry *entry;
...@@ -542,7 +542,7 @@ gtk_binding_set_find (const gchar *set_name) ...@@ -542,7 +542,7 @@ gtk_binding_set_find (const gchar *set_name)
gboolean gboolean
gtk_binding_set_activate (GtkBindingSet *binding_set, gtk_binding_set_activate (GtkBindingSet *binding_set,
guint keyval, guint keyval,
guint modifiers, GdkModifierType modifiers,
GtkObject *object) GtkObject *object)
{ {
GtkBindingEntry *entry; GtkBindingEntry *entry;
...@@ -564,7 +564,7 @@ gtk_binding_set_activate (GtkBindingSet *binding_set, ...@@ -564,7 +564,7 @@ gtk_binding_set_activate (GtkBindingSet *binding_set,
void void
gtk_binding_entry_clear (GtkBindingSet *binding_set, gtk_binding_entry_clear (GtkBindingSet *binding_set,
guint keyval, guint keyval,
guint modifiers) GdkModifierType modifiers)
{ {
GtkBindingEntry *entry; GtkBindingEntry *entry;
...@@ -583,7 +583,7 @@ gtk_binding_entry_clear (GtkBindingSet *binding_set, ...@@ -583,7 +583,7 @@ gtk_binding_entry_clear (GtkBindingSet *binding_set,
void void
gtk_binding_entry_remove (GtkBindingSet *binding_set, gtk_binding_entry_remove (GtkBindingSet *binding_set,
guint keyval, guint keyval,
guint modifiers) GdkModifierType modifiers)
{ {
GtkBindingEntry *entry; GtkBindingEntry *entry;
...@@ -600,7 +600,7 @@ gtk_binding_entry_remove (GtkBindingSet *binding_set, ...@@ -600,7 +600,7 @@ gtk_binding_entry_remove (GtkBindingSet *binding_set,
void void
gtk_binding_entry_add_signall (GtkBindingSet *binding_set, gtk_binding_entry_add_signall (GtkBindingSet *binding_set,
guint keyval, guint keyval,
guint modifiers, GdkModifierType modifiers,
const gchar *signal_name, const gchar *signal_name,
GSList *binding_args) GSList *binding_args)
{ {
...@@ -678,7 +678,7 @@ gtk_binding_entry_add_signall (GtkBindingSet *binding_set, ...@@ -678,7 +678,7 @@ gtk_binding_entry_add_signall (GtkBindingSet *binding_set,
void void
gtk_binding_entry_add_signal (GtkBindingSet *binding_set, gtk_binding_entry_add_signal (GtkBindingSet *binding_set,
guint keyval, guint keyval,
guint modifiers, GdkModifierType modifiers,
const gchar *signal_name, const gchar *signal_name,
guint n_args, guint n_args,
...) ...)
...@@ -920,7 +920,7 @@ gtk_binding_entries_sort_patterns (GtkBindingEntry *entries, ...@@ -920,7 +920,7 @@ gtk_binding_entries_sort_patterns (GtkBindingEntry *entries,
gboolean gboolean
gtk_bindings_activate (GtkObject *object, gtk_bindings_activate (GtkObject *object,
guint keyval, guint keyval,
guint modifiers) GdkModifierType modifiers)
{ {
GtkBindingEntry *entries; GtkBindingEntry *entries;
GtkWidget *widget; GtkWidget *widget;
...@@ -1002,7 +1002,7 @@ static guint ...@@ -1002,7 +1002,7 @@ static guint
gtk_binding_parse_signal (GScanner *scanner, gtk_binding_parse_signal (GScanner *scanner,
GtkBindingSet *binding_set, GtkBindingSet *binding_set,
guint keyval, guint keyval,
guint modifiers) GdkModifierType modifiers)
{ {
gchar *signal; gchar *signal;
guint expected_token = 0; guint expected_token = 0;
...@@ -1161,7 +1161,7 @@ gtk_binding_parse_bind (GScanner *scanner, ...@@ -1161,7 +1161,7 @@ gtk_binding_parse_bind (GScanner *scanner,
GtkBindingSet *binding_set) GtkBindingSet *binding_set)
{ {
guint keyval = 0; guint keyval = 0;
guint modifiers = 0; GdkModifierType modifiers = 0;
g_return_val_if_fail (scanner != NULL, G_TOKEN_ERROR); g_return_val_if_fail (scanner != NULL, G_TOKEN_ERROR);
......
...@@ -65,7 +65,7 @@ struct _GtkBindingEntry ...@@ -65,7 +65,7 @@ struct _GtkBindingEntry
/* key portion /* key portion
*/ */
guint keyval; guint keyval;
guint modifiers; GdkModifierType modifiers;
GtkBindingSet *binding_set; GtkBindingSet *binding_set;
guint destroyed : 1; guint destroyed : 1;
...@@ -101,18 +101,18 @@ GtkBindingSet* gtk_binding_set_by_class(gpointer object_class); ...@@ -101,18 +101,18 @@ GtkBindingSet* gtk_binding_set_by_class(gpointer object_class);
GtkBindingSet* gtk_binding_set_find (const gchar *set_name); GtkBindingSet* gtk_binding_set_find (const gchar *set_name);
gboolean gtk_bindings_activate (GtkObject *object, gboolean gtk_bindings_activate (GtkObject *object,
guint keyval, guint keyval,
guint modifiers); GdkModifierType modifiers);
gboolean gtk_binding_set_activate (GtkBindingSet *binding_set, gboolean gtk_binding_set_activate (GtkBindingSet *binding_set,
guint keyval, guint keyval,
guint modifiers, GdkModifierType modifiers,
GtkObject *object); GtkObject *object);
#define gtk_binding_entry_add gtk_binding_entry_clear #define gtk_binding_entry_add gtk_binding_entry_clear
void gtk_binding_entry_clear (GtkBindingSet *binding_set, void gtk_binding_entry_clear (GtkBindingSet *binding_set,
guint keyval, guint keyval,
guint modifiers); GdkModifierType modifiers);
void gtk_binding_entry_add_signal (GtkBindingSet *binding_set, void gtk_binding_entry_add_signal (GtkBindingSet *binding_set,
guint keyval, guint keyval,
guint modifiers, GdkModifierType modifiers,
const gchar *signal_name, const gchar *signal_name,
guint n_args, guint n_args,
...); ...);
...@@ -126,10 +126,10 @@ void gtk_binding_set_add_path (GtkBindingSet *binding_set, ...@@ -126,10 +126,10 @@ void gtk_binding_set_add_path (GtkBindingSet *binding_set,
void gtk_binding_entry_remove (GtkBindingSet *binding_set, void gtk_binding_entry_remove (GtkBindingSet *binding_set,
guint keyval, guint keyval,
guint modifiers); GdkModifierType modifiers);
void gtk_binding_entry_add_signall (GtkBindingSet *binding_set, void gtk_binding_entry_add_signall (GtkBindingSet *binding_set,
guint keyval, guint keyval,
guint modifiers, GdkModifierType modifiers,
const gchar *signal_name, const gchar *signal_name,
GSList *binding_args); GSList *binding_args);
guint gtk_binding_parse_binding (GScanner *scanner); guint gtk_binding_parse_binding (GScanner *scanner);
......
...@@ -393,7 +393,7 @@ gtk_image_menu_item_new_from_stock (const gchar *stock_id, ...@@ -393,7 +393,7 @@ gtk_image_menu_item_new_from_stock (const gchar *stock_id,
} }
else else
{ {
item = gtk_image_menu_item_new_with_label (stock_id); item = gtk_image_menu_item_new_with_mnemonic (stock_id);
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
} }
......
...@@ -586,14 +586,15 @@ gtk_item_factory_from_widget (GtkWidget *widget) ...@@ -586,14 +586,15 @@ gtk_item_factory_from_widget (GtkWidget *widget)
* gtk_item_factory_path_from_widget: * gtk_item_factory_path_from_widget:
* @widget: a widget * @widget: a widget
* @returns: the full path to @widget if it been created by an item factory, * @returns: the full path to @widget if it been created by an item factory,
* %NULL otherwise * %NULL otherwise. This value is owned by GTK+ and must not be
* modified or freed.
* *
* If @widget has been created by an item factory, returns the full path * If @widget has been created by an item factory, returns the full path
* to it. (The full path of a widget is the concatenation of the factory * to it. (The full path of a widget is the concatenation of the factory
* path specified in gtk_item_factory_new() with the path specified in the * path specified in gtk_item_factory_new() with the path specified in the
* #GtkItemFactoryEntry from which the widget was created.) * #GtkItemFactoryEntry from which the widget was created.)
*/ */
gchar* G_CONST_RETURN gchar*
gtk_item_factory_path_from_widget (GtkWidget *widget) gtk_item_factory_path_from_widget (GtkWidget *widget)
{ {
g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL); g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL);
......
...@@ -143,8 +143,8 @@ void gtk_item_factory_add_foreign (GtkWidget *accel_widget, ...@@ -143,8 +143,8 @@ void gtk_item_factory_add_foreign (GtkWidget *accel_widget,
guint keyval, guint keyval,
GdkModifierType modifiers); GdkModifierType modifiers);
GtkItemFactory* gtk_item_factory_from_widget (GtkWidget *widget); GtkItemFactory* gtk_item_factory_from_widget (GtkWidget *widget);
gchar* gtk_item_factory_path_from_widget (GtkWidget *widget); G_CONST_RETURN gchar* gtk_item_factory_path_from_widget (GtkWidget *widget);
GtkWidget* gtk_item_factory_get_item (GtkItemFactory *ifactory, GtkWidget* gtk_item_factory_get_item (GtkItemFactory *ifactory,
const gchar *path); const gchar *path);
......
...@@ -2603,12 +2603,12 @@ widget_new_accel_closure (GtkWidget *widget, ...@@ -2603,12 +2603,12 @@ widget_new_accel_closure (GtkWidget *widget,
* instead. * instead.
*/ */
void void
gtk_widget_add_accelerator (GtkWidget *widget, gtk_widget_add_accelerator (GtkWidget *widget,
const gchar *accel_signal, const gchar *accel_signal,
GtkAccelGroup *accel_group, GtkAccelGroup *accel_group,
guint accel_key, guint accel_key,
guint accel_mods, GdkModifierType accel_mods,
GtkAccelFlags accel_flags) GtkAccelFlags accel_flags)
{ {
GClosure *closure; GClosure *closure;
GSignalQuery query; GSignalQuery query;
...@@ -2659,10 +2659,10 @@ gtk_widget_add_accelerator (GtkWidget *widget, ...@@ -2659,10 +2659,10 @@ gtk_widget_add_accelerator (GtkWidget *widget,
* gtk_widget_add_accelerator(). * gtk_widget_add_accelerator().
*/ */
gboolean gboolean
gtk_widget_remove_accelerator (GtkWidget *widget, gtk_widget_remove_accelerator (GtkWidget *widget,
GtkAccelGroup *accel_group, GtkAccelGroup *accel_group,
guint accel_key, guint accel_key,
guint accel_mods) GdkModifierType accel_mods)
{ {
GtkAccelGroupEntry *ag_entry; GtkAccelGroupEntry *ag_entry;
GList *slist, *clist; GList *slist, *clist;
......
...@@ -482,12 +482,12 @@ void gtk_widget_add_accelerator (GtkWidget *widget, ...@@ -482,12 +482,12 @@ void gtk_widget_add_accelerator (GtkWidget *widget,
const gchar *accel_signal, const gchar *accel_signal,
GtkAccelGroup *accel_group, GtkAccelGroup *accel_group,
guint accel_key, guint accel_key,
guint accel_mods, GdkModifierType accel_mods,
GtkAccelFlags accel_flags); GtkAccelFlags accel_flags);
gboolean gtk_widget_remove_accelerator (GtkWidget *widget, gboolean gtk_widget_remove_accelerator (GtkWidget *widget,
GtkAccelGroup *accel_group, GtkAccelGroup *accel_group,
guint accel_key, guint accel_key,
guint accel_mods); GdkModifierType accel_mods);
void _gtk_widget_set_accel_path (GtkWidget *widget, void _gtk_widget_set_accel_path (GtkWidget *widget,
const gchar *accel_path, const gchar *accel_path,
GtkAccelGroup *accel_group); GtkAccelGroup *accel_group);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment