[rkward-devel] Ctrl+S conflicting

Prasenjit Kapat kapatp at gmail.com
Fri Jan 23 04:40:10 UTC 2009


Hi All,

On Thu, Jan 22, 2009 at 7:42 PM, Stefan Rödiger <stefan_roediger at gmx.de> wrote:
> Am Tuesday 13 January 2009 08:29:27 schrieb Prasenjit Kapat:
>> Hi All,
>>
>> Since KDE 4.2 is about to release, I am test driving it on a separate
>> partition... So, I checked out the trunk of rkward from svn and am
>> giving it a spin... The compile seems to work without any errors (lots
>> of warnings, of course).
>>
>> When a script editor window is open, pressing Ctrl+S to save the file,
>> results in a conflict with the "Save Workspace" shortcut. This is
>> observed using the svn trunk of rkward and KDE 4.1.85 on Kubuntu 8.10.
>>
>> I presume Thomas is busy so any clarification will take time..
>>
>> I was fiddling with the svn code myself. Lines 349 - 352 of rkward.cpp
>> specifically sets Qt:ControlModifier + Qt::ShiftModifier + Qt::Key_S
>> as the action shortcut for "Save Workspace" but, the Shift modifier
>> seems to be ignored, as shown below:
>>
>> fileSaveWorkspace = actionCollection ()->addAction
>> KStandardAction::Save, "file_savex", this,
>> LOT(slotFileSaveWorkspace()));
>> fileSaveWorkspace->setText (i18n ("Save Workspace"));
>> fileSaveWorkspace->setShortcut (Qt::ControlModifier +
>> t::ShiftModifier + Qt::Key_S);
>> fileSaveWorkspace->setStatusTip (i18n ("Saves the actual document"));
>>
>> One solution (that works) is to change the Save shortcut of "Kate
>> Part"  from Kate to something other than Ctrl+S. But that an
>> outside-of-rkward solution.
>>
>> I've filed a bug report on this for rkward, so that it doesn't get
>> lost. Any one seen this issue? Any clue? As of now, I've commented the
>> above four lines in rkward.cpp for my local compilation.
>>
>> I can ask on kde devel list about this, but I am not at all familiar
>> with the structure of rkward codes, so it may seem pretty lame!
>
> Hi Prasenjit,
>
> As you may have seen in the list Roy Qu provided a patch (in trunk now) and according to Thomas it
> might solve your problem. Can you confirm this?

Well, Yes and No!

No:
Roy's patch was only for the "rkconsole.cpp". So, only the RConsole
part was affected (this is my understanding, which given my C++
knowledge, might very well be wrong).

Yes:
I did not know this: you could right click on "Save Workspace  Ctrl+S"
menu option to change its shortcut (to, say, Ctrl+Shift+S -- "main"
not "alternate"). This creates the file
~/.kde/share/apps/rkward/rkwardui.rc  wherein this shortcut info is
stored. Similarly, for "Open Workspace  Ctrl+O"  to Ctrl+Shift+O. And
now, all the four shortcuts work as intended.

So, as you see, the "Yes" part was not influenced by Roy's patch. I
actually tried it - removed Roy's patch and changed the shortcuts.
Works.

The issue then is, why are the shortcuts from the source code
(rkward.cpp) not honored?  I should add: my previous bug-mail was
under 4.1.85 (beta2) and today I did all this on 4.1.96 (rc1) - so I
guess the KDE APIs are still buggy!?

One more thing (ala Steve Jobs): If you use Ctrl+S or Ctrl+O before
changing the shortcuts you get the "Ambiguous Shortcut" message. Then
when you try to change the shortcuts, RkWard quits with Fatal Error.
So, you start the application again, and the change the shortcuts
first.

> Regards
> Stefan

Thanks to Roy for the RkConsole patch...
-- 
Prasenjit




More information about the Rkward-devel mailing list