Skip to content

Commit

Permalink
update remaining time
Browse files Browse the repository at this point in the history
  • Loading branch information
firatyenidunya committed Mar 27, 2017
1 parent 2612798 commit 25f50fa
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 2 deletions.
79 changes: 79 additions & 0 deletions .gitignore.save
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Object$

## Build generated
build/
DerivedData/
.DS_Store
## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/

## Other
*.moved-aside
*.xccheckout
*.xcscmblueprint
## Obj-C/Swift specific
*.hmap
*.ipa
*.dSYM.zip
*.dSYM

## Playgrounds
timeline.xctimeline
playground.xcworkspace

# Swift Package Manager
#
# Add this line if you want to avoid checking in source code from Swift Pac$
# Packages/
# Package.pins
.build/

# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-th$
#
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Object$

## Build generated
build/
DerivedData/
.DS_Store
## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/

## Other
*.moved-aside
*.xccheckout
*.xcscmblueprint

## Obj-C/Swift specific
*.hmap
*.ipa
*.SYM.zip
*.dSYM

## Playgrounds
timeline.xctimeline
pla
Binary file not shown.
Binary file removed Time Remaining/Assets.xcassets/statusIcon.png
Binary file not shown.
10 changes: 8 additions & 2 deletions Time Remaining/MainMenu.xib
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,16 @@
</customObject>
<menu id="wqE-hP-gTC" userLabel="Status Menu">
<items>
<menuItem title="Quit" id="NUD-UJ-Aur" userLabel="Quit">
<menuItem title="Update" id="NUD-UJ-Aur" userLabel="Update">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="quit:" target="dPR-kF-bpZ" id="rgg-4V-aCr"/>
<action selector="updateTimeRemaining:" target="dPR-kF-bpZ" id="uSe-ul-7EK"/>
</connections>
</menuItem>
<menuItem title="Quit" id="ras-Lt-uxc" userLabel="Quit">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="quit:" target="dPR-kF-bpZ" id="OTd-h1-nPa"/>
</connections>
</menuItem>
</items>
Expand Down
3 changes: 3 additions & 0 deletions Time Remaining/StatusMenuController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ class StatusMenuController: NSObject {
statusItem.title = getBatteryState()

}
@IBAction func updateTimeRemaining(_ sender: NSMenuItem) {
statusItem.title = getBatteryState()
}
@IBAction func quit(_ sender: NSMenuItem) {
NSApplication.shared().terminate(self)

Expand Down

0 comments on commit 25f50fa

Please sign in to comment.