GNOME Bugzilla – Bug 162301
[PATCH] Private Variables
Last modified: 2004-12-27 18:54:15 UTC
Muine-CVS-20041226-PrivateVariables.patch ------------------------------- NOTE: This patch should not change how Muine operates. If it does, it's a bug! Overview: 2004-12-26 Tamara Roberson <foxxygirltamara@gmail.com> * src/About.cs: * src/Album.cs: * src/CoverDatabase.cs: * src/Muine.cs: * src/Song.cs: * src/SongDatabase.cs: * src/StockIcons.cs: Made all variables private and added accessor properties where appropriate. * src/CoverDatabase.cs: Changed LoadedCover from a class to a struct. * src/SongDatabase.cs: Changed ChangedSong from a class to a struct. * src/About.cs: Replaced "version" with the public constant "Version" and removed the related property. * src/CoverDatabase.cs: Made AlbumCoverSize constant. * src/AddSongWindow.cs: Made FakeLength constant. Description: Public variables are highly deprecated and should be replaced with properties. They aren't able to maintain control over their values and can be modified by any class. The reference in HACKING to public variable names should also be removed. I set all properties to just have "get" functions and added "set" functions if something used them. Future code may have to add "set" functions. I changed a couple of internal classes into structs. Like in C/C++, structs in C are used to hold a collection of values. In C#, they are like simple classes. I also changed a couple of variables to constants. It is possible that there are more.
Created attachment 35215 [details] [review] Muine-CVS-20041226-PrivateVariables.patch
It's in :)