D17167: Provide a method of assigning custom default icons for non-XDG dirs

2019-03-19 Thread Nathaniel Graham
ngraham abandoned this revision.
ngraham added a comment.


  The " 'Too much magic' trap" makes sense to me.

REPOSITORY
  R241 KIO

REVISION DETAIL
  https://phabricator.kde.org/D17167

To: ngraham, #frameworks, cfeck, broulik, dfaure
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D17167: Provide a method of assigning custom default icons for non-XDG dirs

2019-03-19 Thread David Faure
dfaure added a comment.


  IMHO this falls into the "too much magic" trap. If a user creates ~/Games it 
will have a special icon, but if he creates ~/Videogames, ~/mygames, ~/Steam, 
or choose a different translation than the translators picked, it won't trigger 
that magic -- with no indication anywhere of why this is the case.
  The standard paths are visible and configurable in `kcmshell5 desktoppath`. 
~/Games is not.

REPOSITORY
  R241 KIO

REVISION DETAIL
  https://phabricator.kde.org/D17167

To: ngraham, #frameworks, cfeck, broulik, dfaure
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D17167: Provide a method of assigning custom default icons for non-XDG dirs

2019-03-18 Thread Nathaniel Graham
ngraham added a comment.


  Ping? Any opinions regarding what I wrote in 
https://phabricator.kde.org/D17167#383242?

REPOSITORY
  R241 KIO

REVISION DETAIL
  https://phabricator.kde.org/D17167

To: ngraham, #frameworks, cfeck, broulik, dfaure
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D17167: Provide a method of assigning custom default icons for non-XDG dirs

2018-12-28 Thread Nathaniel Graham
ngraham added a comment.


  In D17167#371906 , @cfeck wrote:
  
  > But why hardcode the list in the source, instead of reading it from a 
file/resource that the user could expand?
  
  
  I don't see the benefit of putting the data into a configuration file. The 
whole idea is to make KIO default to picking a nicer icon when the user creates 
a folder with a name that would benefit from having a a nice-looking Breeze 
icon rather than just the standard folder icon. Currently the only one in the 
list is "Games", but this could be extended over time for other useful folder 
names. E.g. "Books" "Source Code", etc.
  
  > Ideally, the "New Folder" dialog would have a button to pick an icon
  
  That sounds like a good idea. But even with that, this patch would still be 
useful because it could pre-populate that icon picker with a folder icon more 
appropriate than just the default one. For example when you type the name 
"Games" into the text field, the default icon in the picker would automatically 
change to `folder-games`.
  
  This doesn't add any new features that users can't already accomplish 
themselves using handmade .desktop files or the existing icon picker 
functionality. It just tries to make KIO a little smarter and more considerate 
about choosing the default icon when the user creates commonly-named folders. A 
user specifically requested this functionality in 
https://bugs.kde.org/show_bug.cgi?id=401218

REPOSITORY
  R241 KIO

REVISION DETAIL
  https://phabricator.kde.org/D17167

To: ngraham, #frameworks, cfeck, broulik, dfaure
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D17167: Provide a method of assigning custom default icons for non-XDG dirs

2018-12-05 Thread Christoph Feck
cfeck added a comment.


  But why hardcode the list in the source, instead of reading it from a 
file/resource that the user could expand? Ideally, the "New Folder" dialog 
would have a button to pick an icon, and a checkbox "Remember icon for this 
folder name", automatically appending/replacing entries in this list.

REPOSITORY
  R241 KIO

REVISION DETAIL
  https://phabricator.kde.org/D17167

To: ngraham, #frameworks, cfeck, broulik, dfaure
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D17167: Provide a method of assigning custom default icons for non-XDG dirs

2018-12-05 Thread Nathaniel Graham
ngraham added a comment.


  In D17167#368727 , @dfaure wrote:
  
  > This feels *very* special cased. Where does this automagic ends? Any why 
only in $HOME? We'll keep adding entries here forever... Why don't people use a 
.directory file for this?
  >  If ~/Games is a de-facto standard, whoever creates it could add a 
.directory in there. If it's not, then that makes my point.
  
  
  Well, it //is// very special cased. :)
  
  But I think the better question is whether it's useful or nice to have. The 
whole point of this patch is to gain the ability for KIO to automatically set 
appropriate default icons for common-but-not-XDG directories that people might 
create. Sure, people can already set custom icons for those folders themselves 
if they want. It's just a few clicks. This patch simply provides a mechanism 
for KIO to make it automatic.
  
  Have you ever had one of those moments when you go to do something that you 
expect to be a manual, multi-step process but the software anticipates what 
you're going to do and does it for you? It's those little "aha, I love that 
they thought of this!" moments that make people fall in love with software. 
That's all this is trying to help facilitate. :)

REPOSITORY
  R241 KIO

REVISION DETAIL
  https://phabricator.kde.org/D17167

To: ngraham, #frameworks, cfeck, broulik, dfaure
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D17167: Provide a method of assigning custom default icons for non-XDG dirs

2018-11-30 Thread David Faure
dfaure requested changes to this revision.
dfaure added a comment.
This revision now requires changes to proceed.


  This feels *very* special cased. Where does this automagic ends? Any why only 
in $HOME? We'll keep adding entries here forever... Why don't people use a 
.directory file for this?
  If ~/Games is a de-facto standard, whoever creates it could add a .directory 
in there. If it's not, then that makes my point.

REPOSITORY
  R241 KIO

REVISION DETAIL
  https://phabricator.kde.org/D17167

To: ngraham, #frameworks, cfeck, broulik, dfaure
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D17167: Provide a method of assigning custom default icons for non-XDG dirs

2018-11-28 Thread Kai Uwe Broulik
broulik added a reviewer: dfaure.

REPOSITORY
  R241 KIO

REVISION DETAIL
  https://phabricator.kde.org/D17167

To: ngraham, #frameworks, cfeck, broulik, dfaure
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D17167: Provide a method of assigning custom default icons for non-XDG dirs

2018-11-25 Thread Nathaniel Graham
ngraham updated this revision to Diff 46234.
ngraham added a comment.


  Match existing brace style for inline initializer

REPOSITORY
  R241 KIO

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D17167?vs=46233=46234

BRANCH
  custom-icons-for-non-xdg-dirs (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D17167

AFFECTED FILES
  src/core/kioglobal_p.cpp

To: ngraham, #frameworks, cfeck, broulik
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D17167: Provide a method of assigning custom default icons for non-XDG dirs

2018-11-25 Thread Nathaniel Graham
ngraham updated this revision to Diff 46233.
ngraham added a comment.


  Correct typo in the comment

REPOSITORY
  R241 KIO

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D17167?vs=46232=46233

BRANCH
  custom-icons-for-non-xdg-dirs (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D17167

AFFECTED FILES
  src/core/kioglobal_p.cpp

To: ngraham, #frameworks, cfeck, broulik
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D17167: Provide a method of assigning custom default icons for non-XDG dirs

2018-11-25 Thread Nathaniel Graham
ngraham created this revision.
ngraham added reviewers: Frameworks, cfeck, broulik.
Herald added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
ngraham requested review of this revision.

REVISION SUMMARY
  This patch adds a new folder-to-icon map that makes it possible to assign 
default icons for non-XDG directories. It is pre-populated with `~/Games`, as 
requested in 401218.
  
  The new map includes entries for the localized and non-located string, 
because some people like to use English names even with a different locale.
  
  BUG: 401218
  FIXED-IN: 5.53

TEST PLAN
  - Created `~/Games`; it got the new `folder-games` icon
  - Created a new user account and checked out its homedir; all XDG dirs 
continued to get the correct icon

REPOSITORY
  R241 KIO

BRANCH
  custom-icons-for-non-xdg-dirs (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D17167

AFFECTED FILES
  src/core/kioglobal_p.cpp

To: ngraham, #frameworks, cfeck, broulik
Cc: kde-frameworks-devel, michaelh, ngraham, bruns