Skip to content

Commit

Permalink
Merge pull request #92 from weyfonk/issue84-connections-menu
Browse files Browse the repository at this point in the history
Fix #84: refresh connections menu upon add/delete
  • Loading branch information
multani authored Nov 7, 2016
2 parents 324f4b7 + 16b96b7 commit e8c8727
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sonata/preferences.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,7 @@ def _add_profile(self, _button, nameentry, profile_combo, remove_profiles):
self.config.password.append(self.config.password[profile_num])
self.config.musicdir.append(self.config.musicdir[profile_num])
self._populate_profile_combo(profile_combo, len(self.config.profile_names)-1, remove_profiles)
self.populate_profiles_for_menu()

def _remove_profile(self, _button, profile_combo, remove_profiles):
profile_num = profile_combo.get_active()
Expand All @@ -528,6 +529,7 @@ def _remove_profile(self, _button, profile_combo, remove_profiles):
self.config.port.pop(profile_num)
self.config.password.pop(profile_num)
self.config.musicdir.pop(profile_num)
self.populate_profiles_for_menu()
if profile_num > 0:
self._populate_profile_combo(profile_combo, profile_num-1, remove_profiles)
else:
Expand Down

0 comments on commit e8c8727

Please sign in to comment.