By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,247 Members | 1,224 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,247 IT Pros & Developers. It's quick & easy.

gnome.applet programming question.

P: n/a
Here is gnome applet source of mine.


#!/usr/bin/env python

import pydic
import gtk
import gnome.applet

class PyDicApplet(gtk.HBox):
def __init__(self, applet):
gtk.HBox.__init__(self, spacing=3)
entry = gtk.Entry()
entry.connect("key_press_event", self.entry_cb)

button = gtk.Button(unicode("ã", "euc-kr"))
#butoon.connect("button-press-event", self.button_press_cb, applet)
#button.connect("clicked", self.button_cb, entry)
self.pack_end(button, gtk.FALSE) = pydic.MainWindow()

def entry_cb(self, widget, event):
key = event.keyval

if key == 65293:

def button_press_cb(self, widget, event, applet):
if event.button == 3:
applet.emit("button_press_event", event)
return gtk.FALSE

def buttob_cb(self, widget, entry):

def destroy_cb(applet, widget):

def sleeper():
gtk.timeout_add(33, sleeper)

def dic_factory(applet, iid):
gtk.timeout_add(33, sleeper)
d = PyDicApplet(applet)
applet.connect("destroy", destroy_cb, d)

return gtk.TRUE

gnome.applet.bonobo_factory("OAFIID:GNOME_PyDic_Fa ctory",
"pydic", "0", dic_factory)


It works fine.

but, when I uncomment 15, 16 line, applet run without error but not appear
in panel.

any idea?

Jul 18 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
-Charlie Kim<>:
any idea?

Yes, subscribe to the pygtk mailing list :)
Sorry, I've never used gnome.applet ...

Jul 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.