00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 namespace Foodolini.Activities.ShoppingList {
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.ShoppingList.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.TooltipMarkup = "Displaying your shopping list";
00050 this.shoppingListViewer.CanFocus = true;
00051 this.shoppingListViewer.Name = "shoppingListViewer";
00052 this.GtkScrolledWindow.Add(this.shoppingListViewer);
00053 this.vbox2.Add(this.GtkScrolledWindow);
00054 Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.vbox2[this.GtkScrolledWindow]));
00055 w2.Position = 0;
00056
00057 this.hbox1 = new Gtk.HBox();
00058 this.hbox1.Name = "hbox1";
00059 this.hbox1.Spacing = 6;
00060
00061 this.btnCookbook = new Gtk.Button();
00062 this.btnCookbook.TooltipMarkup = "Go to the cookbook to add a recipe to your shopping list";
00063 this.btnCookbook.CanFocus = true;
00064 this.btnCookbook.Name = "btnCookbook";
00065 this.btnCookbook.UseUnderline = true;
00066
00067 Gtk.Alignment w3 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F);
00068
00069 Gtk.HBox w4 = new Gtk.HBox();
00070 w4.Spacing = 2;
00071
00072 Gtk.Image w5 = new Gtk.Image();
00073 w5.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-index", Gtk.IconSize.Menu, 16);
00074 w4.Add(w5);
00075
00076 Gtk.Label w7 = new Gtk.Label();
00077 w7.LabelProp = Mono.Unix.Catalog.GetString("Cookbook");
00078 w7.UseUnderline = true;
00079 w4.Add(w7);
00080 w3.Add(w4);
00081 this.btnCookbook.Add(w3);
00082 this.hbox1.Add(this.btnCookbook);
00083 Gtk.Box.BoxChild w11 = ((Gtk.Box.BoxChild)(this.hbox1[this.btnCookbook]));
00084 w11.Position = 0;
00085 w11.Expand = false;
00086 w11.Fill = false;
00087
00088 this.btnAddIngredient = new Gtk.Button();
00089 this.btnAddIngredient.TooltipMarkup = "Add an ingredient to your shopping list";
00090 this.btnAddIngredient.Sensitive = false;
00091 this.btnAddIngredient.CanFocus = true;
00092 this.btnAddIngredient.Name = "btnAddIngredient";
00093 this.btnAddIngredient.UseUnderline = true;
00094
00095 Gtk.Alignment w12 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F);
00096
00097 Gtk.HBox w13 = new Gtk.HBox();
00098 w13.Spacing = 2;
00099
00100 Gtk.Image w14 = new Gtk.Image();
00101 w14.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-add", Gtk.IconSize.Menu, 16);
00102 w13.Add(w14);
00103
00104 Gtk.Label w16 = new Gtk.Label();
00105 w16.LabelProp = Mono.Unix.Catalog.GetString("Add ingredient");
00106 w16.UseUnderline = true;
00107 w13.Add(w16);
00108 w12.Add(w13);
00109 this.btnAddIngredient.Add(w12);
00110 this.hbox1.Add(this.btnAddIngredient);
00111 Gtk.Box.BoxChild w20 = ((Gtk.Box.BoxChild)(this.hbox1[this.btnAddIngredient]));
00112 w20.Position = 1;
00113 w20.Expand = false;
00114 w20.Fill = false;
00115
00116 this.btnPrint = new Gtk.Button();
00117 this.btnPrint.TooltipMarkup = "Print your shopping list";
00118 this.btnPrint.Sensitive = false;
00119 this.btnPrint.CanFocus = true;
00120 this.btnPrint.Name = "btnPrint";
00121 this.btnPrint.UseUnderline = true;
00122
00123 Gtk.Alignment w21 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F);
00124
00125 Gtk.HBox w22 = new Gtk.HBox();
00126 w22.Spacing = 2;
00127
00128 Gtk.Image w23 = new Gtk.Image();
00129 w23.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-print", Gtk.IconSize.Menu, 16);
00130 w22.Add(w23);
00131
00132 Gtk.Label w25 = new Gtk.Label();
00133 w22.Add(w25);
00134 w21.Add(w22);
00135 this.btnPrint.Add(w21);
00136 this.hbox1.Add(this.btnPrint);
00137 Gtk.Box.BoxChild w29 = ((Gtk.Box.BoxChild)(this.hbox1[this.btnPrint]));
00138 w29.Position = 2;
00139 w29.Expand = false;
00140 w29.Fill = false;
00141
00142 this.btnDelete = new Gtk.Button();
00143 this.btnDelete.TooltipMarkup = "Remove the selected ingredient from your shopping list";
00144 this.btnDelete.Sensitive = false;
00145 this.btnDelete.CanFocus = true;
00146 this.btnDelete.Name = "btnDelete";
00147 this.btnDelete.UseUnderline = true;
00148
00149 Gtk.Alignment w30 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F);
00150
00151 Gtk.HBox w31 = new Gtk.HBox();
00152 w31.Spacing = 2;
00153
00154 Gtk.Image w32 = new Gtk.Image();
00155 w32.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-delete", Gtk.IconSize.Menu, 16);
00156 w31.Add(w32);
00157
00158 Gtk.Label w34 = new Gtk.Label();
00159 w31.Add(w34);
00160 w30.Add(w31);
00161 this.btnDelete.Add(w30);
00162 this.hbox1.Add(this.btnDelete);
00163 Gtk.Box.BoxChild w38 = ((Gtk.Box.BoxChild)(this.hbox1[this.btnDelete]));
00164 w38.Position = 3;
00165 w38.Expand = false;
00166 w38.Fill = false;
00167
00168 this.btnClear = new Gtk.Button();
00169 this.btnClear.TooltipMarkup = "Clear your shopping list completely";
00170 this.btnClear.Sensitive = false;
00171 this.btnClear.CanFocus = true;
00172 this.btnClear.Name = "btnClear";
00173 this.btnClear.UseUnderline = true;
00174
00175 Gtk.Alignment w39 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F);
00176
00177 Gtk.HBox w40 = new Gtk.HBox();
00178 w40.Spacing = 2;
00179
00180 Gtk.Image w41 = new Gtk.Image();
00181 w41.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-clear", Gtk.IconSize.Menu, 16);
00182 w40.Add(w41);
00183
00184 Gtk.Label w43 = new Gtk.Label();
00185 w40.Add(w43);
00186 w39.Add(w40);
00187 this.btnClear.Add(w39);
00188 this.hbox1.Add(this.btnClear);
00189 Gtk.Box.BoxChild w47 = ((Gtk.Box.BoxChild)(this.hbox1[this.btnClear]));
00190 w47.Position = 4;
00191 w47.Expand = false;
00192 w47.Fill = false;
00193 this.vbox2.Add(this.hbox1);
00194 Gtk.Box.BoxChild w48 = ((Gtk.Box.BoxChild)(this.vbox2[this.hbox1]));
00195 w48.Position = 1;
00196 w48.Expand = false;
00197 w48.Fill = false;
00198 this.Add(this.vbox2);
00199 if ((this.Child != null)) {
00200 this.Child.ShowAll();
00201 }
00202 this.Hide();
00203 this.shoppingListViewer.CursorChanged += new System.EventHandler(this.OnShoppingListViewerCursorChanged);
00204 this.shoppingListViewer.RowActivated += new Gtk.RowActivatedHandler(this.OnShoppingListViewerRowActivated);
00205 this.btnCookbook.Clicked += new System.EventHandler(this.OnBtnCookbookClicked);
00206 this.btnAddIngredient.Clicked += new System.EventHandler(this.OnBtnAddIngredientClicked);
00207 this.btnPrint.Clicked += new System.EventHandler(this.OnBtnPrintClicked);
00208 this.btnDelete.Clicked += new System.EventHandler(this.OnBtnDeleteClicked);
00209 this.btnClear.Clicked += new System.EventHandler(this.OnBtnClearActivated);
00210 }
00211 }
00212 }