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

commit 8100f02203c236516c93d3e2db5b8893907ee1d7
Author: bouleetbil <bouleet...@frogdev.info>
Date:   Tue Sep 14 22:11:54 2010 +0200

*fixes some init

diff --git a/frugal-mono-tools/Fen_Menu.cs b/frugal-mono-tools/Fen_Menu.cs
index 6459476..122cb13 100644
--- a/frugal-mono-tools/Fen_Menu.cs
+++ b/frugal-mono-tools/Fen_Menu.cs
@@ -38,18 +38,18 @@ namespace frugalmonotools
private const string cch_about="About";

//widget
-               WID_Network fen_network = new WID_Network();
+               WID_Network fen_network ;
WID_News fen_news ;
-               WID_Pkg fen_pkg= new WID_Pkg();
-               WID_Xorg fen_xorg= new WID_Xorg();
-               WID_Update fen_update= new WID_Update();
-               WID_Services fen_services = new WID_Services();
-               WID_Support fen_support = new WID_Support();
-               WID_System fen_system = new WID_System();
-               WID_About fen_about = new WID_About();
-               WID_Config fen_config = new WID_Config();
-               WID_Hardware fen_hardware = new WID_Hardware();
-               WID_LoginManager fen_loginManager = new WID_LoginManager();
+               WID_Pkg fen_pkg;
+               WID_Xorg fen_xorg;
+               WID_Update fen_update;
+               WID_Services fen_services;
+               WID_Support fen_support;
+               WID_System fen_system;
+               WID_About fen_about ;
+               WID_Config fen_config ;
+               WID_Hardware fen_hardware ;
+               WID_LoginManager fen_loginManager;

protected Gtk.TreeIter iter;
public Fen_Menu () : base(Gtk.WindowType.Toplevel)
@@ -136,12 +136,14 @@ namespace frugalmonotools
this.fen_pkg = new WID_Pkg();
this.HBOX_Details.PackStart(fen_pkg);
this.HBOX_Details.ShowAll();
+                                                       this.fen_pkg.InitPkg();
break;

case cch_update:
this.fen_update = new WID_Update();
this.HBOX_Details.PackStart(fen_update);
this.HBOX_Details.ShowAll();
+                                                       
this.fen_update.InitUpdate();
break;

case cch_about:
@@ -154,36 +156,42 @@ namespace frugalmonotools
this.fen_config = new WID_Config();
this.HBOX_Details.PackStart(fen_config);
this.HBOX_Details.ShowAll();
+                                                       
this.fen_config.InitConfig();
break;

case cch_hardware:
this.fen_hardware = new WID_Hardware();
this.HBOX_Details.PackStart(fen_hardware);
this.HBOX_Details.ShowAll();
+                                                       
this.fen_hardware.InitHardware();
break;

case cch_loginManager:
this.fen_loginManager = new WID_LoginManager();
this.HBOX_Details.PackStart(fen_loginManager);
this.HBOX_Details.ShowAll();
+                                                       
this.fen_loginManager.InitLoginManager();
break;

case cch_network:
this.fen_network=new WID_Network();
this.HBOX_Details.PackStart(fen_network);
this.HBOX_Details.ShowAll();
+                                                       
this.fen_network.InitNetworkManager();
break;

case cch_news:
this.fen_news = new WID_News();
this.HBOX_Details.PackStart(fen_news);
this.HBOX_Details.ShowAll();
+                                                       
this.fen_news.InitNews();
break;

case cch_services:
this.fen_services = new WID_Services();
this.HBOX_Details.PackStart(fen_services);
this.HBOX_Details.ShowAll();
+                                                       
this.fen_services.InitService();
break;

case cch_support:
@@ -196,12 +204,14 @@ namespace frugalmonotools
this.fen_system=new WID_System();
this.HBOX_Details.PackStart(fen_system);
this.HBOX_Details.ShowAll();
+                                                       
this.fen_system.InitSystem();
break;

case cch_xorg:
this.fen_xorg=new WID_Xorg();
this.HBOX_Details.PackStart(fen_xorg);
this.HBOX_Details.ShowAll();
+                                                       
this.fen_xorg.InitXorg();
break;
}
}
diff --git a/frugal-mono-tools/WID_Config.cs b/frugal-mono-tools/WID_Config.cs
index edd03b3..3eee20f 100644
--- a/frugal-mono-tools/WID_Config.cs
+++ b/frugal-mono-tools/WID_Config.cs
@@ -24,10 +24,9 @@ namespace frugalmonotools

public WID_Config ()
{
-                       this.Build ();
-                       _initConfig();
+                       this.Build ();
}
-               private void _initConfig()
+               public  void InitConfig()
{
//configuration
INT_CheckStartup.Active=MainClass.configuration.Get_CheckUpdate();
diff --git a/frugal-mono-tools/WID_Hardware.cs 
b/frugal-mono-tools/WID_Hardware.cs
index 6ed9520..254f25b 100644
--- a/frugal-mono-tools/WID_Hardware.cs
+++ b/frugal-mono-tools/WID_Hardware.cs
@@ -23,15 +23,14 @@ namespace frugalmonotools
{
public WID_Hardware ()
{
-                       this.Build ();
-                       _initHardware();
+                       this.Build ();
+               }
+               public void InitHardware()
+               {
if(!MainClass.boRoot)
{
BTN_Setup.Visible = false;
-                       }
-               }
-               private void _initHardware()
-               {
+                       }
if(!MainClass.pacmanG2.IsInstalled("system-config-printer"))
{
BTN_Printer.Visible=false;
diff --git a/frugal-mono-tools/WID_LoginManager.cs 
b/frugal-mono-tools/WID_LoginManager.cs
index bd06dba..b923c5a 100644
--- a/frugal-mono-tools/WID_LoginManager.cs
+++ b/frugal-mono-tools/WID_LoginManager.cs
@@ -26,13 +26,12 @@ namespace frugalmonotools
const string cch_FileLoginManager=@"/etc/sysconfig/desktop";
public WID_LoginManager ()
{
-                       this.Build ();
-                       _initLoginManager();
-                       if(!MainClass.boRoot)
-                               BTN_LoginManager.Visible=false;
+                       this.Build ();
}
-               private void _initLoginManager()
+               public void InitLoginManager()
{
+               if(!MainClass.boRoot)
+                               BTN_LoginManager.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 71ffe9c..e5435c4 100644
--- a/frugal-mono-tools/WID_Network.cs
+++ b/frugal-mono-tools/WID_Network.cs
@@ -24,13 +24,12 @@ namespace frugalmonotools
{
public WID_Network ()
{
-                       this.Build ();
-                       if(!MainClass.boRoot)
-                               BTN_Network.Visible=false;
-                       _initNetworkManager();
+                       this.Build ();
}
-       private void _initNetworkManager()
+       public void InitNetworkManager()
{
+               if(!MainClass.boRoot)
+                               BTN_Network.Visible=false;
//network init
INT_NM.Active=Outils.ServiceOnStartUp("S99rc.networkmanager");
EnableDisable(INT_NM,"networkmanager",LIB_NMNotInstalled);
diff --git a/frugal-mono-tools/WID_News.cs b/frugal-mono-tools/WID_News.cs
index ebea01a..62ac88f 100644
--- a/frugal-mono-tools/WID_News.cs
+++ b/frugal-mono-tools/WID_News.cs
@@ -39,10 +39,9 @@ namespace frugalmonotools

public WID_News ()
{
-                       this.Build ();
-                       _initnews();
+                       this.Build ();
}
-               private void _initnews()
+               public void InitNews()
{
//webkit engine
this.webview = new WebView();
diff --git a/frugal-mono-tools/WID_Pkg.cs b/frugal-mono-tools/WID_Pkg.cs
index ba05d54..47f90a5 100644
--- a/frugal-mono-tools/WID_Pkg.cs
+++ b/frugal-mono-tools/WID_Pkg.cs
@@ -30,10 +30,9 @@ namespace frugalmonotools

public WID_Pkg ()
{
-                       this.Build ();
-                       _initPkg();
+                       this.Build ();
}
-               private void _initPkg()
+               public void InitPkg()
{
//pacman-g2
// Create a column for the package name
diff --git a/frugal-mono-tools/WID_Services.cs 
b/frugal-mono-tools/WID_Services.cs
index 1266baa..3a90016 100644
--- a/frugal-mono-tools/WID_Services.cs
+++ b/frugal-mono-tools/WID_Services.cs
@@ -28,10 +28,9 @@ namespace frugalmonotools

public WID_Services ()
{
-                       this.Build ();
-                       _initService();
+                       this.Build ();
}
-               private void _initService()
+               public void InitService()
{
// services
Gtk.TreeViewColumn ColumnServiceName = new Gtk.TreeViewColumn ();
diff --git a/frugal-mono-tools/WID_System.cs b/frugal-mono-tools/WID_System.cs
index 72ebc43..3413bf2 100644
--- a/frugal-mono-tools/WID_System.cs
+++ b/frugal-mono-tools/WID_System.cs
@@ -29,12 +29,14 @@ namespace frugalmonotools
public WID_System ()
{
this.Build ();
-                       _initSystem();
-                       if(!MainClass.boRoot)
-                               BTN_System.Visible=false;
+
}
-               private void _initSystem()
+               public void InitSystem()
{
+                       if(!MainClass.boRoot)
+                       {
+                               BTN_System.Visible=false;
+                       }
//system configuration
SAI_Host.Text=confSystem.GetHostname();
SAI_Distribution.Text=confSystem.GetDistribution();
diff --git a/frugal-mono-tools/WID_Update.cs b/frugal-mono-tools/WID_Update.cs
index e03349e..ec37df4 100644
--- a/frugal-mono-tools/WID_Update.cs
+++ b/frugal-mono-tools/WID_Update.cs
@@ -28,16 +28,15 @@ namespace frugalmonotools

public WID_Update ()
{
-                       this.Build ();
-                       _initUpdate();
-                       if(!MainClass.boRoot)
-                       {
-                               BTN_UpdateDatabase.Visible = false;
-                               BTN_ApplyIgnorePkg.Visible=false;
-                       }
+                       this.Build ();
}
-               private void _initUpdate()
+               public  void InitUpdate()
+               {
+               if(!MainClass.boRoot)
{
+                       BTN_UpdateDatabase.Visible = false;
+                       BTN_ApplyIgnorePkg.Visible=false;
+               }
//update package list
// Create a column for the package name
Gtk.TreeViewColumn pkgupdateColumn = new Gtk.TreeViewColumn ();
diff --git a/frugal-mono-tools/WID_Xorg.cs b/frugal-mono-tools/WID_Xorg.cs
index 407df02..f854051 100644
--- a/frugal-mono-tools/WID_Xorg.cs
+++ b/frugal-mono-tools/WID_Xorg.cs
@@ -31,15 +31,14 @@ namespace frugalmonotools

public WID_Xorg ()
{
-                       this.Build ();
-                       _initXorg();
-                       if(!MainClass.boRoot)
-                               BTN_Xorg.Visible=false;
+                       this.Build ();
}

-               private void _initXorg()
+               public void InitXorg()
{
-                       //xorg configuration
+                       if(!MainClass.boRoot)
+                               BTN_Xorg.Visible=false;
+               //xorg configuration
SAI_Layout.Text=this.LayoutXorg();

string lspci ="/usr/sbin/lspci";
diff --git a/frugal-mono-tools/gtk-gui/frugalmonotools.WID_Xorg.cs 
b/frugal-mono-tools/gtk-gui/frugalmonotools.WID_Xorg.cs
index 5aeb40c..1685a1d 100644
--- a/frugal-mono-tools/gtk-gui/frugalmonotools.WID_Xorg.cs
+++ b/frugal-mono-tools/gtk-gui/frugalmonotools.WID_Xorg.cs
@@ -14,8 +14,6 @@ namespace frugalmonotools

private global::Gtk.HBox hbox16;

-               private global::Gtk.Label label4;
-
private global::Gtk.Label LIB_Lspci;

private global::Gtk.ComboBoxEntry CBO_GraphicalDevice;
@@ -73,48 +71,39 @@ namespace frugalmonotools
this.hbox16.Name = "hbox16";
this.hbox16.Spacing = 6;
// Container child hbox16.Gtk.Box+BoxChild
-                       this.label4 = new global::Gtk.Label ();
-                       this.label4.Name = "label4";
-                       this.label4.LabelProp = 
global::Mono.Unix.Catalog.GetString ("Graphical device : ");
-                       this.hbox16.Add (this.label4);
-                       global::Gtk.Box.BoxChild w4 = 
((global::Gtk.Box.BoxChild)(this.hbox16[this.label4]));
-                       w4.Position = 0;
-                       w4.Expand = false;
-                       w4.Fill = false;
-                       // Container child hbox16.Gtk.Box+BoxChild
this.LIB_Lspci = new global::Gtk.Label ();
this.LIB_Lspci.Name = "LIB_Lspci";
this.LIB_Lspci.LabelProp = global::Mono.Unix.Catalog.GetString ("lspci");
this.hbox16.Add (this.LIB_Lspci);
-                       global::Gtk.Box.BoxChild w5 = 
((global::Gtk.Box.BoxChild)(this.hbox16[this.LIB_Lspci]));
-                       w5.Position = 1;
-                       w5.Expand = false;
-                       w5.Fill = false;
+                       global::Gtk.Box.BoxChild w4 = 
((global::Gtk.Box.BoxChild)(this.hbox16[this.LIB_Lspci]));
+                       w4.Position = 0;
+                       w4.Expand = false;
+                       w4.Fill = false;
// Container child hbox16.Gtk.Box+BoxChild
this.CBO_GraphicalDevice = global::Gtk.ComboBoxEntry.NewText ();
this.CBO_GraphicalDevice.Name = "CBO_GraphicalDevice";
this.hbox16.Add (this.CBO_GraphicalDevice);
-                       global::Gtk.Box.BoxChild w6 = 
((global::Gtk.Box.BoxChild)(this.hbox16[this.CBO_GraphicalDevice]));
-                       w6.PackType = ((global::Gtk.PackType)(1));
-                       w6.Position = 2;
+                       global::Gtk.Box.BoxChild w5 = 
((global::Gtk.Box.BoxChild)(this.hbox16[this.CBO_GraphicalDevice]));
+                       w5.PackType = ((global::Gtk.PackType)(1));
+                       w5.Position = 1;
+                       w5.Expand = false;
+                       w5.Fill = false;
+                       this.vbox6.Add (this.hbox16);
+                       global::Gtk.Box.BoxChild w6 = 
((global::Gtk.Box.BoxChild)(this.vbox6[this.hbox16]));
+                       w6.Position = 1;
w6.Expand = false;
w6.Fill = false;
-                       this.vbox6.Add (this.hbox16);
-                       global::Gtk.Box.BoxChild w7 = 
((global::Gtk.Box.BoxChild)(this.vbox6[this.hbox16]));
-                       w7.Position = 1;
-                       w7.Expand = false;
-                       w7.Fill = false;
// Container child vbox6.Gtk.Box+BoxChild
this.BTN_Synaptics = new global::Gtk.Button ();
this.BTN_Synaptics.CanFocus = true;
this.BTN_Synaptics.Name = "BTN_Synaptics";
this.BTN_Synaptics.UseUnderline = true;
-                       this.BTN_Synaptics.Label = 
global::Mono.Unix.Catalog.GetString ("You have a touchpad but 
xf86-input-synaptics is not installed. Click here to install it.");
+                       this.BTN_Synaptics.Label = 
global::Mono.Unix.Catalog.GetString ("xf86-input-synaptics is not installed. 
Click here to install it.");
this.vbox6.Add (this.BTN_Synaptics);
-                       global::Gtk.Box.BoxChild w8 = 
((global::Gtk.Box.BoxChild)(this.vbox6[this.BTN_Synaptics]));
-                       w8.Position = 3;
-                       w8.Expand = false;
-                       w8.Fill = false;
+                       global::Gtk.Box.BoxChild w7 = 
((global::Gtk.Box.BoxChild)(this.vbox6[this.BTN_Synaptics]));
+                       w7.Position = 3;
+                       w7.Expand = false;
+                       w7.Fill = false;
// Container child vbox6.Gtk.Box+BoxChild
this.INT_Numlock = new global::Gtk.CheckButton ();
this.INT_Numlock.CanFocus = true;
@@ -123,10 +112,10 @@ namespace frugalmonotools
this.INT_Numlock.DrawIndicator = true;
this.INT_Numlock.UseUnderline = true;
this.vbox6.Add (this.INT_Numlock);
-                       global::Gtk.Box.BoxChild w9 = 
((global::Gtk.Box.BoxChild)(this.vbox6[this.INT_Numlock]));
-                       w9.Position = 4;
-                       w9.Expand = false;
-                       w9.Fill = false;
+                       global::Gtk.Box.BoxChild w8 = 
((global::Gtk.Box.BoxChild)(this.vbox6[this.INT_Numlock]));
+                       w8.Position = 4;
+                       w8.Expand = false;
+                       w8.Fill = false;
// Container child vbox6.Gtk.Box+BoxChild
this.hbox14 = new global::Gtk.HBox ();
this.hbox14.Name = "hbox14";
@@ -138,15 +127,15 @@ namespace frugalmonotools
this.BTN_Xorg.UseUnderline = true;
this.BTN_Xorg.Label = global::Mono.Unix.Catalog.GetString ("Apply");
this.hbox14.Add (this.BTN_Xorg);
-                       global::Gtk.Box.BoxChild w10 = 
((global::Gtk.Box.BoxChild)(this.hbox14[this.BTN_Xorg]));
-                       w10.Position = 2;
+                       global::Gtk.Box.BoxChild w9 = 
((global::Gtk.Box.BoxChild)(this.hbox14[this.BTN_Xorg]));
+                       w9.Position = 2;
+                       w9.Expand = false;
+                       w9.Fill = false;
+                       this.vbox6.Add (this.hbox14);
+                       global::Gtk.Box.BoxChild w10 = 
((global::Gtk.Box.BoxChild)(this.vbox6[this.hbox14]));
+                       w10.Position = 6;
w10.Expand = false;
w10.Fill = false;
-                       this.vbox6.Add (this.hbox14);
-                       global::Gtk.Box.BoxChild w11 = 
((global::Gtk.Box.BoxChild)(this.vbox6[this.hbox14]));
-                       w11.Position = 6;
-                       w11.Expand = false;
-                       w11.Fill = false;
this.Add (this.vbox6);
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 718adc2..05e9e86 100644
--- a/frugal-mono-tools/gtk-gui/gui.stetic
+++ b/frugal-mono-tools/gtk-gui/gui.stetic
@@ -320,24 +320,12 @@
<property name="MemberName" />
<property name="Spacing">6</property>
<child>
-              <widget class="Gtk.Label" id="label4">
-                <property name="MemberName" />
-                <property name="LabelProp" translatable="yes">Graphical device 
: </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>
<widget class="Gtk.Label" id="LIB_Lspci">
<property name="MemberName" />
<property name="LabelProp" translatable="yes">lspci</property>
</widget>
<packing>
-                <property name="Position">1</property>
+                <property name="Position">0</property>
<property name="AutoSize">True</property>
<property name="Expand">False</property>
<property name="Fill">False</property>
@@ -351,7 +339,7 @@
</widget>
<packing>
<property name="PackType">End</property>
-                <property name="Position">2</property>
+                <property name="Position">1</property>
<property name="AutoSize">True</property>
<property name="Expand">False</property>
<property name="Fill">False</property>
@@ -373,7 +361,7 @@
<property name="MemberName" />
<property name="CanFocus">True</property>
<property name="Type">TextOnly</property>
-            <property name="Label" translatable="yes">You have a touchpad but 
xf86-input-synaptics is not installed. Click here to install it.</property>
+            <property name="Label" translatable="yes">xf86-input-synaptics is 
not installed. Click here to install it.</property>
<property name="UseUnderline">True</property>
<signal name="Clicked" handler="OnBTNSynapticsClicked" />
</widget>
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to