From kde-core-devel Sat Aug 15 13:47:06 2009 From: Kevin Ottens Date: Sat, 15 Aug 2009 13:47:06 +0000 To: kde-core-devel Subject: Re: device-automounter moved to kdereview Message-Id: <200908151547.11683.ervin () kde ! org> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=125034430028856 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--nextPart1761721.e3yRCcE4CG" --nextPart1761721.e3yRCcE4CG Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable On Sunday 9 August 2009 21:34:45 Trever Fischer wrote: > I've moved device-automounter out of playground and into kdereview. After > the review, I hope for it to end up in kdebase/runtime/solid/. Shouldn't be a problem I guess if we can agree on a few changes. :-) > Then after that, I hope to combine it with the solid-actions-kcm to let > it handle other automatic execution of actions when devices get attached. Well, at least for the configuration parts that looks like the way to go. A= ll=20 this stuff should be presented at one place (from the user pov). You'll=20 probably have to discuss with Ben Cooksley for that who is in charge of the= =20 action kcm. BTW, most of the people working on the hardware related topics are on kde- hardware-devel so you probably want to register there. > device-automounter is a small kded plugin and kcm page that adds removable > media automounting to KDE. Its more than blindly automatic, since it has a > little bit more logic (further describe in the SETTINGS file) to make it > smarter than your average automounter, while still behaving without > configuration as a naive user would expect. I took a look at it and it's mostly doing it blindly albeit a few heuristic= s=20 as you mentionned. In any case that's the kind of stuff which can't work in= a=20 multi-user environment, and it can also cause troubles when someone is=20 deleting/creating/formatting partitions. So here is my (short) list of=20 proposed changes. 1) bool shouldAutomount =3D deviceAutomount || (enabled && typeCondition &&= =20 ((automountKnown && known) || lastSeenMounted)); really has to become: bool shouldAutomount =3D enabled && (... rest of the condition); If I set automounting to disabled, I really want it disabled period. There= =20 should not be some special exception to that. 2) AutomountEnabled should have false by default. So that means that (with = the=20 previous change) automounting is completely shutdown by default. We can't=20 really afford having something doing automounting enabled by default for th= e=20 reasons I pointed out above (multi-user envs, formatting, etc.) 3) I agree with the other people who commented in this thread that using th= e=20 UDI in the GUI doesn't work, it's really confusing. Moreover some of the lo= gic=20 there needs to be refined as for some reason when I plugged my usb flash dr= ive=20 (containing only one volume) I got 8 devices reported in the "Device=20 Overrides" list to always automount... BTW a small nitpick on the KCM, the first column appears really tiny by=20 default here which makes the Name column unreadable. > Everything passed krazy2all, with the exception of line 40 in > kded/DeviceAutomounter.cpp because I can't remember how to get krazy2 to > ignore the foreach checker. My rationale for that is that using > Solid::VolumeAccess::setup() requires a non-const Device, so two copy > constructors is cheaper than converting from a Device to a QString udi and > back. If I'm wrong, feel free to correct me/point and laugh. This you could solve by ditching the foreach construct in favor of a for lo= op=20 using C++ style iterators. Regards. =2D-=20 K=E9vin 'ervin' Ottens, http://ervin.ipsquad.net "Ni le ma=EEtre sans disciple, Ni le disciple sans ma=EEtre, Ne font reculer l'ignorance." --nextPart1761721.e3yRCcE4CG Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEABECAAYFAkqGvF8ACgkQB0u7y43syeJKbACfVFhm7/q4U3BIZIB6JQ5FPBlW im8AoKUgb2f9i/LDBd3amde789iHM+Ya =cFmW -----END PGP SIGNATURE----- --nextPart1761721.e3yRCcE4CG--