]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkaccellabel.c
GtkTextView: don't popdown a bubble if we don't have one
[~andy/gtk] / gtk / gtkaccellabel.c
index 311b4a4d7f1a6e2037fbed31522b55801228c6de..d8bb7e96fa4069247059cc3183863c7fdc3af6ec 100644 (file)
@@ -836,12 +836,13 @@ _gtk_accel_label_class_get_accelerator_label (GtkAccelLabelClass *klass,
 #endif
       seen_mod = TRUE;
     }
-  if (seen_mod)
-    g_string_append (gstring, klass->mod_separator);
   
   ch = gdk_keyval_to_unicode (accelerator_key);
   if (ch && ch < 0x80 && (g_unichar_isgraph (ch) || ch == ' '))
     {
+      if (seen_mod)
+        g_string_append (gstring, klass->mod_separator);
+
       switch (ch)
        {
        case ' ':
@@ -862,6 +863,9 @@ _gtk_accel_label_class_get_accelerator_label (GtkAccelLabelClass *klass,
       tmp = gdk_keyval_name (gdk_keyval_to_lower (accelerator_key));
       if (tmp != NULL)
        {
+          if (seen_mod)
+            g_string_append (gstring, klass->mod_separator);
+
          if (tmp[0] != 0 && tmp[1] == 0)
            g_string_append_c (gstring, g_ascii_toupper (tmp[0]));
          else