Iehova
March 27th, 2011, 11:34 AM
Hi,
I am a complete newbie to programming and decided to set myself the task of coding a GTK frontend to espeak in Python, because, well, I wanted one. :P
After a day's work I think I've made good progress and I'm very happy with the way things stand. My only problem is with the program's icon. The relevant code is here:
def __init__(self):
self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
self.window.set_position(gtk.WIN_POS_CENTER)
self.window.set_size_request(600, 120)
self.window.set_title("PySpeak")
self.pixbuf = gtk.gdk.pixbuf_new_from_file('pyspeak.svg')
self.window.set_icon(self.pixbuf)
Which I think is pretty standard. As I hoped, the icon appears in the unity launcher (I haven't tested standard gnome), but it's very very blurred. I've created another launcher icon, to run a script to start and stop the madwimax driver, and that looks fine, so I figure the problem must be something I'm doing.
Here is a screenshot: http://img62.imageshack.us/img62/2975/screenshotts.png . It's not the prettiest icon by any means, I'm not much of an artist either. ;)
Is this the standard way to display a taskbar icon? Should I have done something differently? Any help would be much appreciated.
P.S. I figured this didn't belong in the Natty forum because I don't think Unity is the issue here, rather I am. :P
EDIT: Oh, and the icon is SVG
I am a complete newbie to programming and decided to set myself the task of coding a GTK frontend to espeak in Python, because, well, I wanted one. :P
After a day's work I think I've made good progress and I'm very happy with the way things stand. My only problem is with the program's icon. The relevant code is here:
def __init__(self):
self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
self.window.set_position(gtk.WIN_POS_CENTER)
self.window.set_size_request(600, 120)
self.window.set_title("PySpeak")
self.pixbuf = gtk.gdk.pixbuf_new_from_file('pyspeak.svg')
self.window.set_icon(self.pixbuf)
Which I think is pretty standard. As I hoped, the icon appears in the unity launcher (I haven't tested standard gnome), but it's very very blurred. I've created another launcher icon, to run a script to start and stop the madwimax driver, and that looks fine, so I figure the problem must be something I'm doing.
Here is a screenshot: http://img62.imageshack.us/img62/2975/screenshotts.png . It's not the prettiest icon by any means, I'm not much of an artist either. ;)
Is this the standard way to display a taskbar icon? Should I have done something differently? Any help would be much appreciated.
P.S. I figured this didn't belong in the Natty forum because I don't think Unity is the issue here, rather I am. :P
EDIT: Oh, and the icon is SVG