Bug 92789 - Enable Locking of Desktop Icons arrangement
Summary: Enable Locking of Desktop Icons arrangement
Status: CLOSED FIXED
Alias: None
Product: kdesktop
Classification: Miscellaneous
Component: icons (show other bugs)
Version: unspecified
Platform: openSUSE Other
: NOR wishlist
Target Milestone: ---
Assignee: Benoit Walter
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-06 05:40 UTC by Joel Wiramu Pauling
Modified: 2009-01-02 20:29 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Current Desktop .directory (396 bytes, text/plain)
2004-11-06 05:49 UTC, Joel Wiramu Pauling
Details
Patch to cure the bug (3.92 KB, patch)
2005-06-08 02:14 UTC, Luke Sandell
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joel Wiramu Pauling 2004-11-06 05:40:13 UTC
Version:            (using KDE KDE 3.3.1)
Installed from:    SuSE RPMs
Compiler:          All Versions 
OS:                Other

This Report is related to the following bug reports: Bug 86444, Bug 47734, Bug 30968, Bug 32219, Bug 75478, Bug 46316, Bug 6368, Bug 16720, Bug 15155, Bug 9883, Bug 18531.

This bug should be considered a severe useability bug, I have filled it as a bug and not a feature request. After reviewing prior kdestop/icon bugs.

Kde's icon placement scheme currently is quite confusing for lay users, and does not react in ways which naieve users expect. I have done a number of useability tests with the desktop icon arrangement model in kde 3, and have noted a number of issues for lay users.

1: Right click icon arrangement context menus for icon arrangement do not do what users expect. i.e Users clicking on allign to horizontally/vertically do not work as expect on non-standard desktop sizes (such as 1440x900). Currently these options (if allign to grid is also selected)LOCK icons to a horizontal/vertical configuration with large spaces, which then stop users from manually arranging them.

Resolution: Clean up context menu wording so that they are more intuitive to users... I.e Auto-Arrange Icons-vert/horiz makes more sense to users.

2: The most serious problem, There is currently no ability to lock desktop icon positions. This is a serious problem when desktop sizes are resized, or accidental clicking. For example user a has a large number of link/documents and shortcuts on her desktop, she takes time to arrange them just so, but find that some applications seem to "mess up" her icons, and she has to re-arrange all her icons again frequently. 

This is caused by applications resizes the screen, such as the resize and rotate applet. 

Resolution: Implement a Lock Icons to Current Position item in the Icons context menu.
This should behave in such a way that accidental dragging of icons, snaps icons back to original location. Any New Icons added should be placed in an unfilled area of the desktop, and would require unlock from context menu to be placed. 

This should be implemented so that desktop icon/position profile information is stored for each resolution. I.e desktop icon position profile stored for 1024x768, and default to current auto arrange behaviour if no position profile exists for that resolution.


Again this bug is simply the culmination of a very obtuse icon placement model, however implementing such a locking function will remove at least some of the problems/feature requests which have been filled in the past.

Kind regards

Joel Wiramu Pauling

New Zealand
Comment 1 Joel Wiramu Pauling 2004-11-06 05:49:00 UTC
Created attachment 8189 [details]
Current Desktop .directory

Current .directory file, does not specify any resolution specific location
information, nor is there an ability to lock all icon positions on desktop.
Comment 2 Joel Wiramu Pauling 2004-11-06 06:18:37 UTC
bug 35203 is also very much related to this report, and discuss other useability issues with the icon placement scheme. Consider this report to be more of an interim solution request for many of the issues reported in bug 35203
Comment 3 Thibaut Cousin 2004-11-06 09:44:41 UTC
*** This bug has been confirmed by popular vote. ***
Comment 4 Luke Sandell 2005-06-08 02:11:00 UTC
I have created a patch that adds a "Lock in Place" entry under the "Icons" submenu. Added bonus: removes that ridiculous "Bookmarks" submenu as well (only from the context menu) as per bug 62791. I will create an attachment.
Comment 5 Luke Sandell 2005-06-08 02:14:51 UTC
Created attachment 11371 [details]
Patch to cure the bug

Please commit!
Comment 6 Joel Wiramu Pauling 2005-06-08 02:19:19 UTC
Thanks luke, it's much appreciated. Can you submit for inclusion in head please.

Kind regards

Joel W (P.S my GF will be mighty happy about this ;-)
Comment 7 Luke Sandell 2005-06-09 18:26:53 UTC
Be aware that this particular patch _only_ keeps icons from being dragged around... it won't stop new icons from messing them up.
Comment 8 David Faure 2005-06-10 11:24:16 UTC
SVN commit 423947 by dfaure:

FEATURE: RMB entry for locking icons where they are, so that they can't be moved.
FEATURE: 92789


 M  +6 -0      kdesktop.kcfg  
 M  +24 -4     krootwm.cc  
 M  +1 -0      krootwm.h  


--- trunk/KDE/kdebase/kdesktop/kdesktop.kcfg #423946:423947
@@ -165,6 +165,12 @@
       <label>Sort directories first</label>
       <whatsthis>Enable this to place directories in front of the sorted list, otherwise they are amongst the files.</whatsthis>
     </entry>
+    <entry key="LockIcons" type="Bool">
+      <default>false</default>
+      <label>Lock in Place</label>
+      <whatsthis>Check this option if you want to keep your icons from moving.</whatsthis>
+    </entry>
+
     <entry key="AlwaysFirstItems" type="StringList">
       <default></default>
       <label></label>
--- trunk/KDE/kdebase/kdesktop/krootwm.cc #423946:423947
@@ -171,6 +171,9 @@
                  m_actionCollection, "realign" );
      connect( aAutoAlign, SIGNAL( toggled( bool ) ),
               this, SLOT( slotToggleAutoAlign( bool ) ) );
+     KToggleAction *aLockIcons = new KToggleAction(i18n("Lock in Place"), 0, m_actionCollection, "lock_icons");
+     connect( aLockIcons, SIGNAL( toggled( bool ) ),
+              this, SLOT( slotToggleLockIcons( bool ) ) );
   }
   if (m_bDesktopEnabled)
   {
@@ -236,12 +239,16 @@
 
   // Read configuration for icons alignment
   if ( m_bDesktopEnabled ) {
-    bool b = KDesktopSettings::autoLineUpIcons();
-    m_pDesktop->iconView()->setAutoAlign( b );
+    m_pDesktop->iconView()->setAutoAlign( KDesktopSettings::autoLineUpIcons() );
+    if ( kapp->authorize( "editable_desktop_icons" ) ) {
+        m_pDesktop->iconView()->setItemsMovable( !KDesktopSettings::lockIcons() );
+        KToggleAction *aLockIcons = static_cast<KToggleAction*>(m_actionCollection->action("lock_icons"));
+        if (aLockIcons)
+            aLockIcons->setChecked( KDesktopSettings::lockIcons()  );
+    }
     KToggleAction *aAutoAlign = static_cast<KToggleAction*>(m_actionCollection->action("realign"));
     if (aAutoAlign)
-        aAutoAlign->setChecked( b );
-
+        aAutoAlign->setChecked( KDesktopSettings::autoLineUpIcons() );
     KToggleAction *aSortDirsFirst = static_cast<KToggleAction*>(m_actionCollection->action("sort_directoriesfirst"));
     if (aSortDirsFirst)
         aSortDirsFirst->setChecked( KDesktopSettings::sortDirectoriesFirst() );
@@ -412,6 +419,9 @@
        m_actionCollection->action( "lineupVert" )->plug( pIconOperationsMenu );
        pIconOperationsMenu->insertSeparator();
        m_actionCollection->action( "realign" )->plug( pIconOperationsMenu );
+       KAction *aLockIcons = m_actionCollection->action( "lock_icons" );
+       if ( aLockIcons )
+           aLockIcons->plug( pIconOperationsMenu );
 
        desktopMenu->insertItem(SmallIconSet("icons"), i18n("Icons"), pIconOperationsMenu);
     }
@@ -679,6 +689,16 @@
     }
 }
 
+void KRootWm::slotToggleLockIcons( bool lock )
+{
+    if (m_bDesktopEnabled)
+    {
+        m_pDesktop->iconView()->setItemsMovable( !lock );
+        KDesktopSettings::setLockIcons( lock );
+        KDesktopSettings::writeConfig();
+    }
+}
+
 void KRootWm::slotRefreshDesktop() {
     if (m_bDesktopEnabled)
     {
--- trunk/KDE/kdebase/kdesktop/krootwm.h #423946:423947
@@ -106,6 +106,7 @@
   void slotConfigureDesktop();
   void slotToggleDirFirst( bool );
   void slotToggleAutoAlign( bool );
+  void slotToggleLockIcons( bool );
   void slotToggleDesktopMenu();
   void slotUnclutterWindows();
   void slotCascadeWindows();
Comment 9 FiNeX 2009-01-02 20:29:34 UTC
Bug closed. Kdesktop is no more mantained.