gnome-commander r1649 - in trunk: . src



Author: epiotr
Date: Fri Mar 14 16:11:00 2008
New Revision: 1649
URL: http://svn.gnome.org/viewvc/gnome-commander?rev=1649&view=rev

Log:
Added ascii_islower() and ascii_isupper()

Modified:
   trunk/ChangeLog
   trunk/src/gnome-cmd-user-actions.h

Modified: trunk/src/gnome-cmd-user-actions.h
==============================================================================
--- trunk/src/gnome-cmd-user-actions.h	(original)
+++ trunk/src/gnome-cmd-user-actions.h	Fri Mar 14 16:11:00 2008
@@ -66,6 +66,8 @@
     void load(const gchar *section);
     void write(const gchar *section);
 
+    void clear ()                                                           {   action.clear();               }
+
     gboolean register_action(guint state, guint keyval, const gchar *name, const char *user_data=NULL);
     gboolean register_action(guint keyval, const gchar *name, const char *user_data=NULL);
     void unregister(const gchar *name);
@@ -79,12 +81,10 @@
 
   private:
 
-    gboolean ascii_isalnum (guint key_val)                                  {  return key_val<=G_MAXUINT8 && g_ascii_isalnum (key_val);  }
-    gboolean ascii_isalpha (guint key_val)                                  {  return key_val<=G_MAXUINT8 && g_ascii_isalpha (key_val);  }
     std::string key2str(guint state, guint key_val);
-    std::string key2str(const GdkEventKey &event)                           {  return key2str(event.state, event.keyval);                }
+    std::string key2str(const GdkEventKey &event)                           {  return key2str(event.state, event.keyval);     }
     GdkEventKey str2key(gchar *s, guint &state, guint &key_val);
-    GdkEventKey str2key(gchar *s, GdkEventKey &event)                       {  return str2key(s, event.state, event.keyval);             }
+    GdkEventKey str2key(gchar *s, GdkEventKey &event)                       {  return str2key(s, event.state, event.keyval);  }
     GdkEventKey str2key(gchar *s);
 
   public:
@@ -175,6 +175,26 @@
     return str2key(s, event);
 }
 
+inline gboolean ascii_isalnum (guint key_val)
+{
+    return key_val<=G_MAXUINT8 && g_ascii_isalnum (key_val);
+}
+
+inline gboolean ascii_isalpha (guint key_val)
+{
+    return key_val<=G_MAXUINT8 && g_ascii_isalpha (key_val);
+}
+
+inline gboolean ascii_islower (const GdkEventKey &event)
+{
+    return key_val<=G_MAXUINT8 && g_ascii_islower (event.key_val);
+}
+
+inline gboolean ascii_isupper (const GdkEventKey &event)
+{
+    return key_val<=G_MAXUINT8 && g_ascii_isupper (event.key_val);
+}
+
 
 extern GnomeCmdUserActions gcmd_user_actions;
 



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