Example #1
0
    def __init__(self, appname, frameobj):
        # for Windows there's no need to init
        NotifierBase.__init__(self, appname, frameobj)

        # no need to store a reference to the frame here,
        # because dynamically changing the icon's owner is just
        # plain impossible in Windows using the hWnd+uID way,
        # you need to unregister the icon anyway, and because we are
        # only implementing a notifier here.
        #
        # although a hWnd value of 0 also works, we limit use of this
        # behavior just for ourselves' sanity. Provide null handle ONLY
        # IF the caller *explicitly* asked for that by passing None.
        if frameobj is None:
            self.hWnd = 0
        else:
            self.hWnd = frameobj.GetHandle()

        # internal counter for allocating uID's
        self.__count = 0
        self.__list = []
Example #2
0
 def __init__(self, appname, frameobj):
     if not pynotify.is_initted():
         pynotify.init(appname)
     NotifierBase.__init__(self, appname, frameobj)