diff --git a/mcg.py b/mcg.py index 5cafe85..8da70f8 100644 --- a/mcg.py +++ b/mcg.py @@ -97,10 +97,10 @@ class MCGClient: self._add_action(self._playpause) - def next(self): + def next_song(self): """Plays the next album in the current order """ - self._add_action(self._next) + self._add_action(self._next_song) def connect_signal(self, signal, callback): @@ -251,13 +251,10 @@ class MCGClient: self._client.play() - def _next(self): + def _next_song(self): """Action: Performs the real next command. """ - song = self._client.currentsong() - if song: - current_album = MCGAlbum(song['artist'], song['album'], song['date'], os.path.dirname(song['file'])) - # TODO _next() + self._client.next() def _idle(self, modules): diff --git a/mcgGtk.py b/mcgGtk.py index dd79ec0..d3099c8 100755 --- a/mcgGtk.py +++ b/mcgGtk.py @@ -40,7 +40,7 @@ class MCGGtk(Gtk.Window): self._toolbar.connect_signal(Toolbar.SIGNAL_CONNECT, self.toolbar_connect_cb) self._toolbar.connect_signal(Toolbar.SIGNAL_UPDATE, self.toolbar_update_cb) self._toolbar.connect_signal(Toolbar.SIGNAL_PLAYPAUSE, self.toolbar_playpause_cb) - self._toolbar.connect_signal(Toolbar.SIGNAL_NEXT, self.toolbar_next_cb) + self._toolbar.connect_signal(Toolbar.SIGNAL_NEXT_SONG, self.toolbar_next_song_cb) self._toolbar.connect_signal(Toolbar.SIGNAL_FILTER, self.toolbar_filter_cb) self._toolbar.connect_signal(Toolbar.SIGNAL_GRID_SIZE_TEMP, self.toolbar_grid_size_temp_cb) self._toolbar.connect_signal(Toolbar.SIGNAL_GRID_SIZE, self.toolbar_grid_size_cb) @@ -99,8 +99,8 @@ class MCGGtk(Gtk.Window): self._mcg.playpause() - def toolbar_next_cb(self): - self._mcg.next() + def toolbar_next_song_cb(self): + self._mcg.next_song() def toolbar_filter_cb(self, filter_string): @@ -223,7 +223,7 @@ class Toolbar(Gtk.Toolbar): SIGNAL_CONNECT = 'connect' SIGNAL_UPDATE = 'update' SIGNAL_PLAYPAUSE = 'playpause' - SIGNAL_NEXT = 'next' + SIGNAL_NEXT_SONG = 'next-song' SIGNAL_FILTER = 'filter' SIGNAL_GRID_SIZE_TEMP = 'grid-size-temp' SIGNAL_GRID_SIZE = 'grid-size' @@ -271,7 +271,7 @@ class Toolbar(Gtk.Toolbar): self._connection_button.connect('clicked', self._callback_with_function, self.SIGNAL_CONNECT) self._update_button.connect('clicked', self._callback_with_function, self.SIGNAL_UPDATE) self._playpause_button.connect('clicked', self._callback_with_function, self.SIGNAL_PLAYPAUSE) - self._next_button.connect('clicked', self._callback_with_function, self.SIGNAL_NEXT) + self._next_button.connect('clicked', self._callback_with_function, self.SIGNAL_NEXT_SONG) self._filter_entry.connect('changed', self._callback_with_function, self.SIGNAL_FILTER, self._filter_entry.get_text) self._grid_size_scale.connect('change-value', self.grid_size_temp_cb) self._grid_size_scale.connect('button-release-event', self.grid_size_cb)