Closed
Bug 367658
Opened 18 years ago
Closed 18 years ago
implement nsIIdleService on OS X
Categories
(Core :: Widget, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: sdwilsh, Assigned: sdwilsh)
References
Details
Attachments
(1 file, 3 obsolete files)
|
9.26 KB,
patch
|
jaas
:
review+
mikepinkerton
:
superreview+
|
Details | Diff | Splinter Review |
It'd be nice to have an implementation for this on OS X as well.
| Assignee | ||
Comment 1•18 years ago
|
||
I can't test this due to issues with building, but I want my work somewhere other than just on my computer. Feedback welcome.
Assignee: general → comrade693+bmo
Status: NEW → ASSIGNED
| Assignee | ||
Comment 2•18 years ago
|
||
I *think* that patch works, but I'm going to let Gijs report on it working or not since he's had much more experience with the idleService stuff already (and knows how to test the heck out of it).
| Assignee | ||
Comment 3•18 years ago
|
||
whoops - Gijs pointed out that I was doing my conversion wrong. With that fixed, this works.
Attachment #256036 -
Attachment is obsolete: true
Attachment #256556 -
Flags: review?(joshmoz)
Comment on attachment 256556 [details] [diff] [review]
v1.1
+ nsIdleServiceMac.mm \
The file names should just be "nsIdleService.mm", "nsIdleService.h". This is how we want all of our files named, though there are legacy exceptions. The directory they live in tells you the OS.
+#ifndef __nsIdleServiceMac_h__
The include guard name should be "nsIdleService_h_" in line with the rest of cocoa widgets. Double underscores are reserved and should not be used. Please change this in the top and bottom of the header.
+ if (rval != KERN_SUCCESS) {
+ return NS_ERROR_FAILURE;
+ }
cocoa widgets style nit - Remove braces on these one line blocks so there is a little less clutter. There are one-line if blocks all over. If any block in an if-elsif-else statement is > 1 line, then all should have braces.
Please post another patch with these changes. Otherwise looks good! Thanks.
Attachment #256556 -
Flags: review?(joshmoz) → review-
| Assignee | ||
Comment 5•18 years ago
|
||
Alright, this addresses your comments with the exception of the file name issue. I thought we could change it, but then when I did a test compile I realized that we #include "nsIdleService.h" - which is defined elsewhere and is what allows us to not implement all of the interface for just our widget. So, to go along with other files in the widget dir that seem to be in a similar situation, I tossed on a Cocoa to the end. Hopefully this works.
Pending r+, I need to know who's a good candidate for requesting sr from.
Attachment #256556 -
Attachment is obsolete: true
Attachment #256761 -
Flags: review?(joshmoz)
| Assignee | ||
Comment 6•18 years ago
|
||
We can all agree on file names now!
Attachment #256761 -
Attachment is obsolete: true
Attachment #256797 -
Flags: superreview?
Attachment #256797 -
Flags: review?(joshmoz)
Attachment #256761 -
Flags: review?(joshmoz)
| Assignee | ||
Updated•18 years ago
|
Attachment #256797 -
Flags: superreview? → superreview?(mikepinkerton)
Comment on attachment 256797 [details] [diff] [review]
v1.3
Thanks!
Attachment #256797 -
Flags: review?(joshmoz) → review+
Comment 8•18 years ago
|
||
Comment on attachment 256797 [details] [diff] [review]
v1.3
+ NS_IMETHOD GetIdleTime(PRUint32* idleTime);
isn't there a macro for this in nsIIdleService?
sr=pink
Attachment #256797 -
Flags: superreview?(mikepinkerton) → superreview+
| Assignee | ||
Comment 9•18 years ago
|
||
(In reply to comment #8)
> + NS_IMETHOD GetIdleTime(PRUint32* idleTime);
>
> isn't there a macro for this in nsIIdleService?
No, this is just one method - everything else is defined in nsIdleService and we inherit from that.
Whiteboard: [checkin needed]
Comment 10•18 years ago
|
||
widget/src/cocoa/Makefile.in: 1.65
widget/src/cocoa/nsIdleServiceX.h: 1.1
widget/src/cocoa/nsIdleServiceX.mm: 1.1
widget/src/cocoa/nsWidgetFactory.mm: 1.31
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Updated•18 years ago
|
Whiteboard: [checkin needed]
Updated•18 years ago
|
Flags: in-testsuite?
You need to log in
before you can comment on or make changes to this bug.
Description
•