Ignore:
Timestamp:
Sep 20, 2018 2:38:44 AM (2 years ago)
Author:
meeh <meeh@…>
Branches:
master
Children:
e8decff5
Parents:
eb81cada
Message:

Mac OSX Launcher: A lot of bugfixes, refactoring and cleanup.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • launchers/macosx/I2PLauncher/userinterface/PopoverViewController.swift

    reb81cada r3c0a8cf  
    6161  override func viewWillDraw() {
    6262    super.viewWillDraw()
    63     if (RouterStatusView.instance == Optional.none) {
     63    if (RouterStatusView.instance != nil) {
    6464      RouterStatusView.instance = self
    6565    }
     
    7979    quickControlView?.needsDisplay = true
    8080   
    81     if (RouterProcessStatus.routerVersion == Optional.none) {
     81    if let version = RouterProcessStatus.routerVersion {
     82      routerVersionLabel?.cell?.stringValue = "Router version: " + version
     83    } else {
    8284      routerVersionLabel?.cell?.stringValue = "Router version: Still unknown"
    83       // trigger a read to ensure values
    84       let tmp = SwiftMainDelegate()
    85       tmp.findInstalledI2PVersion()
    86     } else {
    87       routerVersionLabel?.cell?.stringValue = "Router version: " + RouterProcessStatus.routerVersion!
    8885    }
    89     if (RouterProcessStatus.routerStartedAt != Optional.none) {
    90       routerUptimeLabel?.cell?.stringValue = "Router has runned for " + DateTimeUtils.timeAgoSinceDate(date: NSDate(date: RouterProcessStatus.routerStartedAt!), numericDates: false)
     86    if let routerStartTime = RouterProcessStatus.routerStartedAt {
     87      routerUptimeLabel?.cell?.stringValue = "Router has runned for " + DateTimeUtils.timeAgoSinceDate(date: NSDate(date: routerStartTime), numericDates: false)
    9188    }
    9289  }
Note: See TracChangeset for help on using the changeset viewer.