43 lines
907 B
Vala
43 lines
907 B
Vala
|
namespace Reclaim {
|
||
|
public class MainWindow : Hdy.ApplicationWindow {
|
||
|
public Reclaim.Application app { get; construct; }
|
||
|
public Reclaim.TransactionView transaction_view { get; construct; }
|
||
|
|
||
|
public MainWindow (Reclaim.Application app) {
|
||
|
Object (
|
||
|
app: app
|
||
|
);
|
||
|
}
|
||
|
|
||
|
static construct {
|
||
|
Hdy.init ();
|
||
|
}
|
||
|
|
||
|
construct {
|
||
|
set_application (app);
|
||
|
|
||
|
// temp code for now
|
||
|
var store = new Gtk.TreeStore (2, typeof(string), typeof(string));
|
||
|
|
||
|
var transaction_view = new Reclaim.TransactionView();
|
||
|
transaction_view.set_model(store);
|
||
|
add(transaction_view);
|
||
|
|
||
|
set_visual (Gdk.Screen.get_default ().get_rgba_visual ());
|
||
|
|
||
|
setup_ui ();
|
||
|
show_all ();
|
||
|
}
|
||
|
|
||
|
private void setup_ui () {
|
||
|
var provider = new Gtk.CssProvider ();
|
||
|
|
||
|
Gtk.StyleContext.add_provider_for_screen (
|
||
|
Gdk.Screen.get_default (),
|
||
|
provider,
|
||
|
Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION + 1
|
||
|
);
|
||
|
}
|
||
|
}
|
||
|
}
|