Stefano Verna escreveu isso aí: > Antonio Terceiro wrote: >> Hi, >> >> Stefano escreveu isso aí: >>> I'm attaching you a patch for freedesktop package to show also dirs >>> and icons contained in ~/Desktop. It parses the system MIME types to >>> find the right icons. Please comment it. >> >> It looks nice, thanks for working on that. I have some comments, though: >> >> 0) would you please rebase your work off the current code. It seems you >> reverted several recent changes to the code organization. In special, stick >> to >> the current interface of the functions (i.e. using actual, explicit arguments >> instead of single-table-argument functions) > > This is a common tecnique to avoid passing a lot of default parameters > to functions (js docet :)). Also, this is useful for preserving a fixed > but easily extendible interface, as we're still in a very experimental > state. I personally suggest to preserve it.
ok, let's go with it. >> 2) I'm not sure it's usefull to add explictly both application and file >> icons. >> Why don't we have a single add_destkop_icons that does both things, but >> without >> exposing it to the user? > > We could do it, if you think this is a level of custumization not needed > by the average awesome user. Two separate functions is a more modular > approach to the problem. We just have to keep those functions local, and > expose a merged add_desktop_icons() function that calls both of them. I've addeed a add_destkop_icons function that just calls the other two. >> 3) I also don't like splitting the icon lookup like that. Finding an icon >> must >> be a unique operation. Mind you, some applications actually use mimetype >> icons >> as icons for their launchers, so I don't differentiating the icon lookup like >> that will help us. > > Maybe I'm wrong, but the process of finding a .desktop icon is very > different from finding a file icon, just look at the code. The same > applies to directory icons. Again, I propose 3 different local functions > to modularize the code. We could then have a callable "merged" function. > Obviously there's still some refactoring to be done there :) The Freedesktop.org specification does not differentiate the types of icons. I've kept the lookup file because it actually needs some specific logic. Thanks for your work, I've just pushed your patches together with some changes I did on top of it. -- Antonio Terceiro <[email protected]> http://people.softwarelivre.org/~terceiro/ GnuPG ID: 0F9CB28F
signature.asc
Description: Digital signature
