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 162301 - [PATCH] Private Variables
[PATCH] Private Variables
Status: RESOLVED FIXED
Product: muine
Classification: Other
Component: general
trunk
Other Linux
: Normal normal
: ---
Assigned To: Muine Maintainers
Muine Maintainers
Depends on:
Blocks:
 
 
Reported: 2004-12-27 08:42 UTC by Tamara Roberson
Modified: 2004-12-27 18:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Muine-CVS-20041226-PrivateVariables.patch (10.18 KB, patch)
2004-12-27 08:42 UTC, Tamara Roberson
none Details | Review

Description Tamara Roberson 2004-12-27 08:42:05 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.
Comment 1 Tamara Roberson 2004-12-27 08:42:47 UTC
Created attachment 35215 [details] [review]
Muine-CVS-20041226-PrivateVariables.patch
Comment 2 Jorn Baayen 2004-12-27 18:54:15 UTC
It's in :)