Skip to content

Commit

Permalink
GUI edition of recipe: renaming of recipe.
Browse files Browse the repository at this point in the history
  • Loading branch information
Joris Rehm committed Jun 5, 2017
1 parent accb34d commit 5e5960a
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 3 deletions.
12 changes: 12 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,18 @@ fn show_recipe_edit(data : &Rc<RefCell<Data>>, book_pane : &gtk::Paned) {
let valid_but = gtk::Button::new_with_label("Valider");
grid.add(&valid_but);

// renaming
let name_eb = gtk::EntryBuffer::new(Some(&recipe.name as &str));
let name_e = gtk::Entry::new_with_buffer(&name_eb);
grid.add(&name_e);

let data_clone = data.clone();
let name_eb_clone = name_eb.clone();
name_e.connect_changed(move |_| {
data_clone.borrow_mut().edited_recipe.name =
name_eb_clone.get_text();
});

// Ingredients list
grid.add(&gtk::Label::new("Ingrédients"));

Expand Down
24 changes: 21 additions & 3 deletions todo_and_done.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,35 @@ Data model for grocery list.

Data model for planning with days, lunchs.

GUI deletion of recipe.
GUI edition of recipe: renaming of recipe. Update name in the left pane
recipes list.

GUI creation of a new recipe.
GUI grocery section deletion.
GUI grocery section renaming.
GUI grocery section creation.

GUI edition of recipe: renaming of recipe.
GUI food group deletion.
GUI food group renaming.
GUI food group creation.

GUI ingredient edit grocery section
GUI ingredient edit food group
GUI ingredient edit default quantity

GUI ingredient deletion
GUI ingredient renaming
GUI ingredient creation

GUI deletion of recipe.

GUI creation of a new recipe.


DONE
=====

GUI edition of recipe: renaming of recipe.

GUI edition of recipe: ingredient removing.

GUI edition of recipe: ingredient quantity value and unit edition.
Expand Down

0 comments on commit 5e5960a

Please sign in to comment.