Showing posts with label gnome. Show all posts
Showing posts with label gnome. Show all posts

Thursday, July 9, 2009

creating a custom widget with pyGTK

I'm working on a desktop app for Gnome.

I thought I'd write my own widget to display the results, and since I had made rapid progress with python, I figured I'd stick with it.

After a hour or so looking around the web, I found an excellent tutorial on extending GTK.Widget with Python:
http://www.learningpython.com/2006/07/25/writing-a-custom-widget-using-pygtk/
and subsequently found a link to some demo code on the gnome website:
http://git.gnome.org/cgit/pygtk/tree/examples/gtk/widget.py

So, now I'm armed with these resources, I can get hacking!
Next post: the results!

Thursday, June 18, 2009

Hamster time tracker on opensuse

I've got interested in trying to identify what I spend my time in front of my computer doing. I knocked up a python script to watch 'wnck' and 'dbus' for desktop events (dbus for screensaver) which is available on my website.

While I was thinking of alerting the gnome community to the embryonic work, I discovered the 'Hamster' applet, which apparently is aimed at fulfiling the same need as my scratchy program.

So, I visited the hamster site and cloned the git repository onto my machine. Then I went about configuring it.

For OpenSuse, this turned out to require a bunch of dependencies to be fulfilled, so I thought I'd record them here so others may benifit.


zypper install autoconf automake libtool glib2-devel libgconf2-dev intltool gconf2-devel python-devel
zypper install gtk2-devel python-gtk-devel python-gobject2-devel python-gnome-devel


I might have missed some out while going through my .history, but that should get you close.

I'm not sure how much this is an additional OpenSuse specific feature, but I needed to set $PKG_CONFIG_PATH which I set to: /usr/lib64/pkgconfig/ (i'm on 64bit).