~mefrio-g/dexter-rolodex/dexter-vala

« back to all changes in this revision

Viewing changes to src/Dialogs/Delete.vala

  • Committer: Mario Guerriero
  • Date: 2011-11-22 18:01:38 UTC
  • Revision ID: mefrio.g@gmail.com-20111122180138-cisoclcmo277388c
added a .desktop file and fixed some EDS things

Show diffs side-by-side

added added

removed removed

Lines of Context:
64
64
                
65
65
                public void delete_contact () {
66
66
 
67
 
            TreeModel model;
68
 
                        TreeIter iter;
69
 
                        Value val;
70
 
            
71
 
            var selection = window.contact_view.view.get_selection ();
72
 
            var listmodel = window.contact_view.view.get_model ();
73
 
            
74
 
                        List<TreePath> select = selection.get_selected_rows (out model);
75
 
                        var path = select.nth_data (0);
76
 
 
77
 
                        if (path != null)
78
 
                                listmodel.get_iter (out iter, path);
79
 
                        else
80
 
                                return;
81
 
 
82
 
                        listmodel.get_value (iter, 0, out val);
83
 
 
84
 
                        string sel = val.dup_string ();
85
 
            
86
 
            var contact = new E.Contact ();
87
 
            contact = window.ebook.get_contact_from_string (sel);
 
67
            E.Contact contact;
 
68
            contact = window.contact_view.selected;
88
69
            
89
70
                        bool sensitive = window.ebook.remove_contact (contact);
90
71