def search(self, widget):
        """
        Searches for more devices on the network when pressed.Refreshes the table layout
        """

        servicelistenerA_B.device={}
        servicelistenerA_B.device['IP']=[]
        servicelistenerA_B.device['PORT']=[]
        self.window.remove(self.table)
        servicelistenerA_B.listen()
        self.create_table()
        self.window.show_all()
        self.pipeline.set_state(gst.STATE_PLAYING)

    def selection(self, widget, n):
        """
        Assign toplay the value of the selected device
        """

        toplay['IP']=device['IP'][n]
        toplay['PORT']=device['PORT'][n]
        self.play(toplay)
    
    def search(self, widget):
        """
        Searches for more devices on the network when pressed.Refreshes the table layout
        """

        servicelistenerA_B.device={}
        servicelistenerA_B.device['IP']=[]
        servicelistenerA_B.device['PORT']=[]
        self.window.remove(self.table)
        servicelistenerA_B.listen()
        self.create_table()
        self.window.show_all()

servicelistenerA_B.listen()
device=servicelistenerA_B.device
print device

start=Main()
gtk.main()