Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I recentely started to program in Python and making a script/plugin for Pidgin,i need to access PurpleConversationUiOps and use the has_focus field,based in some examples in documentation of Pidgin i made this:

    #!/usr/bin/env python
    import dbus, gobject
    from dbus.mainloop.glib import DBusGMainLoop

    def view(conv):
     if conv == 1: #if has focus
       print "Has Focus"

    dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
    bus = dbus.SessionBus()
    bus.add_signal_receiver(view,
                    dbus_interface="im.pidgin.purple.PurpleConversationUiOps",
                    signal_name="HasFocus")
    loop = gobject.MainLoop()
    loop.run()

He gives no error but I don't receive any signal,so how can i access the has_focus field?

share|improve this question
    
You might consider asking this over at StackOverflow. –  Ken Jan 28 '13 at 15:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.