-
Notifications
You must be signed in to change notification settings - Fork 757
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 option to use ComboBoxes instead of Tabs and enable re-ordering of documents in the Documents Docklet #2555
Conversation
Update from original
Update branch
clean better implementation using show()/hide()
comboBox disappears (if option selected) when removing splits
Tabs connected to Docklet
clean connection from Docklet to Tabs
…collider into ide-rework-sqc
@@ -353,7 +361,9 @@ Document *DocumentManager::open( const QString & path, int initialCursorPosition | |||
doc->mDoc->setPlainText( decodeDocument(bytes) ); | |||
doc->mDoc->setModified(false); | |||
doc->mFilePath = filePath; | |||
doc->mTitle = info.fileName(); | |||
QString fileTitle = info.fileName(); | |||
doc->mTitle = fileTitle; |
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.
This appears to be redundant, as setTitle() also sets the member variable.
doc->mTitle = info.fileName(); | ||
QString fileTitle = info.fileName(); | ||
doc->setTitle(fileTitle); | ||
doc->mTitle = fileTitle; |
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.
This appears to be redundant (see above)
document->mTitle = QString::fromUtf8(title.c_str()); | ||
QString newTitle = QString::fromUtf8(title.c_str()); | ||
document->setTitle(newTitle); | ||
document->mTitle = newTitle; |
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.
This appears to be redundant (see above)
@@ -55,7 +55,7 @@ class GenericCodeEditor : public QPlainTextEdit | |||
|
|||
void showPosition( int charPosition, int selectionLength = 0 ); | |||
QString symbolUnderCursor(); | |||
int inactiveFadeAlpha() { return mInactiveFadeAlpha; } | |||
int inactiveFadeAlpha() { return mInactiveFadeAlpha; }; |
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.
The semi-colon is not required here, so I'd undo this change to avoid adding noise to git blame.
@@ -91,6 +97,7 @@ class DocumentsDocklet : public Docklet | |||
private: | |||
|
|||
DocumentListWidget *mDocList; | |||
|
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'd lose this line, as it's just additional unnecessary whitespace
7cfbd07
to
eca501b
Compare
maybe solves this (?): #2612 |
@LucaDanieli, that's good. Before merging we should just do a clean PR which combines those adjustments with the original commits (I can show you how) in order to avoid polluting the commit log with no-ops. Any other comments on this? |
I understand this mostly, but I'm not clear on what is meant by "Convert automatically to ComboBox when splitting." What is a "split"? |
Hi Nathan. Splitting is the ability to "split" the editor docklet into many editors, so to show different documents at once. You can find if in "view->split to right, view->split to bottom". Previously, all splits were sharing the same tab bar. This could be confusing. So, we wanted to add the possibility of making clearer the association document/editor for each split, providing the option to keep the original behaviour. |
Ok, makes sense. Thanks for your work on this. I've filed a PR (#2639) to reword some of the checkboxes so they're easier to understand at a glance. |
I think this was merged prematurely. There are a couple of issues:
|
Not sure how you want to fix this re: separate issues or PRs so I thought I would just raise them here first. |
Thank you Brian for your review. About the first two points: I am not English mothertongue and for me naming things is one of the most difficult things. I apologise. |
@LucaDanieli I think you should just keep working on this branch. |
No need to apologize, this is a fantastic feature and I'm really glad you guys added it! Text strings are the easiest things to change so it's no big deal. :)
Unfortunately these are macOS-specific commands for moving between applications, similar to |
@brianlheim The Ctrl+Tab shortcut was already implemented, so I thought it was already working on different platforms. @muellmusik can you check what is the shortcut in Mac for switching among "last documents used"? This menu was working on your Mac, if I remember well. |
I didn't know how to cue the fix in this PR, so the fix is in this PR: #2641 |
@LucaDanieli @muellmusik My apologies, the shortcut for macOS is already |
Scott Wilson, Scott Carver and I developed the management of the documents in SuperCollider, connecting the Documents Docklet to the TabBar.
Here, 2 new options are added to Preferences->Editor :
The documents docklet is dynamic and permits the re-ordering of documents. Furthermore, the TabBar and the Documents Docklet always show the documents in the same order, and any re-ordering in the TabBar affects the order of the documents in the docklet (and viceversa).
ComboBoxes are implemented to make clearer what is the document visualised by each split. Following a discussion in 2014, we have sorted each ComboBox alphabetically - to quickly find specific documents in performance.
In this way there are now 3 different types of ordering: