gnome-commander r1702 - in branches/gcmd-1-3: . src



Author: epiotr
Date: Tue Apr 15 22:16:53 2008
New Revision: 1702
URL: http://svn.gnome.org/viewvc/gnome-commander?rev=1702&view=rev

Log:
Do not use gtk_accelerator_get_label() for representing accelerators

Modified:
   branches/gcmd-1-3/ChangeLog
   branches/gcmd-1-3/src/eggcellrendererkeys.cc
   branches/gcmd-1-3/src/eggcellrendererkeys.h
   branches/gcmd-1-3/src/gnome-cmd-key-shortcuts-dialog.cc

Modified: branches/gcmd-1-3/src/eggcellrendererkeys.cc
==============================================================================
--- branches/gcmd-1-3/src/eggcellrendererkeys.cc	(original)
+++ branches/gcmd-1-3/src/eggcellrendererkeys.cc	Tue Apr 15 22:16:53 2008
@@ -228,7 +228,7 @@
 }
 
 
-inline gchar *convert_keysym_state_to_string (guint accel_key, GdkModifierType accel_mods)
+gchar *egg_accelerator_get_label (guint accel_key, GdkModifierType accel_mods)
 {
     if (accel_key == 0)
         return g_strdup (_("Disabled"));
@@ -677,7 +677,7 @@
     {
         // sync string to the key values
         GtkCellRendererText *celltext = GTK_CELL_RENDERER_TEXT (keys);
-        char *text = convert_keysym_state_to_string (keys->accel_key, keys->accel_mask);
+        char *text = egg_accelerator_get_label (keys->accel_key, keys->accel_mask);
         g_object_set (keys, "text", text, NULL);
         g_free (text);
     }

Modified: branches/gcmd-1-3/src/eggcellrendererkeys.h
==============================================================================
--- branches/gcmd-1-3/src/eggcellrendererkeys.h	(original)
+++ branches/gcmd-1-3/src/eggcellrendererkeys.h	Tue Apr 15 22:16:53 2008
@@ -81,5 +81,6 @@
 void  egg_cell_renderer_keys_set_accelerator (EggCellRendererKeys *keys, guint keyval, GdkModifierType mask);
 void  egg_cell_renderer_keys_get_accelerator (EggCellRendererKeys *keys, guint *keyval, GdkModifierType *mask);
 void  egg_cell_renderer_keys_set_accel_mode (EggCellRendererKeys *keys, GtkCellRendererAccelMode accel_mode);
+gchar *egg_accelerator_get_label (guint accel_key, GdkModifierType accel_mods);
 
 #endif // __GTK_CELL_RENDERER_KEYS_H__

Modified: branches/gcmd-1-3/src/gnome-cmd-key-shortcuts-dialog.cc
==============================================================================
--- branches/gcmd-1-3/src/gnome-cmd-key-shortcuts-dialog.cc	(original)
+++ branches/gcmd-1-3/src/gnome-cmd-key-shortcuts-dialog.cc	Tue Apr 15 22:16:53 2008
@@ -467,7 +467,7 @@
 
 inline gboolean conflict_confirm (GtkWidget *view, const gchar *action, guint accel_key, GdkModifierType accel_mask)
 {
-    gchar *accel_string = gtk_accelerator_get_label (accel_key, accel_mask);
+    gchar *accel_string = egg_accelerator_get_label (accel_key, accel_mask);
 
     GtkWidget *dlg = gtk_message_dialog_new (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (view))),
                                              (GtkDialogFlags) (GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT),



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]