After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 774470 - use song instead of track in the source code
use song instead of track in the source code
Status: RESOLVED FIXED
Product: gnome-music
Classification: Applications
Component: general
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: gnome-music-maint
gnome-music-maint
Depends on:
Blocks: 778870
 
 
Reported: 2016-11-15 12:20 UTC by Marinus Schraal
Modified: 2017-03-12 03:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use song instead of track consistently (7.50 KB, patch)
2016-11-15 13:39 UTC, Marinus Schraal
none Details | Review
Replaced 'track' with 'song' in the files under Widget Directory. (12.34 KB, patch)
2017-02-08 18:31 UTC, Rashi Sah
needs-work Details | Review
Consistently use song as identifier (12.18 KB, patch)
2017-02-24 12:46 UTC, Marinus Schraal
none Details | Review
Consistently use song as identifier (12.18 KB, patch)
2017-02-24 12:49 UTC, Marinus Schraal
committed Details | Review

Description Marinus Schraal 2016-11-15 12:20:49 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.
Comment 1 Marinus Schraal 2016-11-15 13:39:13 UTC
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
Comment 2 Rashi Sah 2017-02-08 18:31:42 UTC
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.
Comment 3 Marinus Schraal 2017-02-13 15:58:37 UTC
Review of attachment 345258 [details] [review]:

lgtm
Comment 4 Marinus Schraal 2017-02-24 12:33:10 UTC
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.
Comment 5 Marinus Schraal 2017-02-24 12:33:10 UTC
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.
Comment 6 Marinus Schraal 2017-02-24 12:46:30 UTC
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.
Comment 7 Marinus Schraal 2017-02-24 12:49:26 UTC
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.
Comment 8 Marinus Schraal 2017-02-24 12:52:16 UTC
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
Comment 9 Rashi Sah 2017-03-12 03:55:21 UTC
Great!