Photobomb has hit a point where adding new features takes a bit longer than it used to because it is now necessary to refactor the code before it is manageable to add new features. In this case, the code for creating the list of images in the Pictures folder at start up was just part of the code for the main window. The fact that it was mixed in with tons of other code made it hard to maintain and enhance.
Last night I wanted to enhance the directory tab by making it so that users can select any directory they want. This is important to me as I wanted some way to get directly to pictures on a camera. By allowing the user to navigate the camera's directory, I could provide access, although in an admittedly cheesy and file centric manner. In the picture above, I am looking at pictures from the memory card from my wife's camera. It would be sweet to have proper camera integration some day.
It took me a couple of hours last night to move the tab into it's own class, as well as to actually implement the functionality for selecting and loading the directory. But now it's easy for me to work on the directory loading function. Note that directory selection is achieved via a new Quidget that I added. quidgets.prompts.choose_directory() yields a path to a directory. There is another refactoring to be done, which is to extract a base class for all of the tabs. However, I am refraining from doing any refactoring, unless it is required to add features.
Anway, after all was said and done, I had a functional tab. However, I was not too happy with how it looked. The folder symbol was next to, but not part of the button. And the tabs are plain with just words, but worse, I named the first tab just "disk", which is descriptive I guess, but just seems awkward.
So tonight I dinked around a bit with icons. I put the folder icon inside the button, and I used theme icons and some border_width to achieve some nicer buttons. There's still room for another button or two.
After a while of working on refactoring last night, I spent some time working on an icon for Photobomb. That's supposed to be camera icon with a bomb instead of a lens. I just created this with Inkscape, and then used glade to set the window icon to my new svg. I don't mean that as an insult to Inkscape. The crappiness of the icon is due to my ineptitude with anything artistic, Inkscape is awesome.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment