-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Reworking qtconsole shortcut, add fullscreen #776
Conversation
This looks fine to me, but the Qt code is mostly @epatters authorship, so I'd like to get his input on this PR before taking any action. |
Thanks, @fperez. I meant to comment on this earlier, but it slipped through the cracks... @Carreau, Thanks for the contribution! This is a nice feature, but I have a couple comments about the implementation:
|
@epatters, many thanks for pitching in! @Carreau, feel free to simply rebase and do a forced push on this branch to remove the master merges (I didn't read the commit log carefully enough, I should have pointed that issue right away!). Once you address the issues raised by @epatters, we should be able to move forward with this. |
Hi, I'll try to find how to write unit-testing for the shortcut in qtconsole. |
@Carreau, generally you shouldn't have to worry about rebasing or merging in the master branch, unless you actually need some new change from the master branch. For a small change like this one, a single merge once the PR is ready is usually sufficient, and GitHub handles this automatically. Also, don't worry about trying to unit test this. I know we are deficient in this regard, but it's a larger project that will require some thought about how to effectively test a complex widget like this one. |
So I unmerged the master branch, and put the code in I've done the same with I forced-pushed the branch |
Great, this is almost ready for merge. Thank you for reworking this. A few minor comments:
Also, you should consider adding a note to the %guiref about the keybinding, so that other users have a hope of discovering your new feature. See: https://github.com/ipython/ipython/blob/master/IPython/core/usage.py#L375 |
Sory for 2. , i'll fix it. |
re. min/maximizing: I think that should be left alone and for the OS to handle. Sorry if some OSes don't expose keybindings for it, but I don't think individual applications should start messing with the job of the window manager. It's bad enough that 'full screen' is already spelled in a million different ways from application to application, we shouldn't compound that problem by also making application-level bindings for other window management tasks. In Gnome, it's easy enough to configure keybindings for those (I've done it). There may be OSX extensions/apps that do it there too, but that's not our job. |
add a toggleFullscreen action to qtconsoleapp and connect it to the 'Ctrl+Meta+Space' shortcut (which is Command+Ctrl+Space on Mac) add shortcut description in %guiref move maximize and minimize shortcut/fonction to another branch
I agree that it should be left to the os to handle. I'll remove all reference to Max/Min imizing and rebase to a have a clean commit. I'll put this Maximizing/Minimising function in a separate branch, but I think that we still should support it. We can still have the same discussion about full-screen arguing that with most tilling manager you should be able to get full-screen application even if they doesn't support it. |
This looks great, @Carreau. Thank you for your contribution! Regarding the minimize/maximize shortcuts, I'm not sure your comparison is fair. I'm aware of many applications that, for better or worse, include a shortcut for full screen mode, but none that include shortcuts for minimization and maximization. I think we should be trying to conform to UI conventions rather an inventing our own. |
Reworking qtconsole shortcut, add fullscreen
I totally agree that an application should conform to UI convention for every system it can be installed on. So speeking about UI, For now, on OSX, IPython, with the Qt console look like any other python app, ie generic python icon on the task switcher and dock, the 'menu bar' on top of the screen doesn't have any action like closing and else, and the name of the app is just 'Python' If I implement a conditional 'darwin' only UI modification to the qt console which for example map some shortcut to minimizing/maximizing and put an 'IP[y]:' icon on the task-switcher..etc. does it have a chance to be accepted ? I'm really happy to give a small contribution to IPython, and I hope i'll be able able to convert more people to it. |
The qtconsole is not really an application - it's a widget with the thinnest possible QApplication wrapper to get it running. A real app would add things like menu items, sensible platform icons/controls, etc. (e.g. a nice settings interface for configuration). We certainly do want a real QtConsole application, and this kind of work could be the beginning of that. |
Reworking qtconsole shortcut, add fullscreen
Hi,
As I really like sometime to work in fullScreen (not Maximized), i add this option to the qtconsole through the shortcut ctrl+alt+space.
I also Find that the if-elsif-..-else way to deal with shortcut is a bit complex to read, so i'm rearranging it with {Qt.Key_X: function to call} dictionnary
i'll do the same for ctrl+alt+shift, ctrl+shift ... etc
I conclude with a question about those same shortcut:
the "pressing return/Enter" event intercept most of the action and prevent futur treatment by ctrl_down, or alt_down cases.
Do you mind if I change this beaviour ?