From: Javier Jardón Date: Tue, 12 Apr 2011 16:37:32 +0000 (+0100) Subject: Convert IdCardWidget in a derived class of GtkBox X-Git-Tag: debian/0.0.2+20110913-1~62 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=moonshot-ui.git;a=commitdiff_plain;h=31f4dae014af5fae7a671895945c5965a86ab3e1 Convert IdCardWidget in a derived class of GtkBox --- 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; - } }