Bug 427478 - New bookmarks discard workgroup
Summary: New bookmarks discard workgroup
Status: RESOLVED FIXED
Alias: None
Product: Smb4k
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Alexander Reinholdt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-09 09:18 UTC by Bernhard Lindner
Modified: 2020-10-27 05:48 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Add bookmark in Smb4K (493.87 KB, image/png)
2020-10-18 06:44 UTC, Alexander Reinholdt
Details
Bookmark in bookmark menu (512.98 KB, image/png)
2020-10-18 06:46 UTC, Alexander Reinholdt
Details
Bookmark in editor (500.21 KB, image/png)
2020-10-18 06:46 UTC, Alexander Reinholdt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bernhard Lindner 2020-10-09 09:18:37 UTC
When adding a bookmark in smb4k 3.0.4 including a workgroup name, I can not see the same work group when visiting the new bookmark in the boomark editing window. Instead the workgroup is empty there. When setting the workgroup again in the editing window, it seems to be accepted properly.
Comment 1 Alexander Reinholdt 2020-10-18 06:44:57 UTC
Created attachment 132509 [details]
Add bookmark in Smb4K
Comment 2 Alexander Reinholdt 2020-10-18 06:46:09 UTC
Created attachment 132510 [details]
Bookmark in bookmark menu
Comment 3 Alexander Reinholdt 2020-10-18 06:46:29 UTC
Created attachment 132511 [details]
Bookmark in editor
Comment 4 Alexander Reinholdt 2020-10-18 06:52:25 UTC
Thank you for reporting this issue!

I tried to reproduce it with the latest development version (the code of the bookmark handling did not change (much)), but I did not succeed. I opened the 'Add Bookmark' dialog in the network neighborhood browser and added the group 'test' to the bookmark (see first attachment). The bookmark appears correctly under the group 'test' in the bookmark menu (second attachment) and in the bookmark editor (third attachment).

If you did something else, could you please add information on what you exactly did, so that I can track down the issue.
Comment 5 Bernhard Lindner 2020-10-18 08:23:04 UTC
Hm. I think this is a misunderstanding. I assumed workgroup and group is the same thing. If workgroup (a network setting?) is different from group (only a bookmark category?) I was simply confused by the GUI of smb4k.

When creating a shared folder (including the optional bookmark) I can enter "workgroup", but no "group". When managing bookmarks I can change the "group" but not the "workgroup".

Can this be improved? I could think of three improvements:
1. When creating a shared folder and (by ticking the checkbox) the optional bookmark, a "group" line-input could be shown.
2. When managing bookmarks there could be a workgroup line-input along with the line-inputs for IP address and group.
3. If a workgroup was entered but no group, smb4k could use the workgroup for categorizing the bookmarks (I guess users that entered a workgroup do not want to repeat the same string as a group to get expected bookmark categorization).
Comment 6 Alexander Reinholdt 2020-10-18 13:12:47 UTC
Thank you for the explanation.

Maybe it would be best to implement a combination of the three ways you mentioned. So, it would also not be necessary anymore to show the 'Add Bookmark' dialog when bookmarking a share via the mount dialog.
Comment 7 Bernhard Lindner 2020-10-18 18:49:28 UTC
I guess this would improve usage definitely. 

BTW my co-worker (who is software developer as well) also didn't understand the GUI the right way. So it isn't only me :-)
Comment 8 Alexander Reinholdt 2020-10-27 05:48:07 UTC
Git commit 312a97e434766a77ccadc38fd9f780b17ebdb9b7 by Alexander Reinholdt.
Committed on 27/10/2020 at 05:48.
Pushed by areinholdt into branch 'master'.

Improved the way shares are bookmarked in the mount dialog.

During this modification, also some members in class Smb4KBookmark were renamed and the code adjusted accordingly. Also, several bugs were identified and fixed.

M  +6    -6    core/smb4kbookmark.cpp
M  +8    -8    core/smb4kbookmark.h
M  +62   -22   core/smb4kbookmarkhandler.cpp
M  +19   -10   core/smb4kbookmarkhandler.h
M  +480  -254  core/smb4kbookmarkhandler_p.cpp
M  +13   -105  core/smb4kbookmarkhandler_p.h
M  +6    -4    core/smb4kmounter.cpp
M  +347  -79   core/smb4kmounter_p.cpp
M  +35   -36   core/smb4kmounter_p.h
M  +3    -3    plasmoid/package/contents/ui/BookmarkItemDelegate.qml
M  +17   -17   plasmoid/package/contents/ui/BookmarksPage.qml
M  +1    -1    plasmoid/package/contents/ui/NetworkBrowserPage.qml
M  +18   -18   plasmoid/plugin/smb4kbookmarkobject.cpp
M  +12   -12   plasmoid/plugin/smb4kbookmarkobject.h
M  +29   -35   plasmoid/plugin/smb4kdeclarative.cpp
M  +14   -6    plasmoid/plugin/smb4kdeclarative.h
M  +1    -1    plasmoid/plugin/smb4kdeclarative_p.h
M  +63   -83   smb4k/smb4kbookmarkmenu.cpp
M  +4    -6    smb4k/smb4kbookmarkmenu.h

https://invent.kde.org/network/smb4k/commit/312a97e434766a77ccadc38fd9f780b17ebdb9b7