~cameronnemo/agenda-tasks/fix-1161829

« back to all changes in this revision

Viewing changes to src/AgendaWindow.vala

  • Committer: Dane Henson
  • Date: 2012-09-01 16:56:40 UTC
  • Revision ID: dane.henson@gmail.com-20120901165640-7c5m9t01yuiyrnvg
Saves reordered list to file now.

Show diffs side-by-side

added added

removed removed

Lines of Context:
191
191
                    if (active)
192
192
                        task_list.remove (iter);
193
193
                        update ();
194
 
                        list_to_file ();
195
194
                    return false;
196
195
                });
197
196
            });
198
197
            
 
198
            // Method for when a row is removed from the task_list or the list is reordered
 
199
            task_list.row_deleted.connect ((path, iter) => {
 
200
                /*
 
201
                 *  When a row is dragged and dropped, a new row is inserted, then populated,
 
202
                 *  then the old row is deleted.  This way, we write the new order to the file
 
203
                 *  every time it gets reordered through DND.  This also takes care of the
 
204
                 *  toggled row, since it is removed and the row_deleted signal is emitted.
 
205
                 */
 
206
                list_to_file ();
 
207
            });
 
208
            
199
209
            
200
210
            // Method for when the user presses <Escape>, destroy the window
201
211
            this.key_press_event.connect ( (e) => {