Every once in a while my machine runs stuff in the background, like backups, db dumps and whatnot. This obviously causes performance issues at times, but among other things I don’t want to shutdown during these processes.
So I created a simple status icon to warn me if one of those processes were executing so I wouldn’t shutdown the machine, and it also will disable hibernate/suspend.
I figure I’d share it with the world.
Continue reading “enable/disable hibernate/suspend pygtk status icon”
I needed a hbox that would automatically take children widgets from one row and put it into another row depending on the width of the widget. This is similar to how html elements are handled on a web page.
The desired result was to basically make a crumb/tag list with a close button that you could easily remove elements from.
Continue reading “python, pygtk crumblist”
This code is a complete hack. I’ve probably done it wrong in someones eyes out there, and if by chance you are better at this sort of thing, and see room for improvements please pass it along. I can only stand so much insanity building this thing. It works for what I need.
Continue reading “Pygtk star rating cellrenderer for a treeview”
This snippit of code will restart/reload your python/pygtk app when you log out so you don’t have to keep restarting it.
gnome.program_init('program name', "1.0")
client = gnome.ui.master_client()
command = os.path.normpath(os.path.join(os.getcwd(), sys.argv))
try: client.set_restart_command([command] + sys.argv[1:])
client.set_restart_command(len(sys.argv), [command] + sys.argv[1:])
Anyone that’s ever used treeview, might understand my frustration.
I really don’t understand the reasoning behind forcing people to use cellrenders.
Continue reading “TreeView and the frustration”