~ubuntu-branches/ubuntu/lucid/tomboy/lucid-proposed

« back to all changes in this revision

Viewing changes to Tomboy/Notebooks/NotebookManager.cs

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Dröge, Jo Shields, Sebastian Dröge
  • Date: 2009-03-06 11:02:03 UTC
  • mfrom: (1.2.1 upstream)
  • mto: (4.2.1 squeeze)
  • mto: This revision was merged to the branch mainline in revision 20.
  • Revision ID: james.westby@ubuntu.com-20090306110203-5nbuw7itgo5mn9e0
Tags: 0.12.2-3
[ Jo Shields ]
* debian/control:
  + Add Vcs-* fields

[ Sebastian Dröge ]
* Upload to unstable (Closes: #518414).
* debian/control:
  + Use Gnome# 2.20 for now.

Show diffs side-by-side

added added

removed removed

Lines of Context:
285
285
                /// <returns>If successful, returns the newly created notebook.</returns>
286
286
                public static Notebook PromptCreateNewNotebook (Gtk.Window parent)
287
287
                {
 
288
                        return PromptCreateNewNotebook (parent, null);
 
289
                }
 
290
                
 
291
                /// <summary>
 
292
                /// Prompt the user to create a new notebook and if successful, move
 
293
                /// the notes specified in the notesToAdd list into the new notebook.
 
294
                /// </summary>
 
295
                /// <param name="parent">
 
296
                /// A <see cref="Gtk.Window"/>
 
297
                /// </param>
 
298
                /// <param name="notesToAdd">
 
299
                /// A <see cref="List`1"/> of notes that should be added to the new
 
300
                /// notebook.
 
301
                /// </param>
 
302
                /// <returns>
 
303
                /// The newly created <see cref="Notebook"/> if successful or null
 
304
                /// if there was a problem.
 
305
                /// </returns>
 
306
                public static Notebook PromptCreateNewNotebook (Gtk.Window parent, List<Note> notesToAdd)
 
307
                {
288
308
                        // Prompt the user for the name of a new notebook
289
309
                        Notebooks.CreateNotebookDialog dialog =
290
310
                                new Notebooks.CreateNotebookDialog (parent,
304
324
                                Logger.Warn ("Could not create notebook: {0}", notebookName);
305
325
                        } else {
306
326
                                Logger.Debug ("Created the notebook: {0} ({1})", notebook.Name, notebook.NormalizedName);
 
327
                                
 
328
                                if (notesToAdd != null) {
 
329
                                        // Move all the specified notesToAdd into the new notebook
 
330
                                        foreach (Note note in notesToAdd) {
 
331
                                                NotebookManager.MoveNoteToNotebook (note, notebook);
 
332
                                        }
 
333
                                }
307
334
                        }
308
335
                        
309
336
                        return notebook;