Feed Notifier Update: “Dismiss All” Feature and Shutdown Crash Fix
I’ve updated the Feed Notifier application with one new feature and one bug fix. A “Dismiss All” feature allows you to clear the popup queue so that the popups will stop until more new ones come in. I also finally tracked down the cause of a bug that caused the app to crash on shutdown/logout. Yay. The new installer has been uploaded.
Feed Notifier Update: Options Dialog
The Feed Notifier application has been updated with an options dialog. The following options are now available:
- Pop-up Location (which corner of the desktop)
- Pop-up Duration (in seconds)
- Pop-up Transparency
- Hover Timeout (how long to wait if the user hovered over the popup before attempting to close it again)
- Idle Timeout (how long the user must be idle before the notifier will stop polling feeds)
- Entry Cache Size (how many items to remember per feed, which prevent duplicate notifications)
Here’s a screenshot of the new options dialog:
The installer has been updated and uploaded to the same URL.
Feed Notifier: RSS/Atom System Tray Notification App
I’ve created a small but useful application that resides in the system tray and polls RSS/Atom web feeds for new content. When new items are found, the app displays a popup notification with the title, description and link for the item. If interested, you can click on the link and open the page in your default browser. If not, you can just ignore the popup and it will go away in 10 seconds or you can click on it and it will go away immediately.
Feed Notifier is not a full-blown RSS reader application and it doesn’t aim to be. Its primary purpose is real-time notification of new content. Nothing more, nothing less.
I added a full page about Feed Notifier on my site here:
http://www.michaelfogleman.com/feed-notifier/
Finally, here’s a screenshot. Download the installer and let me know what you think!
wxPython: Showing a window without activating it (bringing it to focus).
I had a really hard time figuring out how to do this so I decided to post the (simple) solution on my blog.
I basically needed to be able to show a window without it stealing focus from the currently active top-level window. A simple frame.Show() was not sufficient because it activates the window. Eventually I went to a platform-specific solution for Windows:
from ctypes import windll windll.user32.ShowWindow(window.GetHandle(), 8)
The second argument (8) is the SHOWNA constant which shows the window but does not activate it. This worked but ended up breaking other things. (The display contents underneath the window were not redrawn properly when the window was eventually closed.) So, after downloading the wxWidgets source and browsing for a few minutes I found a new solution.
window.Disable() window.Show() window.Enable()
If a window is disabled, wxWidgets uses the SHOWNA constant when showing it. This also fixed the redrawing issue, perhaps because now wx is still in charge of showing the window (maybe I was messing up some state internal to wxPython).
So there you have it. To show a window without stealing focus in wxPython (or wxWidgets), just disable it, show it and then enable it.
Work Project: Generic Diagram Widget
I generally avoid sharing information about my work projects, but this is sufficiently generic that it won’t reveal anything that should be kept secret.
A new application that I’m developing at work requires a UI control that allows the user to create and edit graph diagrams, sorta like Visio flowcharts. After two days of working on it, I have a generic UI widget that can render diagrams like this one:
The fancy styling isn’t really required for our uses but it was easy enough to add so I went with it. All we really need is the ability to add blocks to the diagram and to connect them in a certain way.
Some features that aren’t obvious from a screen shot include:
- Snap to grid
- Show/hide grid
- Move object to front/back (change z-order)
- Toggle anti-aliasing
- Select one or many objects
- Delete selected objects
- Move/edit objects as a group
- Resize objects
- Configure fill, stroke, text colors
- Configure border width and labels
- Configure shape: rectangle, rounded rectangle or ellipse
The widget can contain any objects with x, y, width and height coordinates and a render method. So it’s pretty flexible. It also supports various types of connectors (only one type is shown in this screenshot - straight arrows). I created this widget in Python using wxPython and it’s quite snappy, especially with anti-aliasing turned off.
Now I just need to start working on the parts that aren’t generic so we can actually use this thing at work. Anyway, it was fun creating this little widget so I wanted to share my results so far.
Retro Arcade: Pacman
Four years ago I created a Pacman clone in Java using SWT (my preferred Java graphics toolkit). It’s one of the few personal programming projects that I actually completed, so I wanted to bring it back up on my new blog. It’s still just as fun to play as it ever was!
If you have Java installed (which you probably do, even if you don’t know it) you can play just by clicking on the link below.
Play! http://www.michaelfogleman.com/static/pacman/pacman.jnlp
Evolutionary Algorithm: Image-Forming Polygons
My co-worker recently showed me a neat project that he found online: http://rogeralsing.com/2008/12/07/genetic-programming-evolution-of-mona-lisa/
The basic idea is that an evolutionary algorithm is used to mutate a set of polygons until they resemble a target image.
I immediately wanted to try implementing this idea on my own. I used Python and PIL (Python Imaging Library). After tweaking it for a couple weeks, I had quite satisfactory results. Here’s a sample, a picture of me:
It took 17 hours of running the program to reach this level of resemblance, although decent results only took 10 or so minutes. Since then, I’ve improved the program even more and it’s much faster. My latest implementation uses Pyglet, an OpenGL based library.
I think I’ve scratched this itch, but I did discover some neat Python libraries along the way and I’m excited to play with them some more. Pyglet, Rabbyt and Pymunk are some of the things I’ve just recently discovered in working on this (though only Pyglet is directly related).
Posting from my iPhone…
I’m no graphic designer, so no more attempts at a custom blog template this time around. Just a simple blog.
It’s a girl!
My sister had her second child on Sunday around 6am. Now I have a nephew and a niece! Meet Jayda Elizabeth Marie Gainey… (the only picture I have so far!)

Better if used by 05DEC08WCWC12:11 00B
How many times have you looked for the expiration date on a product only to spend 30 seconds trying to decipher it? Throw in poorly printed characters and a horrible font and it gets bad enough that I’m willing to blog about it. It wasn’t until I typed this post that I finally figured out the expiration date by typing it. Okay, I’ll go finish cooking now.




