diff --git a/osrepodbmgr.Core/ChangeLog b/osrepodbmgr.Core/ChangeLog index 667b6f7..bc3ff88 100644 --- a/osrepodbmgr.Core/ChangeLog +++ b/osrepodbmgr.Core/ChangeLog @@ -1,3 +1,10 @@ +2017-05-11 Natalia Portillo + + * DBOps.cs: + * Context.cs: + * Workers.cs: + Added a main window to handle everything from there. + 2017-05-11 Natalia Portillo * DBOps.cs: diff --git a/osrepodbmgr.Core/Context.cs b/osrepodbmgr.Core/Context.cs index 6251473..3a2ab01 100644 --- a/osrepodbmgr.Core/Context.cs +++ b/osrepodbmgr.Core/Context.cs @@ -49,6 +49,7 @@ namespace osrepodbmgr.Core public static OpticalDiscType workingDisc; public static BlockMediaType workingDisk; public static CICMMetadataType metadata; + public static bool userExtracting; public delegate void UnarChangeStatusDelegate(); public static event UnarChangeStatusDelegate UnarChangeStatus; diff --git a/osrepodbmgr.Core/DBOps.cs b/osrepodbmgr.Core/DBOps.cs index f8a723d..42eea7d 100644 --- a/osrepodbmgr.Core/DBOps.cs +++ b/osrepodbmgr.Core/DBOps.cs @@ -354,6 +354,34 @@ namespace osrepodbmgr.Core return true; } + public bool RemoveOS(long id) + { + IDbCommand dbcmd = dbCon.CreateCommand(); + IDbTransaction trans = dbCon.BeginTransaction(); + dbcmd.Transaction = trans; + + string sql = string.Format("DROP TABLE IF EXISTS `os_{0}`;", id); + + dbcmd.CommandText = sql; + + dbcmd.ExecuteNonQuery(); + trans.Commit(); + dbcmd.Dispose(); + + dbcmd = dbCon.CreateCommand(); + trans = dbCon.BeginTransaction(); + dbcmd.Transaction = trans; + + sql = string.Format("DELETE FROM oses WHERE id = '{0}';", id); + + dbcmd.CommandText = sql; + + dbcmd.ExecuteNonQuery(); + trans.Commit(); + dbcmd.Dispose(); + + return true; + } public bool CreateTableForOS(long id) { diff --git a/osrepodbmgr.Core/Workers.cs b/osrepodbmgr.Core/Workers.cs index 8067ece..026736d 100644 --- a/osrepodbmgr.Core/Workers.cs +++ b/osrepodbmgr.Core/Workers.cs @@ -455,6 +455,44 @@ namespace osrepodbmgr.Core } } + public static void GetAllOSes() + { + try + { + List oses; + dbCore.DBOps.GetAllOSes(out oses); + + if(AddOS != null) + { + int counter = 0; + // TODO: Check file name and existence + foreach(DBEntry os in oses) + { + if(UpdateProgress != null) + UpdateProgress("Populating OSes table", string.Format("{0} {1}", os.developer, os.product), counter, oses.Count); + string destination = Path.Combine(Settings.Current.RepositoryPath, os.mdid[0].ToString(), + os.mdid[1].ToString(), os.mdid[2].ToString(), os.mdid[3].ToString(), + os.mdid[4].ToString(), os.mdid) + ".zip"; + + if(AddOS != null) + AddOS(os, File.Exists(destination), destination); + + counter++; + } + } + + if(Finished != null) + Finished(); + } + catch(Exception ex) + { + if(Debugger.IsAttached) + throw; + if(Failed != null) + Failed(string.Format("Exception {0}\n{1}", ex.Message, ex.InnerException)); + } + } + public static void CheckDbForFiles() { try @@ -515,62 +553,9 @@ namespace osrepodbmgr.Core // TODO: Check file name and existence foreach(DBEntry os in oses) { - string destinationFolder; - destinationFolder = Path.Combine(Settings.Current.RepositoryPath, os.developer, os.product, os.version); - if(!string.IsNullOrWhiteSpace(os.languages)) - destinationFolder = Path.Combine(destinationFolder, os.languages); - if(!string.IsNullOrWhiteSpace(os.architecture)) - destinationFolder = Path.Combine(destinationFolder, os.architecture); - if(os.oem) - destinationFolder = Path.Combine(destinationFolder, "oem"); - if(!string.IsNullOrWhiteSpace(os.machine)) - destinationFolder = Path.Combine(destinationFolder, "for " + os.machine); - - string destinationFile = ""; - if(!string.IsNullOrWhiteSpace(os.format)) - destinationFile += "[" + os.format + "]"; - if(os.files) - { - if(destinationFile != "") - destinationFile += "_"; - destinationFile += "files"; - } - if(os.netinstall) - { - if(destinationFile != "") - destinationFile += "_"; - destinationFile += "netinstall"; - } - if(os.source) - { - if(destinationFile != "") - destinationFile += "_"; - destinationFile += "source"; - } - if(os.update) - { - if(destinationFile != "") - destinationFile += "_"; - destinationFile += "update"; - } - if(os.upgrade) - { - if(destinationFile != "") - destinationFile += "_"; - destinationFile += "upgrade"; - } - if(!string.IsNullOrWhiteSpace(os.description)) - { - if(destinationFile != "") - destinationFile += "_"; - destinationFile += os.description; - } - else if(destinationFile == "") - { - destinationFile = "archive"; - } - - string destination = Path.Combine(destinationFolder, destinationFile) + ".zip"; + string destination = Path.Combine(Settings.Current.RepositoryPath, os.mdid[0].ToString(), + os.mdid[1].ToString(), os.mdid[2].ToString(), os.mdid[3].ToString(), + os.mdid[4].ToString(), os.mdid) + ".zip"; if(AddOS != null) AddOS(os, File.Exists(destination), destination); @@ -1156,13 +1141,6 @@ namespace osrepodbmgr.Core public static void ExtractArchive() { - if(!Context.unarUsable) - { - if(Failed != null) - Failed("The UnArchiver is not correctly installed"); - return; - } - if(!File.Exists(Context.path)) { if(Failed != null) @@ -1177,7 +1155,12 @@ namespace osrepodbmgr.Core return; } - string tmpFolder = Path.Combine(Settings.Current.TemporaryFolder, Path.GetRandomFileName()); + string tmpFolder; + + if(Context.userExtracting) + tmpFolder = Context.tmpFolder; + else + tmpFolder = Path.Combine(Settings.Current.TemporaryFolder, Path.GetRandomFileName()); try { @@ -1214,6 +1197,13 @@ namespace osrepodbmgr.Core } else { + if(!Context.unarUsable) + { + if(Failed != null) + Failed("The UnArchiver is not correctly installed"); + return; + } + Context.unarProcess = new Process(); Context.unarProcess.StartInfo.FileName = Settings.Current.UnArchiverPath; Context.unarProcess.StartInfo.CreateNoWindow = true; @@ -1437,6 +1427,9 @@ namespace osrepodbmgr.Core xms.Position = 0; jms.Position = 0; } + + if(Finished != null) + Finished(); } catch(Exception ex) { @@ -1445,8 +1438,6 @@ namespace osrepodbmgr.Core if(Failed != null) Failed(string.Format("Exception {0}\n{1}", ex.Message, ex.InnerException)); } - if(Finished != null) - Finished(); } public static void RemoveTempFolder() @@ -1468,5 +1459,81 @@ namespace osrepodbmgr.Core Failed(string.Format("Exception {0}\n{1}", ex.Message, ex.InnerException)); } } + + public static void RemoveOS(long id, string mdid) + { + if(id == 0 || string.IsNullOrWhiteSpace(mdid)) + return; + + string destination = Path.Combine(Settings.Current.RepositoryPath, mdid[0].ToString(), + mdid[1].ToString(), mdid[2].ToString(), mdid[3].ToString(), + mdid[4].ToString(), mdid) + ".zip"; + + if(File.Exists(destination)) + File.Delete(destination); + + dbCore.DBOps.RemoveOS(id); + } + + public static void CopyFile() + { + try + { + if(!File.Exists(Context.path)) + { + if(Failed != null) + Failed("Specified file cannot be found"); + return; + } + + if(string.IsNullOrWhiteSpace(Context.tmpFolder)) + { + if(Failed != null) + Failed("Destination cannot be empty"); + return; + } + + if(Directory.Exists(Context.tmpFolder)) + { + if(Failed != null) + Failed("Destination cannot be a folder"); + return; + } + + FileStream inFs = new FileStream(Context.path, FileMode.Open, FileAccess.Read); + FileStream outFs = new FileStream(Context.path, FileMode.Create, FileAccess.Write); + + byte[] buffer = new byte[bufferSize]; + + while((inFs.Position + bufferSize) <= inFs.Length) + { + if(UpdateProgress != null) + UpdateProgress("Copying file...", string.Format("{0} / {1} bytes", inFs.Position, inFs.Length), inFs.Position, inFs.Length); + + inFs.Read(buffer, 0, buffer.Length); + outFs.Write(buffer, 0, buffer.Length); + } + + buffer = new byte[inFs.Length - inFs.Position]; + if(UpdateProgress != null) + UpdateProgress("Copying file...", string.Format("{0} / {1} bytes", inFs.Position, inFs.Length), inFs.Position, inFs.Length); + + inFs.Read(buffer, 0, buffer.Length); + outFs.Write(buffer, 0, buffer.Length); + + inFs.Close(); + outFs.Close(); + + if(Finished != null) + Finished(); + } + catch(Exception ex) + { + if(Debugger.IsAttached) + throw; + if(Failed != null) + Failed(string.Format("Exception {0}\n{1}", ex.Message, ex.InnerException)); + } + } } } diff --git a/osrepodbmgr/ChangeLog b/osrepodbmgr/ChangeLog index 29a1297..7ce64da 100644 --- a/osrepodbmgr/ChangeLog +++ b/osrepodbmgr/ChangeLog @@ -1,3 +1,19 @@ +2017-05-11 Natalia Portillo + + * frmAdd.cs: + * Program.cs: + * frmHelp.cs: + * frmMain.cs: + * frmSettings.cs: + * gtk-gui/frmAdd.cs: + * gtk-gui/gui.stetic: + * osrepodbmgr.csproj: + * gtk-gui/osrepodbmgr.frmHelp.cs: + * gtk-gui/osrepodbmgr.frmMain.cs: + * gtk-gui/osrepodbmgr.frmSettings.cs: + * gtk-gui/osrepodbmgr.dlgBlockMedia.cs: + Added a main window to handle everything from there. + 2017-05-11 Natalia Portillo * dlgBlockMedia.cs: diff --git a/osrepodbmgr/Program.cs b/osrepodbmgr/Program.cs index 3c8f3d5..54b2c7b 100644 --- a/osrepodbmgr/Program.cs +++ b/osrepodbmgr/Program.cs @@ -37,7 +37,7 @@ namespace osrepodbmgr Core.Settings.LoadSettings(); Context.CheckUnar(); Application.Init(); - frmAdd win = new frmAdd(); + frmMain win = new frmMain(); win.Show(); Application.Run(); } diff --git a/osrepodbmgr/frmAdd.cs b/osrepodbmgr/frmAdd.cs index 5e6730a..31cc8a5 100644 --- a/osrepodbmgr/frmAdd.cs +++ b/osrepodbmgr/frmAdd.cs @@ -36,7 +36,7 @@ using osrepodbmgr; using osrepodbmgr.Core; using Schemas; -public partial class frmAdd : Window +public partial class frmAdd : Dialog { Thread thdPulseProgress; Thread thdFindFiles; @@ -51,12 +51,10 @@ public partial class frmAdd : Window ListStore fileView; ListStore osView; - public frmAdd() : base(WindowType.Toplevel) + public frmAdd() { Build(); - Workers.InitDB(); - Context.UnarChangeStatus += UnarChangeStatus; Context.CheckUnar(); @@ -141,20 +139,14 @@ public partial class frmAdd : Window protected void OnDeleteEvent(object sender, DeleteEventArgs a) { if(btnStop.Visible) - OnBtnStopClicked(sender, a); + btnStop.Click(); if(btnClose.Sensitive) - OnBtnCloseClicked(sender, a); + btnClose.Click(); Application.Quit(); a.RetVal = true; } - protected void OnBtnHelpClicked(object sender, EventArgs e) - { - frmHelp _help = new frmHelp(); - _help.Show(); - } - protected void OnBtnFolderClicked(object sender, EventArgs e) { FileChooserDialog dlgFolder = new FileChooserDialog("Open folder", this, FileChooserAction.SelectFolder, @@ -170,7 +162,6 @@ public partial class frmAdd : Window btnExit.Sensitive = false; btnFolder.Visible = false; btnArchive.Visible = false; - btnSettings.Sensitive = false; thdPulseProgress = new Thread(() => { while(true) @@ -212,7 +203,6 @@ public partial class frmAdd : Window btnExit.Sensitive = true; btnFolder.Visible = true; btnArchive.Visible = true; - btnSettings.Sensitive = true; Workers.Failed -= FindFilesFailed; Workers.Finished -= FindFilesFinished; thdFindFiles = null; @@ -267,7 +257,6 @@ public partial class frmAdd : Window btnExit.Sensitive = true; btnFolder.Visible = true; btnArchive.Visible = true; - btnSettings.Sensitive = true; thdHashFiles = null; }); } @@ -360,7 +349,6 @@ public partial class frmAdd : Window btnStop.Visible = false; btnClose.Visible = true; btnExit.Sensitive = true; - btnSettings.Sensitive = true; btnAdd.Visible = true; btnPack.Visible = true; btnPack.Sensitive = true; @@ -461,9 +449,9 @@ public partial class frmAdd : Window protected void OnBtnExitClicked(object sender, EventArgs e) { if(btnClose.Sensitive) - OnBtnCloseClicked(sender, e); + btnClose.Click(); - Application.Quit(); + btnDialog.Click(); } protected void OnBtnCloseClicked(object sender, EventArgs e) @@ -651,13 +639,11 @@ public partial class frmAdd : Window btnExit.Sensitive = true; btnFolder.Visible = true; btnArchive.Visible = true; - btnSettings.Sensitive = true; lblProgress.Visible = false; prgProgress.Visible = false; btnExit.Sensitive = true; btnFolder.Visible = true; btnArchive.Visible = true; - btnSettings.Sensitive = true; Workers.Failed -= FindFilesFailed; Workers.Failed -= HashFilesFailed; Workers.Failed -= ChkFilesFailed; @@ -679,7 +665,7 @@ public partial class frmAdd : Window btnStop.Visible = false; if(fileView != null) fileView.Clear(); - if(osView != null) + if(osView != null && tabTabs != null && tabTabs.GetNthPage(1) != null) { tabTabs.GetNthPage(1).Visible = false; osView.Clear(); @@ -839,12 +825,6 @@ public partial class frmAdd : Window }); } - protected void OnBtnSettingsClicked(object sender, EventArgs e) - { - frmSettings _frmSettings = new frmSettings(); - _frmSettings.Show(); - } - protected void OnBtnPackClicked(object sender, EventArgs e) { btnAdd.Sensitive = false; @@ -1009,7 +989,6 @@ public partial class frmAdd : Window btnExit.Sensitive = false; btnFolder.Visible = false; btnArchive.Visible = false; - btnSettings.Sensitive = false; thdPulseProgress = new Thread(() => { while(true) @@ -1051,7 +1030,6 @@ public partial class frmAdd : Window btnExit.Sensitive = true; btnFolder.Visible = true; btnArchive.Visible = true; - btnSettings.Sensitive = true; Workers.Failed -= OpenArchiveFailed; Workers.Finished -= OpenArchiveFinished; thdOpenArchive = null; @@ -1069,7 +1047,6 @@ public partial class frmAdd : Window btnExit.Sensitive = false; btnFolder.Visible = false; btnArchive.Visible = false; - btnSettings.Sensitive = false; if(thdPulseProgress != null) thdPulseProgress.Abort(); if(!Context.copyArchive) @@ -1121,7 +1098,6 @@ public partial class frmAdd : Window btnExit.Sensitive = true; btnFolder.Visible = true; btnArchive.Visible = true; - btnSettings.Sensitive = true; Workers.Failed -= ExtractArchiveFailed; Workers.Finished -= ExtractArchiveFinished; Workers.UpdateProgress -= UpdateProgress; @@ -1166,7 +1142,6 @@ public partial class frmAdd : Window btnExit.Sensitive = false; btnFolder.Visible = false; btnArchive.Visible = false; - btnSettings.Sensitive = false; Workers.Failed -= ExtractArchiveFailed; Workers.Finished -= ExtractArchiveFinished; Workers.UpdateProgress -= UpdateProgress; diff --git a/osrepodbmgr/frmHelp.cs b/osrepodbmgr/frmHelp.cs index daa0fa3..7c0df20 100644 --- a/osrepodbmgr/frmHelp.cs +++ b/osrepodbmgr/frmHelp.cs @@ -29,17 +29,16 @@ using System; namespace osrepodbmgr { - public partial class frmHelp : Gtk.Window + public partial class frmHelp : Gtk.Dialog { - public frmHelp() : - base(Gtk.WindowType.Toplevel) + public frmHelp() { Build(); } protected void OnBtnOKClicked(object sender, EventArgs e) { - Destroy(); + btnDialog.Click(); } } } diff --git a/osrepodbmgr/frmMain.cs b/osrepodbmgr/frmMain.cs index 2c431c4..de7d549 100644 --- a/osrepodbmgr/frmMain.cs +++ b/osrepodbmgr/frmMain.cs @@ -26,14 +26,552 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // using System; +using System.Threading; +using Gtk; +using osrepodbmgr.Core; +using System.IO; + namespace osrepodbmgr { - public partial class frmMain : Gtk.Window + public partial class frmMain : Window { + ListStore osView; + Thread thdPulseProgress; + Thread thdPopulateOSes; + Thread thdExtractArchive; + Thread thdCopyFile; + public frmMain() : - base(Gtk.WindowType.Toplevel) + base(WindowType.Toplevel) { - this.Build(); + Build(); + + Workers.InitDB(); + + CellRendererText developerCell = new CellRendererText(); + CellRendererText productCell = new CellRendererText(); + CellRendererText versionCell = new CellRendererText(); + CellRendererText languagesCell = new CellRendererText(); + CellRendererText architectureCell = new CellRendererText(); + CellRendererText machineCell = new CellRendererText(); + CellRendererText formatCell = new CellRendererText(); + CellRendererText descriptionCell = new CellRendererText(); + CellRendererToggle oemCell = new CellRendererToggle(); + CellRendererToggle upgradeCell = new CellRendererToggle(); + CellRendererToggle updateCell = new CellRendererToggle(); + CellRendererToggle sourceCell = new CellRendererToggle(); + CellRendererToggle filesCell = new CellRendererToggle(); + CellRendererToggle netinstallCell = new CellRendererToggle(); + CellRendererText pathCell = new CellRendererText(); + + TreeViewColumn developerColumn = new TreeViewColumn("Developer", developerCell, "text", 0, "background", 14, "foreground", 15); + TreeViewColumn productColumn = new TreeViewColumn("Product", productCell, "text", 1, "background", 14, "foreground", 15); + TreeViewColumn versionColumn = new TreeViewColumn("Version", versionCell, "text", 2, "background", 14, "foreground", 15); + TreeViewColumn languagesColumn = new TreeViewColumn("Languages", languagesCell, "text", 3, "background", 14, "foreground", 15); + TreeViewColumn architectureColumn = new TreeViewColumn("Architecture", architectureCell, "text", 4, "background", 14, "foreground", 15); + TreeViewColumn machineColumn = new TreeViewColumn("Machine", machineCell, "text", 5, "background", 14, "foreground", 15); + TreeViewColumn formatColumn = new TreeViewColumn("Format", formatCell, "text", 6, "background", 14, "foreground", 15); + TreeViewColumn descriptionColumn = new TreeViewColumn("Description", descriptionCell, "text", 7, "background", 14, "foreground", 15); + TreeViewColumn oemColumn = new TreeViewColumn("OEM?", oemCell, "active", 8); + TreeViewColumn upgradeColumn = new TreeViewColumn("Upgrade?", upgradeCell, "active", 9); + TreeViewColumn updateColumn = new TreeViewColumn("Update?", updateCell, "active", 10); + TreeViewColumn sourceColumn = new TreeViewColumn("Source?", sourceCell, "active", 11); + TreeViewColumn filesColumn = new TreeViewColumn("Files?", filesCell, "active", 12); + TreeViewColumn netinstallColumn = new TreeViewColumn("NetInstall?", netinstallCell, "active", 13); + TreeViewColumn pathColumn = new TreeViewColumn("Path in repo", pathCell, "text", 16, "background", 14, "foreground", 15); + + osView = new ListStore(typeof(string), typeof(string), typeof(string), typeof(string), typeof(string), typeof(string), typeof(string), typeof(string), + typeof(bool), typeof(bool), typeof(bool), typeof(bool), typeof(bool), typeof(bool), typeof(string), typeof(string), typeof(string), + typeof(long), typeof(string)); + + treeOSes.Model = osView; + treeOSes.AppendColumn(developerColumn); + treeOSes.AppendColumn(productColumn); + treeOSes.AppendColumn(versionColumn); + treeOSes.AppendColumn(languagesColumn); + treeOSes.AppendColumn(architectureColumn); + treeOSes.AppendColumn(machineColumn); + treeOSes.AppendColumn(formatColumn); + treeOSes.AppendColumn(descriptionColumn); + treeOSes.AppendColumn(oemColumn); + treeOSes.AppendColumn(upgradeColumn); + treeOSes.AppendColumn(updateColumn); + treeOSes.AppendColumn(sourceColumn); + treeOSes.AppendColumn(filesColumn); + treeOSes.AppendColumn(netinstallColumn); + treeOSes.AppendColumn(pathColumn); + + treeOSes.Selection.Mode = SelectionMode.Single; + + thdPulseProgress = new Thread(() => + { + while(true) + { + Application.Invoke(delegate + { + prgProgress.Pulse(); + }); + Thread.Sleep(66); + } + }); + Workers.Failed += LoadOSesFailed; + Workers.Finished += LoadOSesFinished; + Workers.UpdateProgress += UpdateProgress; + Workers.AddOS += AddOS; + thdPopulateOSes = new Thread(Workers.GetAllOSes); + thdPopulateOSes.Start(); + } + + void LoadOSesFailed(string text) + { + Application.Invoke(delegate + { + MessageDialog dlgMsg = new MessageDialog(this, DialogFlags.Modal, MessageType.Error, ButtonsType.Ok, + string.Format("Error {0} when populating OSes file, exiting...", text)); + dlgMsg.Run(); + dlgMsg.Destroy(); + if(thdPulseProgress != null) + { + thdPulseProgress.Abort(); + thdPulseProgress = null; + } + if(thdPopulateOSes != null) + { + thdPopulateOSes.Abort(); + thdPopulateOSes = null; + } + Workers.Failed -= LoadOSesFailed; + Workers.Finished -= LoadOSesFinished; + Workers.UpdateProgress -= UpdateProgress; + Application.Quit(); + }); + } + + void LoadOSesFinished() + { + Application.Invoke(delegate + { + if(thdPulseProgress != null) + { + thdPulseProgress.Abort(); + thdPulseProgress = null; + } + if(thdPopulateOSes != null) + { + thdPopulateOSes.Abort(); + thdPopulateOSes = null; + } + Workers.Failed -= LoadOSesFailed; + Workers.Finished -= LoadOSesFinished; + Workers.UpdateProgress -= UpdateProgress; + lblProgress.Visible = false; + prgProgress.Visible = false; + treeOSes.Sensitive = true; + btnAdd.Visible = true; + btnRemove.Visible = true; + btnExtract.Visible = true; + btnSave.Visible = true; + btnHelp.Visible = true; + btnSettings.Visible = true; + }); + } + + public void UpdateProgress(string text, string inner, long current, long maximum) + { + Application.Invoke(delegate + { + lblProgress.Text = text; + prgProgress.Text = inner; + if(maximum > 0) + prgProgress.Fraction = current / (double)maximum; + else + prgProgress.Pulse(); + }); + } + + public void UpdateProgress2(string text, string inner, long current, long maximum) + { + Application.Invoke(delegate + { + lblProgress2.Text = text; + prgProgress2.Text = inner; + if(maximum > 0) + prgProgress2.Fraction = current / (double)maximum; + else + prgProgress2.Pulse(); + }); + } + + void AddOS(DBEntry os, bool existsInRepo, string pathInRepo) + { + Application.Invoke(delegate + { + if(thdPulseProgress != null) + { + thdPulseProgress.Abort(); + thdPulseProgress = null; + } + + string color = existsInRepo ? "green" : "red"; + osView.AppendValues(os.developer, os.product, os.version, os.languages, os.architecture, os.machine, + os.format, os.description, os.oem, os.upgrade, os.update, os.source, + os.files, os.netinstall, color, "black", pathInRepo, os.id, os.mdid); + }); + } + + protected void OnBtnAddClicked(object sender, EventArgs e) + { + frmAdd _frmAdd = new frmAdd(); + _frmAdd.Run(); + _frmAdd.Destroy(); + } + + protected void OnBtnRemoveClicked(object sender, EventArgs e) + { + TreeIter osIter; + if(treeOSes.Selection.GetSelected(out osIter)) + { + MessageDialog dlgMsg = new MessageDialog(this, DialogFlags.Modal, MessageType.Question, ButtonsType.YesNo, + "Are you sure you want to remove the selected OS?"); + + if(dlgMsg.Run() == (int)ResponseType.Yes) + { + Workers.RemoveOS((long)osView.GetValue(osIter, 17), (string)osView.GetValue(osIter, 18)); + osView.Remove(ref osIter); + } + + dlgMsg.Destroy(); + } + } + + protected void OnBtnExtractClicked(object sender, EventArgs e) + { + TreeIter osIter; + if(treeOSes.Selection.GetSelected(out osIter)) + { + Context.path = (string)osView.GetValue(osIter, 18); + + if(!File.Exists(Context.path)) + { + MessageDialog dlgMsg = new MessageDialog(this, DialogFlags.Modal, MessageType.Error, ButtonsType.Ok, "File is not in repository."); + dlgMsg.Run(); + dlgMsg.Destroy(); + return; + } + + FileChooserDialog dlgFolder = new FileChooserDialog("Extract to...", this, FileChooserAction.SelectFolder, + "Cancel", ResponseType.Cancel, "Choose", ResponseType.Accept); + dlgFolder.SelectMultiple = false; + + if(dlgFolder.Run() == (int)ResponseType.Accept) + { + dlgFolder.Destroy(); + + Context.userExtracting = true; + Context.tmpFolder = dlgFolder.Filename; + Context.copyArchive = true; + + lblProgress.Visible = true; + lblProgress2.Visible = true; + prgProgress.Visible = true; + prgProgress2.Visible = true; + treeOSes.Sensitive = false; + btnAdd.Visible = false; + btnRemove.Visible = false; + btnExtract.Visible = false; + btnSave.Visible = false; + btnHelp.Visible = false; + btnSettings.Visible = false; + btnStop.Visible = true; + + if(thdPulseProgress != null) + { + thdPulseProgress.Abort(); + thdPulseProgress = null; + } + Workers.Failed += ExtractArchiveFailed; + Workers.Finished += ExtractArchiveFinished; + Workers.UpdateProgress += UpdateProgress; + Workers.UpdateProgress2 += UpdateProgress2; + thdExtractArchive = new Thread(Workers.ExtractArchive); + thdExtractArchive.Start(); + } + else + dlgFolder.Destroy(); + } + } + + public void ExtractArchiveFailed(string text) + { + Application.Invoke(delegate + { + MessageDialog dlgMsg = new MessageDialog(this, DialogFlags.Modal, MessageType.Error, ButtonsType.Ok, text); + dlgMsg.Run(); + dlgMsg.Destroy(); + if(thdPulseProgress != null) + { + thdPulseProgress.Abort(); + thdPulseProgress = null; + } + if(thdExtractArchive != null) + { + thdExtractArchive.Abort(); + thdExtractArchive = null; + } + + lblProgress.Visible = false; + lblProgress2.Visible = false; + prgProgress.Visible = false; + prgProgress2.Visible = false; + treeOSes.Sensitive = true; + btnAdd.Visible = true; + btnRemove.Visible = true; + btnExtract.Visible = true; + btnSave.Visible = true; + btnHelp.Visible = true; + btnSettings.Visible = true; + btnStop.Visible = false; + + Workers.Failed -= ExtractArchiveFailed; + Workers.Finished -= ExtractArchiveFinished; + Workers.UpdateProgress -= UpdateProgress; + Workers.UpdateProgress2 -= UpdateProgress2; + + Context.userExtracting = false; + Context.tmpFolder = null; + Context.copyArchive = false; + Context.path = null; + }); + } + + public void ExtractArchiveFinished() + { + Application.Invoke(delegate + { + if(thdPulseProgress != null) + { + thdPulseProgress.Abort(); + thdPulseProgress = null; + } + if(thdExtractArchive != null) + { + thdExtractArchive.Abort(); + thdExtractArchive = null; + } + + lblProgress.Visible = false; + lblProgress2.Visible = false; + prgProgress.Visible = false; + prgProgress2.Visible = false; + treeOSes.Sensitive = true; + btnAdd.Visible = true; + btnRemove.Visible = true; + btnExtract.Visible = true; + btnSave.Visible = true; + btnHelp.Visible = true; + btnSettings.Visible = true; + btnStop.Visible = false; + + Workers.Failed -= ExtractArchiveFailed; + Workers.Finished -= ExtractArchiveFinished; + Workers.UpdateProgress -= UpdateProgress; + Workers.UpdateProgress2 -= UpdateProgress2; + + Context.userExtracting = false; + Context.tmpFolder = null; + Context.copyArchive = false; + Context.path = null; + + MessageDialog dlgMsg = new MessageDialog(this, DialogFlags.Modal, MessageType.Error, ButtonsType.Ok, + string.Format("Correctly extracted to {0}", Context.tmpFolder)); + dlgMsg.Run(); + dlgMsg.Destroy(); + }); + } + + protected void OnBtnSaveClicked(object sender, EventArgs e) + { + TreeIter osIter; + if(treeOSes.Selection.GetSelected(out osIter)) + { + Context.path = (string)osView.GetValue(osIter, 18); + + if(!File.Exists(Context.path)) + { + MessageDialog dlgMsg = new MessageDialog(this, DialogFlags.Modal, MessageType.Error, ButtonsType.Ok, "File is not in repository."); + dlgMsg.Run(); + dlgMsg.Destroy(); + return; + } + + FileChooserDialog dlgFolder = new FileChooserDialog("Copy to...", this, FileChooserAction.Save, + "Cancel", ResponseType.Cancel, "Choose", ResponseType.Accept); + dlgFolder.SelectMultiple = false; + + if(dlgFolder.Run() == (int)ResponseType.Accept) + { + dlgFolder.Destroy(); + + Context.userExtracting = true; + Context.tmpFolder = dlgFolder.Filename; + Context.copyArchive = true; + + lblProgress.Visible = true; + prgProgress.Visible = true; + treeOSes.Sensitive = false; + btnAdd.Visible = false; + btnRemove.Visible = false; + btnExtract.Visible = false; + btnSave.Visible = false; + btnHelp.Visible = false; + btnSettings.Visible = false; + btnStop.Visible = true; + + if(thdPulseProgress != null) + { + thdPulseProgress.Abort(); + thdPulseProgress = null; + } + Workers.Failed += CopyFileFailed; + Workers.Finished += CopyFileFinished; + Workers.UpdateProgress += UpdateProgress; + thdCopyFile = new Thread(Workers.CopyFile); + thdCopyFile.Start(); + } + else + dlgFolder.Destroy(); + } + } + + public void CopyFileFailed(string text) + { + Application.Invoke(delegate + { + MessageDialog dlgMsg = new MessageDialog(this, DialogFlags.Modal, MessageType.Error, ButtonsType.Ok, text); + dlgMsg.Run(); + dlgMsg.Destroy(); + if(thdPulseProgress != null) + { + thdPulseProgress.Abort(); + thdPulseProgress = null; + } + if(thdCopyFile != null) + { + thdCopyFile.Abort(); + thdCopyFile = null; + } + + lblProgress.Visible = false; + prgProgress.Visible = false; + treeOSes.Sensitive = true; + btnAdd.Visible = true; + btnRemove.Visible = true; + btnExtract.Visible = true; + btnSave.Visible = true; + btnHelp.Visible = true; + btnSettings.Visible = true; + btnStop.Visible = false; + + Workers.Failed -= CopyFileFailed; + Workers.Finished -= CopyFileFinished; + Workers.UpdateProgress -= UpdateProgress; + + Context.userExtracting = false; + Context.tmpFolder = null; + Context.copyArchive = false; + Context.path = null; + }); + } + + public void CopyFileFinished() + { + Application.Invoke(delegate + { + if(thdPulseProgress != null) + { + thdPulseProgress.Abort(); + thdPulseProgress = null; + } + if(thdCopyFile != null) + { + thdCopyFile.Abort(); + thdCopyFile = null; + } + + lblProgress.Visible = false; + prgProgress.Visible = false; + treeOSes.Sensitive = true; + btnAdd.Visible = true; + btnRemove.Visible = true; + btnExtract.Visible = true; + btnSave.Visible = true; + btnHelp.Visible = true; + btnSettings.Visible = true; + btnStop.Visible = false; + + Workers.Failed -= CopyFileFailed; + Workers.Finished -= CopyFileFinished; + Workers.UpdateProgress -= UpdateProgress; + + Context.userExtracting = false; + Context.tmpFolder = null; + Context.copyArchive = false; + Context.path = null; + + MessageDialog dlgMsg = new MessageDialog(this, DialogFlags.Modal, MessageType.Error, ButtonsType.Ok, + string.Format("Correctly saved as {0}", Context.tmpFolder)); + dlgMsg.Run(); + dlgMsg.Destroy(); + }); + } + + protected void OnBtnHelpClicked(object sender, EventArgs e) + { + frmHelp _help = new frmHelp(); + _help.Run(); + _help.Destroy(); + } + + protected void OnBtnSettingsClicked(object sender, EventArgs e) + { + frmSettings _frmSettings = new frmSettings(); + _frmSettings.Run(); + _frmSettings.Destroy(); + } + + protected void OnBtnQuitClicked(object sender, EventArgs e) + { + OnBtnStopClicked(sender, e); + Application.Quit(); + } + + protected void OnBtnStopClicked(object sender, EventArgs e) + { + if(thdPulseProgress != null) + { + thdPulseProgress.Abort(); + thdPulseProgress = null; + } + if(thdPopulateOSes != null) + { + thdPopulateOSes.Abort(); + thdPopulateOSes = null; + } + if(thdExtractArchive != null) + { + thdPopulateOSes.Abort(); + thdPopulateOSes = null; + } + if(thdCopyFile != null) + { + thdCopyFile.Abort(); + thdCopyFile = null; + } + } + + protected void OnDeleteEvent(object sender, DeleteEventArgs e) + { + OnBtnStopClicked(sender, e); } } -} +} \ No newline at end of file diff --git a/osrepodbmgr/frmSettings.cs b/osrepodbmgr/frmSettings.cs index 2d5721c..4df2935 100644 --- a/osrepodbmgr/frmSettings.cs +++ b/osrepodbmgr/frmSettings.cs @@ -34,12 +34,11 @@ using Ionic.Zip; namespace osrepodbmgr { - public partial class frmSettings : Window + public partial class frmSettings : Dialog { string oldUnarPath; - public frmSettings() : - base(WindowType.Toplevel) + public frmSettings() { Build(); txtTmp.Text = Core.Settings.Current.TemporaryFolder; @@ -77,7 +76,7 @@ namespace osrepodbmgr protected void OnBtnCancelClicked(object sender, EventArgs e) { - Destroy(); + btnDialog.Click(); } protected void OnBtnApplyClicked(object sender, EventArgs e) @@ -92,7 +91,7 @@ namespace osrepodbmgr Core.Workers.CloseDB(); Core.Workers.InitDB(); Context.CheckUnar(); - Destroy(); + btnDialog.Click(); } protected void OnBtnUnarClicked(object sender, EventArgs e) diff --git a/osrepodbmgr/gtk-gui/frmAdd.cs b/osrepodbmgr/gtk-gui/frmAdd.cs index 94e8a53..6105282 100644 --- a/osrepodbmgr/gtk-gui/frmAdd.cs +++ b/osrepodbmgr/gtk-gui/frmAdd.cs @@ -3,8 +3,6 @@ public partial class frmAdd { - private global::Gtk.VBox vbox1; - private global::Gtk.HBox hbox15; private global::Gtk.Label lblDeveloper; @@ -101,10 +99,6 @@ public partial class frmAdd private global::Gtk.Button btnExit; - private global::Gtk.Button btnSettings; - - private global::Gtk.Button btnHelp; - private global::Gtk.Button btnClose; private global::Gtk.Button btnPack; @@ -121,17 +115,19 @@ public partial class frmAdd private global::Gtk.Button btnRemoveFile; + private global::Gtk.Button btnDialog; + protected virtual void Build() { global::Stetic.Gui.Initialize(this); // Widget frmAdd this.Name = "frmAdd"; - this.Title = global::Mono.Unix.Catalog.GetString("OS Repository DB Manager"); + this.Title = global::Mono.Unix.Catalog.GetString("Add operating system"); this.WindowPosition = ((global::Gtk.WindowPosition)(4)); - // Container child frmAdd.Gtk.Container+ContainerChild - this.vbox1 = new global::Gtk.VBox(); - this.vbox1.Name = "vbox1"; - this.vbox1.Spacing = 6; + // Internal child frmAdd.VBox + global::Gtk.VBox w1 = this.VBox; + w1.Name = "vbox1"; + w1.Spacing = 6; // Container child vbox1.Gtk.Box+BoxChild this.hbox15 = new global::Gtk.HBox(); this.hbox15.Name = "hbox15"; @@ -141,10 +137,10 @@ public partial class frmAdd this.lblDeveloper.Name = "lblDeveloper"; this.lblDeveloper.LabelProp = global::Mono.Unix.Catalog.GetString("Developer"); this.hbox15.Add(this.lblDeveloper); - global::Gtk.Box.BoxChild w1 = ((global::Gtk.Box.BoxChild)(this.hbox15[this.lblDeveloper])); - w1.Position = 0; - w1.Expand = false; - w1.Fill = false; + global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.hbox15[this.lblDeveloper])); + w2.Position = 0; + w2.Expand = false; + w2.Fill = false; // Container child hbox15.Gtk.Box+BoxChild this.txtDeveloper = new global::Gtk.Entry(); this.txtDeveloper.CanFocus = true; @@ -152,13 +148,13 @@ public partial class frmAdd this.txtDeveloper.IsEditable = false; this.txtDeveloper.InvisibleChar = '●'; this.hbox15.Add(this.txtDeveloper); - global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.hbox15[this.txtDeveloper])); - w2.Position = 1; - this.vbox1.Add(this.hbox15); - global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.hbox15])); - w3.Position = 0; - w3.Expand = false; - w3.Fill = false; + global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.hbox15[this.txtDeveloper])); + w3.Position = 1; + w1.Add(this.hbox15); + global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(w1[this.hbox15])); + w4.Position = 0; + w4.Expand = false; + w4.Fill = false; // Container child vbox1.Gtk.Box+BoxChild this.hbox14 = new global::Gtk.HBox(); this.hbox14.Name = "hbox14"; @@ -168,10 +164,10 @@ public partial class frmAdd this.lblProduct.Name = "lblProduct"; this.lblProduct.LabelProp = global::Mono.Unix.Catalog.GetString("Product"); this.hbox14.Add(this.lblProduct); - global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.hbox14[this.lblProduct])); - w4.Position = 0; - w4.Expand = false; - w4.Fill = false; + global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.hbox14[this.lblProduct])); + w5.Position = 0; + w5.Expand = false; + w5.Fill = false; // Container child hbox14.Gtk.Box+BoxChild this.txtProduct = new global::Gtk.Entry(); this.txtProduct.CanFocus = true; @@ -179,13 +175,13 @@ public partial class frmAdd this.txtProduct.IsEditable = false; this.txtProduct.InvisibleChar = '●'; this.hbox14.Add(this.txtProduct); - global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.hbox14[this.txtProduct])); - w5.Position = 1; - this.vbox1.Add(this.hbox14); - global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.hbox14])); + global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.hbox14[this.txtProduct])); w6.Position = 1; - w6.Expand = false; - w6.Fill = false; + w1.Add(this.hbox14); + global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(w1[this.hbox14])); + w7.Position = 1; + w7.Expand = false; + w7.Fill = false; // Container child vbox1.Gtk.Box+BoxChild this.hbox13 = new global::Gtk.HBox(); this.hbox13.Name = "hbox13"; @@ -195,10 +191,10 @@ public partial class frmAdd this.lblVersion.Name = "lblVersion"; this.lblVersion.LabelProp = global::Mono.Unix.Catalog.GetString("Version"); this.hbox13.Add(this.lblVersion); - global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.hbox13[this.lblVersion])); - w7.Position = 0; - w7.Expand = false; - w7.Fill = false; + global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.hbox13[this.lblVersion])); + w8.Position = 0; + w8.Expand = false; + w8.Fill = false; // Container child hbox13.Gtk.Box+BoxChild this.txtVersion = new global::Gtk.Entry(); this.txtVersion.CanFocus = true; @@ -206,13 +202,13 @@ public partial class frmAdd this.txtVersion.IsEditable = false; this.txtVersion.InvisibleChar = '●'; this.hbox13.Add(this.txtVersion); - global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.hbox13[this.txtVersion])); - w8.Position = 1; - this.vbox1.Add(this.hbox13); - global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.hbox13])); - w9.Position = 2; - w9.Expand = false; - w9.Fill = false; + global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.hbox13[this.txtVersion])); + w9.Position = 1; + w1.Add(this.hbox13); + global::Gtk.Box.BoxChild w10 = ((global::Gtk.Box.BoxChild)(w1[this.hbox13])); + w10.Position = 2; + w10.Expand = false; + w10.Fill = false; // Container child vbox1.Gtk.Box+BoxChild this.hbox12 = new global::Gtk.HBox(); this.hbox12.Name = "hbox12"; @@ -222,10 +218,10 @@ public partial class frmAdd this.lblLanguages.Name = "lblLanguages"; this.lblLanguages.LabelProp = global::Mono.Unix.Catalog.GetString("Languages"); this.hbox12.Add(this.lblLanguages); - global::Gtk.Box.BoxChild w10 = ((global::Gtk.Box.BoxChild)(this.hbox12[this.lblLanguages])); - w10.Position = 0; - w10.Expand = false; - w10.Fill = false; + global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(this.hbox12[this.lblLanguages])); + w11.Position = 0; + w11.Expand = false; + w11.Fill = false; // Container child hbox12.Gtk.Box+BoxChild this.txtLanguages = new global::Gtk.Entry(); this.txtLanguages.CanFocus = true; @@ -233,13 +229,13 @@ public partial class frmAdd this.txtLanguages.IsEditable = false; this.txtLanguages.InvisibleChar = '●'; this.hbox12.Add(this.txtLanguages); - global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(this.hbox12[this.txtLanguages])); - w11.Position = 1; - this.vbox1.Add(this.hbox12); - global::Gtk.Box.BoxChild w12 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.hbox12])); - w12.Position = 3; - w12.Expand = false; - w12.Fill = false; + global::Gtk.Box.BoxChild w12 = ((global::Gtk.Box.BoxChild)(this.hbox12[this.txtLanguages])); + w12.Position = 1; + w1.Add(this.hbox12); + global::Gtk.Box.BoxChild w13 = ((global::Gtk.Box.BoxChild)(w1[this.hbox12])); + w13.Position = 3; + w13.Expand = false; + w13.Fill = false; // Container child vbox1.Gtk.Box+BoxChild this.hbox11 = new global::Gtk.HBox(); this.hbox11.Name = "hbox11"; @@ -249,10 +245,10 @@ public partial class frmAdd this.lblArchitecture.Name = "lblArchitecture"; this.lblArchitecture.LabelProp = global::Mono.Unix.Catalog.GetString("Architecture"); this.hbox11.Add(this.lblArchitecture); - global::Gtk.Box.BoxChild w13 = ((global::Gtk.Box.BoxChild)(this.hbox11[this.lblArchitecture])); - w13.Position = 0; - w13.Expand = false; - w13.Fill = false; + global::Gtk.Box.BoxChild w14 = ((global::Gtk.Box.BoxChild)(this.hbox11[this.lblArchitecture])); + w14.Position = 0; + w14.Expand = false; + w14.Fill = false; // Container child hbox11.Gtk.Box+BoxChild this.txtArchitecture = new global::Gtk.Entry(); this.txtArchitecture.CanFocus = true; @@ -260,13 +256,13 @@ public partial class frmAdd this.txtArchitecture.IsEditable = false; this.txtArchitecture.InvisibleChar = '●'; this.hbox11.Add(this.txtArchitecture); - global::Gtk.Box.BoxChild w14 = ((global::Gtk.Box.BoxChild)(this.hbox11[this.txtArchitecture])); - w14.Position = 1; - this.vbox1.Add(this.hbox11); - global::Gtk.Box.BoxChild w15 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.hbox11])); - w15.Position = 4; - w15.Expand = false; - w15.Fill = false; + global::Gtk.Box.BoxChild w15 = ((global::Gtk.Box.BoxChild)(this.hbox11[this.txtArchitecture])); + w15.Position = 1; + w1.Add(this.hbox11); + global::Gtk.Box.BoxChild w16 = ((global::Gtk.Box.BoxChild)(w1[this.hbox11])); + w16.Position = 4; + w16.Expand = false; + w16.Fill = false; // Container child vbox1.Gtk.Box+BoxChild this.hbox10 = new global::Gtk.HBox(); this.hbox10.Name = "hbox10"; @@ -276,10 +272,10 @@ public partial class frmAdd this.lblMachine.Name = "lblMachine"; this.lblMachine.LabelProp = global::Mono.Unix.Catalog.GetString("Machine"); this.hbox10.Add(this.lblMachine); - global::Gtk.Box.BoxChild w16 = ((global::Gtk.Box.BoxChild)(this.hbox10[this.lblMachine])); - w16.Position = 0; - w16.Expand = false; - w16.Fill = false; + global::Gtk.Box.BoxChild w17 = ((global::Gtk.Box.BoxChild)(this.hbox10[this.lblMachine])); + w17.Position = 0; + w17.Expand = false; + w17.Fill = false; // Container child hbox10.Gtk.Box+BoxChild this.txtMachine = new global::Gtk.Entry(); this.txtMachine.CanFocus = true; @@ -287,13 +283,13 @@ public partial class frmAdd this.txtMachine.IsEditable = false; this.txtMachine.InvisibleChar = '●'; this.hbox10.Add(this.txtMachine); - global::Gtk.Box.BoxChild w17 = ((global::Gtk.Box.BoxChild)(this.hbox10[this.txtMachine])); - w17.Position = 1; - this.vbox1.Add(this.hbox10); - global::Gtk.Box.BoxChild w18 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.hbox10])); - w18.Position = 5; - w18.Expand = false; - w18.Fill = false; + global::Gtk.Box.BoxChild w18 = ((global::Gtk.Box.BoxChild)(this.hbox10[this.txtMachine])); + w18.Position = 1; + w1.Add(this.hbox10); + global::Gtk.Box.BoxChild w19 = ((global::Gtk.Box.BoxChild)(w1[this.hbox10])); + w19.Position = 5; + w19.Expand = false; + w19.Fill = false; // Container child vbox1.Gtk.Box+BoxChild this.hbox21 = new global::Gtk.HBox(); this.hbox21.Name = "hbox21"; @@ -303,10 +299,10 @@ public partial class frmAdd this.lblFormat.Name = "lblFormat"; this.lblFormat.LabelProp = global::Mono.Unix.Catalog.GetString("Format"); this.hbox21.Add(this.lblFormat); - global::Gtk.Box.BoxChild w19 = ((global::Gtk.Box.BoxChild)(this.hbox21[this.lblFormat])); - w19.Position = 0; - w19.Expand = false; - w19.Fill = false; + global::Gtk.Box.BoxChild w20 = ((global::Gtk.Box.BoxChild)(this.hbox21[this.lblFormat])); + w20.Position = 0; + w20.Expand = false; + w20.Fill = false; // Container child hbox21.Gtk.Box+BoxChild this.txtFormat = new global::Gtk.Entry(); this.txtFormat.CanFocus = true; @@ -314,13 +310,13 @@ public partial class frmAdd this.txtFormat.IsEditable = false; this.txtFormat.InvisibleChar = '●'; this.hbox21.Add(this.txtFormat); - global::Gtk.Box.BoxChild w20 = ((global::Gtk.Box.BoxChild)(this.hbox21[this.txtFormat])); - w20.Position = 1; - this.vbox1.Add(this.hbox21); - global::Gtk.Box.BoxChild w21 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.hbox21])); - w21.Position = 6; - w21.Expand = false; - w21.Fill = false; + global::Gtk.Box.BoxChild w21 = ((global::Gtk.Box.BoxChild)(this.hbox21[this.txtFormat])); + w21.Position = 1; + w1.Add(this.hbox21); + global::Gtk.Box.BoxChild w22 = ((global::Gtk.Box.BoxChild)(w1[this.hbox21])); + w22.Position = 6; + w22.Expand = false; + w22.Fill = false; // Container child vbox1.Gtk.Box+BoxChild this.hbox20 = new global::Gtk.HBox(); this.hbox20.Name = "hbox20"; @@ -330,10 +326,10 @@ public partial class frmAdd this.lblDescription.Name = "lblDescription"; this.lblDescription.LabelProp = global::Mono.Unix.Catalog.GetString("Description"); this.hbox20.Add(this.lblDescription); - global::Gtk.Box.BoxChild w22 = ((global::Gtk.Box.BoxChild)(this.hbox20[this.lblDescription])); - w22.Position = 0; - w22.Expand = false; - w22.Fill = false; + global::Gtk.Box.BoxChild w23 = ((global::Gtk.Box.BoxChild)(this.hbox20[this.lblDescription])); + w23.Position = 0; + w23.Expand = false; + w23.Fill = false; // Container child hbox20.Gtk.Box+BoxChild this.txtDescription = new global::Gtk.Entry(); this.txtDescription.CanFocus = true; @@ -341,13 +337,13 @@ public partial class frmAdd this.txtDescription.IsEditable = false; this.txtDescription.InvisibleChar = '●'; this.hbox20.Add(this.txtDescription); - global::Gtk.Box.BoxChild w23 = ((global::Gtk.Box.BoxChild)(this.hbox20[this.txtDescription])); - w23.Position = 1; - this.vbox1.Add(this.hbox20); - global::Gtk.Box.BoxChild w24 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.hbox20])); - w24.Position = 7; - w24.Expand = false; - w24.Fill = false; + global::Gtk.Box.BoxChild w24 = ((global::Gtk.Box.BoxChild)(this.hbox20[this.txtDescription])); + w24.Position = 1; + w1.Add(this.hbox20); + global::Gtk.Box.BoxChild w25 = ((global::Gtk.Box.BoxChild)(w1[this.hbox20])); + w25.Position = 7; + w25.Expand = false; + w25.Fill = false; // Container child vbox1.Gtk.Box+BoxChild this.hbox17 = new global::Gtk.HBox(); this.hbox17.Name = "hbox17"; @@ -365,10 +361,10 @@ public partial class frmAdd this.chkOem.DrawIndicator = true; this.chkOem.UseUnderline = true; this.vbox3.Add(this.chkOem); - global::Gtk.Box.BoxChild w25 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.chkOem])); - w25.Position = 0; - w25.Expand = false; - w25.Fill = false; + global::Gtk.Box.BoxChild w26 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.chkOem])); + w26.Position = 0; + w26.Expand = false; + w26.Fill = false; // Container child vbox3.Gtk.Box+BoxChild this.chkUpgrade = new global::Gtk.CheckButton(); this.chkUpgrade.Sensitive = false; @@ -378,10 +374,10 @@ public partial class frmAdd this.chkUpgrade.DrawIndicator = true; this.chkUpgrade.UseUnderline = true; this.vbox3.Add(this.chkUpgrade); - global::Gtk.Box.BoxChild w26 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.chkUpgrade])); - w26.Position = 1; - w26.Expand = false; - w26.Fill = false; + global::Gtk.Box.BoxChild w27 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.chkUpgrade])); + w27.Position = 1; + w27.Expand = false; + w27.Fill = false; // Container child vbox3.Gtk.Box+BoxChild this.chkSource = new global::Gtk.CheckButton(); this.chkSource.Sensitive = false; @@ -391,13 +387,13 @@ public partial class frmAdd this.chkSource.DrawIndicator = true; this.chkSource.UseUnderline = true; this.vbox3.Add(this.chkSource); - global::Gtk.Box.BoxChild w27 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.chkSource])); - w27.Position = 2; - w27.Expand = false; - w27.Fill = false; + global::Gtk.Box.BoxChild w28 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.chkSource])); + w28.Position = 2; + w28.Expand = false; + w28.Fill = false; this.hbox17.Add(this.vbox3); - global::Gtk.Box.BoxChild w28 = ((global::Gtk.Box.BoxChild)(this.hbox17[this.vbox3])); - w28.Position = 0; + global::Gtk.Box.BoxChild w29 = ((global::Gtk.Box.BoxChild)(this.hbox17[this.vbox3])); + w29.Position = 0; // Container child hbox17.Gtk.Box+BoxChild this.vbox2 = new global::Gtk.VBox(); this.vbox2.Name = "vbox2"; @@ -411,10 +407,10 @@ public partial class frmAdd this.chkUpdate.DrawIndicator = true; this.chkUpdate.UseUnderline = true; this.vbox2.Add(this.chkUpdate); - global::Gtk.Box.BoxChild w29 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.chkUpdate])); - w29.Position = 0; - w29.Expand = false; - w29.Fill = false; + global::Gtk.Box.BoxChild w30 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.chkUpdate])); + w30.Position = 0; + w30.Expand = false; + w30.Fill = false; // Container child vbox2.Gtk.Box+BoxChild this.chkFiles = new global::Gtk.CheckButton(); this.chkFiles.Sensitive = false; @@ -424,10 +420,10 @@ public partial class frmAdd this.chkFiles.DrawIndicator = true; this.chkFiles.UseUnderline = true; this.vbox2.Add(this.chkFiles); - global::Gtk.Box.BoxChild w30 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.chkFiles])); - w30.Position = 1; - w30.Expand = false; - w30.Fill = false; + global::Gtk.Box.BoxChild w31 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.chkFiles])); + w31.Position = 1; + w31.Expand = false; + w31.Fill = false; // Container child vbox2.Gtk.Box+BoxChild this.chkNetinstall = new global::Gtk.CheckButton(); this.chkNetinstall.Sensitive = false; @@ -437,18 +433,18 @@ public partial class frmAdd this.chkNetinstall.DrawIndicator = true; this.chkNetinstall.UseUnderline = true; this.vbox2.Add(this.chkNetinstall); - global::Gtk.Box.BoxChild w31 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.chkNetinstall])); - w31.Position = 2; - w31.Expand = false; - w31.Fill = false; + global::Gtk.Box.BoxChild w32 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.chkNetinstall])); + w32.Position = 2; + w32.Expand = false; + w32.Fill = false; this.hbox17.Add(this.vbox2); - global::Gtk.Box.BoxChild w32 = ((global::Gtk.Box.BoxChild)(this.hbox17[this.vbox2])); - w32.Position = 1; - this.vbox1.Add(this.hbox17); - global::Gtk.Box.BoxChild w33 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.hbox17])); - w33.Position = 8; - w33.Expand = false; - w33.Fill = false; + global::Gtk.Box.BoxChild w33 = ((global::Gtk.Box.BoxChild)(this.hbox17[this.vbox2])); + w33.Position = 1; + w1.Add(this.hbox17); + global::Gtk.Box.BoxChild w34 = ((global::Gtk.Box.BoxChild)(w1[this.hbox17])); + w34.Position = 8; + w34.Expand = false; + w34.Fill = false; // Container child vbox1.Gtk.Box+BoxChild this.tabTabs = new global::Gtk.Notebook(); this.tabTabs.CanFocus = true; @@ -482,17 +478,17 @@ public partial class frmAdd this.treeOSes.Reorderable = true; this.GtkScrolledWindow1.Add(this.treeOSes); this.tabTabs.Add(this.GtkScrolledWindow1); - global::Gtk.Notebook.NotebookChild w37 = ((global::Gtk.Notebook.NotebookChild)(this.tabTabs[this.GtkScrolledWindow1])); - w37.Position = 1; + global::Gtk.Notebook.NotebookChild w38 = ((global::Gtk.Notebook.NotebookChild)(this.tabTabs[this.GtkScrolledWindow1])); + w38.Position = 1; // Notebook tab this.lblTabOSes = new global::Gtk.Label(); this.lblTabOSes.Name = "lblTabOSes"; this.lblTabOSes.LabelProp = global::Mono.Unix.Catalog.GetString("OSes"); this.tabTabs.SetTabLabel(this.GtkScrolledWindow1, this.lblTabOSes); this.lblTabOSes.ShowAll(); - this.vbox1.Add(this.tabTabs); - global::Gtk.Box.BoxChild w38 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.tabTabs])); - w38.Position = 9; + w1.Add(this.tabTabs); + global::Gtk.Box.BoxChild w39 = ((global::Gtk.Box.BoxChild)(w1[this.tabTabs])); + w39.Position = 9; // Container child vbox1.Gtk.Box+BoxChild this.hbox2 = new global::Gtk.HBox(); this.hbox2.Name = "hbox2"; @@ -502,21 +498,21 @@ public partial class frmAdd this.lblProgress.Name = "lblProgress"; this.lblProgress.LabelProp = global::Mono.Unix.Catalog.GetString("label2"); this.hbox2.Add(this.lblProgress); - global::Gtk.Box.BoxChild w39 = ((global::Gtk.Box.BoxChild)(this.hbox2[this.lblProgress])); - w39.Position = 0; - w39.Expand = false; - w39.Fill = false; + global::Gtk.Box.BoxChild w40 = ((global::Gtk.Box.BoxChild)(this.hbox2[this.lblProgress])); + w40.Position = 0; + w40.Expand = false; + w40.Fill = false; // Container child hbox2.Gtk.Box+BoxChild this.prgProgress = new global::Gtk.ProgressBar(); this.prgProgress.Name = "prgProgress"; this.hbox2.Add(this.prgProgress); - global::Gtk.Box.BoxChild w40 = ((global::Gtk.Box.BoxChild)(this.hbox2[this.prgProgress])); - w40.Position = 1; - this.vbox1.Add(this.hbox2); - global::Gtk.Box.BoxChild w41 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.hbox2])); - w41.Position = 10; - w41.Expand = false; - w41.Fill = false; + global::Gtk.Box.BoxChild w41 = ((global::Gtk.Box.BoxChild)(this.hbox2[this.prgProgress])); + w41.Position = 1; + w1.Add(this.hbox2); + global::Gtk.Box.BoxChild w42 = ((global::Gtk.Box.BoxChild)(w1[this.hbox2])); + w42.Position = 10; + w42.Expand = false; + w42.Fill = false; // Container child vbox1.Gtk.Box+BoxChild this.hbox27 = new global::Gtk.HBox(); this.hbox27.Name = "hbox27"; @@ -526,21 +522,21 @@ public partial class frmAdd this.lblProgress2.Name = "lblProgress2"; this.lblProgress2.LabelProp = global::Mono.Unix.Catalog.GetString("label22"); this.hbox27.Add(this.lblProgress2); - global::Gtk.Box.BoxChild w42 = ((global::Gtk.Box.BoxChild)(this.hbox27[this.lblProgress2])); - w42.Position = 0; - w42.Expand = false; - w42.Fill = false; + global::Gtk.Box.BoxChild w43 = ((global::Gtk.Box.BoxChild)(this.hbox27[this.lblProgress2])); + w43.Position = 0; + w43.Expand = false; + w43.Fill = false; // Container child hbox27.Gtk.Box+BoxChild this.prgProgress2 = new global::Gtk.ProgressBar(); this.prgProgress2.Name = "prgProgress2"; this.hbox27.Add(this.prgProgress2); - global::Gtk.Box.BoxChild w43 = ((global::Gtk.Box.BoxChild)(this.hbox27[this.prgProgress2])); - w43.Position = 1; - this.vbox1.Add(this.hbox27); - global::Gtk.Box.BoxChild w44 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.hbox27])); - w44.Position = 11; - w44.Expand = false; - w44.Fill = false; + global::Gtk.Box.BoxChild w44 = ((global::Gtk.Box.BoxChild)(this.hbox27[this.prgProgress2])); + w44.Position = 1; + w1.Add(this.hbox27); + global::Gtk.Box.BoxChild w45 = ((global::Gtk.Box.BoxChild)(w1[this.hbox27])); + w45.Position = 11; + w45.Expand = false; + w45.Fill = false; // Container child vbox1.Gtk.Box+BoxChild this.hbox1 = new global::Gtk.HBox(); this.hbox1.Name = "hbox1"; @@ -551,116 +547,88 @@ public partial class frmAdd this.btnExit.Name = "btnExit"; this.btnExit.UseStock = true; this.btnExit.UseUnderline = true; - this.btnExit.Label = "gtk-quit"; + this.btnExit.Label = "gtk-ok"; this.hbox1.Add(this.btnExit); - global::Gtk.Box.BoxChild w45 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.btnExit])); - w45.PackType = ((global::Gtk.PackType)(1)); - w45.Position = 0; - w45.Expand = false; - w45.Fill = false; - // Container child hbox1.Gtk.Box+BoxChild - this.btnSettings = new global::Gtk.Button(); - this.btnSettings.CanFocus = true; - this.btnSettings.Name = "btnSettings"; - this.btnSettings.UseUnderline = true; - this.btnSettings.Label = global::Mono.Unix.Catalog.GetString("_Settings"); - global::Gtk.Image w46 = new global::Gtk.Image(); - w46.Pixbuf = global::Stetic.IconLoader.LoadIcon(this, "gtk-preferences", global::Gtk.IconSize.Menu); - this.btnSettings.Image = w46; - this.hbox1.Add(this.btnSettings); - global::Gtk.Box.BoxChild w47 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.btnSettings])); - w47.PackType = ((global::Gtk.PackType)(1)); - w47.Position = 1; - w47.Expand = false; - w47.Fill = false; - // Container child hbox1.Gtk.Box+BoxChild - this.btnHelp = new global::Gtk.Button(); - this.btnHelp.CanFocus = true; - this.btnHelp.Name = "btnHelp"; - this.btnHelp.UseStock = true; - this.btnHelp.UseUnderline = true; - this.btnHelp.Label = "gtk-help"; - this.hbox1.Add(this.btnHelp); - global::Gtk.Box.BoxChild w48 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.btnHelp])); - w48.PackType = ((global::Gtk.PackType)(1)); - w48.Position = 2; - w48.Expand = false; - w48.Fill = false; + global::Gtk.Box.BoxChild w46 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.btnExit])); + w46.PackType = ((global::Gtk.PackType)(1)); + w46.Position = 0; + w46.Expand = false; + w46.Fill = false; // Container child hbox1.Gtk.Box+BoxChild this.btnClose = new global::Gtk.Button(); this.btnClose.CanFocus = true; this.btnClose.Name = "btnClose"; this.btnClose.UseUnderline = true; this.btnClose.Label = global::Mono.Unix.Catalog.GetString("_Close"); - global::Gtk.Image w49 = new global::Gtk.Image(); - w49.Pixbuf = global::Stetic.IconLoader.LoadIcon(this, "gtk-close", global::Gtk.IconSize.Menu); - this.btnClose.Image = w49; + global::Gtk.Image w47 = new global::Gtk.Image(); + w47.Pixbuf = global::Stetic.IconLoader.LoadIcon(this, "gtk-close", global::Gtk.IconSize.Menu); + this.btnClose.Image = w47; this.hbox1.Add(this.btnClose); - global::Gtk.Box.BoxChild w50 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.btnClose])); - w50.PackType = ((global::Gtk.PackType)(1)); - w50.Position = 3; - w50.Expand = false; - w50.Fill = false; + global::Gtk.Box.BoxChild w48 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.btnClose])); + w48.PackType = ((global::Gtk.PackType)(1)); + w48.Position = 1; + w48.Expand = false; + w48.Fill = false; // Container child hbox1.Gtk.Box+BoxChild this.btnPack = new global::Gtk.Button(); this.btnPack.CanFocus = true; this.btnPack.Name = "btnPack"; this.btnPack.UseUnderline = true; this.btnPack.Label = global::Mono.Unix.Catalog.GetString("_Pack..."); - global::Gtk.Image w51 = new global::Gtk.Image(); - w51.Pixbuf = global::Stetic.IconLoader.LoadIcon(this, "gtk-save", global::Gtk.IconSize.Menu); - this.btnPack.Image = w51; + global::Gtk.Image w49 = new global::Gtk.Image(); + w49.Pixbuf = global::Stetic.IconLoader.LoadIcon(this, "gtk-save", global::Gtk.IconSize.Menu); + this.btnPack.Image = w49; this.hbox1.Add(this.btnPack); - global::Gtk.Box.BoxChild w52 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.btnPack])); - w52.PackType = ((global::Gtk.PackType)(1)); - w52.Position = 4; - w52.Expand = false; - w52.Fill = false; + global::Gtk.Box.BoxChild w50 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.btnPack])); + w50.PackType = ((global::Gtk.PackType)(1)); + w50.Position = 2; + w50.Expand = false; + w50.Fill = false; // Container child hbox1.Gtk.Box+BoxChild this.btnAdd = new global::Gtk.Button(); this.btnAdd.CanFocus = true; this.btnAdd.Name = "btnAdd"; this.btnAdd.UseUnderline = true; this.btnAdd.Label = global::Mono.Unix.Catalog.GetString("Add to _DB"); - global::Gtk.Image w53 = new global::Gtk.Image(); - w53.Pixbuf = global::Stetic.IconLoader.LoadIcon(this, "gtk-add", global::Gtk.IconSize.Menu); - this.btnAdd.Image = w53; + global::Gtk.Image w51 = new global::Gtk.Image(); + w51.Pixbuf = global::Stetic.IconLoader.LoadIcon(this, "gtk-add", global::Gtk.IconSize.Menu); + this.btnAdd.Image = w51; this.hbox1.Add(this.btnAdd); - global::Gtk.Box.BoxChild w54 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.btnAdd])); - w54.PackType = ((global::Gtk.PackType)(1)); - w54.Position = 5; - w54.Expand = false; - w54.Fill = false; + global::Gtk.Box.BoxChild w52 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.btnAdd])); + w52.PackType = ((global::Gtk.PackType)(1)); + w52.Position = 3; + w52.Expand = false; + w52.Fill = false; // Container child hbox1.Gtk.Box+BoxChild this.btnArchive = new global::Gtk.Button(); this.btnArchive.CanFocus = true; this.btnArchive.Name = "btnArchive"; this.btnArchive.UseUnderline = true; this.btnArchive.Label = global::Mono.Unix.Catalog.GetString("Open _archive"); - global::Gtk.Image w55 = new global::Gtk.Image(); - w55.Pixbuf = global::Stetic.IconLoader.LoadIcon(this, "gtk-open", global::Gtk.IconSize.Menu); - this.btnArchive.Image = w55; + global::Gtk.Image w53 = new global::Gtk.Image(); + w53.Pixbuf = global::Stetic.IconLoader.LoadIcon(this, "gtk-open", global::Gtk.IconSize.Menu); + this.btnArchive.Image = w53; this.hbox1.Add(this.btnArchive); - global::Gtk.Box.BoxChild w56 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.btnArchive])); - w56.PackType = ((global::Gtk.PackType)(1)); - w56.Position = 6; - w56.Expand = false; - w56.Fill = false; + global::Gtk.Box.BoxChild w54 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.btnArchive])); + w54.PackType = ((global::Gtk.PackType)(1)); + w54.Position = 4; + w54.Expand = false; + w54.Fill = false; // Container child hbox1.Gtk.Box+BoxChild this.btnFolder = new global::Gtk.Button(); this.btnFolder.CanFocus = true; this.btnFolder.Name = "btnFolder"; this.btnFolder.UseUnderline = true; this.btnFolder.Label = global::Mono.Unix.Catalog.GetString("Open _folder"); - global::Gtk.Image w57 = new global::Gtk.Image(); - w57.Pixbuf = global::Stetic.IconLoader.LoadIcon(this, "gtk-open", global::Gtk.IconSize.Menu); - this.btnFolder.Image = w57; + global::Gtk.Image w55 = new global::Gtk.Image(); + w55.Pixbuf = global::Stetic.IconLoader.LoadIcon(this, "gtk-open", global::Gtk.IconSize.Menu); + this.btnFolder.Image = w55; this.hbox1.Add(this.btnFolder); - global::Gtk.Box.BoxChild w58 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.btnFolder])); - w58.PackType = ((global::Gtk.PackType)(1)); - w58.Position = 7; - w58.Expand = false; - w58.Fill = false; + global::Gtk.Box.BoxChild w56 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.btnFolder])); + w56.PackType = ((global::Gtk.PackType)(1)); + w56.Position = 5; + w56.Expand = false; + w56.Fill = false; // Container child hbox1.Gtk.Box+BoxChild this.btnStop = new global::Gtk.Button(); this.btnStop.CanFocus = true; @@ -669,26 +637,26 @@ public partial class frmAdd this.btnStop.UseUnderline = true; this.btnStop.Label = "gtk-stop"; this.hbox1.Add(this.btnStop); - global::Gtk.Box.BoxChild w59 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.btnStop])); - w59.PackType = ((global::Gtk.PackType)(1)); - w59.Position = 8; - w59.Expand = false; - w59.Fill = false; + global::Gtk.Box.BoxChild w57 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.btnStop])); + w57.PackType = ((global::Gtk.PackType)(1)); + w57.Position = 6; + w57.Expand = false; + w57.Fill = false; // Container child hbox1.Gtk.Box+BoxChild this.btnMetadata = new global::Gtk.Button(); this.btnMetadata.CanFocus = true; this.btnMetadata.Name = "btnMetadata"; this.btnMetadata.UseUnderline = true; this.btnMetadata.Label = global::Mono.Unix.Catalog.GetString("Metadata"); - global::Gtk.Image w60 = new global::Gtk.Image(); - w60.Pixbuf = global::Stetic.IconLoader.LoadIcon(this, "gtk-properties", global::Gtk.IconSize.Menu); - this.btnMetadata.Image = w60; + global::Gtk.Image w58 = new global::Gtk.Image(); + w58.Pixbuf = global::Stetic.IconLoader.LoadIcon(this, "gtk-properties", global::Gtk.IconSize.Menu); + this.btnMetadata.Image = w58; this.hbox1.Add(this.btnMetadata); - global::Gtk.Box.BoxChild w61 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.btnMetadata])); - w61.PackType = ((global::Gtk.PackType)(1)); - w61.Position = 9; - w61.Expand = false; - w61.Fill = false; + global::Gtk.Box.BoxChild w59 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.btnMetadata])); + w59.PackType = ((global::Gtk.PackType)(1)); + w59.Position = 7; + w59.Expand = false; + w59.Fill = false; // Container child hbox1.Gtk.Box+BoxChild this.btnRemoveFile = new global::Gtk.Button(); this.btnRemoveFile.CanFocus = true; @@ -697,17 +665,29 @@ public partial class frmAdd this.btnRemoveFile.UseUnderline = true; this.btnRemoveFile.Label = "gtk-remove"; this.hbox1.Add(this.btnRemoveFile); - global::Gtk.Box.BoxChild w62 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.btnRemoveFile])); - w62.PackType = ((global::Gtk.PackType)(1)); - w62.Position = 10; - w62.Expand = false; - w62.Fill = false; - this.vbox1.Add(this.hbox1); - global::Gtk.Box.BoxChild w63 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.hbox1])); - w63.Position = 12; + global::Gtk.Box.BoxChild w60 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.btnRemoveFile])); + w60.PackType = ((global::Gtk.PackType)(1)); + w60.Position = 8; + w60.Expand = false; + w60.Fill = false; + w1.Add(this.hbox1); + global::Gtk.Box.BoxChild w61 = ((global::Gtk.Box.BoxChild)(w1[this.hbox1])); + w61.Position = 12; + w61.Expand = false; + w61.Fill = false; + // Internal child frmAdd.ActionArea + global::Gtk.HButtonBox w62 = this.ActionArea; + w62.Name = "__gtksharp_108_Stetic_TopLevelDialog_ActionArea"; + // Container child __gtksharp_108_Stetic_TopLevelDialog_ActionArea.Gtk.ButtonBox+ButtonBoxChild + this.btnDialog = new global::Gtk.Button(); + this.btnDialog.CanFocus = true; + this.btnDialog.Name = "btnDialog"; + this.btnDialog.UseUnderline = true; + this.btnDialog.Label = global::Mono.Unix.Catalog.GetString("GtkButton"); + this.AddActionWidget(this.btnDialog, 0); + global::Gtk.ButtonBox.ButtonBoxChild w63 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w62[this.btnDialog])); w63.Expand = false; w63.Fill = false; - this.Add(this.vbox1); if((this.Child != null)) { this.Child.ShowAll(); @@ -724,6 +704,7 @@ public partial class frmAdd this.btnStop.Hide(); this.btnMetadata.Hide(); this.btnRemoveFile.Hide(); + w62.Hide(); this.Show(); this.DeleteEvent += new global::Gtk.DeleteEventHandler(this.OnDeleteEvent); this.btnRemoveFile.Clicked += new global::System.EventHandler(this.OnBtnRemoveFileClicked); @@ -734,8 +715,6 @@ public partial class frmAdd this.btnAdd.Clicked += new global::System.EventHandler(this.OnBtnAddClicked); this.btnPack.Clicked += new global::System.EventHandler(this.OnBtnPackClicked); this.btnClose.Clicked += new global::System.EventHandler(this.OnBtnCloseClicked); - this.btnHelp.Clicked += new global::System.EventHandler(this.OnBtnHelpClicked); - this.btnSettings.Clicked += new global::System.EventHandler(this.OnBtnSettingsClicked); this.btnExit.Clicked += new global::System.EventHandler(this.OnBtnExitClicked); } } diff --git a/osrepodbmgr/gtk-gui/gui.stetic b/osrepodbmgr/gtk-gui/gui.stetic index c01b018..37474a0 100644 --- a/osrepodbmgr/gtk-gui/gui.stetic +++ b/osrepodbmgr/gtk-gui/gui.stetic @@ -7,12 +7,14 @@ - + - OS Repository DB Manager + Add operating system CenterOnParent + 1 + False - + 6 @@ -578,9 +580,9 @@ True True StockItem - gtk-quit + gtk-ok - gtk-quit + gtk-ok End @@ -590,42 +592,6 @@ False - - - - True - TextAndIcon - stock:gtk-preferences Menu - _Settings - True - - - - End - 1 - True - False - False - - - - - - True - True - StockItem - gtk-help - - gtk-help - - - End - 2 - True - False - False - - @@ -639,7 +605,7 @@ End - 3 + 1 True False False @@ -658,7 +624,7 @@ End - 4 + 2 True False False @@ -677,7 +643,7 @@ End - 5 + 3 True False False @@ -695,7 +661,7 @@ End - 6 + 4 True False False @@ -713,7 +679,7 @@ End - 7 + 5 True False False @@ -732,7 +698,7 @@ End - 8 + 6 True False False @@ -751,7 +717,7 @@ End - 9 + 7 True False False @@ -770,7 +736,7 @@ End - 10 + 8 True False False @@ -786,14 +752,36 @@ + + + + False + 1 + + + + True + TextOnly + GtkButton + True + 0 + + + False + False + + + + - + Help Dialog CenterOnParent - True - + 1 + False + 6 @@ -958,12 +946,35 @@ QNX/QNX/20090229/source.zip + + + + False + 1 + + + + True + TextOnly + GtkButton + True + 0 + + + False + False + + + + - + - frmSettings + Settings CenterOnParent - + 1 + False + 6 @@ -1278,6 +1289,27 @@ QNX/QNX/20090229/source.zip + + + + False + 1 + + + + True + TextOnly + GtkButton + True + 0 + + + False + False + + + + @@ -3190,7 +3222,7 @@ QNX/QNX/20090229/source.zip True - 0 + 5 @@ -12330,4 +12362,287 @@ QNX/QNX/20090229/source.zip + + + OS Repository DB Manager + CenterOnParent + + + + + 6 + + + + None + + + + 0 + 0 + 12 + + + + In + + + + False + True + True + + + + + + + + + + <b>Operating systems</b> + True + + + label_item + + + + + 0 + True + + + + + + 6 + + + + label1 + + + 0 + True + False + False + + + + + + + + 1 + True + + + + + 1 + True + False + False + + + + + + 6 + + + + False + label2 + + + 0 + True + False + False + + + + + + False + + + 1 + True + + + + + 2 + True + False + False + + + + + + 6 + + + + False + True + True + StockItem + gtk-add + + gtk-add + + + 0 + True + False + False + + + + + + False + True + True + StockItem + gtk-remove + + gtk-remove + + + 1 + True + False + False + + + + + + True + True + StockItem + gtk-quit + + gtk-quit + + + End + 2 + True + False + False + + + + + + False + True + TextAndIcon + stock:gtk-preferences Menu + _Settings + True + + + + End + 3 + True + False + False + + + + + + False + True + True + StockItem + gtk-help + + gtk-help + + + End + 4 + True + False + False + + + + + + False + True + True + StockItem + gtk-save-as + + gtk-save-as + + + End + 5 + True + False + False + + + + + + False + True + TextAndIcon + stock:gtk-directory Menu + Extract to + True + + + + End + 6 + True + False + False + + + + + + False + True + True + StockItem + gtk-stop + + gtk-stop + + + End + 7 + True + False + False + + + + + 3 + True + False + False + + + + + \ No newline at end of file diff --git a/osrepodbmgr/gtk-gui/osrepodbmgr.dlgBlockMedia.cs b/osrepodbmgr/gtk-gui/osrepodbmgr.dlgBlockMedia.cs index e9c5f98..ef6e3e0 100644 --- a/osrepodbmgr/gtk-gui/osrepodbmgr.dlgBlockMedia.cs +++ b/osrepodbmgr/gtk-gui/osrepodbmgr.dlgBlockMedia.cs @@ -614,7 +614,7 @@ namespace osrepodbmgr this.notebook1 = new global::Gtk.Notebook(); this.notebook1.CanFocus = true; this.notebook1.Name = "notebook1"; - this.notebook1.CurrentPage = 0; + this.notebook1.CurrentPage = 5; // Container child notebook1.Gtk.Notebook+NotebookChild this.vbox2 = new global::Gtk.VBox(); this.vbox2.Name = "vbox2"; diff --git a/osrepodbmgr/gtk-gui/osrepodbmgr.frmHelp.cs b/osrepodbmgr/gtk-gui/osrepodbmgr.frmHelp.cs index 8c277ee..caa8ad2 100644 --- a/osrepodbmgr/gtk-gui/osrepodbmgr.frmHelp.cs +++ b/osrepodbmgr/gtk-gui/osrepodbmgr.frmHelp.cs @@ -4,14 +4,14 @@ namespace osrepodbmgr { public partial class frmHelp { - private global::Gtk.VBox vbox4; - private global::Gtk.ScrolledWindow GtkScrolledWindow; private global::Gtk.TextView txtHelp; private global::Gtk.Button btnOK; + private global::Gtk.Button btnDialog; + protected virtual void Build() { global::Stetic.Gui.Initialize(this); @@ -20,11 +20,10 @@ namespace osrepodbmgr this.Title = global::Mono.Unix.Catalog.GetString("Help"); this.TypeHint = ((global::Gdk.WindowTypeHint)(1)); this.WindowPosition = ((global::Gtk.WindowPosition)(4)); - this.Modal = true; - // Container child osrepodbmgr.frmHelp.Gtk.Container+ContainerChild - this.vbox4 = new global::Gtk.VBox(); - this.vbox4.Name = "vbox4"; - this.vbox4.Spacing = 6; + // Internal child osrepodbmgr.frmHelp.VBox + global::Gtk.VBox w1 = this.VBox; + w1.Name = "vbox4"; + w1.Spacing = 6; // Container child vbox4.Gtk.Box+BoxChild this.GtkScrolledWindow = new global::Gtk.ScrolledWindow(); this.GtkScrolledWindow.Name = "GtkScrolledWindow"; @@ -36,9 +35,9 @@ namespace osrepodbmgr this.txtHelp.Name = "txtHelp"; this.txtHelp.Editable = false; this.GtkScrolledWindow.Add(this.txtHelp); - this.vbox4.Add(this.GtkScrolledWindow); - global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.vbox4[this.GtkScrolledWindow])); - w2.Position = 0; + w1.Add(this.GtkScrolledWindow); + global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(w1[this.GtkScrolledWindow])); + w3.Position = 0; // Container child vbox4.Gtk.Box+BoxChild this.btnOK = new global::Gtk.Button(); this.btnOK.CanFocus = true; @@ -46,18 +45,31 @@ namespace osrepodbmgr this.btnOK.UseStock = true; this.btnOK.UseUnderline = true; this.btnOK.Label = "gtk-ok"; - this.vbox4.Add(this.btnOK); - global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.vbox4[this.btnOK])); - w3.Position = 1; - w3.Expand = false; - w3.Fill = false; - this.Add(this.vbox4); + w1.Add(this.btnOK); + global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(w1[this.btnOK])); + w4.Position = 1; + w4.Expand = false; + w4.Fill = false; + // Internal child osrepodbmgr.frmHelp.ActionArea + global::Gtk.HButtonBox w5 = this.ActionArea; + w5.Name = "__gtksharp_108_Stetic_TopLevelDialog_ActionArea"; + // Container child __gtksharp_108_Stetic_TopLevelDialog_ActionArea.Gtk.ButtonBox+ButtonBoxChild + this.btnDialog = new global::Gtk.Button(); + this.btnDialog.CanFocus = true; + this.btnDialog.Name = "btnDialog"; + this.btnDialog.UseUnderline = true; + this.btnDialog.Label = global::Mono.Unix.Catalog.GetString("GtkButton"); + this.AddActionWidget(this.btnDialog, 0); + global::Gtk.ButtonBox.ButtonBoxChild w6 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w5[this.btnDialog])); + w6.Expand = false; + w6.Fill = false; if((this.Child != null)) { this.Child.ShowAll(); } this.DefaultWidth = 400; this.DefaultHeight = 300; + w5.Hide(); this.Show(); this.btnOK.Clicked += new global::System.EventHandler(this.OnBtnOKClicked); } diff --git a/osrepodbmgr/gtk-gui/osrepodbmgr.frmMain.cs b/osrepodbmgr/gtk-gui/osrepodbmgr.frmMain.cs index dd0efc7..4077b58 100644 --- a/osrepodbmgr/gtk-gui/osrepodbmgr.frmMain.cs +++ b/osrepodbmgr/gtk-gui/osrepodbmgr.frmMain.cs @@ -1,10 +1,279 @@ +// This file has been generated by the GUI designer. Do not modify. namespace osrepodbmgr { public partial class frmMain { - private void Build() + private global::Gtk.VBox vbox2; + + private global::Gtk.Frame frame1; + + private global::Gtk.Alignment GtkAlignment; + + private global::Gtk.ScrolledWindow GtkScrolledWindow; + + private global::Gtk.TreeView treeOSes; + + private global::Gtk.Label lblOSes; + + private global::Gtk.HBox hbox2; + + private global::Gtk.Label lblProgress; + + private global::Gtk.ProgressBar prgProgress; + + private global::Gtk.HBox hbox3; + + private global::Gtk.Label lblProgress2; + + private global::Gtk.ProgressBar prgProgress2; + + private global::Gtk.HBox hbox1; + + private global::Gtk.Button btnAdd; + + private global::Gtk.Button btnRemove; + + private global::Gtk.Button btnQuit; + + private global::Gtk.Button btnSettings; + + private global::Gtk.Button btnHelp; + + private global::Gtk.Button btnSave; + + private global::Gtk.Button btnExtract; + + private global::Gtk.Button btnStop; + + protected virtual void Build() { + global::Stetic.Gui.Initialize(this); + // Widget osrepodbmgr.frmMain + this.Name = "osrepodbmgr.frmMain"; + this.Title = global::Mono.Unix.Catalog.GetString("OS Repository DB Manager"); + this.WindowPosition = ((global::Gtk.WindowPosition)(4)); + // Container child osrepodbmgr.frmMain.Gtk.Container+ContainerChild + this.vbox2 = new global::Gtk.VBox(); + this.vbox2.Name = "vbox2"; + this.vbox2.Spacing = 6; + // Container child vbox2.Gtk.Box+BoxChild + this.frame1 = new global::Gtk.Frame(); + this.frame1.Name = "frame1"; + this.frame1.ShadowType = ((global::Gtk.ShadowType)(0)); + // Container child frame1.Gtk.Container+ContainerChild + this.GtkAlignment = new global::Gtk.Alignment(0F, 0F, 1F, 1F); + this.GtkAlignment.Name = "GtkAlignment"; + this.GtkAlignment.LeftPadding = ((uint)(12)); + // Container child GtkAlignment.Gtk.Container+ContainerChild + this.GtkScrolledWindow = new global::Gtk.ScrolledWindow(); + this.GtkScrolledWindow.Name = "GtkScrolledWindow"; + this.GtkScrolledWindow.ShadowType = ((global::Gtk.ShadowType)(1)); + // Container child GtkScrolledWindow.Gtk.Container+ContainerChild + this.treeOSes = new global::Gtk.TreeView(); + this.treeOSes.Sensitive = false; + this.treeOSes.CanFocus = true; + this.treeOSes.Name = "treeOSes"; + this.GtkScrolledWindow.Add(this.treeOSes); + this.GtkAlignment.Add(this.GtkScrolledWindow); + this.frame1.Add(this.GtkAlignment); + this.lblOSes = new global::Gtk.Label(); + this.lblOSes.Name = "lblOSes"; + this.lblOSes.LabelProp = global::Mono.Unix.Catalog.GetString("Operating systems"); + this.lblOSes.UseMarkup = true; + this.frame1.LabelWidget = this.lblOSes; + this.vbox2.Add(this.frame1); + global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.frame1])); + w4.Position = 0; + // 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.lblProgress = new global::Gtk.Label(); + this.lblProgress.Name = "lblProgress"; + this.lblProgress.LabelProp = global::Mono.Unix.Catalog.GetString("label1"); + this.hbox2.Add(this.lblProgress); + global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.hbox2[this.lblProgress])); + w5.Position = 0; + w5.Expand = false; + w5.Fill = false; + // Container child hbox2.Gtk.Box+BoxChild + this.prgProgress = new global::Gtk.ProgressBar(); + this.prgProgress.Name = "prgProgress"; + this.hbox2.Add(this.prgProgress); + global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.hbox2[this.prgProgress])); + w6.Position = 1; + this.vbox2.Add(this.hbox2); + global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.hbox2])); + w7.Position = 1; + w7.Expand = false; + w7.Fill = false; + // 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.lblProgress2 = new global::Gtk.Label(); + this.lblProgress2.Name = "lblProgress2"; + this.lblProgress2.LabelProp = global::Mono.Unix.Catalog.GetString("label2"); + this.hbox3.Add(this.lblProgress2); + global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.hbox3[this.lblProgress2])); + w8.Position = 0; + w8.Expand = false; + w8.Fill = false; + // Container child hbox3.Gtk.Box+BoxChild + this.prgProgress2 = new global::Gtk.ProgressBar(); + this.prgProgress2.Name = "prgProgress2"; + this.hbox3.Add(this.prgProgress2); + global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.hbox3[this.prgProgress2])); + w9.Position = 1; + this.vbox2.Add(this.hbox3); + global::Gtk.Box.BoxChild w10 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.hbox3])); + w10.Position = 2; + w10.Expand = false; + w10.Fill = false; + // 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.btnAdd = new global::Gtk.Button(); + this.btnAdd.CanFocus = true; + this.btnAdd.Name = "btnAdd"; + this.btnAdd.UseStock = true; + this.btnAdd.UseUnderline = true; + this.btnAdd.Label = "gtk-add"; + this.hbox1.Add(this.btnAdd); + global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.btnAdd])); + w11.Position = 0; + w11.Expand = false; + w11.Fill = false; + // Container child hbox1.Gtk.Box+BoxChild + this.btnRemove = new global::Gtk.Button(); + this.btnRemove.CanFocus = true; + this.btnRemove.Name = "btnRemove"; + this.btnRemove.UseStock = true; + this.btnRemove.UseUnderline = true; + this.btnRemove.Label = "gtk-remove"; + this.hbox1.Add(this.btnRemove); + global::Gtk.Box.BoxChild w12 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.btnRemove])); + w12.Position = 1; + w12.Expand = false; + w12.Fill = false; + // Container child hbox1.Gtk.Box+BoxChild + this.btnQuit = new global::Gtk.Button(); + this.btnQuit.CanFocus = true; + this.btnQuit.Name = "btnQuit"; + this.btnQuit.UseStock = true; + this.btnQuit.UseUnderline = true; + this.btnQuit.Label = "gtk-quit"; + this.hbox1.Add(this.btnQuit); + global::Gtk.Box.BoxChild w13 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.btnQuit])); + w13.PackType = ((global::Gtk.PackType)(1)); + w13.Position = 2; + w13.Expand = false; + w13.Fill = false; + // Container child hbox1.Gtk.Box+BoxChild + this.btnSettings = new global::Gtk.Button(); + this.btnSettings.CanFocus = true; + this.btnSettings.Name = "btnSettings"; + this.btnSettings.UseUnderline = true; + this.btnSettings.Label = global::Mono.Unix.Catalog.GetString("_Settings"); + global::Gtk.Image w14 = new global::Gtk.Image(); + w14.Pixbuf = global::Stetic.IconLoader.LoadIcon(this, "gtk-preferences", global::Gtk.IconSize.Menu); + this.btnSettings.Image = w14; + this.hbox1.Add(this.btnSettings); + global::Gtk.Box.BoxChild w15 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.btnSettings])); + w15.PackType = ((global::Gtk.PackType)(1)); + w15.Position = 3; + w15.Expand = false; + w15.Fill = false; + // Container child hbox1.Gtk.Box+BoxChild + this.btnHelp = new global::Gtk.Button(); + this.btnHelp.CanFocus = true; + this.btnHelp.Name = "btnHelp"; + this.btnHelp.UseStock = true; + this.btnHelp.UseUnderline = true; + this.btnHelp.Label = "gtk-help"; + this.hbox1.Add(this.btnHelp); + global::Gtk.Box.BoxChild w16 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.btnHelp])); + w16.PackType = ((global::Gtk.PackType)(1)); + w16.Position = 4; + w16.Expand = false; + w16.Fill = false; + // Container child hbox1.Gtk.Box+BoxChild + this.btnSave = new global::Gtk.Button(); + this.btnSave.CanFocus = true; + this.btnSave.Name = "btnSave"; + this.btnSave.UseStock = true; + this.btnSave.UseUnderline = true; + this.btnSave.Label = "gtk-save-as"; + this.hbox1.Add(this.btnSave); + global::Gtk.Box.BoxChild w17 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.btnSave])); + w17.PackType = ((global::Gtk.PackType)(1)); + w17.Position = 5; + w17.Expand = false; + w17.Fill = false; + // Container child hbox1.Gtk.Box+BoxChild + this.btnExtract = new global::Gtk.Button(); + this.btnExtract.CanFocus = true; + this.btnExtract.Name = "btnExtract"; + this.btnExtract.UseUnderline = true; + this.btnExtract.Label = global::Mono.Unix.Catalog.GetString("Extract to"); + global::Gtk.Image w18 = new global::Gtk.Image(); + w18.Pixbuf = global::Stetic.IconLoader.LoadIcon(this, "gtk-directory", global::Gtk.IconSize.Menu); + this.btnExtract.Image = w18; + this.hbox1.Add(this.btnExtract); + global::Gtk.Box.BoxChild w19 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.btnExtract])); + w19.PackType = ((global::Gtk.PackType)(1)); + w19.Position = 6; + w19.Expand = false; + w19.Fill = false; + // Container child hbox1.Gtk.Box+BoxChild + this.btnStop = new global::Gtk.Button(); + this.btnStop.CanFocus = true; + this.btnStop.Name = "btnStop"; + this.btnStop.UseStock = true; + this.btnStop.UseUnderline = true; + this.btnStop.Label = "gtk-stop"; + this.hbox1.Add(this.btnStop); + global::Gtk.Box.BoxChild w20 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.btnStop])); + w20.PackType = ((global::Gtk.PackType)(1)); + w20.Position = 7; + w20.Expand = false; + w20.Fill = false; + this.vbox2.Add(this.hbox1); + global::Gtk.Box.BoxChild w21 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.hbox1])); + w21.Position = 3; + w21.Expand = false; + w21.Fill = false; + this.Add(this.vbox2); + if((this.Child != null)) + { + this.Child.ShowAll(); + } + this.DefaultWidth = 612; + this.DefaultHeight = 365; + this.lblProgress2.Hide(); + this.prgProgress2.Hide(); + this.btnAdd.Hide(); + this.btnRemove.Hide(); + this.btnSettings.Hide(); + this.btnHelp.Hide(); + this.btnSave.Hide(); + this.btnExtract.Hide(); + this.btnStop.Hide(); + this.Show(); + this.DeleteEvent += new global::Gtk.DeleteEventHandler(this.OnDeleteEvent); + this.btnAdd.Clicked += new global::System.EventHandler(this.OnBtnAddClicked); + this.btnRemove.Clicked += new global::System.EventHandler(this.OnBtnRemoveClicked); + this.btnStop.Clicked += new global::System.EventHandler(this.OnBtnStopClicked); + this.btnExtract.Clicked += new global::System.EventHandler(this.OnBtnExtractClicked); + this.btnSave.Clicked += new global::System.EventHandler(this.OnBtnSaveClicked); + this.btnHelp.Clicked += new global::System.EventHandler(this.OnBtnHelpClicked); + this.btnSettings.Clicked += new global::System.EventHandler(this.OnBtnSettingsClicked); + this.btnQuit.Clicked += new global::System.EventHandler(this.OnBtnQuitClicked); } } } diff --git a/osrepodbmgr/gtk-gui/osrepodbmgr.frmSettings.cs b/osrepodbmgr/gtk-gui/osrepodbmgr.frmSettings.cs index ef2f743..01b75a8 100644 --- a/osrepodbmgr/gtk-gui/osrepodbmgr.frmSettings.cs +++ b/osrepodbmgr/gtk-gui/osrepodbmgr.frmSettings.cs @@ -4,8 +4,6 @@ namespace osrepodbmgr { public partial class frmSettings { - private global::Gtk.VBox vbox5; - private global::Gtk.HBox hbox26; private global::Gtk.Label lblDatabase; @@ -52,17 +50,19 @@ namespace osrepodbmgr private global::Gtk.Button btnApply; + private global::Gtk.Button btnDialog; + protected virtual void Build() { global::Stetic.Gui.Initialize(this); // Widget osrepodbmgr.frmSettings this.Name = "osrepodbmgr.frmSettings"; - this.Title = global::Mono.Unix.Catalog.GetString("frmSettings"); + this.Title = global::Mono.Unix.Catalog.GetString("Settings"); this.WindowPosition = ((global::Gtk.WindowPosition)(4)); - // Container child osrepodbmgr.frmSettings.Gtk.Container+ContainerChild - this.vbox5 = new global::Gtk.VBox(); - this.vbox5.Name = "vbox5"; - this.vbox5.Spacing = 6; + // Internal child osrepodbmgr.frmSettings.VBox + global::Gtk.VBox w1 = this.VBox; + w1.Name = "vbox5"; + w1.Spacing = 6; // Container child vbox5.Gtk.Box+BoxChild this.hbox26 = new global::Gtk.HBox(); this.hbox26.Name = "hbox26"; @@ -72,10 +72,10 @@ namespace osrepodbmgr this.lblDatabase.Name = "lblDatabase"; this.lblDatabase.LabelProp = global::Mono.Unix.Catalog.GetString("Database file"); this.hbox26.Add(this.lblDatabase); - global::Gtk.Box.BoxChild w1 = ((global::Gtk.Box.BoxChild)(this.hbox26[this.lblDatabase])); - w1.Position = 0; - w1.Expand = false; - w1.Fill = false; + global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.hbox26[this.lblDatabase])); + w2.Position = 0; + w2.Expand = false; + w2.Fill = false; // Container child hbox26.Gtk.Box+BoxChild this.txtDatabase = new global::Gtk.Entry(); this.txtDatabase.CanFocus = true; @@ -83,27 +83,27 @@ namespace osrepodbmgr this.txtDatabase.IsEditable = true; this.txtDatabase.InvisibleChar = '●'; this.hbox26.Add(this.txtDatabase); - global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.hbox26[this.txtDatabase])); - w2.Position = 1; + global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.hbox26[this.txtDatabase])); + w3.Position = 1; // Container child hbox26.Gtk.Box+BoxChild this.btnDatabase = new global::Gtk.Button(); this.btnDatabase.CanFocus = true; this.btnDatabase.Name = "btnDatabase"; this.btnDatabase.UseUnderline = true; this.btnDatabase.Label = global::Mono.Unix.Catalog.GetString("Choose"); - global::Gtk.Image w3 = new global::Gtk.Image(); - w3.Pixbuf = global::Stetic.IconLoader.LoadIcon(this, "gtk-open", global::Gtk.IconSize.Menu); - this.btnDatabase.Image = w3; + global::Gtk.Image w4 = new global::Gtk.Image(); + w4.Pixbuf = global::Stetic.IconLoader.LoadIcon(this, "gtk-open", global::Gtk.IconSize.Menu); + this.btnDatabase.Image = w4; this.hbox26.Add(this.btnDatabase); - global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.hbox26[this.btnDatabase])); - w4.Position = 2; - w4.Expand = false; - w4.Fill = false; - this.vbox5.Add(this.hbox26); - global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.vbox5[this.hbox26])); - w5.Position = 0; + global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.hbox26[this.btnDatabase])); + w5.Position = 2; w5.Expand = false; w5.Fill = false; + w1.Add(this.hbox26); + global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(w1[this.hbox26])); + w6.Position = 0; + w6.Expand = false; + w6.Fill = false; // Container child vbox5.Gtk.Box+BoxChild this.hbox25 = new global::Gtk.HBox(); this.hbox25.Name = "hbox25"; @@ -113,10 +113,10 @@ namespace osrepodbmgr this.lblRepository.Name = "lblRepository"; this.lblRepository.LabelProp = global::Mono.Unix.Catalog.GetString("Repository folder"); this.hbox25.Add(this.lblRepository); - global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.hbox25[this.lblRepository])); - w6.Position = 0; - w6.Expand = false; - w6.Fill = false; + global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.hbox25[this.lblRepository])); + w7.Position = 0; + w7.Expand = false; + w7.Fill = false; // Container child hbox25.Gtk.Box+BoxChild this.txtRepository = new global::Gtk.Entry(); this.txtRepository.CanFocus = true; @@ -124,27 +124,27 @@ namespace osrepodbmgr this.txtRepository.IsEditable = true; this.txtRepository.InvisibleChar = '●'; this.hbox25.Add(this.txtRepository); - global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.hbox25[this.txtRepository])); - w7.Position = 1; + global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.hbox25[this.txtRepository])); + w8.Position = 1; // Container child hbox25.Gtk.Box+BoxChild this.btnRepository = new global::Gtk.Button(); this.btnRepository.CanFocus = true; this.btnRepository.Name = "btnRepository"; this.btnRepository.UseUnderline = true; this.btnRepository.Label = global::Mono.Unix.Catalog.GetString("Choose"); - global::Gtk.Image w8 = new global::Gtk.Image(); - w8.Pixbuf = global::Stetic.IconLoader.LoadIcon(this, "gtk-open", global::Gtk.IconSize.Menu); - this.btnRepository.Image = w8; + global::Gtk.Image w9 = new global::Gtk.Image(); + w9.Pixbuf = global::Stetic.IconLoader.LoadIcon(this, "gtk-open", global::Gtk.IconSize.Menu); + this.btnRepository.Image = w9; this.hbox25.Add(this.btnRepository); - global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.hbox25[this.btnRepository])); - w9.Position = 2; - w9.Expand = false; - w9.Fill = false; - this.vbox5.Add(this.hbox25); - global::Gtk.Box.BoxChild w10 = ((global::Gtk.Box.BoxChild)(this.vbox5[this.hbox25])); - w10.Position = 1; + global::Gtk.Box.BoxChild w10 = ((global::Gtk.Box.BoxChild)(this.hbox25[this.btnRepository])); + w10.Position = 2; w10.Expand = false; w10.Fill = false; + w1.Add(this.hbox25); + global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(w1[this.hbox25])); + w11.Position = 1; + w11.Expand = false; + w11.Fill = false; // Container child vbox5.Gtk.Box+BoxChild this.hbox24 = new global::Gtk.HBox(); this.hbox24.Name = "hbox24"; @@ -154,10 +154,10 @@ namespace osrepodbmgr this.lblTmp.Name = "lblTmp"; this.lblTmp.LabelProp = global::Mono.Unix.Catalog.GetString("Temporary folder"); this.hbox24.Add(this.lblTmp); - global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(this.hbox24[this.lblTmp])); - w11.Position = 0; - w11.Expand = false; - w11.Fill = false; + global::Gtk.Box.BoxChild w12 = ((global::Gtk.Box.BoxChild)(this.hbox24[this.lblTmp])); + w12.Position = 0; + w12.Expand = false; + w12.Fill = false; // Container child hbox24.Gtk.Box+BoxChild this.txtTmp = new global::Gtk.Entry(); this.txtTmp.CanFocus = true; @@ -165,27 +165,27 @@ namespace osrepodbmgr this.txtTmp.IsEditable = true; this.txtTmp.InvisibleChar = '●'; this.hbox24.Add(this.txtTmp); - global::Gtk.Box.BoxChild w12 = ((global::Gtk.Box.BoxChild)(this.hbox24[this.txtTmp])); - w12.Position = 1; + global::Gtk.Box.BoxChild w13 = ((global::Gtk.Box.BoxChild)(this.hbox24[this.txtTmp])); + w13.Position = 1; // Container child hbox24.Gtk.Box+BoxChild this.btnTmp = new global::Gtk.Button(); this.btnTmp.CanFocus = true; this.btnTmp.Name = "btnTmp"; this.btnTmp.UseUnderline = true; this.btnTmp.Label = global::Mono.Unix.Catalog.GetString("Choose"); - global::Gtk.Image w13 = new global::Gtk.Image(); - w13.Pixbuf = global::Stetic.IconLoader.LoadIcon(this, "gtk-open", global::Gtk.IconSize.Menu); - this.btnTmp.Image = w13; + global::Gtk.Image w14 = new global::Gtk.Image(); + w14.Pixbuf = global::Stetic.IconLoader.LoadIcon(this, "gtk-open", global::Gtk.IconSize.Menu); + this.btnTmp.Image = w14; this.hbox24.Add(this.btnTmp); - global::Gtk.Box.BoxChild w14 = ((global::Gtk.Box.BoxChild)(this.hbox24[this.btnTmp])); - w14.Position = 2; - w14.Expand = false; - w14.Fill = false; - this.vbox5.Add(this.hbox24); - global::Gtk.Box.BoxChild w15 = ((global::Gtk.Box.BoxChild)(this.vbox5[this.hbox24])); + global::Gtk.Box.BoxChild w15 = ((global::Gtk.Box.BoxChild)(this.hbox24[this.btnTmp])); w15.Position = 2; w15.Expand = false; w15.Fill = false; + w1.Add(this.hbox24); + global::Gtk.Box.BoxChild w16 = ((global::Gtk.Box.BoxChild)(w1[this.hbox24])); + w16.Position = 2; + w16.Expand = false; + w16.Fill = false; // Container child vbox5.Gtk.Box+BoxChild this.hbox23 = new global::Gtk.HBox(); this.hbox23.Name = "hbox23"; @@ -195,10 +195,10 @@ namespace osrepodbmgr this.lblUnar.Name = "lblUnar"; this.lblUnar.LabelProp = global::Mono.Unix.Catalog.GetString("Path to unar"); this.hbox23.Add(this.lblUnar); - global::Gtk.Box.BoxChild w16 = ((global::Gtk.Box.BoxChild)(this.hbox23[this.lblUnar])); - w16.Position = 0; - w16.Expand = false; - w16.Fill = false; + global::Gtk.Box.BoxChild w17 = ((global::Gtk.Box.BoxChild)(this.hbox23[this.lblUnar])); + w17.Position = 0; + w17.Expand = false; + w17.Fill = false; // Container child hbox23.Gtk.Box+BoxChild this.txtUnar = new global::Gtk.Entry(); this.txtUnar.CanFocus = true; @@ -206,36 +206,36 @@ namespace osrepodbmgr this.txtUnar.IsEditable = true; this.txtUnar.InvisibleChar = '●'; this.hbox23.Add(this.txtUnar); - global::Gtk.Box.BoxChild w17 = ((global::Gtk.Box.BoxChild)(this.hbox23[this.txtUnar])); - w17.Position = 1; + global::Gtk.Box.BoxChild w18 = ((global::Gtk.Box.BoxChild)(this.hbox23[this.txtUnar])); + w18.Position = 1; // Container child hbox23.Gtk.Box+BoxChild this.btnUnar = new global::Gtk.Button(); this.btnUnar.CanFocus = true; this.btnUnar.Name = "btnUnar"; this.btnUnar.UseUnderline = true; this.btnUnar.Label = global::Mono.Unix.Catalog.GetString("Choose"); - global::Gtk.Image w18 = new global::Gtk.Image(); - w18.Pixbuf = global::Stetic.IconLoader.LoadIcon(this, "gtk-open", global::Gtk.IconSize.Menu); - this.btnUnar.Image = w18; + global::Gtk.Image w19 = new global::Gtk.Image(); + w19.Pixbuf = global::Stetic.IconLoader.LoadIcon(this, "gtk-open", global::Gtk.IconSize.Menu); + this.btnUnar.Image = w19; this.hbox23.Add(this.btnUnar); - global::Gtk.Box.BoxChild w19 = ((global::Gtk.Box.BoxChild)(this.hbox23[this.btnUnar])); - w19.Position = 2; - w19.Expand = false; - w19.Fill = false; - this.vbox5.Add(this.hbox23); - global::Gtk.Box.BoxChild w20 = ((global::Gtk.Box.BoxChild)(this.vbox5[this.hbox23])); - w20.Position = 3; + global::Gtk.Box.BoxChild w20 = ((global::Gtk.Box.BoxChild)(this.hbox23[this.btnUnar])); + w20.Position = 2; w20.Expand = false; w20.Fill = false; + w1.Add(this.hbox23); + global::Gtk.Box.BoxChild w21 = ((global::Gtk.Box.BoxChild)(w1[this.hbox23])); + w21.Position = 3; + w21.Expand = false; + w21.Fill = false; // Container child vbox5.Gtk.Box+BoxChild this.lblUnarVersion = new global::Gtk.Label(); this.lblUnarVersion.Name = "lblUnarVersion"; this.lblUnarVersion.LabelProp = global::Mono.Unix.Catalog.GetString("label1"); - this.vbox5.Add(this.lblUnarVersion); - global::Gtk.Box.BoxChild w21 = ((global::Gtk.Box.BoxChild)(this.vbox5[this.lblUnarVersion])); - w21.Position = 4; - w21.Expand = false; - w21.Fill = false; + w1.Add(this.lblUnarVersion); + global::Gtk.Box.BoxChild w22 = ((global::Gtk.Box.BoxChild)(w1[this.lblUnarVersion])); + w22.Position = 4; + w22.Expand = false; + w22.Fill = false; // Container child vbox5.Gtk.Box+BoxChild this.hbox1 = new global::Gtk.HBox(); this.hbox1.Name = "hbox1"; @@ -245,23 +245,23 @@ namespace osrepodbmgr this.lblCompAlg.Name = "lblCompAlg"; this.lblCompAlg.LabelProp = global::Mono.Unix.Catalog.GetString("Compression algorithm"); this.hbox1.Add(this.lblCompAlg); - global::Gtk.Box.BoxChild w22 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.lblCompAlg])); - w22.Position = 0; - w22.Expand = false; - w22.Fill = false; + global::Gtk.Box.BoxChild w23 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.lblCompAlg])); + w23.Position = 0; + w23.Expand = false; + w23.Fill = false; // Container child hbox1.Gtk.Box+BoxChild this.cmbCompAlg = global::Gtk.ComboBox.NewText(); this.cmbCompAlg.Name = "cmbCompAlg"; this.hbox1.Add(this.cmbCompAlg); - global::Gtk.Box.BoxChild w23 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.cmbCompAlg])); - w23.Position = 1; - w23.Expand = false; - w23.Fill = false; - this.vbox5.Add(this.hbox1); - global::Gtk.Box.BoxChild w24 = ((global::Gtk.Box.BoxChild)(this.vbox5[this.hbox1])); - w24.Position = 5; + global::Gtk.Box.BoxChild w24 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.cmbCompAlg])); + w24.Position = 1; w24.Expand = false; w24.Fill = false; + w1.Add(this.hbox1); + global::Gtk.Box.BoxChild w25 = ((global::Gtk.Box.BoxChild)(w1[this.hbox1])); + w25.Position = 5; + w25.Expand = false; + w25.Fill = false; // Container child vbox5.Gtk.Box+BoxChild this.hbox18 = new global::Gtk.HBox(); this.hbox18.Name = "hbox18"; @@ -274,10 +274,10 @@ namespace osrepodbmgr this.btnCancel.UseUnderline = true; this.btnCancel.Label = "gtk-cancel"; this.hbox18.Add(this.btnCancel); - global::Gtk.Box.BoxChild w25 = ((global::Gtk.Box.BoxChild)(this.hbox18[this.btnCancel])); - w25.Position = 0; - w25.Expand = false; - w25.Fill = false; + global::Gtk.Box.BoxChild w26 = ((global::Gtk.Box.BoxChild)(this.hbox18[this.btnCancel])); + w26.Position = 0; + w26.Expand = false; + w26.Fill = false; // Container child hbox18.Gtk.Box+BoxChild this.btnApply = new global::Gtk.Button(); this.btnApply.CanFocus = true; @@ -286,24 +286,37 @@ namespace osrepodbmgr this.btnApply.UseUnderline = true; this.btnApply.Label = "gtk-apply"; this.hbox18.Add(this.btnApply); - global::Gtk.Box.BoxChild w26 = ((global::Gtk.Box.BoxChild)(this.hbox18[this.btnApply])); - w26.PackType = ((global::Gtk.PackType)(1)); - w26.Position = 1; - w26.Expand = false; - w26.Fill = false; - this.vbox5.Add(this.hbox18); - global::Gtk.Box.BoxChild w27 = ((global::Gtk.Box.BoxChild)(this.vbox5[this.hbox18])); - w27.Position = 6; + global::Gtk.Box.BoxChild w27 = ((global::Gtk.Box.BoxChild)(this.hbox18[this.btnApply])); + w27.PackType = ((global::Gtk.PackType)(1)); + w27.Position = 1; w27.Expand = false; w27.Fill = false; - this.Add(this.vbox5); + w1.Add(this.hbox18); + global::Gtk.Box.BoxChild w28 = ((global::Gtk.Box.BoxChild)(w1[this.hbox18])); + w28.Position = 6; + w28.Expand = false; + w28.Fill = false; + // Internal child osrepodbmgr.frmSettings.ActionArea + global::Gtk.HButtonBox w29 = this.ActionArea; + w29.Name = "__gtksharp_108_Stetic_TopLevelDialog_ActionArea"; + // Container child __gtksharp_108_Stetic_TopLevelDialog_ActionArea.Gtk.ButtonBox+ButtonBoxChild + this.btnDialog = new global::Gtk.Button(); + this.btnDialog.CanFocus = true; + this.btnDialog.Name = "btnDialog"; + this.btnDialog.UseUnderline = true; + this.btnDialog.Label = global::Mono.Unix.Catalog.GetString("GtkButton"); + this.AddActionWidget(this.btnDialog, 0); + global::Gtk.ButtonBox.ButtonBoxChild w30 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w29[this.btnDialog])); + w30.Expand = false; + w30.Fill = false; if((this.Child != null)) { this.Child.ShowAll(); } this.DefaultWidth = 400; - this.DefaultHeight = 210; + this.DefaultHeight = 250; this.lblUnarVersion.Hide(); + w29.Hide(); this.Show(); this.btnDatabase.Clicked += new global::System.EventHandler(this.OnBtnDatabaseClicked); this.btnRepository.Clicked += new global::System.EventHandler(this.OnBtnRepositoryClicked); diff --git a/osrepodbmgr/osrepodbmgr.csproj b/osrepodbmgr/osrepodbmgr.csproj index 5ce3de0..7184b54 100644 --- a/osrepodbmgr/osrepodbmgr.csproj +++ b/osrepodbmgr/osrepodbmgr.csproj @@ -80,6 +80,8 @@ + +