GNOME Bugzilla – Bug 601852
Search window context menus rework
Last modified: 2011-05-20 20:02:08 UTC
Created attachment 147700 [details] [review] Patch, implementing new feature proposed. A patch, that lets create new note from context menu in notes list. Currently only editing end deleting is possible. Ability to create new note from the same context menu seems natural to me.
Why did you remove the following lines in your patch? Typo? - // we need to test gobj() isn't NULL. - // See Gtkmm bug 586437 - // https://bugzilla.gnome.org/show_bug.cgi?id=586437 - if (dest_path.empty() || !dest_path.gobj()) - return false;
These lines allow context menu only when right click is done on a row in notes list. New note should be available even when notes list is empty, that's the reason for removal. BTW, I think this patch can be improved: when a notebook is selected, any new note should be created in that notebook. Right now, when you create new note using window menu (or context menu, implemented in this patch), new note is not assigned to notebook, which seems a bit confusing to me. Don't you think so?
(In reply to comment #2) > These lines allow context menu only when right click is done on a row in notes > list. New note should be available even when notes list is empty, that's the > reason for removal. I see. > BTW, I think this patch can be improved: when a notebook is selected, any new > note should be created in that notebook. Right now, when you create new note > using window menu (or context menu, implemented in this patch), new note is not > assigned to notebook, which seems a bit confusing to me. Don't you think so? There are two context menus -- one each for the right and left panes. If you use the menu on the left pane with a notebook selected, you can create a note and it will be in the selected notebook. Maybe you can see how it is done for your patch.
(In reply to comment #3) > > BTW, I think this patch can be improved: when a notebook is selected, any new > > note should be created in that notebook. Right now, when you create new note > > using window menu (or context menu, implemented in this patch), new note is not > > assigned to notebook, which seems a bit confusing to me. Don't you think so? > > There are two context menus -- one each for the right and left panes. If you > use the menu on the left pane with a notebook selected, you can create a note > and it will be in the selected notebook. Maybe you can see how it is done for > your patch. It looks like using NewNotebookNoteAction in place of NewNoteAction should do it. I'll try it.
Created attachment 148553 [details] [review] Better solution: always available item, dealing with notebooks -Add new note to selected notebook (if any). -Action is always enabled (no reason to disable it).
Actually I was expecting a behaviour more aligned towards that of the context menus for the notebooks. When right clicked over notebook names it lets you create a new note but not a new notebook, while clicking outside lets you add a new notebook. We can have something similar for the right panel too. When right clicked over notes and a note is already selected using left click, allow only open and delete. In all other cases allow only new notes to be created. You can look at the notebook code in src/notebooks/ and src/recentchanges.cpp. They use two separate context menus.
(In reply to comment #6) > Actually I was expecting a behaviour more aligned towards that of the context > menus for the notebooks. When right clicked over notebook names it lets you > create a new note but not a new notebook, while clicking outside lets you add a > new notebook. We can have something similar for the right panel too. When right > clicked over notes and a note is already selected using left click, allow only > open and delete. In all other cases allow only new notes to be created. That has a problem: if you have enough notebooks to fill the notebook list, you can not create new notebook from context menu anymore. Notes list is much more likely to become full. Maybe it's notebooks list needs a fix? Also, right click on note doesn't select it, while context menu works on a selection. This seems to be related with the fact, that notebooks list is single-select, while notes list is multi-select.
Created attachment 149597 [details] [review] Rework of both context menus New solution: rework of both bontext menus: * Use only one context menu in notebooks list, because the second is not always available (when there are a lot of notebooks, you can not click on empty place, also, it is not possible to press the context menu key on empty place). "New notebook" item has been added to the first context menu, while the second is removed. * Added "new note" item to notes list context menu. * Both context menus (from above) are divided into 2 parts using separator: above separater are items, related to selection, below it - items, related to entire pane.
Created attachment 166862 [details] [review] Update of previous with small modifications Updated the patch to apply for current code. A change is, that "New Note" menu item to notes list is now added by NotebookApplicationAddin.
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.