Summary: | Every new app is hidden | ||
---|---|---|---|
Product: | [Applications] kmenuedit | Reporter: | bartek <b.gedzior> |
Component: | general | Assignee: | Unassigned bugs mailing-list <unassigned-bugs> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | avsa242, chalkerx, gspr, prudentior, regi.hops, retratserif, rizzitello, tja, yofel |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
Only write out the OnlyShowIn field if we didn't empty it.
Only write out the OnlyShowIn field if we didn't empty it. Avoid writing out an empty OnlyShowIn field unless it was already explicitly empty. |
Description
bartek
2011-10-08 03:55:11 UTC
I've forgotten important information. Moving and deleting existing entries works fine. Hi, can confirm "bartek's" description, same here. Manual added applications are not visible. System: openSUSUE 11.4 x86_64, KDE 4.7.2 "release 9". I confirm this problem. Just edit any app in kmenuedit and it disappears from menu. KDE 4.7.2, Kubuntu 11.10 32 bit. *** This bug has been confirmed by popular vote. *** I can reproduce this on git20111011. I'm seeing the same thing (KDE 4.7.2, Kubuntu 11.10). Since the items do show up in kmenuedit (after enabling "show hidden positions" according to the reporter) and in .local/share/applications, is it not more likely that the bug resides within the application launcher? the bug appers to be in the menu applet itself. if you use the QML menu widget the entries are shown. at first i suspected bug#99420 (below is the comment) This Bug is affecting me on kde 4.7.2! make a menu entry then save the menu, the entry doesn't show in the menu at all. after saving it shows updating system dialog, but the entry is not in the menu. if you open the menu editor the entry will be gone. i also edited a menu entry of an installed program and after saving the menu editor the entry was in my menu (with modified parts) but once again after a log out/ login the modified entry is removed. confirm. i guess this is due new .desktop files get a whole bunch of settings including OnlyShowIn= if "only for KDE" is NOT checked of course. removing the line via editor will let kbuildsycoca4 generate the correct entry in the menu. i found a patch/diff https://git.reviewboard.kde.org/r/102713/diff/ which seems wrong to me. if i read it correctly (no CPP guru here) line 458-462 would suggest that OnlyShowIn gets written even if its empty but if i interpret the freedesktop docs correctly this would be wrong. i guess the patch is applied in kubuntu 11.10 already as the original source would not behave like that (again im no CPP guy). (In reply to comment #8) > confirm. > i guess this is due new .desktop files get a whole bunch of settings including > > OnlyShowIn= > > if "only for KDE" is NOT checked of course. > removing the line via editor will let kbuildsycoca4 generate the correct entry > in the menu. > > i found a patch/diff https://git.reviewboard.kde.org/r/102713/diff/ which seems > wrong to me. if i read it correctly (no CPP guru here) line 458-462 would > suggest that OnlyShowIn gets written even if its empty but if i interpret the > freedesktop docs correctly this would be wrong. Interesting. I agree with your interpretation: If a .desktop file has an OnlyShowIn=KDE field and the only show in KDE box is not checked in KMenuEdit, then it will write an *empty* OnlyShowIn field. If I read the Freedesktop specification [1] correctly, this means the entry described by the .desktop file should *not be shown by any* desktop environment. Thus KDE's menu (correctly) does not show it. [1] http://standards.freedesktop.org/menu-spec/latest/ar01s03.html > Interesting. I agree with your interpretation: If a .desktop file has an
> OnlyShowIn=KDE field and the only show in KDE box is not checked in KMenuEdit,
> then it will write an *empty* OnlyShowIn field. If I read the Freedesktop
> specification [1] correctly, this means the entry described by the .desktop
> file should *not be shown by any* desktop environment. Thus KDE's menu
> (correctly) does not show it.
yeah, additionally new empty entries with initially unchecked "only show in KDE" will be written with OnlyShowIn= too so it doesnt depend on setting the checkbox once and revert it later, the wrong line gets added either way.
Created attachment 65068 [details] Only write out the OnlyShowIn field if we didn't empty it. Patch against KDE 4.7.2. Based on comment #8. I don't have time to test the patch yet. Created attachment 65087 [details]
Only write out the OnlyShowIn field if we didn't empty it.
I just got around to testing the previous patch, and I made a mistake in it. Here's another attempt, which I won't have time to test right away either. I know sending out these untested patches isn't the best way to do things, but I'll do it once more just in case someone suddenly finds the time to test this (or come up with something better).
Hopefully this patch avoids writing an empty OnlyShowIn field *unless* the .desktop file already had such a thing (I guess it's valid to have such an empty field according to the specification, so we shouldn't just remove it?).
> Hopefully this patch avoids writing an empty OnlyShowIn field *unless* the
> .desktop file already had such a thing (I guess it's valid to have such an
> empty field according to the specification, so we shouldn't just remove it?).
i would remove it if its empty as
a) i see no reasonable use-case for an empty OnlyShowIn
b) the user would have no way to remove it via the current menuedit GUI if he desires so
. but the specs are unclear on this topic.
Created attachment 65103 [details] Avoid writing out an empty OnlyShowIn field unless it was already explicitly empty. I've now had the time to test this version of the patch, and it works as desired: If an entry has a present and empty OnlyShowIn field, we don't touch it (this isn't relevant, as such entries won't even show up in kmenuedit, but I'm just making sure). Else, if we empty out an OnlyShowIn field, then we delete it from the .desktop file. (Ubuntu users can also get a prebuilt KDE with only this patch added from my PPA: https://launchpad.net/~gspreemann/+archive/experimental ) (In reply to comment #13) > i would remove it if its empty as > a) i see no reasonable use-case for an empty OnlyShowIn > b) the user would have no way to remove it via the current menuedit GUI if he > desires so I think the specs are pretty clear (the empty list is a list, afterall), but I also agree that it makes little sense to have an empty OnlyShowIn, and that kmenuedit won't even be able to see such entries. However, I guess it's possible that at some point kmenuedit gets an option to forcibly ignore OnlyShowIn when listing entries (maybe for people who'd like to edit every DE's menu from kmenuedit?). Not handling the explicitly empty OnlyShowIn list would break such entries in that case. (In reply to comment #14) > Created an attachment (id=65103) [details] > Avoid writing out an empty OnlyShowIn field unless it was already explicitly > empty. > > I've now had the time to test this version of the patch, and it works as > desired: If an entry has a present and empty OnlyShowIn field, we don't touch > it (this isn't relevant, as such entries won't even show up in kmenuedit, but > I'm just making sure). Else, if we empty out an OnlyShowIn field, then we > delete it from the .desktop file. > > (Ubuntu users can also get a prebuilt KDE with only this patch added from my > PPA: https://launchpad.net/~gspreemann/+archive/experimental ) Please let me know the name (in the suggested PPA) of the package containing the patch. Based on the release date may be "kde-workspace", but the presence of the kmenuedit executable is not visible. (In reply to comment #16) > Please let me know the name (in the suggested PPA) of the package containing > the patch. Based on the release date may be "kde-workspace", but the presence > of the kmenuedit executable is not visible. It's kde-workspace-bin (source package kde-workspace). If you have further questions regarding stuff in the PPA, I suggest you e-mail me directly, as we probably shouldn't use the KDE bugzilla to discuss Ubuntu packages. Hi, I just updated KDE to version 4.7.3 "release 10" on openSUSE 11.4 x86-64 and it works fine now. I added a new menu entry and it shows up like it should. Thanks a lot Cheers Regi Everything is all right for me now on git20111031, was broken on git20111011. I can confirm it's fixed in 4.7.3. *** This bug has been marked as a duplicate of bug 283658 *** |