diff --git a/osrepodbmgr.Core/ChangeLog b/osrepodbmgr.Core/ChangeLog index 20ec660..156fcd2 100644 --- a/osrepodbmgr.Core/ChangeLog +++ b/osrepodbmgr.Core/ChangeLog @@ -1,3 +1,10 @@ +2017-05-19 Natalia Portillo + + * Workers/Database.cs: + * Workers/Delegates.cs: + Do not color OS tables. Has no sense to be on the opaque + repo. + 2017-05-19 Natalia Portillo * DBOps.cs: diff --git a/osrepodbmgr.Core/Workers/Database.cs b/osrepodbmgr.Core/Workers/Database.cs index cc94cfc..5140f3c 100644 --- a/osrepodbmgr.Core/Workers/Database.cs +++ b/osrepodbmgr.Core/Workers/Database.cs @@ -64,7 +64,7 @@ namespace osrepodbmgr.Core os.mdid[4].ToString(), os.mdid) + ".zip"; if(AddOS != null) - AddOS(os, File.Exists(destination), destination); + AddOS(os); counter++; } @@ -169,7 +169,7 @@ namespace osrepodbmgr.Core os.mdid[4].ToString(), os.mdid) + ".zip"; if(AddOS != null) - AddOS(os, File.Exists(destination), destination); + AddOS(os); } } diff --git a/osrepodbmgr.Core/Workers/Delegates.cs b/osrepodbmgr.Core/Workers/Delegates.cs index 0c88139..91a3829 100644 --- a/osrepodbmgr.Core/Workers/Delegates.cs +++ b/osrepodbmgr.Core/Workers/Delegates.cs @@ -38,7 +38,7 @@ namespace osrepodbmgr.Core public delegate void FinishedWithoutErrorDelegate(); public delegate void FinishedWithTextDelegate(string text); public delegate void AddFileForOSDelegate(string filename, string hash, bool known, bool isCrack); - public delegate void AddOSDelegate(DBEntry os, bool existsInRepo, string pathInRepo); + public delegate void AddOSDelegate(DBEntry os); public delegate void AddFileDelegate(DBFile file); public delegate void AddFilesDelegate(List file); public delegate void ScanFinishedDelegate(DBFile file); diff --git a/osrepodbmgr.Eto/ChangeLog b/osrepodbmgr.Eto/ChangeLog index 7f49fb9..2c1bc4e 100644 --- a/osrepodbmgr.Eto/ChangeLog +++ b/osrepodbmgr.Eto/ChangeLog @@ -1,3 +1,10 @@ +2017-05-19 Natalia Portillo + + * dlgAdd.xeto.cs: + * frmMain.xeto.cs: + Do not color OS tables. Has no sense to be on the opaque + repo. + 2017-05-19 Natalia Portillo * frmMain.xeto: diff --git a/osrepodbmgr.Eto/dlgAdd.xeto.cs b/osrepodbmgr.Eto/dlgAdd.xeto.cs index e435e7e..c320a90 100644 --- a/osrepodbmgr.Eto/dlgAdd.xeto.cs +++ b/osrepodbmgr.Eto/dlgAdd.xeto.cs @@ -482,7 +482,7 @@ namespace osrepodbmgr.Eto }); } - void AddOS(DBEntry os, bool existsInRepo, string pathInRepo) + void AddOS(DBEntry os) { Application.Instance.Invoke(delegate { diff --git a/osrepodbmgr.Eto/frmMain.xeto.cs b/osrepodbmgr.Eto/frmMain.xeto.cs index 08dc55d..bf7648a 100644 --- a/osrepodbmgr.Eto/frmMain.xeto.cs +++ b/osrepodbmgr.Eto/frmMain.xeto.cs @@ -320,7 +320,7 @@ namespace osrepodbmgr.Eto }); } - void AddOS(DBEntry os, bool existsInRepo, string pathInRepo) + void AddOS(DBEntry os) { Application.Instance.Invoke(delegate { diff --git a/osrepodbmgr/ChangeLog b/osrepodbmgr/ChangeLog index 67df9f3..c0d8a5b 100644 --- a/osrepodbmgr/ChangeLog +++ b/osrepodbmgr/ChangeLog @@ -1,3 +1,12 @@ +2017-05-19 Natalia Portillo + + * dlgAdd.cs: + * frmMain.cs: + * gtk-gui/dlgAdd.cs: + * gtk-gui/osrepodbmgr.frmMain.cs: + Do not color OS tables. Has no sense to be on the opaque + repo. + 2017-05-19 Natalia Portillo * frmMain.cs: diff --git a/osrepodbmgr/dlgAdd.cs b/osrepodbmgr/dlgAdd.cs index c7e0eb2..1aae588 100644 --- a/osrepodbmgr/dlgAdd.cs +++ b/osrepodbmgr/dlgAdd.cs @@ -95,26 +95,24 @@ public partial class dlgAdd : Dialog 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 developerColumn = new TreeViewColumn("Developer", developerCell, "text", 0); + TreeViewColumn productColumn = new TreeViewColumn("Product", productCell, "text", 1); + TreeViewColumn versionColumn = new TreeViewColumn("Version", versionCell, "text", 2); + TreeViewColumn languagesColumn = new TreeViewColumn("Languages", languagesCell, "text", 3); + TreeViewColumn architectureColumn = new TreeViewColumn("Architecture", architectureCell, "text", 4); + TreeViewColumn machineColumn = new TreeViewColumn("Machine", machineCell, "text", 5); + TreeViewColumn formatColumn = new TreeViewColumn("Format", formatCell, "text", 6); + TreeViewColumn descriptionColumn = new TreeViewColumn("Description", descriptionCell, "text", 7); 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(bool), typeof(bool), typeof(bool), typeof(bool), typeof(bool), typeof(bool)); treeOSes.Model = osView; treeOSes.AppendColumn(developerColumn); @@ -131,7 +129,6 @@ public partial class dlgAdd : Dialog treeOSes.AppendColumn(sourceColumn); treeOSes.AppendColumn(filesColumn); treeOSes.AppendColumn(netinstallColumn); - treeOSes.AppendColumn(pathColumn); treeFiles.Selection.Changed += treeFilesSelectionChanged; } @@ -440,15 +437,14 @@ public partial class dlgAdd : Dialog }); } - void AddOS(DBEntry os, bool existsInRepo, string pathInRepo) + void AddOS(DBEntry os) { Application.Invoke(delegate { - string color = existsInRepo ? "green" : "red"; tabTabs.GetNthPage(1).Visible = true; 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.files, os.netinstall); }); } diff --git a/osrepodbmgr/frmMain.cs b/osrepodbmgr/frmMain.cs index ed7c27b..32ded3c 100644 --- a/osrepodbmgr/frmMain.cs +++ b/osrepodbmgr/frmMain.cs @@ -70,27 +70,24 @@ namespace osrepodbmgr 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 developerColumn = new TreeViewColumn("Developer", developerCell, "text", 0); + TreeViewColumn productColumn = new TreeViewColumn("Product", productCell, "text", 1); + TreeViewColumn versionColumn = new TreeViewColumn("Version", versionCell, "text", 2); + TreeViewColumn languagesColumn = new TreeViewColumn("Languages", languagesCell, "text", 3); + TreeViewColumn architectureColumn = new TreeViewColumn("Architecture", architectureCell, "text", 4); + TreeViewColumn machineColumn = new TreeViewColumn("Machine", machineCell, "text", 5); + TreeViewColumn formatColumn = new TreeViewColumn("Format", formatCell, "text", 6); + TreeViewColumn descriptionColumn = new TreeViewColumn("Description", descriptionCell, "text"); 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)); + typeof(bool), typeof(bool), typeof(bool), typeof(bool), typeof(bool), typeof(bool), typeof(long), typeof(string)); treeOSes.Model = osView; treeOSes.AppendColumn(developerColumn); @@ -107,7 +104,6 @@ namespace osrepodbmgr treeOSes.AppendColumn(sourceColumn); treeOSes.AppendColumn(filesColumn); treeOSes.AppendColumn(netinstallColumn); - treeOSes.AppendColumn(pathColumn); treeOSes.Selection.Mode = SelectionMode.Single; @@ -241,7 +237,7 @@ namespace osrepodbmgr }); } - void AddOS(DBEntry os, bool existsInRepo, string pathInRepo) + void AddOS(DBEntry os) { Application.Invoke(delegate { @@ -251,10 +247,9 @@ namespace osrepodbmgr 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); + os.files, os.netinstall, os.id, os.mdid); }); } @@ -266,7 +261,7 @@ namespace osrepodbmgr 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); + os.files, os.netinstall, os.id, os.mdid); }; _dlgAdd.Run(); _dlgAdd.Destroy(); @@ -282,7 +277,7 @@ namespace osrepodbmgr if(dlgMsg.Run() == (int)ResponseType.Yes) { - Workers.RemoveOS((long)osView.GetValue(osIter, 17), (string)osView.GetValue(osIter, 18)); + Workers.RemoveOS((long)osView.GetValue(osIter, 14), (string)osView.GetValue(osIter, 15)); osView.Remove(ref osIter); } @@ -295,7 +290,7 @@ namespace osrepodbmgr TreeIter osIter; if(treeOSes.Selection.GetSelected(out osIter)) { - Context.dbInfo.id = (long)osView.GetValue(osIter, 17); + Context.dbInfo.id = (long)osView.GetValue(osIter, 14); FileChooserDialog dlgFolder = new FileChooserDialog("Save to...", this, FileChooserAction.SelectFolder, "Cancel", ResponseType.Cancel, "Choose", ResponseType.Accept); @@ -481,7 +476,7 @@ namespace osrepodbmgr TreeIter osIter; if(treeOSes.Selection.GetSelected(out osIter)) { - Context.dbInfo.id = (long)osView.GetValue(osIter, 17); + Context.dbInfo.id = (long)osView.GetValue(osIter, 14); FileChooserDialog dlgFolder = new FileChooserDialog("Compress to...", this, FileChooserAction.Save, "Cancel", ResponseType.Cancel, "Choose", ResponseType.Accept); diff --git a/osrepodbmgr/gtk-gui/dlgAdd.cs b/osrepodbmgr/gtk-gui/dlgAdd.cs index bb08b6e..91f1751 100644 --- a/osrepodbmgr/gtk-gui/dlgAdd.cs +++ b/osrepodbmgr/gtk-gui/dlgAdd.cs @@ -685,7 +685,7 @@ public partial class dlgAdd global::Gtk.ButtonBox.ButtonBoxChild w62 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w61[this.btnDialog])); w62.Expand = false; w62.Fill = false; - if((this.Child != null)) + if ((this.Child != null)) { this.Child.ShowAll(); } diff --git a/osrepodbmgr/gtk-gui/osrepodbmgr.frmMain.cs b/osrepodbmgr/gtk-gui/osrepodbmgr.frmMain.cs index dc2db2b..cad06b2 100644 --- a/osrepodbmgr/gtk-gui/osrepodbmgr.frmMain.cs +++ b/osrepodbmgr/gtk-gui/osrepodbmgr.frmMain.cs @@ -97,7 +97,7 @@ namespace osrepodbmgr this.notebook1 = new global::Gtk.Notebook(); this.notebook1.CanFocus = true; this.notebook1.Name = "notebook1"; - this.notebook1.CurrentPage = 1; + this.notebook1.CurrentPage = 0; // Container child notebook1.Gtk.Notebook+NotebookChild this.vbox3 = new global::Gtk.VBox(); this.vbox3.Name = "vbox3"; @@ -426,6 +426,8 @@ namespace osrepodbmgr global::Gtk.Box.BoxChild w35 = ((global::Gtk.Box.BoxChild)(this.hbox6[this.btnCleanFiles])); w35.PackType = ((global::Gtk.PackType)(1)); w35.Position = 5; + w35.Expand = false; + w35.Fill = false; // Container child hbox6.Gtk.Box+BoxChild this.btnStopFiles = new global::Gtk.Button(); this.btnStopFiles.CanFocus = true;