Duplicate Accelerators

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Duplicate Accelerators

prculley
I see that some users have spotted a warning message from Gramps that is occurring in master branch (5.1).
WARNING: uimanager.py: line 375: **Duplicate Accelerator <PRIMARY>P

This is caused by some of our code (charts, geography) attempting to use the <CTRL>P as a screen print  when the same <CTRL>P is assigned to go to the next view.

I'm open to suggestions on how to resolve this issue.  Currently we get the warning and <CTRL>P remains set to 'previous view' function.  So attempting to print the view this way doesn't work.

We could;
  1. drop the screen print via this accelerator, the menu method still works.
  2. drop the <CTRL>P <CTRL>N functionality for switching views
  3. pick a different accelerator for screen print (a lot of apps do use <CTRL>P so only users who carefully read the documentation would probably ever find this).
Or something else...

Suggestions welcome.
Paul C.


_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Duplicate Accelerators

John Ralls-2


> On Jun 14, 2019, at 6:39 AM, Paul Culley <[hidden email]> wrote:
>
> I see that some users have spotted a warning message from Gramps that is occurring in master branch (5.1).
> WARNING: uimanager.py: line 375: **Duplicate Accelerator <PRIMARY>P
>
> This is caused by some of our code (charts, geography) attempting to use the <CTRL>P as a screen print  when the same <CTRL>P is assigned to go to the next view.
>
> I'm open to suggestions on how to resolve this issue.  Currently we get the warning and <CTRL>P remains set to 'previous view' function.  So attempting to print the view this way doesn't work.
>
> We could;
> • drop the screen print via this accelerator, the menu method still works.
> • drop the <CTRL>P <CTRL>N functionality for switching views
> • pick a different accelerator for screen print (a lot of apps do use <CTRL>P so only users who carefully read the documentation would probably ever find this).
> Or something else...

Let's not call it "screen print", that usually refers to an OS function that prints out an image of the whole screen. The chart and geography views provide a "print" function that prints only what is presently visible in the window's viewport, and that's not what is the usual meaning of the <ctrl>p accelerator, which is to print the whole currently-focussed document, a pretty meaningless concept in Gramps.

Ctrl-n to the extent that it's used outside of text editing usually means "new document" or "new window". Aren't the accelerators in Gramps 50 for previous and next <ctrl><left-arrow> and <ctrl><right-arrow>? If so maybe we should go back to those.

Regards,
John Ralls




_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Duplicate Accelerators

prculley
You are correct in the 'screen print' comment, I chose poor terminology.

I cannot find any evidence that next/previous view used <ctrl>left-arrow or <ctrl>right arrow.  I did a quick test to see what would happen if I changed to those accelerators, it avoids the duplicates problem, however, because those key combos are used by Gtk editing functions to go word back/forward, if anyone tries to use them within a Gramplet to edit an entry, they jump the view instead.

In my opinion, <ctrl>left/right is more likely to be well known for word left/right, so using them for that may confuse or annoy Gramps users.

This sort of issue is why I'm looking for brilliant ideas 🤔.

Paul C.
P.S. I did my testing on Windows, I assume the results are similar on Linux/OSX...

On Fri, Jun 14, 2019 at 10:00 AM John Ralls <[hidden email]> wrote:


> On Jun 14, 2019, at 6:39 AM, Paul Culley <[hidden email]> wrote:
>
> I see that some users have spotted a warning message from Gramps that is occurring in master branch (5.1).
> WARNING: uimanager.py: line 375: **Duplicate Accelerator <PRIMARY>P
>
> This is caused by some of our code (charts, geography) attempting to use the <CTRL>P as a screen print  when the same <CTRL>P is assigned to go to the next view.
>
> I'm open to suggestions on how to resolve this issue.  Currently we get the warning and <CTRL>P remains set to 'previous view' function.  So attempting to print the view this way doesn't work.
>
> We could;
>       • drop the screen print via this accelerator, the menu method still works.
>       • drop the <CTRL>P <CTRL>N functionality for switching views
>       • pick a different accelerator for screen print (a lot of apps do use <CTRL>P so only users who carefully read the documentation would probably ever find this).
> Or something else...

Let's not call it "screen print", that usually refers to an OS function that prints out an image of the whole screen. The chart and geography views provide a "print" function that prints only what is presently visible in the window's viewport, and that's not what is the usual meaning of the <ctrl>p accelerator, which is to print the whole currently-focussed document, a pretty meaningless concept in Gramps.

Ctrl-n to the extent that it's used outside of text editing usually means "new document" or "new window". Aren't the accelerators in Gramps 50 for previous and next <ctrl><left-arrow> and <ctrl><right-arrow>? If so maybe we should go back to those.

Regards,
John Ralls




_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Duplicate Accelerators

John Ralls-2
BTW, I got another conflict running Gramps master in MacOS:

  **Duplicate Accelerator <PRIMARY>q

<PRIMARY>Q is Quit on Mac and it's processed by the OS, so whatever Gramps has it set to won't ever get it.

Regards,
John Ralls


> On Jun 14, 2019, at 3:27 PM, John Ralls <[hidden email]> wrote:
>
> Paul,
>
> Sorry, I thought you meant the accelerators for Go>Back and Go>Forward, as shown in the attached screenshot (at the bottom below the quoted text because I don't remember how SourceForge's list server deals with attachments), but I see that they're the same in master. So what forward & back accelerators do you mean?
>
> The Gtk editing shortcuts only apply when either a GtkTextEdit or GtkEntry has focus, and Gtk's bottom-up event resolution should make sure that they behave as one would expect: If a GtkEntry has focus then you're typing at it and you want the editing shortcuts to apply; if you want the accelerator to work then you need to move focus to something that isn't an editable field.
>
> You could use a multi-key shortcut, e.g. <ctrl><shift><n>; more mod-keys makes a collision less likely. I doubt that there's a "brilliant solution" simply because there aren't that many available keys and Gramps already has a lot of accelerators.
>
> Regards,
> John Ralls
>
>
>
>
>> On Jun 14, 2019, at 2:26 PM, Paul Culley <[hidden email]> wrote:
>>
>> You are correct in the 'screen print' comment, I chose poor terminology.
>>
>> I cannot find any evidence that next/previous view used <ctrl>left-arrow or <ctrl>right arrow.  I did a quick test to see what would happen if I changed to those accelerators, it avoids the duplicates problem, however, because those key combos are used by Gtk editing functions to go word back/forward, if anyone tries to use them within a Gramplet to edit an entry, they jump the view instead.
>>
>> In my opinion, <ctrl>left/right is more likely to be well known for word left/right, so using them for that may confuse or annoy Gramps users.
>>
>> This sort of issue is why I'm looking for brilliant ideas 🤔.
>>
>> Paul C.
>> P.S. I did my testing on Windows, I assume the results are similar on Linux/OSX...
>>
>> On Fri, Jun 14, 2019 at 10:00 AM John Ralls <[hidden email]> wrote:
>>
>>
>> > On Jun 14, 2019, at 6:39 AM, Paul Culley <[hidden email]> wrote:
>> >
>> > I see that some users have spotted a warning message from Gramps that is occurring in master branch (5.1).
>> > WARNING: uimanager.py: line 375: **Duplicate Accelerator <PRIMARY>P
>> >
>> > This is caused by some of our code (charts, geography) attempting to use the <CTRL>P as a screen print  when the same <CTRL>P is assigned to go to the next view.
>> >
>> > I'm open to suggestions on how to resolve this issue.  Currently we get the warning and <CTRL>P remains set to 'previous view' function.  So attempting to print the view this way doesn't work.
>> >
>> > We could;
>> >       • drop the screen print via this accelerator, the menu method still works.
>> >       • drop the <CTRL>P <CTRL>N functionality for switching views
>> >       • pick a different accelerator for screen print (a lot of apps do use <CTRL>P so only users who carefully read the documentation would probably ever find this).
>> > Or something else...
>>
>> Let's not call it "screen print", that usually refers to an OS function that prints out an image of the whole screen. The chart and geography views provide a "print" function that prints only what is presently visible in the window's viewport, and that's not what is the usual meaning of the <ctrl>p accelerator, which is to print the whole currently-focussed document, a pretty meaningless concept in Gramps.
>>
>> Ctrl-n to the extent that it's used outside of text editing usually means "new document" or "new window". Aren't the accelerators in Gramps 50 for previous and next <ctrl><left-arrow> and <ctrl><right-arrow>? If so maybe we should go back to those.
>>
>> Regards,
>> John Ralls
> <Screen Shot 2019-06-14 at 2.38.16 PM.png>
>
>



_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Duplicate Accelerators

Nick Hall
In reply to this post by prculley
On 14/06/2019 14:39, Paul Culley wrote:
> I see that some users have spotted a warning message from Gramps that
> is occurring in master branch (5.1).
> WARNING: uimanager.py: line 375: **Duplicate Accelerator <PRIMARY>P
>
I've created bug #11186 for this and added it to the roadmap.

Paul, shall I assign it to you?

Nick.



_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Duplicate Accelerators

prculley
I'll be happy to fix this once we figure out a reasonable fix.

John; the <PRIMARY>P is assigned to switch Views, I think you are confusing with the  <PRIMARY>Left/Right for switching to previous/next selected item within the view.

Paul C.

On Sat, Jun 15, 2019 at 3:53 PM Nick Hall <[hidden email]> wrote:
On 14/06/2019 14:39, Paul Culley wrote:
> I see that some users have spotted a warning message from Gramps that
> is occurring in master branch (5.1).
> WARNING: uimanager.py: line 375: **Duplicate Accelerator <PRIMARY>P
>
I've created bug #11186 for this and added it to the roadmap.

Paul, shall I assign it to you?

Nick.



_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel


_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Duplicate Accelerators

John Ralls-2
Paul,

OIC. That's not exposed on any menu, so no wonder I couldn't find it. Yes, I thought that you meant Go>Back/Go>Forward.

How about <PRIMARY><up-arrow> and <PRIMARY><down-arrow>? A different or some combination of modifiers?

Regards,
John Ralls


> On Jun 15, 2019, at 2:32 PM, Paul Culley <[hidden email]> wrote:
>
> I'll be happy to fix this once we figure out a reasonable fix.
>
> John; the <PRIMARY>P is assigned to switch Views, I think you are confusing with the  <PRIMARY>Left/Right for switching to previous/next selected item within the view.
>
> Paul C.
>
> On Sat, Jun 15, 2019 at 3:53 PM Nick Hall <[hidden email]> wrote:
> On 14/06/2019 14:39, Paul Culley wrote:
> > I see that some users have spotted a warning message from Gramps that
> > is occurring in master branch (5.1).
> > WARNING: uimanager.py: line 375: **Duplicate Accelerator <PRIMARY>P
> >
> I've created bug #11186 for this and added it to the roadmap.
>
> Paul, shall I assign it to you?
>
> Nick.
>
>
>
> _______________________________________________
> Gramps-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gramps-devel
> _______________________________________________
> Gramps-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gramps-devel



_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Duplicate Accelerators

Nick Hall
On 15/06/2019 22:50, John Ralls wrote:
> How about <PRIMARY><up-arrow> and <PRIMARY><down-arrow>? A different or some combination of modifiers?

Are you aware of the key bindings reference?

https://gramps-project.org/wiki/index.php?title=Gramps_5.0_Wiki_Manual_-_Keybindings

Nick.




_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Duplicate Accelerators

prculley
A bit of history;
Don Allingham added <alt>N and <alt>P to switch views in 2006.
Benny Malengier changed those to <ctrl>N and <ctrl>P in 2008 and they were later changed to <PRIMARY>N and <PRIMARY>P to support MAC.

I have no idea how many people are aware of these shortcut keys and use them, but seeing that they are documented in our wiki it is possible some do.

Unless there are more suggestions I will go with John Ralls suggestion to switch to <PRIMARY><up-arrow> and <PRIMARY><down-arrow.

I have also removed the <PRIMARY>q (Quit) on OSX only as the OS already had that assigned.


Paul C.



On Sat, Jun 15, 2019 at 5:02 PM Nick Hall <[hidden email]> wrote:
On 15/06/2019 22:50, John Ralls wrote:
> How about <PRIMARY><up-arrow> and <PRIMARY><down-arrow>? A different or some combination of modifiers?

Are you aware of the key bindings reference?

https://gramps-project.org/wiki/index.php?title=Gramps_5.0_Wiki_Manual_-_Keybindings

Nick.




_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel


_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Duplicate Accelerators

Nick Hall
On 27/06/2019 22:34, Paul Culley wrote:
> I have no idea how many people are aware of these shortcut keys and
> use them, but seeing that they are documented in our wiki it is
> possible some do.
>
Many people use the keyboard shortcuts.  I think we will get complaints
if we change them.

Nick.




_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel