Skip to content

Commit

Permalink
Fix code indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
multani committed Apr 6, 2012
1 parent bd7a817 commit 25e722a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 11 deletions.
20 changes: 15 additions & 5 deletions sonata/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1046,12 +1046,22 @@ def populate_profiles_for_menu(self):

profile_names = [_("MPD_HOST/PORT")] if host \
or port else self.config.profile_names
actions = [(str(i), None,
"[%s] %s" % (i + 1, ui.quote_label(name)), None,
None, i)

actions = [
(str(i),
None,
"[%d] %s" % (i + 1, ui.quote_label(name)),
None,
None,
i)
for i, name in enumerate(profile_names)]
actions.append(('disconnect', None, _('Disconnect'), None, None,
len(self.config.profile_names)))
actions.append((
'disconnect',
None,
_('Disconnect'),
None,
None,
len(self.config.profile_names)))

active_radio = 0 if host or port else self.config.profile_num
if not self.conn:
Expand Down
13 changes: 7 additions & 6 deletions sonata/playlists.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,13 @@ def populate_playlists_for_menu(self, playlistinfo):
self.actionGroupPlaylists = None
self.actionGroupPlaylists = gtk.ActionGroup('MPDPlaylists')
self.UIManager().ensure_update()
actions = [("Playlist: %s" % playlist.replace("&", ""),
gtk.STOCK_JUSTIFY_CENTER,
ui.quote_label(misc.unescape_html(playlist)),
None, None,
self.on_playlist_menu_click)
for playlist in playlistinfo]
actions = [
("Playlist: %s" % playlist.replace("&", ""),
gtk.STOCK_JUSTIFY_CENTER,
ui.quote_label(misc.unescape_html(playlist)),
None, None,
self.on_playlist_menu_click)
for playlist in playlistinfo]
self.actionGroupPlaylists.add_actions(actions)
uiDescription = """
<ui>
Expand Down

0 comments on commit 25e722a

Please sign in to comment.