-
-
Notifications
You must be signed in to change notification settings - Fork 455
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 edit menu when editing text #725
Comments
Ah... let me know if this sounds right: you're saying that on Linux, we don't have the That's because of Qt using the native stuff on teach platform, but we could probably implement our own for Linux (and Windows too) where that menu is not provided by the OS. Am I understanding that correctly? +1 from me |
Not really. What I'm trying to say, is that there is no Here is an example of such I believe this is not a custom functionality but rather should be in standard QT library. Also have to mention that to type special characters on Linux (probably also on Windows) - there is system wide way to do so. On Mac - looks each program individually should provide an option to open system |
Factor out the repeated actions into a reusable list. Related-to: git-cola#725 Signed-off-by: David Aguilar <davvid@gmail.com>
Related-to: git-cola#725 Signed-off-by: David Aguilar <davvid@gmail.com>
Add an "Edit" menu to the main menubar. * edit-menu: qtutils: add add_menu() helper main: add an Edit menu commitmsg: refactor extra actions Closes git-cola#725 Signed-off-by: David Aguilar <davvid@gmail.com>
Hi @davvid. Thanks for implementing this functionality. It's really helpful. Anyway, looks like |
Ah, interesting. Currently we basically hijack the menu from either of I'm curious -- does it work at all if you use the right-click context menu in the text fields and use the menu through there? |
hi @davvid. Just tested it. Actually, there is no this option in right-click context menu. |
I tried this out on linux with the emoji-keyboard and the text fields work with unicode just fine, so I'm dusting off the macos laptop to try this out later. I have to wait for xcode to update so I can have my git toolchain back after the last macOS update ;-) That menu item is being automatically provided by Qt (or the OS), so it may be that we have to implement some methods to make it start working |
Thanks @davvid. Looking forward for this fix 😊 |
hi @davvid. looks like the issue happens because of loosing focus by input field. Here is an example of html input in chrome browser: And here is and example from git-cola input - it looses focus when emoji window open (there is no cursor pointer in input field): |
Ensure that the "Edit" menu is populated during startup so that it is always displayed. Not doing so causes the menu to not be displayed on macOS unless the user switches away from the app, which triggers an update when focus returns. Related-to: git-cola#725 Signed-off-by: David Aguilar <davvid@gmail.com>
I noticed that the edit menu does not always display itself on macOS, so I tweaked it so that it's built during startup. Not directly related, but something I ran into while testing. I was finally able to get reliable behavior out of the emoji window by clicking on the expand toggle button in the upper-right corner of the emoji window. When in the expanded view, double-clicking the icons inserts the symbol into the text field. The focus thing is an interesting detail; maybe there's something we can do about that. I'll reopen this issue in case anyone has any other tricks we can do to make it more reliable.. at least it does seem to work in the expanded view.. |
Actually, by clicking on the expand toggle button - input window gets it's focus again. the same situation happens when drag emoji window (#725 (comment)) |
This one is a real rabbit hole.. It only works when the window is moved/detached from the little "up" arrow indicator that's initially displayed, as you already know. We were doing something kinda funky where we were rebuilding the menu dynamically, but I've just changed that now to use a static Edit menu, which should at least rule that out as a possibility. There's a chance that this may actually be a Qt bug, so it'd be good to report it upstream. The behavior is really consistent, and there's nothing that I can seem to do to make it work correctly. Here is a minimal test case that shows the issue. This is really starting to look like a QTBUG ~ the "Emoji & Symbols" menu is a built-in thing that is handled internally by Qt. In the code below all we do is create an Edit menu -- macOS/Qt does the rest automatically. The behavior is identical ~ it ignores the input, but works if I move or expand the emoji window. Bummer..
|
Hi @davvid. Not sure, what has been changed. But in git-cola version 3.0 |
Usually, all the programs which has text input fields - provides standard
Edit
menu with actions like:Undo
,Redo
,Copy
,Paste
, etc.Also, (probably because of using some kind of standard system library for this) in such kind on
Edit
menu on Mac there isEmoji & Symbols
option. I often use non standards symbols in my commits (mostly emojis 🙂), so I miss this type of menu in the app. As temporary solution I have to switch to terminal to provide commit message. Not very convenient 😞.The text was updated successfully, but these errors were encountered: