From 31f4dae014af5fae7a671895945c5965a86ab3e1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Javier=20Jard=C3=B3n?= Date: Tue, 12 Apr 2011 17:37:32 +0100 Subject: [PATCH] Convert IdCardWidget in a derived class of GtkBox --- Makefile.am | 1 + ...nshot-idcard.vala => moonshot-idcard-widget.vala} | 20 ++------------------ 2 files changed, 3 insertions(+), 18 deletions(-) rename src/{moonshot-idcard.vala => moonshot-idcard-widget.vala} (85%) diff --git a/Makefile.am b/Makefile.am index 1b395b3..7a25c84 100644 --- a/Makefile.am +++ b/Makefile.am @@ -17,6 +17,7 @@ AM_VALAFLAGS = \ src_moonshot_SOURCES = \ src/moonshot-id.vala \ src/moonshot-add-dialog.vala \ + src/moonshot-idcard-widget.vala \ src/moonshot-window.vala src_moonshot_LDADD = \ diff --git a/src/moonshot-idcard.vala b/src/moonshot-idcard-widget.vala similarity index 85% rename from src/moonshot-idcard.vala rename to src/moonshot-idcard-widget.vala index 50a5f35..092543f 100644 --- a/src/moonshot-idcard.vala +++ b/src/moonshot-idcard-widget.vala @@ -1,6 +1,6 @@ using Gtk; -class IdCard : Window +class IdCardWidget : Box { private VBox main_vbox; private Table table; @@ -13,14 +13,10 @@ class IdCard : Window return false; } - public IdCard () + public IdCardWidget () { Gdk.Pixbuf pixbuf; - this.title = "ID Card"; - this.position = WindowPosition.CENTER; - set_default_size (400, 200); - var icon_theme = IconTheme.get_default (); try { @@ -67,16 +63,4 @@ class IdCard : Window event_box.show_all (); this.hbutton_box.hide (); } - - public static int main(string[] args) - { - Gtk.init(ref args); - - var IdCard = new IdCard (); - IdCard.show (); - - Gtk.main(); - - return 0; - } } -- 2.1.4