mirror of https://github.com/GNOME/gimp.git
use gtk_accelerator_name() instead of serializing the accelerator
2005-11-27 Michael Natterer <mitch@gimp.org> * app/widgets/gimpdeviceinfo.c (gimp_device_info_get_property): use gtk_accelerator_name() instead of serializing the accelerator manually.
This commit is contained in:
parent
6fd3b17609
commit
7bbcc69815
|
@ -1,3 +1,9 @@
|
|||
2005-11-27 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/widgets/gimpdeviceinfo.c (gimp_device_info_get_property):
|
||||
use gtk_accelerator_name() instead of serializing the accelerator
|
||||
manually.
|
||||
|
||||
2005-11-27 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
Apparently, there was a reason for implementing the window actions
|
||||
|
|
|
@ -389,24 +389,13 @@ gimp_device_info_get_property (GObject *object,
|
|||
|
||||
if (keyval)
|
||||
{
|
||||
/* FIXME: integrate this back with menus_install_accelerator */
|
||||
gchar accel[64];
|
||||
gchar t2[2];
|
||||
gchar *accel;
|
||||
gchar *escaped;
|
||||
|
||||
accel[0] = '\0';
|
||||
if (modifiers & GDK_CONTROL_MASK)
|
||||
strcat (accel, "<control>");
|
||||
if (modifiers & GDK_SHIFT_MASK)
|
||||
strcat (accel, "<shift>");
|
||||
if (modifiers & GDK_MOD1_MASK)
|
||||
strcat (accel, "<alt>");
|
||||
|
||||
t2[0] = keyval;
|
||||
t2[1] = '\0';
|
||||
strcat (accel, t2);
|
||||
|
||||
accel = gtk_accelerator_name (keyval, modifiers);
|
||||
escaped = g_strescape (accel, NULL);
|
||||
g_free (accel);
|
||||
|
||||
g_value_set_string (&string_value, escaped);
|
||||
g_free (escaped);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue