diff options
author | Christian Persch <chpe@src.gnome.org> | 2008-06-07 20:40:20 +0000 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2008-06-07 20:40:20 +0000 |
commit | dcc94280362d27cb980bfb8e5a3b1db40874a027 (patch) | |
tree | 5605939127d36993c90f7e3840b039521d5b4981 /gtk/gtkwidget.c | |
parent | e2642ac9d2d4652e7583ff8962896c6b9dd3ac5f (diff) | |
download | gtk+-dcc94280362d27cb980bfb8e5a3b1db40874a027.tar.gz |
Bug 535608 – do not string-copy accel paths in the menu code
Don't store the accel path as a string in gtkmenu/gtkmenuitem.
The accel path will be interned anyway, so keeping a string copy around
is just a waste of memory.
Improve the documentation to mention this.
svn path=/trunk/; revision=20331
Diffstat (limited to 'gtk/gtkwidget.c')
-rw-r--r-- | gtk/gtkwidget.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index 2d10cd854f..aa5402d7c2 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -4344,6 +4344,10 @@ destroy_accel_path (gpointer data) * Even when you you aren't using #GtkUIManager, if you only want to * set up accelerators on menu items gtk_menu_item_set_accel_path() * provides a somewhat more convenient interface. + * + * Note that @accel_path string will be stored in a #GQuark. Therefore, if you + * pass a static string, you can save some memory by interning it first with + * g_intern_static_string(). **/ void gtk_widget_set_accel_path (GtkWidget *widget, |