New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add "Close Documents To The Right" to document context menu #566
Conversation
{ | ||
GeanyDocument *doc = documents[i]; | ||
|
||
if (! doc->is_valid) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use DOC_VALID()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't necessarily like it, but I think the "sanctioned" way is like:
guint i;
foreach_document(i)
{
if (! document_close(document[i]))
break;
}
Nevermind, didn't notice the starting at document non-zero (though I'm not sure order of the documents array strictly matches visible order).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a very valid remark. No, the documents_array is not in "tab order".
See document_account_for_unsaved() (but I think it would be better to create a copy and sort it with g_ptr_array_sort() and document_compare_by_tab_order(), it's kind of ugly to loop through the notebook pages directly IMO)
Btw, firefox has this too. |
Should it have "Close Documents to the Left" too? And what happens if the GUI is layed-out for right-to-left? |
I think to the left is not as useful because new tabs are always added to the right of the current doc or to the end (most right). I think this is more used in a "close recently opened" sense. Firefox has only close to the right. |
That's what made me think of it, because I'm always annoyed in Firefox that I can't do it. It might be different for browser tabs, but I often find as I add more tabs on the right I get to a point where I just want to close all but the newest tabs (those to the left of one of the right-most tabs). I don't know for sure if it transfers to editor tabs though. |
Regarding the right/left naming there's also a problem when the tabs are on the right side, which is how I use Geany, and where it becomes top/bottom. |
Yeah, I use tabs on the left side, suggested above that the message become On 14 July 2015 at 19:04, Jiří Techet notifications@github.com wrote:
|
@ndunsworth Are you still working on this and want it to be merged? If not we might close this. |
Add a "Close Documents To The Right" option to the right click context menu of documents.
This functionality mimics a feature found in the Chrome web-browser for quickly closing all open tabs after the selected one.