Esempio n. 1
0
 def do_activate(self):
     shell = self.object
     sp = shell.props.shell_player
     self.player_cb_ids = (sp.connect('playing-song-changed',
                                      self.playing_entry_changed),
                           sp.connect('playing-changed',
                                      self.playing_changed))
     self.emitting_uri_notify = False
     db = shell.props.db
     self.db_cb_ids = (
         db.connect_after('entry-extra-metadata-request::rb:coverArt',
                          self.cover_art_request),
         db.connect_after('entry-extra-metadata-notify::rb:coverArt',
                          self.cover_art_notify),
         db.connect_after('entry-extra-metadata-request::rb:coverArt-uri',
                          self.cover_art_uri_request),
         db.connect_after('entry-extra-metadata-notify::rb:coverArt-uri',
                          self.cover_art_uri_notify),
         db.connect_after('entry-extra-metadata-gather',
                          self.cover_art_uri_gather),
     )
     self.art_widget = ArtDisplayWidget(
         rb.find_plugin_file(self, ART_MISSING_ICON + ".svg"))
     self.art_widget.connect('pixbuf-dropped', self.on_set_pixbuf)
     self.art_widget.connect('uri-dropped', self.on_set_uri)
     self.art_widget.connect('get-max-size', self.get_max_art_size)
     self.art_widget.connect('button-press-event', self.on_button_press)
     self.art_container = Gtk.VBox()
     self.art_container.pack_start(self.art_widget, True, True, 6)
     shell.add_widget(self.art_container, RB.ShellUILocation.SIDEBAR, False,
                      True)
     self.art_db = CoverArtDatabase()
     self.current_entry, self.current_pixbuf = None, None
     self.playing_entry_changed(sp, sp.get_playing_entry())
Esempio n. 2
0
 def activate(self, shell):
     self.shell = shell
     sp = shell.get_player()
     self.player_cb_ids = (sp.connect('playing-song-changed',
                                      self.playing_entry_changed),
                           sp.connect('playing-changed',
                                      self.playing_changed))
     db = shell.get_property("db")
     self.db_cb_ids = (
         db.connect_after('entry-extra-metadata-request::rb:coverArt',
                          self.cover_art_request),
         db.connect_after('entry-extra-metadata-notify::rb:coverArt',
                          self.cover_art_notify),
         db.connect_after('entry-extra-metadata-request::rb:coverArt-uri',
                          self.cover_art_uri_request),
         db.connect_after('entry-extra-metadata-notify::rb:coverArt-uri',
                          self.cover_art_uri_notify),
         db.connect_after('entry-extra-metadata-gather',
                          self.cover_art_uri_gather),
     )
     self.art_widget = ArtDisplayWidget(
         self.find_file(ART_MISSING_ICON + ".svg"))
     self.art_widget.connect('pixbuf-dropped', self.on_set_pixbuf)
     self.art_widget.connect('uri-dropped', self.on_set_uri)
     self.art_widget.connect('get-max-size', self.get_max_art_size)
     self.art_widget.connect('button-press-event', self.on_button_press)
     self.art_container = gtk.VBox()
     self.art_container.pack_start(self.art_widget, padding=6)
     shell.add_widget(self.art_container, rb.SHELL_UI_LOCATION_SIDEBAR)
     self.art_db = CoverArtDatabase()
     self.current_entry, self.current_pixbuf = None, None
     self.playing_entry_changed(sp, sp.get_playing_entry())
Esempio n. 3
0
	def activate (self, shell):
		self.shell = shell
		sp = shell.get_player ()
		self.pec_id = sp.connect ('playing-song-changed', self.playing_entry_changed)
		self.pc_id = sp.connect ('playing-changed', self.playing_changed)
		self.art_widget = gtk.Image ()
		self.art_widget.set_padding (0, 5)
		shell.add_widget (self.art_widget, rb.SHELL_UI_LOCATION_SIDEBAR)
		self.sa_id = self.art_widget.connect ('size-allocate', self.size_allocated)
		self.current_pixbuf = None
		self.art_db = CoverArtDatabase ()
		self.resize_id = 0
		self.resize_in_progress = False
		self.old_width = 0
		self.fade_step = 0
		self.fade_id = 0
		self.current_entry = None
		entry = sp.get_playing_entry ()
		self.playing_entry_changed (sp, entry)

		#dbus stuff
		self.bus = dbus.SessionBus()
		self.awn_obj = self.bus.get_object(BUS_NAME, OBJ_PATH)