Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=frugal-tweak.git;a=commitdiff;h=0be05ad809ab470d861b5249ea3abcd23da39088

commit 0be05ad809ab470d861b5249ea3abcd23da39088
Author: bouleetbil <bouleet...@frogdev.info>
Date:   Thu Sep 16 14:23:47 2010 +0000

*added keymap support

diff --git a/frugal-mono-tools/ConfSystem.cs b/frugal-mono-tools/ConfSystem.cs
index 55e7ea2..6cb1b27 100644
--- a/frugal-mono-tools/ConfSystem.cs
+++ b/frugal-mono-tools/ConfSystem.cs
@@ -28,9 +28,11 @@ namespace frugalmonotools
const  string cch_hostname =@"/etc/HOSTNAME";
const string cch_release=@"/etc/frugalware-release";
const string cch_locale=@"/etc/profile.d/lang.sh";
+               const string cch_keymap=@"/etc/sysconfig/keymap";
private string _hostname;
private string _locale;
private string _distribution; //can't change it
+               private string _keymap;
public List<string>  LocaleSystem = new List<string>();
public string GetHostname()
{
@@ -68,6 +70,27 @@ namespace frugalmonotools
}
public void SetLocale(string locale) {
_locale=locale;
+               }
+               public string GetKeymap()
+               {
+                       try{
+                               string content = Outils.ReadFile(cch_keymap);
+                               string[] lines = content.Split('\n');
+                               foreach (string line in lines)
+                               {
+                                        if (Regex.Matches(line, 
"keymap=").Count>0)
+                                               {
+                                                       string keymap = 
line.Split('=')[1];
+                                                       _keymap=keymap;
+                                                       return keymap;
+                                               }
+                               }
+                       }
+                       catch{  }
+                       return "";
+               }
+               public void SetKeymap(string keymap) {
+                       _keymap=keymap;
}
public ConfSystem ()
{
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to