FileChooser & DirChooser: Custom bookmarks are now correctly refreshed when they change.

[GB.FORM]
* BUG: FileChooser & DirChooser: Custom bookmarks are now correctly refreshed when they change.
* NEW: Add 'unselect' stock icon.
This commit is contained in:
gambas 2020-05-16 01:41:58 +02:00
parent aa46af3681
commit a04fa2a24b
4 changed files with 13 additions and 0 deletions

View file

@ -5,6 +5,7 @@ Inherits CBookmark[]
Property Private As Collection[]
Private $aPrivate As Collection[]
Private $iBookmarkAge As Integer
Public Sub _new()
@ -41,6 +42,9 @@ Public Sub Load()
Dim aBookmark As String[]
Dim cPrivate As Collection
Dim hBookmark As Bookmark
If $iBookmarkAge = Bookmarks._Age Then Return
$iBookmarkAge = Bookmarks._Age
Me.Clear()

View file

@ -6,6 +6,8 @@ Static Property Read Count As Integer
Static Private $aBookmark As New Bookmark[]
Static Public _Age As Integer = 1
Static Public Sub Add(Path As String, Optional Name As String, Icon As String)
Dim hBookmark As Bookmark
@ -18,6 +20,7 @@ Static Public Sub Add(Path As String, Optional Name As String, Icon As String)
End With
$aBookmark.Add(hBookmark)
Inc _Age
End
@ -35,6 +38,8 @@ Static Public Sub Remove(Path As String)
Endif
Wend
Inc _Age
End
Static Private Function Count_Read() As Integer
@ -46,6 +51,7 @@ End
Static Public Sub Clear()
$aBookmark.Clear
Inc _Age
End

View file

@ -953,6 +953,8 @@ Private Sub FillMenu()
If IsBookmarkVisible() Then
$hBookmarkList.Load()
mnuBookmark = New Menu(mnuPopup)
mnuBookmark.Name = "mnuBookmark"
mnuBookmark.Text = ("Bookmarks")

View file

@ -190,6 +190,7 @@ trash [breeze*!16]places/user-trash;places/user-trash
undo actions/edit-undo
unindent actions/format-indent-less
unlock actions/object-unlocked
unselect actions/edit-select-none
up actions/go-up
upload [breeze*]actions/cloud-upload
user [breeze*]actions/user-identity;stock/stock_person;status/avatar-default