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

commit b2f0d360df10c456c321fcaaaf7ae8e40c682159
Author: bouleetbil <bouleet...@frogdev.info>
Date:   Wed Sep 15 22:23:19 2010 +0200

*read lang.sh and after env if not find

diff --git a/frugal-mono-tools/ConfSystem.cs b/frugal-mono-tools/ConfSystem.cs
index c495fe3..55e7ea2 100644
--- a/frugal-mono-tools/ConfSystem.cs
+++ b/frugal-mono-tools/ConfSystem.cs
@@ -18,7 +18,9 @@
using System;
using System.IO;
using System.Collections;
-using System.Collections.Generic;
+using System.Collections.Generic;
+using System.Text.RegularExpressions;
+
namespace frugalmonotools
{
public class ConfSystem
@@ -49,6 +51,19 @@ namespace frugalmonotools
return Mono.Unix.Native.Syscall.getusershell();
}
public string GetLocale() {
+                       try{
+                               string content = Outils.ReadFile(cch_locale);
+                               string[] lines = content.Split('\n');
+                               foreach (string line in lines)
+                               {
+                                        if (Regex.Matches(line, "export 
LANG=").Count>0)
+                                               {
+                                                       string local = 
line.Split('=')[1];
+                                                       return local;
+                                               }
+                               }
+                       }
+                       catch{  }
return Mono.Unix.Native.Syscall.getenv("LANG");
}
public void SetLocale(string locale) {
diff --git a/frugal-mono-tools/gtk-gui/gui.stetic 
b/frugal-mono-tools/gtk-gui/gui.stetic
index ffb9e1d..c78c917 100644
--- a/frugal-mono-tools/gtk-gui/gui.stetic
+++ b/frugal-mono-tools/gtk-gui/gui.stetic
@@ -622,7 +622,7 @@
</widget>
</child>
</widget>
-  <widget class="Gtk.Bin" id="frugalmonotools.WID_System" design-size="450 
432">
+  <widget class="Gtk.Bin" id="frugalmonotools.WID_System" design-size="477 
436">
<property name="MemberName" />
<property name="Visible">False</property>
<child>
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to