Close Tab item on right-click menu

14 views
Skip to first unread message

Graham Harris

unread,
Jan 31, 2018, 2:46:50 AM1/31/18
to wikidpad-devel
It seems odd to me that there is an option to Close Tab on the menu that appears when you right click within WikidPad's edit pane.

Odd because there's already a Close Tab x on the tab itself.

and inconvenient since very regularly, merely bringing up the right-click menu to correct a spelling error or add a spelling to a spell list seems to auto-select the Close Tab option and bang! the tab I was trying to correct is closed.

Does anyone think that the right-click menu really should have Close Tab on it, given that functionality is so easily available elsewhere?

Where would we need to disable this in the source code? I use WikidPad 2.3beta16, which I find generally solid as a rock.

Best
Graham

Graham Harris

unread,
Jan 31, 2018, 3:33:42 AM1/31/18
to wikidpad-devel
Come to think of it, this is an instance of a more general problem with that menu.

Maybe it's a linux thing- keen to hear from Windows and Mac users- but when you right-click the menu seems to spring either up from your cursor position or down from it, depending whether your cursor is nearer the bottom or top of the edit window. Then, either the bottom item (close tab) or the top item (an alternate spelling) is selected by default.

Leading in my case, to either the tab closing, or an inappropriate spelling correction, more often than not.

I never noticed this until I installed the spelling add-in (linux) so maybe it's related to that. I used to right-click all the time to follow a link into a new tab, without noticing the problem.

Michael Butscher

unread,
Jan 31, 2018, 7:33:32 PM1/31/18
to wikidpa...@googlegroups.com
On 31.01.2018 09:33, Graham Harris wrote:
> Come to think of it, this is an instance of a more general problem with
> that menu.
>
> Maybe it's a linux thing- keen to hear from Windows and Mac users- but when
> you right-click the menu seems to spring either up from your cursor
> position or down from it, depending whether your cursor is nearer the
> bottom or top of the edit window. Then, either the bottom item (close tab)
> or the top item (an alternate spelling) is selected by default.

On Windows, the placement is the same but the behavior differs:
* The menu appears after releasing the right mouse button
* No menu item is under the mousepointer or in other way preactivated.

As I'm mainly using Windows I didn't notice a problem here.

>> Where would we need to disable this in the source code? I use WikidPad
>> 2.3beta16, which I find generally solid as a rock.

In "lib/pwiki/WikiTxtCtrl.py"

There is (beginning about at line 4205):

_CONTEXT_MENU_INTEXT_BOTTOM = \
u"""
-
Close Tab;CMD_CLOSE_CURRENT_TAB
"""


After deleting two lines in the middle you should have:


_CONTEXT_MENU_INTEXT_BOTTOM = \
u"""
"""

And the menu item is gone.



Michael

Graham Harris

unread,
Jan 31, 2018, 7:39:46 PM1/31/18
to wikidpad-devel
Thanks Michael

Christian Ziemski

unread,
Feb 1, 2018, 3:58:46 AM2/1/18
to wikidpa...@googlegroups.com
On 31.01.2018 at 09:33 Graham Harris wrote:
> Come to think of it, this is an instance of a more general problem with
> that menu.
>
> Maybe it's a linux thing- keen to hear from Windows and Mac users- but
> when you right-click the menu seems to spring either up from your cursor
> position or down from it, depending whether your cursor is nearer the
> bottom or top of the edit window. Then, either the bottom item (close
> tab) or the top item (an alternate spelling) is selected by default.

Using Fedora Linux.

No preselected item here and so no such problems.

But I don't have the spellchecker installed.
Perhaps that one really changes the behaviour somehow?!

Christian

Graham

unread,
Feb 3, 2018, 11:28:00 PM2/3/18
to wikidpa...@googlegroups.com
I suspect something strange about the way my mouse is set up; some
timing thing, or perhaps just me being cack-handed. I can't see anything
in the control panel that looks like it would make any difference to
right-clicking.
Reply all
Reply to author
Forward
0 new messages