예제 #1
0
 def __add_radios(self, radios, first=False):
     """
         Pop a radio and add it to the view,
         repeat operation until radio list is empty
         @param [radio names as string]
         @param first as bool
     """
     if self._stop:
         self._stop = False
         return
     if radios:
         radio = radios.pop(0)
         widget = RadioWidget(radio, self.__radios_manager)
         widget.connect("overlayed", self._on_overlayed)
         widget.show()
         self._lazy_queue.append(widget)
         if first:
             self._box.insert(widget, 0)
         else:
             self._box.insert(widget, -1)
         GLib.idle_add(self.__add_radios, radios)
     else:
         GLib.idle_add(self.lazy_loading)
         if self._viewport.get_child() is None:
             self._viewport.add(self._box)
예제 #2
0
 def _add_radios(self, radios, first=False):
     """
         Pop a radio and add it to the view,
         repeat operation until radio list is empty
         @param [radio names as string]
         @param first as bool
     """
     if self._stop:
         self._stop = False
         return
     if radios:
         radio = radios.pop(0)
         widget = RadioWidget(radio,
                              self._radios_manager)
         widget.show()
         self._lazy_queue.append(widget)
         if first:
             self._radiobox.insert(widget, 0)
         else:
             self._radiobox.insert(widget, -1)
         GLib.idle_add(self._add_radios, radios)
     else:
         GLib.idle_add(self.lazy_loading)
         if self._viewport.get_child() is None:
             self._viewport.add(self._radiobox)
예제 #3
0
 def __add_radio(self, radio_id):
     """
         Add radio
         @param radio_id as int
     """
     widget = RadioWidget(radio_id, self.__radios)
     self._box.insert(widget, 0)
     widget.populate()
     widget.show()
예제 #4
0
 def _add_radios(self, radios):
     if radios and not self._stop:
         radio = radios.pop(0)
         widget = RadioWidget(radio,
                              self._radios_manager)
         widget.show()
         self._sizegroup.add_widget(widget)
         self._radiobox.insert(widget, -1)
         GLib.idle_add(self._add_radios, radios)
     else:
         self._stop = False
     return None
예제 #5
0
 def _add_radios(self, radios):
     """
         Pop a radio and add it to the view,
         repeat operation until radio list is empty
         @param [radio names as string]
     """
     if radios and not self._stop:
         radio = radios.pop(0)
         widget = RadioWidget(radio, self._radios_manager)
         widget.show()
         self._sizegroup.add_widget(widget)
         self._radiobox.insert(widget, -1)
         GLib.idle_add(self._add_radios, radios)
     else:
         self._stop = False
     return None
예제 #6
0
 def _add_radios(self, radios):
     """
         Pop a radio and add it to the view,
         repeat operation until radio list is empty
         @param [radio names as string]
     """
     if radios and not self._stop:
         radio = radios.pop(0)
         widget = RadioWidget(radio,
                              self._radios_manager)
         widget.show()
         self._sizegroup.add_widget(widget)
         self._radiobox.insert(widget, -1)
         GLib.idle_add(self._add_radios, radios)
     else:
         self._stop = False
     return None