Bug 227836 - kde menu editor, move item doesn't work
Summary: kde menu editor, move item doesn't work
Status: RESOLVED FIXED
Alias: None
Product: kmenuedit
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
: 102723 110241 186683 229665 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-02-20 18:36 UTC by Rufus Laggren
Modified: 2010-04-01 17:58 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rufus Laggren 2010-02-20 18:36:26 UTC
Version:            (using KDE 4.3.1)
OS:                Linux
Installed from:    openSUSE RPMs

Standard user. Editor appears to work when rearranging folders and items but, after saving, items have not moved or do not appear in expected places on the Classic or KickOff menus. Same result whether starting (by context menu off system menu button at left of panel) from the Classic or the KickOff style menu.

Note1: When saving after making changes the progress but goes to 15%, then starts over and gets to about 1/2 point then the menu editor window closes (it's completed).

Note2: Kde4 installed with _upgrade_ from Suse 11.0 to 11.2; the Suse11.0 was an upgrade from Suse10.3; Suse10.3 was a clean install. Don't recall if the Suse11.0 system used Kde3 or Kde4.

Reproduce: Always. Can't get system menu changed.

Expected: System menu should match the tree shown in the menu editor, after saving.
Comment 1 Roland Leißa 2010-03-04 19:28:47 UTC
KDE Menu Editor still totally buggy in KDE SC 4.4.1
Comment 2 Stephen Dunn 2010-03-08 07:17:21 UTC
duplicate of https://bugs.kde.org/show_bug.cgi?id=99420 ?
Comment 3 Anne-Marie Mahfouf 2010-03-19 16:10:33 UTC
Confirmed but this product has no maintainer...
Comment 4 Māris Nartišs 2010-03-19 16:25:43 UTC
Possibly related bugs: #229665 #102723 #110241 #186683 #221259 #110565 #93923 #102349 #219854 #186683
Comment 5 Māris Nartišs 2010-03-19 17:39:04 UTC
I compared KMenuedit 0.7 running 3.5.10 and 0.8 running 4.4.1 output in .config/menu/applications-kmenuedit.menu after performing following steps:
mv applications-kmenuedit.menu /some/other/place
launch KMenuedit
Move "Games" folder to "Utilities"

  <Move>
-  <Old>Games</Old>
-  <New>Utilities/Games</New>
+  <Old>Games/</Old>
+  <New>Utilities/Games/</New>
  </Move>

After I removed tailing / from Games, folder got moved in Kickoff too.

Workaround for all - open .config/menu/applications-kmenuedit.menu with kate  and check for:
1) tailing / at end of folder names;
2) folder names ending with -2 or -1. Delete <move> blocks with "foldername-2" and fix any references to "foldername-2" to point to real name ("foldername").
Comment 6 Anne-Marie Mahfouf 2010-03-20 14:56:39 UTC
If someone has the source and can try the following patch: it fixes the trailing / (so it fixes the moving of folders when there is not the same named folder in the moved folder)

Index: menufile.cpp
===================================================================
--- menufile.cpp	(revision 1105524)
+++ menufile.cpp	(working copy)
@@ -408,14 +408,14 @@
       commonMenuName += '/' + oldMenuParts[i];
    }
    QString oldMenuName;
-   for(int j = i; j < oldMenuParts.count(); j++)
+   for(int j = i; j < oldMenuParts.count()-1; j++)
    {
       if (i != j)
          oldMenuName += '/';
       oldMenuName += oldMenuParts[j];
    }
    QString newMenuName;
-   for(int j = i; j < newMenuParts.count(); j++)
+   for(int j = i; j < newMenuParts.count()-1; j++)
    {
       if (i != j)
          newMenuName += '/';
Comment 7 Anne-Marie Mahfouf 2010-03-20 15:02:15 UTC
*** Bug 229665 has been marked as a duplicate of this bug. ***
Comment 8 Anne-Marie Mahfouf 2010-03-20 15:05:47 UTC
*** Bug 102723 has been marked as a duplicate of this bug. ***
Comment 9 Anne-Marie Mahfouf 2010-03-20 15:07:14 UTC
*** Bug 110241 has been marked as a duplicate of this bug. ***
Comment 10 Anne-Marie Mahfouf 2010-03-20 15:12:58 UTC
*** Bug 186683 has been marked as a duplicate of this bug. ***
Comment 11 Anne-Marie Mahfouf 2010-03-21 09:44:26 UTC
Anyone tried the patch?

What are the other obvious bugs with KMenuEdit in KDE 4.4?
Comment 12 Māris Nartišs 2010-03-22 13:08:11 UTC
(In reply to comment #11)
> Anyone tried the patch?
> 
> What are the other obvious bugs with KMenuEdit in KDE 4.4?

AFAIK no.
Could You, please, reformat patch as file in form suitable to apply directly to 4.4.1 release tarball? I have no idea where this "menu.cpp" file is located, still I can define a patch to apply after unpacking application and before compiling it (Gentoo here).
Comment 13 Anne-Marie Mahfouf 2010-03-22 13:19:33 UTC
menufile.cpp is in kdebase/workspace/kmenuedit/ and the patch is to be applied in that directory against 4.4.1 sources.
I'll be away for 1 week starting tomorrow until 29 March evening without internet!
Comment 14 Māris Nartišs 2010-03-23 18:01:30 UTC
(In reply to comment #11)
> Anyone tried the patch?
> 
This patch works. After recompiling with this patch, moving folders in KMenuedit works just fine and generated .menu file is correct.
Comment 15 Anne-Marie Mahfouf 2010-03-30 10:33:33 UTC
SVN commit 1108974 by annma:

Move folders correctly. Thanks a lot Maris for all the investigation and the patch testing, it's very nice of you having taken the time to research this bug!
BUG=227836


 M  +2 -2      menufile.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1108974
Comment 16 Anne-Marie Mahfouf 2010-04-01 17:58:21 UTC
SVN commit 1110017 by annma:

also in trunk!
CCBUG=227836


 M  +2 -2      menufile.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1110017