Permalink
Browse files

minor bug fixes and recompiled with gcc 4.2 and deadcode stripping. I…

… wonder who wrote those comments in Italiano...
  • Loading branch information...
1 parent e51aaaf commit a834d5220843d685baa4f60fd69c30b1a23f57e2 @ettore committed Oct 9, 2010
View
@@ -84,8 +84,6 @@ + (void) initialize
value:@"Stop looking at porn!"
table:@"Localizable"];
- // NB!! ogni rec ha retainCount=2: uno causa l'alloc, l'altro causa
- // `arrayWithObjects:'
NSMutableArray *msgPresets = [NSMutableArray arrayWithObjects:
[[CLSingleStringRecord alloc] initWithString:msg1],
[[CLSingleStringRecord alloc] initWithString:msg2],
@@ -98,7 +96,7 @@ + (void) initialize
nil];
msg1 = [mainBundle localizedStringForKey:@"url1"
- value:@"http://localhost"
+ value:@"http://goodreads.com"
table:@"Localizable"];
msg2 = [mainBundle localizedStringForKey:@"url2"
value:@"http://gnu.org"
@@ -493,8 +491,10 @@ - (void) invalidateAllTimers
}
}
-/*"Removes timer `tid' from the list of open timers. Before removing,
-invalidates the timer is active."*/
+/*"
+ Removes timer `tid' from the list of open timers. Before removing,
+invalidates the timer is active.
+ "*/
- (void)removeTimerWithId:(int)tid
{
debug_enter("AppController -removeTimerWithId:");
@@ -912,9 +912,6 @@ - (void)doGestures:(NSTimer *)aTimer
{
debug_enter("Appcontroller -doGestures:");
- // qui retainCount per il timer  giˆ 3
- debug0cocoa(@"mainTimer: rtnCnt=%d", [aTimer retainCount]);
-
NSDate *mfdate, *nextFdate;
NSWorkspace *sharedWorkspace;
BOOL must_open_alert = NO;
@@ -113,7 +113,7 @@ - (void)setNilValueForKey:(NSString *)key
else {
NSArray *stringKeys = [[NSArray alloc] initWithObjects:@"atDateNow",
@"cycleHrs", @"cycleMins", @"cycleSecs", @"afterHrs", @"afterMins",
- @"afterSecs", @"cycleTimesLeft"];
+ @"afterSecs", @"cycleTimesLeft", nil];
if ([stringKeys indexOfObject: key])
{
[self setValue: [[NSNumber alloc] initWithInt:0] forKey: key];
@@ -123,7 +123,7 @@ - (void)setNilValueForKey:(NSString *)key
[stringKeys release];
stringKeys = [[NSArray alloc] initWithObjects:@"urlFlag",
@"sndFlag", @"msgFlag", @"appLaunchFlag",
- @"repeatFlag", @"autoFlag"];
+ @"repeatFlag", @"autoFlag", nil];
if ([stringKeys indexOfObject: key])
[self setValue: [[NSNumber alloc] initWithInt:NSOffState]
forKey: key];
View
@@ -106,10 +106,10 @@ - (void)dealloc
{
debug_enter("CLTimerSummary -dealloc");
[self stopObservingTimerModel:[doc timerModel]];
- [name release]; // retain cnt = 6 ??
- [countdown release]; // retain cnt = 6 ??
- [repeat release]; // retain cnt = -1 ??
- [autoFlag release]; // retain cnt = -1 ??
+ [name release];
+ [countdown release];
+ [repeat release];
+ [autoFlag release];
[reminder release];
[doc release];
[timer invalidate]; // harmless if timer is already invalid
@@ -292,6 +292,7 @@ - (void)observeValueForKeyPath:(NSString *)keyPath
// #####################################################################
- (NSString *)name { return name; }
+
/*"
Sets the name of the receiver and posts a CLTimerSummaryChanged notification.
"*/
@@ -304,7 +305,9 @@ - (void)setName:(NSString *)_t_m_p_
[nc postNotificationName: CLTimerSummaryChanged
object: self];
}
+
- (NSString *)countdown { return countdown; }
+
/*"
Sets the countdown of the receiver and posts a CLTimerSummaryChanged
notification.
@@ -315,11 +318,13 @@ - (void)setCountdown:(NSString *)_t_m_p_
[countdown release];
countdown = _t_m_p_;
}
+
- (NSString *)repeat { return repeat; }
- /*"
- Sets the repeat attribute of the receiver and posts a CLTimerSummaryChanged
- notification.
- "*/
+
+/*"
+Sets the repeat attribute of the receiver and posts a CLTimerSummaryChanged
+notification.
+"*/
- (void)setRepeat:(NSString *)_t_m_p_
{
_t_m_p_ = [_t_m_p_ copy];
@@ -329,11 +334,13 @@ - (void)setRepeat:(NSString *)_t_m_p_
[nc postNotificationName: CLTimerSummaryChanged
object: self];
}
+
- (NSString *)autoFlag { return autoFlag; }
- /*"
- Sets the autoStart-flag of the receiver and posts a CLTimerSummaryChanged
- notification.
- "*/
+
+/*"
+Sets the autoStart-flag of the receiver and posts a CLTimerSummaryChanged
+notification.
+"*/
- (void)setAutoFlag:(NSString *)_t_m_p_
{
_t_m_p_ = [_t_m_p_ copy];
@@ -343,11 +350,13 @@ - (void)setAutoFlag:(NSString *)_t_m_p_
[nc postNotificationName: CLTimerSummaryChanged
object: self];
}
+
- (NSString *)reminder { return reminder; }
- /*"
- Sets the reminder description of the receiver and posts a
- CLTimerSummaryChanged notification.
- "*/
+
+/*"
+Sets the reminder description of the receiver and posts a
+CLTimerSummaryChanged notification.
+"*/
- (void)setReminder:(NSString *)_t_m_p_
{
_t_m_p_ = [_t_m_p_ copy];
@@ -357,36 +366,47 @@ - (void)setReminder:(NSString *)_t_m_p_
[nc postNotificationName: CLTimerSummaryChanged
object: self];
}
+
- (id)doc { return doc; }
+
- (void)setDoc:(id)_t_m_p_
{
[_t_m_p_ retain];
[doc release];
doc = _t_m_p_;
}
+
- (NSTimer *)timer { return timer; }
+
- (void)setTimer:(NSTimer *)_t_m_p_
{
[_t_m_p_ retain];
[timer release];
timer = _t_m_p_;
}
+
- (NSTimer *)updatingTimer { return updatingTimer; }
+
- (void)setUpdatingTimer:(NSTimer *)_t_m_p_
{
[_t_m_p_ retain];
[updatingTimer release];
updatingTimer = _t_m_p_;
}
+
- (int)remainingTimes { return remainingTimes; }
+
- (void)setRemainingTimes:(int)_t_m_p_ { remainingTimes = _t_m_p_; }
+
- (NSString *)precomputed { return precomputed; }
+
- (void)setPrecomputed:(NSString *)_t_m_p_
{
[_t_m_p_ retain];
[precomputed release];
precomputed = _t_m_p_;
}
+
/*"
If the class instance references a MyDocument instance -as one can obtain
from [slef doc], this method also updates the change count of the doc.
@@ -401,7 +421,9 @@ - (void)setIsDirty:(BOOL)_t_m_p_
[doc updateChangeCount:NSChangeDone];
}
}
+
- (BOOL)isDirty { return isDirty; }
+
- (BOOL)isDocumentEdited
{
if ([doc respondsToSelector:@selector(isDocumentEdited)])
@@ -35,8 +35,8 @@ - (void) dealloc
- (void) createAndAddNewEntry
{
CLTimerSummary *s = [[CLTimerSummary alloc] init];
- [[super model] addObject:s]; //ora l'oggetto puntato da s ha retain count=2
- [s release]; //... quindi lo rilascio
+ [[super model] addObject:s];
+ [s release];
}
- (void)updateBtnStatus
@@ -6,24 +6,20 @@
<body>
<font face="Lucida Grande, arial" size="-1">
<p>
-<strong>SimpleTimer</strong> allows you to create programmable timers / reminders. The latest release and source code can be found at <a href="http://cubelogic.org/simpletimer/">http://cubelogic.org/simpletimer</a>. Please send bug reports, questions and comments to Ettore Pasquini at <a href="mailto:support@cubelogic.org">support@cubelogic.org</a>.
-</p>
-<!--p><strong>Beta testers wanted!</strong> This is a beta version, therefore not thoroughly tested. Send an email to <a href="mailto:support@cubelogic.org">support@cubelogic.org</a> if you want to contribute as a tester.</p-->
+<strong>SimpleTimer</strong> allows you to create timers and reminders for your daily chores. When the timer expires, you can: print a alert message on the screen, open a web page with the preferred browser or mail application, or play a sound (MP3, AIFF, etc.)</p>
<h3>Support</h3>
<p>
-SimpleTimer 1.3 was developed using the Cocoa/OpenStep framework. It was tested on Mac OS X 10.4 only, using a PPC processor: however, it should work fine on Mac OS X 10.3 and 10.2, as well as Intel machines. (SimpleTimer since version 1.2 is a universal binary.) You are welcome to <a href="http://cubelogic.org/">report bugs</a>.
+SimpleTimer was developed using the Cocoa/OpenStep framework. It was tested on Mac OS X 10.6 (intel) and 10.3 (ppc): however, it should work fine on Mac OS X 10.1 and up. (SimpleTimer since version 1.2 is a Universal Binary.)</p>
+<p>
+The latest release and source code can be found at <a href="http://cubelogic.org/simpletimer/">http://cubelogic.org/simpletimer</a>. Please send bug reports, questions and comments to Ettore Pasquini at <a href="mailto:support@cubelogic.org">support@cubelogic.org</a>.
</p>
<h3>Donations</h3>
<p>
Please consider a donation if you like SimpleTimer. A typical amount would be $5, but it's your choice. <a href="http://cubelogic.org/support/donations/paypal-SimpleTimer.html">Click here</a> if you want to use PayPal. You may also send your donation from the PayPal home page to this email address: <a href="mailto:e@cubelogic.org">e@cubelogic.org</a>. If you'd rather use regular mail or other forms of payment for your donation, just ask.
</p>
-<!--h3>Credits</h3>
-<p>Coding: ehp<br>
-French Localization: Claude Rondeau</p-->
-
<h3>Thank you</h3>
<p>
Judy Hui, Lorenzo Pazzi, Stephen Cristol, Ken Gillett, and everyone who has submitted bug reports.
Oops, something went wrong. Retry.

0 comments on commit a834d52

Please sign in to comment.