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

Mac version references incorrect shortcut #1539

Closed
ThinkDigitalRepair opened this Issue Sep 24, 2018 · 11 comments

Comments

Projects
None yet
3 participants
@ThinkDigitalRepair
Copy link

ThinkDigitalRepair commented Sep 24, 2018

Details for the issue

screen shot 2018-09-23 at 5 35 01 pm

In Mac, it's Command + shift + click

What did you expect to see?

Command + shift + click

What did you see instead?

Ctrl + shift + click

Useful extra information

The info below often helps, please fill it out if you're able to. :)

What operating system are you using?

  • Windows: ( version: ___ )
  • Linux: ( distro: ___ )
  • Mac OS: ( _version: 12.0 )
  • Other: ___

What is your DB4S version?

  • 3.10.1
  • 3.10.0
  • 3.9.1
  • Other: ___

Did you also

@justinclift

This comment has been minimized.

Copy link
Member

justinclift commented Sep 24, 2018

Ahhh. I know we've made some changes to the displayed shortcuts since the last release (3.10.1), but I'm not sure if they're for OSX or not.

Ironically... I don't have handy access to an OSX box atm, so can't really test the nightly build myself either. Um... if you do have a few minutes to check after all, it would be useful. 😇

@ThinkDigitalRepair

This comment has been minimized.

Copy link
Author

ThinkDigitalRepair commented Sep 24, 2018

OK, just for you 😄

@ThinkDigitalRepair

This comment has been minimized.

Copy link
Author

ThinkDigitalRepair commented Sep 24, 2018

Yes, it still shows the same incorrect shortcut in v3.10.99

@justinclift

This comment has been minimized.

Copy link
Member

justinclift commented Sep 24, 2018

Thanks @ThinkDigitalRepair, we'll need to get that fixed then. 😄

mgrojo added a commit that referenced this issue Sep 24, 2018

Mac version references incorrect shortcut in FK navigation #1539
Using QKeySequence(Qt::CTRL).toString() should be translated according to
OS, either to Ctrl+ or Command+.

Known problem: there are other tooltips referencing control key sequences
but they are in *.ui files and this method cannot be used.

Note: QKeySequence(Qt::CTRL + Qt::Key_Shift).toString() showed weird
output under Linux.
@mgrojo

This comment has been minimized.

Copy link
Contributor

mgrojo commented Sep 24, 2018

I cannot test it under Mac, but according to Qt documentation, this particular case should be fixed now.

But there are other cases of key sequences referenced in tooltips or What's This info that cannot be fixed so easily. They are in *.ui files. If somebody knows have to fix these, please share here the tip:

EditDialog.ui:289:        <string>Apply data to cell [Ctrl+Return]</string>
MainWindow.ui:138:             <string>Refresh the data in the selected table [F5, Ctrl+R]</string>
MainWindow.ui:237: - Ctrl+&quot; for duplicating the current record.
MainWindow.ui:238: - Ctrl+' for copying the value from the cell above.
MainWindow.ui:1681:    <string>Execute all/selected SQL [F5, Ctrl+Return, Ctrl+R]</string>
MainWindow.ui:2063:    <string>Find text in SQL editor [Ctrl+F]</string>
MainWindow.ui:2084:    <string>Find or replace text in SQL editor [Ctrl+H]</string>
MainWindow.ui:2306:    <string>Print text from current SQL editor tab [Ctrl+P]</string>
PlotDock.ui:75:Click on points to select them in the plot and in the table. Ctrl+Click for selecting a range of points.

@mgrojo mgrojo self-assigned this Sep 24, 2018

@ThinkDigitalRepair

This comment has been minimized.

Copy link
Author

ThinkDigitalRepair commented Sep 24, 2018

According to this page .ui files are just plain text xml files

@justinclift

This comment has been minimized.

Copy link
Member

justinclift commented Sep 24, 2018

Yeah, they are. Not sure how to add conditional compilation to those though, unlike with the .h/.cpp files where we do that fairly often.

eg (picking a random example here):

#ifdef Q_WS_WIN
QApplication::addLibraryPath(QApplication::applicationDirPath() + "/plugins");
#endif

With conditional compilation we can say effectively "If this is being compiled on OSX, use XYZ bit of code. If instead it's Windows, use ABC". That'd work for displaying different shortcuts for different platforms.

Even without conditional compilation, if the tool tip was created at run time we could do the same thing. With the string embedded directly like that though... not sure.

Maybe we could add some kind of runtime/startup code that - for OSX only - overwrites those tooltip strings in the created app?

mgrojo added a commit that referenced this issue Sep 25, 2018

Mac version references incorrect shortcut in FK navigation (ammend) #…
…1539

According the documentation, the default value is PortableText which is
only for writing configuration. NativeText has to be used for display to
user.

This amends 87310a6
@mgrojo

This comment has been minimized.

Copy link
Contributor

mgrojo commented Sep 26, 2018

@ThinkDigitalRepair The case that you reported should be fixed in a nightly build. Could you confirm that the change done in source actually converts the key name to what a Mac user expects?

The cases of tooltip defined in the ui files are pending until we get a good idea on how to translate the key names to a native name.

@ThinkDigitalRepair

This comment has been minimized.

Copy link
Author

ThinkDigitalRepair commented Sep 26, 2018

@mgrojo, after checking, it has been fixed in the latest nightly. Thank you .
screen shot 2018-09-26 at 11 52 06 am

@mgrojo

This comment has been minimized.

Copy link
Contributor

mgrojo commented Sep 26, 2018

Nice. Thank you for confirming, @ThinkDigitalRepair.

@ThinkDigitalRepair

This comment has been minimized.

Copy link
Author

ThinkDigitalRepair commented Sep 26, 2018

My pleasure

mgrojo referenced this issue in lulol/sqlitebrowser Oct 14, 2018

Updated Spanish translation
Updated Spanish translation for v3.11.0-alpha1 branch and some consistence changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment