mirror of
https://github.com/claunia/apprepodbmgr.git
synced 2025-12-16 19:24:42 +00:00
Do not color OS tables. Has no sense to be on the opaque repo.
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
2017-05-19 Natalia Portillo <claunia@claunia.com>
|
||||
|
||||
* 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 <claunia@claunia.com>
|
||||
|
||||
* DBOps.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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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<DBFile> file);
|
||||
public delegate void ScanFinishedDelegate(DBFile file);
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
2017-05-19 Natalia Portillo <claunia@claunia.com>
|
||||
|
||||
* 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 <claunia@claunia.com>
|
||||
|
||||
* frmMain.xeto:
|
||||
|
||||
@@ -482,7 +482,7 @@ namespace osrepodbmgr.Eto
|
||||
});
|
||||
}
|
||||
|
||||
void AddOS(DBEntry os, bool existsInRepo, string pathInRepo)
|
||||
void AddOS(DBEntry os)
|
||||
{
|
||||
Application.Instance.Invoke(delegate
|
||||
{
|
||||
|
||||
@@ -320,7 +320,7 @@ namespace osrepodbmgr.Eto
|
||||
});
|
||||
}
|
||||
|
||||
void AddOS(DBEntry os, bool existsInRepo, string pathInRepo)
|
||||
void AddOS(DBEntry os)
|
||||
{
|
||||
Application.Instance.Invoke(delegate
|
||||
{
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
2017-05-19 Natalia Portillo <claunia@claunia.com>
|
||||
|
||||
* 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 <claunia@claunia.com>
|
||||
|
||||
* frmMain.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);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user