Bug 373301 - Problems in user menu
Summary: Problems in user menu
Status: RESOLVED FIXED
Alias: None
Product: kile
Classification: Applications
Component: user interface (other bugs)
Version First Reported In: 2.9.60
Platform: Fedora RPMs Linux
: NOR minor
Target Milestone: ---
Assignee: Michel Ludwig
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-05 17:11 UTC by Enrique Artal
Modified: 2017-01-29 10:42 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Screenshot of a user menu edit window (35.36 KB, image/png)
2017-01-07 23:21 UTC, Enrique Artal
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Enrique Artal 2016-12-05 17:11:23 UTC
When editing the usermenu the marked parameters disappear.
Comment 1 merlin 2017-01-07 11:55:34 UTC
I cannot confirm this. 

The usermenu of my version of Kile (current snapshot from github, KF5 5.29) works well.
Comment 2 Enrique Artal 2017-01-07 17:10:34 UTC
(In reply to merlin from comment #1)
> I cannot confirm this. 
> 
> The usermenu of my version of Kile (current snapshot from github, KF5 5.29)
> works well.

I have also the current snapshot with the same KF5. What happens exactly is the following. I have several user menu items; one of them works as follows, I select some text and the effect is to put this text inside curly brackets. In the window of the user menu I wrote {%M%C}; in order to work correctly I have to select the parameter "Replace selected text"; if not the action is to put the brackets and repeat the text.
The problem is that if I edit this menu the parameter box is never checked, I have to mark it again. If I do not save, the current parameters are kept, but if I do save, then it disappears. It is not grave, only annoying.
Comment 3 merlin 2017-01-07 17:33:09 UTC
Sorry, I still cannot confirm this.

I followed your example and saved the changed usermenu. Restarting kile, opening the usermenu dialog and selecting the added entry, two checkboxes are checked like I defined it.

What is your system you are working on?
Comment 4 Enrique Artal 2017-01-07 23:21:13 UTC
Created attachment 103276 [details]
Screenshot of a user menu edit window
Comment 5 Enrique Artal 2017-01-07 23:22:11 UTC
(In reply to merlin from comment #3)
> Sorry, I still cannot confirm this.
> 
> I followed your example and saved the changed usermenu. Restarting kile,
> opening the usermenu dialog and selecting the added entry, two checkboxes
> are checked like I defined it.
> 
> What is your system you are working on?

I am using Fedora 25, fully updated, using also the kde-redhat repository and my version of kile comes from http://compsci.cas.vanderbilt.edu/Fedora/local/; the owner updates kile quite often and I use the src.rpm file to compile it. 

The user menu works correctly; I attach the user menu edit window I get. The checkboxes are not checked but I do not save it it works as expected. 

Thanks for your interest
Comment 6 merlin 2017-01-08 13:37:36 UTC
I do not have any explanation for this behavior.

The only thing, whichs remains to do, is to take a look at your configuration file 'usuario.xml' (usually in '.local/share/kile/usermenu/'). Search for your entry named 'Llanes' and look for the entries of the checkboxes:

  <menu type="text">
    <title>Llaves</title>
    <text>{%M%C}</text>
...
    <needsSelection>true</needsSelection>
    <replaceSelection>true</replaceSelection>
    <selectInsertion>true</selectInsertion>
  </menu>

Add these lines, if they are not present. But this is just a guess...
Comment 7 Enrique Artal 2017-01-08 17:58:50 UTC
(In reply to merlin from comment #6)
> I do not have any explanation for this behavior.
> 
> The only thing, whichs remains to do, is to take a look at your
> configuration file 'usuario.xml' (usually in '.local/share/kile/usermenu/').
> Search for your entry named 'Llanes' and look for the entries of the
> checkboxes:
> 
>   <menu type="text">
>     <title>Llaves</title>
>     <text>{%M%C}</text>
> ...
>     <needsSelection>true</needsSelection>
>     <replaceSelection>true</replaceSelection>
>     <selectInsertion>true</selectInsertion>
>   </menu>
> 
> Add these lines, if they are not present. But this is just a guess...

Thanks, maybe it is my english to blame! :)
<replaceSelection>true</replaceSelection>
appears as expected. The only problem is that when editing the checkbox still unchecked and if I may any changes I need to do not forget to recheck. Not a big deal.
Comment 8 Enrique Artal 2017-01-10 11:42:21 UTC
I have checked that everything works fine with the file example.xml (it doesn't matter if I load it from .local/share/kile/usermenu/ (where I copied) or from /usr/share/kile/usermenu/
I do not see any particular difference from the file example and for the file I created
Comment 9 Enrique Artal 2017-01-10 12:16:08 UTC
(In reply to Enrique Artal from comment #8)
> I have checked that everything works fine with the file example.xml (it
> doesn't matter if I load it from .local/share/kile/usermenu/ (where I
> copied) or from /usr/share/kile/usermenu/
> I do not see any particular difference from the file example and for the
> file I created

Another update. After creating submenus, I can check "Replace Selected Text" only if "Needs Selected Text" is checked. Without submenus, it is possible.
Comment 10 Michel Ludwig 2017-01-29 09:42:44 UTC
Git commit 2df62e86ac4b14e65d987db93e2ef050e6bf61f7 by Michel Ludwig.
Committed on 29/01/2017 at 09:39.
Pushed by mludwig into branch 'master'.

Fix enabling/disabling of checkboxes in the user menu dialog

Also improve the documentation of the user menu a little.

Patch by Fritz Meier

M  +14   -0    doc/usermenu.docbook
A  +-    --    doc/usermenu_11b.png
M  +5    -0    src/dialogs/usermenu/usermenudialog.cpp

https://commits.kde.org/kile/2df62e86ac4b14e65d987db93e2ef050e6bf61f7
Comment 11 Enrique Artal 2017-01-29 10:42:30 UTC
(In reply to Michel Ludwig from comment #10)
> Git commit 2df62e86ac4b14e65d987db93e2ef050e6bf61f7 by Michel Ludwig.
> Committed on 29/01/2017 at 09:39.
> Pushed by mludwig into branch 'master'.
> 
> Fix enabling/disabling of checkboxes in the user menu dialog
> 
> Also improve the documentation of the user menu a little.
> 
> Patch by Fritz Meier
> 
> M  +14   -0    doc/usermenu.docbook
> A  +-    --    doc/usermenu_11b.png
> M  +5    -0    src/dialogs/usermenu/usermenudialog.cpp
> 
> https://commits.kde.org/kile/2df62e86ac4b14e65d987db93e2ef050e6bf61f7

Thanks (to Fritz and Michel!)