[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-kimageshop
Subject:    Changing a shortcut
From:       Sven Langkamp <sven.langkamp () gmail ! com>
Date:       2010-10-21 17:33:15
Message-ID: AANLkTin80oEa0jL5D5PD+FL6W9LDwttZTk7VGhvyQSxY () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi,

I'm trying to solve bug 251616 ( 'Ctrl+I' is ambiguous.) I'm trying to
change the italics shortcut when the view is created.

Code looks like this:
Index: kis_view2.cpp
===================================================================
--- kis_view2.cpp       (Revision 1187127)
+++ kis_view2.cpp       (Arbeitskopie)
@@ -325,6 +325,13 @@
     connect(m_d->canvas, SIGNAL(scrollAreaSizeChanged()), m_d->zoomManager,
SLOT(slotScrollAreaSizeChanged()));

     setAcceptDrops(true);
+
+    QAction* selectionInvert = actionCollection()->action("invert");
+    QAction* textToolItalics = actionCollection()->action("format_italic");
+    if(selectionInvert && textToolItalics && selectionInvert->shortcut() ==
textToolItalics->shortcut()) {
+        textToolItalics->setShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_I);
+        kDebug() << "shortcut is " << textToolItalics->shortcut();
+    }
 }

The debug code indicates that the shortcut is changed, but the problem
persists.
Any ideas what I have to do?


Sven

[Attachment #5 (text/html)]

Hi,<br><br>I&#39;m trying to solve bug 251616 (<span style="display: inline;"><span> \
&#39;Ctrl+I&#39; is ambiguous.) I&#39;m trying to change the italics shortcut when \
the view is created.<br><br>Code looks like this:<br>Index: kis_view2.cpp<br> \
===================================================================<br>--- \
kis_view2.cpp       (Revision 1187127)<br>+++ kis_view2.cpp       \
(Arbeitskopie)<br>@@ -325,6 +325,13 @@<br>     connect(m_d-&gt;canvas, \
SIGNAL(scrollAreaSizeChanged()), m_d-&gt;zoomManager, \
SLOT(slotScrollAreaSizeChanged()));<br>  <br>     setAcceptDrops(true);<br>+    <br>+ \
QAction* selectionInvert = actionCollection()-&gt;action(&quot;invert&quot;);<br>+    \
QAction* textToolItalics = \
actionCollection()-&gt;action(&quot;format_italic&quot;);<br> +    if(selectionInvert \
&amp;&amp; textToolItalics &amp;&amp; selectionInvert-&gt;shortcut() == \
textToolItalics-&gt;shortcut()) {<br>+        \
textToolItalics-&gt;setShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_I);<br>+        \
kDebug() &lt;&lt; &quot;shortcut is &quot; &lt;&lt; \
textToolItalics-&gt;shortcut();<br> +    }<br> }<br><br>The debug code indicates that \
the shortcut is changed, but the problem persists.<br>Any ideas what I have to \
do?<br><br><br>Sven<br></span> </span>



_______________________________________________
kimageshop mailing list
kimageshop@kde.org
https://mail.kde.org/mailman/listinfo/kimageshop


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic