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

List:       koffice
Subject:    Re: KWord doesn't save Custom Shortcut
From:       David Faure <faure () kde ! org>
Date:       2004-02-17 17:58:26
Message-ID: 200402171858.26153.faure () kde ! org
[Download RAW message or body]

On Tuesday 03 February 2004 15:44, Jeffrey Barish wrote:
> After I specify a shortcut (and Alternate) for Current Date (fixed), it
> works fine.  However, when I save and exit KWord and return, my
> shortcut is gone.  The shortcut that I specified for Head 1 does
> survive exit and return.  Is there something I can do to make the
> shortcut for Current Date (fixed) survive or is this a bug?
It's a bug - all "insert variable" actions had the same name 
(as I noticed when activating debug area 129 :)

And here's the fix for it:

Index: kwview.cc
===================================================================
RCS file: /home/kde/koffice/kword/kwview.cc,v
retrieving revision 1.998
diff -u -p -r1.998 kwview.cc
--- kwview.cc   9 Feb 2004 14:00:01 -0000       1.998
+++ kwview.cc   17 Feb 2004 17:58:12 -0000
@@ -1352,8 +1352,10 @@ void KWView::addVariableActions( int typ
             VariableDef v;
             v.type = type;
             v.subtype = i;
+            QCString actionName;
+            actionName.sprintf( "var-action-%d-%d", type, i );
             KAction * act = new KAction( (*it), 0, this, SLOT( insertVariable() ),
-                                         actionCollection(), "var-action" );
+                                         actionCollection(), actionName );
             m_variableDefMap.insert( act, v );
             parentMenu->insert( act );
         }

-- 
David Faure, faure@kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
____________________________________
koffice mailing list
koffice@mail.kde.org
To unsubscribe please visit:
https://mail.kde.org/mailman/listinfo/koffice

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

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