[billreminder/fresh] Playground to get the new ui up and running. Need to fix the import path.
- From: Og B. Maciel <ogmaciel src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [billreminder/fresh] Playground to get the new ui up and running. Need to fix the import path.
- Date: Fri, 15 Jan 2010 14:43:16 +0000 (UTC)
commit f1cda7b2a548eaf15fa05b5112abd9641e9d94db
Author: Og B. Maciel <ogmaciel gnome org>
Date: Fri Jan 15 09:43:10 2010 -0500
Playground to get the new ui up and running. Need to fix the import path.
src/gui/new.py | 42 ++++++++++++++++++++++++++++++++++++++++++
1 files changed, 42 insertions(+), 0 deletions(-)
---
diff --git a/src/gui/new.py b/src/gui/new.py
new file mode 100644
index 0000000..df4b7e2
--- /dev/null
+++ b/src/gui/new.py
@@ -0,0 +1,42 @@
+#!/usr/bin/env python
+# - coding: utf-8 -
+
+import gtk
+from db import entities
+from gui import widgets
+
+class BasicWindow:
+
+ # close the window and quit
+ def delete_event(self, widget, event, data=None):
+ gtk.main_quit()
+ return False
+
+ def __init__(self):
+ # Create a new window
+ self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
+
+ self.window.set_title("Basic Window")
+
+ self.window.set_size_request(300, 200)
+
+ self.window.connect("delete_event", self.delete_event)
+
+ from datetime import date
+ dt = date.today()
+ ht = entities.Bill('Harris Teeter', 123.94, dt)
+ food = entities.Category('Groceries')
+ ht.category = food
+
+ bt = widgets.BillTree()
+ bt.add_bill(ht)
+
+ self.window.add(bt)
+ self.window.show_all()
+
+def main():
+ gtk.main()
+
+if __name__ == "__main__":
+ example = BasicWindow()
+ main()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]