File: __init__.py

package info (click to toggle)
gnome-python 2.28.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 3,288 kB
  • sloc: sh: 10,219; ansic: 7,997; xml: 2,464; python: 1,886; makefile: 392
file content (34 lines) | stat: -rw-r--r-- 920 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# -*- Mode: Python; py-indent-offset: 4 -*-
import gobject
del gobject

# load the bonobo typelib
import ORBit
ORBit.load_typelib('Bonobo')
del ORBit

import activation

from _bonobo import *

class UnknownBaseImpl(object):
    def __init__(self):
        self.__bobj = ForeignObject(self._this())
        self.__bobj.connect("destroy", self.__destroy)
    def get_bonobo_object(self):
        return self.__bobj
    def ref(self):
        self.__bobj.ref()
    def unref(self):
        self.__bobj.unref()
    def queryInterface(self, repoid):
        return self.__bobj.query_local_interface(repoid).corba_objref()
    def __destroy(self, foreign):
        # print "Deactivating Object"
        poa = self._default_POA()
        id  = poa.servant_to_id(self)
        poa.deactivate_object(id)
        # print "Removing reference to ForeignObject"
        self.__bobj = None
        # print "Deactivating Object Done"