Exemplo n.º 1
0
 def _on_map(self, widget):
     """
         Set active ids
     """
     FlowBoxView._on_map(self, widget)
     App().settings.set_value("state-one-ids",
                              GLib.Variant("ai", [Type.YEARS]))
     App().settings.set_value("state-two-ids", GLib.Variant("ai", []))
     App().settings.set_value("state-three-ids", GLib.Variant("ai", []))
Exemplo n.º 2
0
 def _on_map(self, widget):
     """
         Set active ids
     """
     FlowBoxView._on_map(self, widget)
     App().settings.set_value("state-one-ids",
                              GLib.Variant("ai", [Type.ARTISTS]))
     App().settings.set_value("state-two-ids", GLib.Variant("ai", []))
     App().settings.set_value("state-three-ids", GLib.Variant("ai", []))
     self.__art_signal_id = App().art.connect(
         "artist-artwork-changed", self.__on_artist_artwork_changed)
Exemplo n.º 3
0
 def _on_map(self, widget):
     """
         Set active ids
     """
     FlowBoxView._on_map(self, widget)
     if not App().settings.get_value("show-sidebar"):
         App().window.emit("show-can-go-back", True)
         App().window.emit("can-go-back-changed", True)
     self.__signal_id = self.__radios.connect("radio-changed",
                                              self.__on_radio_changed)
     App().settings.set_value("state-one-ids",
                              GLib.Variant("ai", [Type.RADIOS]))
     App().settings.set_value("state-two-ids", GLib.Variant("ai", []))
     App().settings.set_value("state-three-ids", GLib.Variant("ai", []))
Exemplo n.º 4
0
 def _on_map(self, widget):
     """
         Setup widget
     """
     FlowBoxView._on_map(self, widget)
     self.__signal_id = App().playlists.connect("playlists-changed",
                                                self.__on_playlist_changed)
     if self.__obj is None:
         App().settings.set_value("state-one-ids",
                                  GLib.Variant("ai", [Type.PLAYLISTS]))
         App().settings.set_value("state-two-ids", GLib.Variant("ai", []))
         App().settings.set_value("state-three-ids", GLib.Variant("ai", []))
     else:
         App().window.emit("can-go-back-changed", True)
         App().window.emit("show-can-go-back", True)
Exemplo n.º 5
0
 def _on_map(self, widget):
     """
         Set active ids
     """
     try:
         FlowBoxView._on_map(self, widget)
         # Others albums from ...
         if self._view_type & ViewType.SMALL:
             return
         if self.__genre_ids:
             App().settings.set_value("state-one-ids",
                                      GLib.Variant("ai", self.__genre_ids))
             App().settings.set_value("state-two-ids",
                                      GLib.Variant("ai", self.__artist_ids))
         else:
             App().settings.set_value("state-one-ids",
                                      GLib.Variant("ai", self.__artist_ids))
             App().settings.set_value("state-two-ids",
                                      GLib.Variant("ai", []))
         App().settings.set_value("state-three-ids", GLib.Variant("ai", []))
     except Exception as e:
         Logger.warning(
             "https://gitlab.gnome.org/World/lollypop/issues/1864 %s", e)