Logo Search packages:      
Sourcecode: panflute version File versions  Download package

def panflute::applet::applet::Applet::__load_content (   self  )  [private]

Fill the applet with the appropriate widgets.

Definition at line 144 of file applet.py.

00144                              :
        """
        Fill the applet with the appropriate widgets.
        """

        if self.__applet.get_child () is not None:
            self.__applet.remove (self.__applet.get_child ())

        self.__first_widgets = []
        self.__second_widgets = []

        if self.__connected:
            self.log.debug ("Setting layout to connected")

            if self.__player is None:
                self.__player = panflute.applet.player.Player ()
                self.__player.connect ("song-changed", self.__song_changed_cb)

            for request in self.__layout.props.layout[0]:
                self.__add_widget (self.__first_widgets, request)
            for request in self.__layout.props.layout[1]:
                self.__add_widget (self.__second_widgets, request)
        else:
            self.log.debug ("Setting layout to disconnected")
            widget = LaunchButton (self.__bus)
            widget.show ()
            self.__first_widgets.append (widget)
            if self.__player is not None:
                self.__player.shutdown ()
                self.__player = None

        self.__check_visibility ()
        self.__bundle_widgets ()
        self.__applet.show ()


    def __add_widget (self, widget_list, internal_name):


Generated by  Doxygen 1.6.0   Back to index