From 8ab947a2fca681557242af803b71cc93f404a053 Mon Sep 17 00:00:00 2001 From: pfg github Date: Tue, 10 Mar 2015 15:49:47 -0700 Subject: [PATCH] Fixed crash with icons. Fixed icon dragging. Dragged icons don't save --- ShiftOS/ShiftOSDesktop.vb | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/ShiftOS/ShiftOSDesktop.vb b/ShiftOS/ShiftOSDesktop.vb index 40dccdd..9a23926 100644 --- a/ShiftOS/ShiftOSDesktop.vb +++ b/ShiftOS/ShiftOSDesktop.vb @@ -1573,7 +1573,11 @@ SortOutBooleans(VideoPlayerCorrupted, 610, True) SortOutBooleans(VirusScannerCorrupted, 612, True) SortOutBooleans(WebBrowserCorrupted, 613, True) - If loadlines(614) = 11 Then boughtdesktopicons = True Else boughtdesktopicons = False + Try + If loadlines(614) = 11 Then boughtdesktopicons = True Else boughtdesktopicons = False + Catch + boughtdesktopicons = False + End Try Viruses.startactiveviruses() If IO.File.Exists(ShiftOSPath + "Shiftum42\Skins\Current\skindata.dat") Then loadcurrentskin() If My.Computer.FileSystem.DirectoryExists(ShiftOSPath + "Shiftum42\Icons") Then setupicons() @@ -4775,7 +4779,11 @@ If Skins.enabledraggableicons = True Then Dim lvi As ListViewItem = CType(e.Data.GetData("System.Windows.Forms.ListViewItem"), ListViewItem) Dim Offset As Size = Size.Subtract(Cursor.Size, New Size(Cursor.HotSpot.X, Cursor.HotSpot.Y)) - lvi.Position = Point.Subtract(desktopicons.PointToClient(New Point(e.X, e.Y)), Offset) + If (e.X < 53) Then + lvi.Position = Point.Subtract(desktopicons.PointToClient(New Point(53, e.Y)), Offset) + Else + lvi.Position = Point.Subtract(desktopicons.PointToClient(New Point(e.X, e.Y)), Offset) + End If e.Effect = DragDropEffects.Move End If