Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=frugal-tweak.git;a=commitdiff;h=849be0bcd33fd440314ec4d3ecdd067d994eef53
commit 849be0bcd33fd440314ec4d3ecdd067d994eef53 Author: bouleetbil <bouleet...@frogdev.info> Date: Fri Nov 12 22:37:23 2010 +0100 *draft config users diff --git a/frugal-mono-tools/Fen_Menu.cs b/frugal-mono-tools/Fen_Menu.cs index 181b6f7..870d4c7 100644 --- a/frugal-mono-tools/Fen_Menu.cs +++ b/frugal-mono-tools/Fen_Menu.cs @@ -40,6 +40,7 @@ namespace frugalmonotools private const string cch_configuration="Configuration"; private const string cch_about="About"; private const string cch_datetime="Date Time"; + private const string cch_users="Users"; //widget WID_Network fen_network ; @@ -58,6 +59,7 @@ namespace frugalmonotools WID_Logs fen_logs; WID_Grub fen_grub; WID_DateTime fen_dateTime; + WID_Users fen_users; protected Gtk.TreeIter iter; public Fen_Menu () : base(Gtk.WindowType.Toplevel) @@ -93,6 +95,8 @@ namespace frugalmonotools this.TREE_Menu.SetCursor(ListMenu.GetPath(iter),TREE_Menu.GetColumn(1),false); Pixbuf icoDate = global::Gdk.Pixbuf.LoadFromResource ("frugalmonotools.Pictures.icons.datetime.png"); ListMenu.AppendValues(icoDate.ScaleSimple(20,20, Gdk.InterpType.Nearest), cch_datetime); + Pixbuf icoUsers = global::Gdk.Pixbuf.LoadFromResource ("frugalmonotools.Pictures.icons.users.png"); + ListMenu.AppendValues(icoUsers.ScaleSimple(20,20, Gdk.InterpType.Nearest), cch_users); Pixbuf icoX = global::Gdk.Pixbuf.LoadFromResource ("frugalmonotools.Pictures.icons.xorg.png"); ListMenu.AppendValues(icoX.ScaleSimple(20,20, Gdk.InterpType.Nearest), cch_xorg); Pixbuf icoupdate = global::Gdk.Pixbuf.LoadFromResource ("frugalmonotools.Pictures.icons.update.png"); @@ -161,6 +165,13 @@ namespace frugalmonotools switch (module){ + case cch_users: + this.fen_users = new WID_Users(); + this.HBOX_Details.PackStart(fen_users); + this.HBOX_Details.ShowAll(); + this.fen_users.InitUsers(); + break; + case cch_datetime: this.fen_dateTime = new WID_DateTime(); this.HBOX_Details.PackStart(fen_dateTime); diff --git a/frugal-mono-tools/Group.cs b/frugal-mono-tools/Group.cs new file mode 100644 index 0000000..8f6e630 --- /dev/null +++ b/frugal-mono-tools/Group.cs @@ -0,0 +1,75 @@ +// /* +// * Copyright (C) 2010 by Gaetan Gourdin <bouleet...@frogdev.info> +// * +// * This program is free software; you can redistribute it and/or modify +// * it under the terms of the GNU General Public License as published by +// * the Free Software Foundation; either version 2 of the License, or +// * (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have received a copy of the GNU General Public License +// * along with this program; if not, write to the Free Software +// * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// */ +using System; +using System.Collections; +using System.Collections.Generic; +namespace frugalmonotools +{ + public class Group + { + #region private + private int _id=0; + private string _name=""; + private List<User> _users = new List<User>( ); + #endregion + + #region public + public int Id { + get { + return this._id; + } + set { + _id = value; + } + } + + public string Name { + get { + return this._name; + } + set { + _name = value; + } + } + #endregion + + public Group () + { + } + public Group(string name) + { + this.Name=name; + string ch_ContentsFileGroups=Outils.ReadFile(Groups.cch_FileGroup); + string[] lines = ch_ContentsFileGroups.Split('\n'); + foreach (string line in lines) + { + //ccache:x:48:gaetan + if (line.Split(':')[0]==this.Name) + { + try + { + this.Id=Convert.ToInt32(line.Split(':')[2]); + } + catch{} + break; + } + } + } + } +} + diff --git a/frugal-mono-tools/Groups.cs b/frugal-mono-tools/Groups.cs new file mode 100644 index 0000000..7951ec5 --- /dev/null +++ b/frugal-mono-tools/Groups.cs @@ -0,0 +1,47 @@ +// /* +// * Copyright (C) 2010 by Gaetan Gourdin <bouleet...@frogdev.info> +// * +// * This program is free software; you can redistribute it and/or modify +// * it under the terms of the GNU General Public License as published by +// * the Free Software Foundation; either version 2 of the License, or +// * (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have received a copy of the GNU General Public License +// * along with this program; if not, write to the Free Software +// * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// */ +using System; +using System.Collections; +using System.Collections.Generic; + +namespace frugalmonotools +{ + public static class Groups + { + public static string cch_FileUser = @"/etc/passwd"; + public static string cch_FileGroup = @"/etc/group"; + + public static List<User> GetAllUsers() + { + List<User> users = new List<User>(); + string ch_ContentsFileUsers=Outils.ReadFile(Groups.cch_FileUser); + string[] lines = ch_ContentsFileUsers.Split('\n'); + foreach (string line in lines) + { + if(line.Split(':')[0].ToString().Trim()!="") + { + User user = new User(line.Split(':')[0]); + users.Add(user); + } + } + return users; + } + + } +} + diff --git a/frugal-mono-tools/OUTILS/Outils.cs b/frugal-mono-tools/OUTILS/Outils.cs index c815e64..b4df678 100644 --- a/frugal-mono-tools/OUTILS/Outils.cs +++ b/frugal-mono-tools/OUTILS/Outils.cs @@ -23,7 +23,6 @@ namespace frugalmonotools { public static class Outils { - public static List<string> WalkDirectoryTree(System.IO.DirectoryInfo root,string pattern) { List<string> strFiles = new List<string>(); diff --git a/frugal-mono-tools/Pictures/WID_Users.cs b/frugal-mono-tools/Pictures/WID_Users.cs new file mode 100644 index 0000000..52afe8c --- /dev/null +++ b/frugal-mono-tools/Pictures/WID_Users.cs @@ -0,0 +1,59 @@ +// /* +// * Copyright (C) 2010 by Gaetan Gourdin <bouleet...@frogdev.info> +// * +// * This program is free software; you can redistribute it and/or modify +// * it under the terms of the GNU General Public License as published by +// * the Free Software Foundation; either version 2 of the License, or +// * (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have received a copy of the GNU General Public License +// * along with this program; if not, write to the Free Software +// * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// */ +using System; +using System.Collections.Generic; +using Gtk; +namespace frugalmonotools +{ + [System.ComponentModel.ToolboxItem(true)] + public partial class WID_Users : Gtk.Bin + { + private Gtk.TreeIter iter; + ListStore ListStoreUser = new Gtk.ListStore (typeof (string)); + public WID_Users () + { + this.Build (); + } + public void InitUsers() + { + // Create a column for the package name + Gtk.TreeViewColumn ColumnUser = new Gtk.TreeViewColumn (); + ColumnUser.Title = "Users"; + Gtk.CellRendererText NameCellUser = new Gtk.CellRendererText (); + // Add the cell to the column + ColumnUser.PackStart (NameCellUser, true); + TREE_Users.AppendColumn (ColumnUser); + ColumnUser.AddAttribute (NameCellUser, "text", 0); + + ListStoreUser.Clear(); + int i = 0; + foreach (User user in Groups.GetAllUsers()) + { + // Add some data to the store + if (i==0) + iter=ListStoreUser.AppendValues (user.Name); + else + ListStoreUser.AppendValues (user.Name); + i++; + } + TREE_Users.Model=ListStoreUser; + + } + } +} + diff --git a/frugal-mono-tools/Pictures/icons/users.png b/frugal-mono-tools/Pictures/icons/users.png new file mode 100644 index 0000000..da8015c Binary files /dev/null and b/frugal-mono-tools/Pictures/icons/users.png differ diff --git a/frugal-mono-tools/User.cs b/frugal-mono-tools/User.cs new file mode 100644 index 0000000..c03666a --- /dev/null +++ b/frugal-mono-tools/User.cs @@ -0,0 +1,140 @@ +// /* +// * Copyright (C) 2010 by Gaetan Gourdin <bouleet...@frogdev.info> +// * +// * This program is free software; you can redistribute it and/or modify +// * it under the terms of the GNU General Public License as published by +// * the Free Software Foundation; either version 2 of the License, or +// * (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have received a copy of the GNU General Public License +// * along with this program; if not, write to the Free Software +// * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// */ +using System; +using System.Collections; +using System.Collections.Generic; +namespace frugalmonotools +{ + public class User + { + #region private + private int _id =0; + private string _name=""; + private string _comment=""; + private string _shell=""; + private string _home=""; + private List<Group> _groups = new List<Group>(); + #endregion + + #region public + public string Comment { + get { + return this._comment; + } + set { + _comment = value; + } + } + + public string Home { + get { + return this._home; + } + set { + _home = value; + } + } + + public int Id { + get { + return this._id; + } + set { + _id = value; + } + } + + public string Name { + get { + return this._name; + } + set { + _name = value; + } + } + + public string Shell { + get { + return this._shell; + } + set { + _shell = value; + } + } + #endregion + + public User () + { + + } + public User(int id) + { + this.Id=id; + //now should find informations + string ch_ContentsFileUsers=Outils.ReadFile(Groups.cch_FileUser); + string[] lines = ch_ContentsFileUsers.Split('\n'); + foreach (string line in lines) + { + //gaetan:x:1000:100:gaetan,,,:/home/gaetan:/bin/bash + if (line.Split(':')[2]==this.Id.ToString()) + { + //find it :p + this.Name=line.Split(':')[0]; + this.Shell=line.Split(':')[6]; + this.Home=line.Split(':')[5]; + this.Comment=line.Split(':')[4]; + break; + } + } + } + public User(string name) + { + this.Name=name; + //now should find informations + string ch_ContentsFileUsers=Outils.ReadFile(Groups.cch_FileUser); + string[] lines = ch_ContentsFileUsers.Split('\n'); + foreach (string line in lines) + { + //gaetan:x:1000:100:gaetan,,,:/home/gaetan:/bin/bash + if (line.Split(':')[0]==this.Name) + { + //find it :p + try + { + this.Id=Convert.ToInt32(line.Split(':')[2]); + this.Shell=line.Split(':')[6]; + this.Home=line.Split(':')[5]; + this.Comment=line.Split(':')[4]; + } + catch{} + break; + } + } + } + public List<Group> GetGroups() + { + if ((this.Name=="") && (this.Id==0)) + { + return null; + } + return null; + } + + } +} + diff --git a/frugal-mono-tools/frugal-mono-tools.csproj b/frugal-mono-tools/frugal-mono-tools.csproj index 7b264c1..05dc5c2 100644 --- a/frugal-mono-tools/frugal-mono-tools.csproj +++ b/frugal-mono-tools/frugal-mono-tools.csproj @@ -86,6 +86,7 @@ <EmbeddedResource Include="Pictures\icons\logs.png" /> <EmbeddedResource Include="Pictures\icons\grub.png" /> <EmbeddedResource Include="Pictures\icons\datetime.png" /> + <EmbeddedResource Include="Pictures\icons\users.png" /> </ItemGroup> <ItemGroup> <Compile Include="gtk-gui\generated.cs" /> @@ -143,6 +144,11 @@ <Compile Include="gtk-gui\frugalmonotools.DiagGrub.cs" /> <Compile Include="WID_DateTime.cs" /> <Compile Include="gtk-gui\frugalmonotools.WID_DateTime.cs" /> + <Compile Include="Group.cs" /> + <Compile Include="User.cs" /> + <Compile Include="Groups.cs" /> + <Compile Include="Pictures\WID_Users.cs" /> + <Compile Include="gtk-gui\frugalmonotools.WID_Users.cs" /> </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <ProjectExtensions> diff --git a/frugal-mono-tools/gtk-gui/frugalmonotools.WID_Users.cs b/frugal-mono-tools/gtk-gui/frugalmonotools.WID_Users.cs new file mode 100644 index 0000000..6fd9c50 --- /dev/null +++ b/frugal-mono-tools/gtk-gui/frugalmonotools.WID_Users.cs @@ -0,0 +1,267 @@ + +// This file has been generated by the GUI designer. Do not modify. +namespace frugalmonotools +{ + public partial class WID_Users + { + private global::Gtk.Notebook notebook1; + + private global::Gtk.VBox vbox2; + + private global::Gtk.HBox hbox3; + + private global::Gtk.Image image30; + + private global::Gtk.ScrolledWindow GtkScrolledWindow; + + private global::Gtk.TreeView TREE_Users; + + private global::Gtk.HBox hbox1; + + private global::Gtk.Entry SAI_Name; + + private global::Gtk.Entry SAI_Comment; + + private global::Gtk.Entry SAI_Shell; + + private global::Gtk.Entry SAI_Groups; + + private global::Gtk.HBox hbox2; + + private global::Gtk.Button BTN_AddUser; + + private global::Gtk.Button BTN_Remove; + + private global::Gtk.Button BTN_Apply; + + private global::Gtk.Label label1; + + private global::Gtk.VBox vbox3; + + private global::Gtk.ScrolledWindow GtkScrolledWindow1; + + private global::Gtk.TreeView TREE_Groups; + + private global::Gtk.Label label2; + + protected virtual void Build () + { + global::Stetic.Gui.Initialize (this); + // Widget frugalmonotools.WID_Users + global::Stetic.BinContainer.Attach (this); + this.Name = "frugalmonotools.WID_Users"; + // Container child frugalmonotools.WID_Users.Gtk.Container+ContainerChild + this.notebook1 = new global::Gtk.Notebook (); + this.notebook1.CanFocus = true; + this.notebook1.Name = "notebook1"; + this.notebook1.CurrentPage = 0; + // Container child notebook1.Gtk.Notebook+NotebookChild + this.vbox2 = new global::Gtk.VBox (); + this.vbox2.Name = "vbox2"; + this.vbox2.Spacing = 6; + // Container child vbox2.Gtk.Box+BoxChild + this.hbox3 = new global::Gtk.HBox (); + this.hbox3.Name = "hbox3"; + this.hbox3.Spacing = 6; + // Container child hbox3.Gtk.Box+BoxChild + this.image30 = new global::Gtk.Image (); + this.image30.Name = "image30"; + this.image30.Pixbuf = global::Gdk.Pixbuf.LoadFromResource ("frugalmonotools.Pictures.icons.users.png"); + this.hbox3.Add (this.image30); + global::Gtk.Box.BoxChild w1 = ((global::Gtk.Box.BoxChild)(this.hbox3[this.image30])); + w1.Position = 2; + w1.Expand = false; + w1.Fill = false; + this.vbox2.Add (this.hbox3); + global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.hbox3])); + w2.Position = 0; + w2.Expand = false; + w2.Fill = false; + // Container child vbox2.Gtk.Box+BoxChild + this.GtkScrolledWindow = new global::Gtk.ScrolledWindow (); + this.GtkScrolledWindow.Name = "GtkScrolledWindow"; + this.GtkScrolledWindow.ShadowType = ((global::Gtk.ShadowType)(1)); + // Container child GtkScrolledWindow.Gtk.Container+ContainerChild + this.TREE_Users = new global::Gtk.TreeView (); + this.TREE_Users.CanFocus = true; + this.TREE_Users.Name = "TREE_Users"; + this.GtkScrolledWindow.Add (this.TREE_Users); + this.vbox2.Add (this.GtkScrolledWindow); + global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.GtkScrolledWindow])); + w4.Position = 1; + // Container child vbox2.Gtk.Box+BoxChild + this.hbox1 = new global::Gtk.HBox (); + this.hbox1.Name = "hbox1"; + this.hbox1.Spacing = 6; + // Container child hbox1.Gtk.Box+BoxChild + this.SAI_Name = new global::Gtk.Entry (); + this.SAI_Name.CanFocus = true; + this.SAI_Name.Name = "SAI_Name"; + this.SAI_Name.IsEditable = true; + this.SAI_Name.InvisibleChar = 'â¢'; + this.hbox1.Add (this.SAI_Name); + global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.SAI_Name])); + w5.Position = 0; + // Container child hbox1.Gtk.Box+BoxChild + this.SAI_Comment = new global::Gtk.Entry (); + this.SAI_Comment.CanFocus = true; + this.SAI_Comment.Name = "SAI_Comment"; + this.SAI_Comment.IsEditable = true; + this.SAI_Comment.InvisibleChar = 'â¢'; + this.hbox1.Add (this.SAI_Comment); + global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.SAI_Comment])); + w6.Position = 2; + this.vbox2.Add (this.hbox1); + global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.hbox1])); + w7.Position = 2; + w7.Expand = false; + w7.Fill = false; + // Container child vbox2.Gtk.Box+BoxChild + this.SAI_Shell = new global::Gtk.Entry (); + this.SAI_Shell.CanFocus = true; + this.SAI_Shell.Name = "SAI_Shell"; + this.SAI_Shell.IsEditable = true; + this.SAI_Shell.InvisibleChar = 'â¢'; + this.vbox2.Add (this.SAI_Shell); + global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.SAI_Shell])); + w8.Position = 3; + w8.Expand = false; + w8.Fill = false; + // Container child vbox2.Gtk.Box+BoxChild + this.SAI_Groups = new global::Gtk.Entry (); + this.SAI_Groups.CanFocus = true; + this.SAI_Groups.Name = "SAI_Groups"; + this.SAI_Groups.IsEditable = true; + this.SAI_Groups.InvisibleChar = 'â¢'; + this.vbox2.Add (this.SAI_Groups); + global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.SAI_Groups])); + w9.Position = 4; + w9.Expand = false; + w9.Fill = false; + // Container child vbox2.Gtk.Box+BoxChild + this.hbox2 = new global::Gtk.HBox (); + this.hbox2.Name = "hbox2"; + this.hbox2.Spacing = 6; + // Container child hbox2.Gtk.Box+BoxChild + this.BTN_AddUser = new global::Gtk.Button (); + this.BTN_AddUser.CanFocus = true; + this.BTN_AddUser.Name = "BTN_AddUser"; + this.BTN_AddUser.UseUnderline = true; + // Container child BTN_AddUser.Gtk.Container+ContainerChild + global::Gtk.Alignment w10 = new global::Gtk.Alignment (0.5f, 0.5f, 0f, 0f); + // Container child GtkAlignment.Gtk.Container+ContainerChild + global::Gtk.HBox w11 = new global::Gtk.HBox (); + w11.Spacing = 2; + // Container child GtkHBox.Gtk.Container+ContainerChild + global::Gtk.Image w12 = new global::Gtk.Image (); + w12.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-add", global::Gtk.IconSize.Menu); + w11.Add (w12); + // Container child GtkHBox.Gtk.Container+ContainerChild + global::Gtk.Label w14 = new global::Gtk.Label (); + w14.LabelProp = global::Mono.Unix.Catalog.GetString ("Add new user"); + w14.UseUnderline = true; + w11.Add (w14); + w10.Add (w11); + this.BTN_AddUser.Add (w10); + this.hbox2.Add (this.BTN_AddUser); + global::Gtk.Box.BoxChild w18 = ((global::Gtk.Box.BoxChild)(this.hbox2[this.BTN_AddUser])); + w18.Position = 0; + w18.Expand = false; + w18.Fill = false; + // Container child hbox2.Gtk.Box+BoxChild + this.BTN_Remove = new global::Gtk.Button (); + this.BTN_Remove.CanFocus = true; + this.BTN_Remove.Name = "BTN_Remove"; + this.BTN_Remove.UseUnderline = true; + // Container child BTN_Remove.Gtk.Container+ContainerChild + global::Gtk.Alignment w19 = new global::Gtk.Alignment (0.5f, 0.5f, 0f, 0f); + // Container child GtkAlignment.Gtk.Container+ContainerChild + global::Gtk.HBox w20 = new global::Gtk.HBox (); + w20.Spacing = 2; + // Container child GtkHBox.Gtk.Container+ContainerChild + global::Gtk.Image w21 = new global::Gtk.Image (); + w21.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-delete", global::Gtk.IconSize.Menu); + w20.Add (w21); + // Container child GtkHBox.Gtk.Container+ContainerChild + global::Gtk.Label w23 = new global::Gtk.Label (); + w23.LabelProp = global::Mono.Unix.Catalog.GetString ("Remove user"); + w23.UseUnderline = true; + w20.Add (w23); + w19.Add (w20); + this.BTN_Remove.Add (w19); + this.hbox2.Add (this.BTN_Remove); + global::Gtk.Box.BoxChild w27 = ((global::Gtk.Box.BoxChild)(this.hbox2[this.BTN_Remove])); + w27.Position = 1; + w27.Expand = false; + w27.Fill = false; + // Container child hbox2.Gtk.Box+BoxChild + this.BTN_Apply = new global::Gtk.Button (); + this.BTN_Apply.CanFocus = true; + this.BTN_Apply.Name = "BTN_Apply"; + this.BTN_Apply.UseUnderline = true; + // Container child BTN_Apply.Gtk.Container+ContainerChild + global::Gtk.Alignment w28 = new global::Gtk.Alignment (0.5f, 0.5f, 0f, 0f); + // Container child GtkAlignment.Gtk.Container+ContainerChild + global::Gtk.HBox w29 = new global::Gtk.HBox (); + w29.Spacing = 2; + // Container child GtkHBox.Gtk.Container+ContainerChild + global::Gtk.Image w30 = new global::Gtk.Image (); + w30.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-apply", global::Gtk.IconSize.Menu); + w29.Add (w30); + // Container child GtkHBox.Gtk.Container+ContainerChild + global::Gtk.Label w32 = new global::Gtk.Label (); + w32.LabelProp = global::Mono.Unix.Catalog.GetString ("Apply"); + w32.UseUnderline = true; + w29.Add (w32); + w28.Add (w29); + this.BTN_Apply.Add (w28); + this.hbox2.Add (this.BTN_Apply); + global::Gtk.Box.BoxChild w36 = ((global::Gtk.Box.BoxChild)(this.hbox2[this.BTN_Apply])); + w36.Position = 2; + w36.Expand = false; + w36.Fill = false; + this.vbox2.Add (this.hbox2); + global::Gtk.Box.BoxChild w37 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.hbox2])); + w37.Position = 6; + w37.Expand = false; + w37.Fill = false; + this.notebook1.Add (this.vbox2); + // Notebook tab + this.label1 = new global::Gtk.Label (); + this.label1.Name = "label1"; + this.label1.LabelProp = global::Mono.Unix.Catalog.GetString ("Users"); + this.notebook1.SetTabLabel (this.vbox2, this.label1); + this.label1.ShowAll (); + // Container child notebook1.Gtk.Notebook+NotebookChild + this.vbox3 = new global::Gtk.VBox (); + this.vbox3.Name = "vbox3"; + this.vbox3.Spacing = 6; + // Container child vbox3.Gtk.Box+BoxChild + this.GtkScrolledWindow1 = new global::Gtk.ScrolledWindow (); + this.GtkScrolledWindow1.Name = "GtkScrolledWindow1"; + this.GtkScrolledWindow1.ShadowType = ((global::Gtk.ShadowType)(1)); + // Container child GtkScrolledWindow1.Gtk.Container+ContainerChild + this.TREE_Groups = new global::Gtk.TreeView (); + this.TREE_Groups.CanFocus = true; + this.TREE_Groups.Name = "TREE_Groups"; + this.GtkScrolledWindow1.Add (this.TREE_Groups); + this.vbox3.Add (this.GtkScrolledWindow1); + global::Gtk.Box.BoxChild w40 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.GtkScrolledWindow1])); + w40.Position = 0; + this.notebook1.Add (this.vbox3); + global::Gtk.Notebook.NotebookChild w41 = ((global::Gtk.Notebook.NotebookChild)(this.notebook1[this.vbox3])); + w41.Position = 1; + // Notebook tab + this.label2 = new global::Gtk.Label (); + this.label2.Name = "label2"; + this.label2.LabelProp = global::Mono.Unix.Catalog.GetString ("Groups"); + this.notebook1.SetTabLabel (this.vbox3, this.label2); + this.label2.ShowAll (); + this.Add (this.notebook1); + if ((this.Child != null)) { + this.Child.ShowAll (); + } + this.Hide (); + } + } +} diff --git a/frugal-mono-tools/gtk-gui/gui.stetic b/frugal-mono-tools/gtk-gui/gui.stetic index b2c766b..9f79931 100644 --- a/frugal-mono-tools/gtk-gui/gui.stetic +++ b/frugal-mono-tools/gtk-gui/gui.stetic @@ -3472,4 +3472,251 @@ Public License instead of this License. </widget> </child> </widget> + <widget class="Gtk.Bin" id="frugalmonotools.WID_Users" design-size="346 327"> + <property name="MemberName" /> + <property name="Visible">False</property> + <child> + <widget class="Gtk.Notebook" id="notebook1"> + <property name="MemberName" /> + <property name="CanFocus">True</property> + <property name="CurrentPage">0</property> + <child> + <widget class="Gtk.VBox" id="vbox2"> + <property name="MemberName" /> + <property name="Spacing">6</property> + <child> + <widget class="Gtk.HBox" id="hbox3"> + <property name="MemberName" /> + <property name="Spacing">6</property> + <child> + <placeholder /> + </child> + <child> + <placeholder /> + </child> + <child> + <widget class="Gtk.Image" id="image30"> + <property name="MemberName" /> + <property name="Pixbuf">resource:frugalmonotools.Pictures.icons.users.png</property> + </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">0</property> + <property name="AutoSize">True</property> + <property name="Expand">False</property> + <property name="Fill">False</property> + </packing> + </child> + <child> + <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow"> + <property name="MemberName" /> + <property name="ShadowType">In</property> + <child> + <widget class="Gtk.TreeView" id="TREE_Users"> + <property name="MemberName" /> + <property name="CanFocus">True</property> + <property name="ShowScrollbars">True</property> + </widget> + </child> + </widget> + <packing> + <property name="Position">1</property> + <property name="AutoSize">True</property> + </packing> + </child> + <child> + <widget class="Gtk.HBox" id="hbox1"> + <property name="MemberName" /> + <property name="Spacing">6</property> + <child> + <widget class="Gtk.Entry" id="SAI_Name"> + <property name="MemberName" /> + <property name="CanFocus">True</property> + <property name="IsEditable">True</property> + <property name="InvisibleChar">â¢</property> + </widget> + <packing> + <property name="Position">0</property> + <property name="AutoSize">True</property> + </packing> + </child> + <child> + <placeholder /> + </child> + <child> + <widget class="Gtk.Entry" id="SAI_Comment"> + <property name="MemberName" /> + <property name="CanFocus">True</property> + <property name="IsEditable">True</property> + <property name="InvisibleChar">â¢</property> + </widget> + <packing> + <property name="Position">2</property> + <property name="AutoSize">True</property> + </packing> + </child> + </widget> + <packing> + <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.Entry" id="SAI_Shell"> + <property name="MemberName" /> + <property name="CanFocus">True</property> + <property name="IsEditable">True</property> + <property name="InvisibleChar">â¢</property> + </widget> + <packing> + <property name="Position">3</property> + <property name="AutoSize">True</property> + <property name="Expand">False</property> + <property name="Fill">False</property> + </packing> + </child> + <child> + <widget class="Gtk.Entry" id="SAI_Groups"> + <property name="MemberName" /> + <property name="CanFocus">True</property> + <property name="IsEditable">True</property> + <property name="InvisibleChar">â¢</property> + </widget> + <packing> + <property name="Position">4</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.HBox" id="hbox2"> + <property name="MemberName" /> + <property name="Spacing">6</property> + <child> + <widget class="Gtk.Button" id="BTN_AddUser"> + <property name="MemberName" /> + <property name="CanFocus">True</property> + <property name="Type">TextAndIcon</property> + <property name="Icon">stock:gtk-add Menu</property> + <property name="Label" translatable="yes">Add new user</property> + <property name="UseUnderline">True</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.Button" id="BTN_Remove"> + <property name="MemberName" /> + <property name="CanFocus">True</property> + <property name="Type">TextAndIcon</property> + <property name="Icon">stock:gtk-delete Menu</property> + <property name="Label" translatable="yes">Remove user</property> + <property name="UseUnderline">True</property> + </widget> + <packing> + <property name="Position">1</property> + <property name="AutoSize">True</property> + <property name="Expand">False</property> + <property name="Fill">False</property> + </packing> + </child> + <child> + <widget class="Gtk.Button" id="BTN_Apply"> + <property name="MemberName" /> + <property name="CanFocus">True</property> + <property name="Type">TextAndIcon</property> + <property name="Icon">stock:gtk-apply Menu</property> + <property name="Label" translatable="yes">Apply</property> + <property name="UseUnderline">True</property> + </widget> + <packing> + <property name="Position">2</property> + <property name="AutoSize">True</property> + <property name="Expand">False</property> + <property name="Fill">False</property> + </packing> + </child> + <child> + <placeholder /> + </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> + </widget> + </child> + <child> + <widget class="Gtk.Label" id="label1"> + <property name="MemberName" /> + <property name="LabelProp" translatable="yes">Users</property> + </widget> + <packing> + <property name="type">tab</property> + </packing> + </child> + <child> + <widget class="Gtk.VBox" id="vbox3"> + <property name="MemberName" /> + <property name="Spacing">6</property> + <child> + <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow1"> + <property name="MemberName" /> + <property name="ShadowType">In</property> + <child> + <widget class="Gtk.TreeView" id="TREE_Groups"> + <property name="MemberName" /> + <property name="CanFocus">True</property> + <property name="ShowScrollbars">True</property> + </widget> + </child> + </widget> + <packing> + <property name="Position">0</property> + <property name="AutoSize">True</property> + </packing> + </child> + <child> + <placeholder /> + </child> + <child> + <placeholder /> + </child> + </widget> + <packing> + <property name="Position">1</property> + </packing> + </child> + <child> + <widget class="Gtk.Label" id="label2"> + <property name="MemberName" /> + <property name="LabelProp" translatable="yes">Groups</property> + </widget> + <packing> + <property name="type">tab</property> + </packing> + </child> + </widget> + </child> + </widget> </stetic-interface> \ No newline at end of file
_______________________________________________ Frugalware-git mailing list Frugalware-git@frugalware.org http://frugalware.org/mailman/listinfo/frugalware-git