removed some old debug WriteLines, added a message dialogue for invalid URLs

This commit is contained in:
Lynne Megido 2020-09-05 17:40:28 +10:00
parent 00c974d48a
commit ef75c63aa2
Signed by: lynnesbian
GPG key ID: F0A184B5213D9F90

View file

@ -131,8 +131,6 @@ namespace Buypeeb {
item.originalName.ToLower().Contains(this.searchEntry.Text.ToLower())) item.originalName.ToLower().Contains(this.searchEntry.Text.ToLower()))
select item; select item;
Console.WriteLine(this.filterChecks["Favourites"].Active);
// bind treeview columns to watchlist instead of needing to manually sync its liststore // bind treeview columns to watchlist instead of needing to manually sync its liststore
this.itemTreeView = (TreeView)builder.GetObject("TreeViewItems"); this.itemTreeView = (TreeView)builder.GetObject("TreeViewItems");
this.items = new ListStore(typeof(YahooAuctionsItem)); this.items = new ListStore(typeof(YahooAuctionsItem));
@ -176,7 +174,6 @@ namespace Buypeeb {
for (int i = 0; i < this.itemTreeView.Model.IterNChildren(); i++) { for (int i = 0; i < this.itemTreeView.Model.IterNChildren(); i++) {
var x = (YahooAuctionsItem)this.itemTreeView.Model.GetValue(iter, 0); var x = (YahooAuctionsItem)this.itemTreeView.Model.GetValue(iter, 0);
Console.WriteLine(x);
if (x.id == id) { if (x.id == id) {
return (m.ConvertPathToChildPath(m.GetPath(iter)), m.ConvertIterToChildIter(iter)); return (m.ConvertPathToChildPath(m.GetPath(iter)), m.ConvertIterToChildIter(iter));
} }
@ -423,12 +420,13 @@ namespace Buypeeb {
// vry simpl url validation for simpol creachers // vry simpl url validation for simpol creachers
Regex rx = new Regex(@"^http.+yahoo.+"); Regex rx = new Regex(@"^http.+yahoo.+");
if (rx.IsMatch(url)) { if (rx.IsMatch(url)) {
Console.WriteLine("{0} will be added", url);
this.UpdateItem(this.settings.Watch(url, name).id); this.UpdateItem(this.settings.Watch(url, name).id);
this.RenderList(); this.RenderList();
} }
else { else {
Console.WriteLine("{0} is an invalid url", url); var md = this.MsgBox($"\"{url}\" is not a valid Buyee or Yahoo! Auctions Japan URL.");
md.Run();
md.Dispose();
} }
} }
@ -437,7 +435,6 @@ namespace Buypeeb {
} }
private void ButtonClearEndedClicked(object sender, EventArgs a) { private void ButtonClearEndedClicked(object sender, EventArgs a) {
Console.WriteLine("ButtonClearEndedClicked");
var md = this.MsgBox("Are you sure you want to remove all ended auctions from the list?"); var md = this.MsgBox("Are you sure you want to remove all ended auctions from the list?");
var r = (ResponseType)md.Run(); var r = (ResponseType)md.Run();
md.Dispose(); md.Dispose();
@ -738,7 +735,6 @@ namespace Buypeeb {
return false; return false;
} }
// this.filterQuery.ToList().ForEach(Console.WriteLine);
return this.filterQuery.Contains(item); return this.filterQuery.Contains(item);
} }