Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=frugal-tweak.git;a=commitdiff;h=ee3c155283a5a14e8e43cf79d657cc94518320f5
commit ee3c155283a5a14e8e43cf79d657cc94518320f5 Author: bouleetbil <bouleet...@frogdev.info> Date: Tue Sep 21 14:10:43 2010 +0000 *inform the user when some operations requiert root user diff --git a/frugal-mono-tools/WID_LoginManager.cs b/frugal-mono-tools/WID_LoginManager.cs index 1478aca..198b4fa 100644 --- a/frugal-mono-tools/WID_LoginManager.cs +++ b/frugal-mono-tools/WID_LoginManager.cs @@ -31,7 +31,14 @@ namespace frugalmonotools public void InitLoginManager() { if(!MainClass.boRoot) - BTN_LoginManager.Visible=false; + { + BTN_LoginManager.Visible=false; + LIB_Root.Visible=true; + } + else + { + LIB_Root.Visible=false; + } //Login Manager init EnableDisable(INT_XDM,"xdm",LIB_XDM); EnableDisable(INT_LXDM,"lxdm",LIB_LXDM); diff --git a/frugal-mono-tools/WID_Network.cs b/frugal-mono-tools/WID_Network.cs index 65a0dd1..24a368b 100644 --- a/frugal-mono-tools/WID_Network.cs +++ b/frugal-mono-tools/WID_Network.cs @@ -29,7 +29,14 @@ namespace frugalmonotools public void InitNetworkManager() { if(!MainClass.boRoot) + { BTN_Network.Visible=false; + LIB_Root.Visible=true; + } + else + { + LIB_Root.Visible=false; + } //network init EnableDisable(INT_WICD,"wicd",LIB_WICDNotInstalled); EnableDisable(INT_NM,"networkmanager",LIB_NMNotInstalled); diff --git a/frugal-mono-tools/WID_System.cs b/frugal-mono-tools/WID_System.cs index cd44780..4ed641a 100644 --- a/frugal-mono-tools/WID_System.cs +++ b/frugal-mono-tools/WID_System.cs @@ -38,7 +38,12 @@ namespace frugalmonotools BTN_System.Visible=false; if(MainClass.boRoot) { - BTN_System.Visible=true; + BTN_System.Visible=true; + LIB_Root.Visible=false; + } + else + { + LIB_Root.Visible=true; } //system configuration SAI_Host.Text=MainClass.confSystem.GetHostname(); diff --git a/frugal-mono-tools/gtk-gui/frugalmonotools.WID_LoginManager.cs b/frugal-mono-tools/gtk-gui/frugalmonotools.WID_LoginManager.cs index 687c02a..3c87a70 100644 --- a/frugal-mono-tools/gtk-gui/frugalmonotools.WID_LoginManager.cs +++ b/frugal-mono-tools/gtk-gui/frugalmonotools.WID_LoginManager.cs @@ -48,6 +48,8 @@ namespace frugalmonotools private global::Gtk.HBox hbox8; + private global::Gtk.Label LIB_Root; + private global::Gtk.Button BTN_LoginManager; protected virtual void Build () @@ -250,37 +252,47 @@ namespace frugalmonotools this.hbox8.Name = "hbox8"; this.hbox8.Spacing = 6; // Container child hbox8.Gtk.Box+BoxChild + this.LIB_Root = new global::Gtk.Label (); + this.LIB_Root.Name = "LIB_Root"; + this.LIB_Root.LabelProp = global::Mono.Unix.Catalog.GetString ("Can't save, should be started as root"); + this.hbox8.Add (this.LIB_Root); + global::Gtk.Box.BoxChild w21 = ((global::Gtk.Box.BoxChild)(this.hbox8[this.LIB_Root])); + w21.Position = 0; + w21.Expand = false; + w21.Fill = false; + // Container child hbox8.Gtk.Box+BoxChild this.BTN_LoginManager = new global::Gtk.Button (); this.BTN_LoginManager.CanFocus = true; this.BTN_LoginManager.Name = "BTN_LoginManager"; this.BTN_LoginManager.UseUnderline = true; // Container child BTN_LoginManager.Gtk.Container+ContainerChild - global::Gtk.Alignment w21 = new global::Gtk.Alignment (0.5f, 0.5f, 0f, 0f); + global::Gtk.Alignment w22 = new global::Gtk.Alignment (0.5f, 0.5f, 0f, 0f); // Container child GtkAlignment.Gtk.Container+ContainerChild - global::Gtk.HBox w22 = new global::Gtk.HBox (); - w22.Spacing = 2; + global::Gtk.HBox w23 = new global::Gtk.HBox (); + w23.Spacing = 2; // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Image w23 = new global::Gtk.Image (); - w23.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-apply", global::Gtk.IconSize.Menu); - w22.Add (w23); + global::Gtk.Image w24 = new global::Gtk.Image (); + w24.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-apply", global::Gtk.IconSize.Menu); + w23.Add (w24); // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Label w25 = new global::Gtk.Label (); - w25.LabelProp = global::Mono.Unix.Catalog.GetString ("Apply"); - w25.UseUnderline = true; - w22.Add (w25); - w21.Add (w22); - this.BTN_LoginManager.Add (w21); + global::Gtk.Label w26 = new global::Gtk.Label (); + w26.LabelProp = global::Mono.Unix.Catalog.GetString ("Apply"); + w26.UseUnderline = true; + w23.Add (w26); + w22.Add (w23); + this.BTN_LoginManager.Add (w22); this.hbox8.Add (this.BTN_LoginManager); - global::Gtk.Box.BoxChild w29 = ((global::Gtk.Box.BoxChild)(this.hbox8[this.BTN_LoginManager])); - w29.Position = 2; - w29.Expand = false; - w29.Fill = false; - this.vbox3.Add (this.hbox8); - global::Gtk.Box.BoxChild w30 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.hbox8])); + global::Gtk.Box.BoxChild w30 = ((global::Gtk.Box.BoxChild)(this.hbox8[this.BTN_LoginManager])); w30.PackType = ((global::Gtk.PackType)(1)); - w30.Position = 5; + w30.Position = 2; w30.Expand = false; w30.Fill = false; + this.vbox3.Add (this.hbox8); + global::Gtk.Box.BoxChild w31 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.hbox8])); + w31.PackType = ((global::Gtk.PackType)(1)); + w31.Position = 5; + w31.Expand = false; + w31.Fill = false; this.Add (this.vbox3); if ((this.Child != null)) { this.Child.ShowAll (); diff --git a/frugal-mono-tools/gtk-gui/frugalmonotools.WID_Network.cs b/frugal-mono-tools/gtk-gui/frugalmonotools.WID_Network.cs index f411e51..8943d4f 100644 --- a/frugal-mono-tools/gtk-gui/frugalmonotools.WID_Network.cs +++ b/frugal-mono-tools/gtk-gui/frugalmonotools.WID_Network.cs @@ -30,6 +30,8 @@ namespace frugalmonotools private global::Gtk.HBox hbox4; + private global::Gtk.Label LIB_Root; + private global::Gtk.Button BTN_Network; protected virtual void Build () @@ -149,37 +151,47 @@ namespace frugalmonotools this.hbox4.Name = "hbox4"; this.hbox4.Spacing = 6; // Container child hbox4.Gtk.Box+BoxChild + this.LIB_Root = new global::Gtk.Label (); + this.LIB_Root.Name = "LIB_Root"; + this.LIB_Root.LabelProp = global::Mono.Unix.Catalog.GetString ("Can't save, should be started as root"); + this.hbox4.Add (this.LIB_Root); + global::Gtk.Box.BoxChild w12 = ((global::Gtk.Box.BoxChild)(this.hbox4[this.LIB_Root])); + w12.Position = 0; + w12.Expand = false; + w12.Fill = false; + // Container child hbox4.Gtk.Box+BoxChild this.BTN_Network = new global::Gtk.Button (); this.BTN_Network.CanFocus = true; this.BTN_Network.Name = "BTN_Network"; this.BTN_Network.UseUnderline = true; // Container child BTN_Network.Gtk.Container+ContainerChild - global::Gtk.Alignment w12 = new global::Gtk.Alignment (0.5f, 0.5f, 0f, 0f); + global::Gtk.Alignment w13 = new global::Gtk.Alignment (0.5f, 0.5f, 0f, 0f); // Container child GtkAlignment.Gtk.Container+ContainerChild - global::Gtk.HBox w13 = new global::Gtk.HBox (); - w13.Spacing = 2; + global::Gtk.HBox w14 = new global::Gtk.HBox (); + w14.Spacing = 2; // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Image w14 = new global::Gtk.Image (); - w14.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-apply", global::Gtk.IconSize.Menu); - w13.Add (w14); + global::Gtk.Image w15 = new global::Gtk.Image (); + w15.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-apply", global::Gtk.IconSize.Menu); + w14.Add (w15); // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Label w16 = new global::Gtk.Label (); - w16.LabelProp = global::Mono.Unix.Catalog.GetString ("Apply"); - w16.UseUnderline = true; - w13.Add (w16); - w12.Add (w13); - this.BTN_Network.Add (w12); + global::Gtk.Label w17 = new global::Gtk.Label (); + w17.LabelProp = global::Mono.Unix.Catalog.GetString ("Apply"); + w17.UseUnderline = true; + w14.Add (w17); + w13.Add (w14); + this.BTN_Network.Add (w13); this.hbox4.Add (this.BTN_Network); - global::Gtk.Box.BoxChild w20 = ((global::Gtk.Box.BoxChild)(this.hbox4[this.BTN_Network])); - w20.Position = 2; - w20.Expand = false; - w20.Fill = false; - this.vbox1.Add (this.hbox4); - global::Gtk.Box.BoxChild w21 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.hbox4])); + global::Gtk.Box.BoxChild w21 = ((global::Gtk.Box.BoxChild)(this.hbox4[this.BTN_Network])); w21.PackType = ((global::Gtk.PackType)(1)); - w21.Position = 3; + w21.Position = 2; w21.Expand = false; w21.Fill = false; + this.vbox1.Add (this.hbox4); + global::Gtk.Box.BoxChild w22 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.hbox4])); + w22.PackType = ((global::Gtk.PackType)(1)); + w22.Position = 3; + w22.Expand = false; + w22.Fill = false; this.Add (this.vbox1); if ((this.Child != null)) { this.Child.ShowAll (); diff --git a/frugal-mono-tools/gtk-gui/frugalmonotools.WID_System.cs b/frugal-mono-tools/gtk-gui/frugalmonotools.WID_System.cs index 5034a11..f3994e0 100644 --- a/frugal-mono-tools/gtk-gui/frugalmonotools.WID_System.cs +++ b/frugal-mono-tools/gtk-gui/frugalmonotools.WID_System.cs @@ -42,20 +42,20 @@ 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 hbox2; private global::Gtk.Label label18; private global::Gtk.ComboBoxEntry CBO_Time; + private global::Gtk.Label label17; + + private global::Gtk.ComboBoxEntry CBO_Keymap; + private global::Gtk.HBox hbox29; + private global::Gtk.Label LIB_Root; + private global::Gtk.Button BTN_System; protected virtual void Build () @@ -234,32 +234,6 @@ 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 = 1; - 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.hbox2 = new global::Gtk.HBox (); this.hbox2.Name = "hbox2"; this.hbox2.Spacing = 6; @@ -268,28 +242,54 @@ namespace frugalmonotools this.label18.Name = "label18"; this.label18.LabelProp = global::Mono.Unix.Catalog.GetString ("Time config"); this.hbox2.Add (this.label18); - global::Gtk.Box.BoxChild w22 = ((global::Gtk.Box.BoxChild)(this.hbox2[this.label18])); - w22.Position = 0; - w22.Expand = false; - w22.Fill = false; + global::Gtk.Box.BoxChild w19 = ((global::Gtk.Box.BoxChild)(this.hbox2[this.label18])); + w19.Position = 0; + w19.Expand = false; + w19.Fill = false; // Container child hbox2.Gtk.Box+BoxChild this.CBO_Time = global::Gtk.ComboBoxEntry.NewText (); this.CBO_Time.Name = "CBO_Time"; this.hbox2.Add (this.CBO_Time); - global::Gtk.Box.BoxChild w23 = ((global::Gtk.Box.BoxChild)(this.hbox2[this.CBO_Time])); - w23.Position = 1; + global::Gtk.Box.BoxChild w20 = ((global::Gtk.Box.BoxChild)(this.hbox2[this.CBO_Time])); + w20.Position = 1; + w20.Expand = false; + w20.Fill = false; + // Container child hbox2.Gtk.Box+BoxChild + this.label17 = new global::Gtk.Label (); + this.label17.Name = "label17"; + this.label17.LabelProp = global::Mono.Unix.Catalog.GetString ("Keymap"); + this.hbox2.Add (this.label17); + global::Gtk.Box.BoxChild w21 = ((global::Gtk.Box.BoxChild)(this.hbox2[this.label17])); + w21.Position = 2; + w21.Expand = false; + w21.Fill = false; + // Container child hbox2.Gtk.Box+BoxChild + this.CBO_Keymap = global::Gtk.ComboBoxEntry.NewText (); + this.CBO_Keymap.Name = "CBO_Keymap"; + this.hbox2.Add (this.CBO_Keymap); + global::Gtk.Box.BoxChild w22 = ((global::Gtk.Box.BoxChild)(this.hbox2[this.CBO_Keymap])); + w22.Position = 3; + w22.Expand = false; + w22.Fill = false; + this.vbox11.Add (this.hbox2); + global::Gtk.Box.BoxChild w23 = ((global::Gtk.Box.BoxChild)(this.vbox11[this.hbox2])); + w23.Position = 6; w23.Expand = false; w23.Fill = false; - this.vbox11.Add (this.hbox2); - global::Gtk.Box.BoxChild w24 = ((global::Gtk.Box.BoxChild)(this.vbox11[this.hbox2])); - w24.Position = 7; - w24.Expand = false; - w24.Fill = false; // Container child vbox11.Gtk.Box+BoxChild this.hbox29 = new global::Gtk.HBox (); this.hbox29.Name = "hbox29"; this.hbox29.Spacing = 6; // Container child hbox29.Gtk.Box+BoxChild + this.LIB_Root = new global::Gtk.Label (); + this.LIB_Root.Name = "LIB_Root"; + this.LIB_Root.LabelProp = global::Mono.Unix.Catalog.GetString ("Can't save, should be started as root"); + this.hbox29.Add (this.LIB_Root); + global::Gtk.Box.BoxChild w24 = ((global::Gtk.Box.BoxChild)(this.hbox29[this.LIB_Root])); + w24.Position = 0; + w24.Expand = false; + w24.Fill = false; + // Container child hbox29.Gtk.Box+BoxChild this.BTN_System = new global::Gtk.Button (); this.BTN_System.CanFocus = true; this.BTN_System.Name = "BTN_System"; @@ -312,12 +312,13 @@ namespace frugalmonotools this.BTN_System.Add (w25); this.hbox29.Add (this.BTN_System); global::Gtk.Box.BoxChild w33 = ((global::Gtk.Box.BoxChild)(this.hbox29[this.BTN_System])); + w33.PackType = ((global::Gtk.PackType)(1)); w33.Position = 2; w33.Expand = false; w33.Fill = false; this.vbox11.Add (this.hbox29); global::Gtk.Box.BoxChild w34 = ((global::Gtk.Box.BoxChild)(this.vbox11[this.hbox29])); - w34.Position = 8; + w34.Position = 7; w34.Expand = false; w34.Fill = false; this.Add (this.vbox11); diff --git a/frugal-mono-tools/gtk-gui/gui.stetic b/frugal-mono-tools/gtk-gui/gui.stetic index 632e08e..20bd631 100644 --- a/frugal-mono-tools/gtk-gui/gui.stetic +++ b/frugal-mono-tools/gtk-gui/gui.stetic @@ -992,13 +992,13 @@ </packing> </child> <child> - <widget class="Gtk.HBox" id="hbox1"> + <widget class="Gtk.HBox" id="hbox2"> <property name="MemberName" /> <property name="Spacing">6</property> <child> - <widget class="Gtk.Label" id="label17"> + <widget class="Gtk.Label" id="label18"> <property name="MemberName" /> - <property name="LabelProp" translatable="yes">Keymap </property> + <property name="LabelProp" translatable="yes">Time config</property> </widget> <packing> <property name="Position">0</property> @@ -1008,7 +1008,7 @@ </packing> </child> <child> - <widget class="Gtk.ComboBoxEntry" id="CBO_Keymap"> + <widget class="Gtk.ComboBoxEntry" id="CBO_Time"> <property name="MemberName" /> <property name="IsTextCombo">True</property> <property name="Items" translatable="yes" /> @@ -1020,38 +1020,26 @@ <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="hbox2"> - <property name="MemberName" /> - <property name="Spacing">6</property> <child> - <widget class="Gtk.Label" id="label18"> + <widget class="Gtk.Label" id="label17"> <property name="MemberName" /> - <property name="LabelProp" translatable="yes">Time config</property> + <property name="LabelProp" translatable="yes">Keymap</property> </widget> <packing> - <property name="Position">0</property> + <property name="Position">2</property> <property name="AutoSize">True</property> <property name="Expand">False</property> <property name="Fill">False</property> </packing> </child> <child> - <widget class="Gtk.ComboBoxEntry" id="CBO_Time"> + <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">1</property> + <property name="Position">3</property> <property name="AutoSize">True</property> <property name="Expand">False</property> <property name="Fill">False</property> @@ -1059,7 +1047,7 @@ </child> </widget> <packing> - <property name="Position">7</property> + <property name="Position">6</property> <property name="AutoSize">True</property> <property name="Expand">False</property> <property name="Fill">False</property> @@ -1070,7 +1058,16 @@ <property name="MemberName" /> <property name="Spacing">6</property> <child> - <placeholder /> + <widget class="Gtk.Label" id="LIB_Root"> + <property name="MemberName" /> + <property name="LabelProp" translatable="yes">Can't save, should be started as root</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 /> @@ -1086,6 +1083,7 @@ <signal name="Clicked" handler="OnBTNSystemClicked" /> </widget> <packing> + <property name="PackType">End</property> <property name="Position">2</property> <property name="AutoSize">True</property> <property name="Expand">False</property> @@ -1094,7 +1092,7 @@ </child> </widget> <packing> - <property name="Position">8</property> + <property name="Position">7</property> <property name="AutoSize">True</property> <property name="Expand">False</property> <property name="Fill">False</property> @@ -1382,7 +1380,7 @@ </widget> </child> </widget> - <widget class="Gtk.Bin" id="frugalmonotools.WID_Network" design-size="392 300"> + <widget class="Gtk.Bin" id="frugalmonotools.WID_Network" design-size="470 300"> <property name="MemberName" /> <property name="Visible">False</property> <child> @@ -1538,7 +1536,16 @@ <property name="MemberName" /> <property name="Spacing">6</property> <child> - <placeholder /> + <widget class="Gtk.Label" id="LIB_Root"> + <property name="MemberName" /> + <property name="LabelProp" translatable="yes">Can't save, should be started as root</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 /> @@ -1554,6 +1561,7 @@ <signal name="Clicked" handler="OnBTNNetworkClicked" /> </widget> <packing> + <property name="PackType">End</property> <property name="Position">2</property> <property name="AutoSize">True</property> <property name="Expand">False</property> @@ -1572,7 +1580,7 @@ </widget> </child> </widget> - <widget class="Gtk.Bin" id="frugalmonotools.WID_LoginManager" design-size="300 300"> + <widget class="Gtk.Bin" id="frugalmonotools.WID_LoginManager" design-size="470 300"> <property name="MemberName" /> <property name="Visible">False</property> <child> @@ -1839,7 +1847,16 @@ <property name="MemberName" /> <property name="Spacing">6</property> <child> - <placeholder /> + <widget class="Gtk.Label" id="LIB_Root"> + <property name="MemberName" /> + <property name="LabelProp" translatable="yes">Can't save, should be started as root</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 /> @@ -1855,6 +1872,7 @@ <signal name="Clicked" handler="OnBTNLoginManagerClicked" /> </widget> <packing> + <property name="PackType">End</property> <property name="Position">2</property> <property name="AutoSize">True</property> <property name="Expand">False</property> _______________________________________________ Frugalware-git mailing list Frugalware-git@frugalware.org http://frugalware.org/mailman/listinfo/frugalware-git