Bug 328712 - adding build tool destroys menu layout
Summary: adding build tool destroys menu layout
Status: VERIFIED WAITINGFORINFO
Alias: None
Product: kile
Classification: Applications
Component: user interface (show other bugs)
Version: 2.1.3
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Michel Ludwig
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-12 10:30 UTC by krichter
Modified: 2016-11-08 23:25 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
kileui.rc (45.82 KB, application/xml)
2016-10-27 08:08 UTC, Nico Kruber
Details
/home/nico/.kde4/share/config/kilerc (18.73 KB, application/x-desktop)
2016-11-08 22:43 UTC, Nico Kruber
Details

Note You need to log in before you can comment on or make changes to this bug.
Description krichter 2013-12-12 10:30:19 UTC
If I add a custom task, e.g. to run biber and add this task to the main toolbar, the entry for kile settings in the settings menu disappears. The issue can be fixed by removing the file rm ~/.kde/share/apps/kile/kileui.rc which implies loosing the settings for all custom build tools.

Reproducible: Always

Steps to Reproduce:
1. open kile settings dialog and switch to build tools panel 
2. add a build tool with name biber which runs the biber command
3. modify the tools toolbar and add the biber task
4. restart kile
Actual Results:  
settings menu for kile disappear

Expected Results:  
settings menu should be there
Comment 1 krichter 2013-12-12 10:31:27 UTC
I also found these tips which are probably useful to fix this bug:
http://askubuntu.com/questions/223295/kile-missing-settings-dialog-after-update-to-kubuntu-12-10
Comment 2 merlin 2013-12-13 12:57:04 UTC
The workaround in #1 means that you can't change an existing toolbar. A better workaround is to open the resource file of Kile

~/.kde/share/apps/kile/kileui.rc

with an editor like Kate and search for a line like

<Menu noMerge="1" name="settings">

Maybe that there is an additional XML-attribute like 'name=...' at the end of this line. This doesn't matter.

Remove the 'noMerge' attribute and change this line to

<Menu name="settings">

and everything works again.
Comment 3 krichter 2013-12-13 13:15:33 UTC
Hi merlin,
thanks for this workaround. I can confirm that it works.
Comment 4 Michel Ludwig 2014-04-27 19:14:51 UTC
Git commit 883e3e0b936d458f84962f204097655144a78374 by Michel Ludwig.
Committed on 27/04/2014 at 18:30.
Pushed by mludwig into branch '2.1'.

Use the KXMLGUIFactory::plugActionList mechanism to populate user-editable menus

Previously we constructed such menus ourselves and were using 'KXMLGUIFactory::refreshActionProperties()'
to load shortcuts for the actions involved. However, due to a limitation
in that method (in 'KXMLGUIClient::reloadXML()', more precisely) the XMLGUI
for Kile was reset to an unmerged state (without the standard actions). By using
'plugActionList' we don't have to resort to 'refreshActionProperties' any more.

M  +111  -97   src/kile.cpp
M  +3    -7    src/kile.h
M  +1    -1    src/kileactions.h
M  +10   -3    src/kilehelp.cpp
M  +5    -4    src/kilehelp.h
M  +29   -19   src/kilestdactions.cpp
M  +6    -10   src/kilestdactions.h
M  +23   -33   src/kileui.rc
M  +22   -11   src/userhelp.cpp
M  +5    -5    src/userhelp.h

http://commits.kde.org/kile/883e3e0b936d458f84962f204097655144a78374
Comment 5 krichter 2015-01-28 16:22:30 UTC
This is still an issue in 284c4b5b5c9267b205216024ef508705e470a78f. It might be related to previously existing kile and/or KDE configuration. There's no interest to loose the `Configure Kile` menu item in the `Settings` menu, so either errornous files should be overwritten if they exist or the user should be warned about the fact that the current configuration prevents the menu from being displayed (in case there's any use case at all) and prompted for actions (overwrite config file, keep it).
Comment 6 Nico Kruber 2016-09-28 12:12:54 UTC
I'm having trouble with customising shortcuts ever since this patch got added to the openSUSE packages: whenever I change (or add) a shortcut and re-start kile, the shortcut is reset and thus not available anymore, e.g. setting CTRL+B for "Quick Build". It looks like this is happening during the startup since downgrading the package to the old version left me with the shortcut I had previously defined with the version including this patch.
Comment 7 Wolfgang Bauer 2016-10-11 19:09:36 UTC
(In reply to Nico Kruber from comment #6)
> I'm having trouble with customising shortcuts ever since this patch got
> added to the openSUSE packages

Hm, seems to work fine here.

FTR, I am the one that added it to the openSUSE packages, I just submitted it to Leap 42.2, and plan to do an update for 13.2 and 42.1 too.
So I'm really interested if there is indeed a problem with it.

Maybe it works if you remove ~/.kde4/share/apps/kile/kileui.rc?
Comment 8 Nico Kruber 2016-10-14 11:40:42 UTC
Hi Wolfgang, I tried deleting ~/.kde4/share/apps/kile/kileui.rc but this does not change the behaviour I observe: whenever I use the package from KDE:Extra (openSUSE 13.2, x86_64), the changed shortcut is written to this file but apparently not read during startup.

I can send you the whole file but since the newly (automatically) created file also shows this, here's the interesting part after changing the shortcut:

<?xml version='1.0'?>
<!DOCTYPE kpartgui SYSTEM 'kpartgui.dtd'>
<kpartgui version="41" name="kile">
  ...
 <ActionProperties scheme="Default">
  <Action shortcut="Ctrl+B" name="tool_QuickBuild"/>
 </ActionProperties>
</kpartgui>
Comment 9 Wolfgang Bauer 2016-10-14 14:15:45 UTC
(In reply to Nico Kruber from comment #8)
> Hi Wolfgang, I tried deleting ~/.kde4/share/apps/kile/kileui.rc but this
> does not change the behaviour I observe: whenever I use the package from
> KDE:Extra (openSUSE 13.2, x86_64), the changed shortcut is written to this
> file but apparently not read during startup.

Hm, the thing is that it works fine here, and I am on 13.2 (with kile from KDE:Extra too).
The (probably) only difference here is that I use the latest kdelibs4 (4.14.24), I will try with the standard one in 13.2 on Sunday or Monday.

I originally tried with Ctrl+M though, as Ctrl+B is already defined for something else ("Add to bookmarks" from the standard KDE shortcuts).
With my old kileui.rc and kilerc I get a warning when trying to set that shortcut (if I choose OK, it works fine though, also on next start).
With those files removed I don't get that dialog immediately for some reason, but when I press Ctrl+B I get an error dialog saying that no action will be taken because the shortcut is ambiguous.

Maybe that's related to your problem, maybe that dialog just doesn't show up for some reason but the shortcut is silently re-assigned because of a conflict?
That's just guessing though.
Anyway, can you please try with e.g. Ctrl+M too?

> I can send you the whole file but since the newly (automatically) created
> file also shows this, here's the interesting part after changing the
> shortcut:

It looks exactly the same here (but it works).
Can you please attach the whole file?
I would like to see if I can reproduce it with your file.
Comment 10 Nico Kruber 2016-10-27 08:08:57 UTC
Created attachment 101822 [details]
kileui.rc

Hi Wolfgang,
attached my kileui.rc which, apart from the new shortcuts, is the default file created by kile after deleting kileui.rc.

I'm also using the kdelibs4 from the KDE:Applications repository, so there's no need for you to test with the original ones (yet). I did not get a conflict when I set the shortcut nor did I get the ambiguous warning. Additionally, I also have the same problem with CTRL+H shortcut I set for the project-wide search.

I'll try to test with kile from KDE:Extra again some time. At the moment, however, I do not have time for that, sorry.
Comment 11 Wolfgang Bauer 2016-10-27 21:47:08 UTC
(In reply to Nico Kruber from comment #10)
> Hi Wolfgang,
> attached my kileui.rc which, apart from the new shortcuts, is the default
> file created by kile after deleting kileui.rc.

Yes, thanks.
I copied that over, and as expected, Ctrl+B runs the quickbuild tool.

I did notice that you actually changed the "alternative" shortcut, I always tried with the primary one.

But anyway, even with your file in place, it still works fine here to change the shortcut (both).

So I am still unsure where the problem may be...

Maybe it is related to your ~/.kde4/share/apps/kile/kileui.rc then, as I suggested already?
Could you maybe attach that too?

> I'm also using the kdelibs4 from the KDE:Applications repository, so there's
> no need for you to test with the original ones (yet).

I have already meanwhile, and the result was the same: it works fine here.

> I'll try to test with kile from KDE:Extra again some time. At the moment,
> however, I do not have time for that, sorry.

So you are using the standard 13.2 version again now?
Ok, I haven't submitted an update anyway yet (because of the possible problems you mentioned), but it will be in 42.2 unless I revert that... (and TBH, I still see no reason to do it)
Comment 12 Nico Kruber 2016-11-08 22:43:41 UTC
Created attachment 102137 [details]
/home/nico/.kde4/share/config/kilerc

Attached my kilerc file as re-created by the kile from KDE:Extra after deleting the file. Unfortunately, the same symptoms are still there:
after setting the new shortcut in the settings, Ctrl+B works (primary or alternative shortcut, even Ctrl+M), but after quitting kile and restarting it again, it does not anymore, although it is still mentioned in the kileui.rc file.

Console output also shows no errors. No idea what else it could be...I'll try to create an OBS branch without this single patch to make sure this is what is causing my problem.
Comment 13 Nico Kruber 2016-11-08 23:24:39 UTC
I just tried without the patch (project home:NicoK:branches:KDE:Extra) and the problem is gone - the shortcut works, every time.

With the patch, when I go into the shortcut configuration, I do not see the custom shortcut and the defaults are shown. If I don't change anything there, the custom shortcut remains in the kileui.rc file when I quit. If I change something, it is removed from kileui.rc.

My guess would be that the parser stops somewhere when the patch is applied and does not get to the point where the shortcuts are defined. But unfortunately, no warning is printed.
Comment 14 Christoph Feck 2016-11-08 23:25:08 UTC
This is probably a duplicate of bug 314580, which again is probably a duplicate of bug 64754.

To verify, please try Kile KF5 version with KF5 5.24 or newer.