Bug 178824

Summary: KwikDisk does not work with Oxygen icons
Product: kwikdisk Reporter: Alec Moskvin <alecm>
Component: generalAssignee: Michael Kropfberger <michael.kropfberger>
Status: RESOLVED FIXED    
Severity: normal CC: andresbajotierra, didier-clerc
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: A patch fixing the manual icon changing and also moves layout to a .ui file
The fix without changing layouts

Description Alec Moskvin 2008-12-26 19:16:54 UTC
Version:            (using Devel)
OS:                Linux
Installed from:    Compiled sources

KwikDisk currently needs icons with ending "_mount" or "_unmount", otherwise the device icons can not be changed. However, they are not supplied with Oxygen and so KwikDisk gives an error.

How to Reproduce:
1. Start KwikDisk
2. Right-click tray icon and select "Configure KwikDisk"
3. Click "Mount Commands" tab.
4. Click on any partition. An error appears:
"This filename is not valid: drive-harddisk
It must end with "_mount" or "_unmount"."
5. Click "OK" (for some reason KwikDisk quits)

Expected Behaviour:
Either "_mount" and "_unmount" icons should be supplied, or KwikDisk should overlay the current ones with some kind of "mounted" symbol and accept any file name.
Comment 1 Dario Andres 2009-02-04 13:27:35 UTC
SVN commit 921045 by darioandres:

Don't blame the user on the first icon load (the _mount/_umount naming scheme is only needed when the icon is set by the user)
This is already fixed in my rework of KDF/KwikDisk for 4.3
Backporting the small fix to 4.2branch
BUG: 178824



 M  +2 -2      mntconfig.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=921045
Comment 2 Alec Moskvin 2009-02-04 17:26:25 UTC
I don't think this is a sufficient solution since:
1. The icons don't show whether a disk is mounted or unmounted.
2. The user can not set any icons because there are no valid ones provided.

Are these two problems fixed in 4.3 (and this is just a small workaround for 4.2)?
Comment 3 Alec Moskvin 2009-08-11 00:18:35 UTC
Hi,

I'm reopening this bug because it still does not work.

I decided to play with the code, and I fixed it, but in the process I also moved the layout for configuration dialogs to a .ui file - so the patch is a bit big and contains more than just the fix to this bug...

Please tell me what you think.
Comment 4 Alec Moskvin 2009-08-11 00:20:44 UTC
Created attachment 36061 [details]
A patch fixing the manual icon changing and also moves layout to a .ui file
Comment 5 Dario Andres 2009-08-11 00:28:18 UTC
Well.. the patch can be splitted and sent in two commits: one for fixing this bug, and the other to move the UI to a separate file. Only the first one can be backported to 4.3.x
Thanks for the patch :)
Comment 6 Dario Andres 2009-08-11 01:31:23 UTC
SVN commit 1009838 by darioandres:

- Fix the usage of the custom icons as the "_mount"/"_unmount" suffixes are not
  used anymore in the current icon naming scheme

- Fix a small bug about an icon change doesn't trigger a save in the settings

BUG: 178824



 M  +1 -5      disks.cpp  
 M  +3 -27     mntconfig.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1009838
Comment 7 Dario Andres 2009-08-11 01:43:45 UTC
- Fix the usage of the custom icons as the "_mount"/"_unmount" suffixes are not
  used anymore in the current icon naming scheme

- Fix a small bug about an icon change doesn't trigger a save in the settings

BUG: 178824

http://websvn.kde.org/?view=rev&revision=1009838
Comment 8 Dario Andres 2009-08-11 01:50:11 UTC
SVN commit 1009843 by darioandres:

Backport to 4.3 fof:
SVN commit 1009838 by darioandres:

- Fix the usage of the custom icons as the "_mount"/"_unmount" suffixes are not
  used anymore in the current icon naming scheme

- Fix a small bug about an icon change doesn't trigger a save in the settings

CCBUG: 178824


 M  +1 -5      disks.cpp  
 M  +3 -27     mntconfig.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1009843
Comment 9 Alec Moskvin 2009-08-11 03:02:15 UTC
Aack! You committed while I was working on separating the patch in two...

You actually missed a few connect()'s (which became obvious once I got rid of the layout code)

Please see the patch I'm about to post:
Comment 10 Alec Moskvin 2009-08-11 03:03:36 UTC
Created attachment 36064 [details]
The fix without changing layouts
Comment 11 Dario Andres 2009-08-11 03:07:37 UTC
Oops, sorry about the confusion :)
I added a call to "slotChanged()" in iconChanged() , so both changing the icon to a new one or to the default one will trigger the change and allow the settings to be saved properly.
Thanks
Comment 12 Alec Moskvin 2009-08-11 18:37:50 UTC
Oh, OK. Sorry! I was in a bit of a hurry, so I did not have time to test it - I just compared my patch to the changelog and I saw it was missing some stuff. I checked it now, and it works fine.

By the way, thanks for accepting my patch so quickly :)
Comment 13 Dario Andres 2010-01-20 16:07:47 UTC
*** Bug 101555 has been marked as a duplicate of this bug. ***