April2012
Update gtk progressbar with a thread and gobject idle_add
Creating a thread that makes a gobject idle_add function to do the gui update is the only method I could find to get gtk progress bars to update reliably! This is just a simple example I made to demonstrate a gobject updating a progress bar that’s called from a thread started in the gui.
Convert html hexidecimal color to pango rgb color
This is a simple function to convert html colors like #AA00FF or #17f5ac to RGB colors for use with Pango or other libraries.
How to Install Eric python IDE without rpm or yum
Download eric ide tarball from sourceforge, unpack and install using python. Everything should go smoothly, but if not, create shell scripts in your path somewhere to launch eric with any command line options.
Dropbox in Linux behind a firewall or proxy
But instead, you find it needs an additional piece, the dropboxd daemon that isn’t included in the package. You see this popup and you click ok, but for whatever reason it just hangs there. Nothing is happening. Now what…?
How to get the My Documents path in all versions of Windows
If you’re looking for a generic way to find the user’s “My Documents” folder in windows, os.environ variables won’t work because they’ change in Windows from one version to another. This method works on Windows XP and Windows 7 which is what I need:
Flip colors or flash text in gtk textbuffers
The get_property() ability is there, but it’s just not as intuitive as it should be. So here’s the method I used to make all the text in a buffer flash by inverting the foreground and background properties. Calling flip_tags() just once will just swap the colors one time, but add this into a gobject.idle_add or a timeout function, and you should get a nice flashing effect.