Compare commits

..

No commits in common. "7bff17c859ce6e22d0c3050095ff5bfa84083d3e" and "562b1330c96eb99c992bf03f1a10ece800318b6a" have entirely different histories.

6 changed files with 131 additions and 289 deletions

1
.gitignore vendored
View file

@ -4,4 +4,3 @@ BuypeebApp.exe
bin/ bin/
obj/ obj/
out/ out/
yahoo.html

View file

@ -1,4 +0,0 @@
{
"editor.tabSize": 2,
"editor.insertSpaces": false
}

View file

@ -1,75 +1,32 @@
using System; using System;
using System.Globalization; using System.Globalization;
using System.Text.RegularExpressions;
using System.Collections.Generic;
using System.Text.Json;
namespace Buypeeb { namespace Buypeeb {
class Listing { class Listing {
public string url { public string url { get; set; }
get {
return $"https://page.auctions.yahoo.co.jp/jp/auction/{this.id}";
}
}
public string id { get; set; } public string id { get; set; }
public string name { get; set; } public string name { get; set; }
public int price = 0; public int price;
public int win_price; public int win_price;
public string original_name; public string original_name;
public bool favourite { get; set; } = false; public bool favourite { get; set; } = false;
// start_date, end_date // start_date, end_date
public int bids; public int bids;
public bool auto_extension; public bool auto_extension;
public bool ready;
private bool success { get; set; } // TODO: custom setter that throws an exception if set to false or something idk public Listing(string url, string id, string name) {
this.url = url;
public Listing(string id, string name) {
this.id = id; this.id = id;
this.name = name; this.name = name;
this.ready = false;
} }
public Listing() { public void Update() {
// parameterless constructor for deserialisation // use fake values for now
} var rnd = new Random();
this.price = rnd.Next(100, 5000);
public void Update(string html) { this.bids = rnd.Next(0, 15);
var rx = new Regex(@"var pageData ?= ?(\{.+?\});", RegexOptions.Singleline); // TODO: maybe compile and match the regex in another thread this.name = "testing";
var m = rx.Match(html); this.original_name = "testing";
if (m == null) {
Console.WriteLine("no sir i don't like it");
return;
}
Dictionary<string, Dictionary<string, string>> j_full;
try {
// master forgive me, but i must go all out, just this once...
j_full = JsonSerializer.Deserialize<Dictionary<string, Dictionary<string, string>>>(m.Groups[1].Value);
}
catch (Exception e) {
throw e;
}
var j = j_full["items"];
this.original_name = j["productName"];
this.success = int.TryParse(j["price"], out this.price);
this.success = int.TryParse(j["winPrice"], out this.win_price);
this.success = int.TryParse(j["bids"], out this.bids);
if (String.IsNullOrWhiteSpace(this.name)) {
this.name = this.original_name;
}
// as far as i can tell, neither the `pageData` nor the `conf` variables in the html seem to store whether or not the auction uses automatic extension
// the `conf` variable *does* store whether or not the auction has the "early end" feature enabled, in the key `earlyed`.
// unfortunately, it seems like the only way to get the auto extension info is to scrape the page for the info column that displays the auto ext status
// and check whether or not it's equal to "ari" (japanese for "yes").
var autoExtensionCheck = new Regex(@"自動延長.+\n.+>(.+)<");
m = rx.Match(html);
if (m.Groups[1].Value != null) {
this.auto_extension = (m.Groups[1].Value == "あり");
}
} }
public string PriceAUD() { public string PriceAUD() {

View file

@ -18,184 +18,44 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;
using System.Net;
using Gtk; using Gtk;
namespace Buypeeb { namespace Buypeeb {
public struct ItemColumns { enum ItemColumns {
public const int Name = 0; Name,
public const int PriceYen = 1; PriceYen,
public const int PriceAUD = 2; PriceAUD,
public const int Ending = 3; Ending,
public const int Id = 4; Id
} }
class MainWindow : Window { class MainWindow : Window {
private string location;
// private Queue<string> statuses;
private ListStore items; private ListStore items;
private Settings settings; private Settings settings;
private TreeView itemTreeView;
private Label statusLabel;
static SemaphoreSlim tasklimit = new SemaphoreSlim(4);
public MainWindow() : this(new Builder("main.glade")) { } public MainWindow() : this(new Builder("main.glade")) { }
private MainWindow(Builder builder) : base(builder.GetObject("wndMain").Handle) { private MainWindow(Builder builder) : base(builder.GetObject("wndMain").Handle) {
if (Environment.OSVersion.Platform == PlatformID.Win32NT) { this.settings = new Settings();
// C:\Users\Beebus\AppData\Roaming\Lynnear Software\buypeeb this.settings.Save();
this.location = System.IO.Path.Combine(Environment.ExpandEnvironmentVariables("%APPDATA%"), "Lynnear Software", "buypeeb");
}
else {
// ~/.config/Lynnear Software/buypeeb
this.location = System.IO.Path.Combine(Environment.GetEnvironmentVariable("HOME"), ".config", "Lynnear Software", "buypeeb");
}
string userdata = System.IO.Path.Combine(location, "userdata.json");
if (File.Exists(userdata)) {
try {
string j = File.ReadAllText(userdata);
this.settings = JsonSerializer.Deserialize<Settings>(j);
}
catch {
// ???
Console.WriteLine("oops");
Application.Quit();
}
}
else {
this.settings = new Settings();
}
this.SaveSettings();
this.Title = "Buypeeb"; this.Title = "Buypeeb";
builder.Autoconnect(this); builder.Autoconnect(this);
this.items = (ListStore)builder.GetObject("ListItems");
this.statusLabel = (Label)builder.GetObject("LabelStatus");
// bind treeview columns to watchlist instead of needing to manually sync its liststore
this.itemTreeView = (TreeView)builder.GetObject("TreeViewItems");
this.items = new ListStore(typeof(Listing));
this.RenderList(); this.RenderList();
foreach (object[] row in this.items) {
this.itemTreeView.Model = this.items; Console.WriteLine(row[(int)ItemColumns.Name]);
TreeCellDataFunc[] funcs = {
new TreeCellDataFunc(this.RenderColumnName),
new TreeCellDataFunc(this.RenderColumnPriceYen),
new TreeCellDataFunc(this.RenderColumnPriceAUD),
new TreeCellDataFunc(this.RenderColumnEnding)
};
for (int i = 0; i < this.itemTreeView.Columns.Length; i++) {
var c = this.itemTreeView.Columns[i];
c.SetCellDataFunc(c.Cells[0], funcs[i]);
} }
this.UpdateItems();
DeleteEvent += Window_Shutdown; DeleteEvent += Window_Shutdown;
} }
private void Window_Shutdown(object sender, DeleteEventArgs args) { private void Window_Shutdown(object sender, DeleteEventArgs args) {
SaveSettings();
Application.Quit(); Application.Quit();
} }
// general behaviour // general behaviour
private void SetStatus(string status) {
this.statusLabel.Text = status ?? "Buypeeb";
}
private (TreePath path, TreeIter iter) GetRow(string id) {
// TODO: surely there's a better way to do this
TreeIter iter;
this.itemTreeView.Model.GetIterFirst(out iter);
for (int i = 0; i < this.itemTreeView.Model.IterNChildren(); i++) {
var x = (Listing)this.itemTreeView.Model.GetValue(iter, 0);
if (x.id == id) {
return (this.itemTreeView.Model.GetPath(iter), iter);
}
else {
this.itemTreeView.Model.IterNext(ref iter);
}
}
Console.WriteLine($"Couldn't find {id}!");
return (null, iter);
}
private void SaveSettings() {
string j = JsonSerializer.Serialize(this.settings);
string p = System.IO.Path.Combine(this.location, "userdata.json");
Console.WriteLine(j);
if (!Directory.Exists(this.location)) {
Directory.CreateDirectory(this.location);
}
if (!File.Exists(p)) {
File.CreateText(p);
}
File.WriteAllText(System.IO.Path.Combine(this.location, "userdata.json"), j);
}
private void UpdateThread(string id) {
var item = this.settings.watchlist[id];
Console.WriteLine($"Updating {id}...");
// set item.ready to false to show that it's still being updated
// this changes a few behaviours, such as displaying the price as "..." instead of whatever's currently stored
item.ready = false;
Gtk.Application.Invoke(delegate {
// TODO: find a way to not have to do this. i think we need to avoid actually modifying the items outside of the main thread :/
var pathAndIter = this.GetRow(id);
this.items.EmitRowChanged(pathAndIter.path, pathAndIter.iter);
});
using (WebClient client = new WebClient()) {
// TODO: download should have timeout
item.Update(client.DownloadString(item.url));
// item.Update(File.ReadAllText("yahoo.html"));
}
Gtk.Application.Invoke(delegate {
var pathAndIter = this.GetRow(id);
this.items.EmitRowChanged(pathAndIter.path, pathAndIter.iter);
});
item.ready = true;
Console.WriteLine($"{id} updated.");
}
private void UpdateItem(string id) {
// don't start a new task if there are more than [tasklimit] tasks currently running
// this makes sure we don't make 1000 simultaneous requests to yahoo auctions if there are 1000 items on the watchlist
this.settings.watchlist[id].ready = false;
tasklimit.Wait();
var t = Task.Factory.StartNew(() => {
this.UpdateThread(id);
}).ContinueWith(task => { tasklimit.Release(); });
}
private void UpdateItems() {
var t = Task.Factory.StartNew(() => {
foreach (var item in this.settings.watchlist) {
this.UpdateItem(item.Key);
}
});
}
// show a simple entry dialogue that allows the user to enter text and either cancel or submit it
private (Boolean accepted, string response) EntryDialogue(string title = "Buypeeb", string message = "Hi there!") { private (Boolean accepted, string response) EntryDialogue(string title = "Buypeeb", string message = "Hi there!") {
Dialog ed = new Dialog(title, null, Gtk.DialogFlags.DestroyWithParent, "Cancel", ResponseType.Cancel, "OK", ResponseType.Ok); Dialog ed = new Dialog(title, null, Gtk.DialogFlags.DestroyWithParent, "Cancel", ResponseType.Cancel, "OK", ResponseType.Ok);
ed.DefaultResponse = ResponseType.Ok; ed.DefaultResponse = ResponseType.Ok;
@ -215,10 +75,15 @@ namespace Buypeeb {
return (accepted == ResponseType.Ok, response); return (accepted == ResponseType.Ok, response);
} }
private void UpdateItems() {
}
private void RenderList() { private void RenderList() {
this.items.Clear(); this.items.Clear();
foreach (var item in this.settings.watchlist) { foreach (KeyValuePair<string, Listing> entry in settings.watchlist) {
items.AppendValues(item.Value); string[] values = new[] { entry.Value.name, entry.Value.PriceJPY(), entry.Value.PriceAUD(), "whenever", entry.Value.id };
this.items.AppendValues(values);
} }
} }
@ -245,7 +110,7 @@ namespace Buypeeb {
} }
private void ButtonUpdateAllClicked(object sender, EventArgs a) { private void ButtonUpdateAllClicked(object sender, EventArgs a) {
this.UpdateItems(); Console.WriteLine("ButtonUpdateAllClicked");
} }
private void ButtonClearEndedClicked(object sender, EventArgs a) { private void ButtonClearEndedClicked(object sender, EventArgs a) {
@ -257,7 +122,7 @@ namespace Buypeeb {
} }
private void ButtonSaveClicked(object sender, EventArgs a) { private void ButtonSaveClicked(object sender, EventArgs a) {
this.SaveSettings(); Console.WriteLine("ButtonSaveClicked");
} }
private void ButtonQuitClicked(object sender, EventArgs a) { private void ButtonQuitClicked(object sender, EventArgs a) {
@ -265,7 +130,6 @@ namespace Buypeeb {
ResponseType response = (ResponseType)md.Run(); ResponseType response = (ResponseType)md.Run();
md.Dispose(); md.Dispose();
if (response == ResponseType.Ok) { if (response == ResponseType.Ok) {
this.SaveSettings();
Application.Quit(); Application.Quit();
} }
} }
@ -290,27 +154,5 @@ namespace Buypeeb {
Console.WriteLine("ButtonSelectedRenameClicked"); Console.WriteLine("ButtonSelectedRenameClicked");
} }
// column renderers
private void RenderColumnName(Gtk.TreeViewColumn column, Gtk.CellRenderer cell, Gtk.ITreeModel model, Gtk.TreeIter iter) {
Listing item = (Listing)model.GetValue(iter, 0);
(cell as Gtk.CellRendererText).Text = item.name ?? "Loading...";
}
private void RenderColumnPriceYen(Gtk.TreeViewColumn column, Gtk.CellRenderer cell, Gtk.ITreeModel model, Gtk.TreeIter iter) {
Listing item = (Listing)model.GetValue(iter, 0);
(cell as Gtk.CellRendererText).Text = item.ready ? item.PriceJPY() : "...";
}
private void RenderColumnPriceAUD(Gtk.TreeViewColumn column, Gtk.CellRenderer cell, Gtk.ITreeModel model, Gtk.TreeIter iter) {
Listing item = (Listing)model.GetValue(iter, 0);
(cell as Gtk.CellRendererText).Text = item.ready ? item.PriceAUD() : "...";
}
private void RenderColumnEnding(Gtk.TreeViewColumn column, Gtk.CellRenderer cell, Gtk.ITreeModel model, Gtk.TreeIter iter) {
Listing item = (Listing)model.GetValue(iter, 0);
(cell as Gtk.CellRendererText).Text = item.ready ? "whatever" : "...";
}
} }
} }

View file

@ -1,9 +1,13 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO;
using System.Text.Json;
namespace Buypeeb { namespace Buypeeb {
class Settings { class Settings {
private string location;
public int updateInterval { get; set; } = 10 * 60; public int updateInterval { get; set; } = 10 * 60;
public int favouriteUpdateInterval { get; set; } = 5 * 60; public int favouriteUpdateInterval { get; set; } = 5 * 60;
public int updateIntervalCritical { get; set; } = 60; public int updateIntervalCritical { get; set; } = 60;
@ -14,28 +18,36 @@ namespace Buypeeb {
} }
public Settings() { public Settings() {
if (this.watchlist == null) { if (Environment.OSVersion.Platform == PlatformID.Win32NT) {
// either this is the first time the program has been run, or there's something wrong with userdata.json // C:\Users\Beebus\AppData\Roaming\Lynnear Software\buypeeb
this.watchlist = new Dictionary<string, Listing>(); this.location = Path.Combine(Environment.ExpandEnvironmentVariables("%APPDATA%"), "Lynnear Software", "buypeeb");
// this.Watch("https://buypeeb.biz/whatever/k12345", "my thingy");
// this.Watch("https://buypeeb.biz/whatever/z09876", "your thingy");
// this.Watch("https://buypeeb.biz/whatever/h55555", "our thingy");
// for (int i = 0; i < 10; i++) {
// this.Watch($"https://buypeeb.biz/whatever/x{i * 123}", $"filler {i}");
// }
// this.watchlist["k12345"].Update();
} }
else {
// ~/.config/Lynnear Software/buypeeb
this.location = Path.Combine(Environment.GetEnvironmentVariable("HOME"), ".config", "Lynnear Software", "buypeeb");
}
this.watchlist = new Dictionary<string, Listing>();
this.Watch("https://buypeeb.biz/whatever/k12345", "my thingy");
this.watchlist["k12345"].Update();
} }
public void Watch(string url, string name) { public void Watch(string url, string name) {
string id = BuypeebApp.IDFromURL(url); string id = BuypeebApp.IDFromURL(url);
Console.WriteLine(id); Console.WriteLine(id);
this.watchlist[id] = new Listing(id, name); this.watchlist[id] = new Listing(url, id, name);
foreach (KeyValuePair<string, Listing> entry in this.watchlist) { foreach (KeyValuePair<string, Listing> entry in this.watchlist) {
Console.WriteLine("{0} - {1}", entry.Value.name, entry.Value.price); Console.WriteLine("{0} - {1}", entry.Value.name, entry.Value.price);
} }
} }
public void Save() {
string j = JsonSerializer.Serialize(this);
Console.WriteLine(j);
}
// public void Load() {
// }
} }
} }

View file

@ -1,13 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.22.2 --> <!-- Generated with glade 3.36.0 -->
<interface> <interface>
<requires lib="gtk+" version="3.22"/> <requires lib="gtk+" version="3.22" />
<object class="GtkListStore" id="ListItems">
<columns>
<!-- column-name Name -->
<column type="gchararray" />
<!-- column-name PriceYen -->
<column type="gchararray" />
<!-- column-name PriceAUD -->
<column type="gchararray" />
<!-- column-name Ending -->
<column type="gchararray" />
<!-- column-name id -->
<column type="gchararray" />
</columns>
<data>
<row>
<col id="0" translatable="yes">The Stinchinator</col>
<col id="1" translatable="yes">¥599</col>
<col id="2" translatable="yes">$5.99</col>
<col id="3" translatable="yes">7 hours</col>
<col id="4" translatable="yes">12345</col>
</row>
</data>
</object>
<object class="GtkWindow" id="wndMain"> <object class="GtkWindow" id="wndMain">
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="default_width">700</property> <property name="default_width">700</property>
<child type="titlebar">
<placeholder/>
</child>
<child> <child>
<object class="GtkBox"> <object class="GtkBox">
<property name="visible">True</property> <property name="visible">True</property>
@ -35,8 +55,8 @@
<property name="label" translatable="yes">Add new</property> <property name="label" translatable="yes">Add new</property>
<property name="use_underline">True</property> <property name="use_underline">True</property>
<property name="stock_id">gtk-add</property> <property name="stock_id">gtk-add</property>
<signal name="clicked" handler="ButtonAddClicked" swapped="no"/> <signal name="clicked" handler="ButtonAddClicked" swapped="no" />
<accelerator key="n" signal="clicked" modifiers="GDK_CONTROL_MASK"/> <accelerator key="n" signal="clicked" modifiers="GDK_CONTROL_MASK" />
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -51,8 +71,8 @@
<property name="label" translatable="yes">Update all</property> <property name="label" translatable="yes">Update all</property>
<property name="use_underline">True</property> <property name="use_underline">True</property>
<property name="stock_id">gtk-refresh</property> <property name="stock_id">gtk-refresh</property>
<signal name="clicked" handler="ButtonUpdateAllClicked" swapped="no"/> <signal name="clicked" handler="ButtonUpdateAllClicked" swapped="no" />
<accelerator key="r" signal="clicked" modifiers="GDK_CONTROL_MASK"/> <accelerator key="r" signal="clicked" modifiers="GDK_CONTROL_MASK" />
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -77,7 +97,7 @@
<property name="label" translatable="yes">Undo</property> <property name="label" translatable="yes">Undo</property>
<property name="use_underline">True</property> <property name="use_underline">True</property>
<property name="stock_id">gtk-undo</property> <property name="stock_id">gtk-undo</property>
<accelerator key="z" signal="clicked" modifiers="GDK_CONTROL_MASK"/> <accelerator key="z" signal="clicked" modifiers="GDK_CONTROL_MASK" />
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -92,7 +112,7 @@
<property name="label" translatable="yes">Redo</property> <property name="label" translatable="yes">Redo</property>
<property name="use_underline">True</property> <property name="use_underline">True</property>
<property name="stock_id">gtk-redo</property> <property name="stock_id">gtk-redo</property>
<accelerator key="z" signal="clicked" modifiers="GDK_SHIFT_MASK | GDK_CONTROL_MASK"/> <accelerator key="z" signal="clicked" modifiers="GDK_SHIFT_MASK | GDK_CONTROL_MASK" />
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -117,7 +137,7 @@
<property name="label" translatable="yes">Clear ended</property> <property name="label" translatable="yes">Clear ended</property>
<property name="use_underline">True</property> <property name="use_underline">True</property>
<property name="stock_id">gtk-clear</property> <property name="stock_id">gtk-clear</property>
<signal name="clicked" handler="ButtonClearEndedClicked" swapped="no"/> <signal name="clicked" handler="ButtonClearEndedClicked" swapped="no" />
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -132,7 +152,7 @@
<property name="label" translatable="yes">Clear all</property> <property name="label" translatable="yes">Clear all</property>
<property name="use_underline">True</property> <property name="use_underline">True</property>
<property name="stock_id">gtk-delete</property> <property name="stock_id">gtk-delete</property>
<signal name="clicked" handler="ButtonClearAllClicked" swapped="no"/> <signal name="clicked" handler="ButtonClearAllClicked" swapped="no" />
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -157,7 +177,7 @@
<property name="label" translatable="yes">Open</property> <property name="label" translatable="yes">Open</property>
<property name="use_underline">True</property> <property name="use_underline">True</property>
<property name="stock_id">gtk-open</property> <property name="stock_id">gtk-open</property>
<accelerator key="o" signal="clicked" modifiers="GDK_CONTROL_MASK"/> <accelerator key="o" signal="clicked" modifiers="GDK_CONTROL_MASK" />
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -172,8 +192,8 @@
<property name="label" translatable="yes">Save</property> <property name="label" translatable="yes">Save</property>
<property name="use_underline">True</property> <property name="use_underline">True</property>
<property name="stock_id">gtk-save</property> <property name="stock_id">gtk-save</property>
<signal name="clicked" handler="ButtonSaveClicked" swapped="no"/> <signal name="clicked" handler="ButtonSaveClicked" swapped="no" />
<accelerator key="s" signal="clicked" modifiers="GDK_CONTROL_MASK"/> <accelerator key="s" signal="clicked" modifiers="GDK_CONTROL_MASK" />
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -188,7 +208,7 @@
<property name="label" translatable="yes">Export as...</property> <property name="label" translatable="yes">Export as...</property>
<property name="use_underline">True</property> <property name="use_underline">True</property>
<property name="stock_id">gtk-save-as</property> <property name="stock_id">gtk-save-as</property>
<accelerator key="e" signal="clicked" modifiers="GDK_SHIFT_MASK | GDK_CONTROL_MASK"/> <accelerator key="e" signal="clicked" modifiers="GDK_SHIFT_MASK | GDK_CONTROL_MASK" />
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -213,7 +233,7 @@
<property name="label" translatable="yes">Help</property> <property name="label" translatable="yes">Help</property>
<property name="use_underline">True</property> <property name="use_underline">True</property>
<property name="stock_id">gtk-help</property> <property name="stock_id">gtk-help</property>
<accelerator key="slash" signal="clicked" modifiers="GDK_CONTROL_MASK"/> <accelerator key="slash" signal="clicked" modifiers="GDK_CONTROL_MASK" />
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -228,7 +248,7 @@
<property name="label" translatable="yes">Settings</property> <property name="label" translatable="yes">Settings</property>
<property name="use_underline">True</property> <property name="use_underline">True</property>
<property name="stock_id">gtk-preferences</property> <property name="stock_id">gtk-preferences</property>
<accelerator key="comma" signal="clicked" modifiers="GDK_CONTROL_MASK"/> <accelerator key="comma" signal="clicked" modifiers="GDK_CONTROL_MASK" />
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -243,8 +263,8 @@
<property name="label" translatable="yes">Quit</property> <property name="label" translatable="yes">Quit</property>
<property name="use_underline">True</property> <property name="use_underline">True</property>
<property name="stock_id">gtk-quit</property> <property name="stock_id">gtk-quit</property>
<signal name="clicked" handler="ButtonQuitClicked" swapped="no"/> <signal name="clicked" handler="ButtonQuitClicked" swapped="no" />
<accelerator key="q" signal="clicked" modifiers="GDK_CONTROL_MASK"/> <accelerator key="q" signal="clicked" modifiers="GDK_CONTROL_MASK" />
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -267,15 +287,16 @@
<property name="shadow_type">in</property> <property name="shadow_type">in</property>
<property name="min_content_width">200</property> <property name="min_content_width">200</property>
<child> <child>
<object class="GtkTreeView" id="TreeViewItems"> <object class="GtkTreeView">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="model">ListItems</property>
<property name="rules_hint">True</property> <property name="rules_hint">True</property>
<property name="search_column">1</property> <property name="search_column">1</property>
<property name="activate_on_single_click">True</property> <property name="activate_on_single_click">True</property>
<child internal-child="selection"> <child internal-child="selection">
<object class="GtkTreeSelection"> <object class="GtkTreeSelection">
<signal name="changed" handler="tveItemsSelectionChanged" swapped="no"/> <signal name="changed" handler="tveItemsSelectionChanged" swapped="no" />
</object> </object>
</child> </child>
<child> <child>
@ -287,7 +308,10 @@
<property name="expand">True</property> <property name="expand">True</property>
<property name="clickable">True</property> <property name="clickable">True</property>
<child> <child>
<object class="GtkCellRendererText"/> <object class="GtkCellRendererText" />
<attributes>
<attribute name="text">0</attribute>
</attributes>
</child> </child>
</object> </object>
</child> </child>
@ -296,7 +320,10 @@
<property name="resizable">True</property> <property name="resizable">True</property>
<property name="title" translatable="yes">Price (¥)</property> <property name="title" translatable="yes">Price (¥)</property>
<child> <child>
<object class="GtkCellRendererText"/> <object class="GtkCellRendererText" />
<attributes>
<attribute name="text">1</attribute>
</attributes>
</child> </child>
</object> </object>
</child> </child>
@ -305,7 +332,10 @@
<property name="resizable">True</property> <property name="resizable">True</property>
<property name="title" translatable="yes">Price (AUD)</property> <property name="title" translatable="yes">Price (AUD)</property>
<child> <child>
<object class="GtkCellRendererText"/> <object class="GtkCellRendererText" />
<attributes>
<attribute name="text">2</attribute>
</attributes>
</child> </child>
</object> </object>
</child> </child>
@ -315,7 +345,10 @@
<property name="title" translatable="yes">Ending at</property> <property name="title" translatable="yes">Ending at</property>
<property name="clickable">True</property> <property name="clickable">True</property>
<child> <child>
<object class="GtkCellRendererText"/> <object class="GtkCellRendererText" />
<attributes>
<attribute name="text">3</attribute>
</attributes>
</child> </child>
</object> </object>
</child> </child>
@ -352,8 +385,8 @@
<property name="max_width_chars">40</property> <property name="max_width_chars">40</property>
<property name="lines">3</property> <property name="lines">3</property>
<attributes> <attributes>
<attribute name="weight" value="bold"/> <attribute name="weight" value="bold" />
<attribute name="scale" value="2"/> <attribute name="scale" value="2" />
</attributes> </attributes>
</object> </object>
<packing> <packing>
@ -564,22 +597,22 @@
</packing> </packing>
</child> </child>
<child> <child>
<placeholder/> <placeholder />
</child> </child>
<child> <child>
<placeholder/> <placeholder />
</child> </child>
<child> <child>
<placeholder/> <placeholder />
</child> </child>
<child> <child>
<placeholder/> <placeholder />
</child> </child>
<child> <child>
<placeholder/> <placeholder />
</child> </child>
<child> <child>
<placeholder/> <placeholder />
</child> </child>
</object> </object>
<packing> <packing>
@ -614,7 +647,7 @@
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="receives_default">True</property> <property name="receives_default">True</property>
<signal name="clicked" handler="ButtonViewBuyeeClicked" swapped="no"/> <signal name="clicked" handler="ButtonViewBuyeeClicked" swapped="no" />
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -628,7 +661,7 @@
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="receives_default">True</property> <property name="receives_default">True</property>
<signal name="clicked" handler="ButtonViewYahooClicked" swapped="no"/> <signal name="clicked" handler="ButtonViewYahooClicked" swapped="no" />
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -649,7 +682,7 @@
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="receives_default">True</property> <property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes">Remove</property> <property name="tooltip_text" translatable="yes">Remove</property>
<signal name="clicked" handler="ButtonSelectedRemoveClicked" swapped="no"/> <signal name="clicked" handler="ButtonSelectedRemoveClicked" swapped="no" />
<child> <child>
<object class="GtkImage" id="image4"> <object class="GtkImage" id="image4">
<property name="visible">True</property> <property name="visible">True</property>
@ -671,7 +704,7 @@
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="receives_default">True</property> <property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes">Rename</property> <property name="tooltip_text" translatable="yes">Rename</property>
<signal name="clicked" handler="ButtonSelectedRenameClicked" swapped="no"/> <signal name="clicked" handler="ButtonSelectedRenameClicked" swapped="no" />
<child> <child>
<object class="GtkImage" id="image1"> <object class="GtkImage" id="image1">
<property name="visible">True</property> <property name="visible">True</property>
@ -762,7 +795,7 @@
<property name="margin_top">3</property> <property name="margin_top">3</property>
<property name="margin_bottom">3</property> <property name="margin_bottom">3</property>
<child> <child>
<object class="GtkLabel" id="LabelStatus"> <object class="GtkLabel">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="halign">start</property> <property name="halign">start</property>
@ -795,5 +828,8 @@
</child> </child>
</object> </object>
</child> </child>
<child type="titlebar">
<placeholder />
</child>
</object> </object>
</interface> </interface>