GNOME Bugzilla – Bug 774470
use song instead of track in the source code
Last modified: 2017-03-12 03:55:21 UTC
gnome-music uses the term track and song mixed throughout the source code. Instead we should use just one term to avoid confusion. I suggest we use song as it is shorter and also the name of the view. This could be split up in a bunch of smaller patches that just alter 1 source file at a time and then squash them all together for one final big push.
Created attachment 339929 [details] [review] Use song instead of track consistently Stop mixing song and track as identifier for the same thing, use only song instead. -- Example partial conversion
Created attachment 345258 [details] [review] Replaced 'track' with 'song' in the files under Widget Directory. I have replaced track wherever found with song in the files. As they act as an identifier for the same thing, there is no need to use 2 different names in the source code.
Review of attachment 345258 [details] [review]: lgtm
Review of attachment 345258 [details] [review]: When testing I noticed some issues I missed earlier. ::: gnomemusic/widgets/disclistboxwidget.py @@ +308,3 @@ """ builder = Gtk.Builder() + builder.add_from_resource('/org/gnome/Music/SongWidget.ui') This is an actual file that is named TrackWidget.ui . It's a bit out of scope here to rename the file, but eventually we probably should. @@ +321,3 @@ song_widget.model = self._model + song_number = song.get_song_number() This is an actual grilo API call get_track_number(), so should not be changed.
Created attachment 346630 [details] [review] Consistently use song as identifier Music was using both track and song to indicate the same kind of item in different parts the source, use just song instead.
Created attachment 346631 [details] [review] Consistently use song as identifier Music was using both track and song to indicate the same kind of item in different parts the source, use just song instead.
Made some fixes and rewrote the commit message a bit. Thanks for the patch. Attachment 346631 [details] pushed as 5c6fb16 - Consistently use song as identifier
Great!