summaryrefslogtreecommitdiff
path: root/capplets/keybindings/mate-keybinding-properties.c
diff options
context:
space:
mode:
authorPerberos <[email protected]>2011-12-08 14:03:31 -0300
committerPerberos <[email protected]>2011-12-08 14:03:31 -0300
commit38701ae3a78144705a70eaf0628449efbaad7076 (patch)
tree8245fcf9277377c8a0aaa6be20682617b90d2c03 /capplets/keybindings/mate-keybinding-properties.c
parentac33351b9863ec59c639a53147c95e90c07bc3eb (diff)
downloadmate-control-center-38701ae3a78144705a70eaf0628449efbaad7076.tar.bz2
mate-control-center-38701ae3a78144705a70eaf0628449efbaad7076.tar.xz
fixing issue with <Control> key at keybinding
Diffstat (limited to 'capplets/keybindings/mate-keybinding-properties.c')
-rw-r--r--capplets/keybindings/mate-keybinding-properties.c31
1 files changed, 18 insertions, 13 deletions
diff --git a/capplets/keybindings/mate-keybinding-properties.c b/capplets/keybindings/mate-keybinding-properties.c
index 5155d445..b0ac2f7f 100644
--- a/capplets/keybindings/mate-keybinding-properties.c
+++ b/capplets/keybindings/mate-keybinding-properties.c
@@ -104,18 +104,23 @@ create_builder (void)
return builder;
}
-static char*
-binding_name (guint keyval,
- guint keycode,
- EggVirtualModifierType mask,
- gboolean translate)
+static char* binding_name(guint keyval, guint keycode, EggVirtualModifierType mask, gboolean translate)
{
- if (keyval != 0 || keycode != 0)
- return translate ?
- egg_virtual_accelerator_label (keyval, keycode, mask) :
- egg_virtual_accelerator_name (keyval, keycode, mask);
- else
- return g_strdup (translate ? _("Disabled") : "");
+ if (keyval != 0 || keycode != 0)
+ {
+ if (translate)
+ {
+ return egg_virtual_accelerator_label (keyval, keycode, mask);
+ }
+ else
+ {
+ return egg_virtual_accelerator_name (keyval, keycode, mask);
+ }
+ }
+ else
+ {
+ return g_strdup (translate ? _("Disabled") : "");
+ }
}
static gboolean
@@ -1165,7 +1170,7 @@ static void accel_edited_callback(GtkCellRendererText* cell, const char* path_st
|| (tmp_key.keyval >= GDK_Hangul_Kiyeog && tmp_key.keyval <= GDK_Hangul_J_YeorinHieuh)
|| keyval_is_forbidden (tmp_key.keyval))
{
-
+
GtkWidget *dialog;
char *name;
@@ -1202,7 +1207,7 @@ static void accel_edited_callback(GtkCellRendererText* cell, const char* path_st
int response;
name = binding_name(keyval, keycode, mask, TRUE);
-
+
dialog = gtk_message_dialog_new(
GTK_WINDOW(gtk_widget_get_toplevel(GTK_WIDGET(view))),
GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_MODAL,