Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=frugal-tweak.git;a=commitdiff;h=f4a73845f08902ee731ca8bfd10d59422466ebd9
commit f4a73845f08902ee731ca8bfd10d59422466ebd9 Author: bouleetbil <bouleet...@frogdev.info> Date: Fri Sep 17 21:51:35 2010 +0200 *can change keymap diff --git a/frugal-mono-tools/ConfSystem.cs b/frugal-mono-tools/ConfSystem.cs index 6466d47..399e2be 100644 --- a/frugal-mono-tools/ConfSystem.cs +++ b/frugal-mono-tools/ConfSystem.cs @@ -103,7 +103,8 @@ namespace frugalmonotools private void _findKeymapSystem() { string ext=".map.gz"; - string dirKeymap="/usr/share/keymaps/"; + string dirKeymap=@"/usr/share/keymaps/"; + KeymapSystem.Clear(); string[] files= Directory.GetFiles(dirKeymap,"*"+ext,SearchOption.AllDirectories); foreach (string file in files) @@ -112,9 +113,10 @@ namespace frugalmonotools strKeymap=System.IO.Path.GetFileName(strKeymap); strKeymap=strKeymap.Replace(ext,""); KeymapSystem.Add(strKeymap); - } } + + private void _findLocaleSystem() { string output = Outils.getoutput("locale -a"); diff --git a/frugal-mono-tools/OUTILS/Outils.cs b/frugal-mono-tools/OUTILS/Outils.cs index 6bfdf10..a291126 100644 --- a/frugal-mono-tools/OUTILS/Outils.cs +++ b/frugal-mono-tools/OUTILS/Outils.cs @@ -17,6 +17,8 @@ */ using System; using System.Diagnostics; +using System.Collections.Generic; +using System.IO; namespace frugalmonotools { public static class Outils diff --git a/frugal-mono-tools/WID_System.cs b/frugal-mono-tools/WID_System.cs index 3413bf2..7e6507f 100644 --- a/frugal-mono-tools/WID_System.cs +++ b/frugal-mono-tools/WID_System.cs @@ -24,6 +24,7 @@ namespace frugalmonotools { private ConfSystem confSystem = new ConfSystem(); ListStore modelLocale = new ListStore (typeof (string)); + ListStore modelKeymap = new ListStore (typeof (string)); private Gtk.TreeIter iter; public WID_System () @@ -49,6 +50,15 @@ namespace frugalmonotools if(confSystem.GetLocale()==locale) CBO_Locale.SetActiveIter(iter); } + CBO_Keymap.Model=modelKeymap; + foreach (string keymap in confSystem.KeymapSystem) + { + iter=modelKeymap.AppendValues(keymap); + //Console.WriteLine("compare "+confSystem.GetKeymap()+" "+keymap); + if(confSystem.GetKeymap()==keymap) + CBO_Keymap.SetActiveIter(iter); + } + } protected virtual void OnBTNSystemClicked (object sender, System.EventArgs e) { diff --git a/frugal-mono-tools/gtk-gui/frugalmonotools.WID_System.cs b/frugal-mono-tools/gtk-gui/frugalmonotools.WID_System.cs index 8fa79d4..acec353 100644 --- a/frugal-mono-tools/gtk-gui/frugalmonotools.WID_System.cs +++ b/frugal-mono-tools/gtk-gui/frugalmonotools.WID_System.cs @@ -42,6 +42,12 @@ namespace frugalmonotools private global::Gtk.ComboBoxEntry CBO_Locale; + private global::Gtk.HBox hbox1; + + private global::Gtk.Label label17; + + private global::Gtk.ComboBoxEntry CBO_Keymap; + private global::Gtk.HBox hbox29; private global::Gtk.Button BTN_System; @@ -81,7 +87,7 @@ namespace frugalmonotools // Container child hbox24.Gtk.Box+BoxChild this.label11 = new global::Gtk.Label (); this.label11.Name = "label11"; - this.label11.LabelProp = global::Mono.Unix.Catalog.GetString ("hostname "); + this.label11.LabelProp = global::Mono.Unix.Catalog.GetString ("Hostname "); this.hbox24.Add (this.label11); global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.hbox24[this.label11])); w3.Position = 0; @@ -109,7 +115,7 @@ namespace frugalmonotools // Container child hbox25.Gtk.Box+BoxChild this.label12 = new global::Gtk.Label (); this.label12.Name = "label12"; - this.label12.LabelProp = global::Mono.Unix.Catalog.GetString ("distribution"); + this.label12.LabelProp = global::Mono.Unix.Catalog.GetString ("Distribution"); this.hbox25.Add (this.label12); global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.hbox25[this.label12])); w6.Position = 0; @@ -137,7 +143,7 @@ namespace frugalmonotools // Container child hbox26.Gtk.Box+BoxChild this.label13 = new global::Gtk.Label (); this.label13.Name = "label13"; - this.label13.LabelProp = global::Mono.Unix.Catalog.GetString ("kernel "); + this.label13.LabelProp = global::Mono.Unix.Catalog.GetString ("Kernel "); this.hbox26.Add (this.label13); global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.hbox26[this.label13])); w9.Position = 0; @@ -165,7 +171,7 @@ namespace frugalmonotools // Container child hbox27.Gtk.Box+BoxChild this.label14 = new global::Gtk.Label (); this.label14.Name = "label14"; - this.label14.LabelProp = global::Mono.Unix.Catalog.GetString ("shell "); + this.label14.LabelProp = global::Mono.Unix.Catalog.GetString ("Shell "); this.hbox27.Add (this.label14); global::Gtk.Box.BoxChild w12 = ((global::Gtk.Box.BoxChild)(this.hbox27[this.label14])); w12.Position = 0; @@ -193,7 +199,7 @@ namespace frugalmonotools // Container child hbox28.Gtk.Box+BoxChild this.label15 = new global::Gtk.Label (); this.label15.Name = "label15"; - this.label15.LabelProp = global::Mono.Unix.Catalog.GetString ("language "); + this.label15.LabelProp = global::Mono.Unix.Catalog.GetString ("Language "); this.hbox28.Add (this.label15); global::Gtk.Box.BoxChild w15 = ((global::Gtk.Box.BoxChild)(this.hbox28[this.label15])); w15.Position = 0; @@ -222,6 +228,32 @@ namespace frugalmonotools w18.Expand = false; w18.Fill = false; // Container child vbox11.Gtk.Box+BoxChild + this.hbox1 = new global::Gtk.HBox (); + this.hbox1.Name = "hbox1"; + this.hbox1.Spacing = 6; + // Container child hbox1.Gtk.Box+BoxChild + this.label17 = new global::Gtk.Label (); + this.label17.Name = "label17"; + this.label17.LabelProp = global::Mono.Unix.Catalog.GetString ("Keymap "); + this.hbox1.Add (this.label17); + global::Gtk.Box.BoxChild w19 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.label17])); + w19.Position = 0; + w19.Expand = false; + w19.Fill = false; + // Container child hbox1.Gtk.Box+BoxChild + this.CBO_Keymap = global::Gtk.ComboBoxEntry.NewText (); + this.CBO_Keymap.Name = "CBO_Keymap"; + this.hbox1.Add (this.CBO_Keymap); + global::Gtk.Box.BoxChild w20 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.CBO_Keymap])); + w20.Position = 2; + w20.Expand = false; + w20.Fill = false; + this.vbox11.Add (this.hbox1); + global::Gtk.Box.BoxChild w21 = ((global::Gtk.Box.BoxChild)(this.vbox11[this.hbox1])); + w21.Position = 6; + w21.Expand = false; + w21.Fill = false; + // Container child vbox11.Gtk.Box+BoxChild this.hbox29 = new global::Gtk.HBox (); this.hbox29.Name = "hbox29"; this.hbox29.Spacing = 6; @@ -232,15 +264,15 @@ namespace frugalmonotools this.BTN_System.UseUnderline = true; this.BTN_System.Label = global::Mono.Unix.Catalog.GetString ("Apply"); this.hbox29.Add (this.BTN_System); - global::Gtk.Box.BoxChild w19 = ((global::Gtk.Box.BoxChild)(this.hbox29[this.BTN_System])); - w19.Position = 2; - w19.Expand = false; - w19.Fill = false; + global::Gtk.Box.BoxChild w22 = ((global::Gtk.Box.BoxChild)(this.hbox29[this.BTN_System])); + w22.Position = 2; + w22.Expand = false; + w22.Fill = false; this.vbox11.Add (this.hbox29); - global::Gtk.Box.BoxChild w20 = ((global::Gtk.Box.BoxChild)(this.vbox11[this.hbox29])); - w20.Position = 6; - w20.Expand = false; - w20.Fill = false; + global::Gtk.Box.BoxChild w23 = ((global::Gtk.Box.BoxChild)(this.vbox11[this.hbox29])); + w23.Position = 7; + w23.Expand = false; + w23.Fill = false; this.Add (this.vbox11); if ((this.Child != null)) { this.Child.ShowAll (); diff --git a/frugal-mono-tools/gtk-gui/gui.stetic b/frugal-mono-tools/gtk-gui/gui.stetic index c78c917..a73f70e 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="477 436"> + <widget class="Gtk.Bin" id="frugalmonotools.WID_System" design-size="477 465"> <property name="MemberName" /> <property name="Visible">False</property> <child> @@ -666,7 +666,7 @@ <child> <widget class="Gtk.Label" id="label11"> <property name="MemberName" /> - <property name="LabelProp" translatable="yes">hostname </property> + <property name="LabelProp" translatable="yes">Hostname </property> </widget> <packing> <property name="Position">0</property> @@ -706,7 +706,7 @@ <child> <widget class="Gtk.Label" id="label12"> <property name="MemberName" /> - <property name="LabelProp" translatable="yes">distribution</property> + <property name="LabelProp" translatable="yes">Distribution</property> </widget> <packing> <property name="Position">0</property> @@ -746,7 +746,7 @@ <child> <widget class="Gtk.Label" id="label13"> <property name="MemberName" /> - <property name="LabelProp" translatable="yes">kernel </property> + <property name="LabelProp" translatable="yes">Kernel </property> </widget> <packing> <property name="Position">0</property> @@ -786,7 +786,7 @@ <child> <widget class="Gtk.Label" id="label14"> <property name="MemberName" /> - <property name="LabelProp" translatable="yes">shell </property> + <property name="LabelProp" translatable="yes">Shell </property> </widget> <packing> <property name="Position">0</property> @@ -826,7 +826,7 @@ <child> <widget class="Gtk.Label" id="label15"> <property name="MemberName" /> - <property name="LabelProp" translatable="yes">language </property> + <property name="LabelProp" translatable="yes">Language </property> </widget> <packing> <property name="Position">0</property> @@ -869,6 +869,46 @@ </packing> </child> <child> + <widget class="Gtk.HBox" id="hbox1"> + <property name="MemberName" /> + <property name="Spacing">6</property> + <child> + <widget class="Gtk.Label" id="label17"> + <property name="MemberName" /> + <property name="LabelProp" translatable="yes">Keymap </property> + </widget> + <packing> + <property name="Position">0</property> + <property name="AutoSize">True</property> + <property name="Expand">False</property> + <property name="Fill">False</property> + </packing> + </child> + <child> + <placeholder /> + </child> + <child> + <widget class="Gtk.ComboBoxEntry" id="CBO_Keymap"> + <property name="MemberName" /> + <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> + <packing> + <property name="Position">6</property> + <property name="AutoSize">True</property> + <property name="Expand">False</property> + <property name="Fill">False</property> + </packing> + </child> + <child> <widget class="Gtk.HBox" id="hbox29"> <property name="MemberName" /> <property name="Spacing">6</property> @@ -896,7 +936,7 @@ </child> </widget> <packing> - <property name="Position">6</property> + <property name="Position">7</property> <property name="AutoSize">True</property> <property name="Expand">False</property> <property name="Fill">False</property> _______________________________________________ Frugalware-git mailing list Frugalware-git@frugalware.org http://frugalware.org/mailman/listinfo/frugalware-git