Bug 285658 - File Menu entries "Save" and "Save As.." are duplicated
Summary: File Menu entries "Save" and "Save As.." are duplicated
Status: RESOLVED FIXED
Alias: None
Product: cirkuit
Classification: Applications
Component: general (show other bugs)
Version: 0.4.1
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Matteo Agostinelli
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-03 14:29 UTC by Thomas Schwarzgruber
Modified: 2011-11-14 21:16 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 0.4.2


Attachments
Screenshot1 (28.22 KB, image/png)
2011-11-04 07:32 UTC, Thomas Schwarzgruber
Details
Screenshot2 (35.08 KB, image/png)
2011-11-04 07:33 UTC, Thomas Schwarzgruber
Details
Screenshot3 (78.44 KB, image/png)
2011-11-04 07:33 UTC, Thomas Schwarzgruber
Details
Screenshot4 (37.54 KB, image/png)
2011-11-04 07:34 UTC, Thomas Schwarzgruber
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Schwarzgruber 2011-11-03 14:29:55 UTC
Version:           0.4.1 (using KDE 4.7.2) 
OS:                Linux

The file menu entries "Save" and "Save As.." are duplicated and therefore
the Shortcut "Ctrl+S" for saving doesn't work (Error is that this shortcut is ambiguous as for the double entries in the file menu...).
 

Reproducible: Always

Steps to Reproduce:
Just start and open file menu (and see for yourself), and save a document using Shortcuts.

Actual Results:  
File menu entries are duplicated

Expected Results:  
Only one entry for each of "Save" and "Save as.." should be available
Comment 1 Matteo Agostinelli 2011-11-03 15:34:26 UTC
Just to be sure: you are saying that you have two "Save" and two "Save as..." entries in the File menu, correct? Is the shortcut "Ctrl+S" assigned to both?

I cannot reproduce using the steps you provided. Can you rebuild the system cache with 'kbuildsycoca4' and see if it solves the issue? Thanks.
Comment 2 Christoph Feck 2011-11-03 19:11:51 UTC
Also try deleting .kde/share/apps/cirkuit/cirkuitui.rc
Comment 3 Thomas Schwarzgruber 2011-11-04 07:32:20 UTC
Yes you understood me correctly. 

I tried with kbuildsycoa4 and removing the .rc file, and it doesn't change anything for me. 

I will attach screenshots to make the problem perhaps more clear.

The first screenshot shows the duplicate entries in file menu.
The second one shows them in the toolbar.
The third one shows the toolbar-configurator -- perhaps this is a hint to the source of the problem -- because there is a editor part and a kateView Part? 

And the last one shows the error I get after using the shortcut -- I think the shortcut is assigned to "both" save actions as one can see in screenshot 1.
Comment 4 Thomas Schwarzgruber 2011-11-04 07:32:54 UTC
Created attachment 65217 [details]
Screenshot1
Comment 5 Thomas Schwarzgruber 2011-11-04 07:33:20 UTC
Created attachment 65218 [details]
Screenshot2
Comment 6 Thomas Schwarzgruber 2011-11-04 07:33:37 UTC
Created attachment 65219 [details]
Screenshot3
Comment 7 Thomas Schwarzgruber 2011-11-04 07:34:00 UTC
Created attachment 65220 [details]
Screenshot4
Comment 8 Matteo Agostinelli 2011-11-04 12:24:01 UTC
Thanks for clarifying the bug with the screenshots. 

Have you already tried erasing both $HOME/.kde/share/apps/cirkuit and  /usr/share/apps/cirkuit and then reinstalling cirkuit?
Comment 9 Thomas Schwarzgruber 2011-11-04 14:10:15 UTC
Just did that, I guess I did it correctly because it asked me to download the circuit macros, and the same results.

By the way, thx for your fast replies.
Comment 10 Christoph Feck 2011-11-12 14:15:19 UTC
I can reproduce when starting it with:

KDE_LANG=de cirkuit

so it might be a translation conflict
Comment 11 Burkhard Lück 2011-11-12 19:20:59 UTC
Running trunk in locale x-test I can reproduce this with uk, fr, de but not with en_US and x-test, no clue so far what's happening :-(
Comment 12 Albert Astals Cid 2011-11-13 14:55:28 UTC
Well, the problem is obviously in
MainWindow::substituteSaveAsAction

Don't have any idea why you need to do that, but it is wrong :D
Comment 13 Matteo Agostinelli 2011-11-14 09:14:31 UTC
Thanks a lot for your suggestion. This bug is probably fixed now. I cannot push the fix at the moment, but I'll do it later today.

(In reply to comment #12)
> Well, the problem is obviously in
> MainWindow::substituteSaveAsAction
> 
> Don't have any idea why you need to do that, but it is wrong :D
Comment 14 Matteo Agostinelli 2011-11-14 21:16:48 UTC
Git commit 132aaadb679506f0ddbd368bb95e9ec68d840906 by Matteo Agostinelli.
Committed on 14/11/2011 at 10:10.
Pushed by agostinelli into branch 'master'.

Fixed wrong reassignment of Save and Save as actions

Instead of removing the old Save and Save As actions using
action()->text(), the actions are now properly reconnected to custom
slots

BUG: 285658
FIXED-IN: 0.4.2

M  +9    -13   src/mainwindow.cpp
M  +0    -1    src/mainwindow.h

http://commits.kde.org/cirkuit/132aaadb679506f0ddbd368bb95e9ec68d840906