473,327 Members | 2,118 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

gnome.applet programming question.

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)
self.add(entry)

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)

self.win = pydic.MainWindow()

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

if key == 65293:
self.win.Show(True)
self.win.search(entry.get_text())

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):
pass

def destroy_cb(applet, widget):
pass

def sleeper():
gtk.timeout_add(33, sleeper)
time.sleep(0.001)

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

return gtk.TRUE

gnome.applet.bonobo_factory("OAFIID:GNOME_PyDic_Fa ctory",
gnome.applet.Applet.__gtype__,
"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?

TIA.
Jul 18 '05 #1
1 2922
-Charlie Kim<NOSPAM__nabugoon__@__moor.pe.krNOSPAM>:
any idea?


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

nicholas
Jul 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: WMMorgan | last post by:
There's a website I like to visit that has an user-interactive java application. There's a "visual applet" component and "control applet" component. (No, it's not an adult or porno site.) But...
0
by: BryarWoilf | last post by:
Hi all, I'm still somewhat new to servlet/JSP programming, but I want to my application to use the MVC model. I have some simple JSP pages that dynamically open an applet that the user uses...
5
by: Rowland | last post by:
Hi, I know this question has prob. been asked a million times, but I couldn't find it in the FAQ, so here goes : I'm trying to write a Java applet to call a dll that resides on the web server...
1
by: nabugoon | last post by:
Hi all. I'm trying to write gnome applet program with python. But, it is too difficult to find any document about that. One web page I had found was old....
1
by: Vincent Montressor | last post by:
I'm playing around with writing my own panel applets, and I'm trying to figure out how to get my panel applets to be restored when I log in. As an experiment, I'm using the simple clock applet...
1
by: Jeremy C. Reed | last post by:
Configuring gramps (genealogy software) says: checking Python bindings for gtk... ok checking Python bindings for GNOME... ok checking Python bindings for gconf... Traceback (most recent call...
3
by: bruce | last post by:
hi... i'm running rh8.0 with gnome.. i'm not sure of the version (it's whatever rh shipped). i've recently updated (or tried to update) python to the latest version. when i try to run the...
9
by: takeiteasy | last post by:
Hello everyone, I've got a question about programming by using Java applet and the question is : Design a web page containing an applet that simply switches from one image to the next with some...
2
by: ManidipSengupta | last post by:
Hi, a few (3) questions for the Java experts, and let me know if this is the right forum. It deals with 100% java code (reason for posting here) but manages a Web browser with Javascript. Thanks in...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.