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

commit c022db291d813d37613eb41758bb23bd845d7718
Author: bouleetbil <bouleet...@frogdev.info>
Date:   Sat Sep 11 19:41:25 2010 +0200

*select locale in a combo more simple for the user

diff --git a/frugal-mono-tools/MainWindow.cs b/frugal-mono-tools/MainWindow.cs
index a465159..8bf32e1 100644
--- a/frugal-mono-tools/MainWindow.cs
+++ b/frugal-mono-tools/MainWindow.cs
@@ -40,6 +40,7 @@ public partial class MainWindow : Gtk.Window
ListStore UpdateListStore = new Gtk.ListStore (typeof (string));
ListStore modelRepoList = new ListStore (typeof (string),typeof (int));
ListStore modelXorgDrivers = new ListStore (typeof (string));
+       ListStore modelLocale = new ListStore (typeof (string));
ListStore serviceListStore = new Gtk.ListStore (typeof (string),typeof 
(string),typeof (string),typeof (string));
//webkit engine
private WebKit.WebView webview=null;
@@ -382,7 +383,13 @@ public partial class MainWindow : Gtk.Window
SAI_Distribution.Text=confSystem.GetDistribution();
SAI_Kernel.Text=confSystem.GetKernel();
SAI_Shell.Text=confSystem.GetUserShell();
-               SAI_Locale.Text=confSystem.GetLocale();
+               CBO_Locale.Model=modelLocale;
+               foreach (string locale in  confSystem.LocaleSystem)
+               {
+                       iter=modelLocale.AppendValues(locale);
+                       if(confSystem.GetLocale()==locale)
+                               CBO_Locale.SetActiveIter(iter);
+               }

//configuration
INT_CheckStartup.Active=MainClass.configuration.Get_CheckUpdate();
@@ -1079,7 +1086,7 @@ public partial class MainWindow : Gtk.Window
protected virtual void OnBTNSystemClicked (object sender, System.EventArgs e)
{
confSystem.SetHostname(SAI_Host.Text);
-               confSystem.SetLocale(SAI_Locale.Text);
+               confSystem.SetLocale(CBO_Locale.Entry.Text);
confSystem.Save();
}

diff --git a/frugal-mono-tools/gtk-gui/MainWindow.cs 
b/frugal-mono-tools/gtk-gui/MainWindow.cs
index ddd9f23..4db7a71 100644
--- a/frugal-mono-tools/gtk-gui/MainWindow.cs
+++ b/frugal-mono-tools/gtk-gui/MainWindow.cs
@@ -115,7 +115,7 @@ public partial class MainWindow

private global::Gtk.Label label16;

-       private global::Gtk.Entry SAI_Locale;
+       private global::Gtk.ComboBoxEntry CBO_Locale;

private global::Gtk.HBox hbox29;

@@ -317,7 +317,7 @@ public partial class MainWindow
this.ONG_principal = new global::Gtk.Notebook ();
this.ONG_principal.CanFocus = true;
this.ONG_principal.Name = "ONG_principal";
-               this.ONG_principal.CurrentPage = 3;
+               this.ONG_principal.CurrentPage = 2;
// Container child ONG_principal.Gtk.Notebook+NotebookChild
this.vbox4 = new global::Gtk.VBox ();
this.vbox4.Name = "vbox4";
@@ -805,14 +805,13 @@ public partial class MainWindow
w50.Expand = false;
w50.Fill = false;
// Container child hbox28.Gtk.Box+BoxChild
-               this.SAI_Locale = new global::Gtk.Entry ();
-               this.SAI_Locale.CanFocus = true;
-               this.SAI_Locale.Name = "SAI_Locale";
-               this.SAI_Locale.IsEditable = true;
-               this.SAI_Locale.InvisibleChar = '•';
-               this.hbox28.Add (this.SAI_Locale);
-               global::Gtk.Box.BoxChild w51 = 
((global::Gtk.Box.BoxChild)(this.hbox28[this.SAI_Locale]));
+               this.CBO_Locale = global::Gtk.ComboBoxEntry.NewText ();
+               this.CBO_Locale.Name = "CBO_Locale";
+               this.hbox28.Add (this.CBO_Locale);
+               global::Gtk.Box.BoxChild w51 = 
((global::Gtk.Box.BoxChild)(this.hbox28[this.CBO_Locale]));
w51.Position = 2;
+               w51.Expand = false;
+               w51.Fill = false;
this.vbox11.Add (this.hbox28);
global::Gtk.Box.BoxChild w52 = 
((global::Gtk.Box.BoxChild)(this.vbox11[this.hbox28]));
w52.Position = 5;
diff --git a/frugal-mono-tools/gtk-gui/gui.stetic 
b/frugal-mono-tools/gtk-gui/gui.stetic
index 4ab7b76..adc87bf 100644
--- a/frugal-mono-tools/gtk-gui/gui.stetic
+++ b/frugal-mono-tools/gtk-gui/gui.stetic
@@ -27,7 +27,7 @@
<widget class="Gtk.Notebook" id="ONG_principal">
<property name="MemberName" />
<property name="CanFocus">True</property>
-        <property name="CurrentPage">3</property>
+        <property name="CurrentPage">2</property>
<child>
<widget class="Gtk.VBox" id="vbox4">
<property name="MemberName" />
@@ -731,15 +731,16 @@
</packing>
</child>
<child>
-                  <widget class="Gtk.Entry" id="SAI_Locale">
+                  <widget class="Gtk.ComboBoxEntry" id="CBO_Locale">
<property name="MemberName" />
-                    <property name="CanFocus">True</property>
-                    <property name="IsEditable">True</property>
-                    <property name="InvisibleChar">•</property>
+                    <property name="IsTextCombo">True</property>
+                    <property name="Items" translatable="yes" />
</widget>
<packing>
<property name="Position">2</property>
<property name="AutoSize">True</property>
+                    <property name="Expand">False</property>
+                    <property name="Fill">False</property>
</packing>
</child>
</widget>
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to