00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 namespace Foodolini.Activities {
00012
00013
00014 public partial class ShoppingListActivity {
00015
00016 private Gtk.VBox vbox2;
00017
00018 private Gtk.ScrolledWindow GtkScrolledWindow;
00019
00020 private Gtk.NodeView shoppingListViewer;
00021
00022 private Gtk.HBox hbox1;
00023
00024 private Gtk.Button btnCookbook;
00025
00026 private Gtk.Button btnAddIngredient;
00027
00028 private Gtk.Button btnPrint;
00029
00030 private Gtk.Button btnDelete;
00031
00032 private Gtk.Button btnClear;
00033
00034 protected virtual void Build() {
00035 Stetic.Gui.Initialize(this);
00036
00037 Stetic.BinContainer.Attach(this);
00038 this.Name = "Foodolini.Activities.ShoppingListActivity";
00039
00040 this.vbox2 = new Gtk.VBox();
00041 this.vbox2.Name = "vbox2";
00042 this.vbox2.Spacing = 6;
00043
00044 this.GtkScrolledWindow = new Gtk.ScrolledWindow();
00045 this.GtkScrolledWindow.Name = "GtkScrolledWindow";
00046 this.GtkScrolledWindow.ShadowType = ((Gtk.ShadowType)(1));
00047
00048 this.shoppingListViewer = new Gtk.NodeView();
00049 this.shoppingListViewer.CanFocus = true;
00050 this.shoppingListViewer.Name = "shoppingListViewer";
00051 this.GtkScrolledWindow.Add(this.shoppingListViewer);
00052 this.vbox2.Add(this.GtkScrolledWindow);
00053 Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.vbox2[this.GtkScrolledWindow]));
00054 w2.Position = 0;
00055
00056 this.hbox1 = new Gtk.HBox();
00057 this.hbox1.Name = "hbox1";
00058 this.hbox1.Spacing = 6;
00059
00060 this.btnCookbook = new Gtk.Button();
00061 this.btnCookbook.CanFocus = true;
00062 this.btnCookbook.Name = "btnCookbook";
00063 this.btnCookbook.UseUnderline = true;
00064
00065 Gtk.Alignment w3 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F);
00066
00067 Gtk.HBox w4 = new Gtk.HBox();
00068 w4.Spacing = 2;
00069
00070 Gtk.Image w5 = new Gtk.Image();
00071 w5.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-index", Gtk.IconSize.Menu, 16);
00072 w4.Add(w5);
00073
00074 Gtk.Label w7 = new Gtk.Label();
00075 w7.LabelProp = Mono.Unix.Catalog.GetString("Cookbook");
00076 w7.UseUnderline = true;
00077 w4.Add(w7);
00078 w3.Add(w4);
00079 this.btnCookbook.Add(w3);
00080 this.hbox1.Add(this.btnCookbook);
00081 Gtk.Box.BoxChild w11 = ((Gtk.Box.BoxChild)(this.hbox1[this.btnCookbook]));
00082 w11.Position = 0;
00083 w11.Expand = false;
00084 w11.Fill = false;
00085
00086 this.btnAddIngredient = new Gtk.Button();
00087 this.btnAddIngredient.Sensitive = false;
00088 this.btnAddIngredient.CanFocus = true;
00089 this.btnAddIngredient.Name = "btnAddIngredient";
00090 this.btnAddIngredient.UseUnderline = true;
00091
00092 Gtk.Alignment w12 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F);
00093
00094 Gtk.HBox w13 = new Gtk.HBox();
00095 w13.Spacing = 2;
00096
00097 Gtk.Image w14 = new Gtk.Image();
00098 w14.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-add", Gtk.IconSize.Menu, 16);
00099 w13.Add(w14);
00100
00101 Gtk.Label w16 = new Gtk.Label();
00102 w16.LabelProp = Mono.Unix.Catalog.GetString("Add ingredient");
00103 w16.UseUnderline = true;
00104 w13.Add(w16);
00105 w12.Add(w13);
00106 this.btnAddIngredient.Add(w12);
00107 this.hbox1.Add(this.btnAddIngredient);
00108 Gtk.Box.BoxChild w20 = ((Gtk.Box.BoxChild)(this.hbox1[this.btnAddIngredient]));
00109 w20.Position = 1;
00110 w20.Expand = false;
00111 w20.Fill = false;
00112
00113 this.btnPrint = new Gtk.Button();
00114 this.btnPrint.TooltipMarkup = "Print Shopping list";
00115 this.btnPrint.Sensitive = false;
00116 this.btnPrint.CanFocus = true;
00117 this.btnPrint.Name = "btnPrint";
00118 this.btnPrint.UseUnderline = true;
00119
00120 Gtk.Alignment w21 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F);
00121
00122 Gtk.HBox w22 = new Gtk.HBox();
00123 w22.Spacing = 2;
00124
00125 Gtk.Image w23 = new Gtk.Image();
00126 w23.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-print", Gtk.IconSize.Menu, 16);
00127 w22.Add(w23);
00128
00129 Gtk.Label w25 = new Gtk.Label();
00130 w22.Add(w25);
00131 w21.Add(w22);
00132 this.btnPrint.Add(w21);
00133 this.hbox1.Add(this.btnPrint);
00134 Gtk.Box.BoxChild w29 = ((Gtk.Box.BoxChild)(this.hbox1[this.btnPrint]));
00135 w29.Position = 2;
00136 w29.Expand = false;
00137 w29.Fill = false;
00138
00139 this.btnDelete = new Gtk.Button();
00140 this.btnDelete.TooltipMarkup = "Remove ingredient from shopping list";
00141 this.btnDelete.Sensitive = false;
00142 this.btnDelete.CanFocus = true;
00143 this.btnDelete.Name = "btnDelete";
00144 this.btnDelete.UseUnderline = true;
00145
00146 Gtk.Alignment w30 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F);
00147
00148 Gtk.HBox w31 = new Gtk.HBox();
00149 w31.Spacing = 2;
00150
00151 Gtk.Image w32 = new Gtk.Image();
00152 w32.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-delete", Gtk.IconSize.Menu, 16);
00153 w31.Add(w32);
00154
00155 Gtk.Label w34 = new Gtk.Label();
00156 w31.Add(w34);
00157 w30.Add(w31);
00158 this.btnDelete.Add(w30);
00159 this.hbox1.Add(this.btnDelete);
00160 Gtk.Box.BoxChild w38 = ((Gtk.Box.BoxChild)(this.hbox1[this.btnDelete]));
00161 w38.Position = 3;
00162 w38.Expand = false;
00163 w38.Fill = false;
00164
00165 this.btnClear = new Gtk.Button();
00166 this.btnClear.TooltipMarkup = "Clear shopping list";
00167 this.btnClear.Sensitive = false;
00168 this.btnClear.CanFocus = true;
00169 this.btnClear.Name = "btnClear";
00170 this.btnClear.UseUnderline = true;
00171
00172 Gtk.Alignment w39 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F);
00173
00174 Gtk.HBox w40 = new Gtk.HBox();
00175 w40.Spacing = 2;
00176
00177 Gtk.Image w41 = new Gtk.Image();
00178 w41.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-clear", Gtk.IconSize.Menu, 16);
00179 w40.Add(w41);
00180
00181 Gtk.Label w43 = new Gtk.Label();
00182 w40.Add(w43);
00183 w39.Add(w40);
00184 this.btnClear.Add(w39);
00185 this.hbox1.Add(this.btnClear);
00186 Gtk.Box.BoxChild w47 = ((Gtk.Box.BoxChild)(this.hbox1[this.btnClear]));
00187 w47.Position = 4;
00188 w47.Expand = false;
00189 w47.Fill = false;
00190 this.vbox2.Add(this.hbox1);
00191 Gtk.Box.BoxChild w48 = ((Gtk.Box.BoxChild)(this.vbox2[this.hbox1]));
00192 w48.Position = 1;
00193 w48.Expand = false;
00194 w48.Fill = false;
00195 this.Add(this.vbox2);
00196 if ((this.Child != null)) {
00197 this.Child.ShowAll();
00198 }
00199 this.Hide();
00200 this.shoppingListViewer.CursorChanged += new System.EventHandler(this.OnShoppingListViewerCursorChanged);
00201 this.shoppingListViewer.RowActivated += new Gtk.RowActivatedHandler(this.OnShoppingListViewerRowActivated);
00202 this.btnCookbook.Clicked += new System.EventHandler(this.OnBtnCookbookClicked);
00203 this.btnAddIngredient.Clicked += new System.EventHandler(this.OnBtnAddIngredientClicked);
00204 this.btnPrint.Clicked += new System.EventHandler(this.OnBtnPrintClicked);
00205 this.btnDelete.Clicked += new System.EventHandler(this.OnBtnDeleteClicked);
00206 this.btnClear.Clicked += new System.EventHandler(this.OnBtnClearActivated);
00207 }
00208 }
00209 }