Bug 67994

Summary: configure shortcuts is not consistent, kdevelop shortcuts are application-wide and editor shortcuts are per file...
Product: [Developer tools] kdevplatform Reporter: Holger Schröder <holger-kde>
Component: editor integrationAssignee: KDevelop Developers <kdevelop-devel>
Status: RESOLVED FIXED    
Severity: normal CC: f-jx
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Holger Schröder 2003-11-12 14:25:11 UTC
Version:           3.0.0b1 (using KDE 3.1.92 (CVS >= 20031007), Gentoo)
Compiler:          gcc version 3.2.3 20030422 (Gentoo Linux 1.4 3.2.3-r2, propolice)
OS:          Linux (i686) release 2.4.20-xfs-r2

Hi,

i just installed kdevelop cvs head, and i wanted to switch the dynamic word wrap shortcut from F10 to shift-F10, as i wanted F1 to be the shortcut for switch header/implementation.
so it seemed to have worked fine, i could switch from header to implementation, but not back.
i looked into the configure shortcuts dialog again, and dynamic word wrap had f10 as shortcut again. why?

i don't know the sources, but i would guess, that every editor window is an own process or so, and the shortcuts dialog is created dynamically out of the data of the now active editor window and the kdevelop-own shortcuts.

i think when changing a shortcut, it should be changed application-wide.
so when the changed shortcut is an editor shortcut, that change should (no idea how to do it) be transferred to the other editor windows too, so that it will be consistent at all times.


thanks, Holger
Comment 1 Jens Dagerbo 2003-11-12 15:14:23 UTC
Yes. Of course. And allow me to add: AAAAARGH!!

Confirmed.
Comment 2 Jens Dagerbo 2003-11-12 17:25:25 UTC
Subject: kdevelop/src

CVS commit by dagerbo: 

apply shortcut changes to all loaded ReadOnlyParts (in reality, kateparts)

CCMAIL: 67994-done@bugs.kde.org


  M +17 -0     mainwindowshare.cpp   1.34


--- kdevelop/src/mainwindowshare.cpp  #1.33:1.34
@@ -465,4 +465,21 @@ void MainWindowShare::slotKeyBindings()
   }
   dlg.configure();
+  
+  // this is needed for when we have multiple embedded kateparts and change one of them
+  // maybe this should be done to more than ReadOnlyParts, but restricting for now keeps 
+  // it less heavy
+    if( const QPtrList<KParts::Part> * partlist = PartController::getInstance()->parts() )
+    {
+        QPtrListIterator<KParts::Part> it( *partlist );
+        while ( KParts::Part* part = it.current() )
+        {
+            if ( KParts::ReadOnlyPart * ro_part = dynamic_cast<KParts::ReadOnlyPart*>( part ) )
+            {
+                kdDebug(9000) << "reloading xml for: " << part->name() << endl;
+                part->reloadXML();
+            }
+            ++it;
+        }
+    }  
 }
 


Comment 3 Jens Dagerbo 2003-11-12 18:49:21 UTC
Scratch that. It's not enough. I think we reinsert the original actionlist somewhere..

reopening.
Comment 4 Jens Dagerbo 2003-11-12 21:03:30 UTC
This is almost fixed for real now. Jowenn figured it out - it is not enough to call reloadXML() on the editorparts, the corresponding Views needs to be updated as well.

Now it appears to work fine for changing katepart custom shortcut settings, but changing back and forth between custom and default values still fails.

I suspect that is an error in kdelibs though.
Comment 5 Jens Dagerbo 2003-11-13 06:18:23 UTC
After a closer look, the only error case I can still find is that if you go back to a default setting, the change isn't applied to the other open editorparts.

This is a temporary condition (new editors will be correct) and a special case and I'm quite sure the bug isn't in KDevelop.

Closing again.