Changeset f8fb4a6 for launchers


Ignore:
Timestamp:
Oct 13, 2018 4:06:02 AM (18 months ago)
Author:
meeh <meeh@…>
Branches:
master
Children:
eed80117
Parents:
4f8af55
Message:

OSX Launcher: Remove restart button

File:
1 edited

Legend:

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

    r4f8af55 rf8fb4a6  
    2828  @IBOutlet var quickControlView: NSView?
    2929  @IBOutlet var routerStartStopButton: NSButton?
    30   @IBOutlet var restartRouterButton: NSButton?
    3130  @IBOutlet var openConsoleButton: NSButton?
    3231 
     
    8685  }
    8786 
    88   @objc func actionBtnRestartRouter(_ sender: Any?) {
    89     RouterManager.shared().eventManager.trigger(eventName: "toggle_popover")
    90     let currentStatus : AgentStatus = RouterRunner.launchAgent?.status() ?? AgentStatus.unloaded
    91     if currentStatus != AgentStatus.loaded && currentStatus != AgentStatus.unloaded {
    92       NSLog("Found a running router, will unload it from launchd")
    93       // OK, router seems to be running
    94       DispatchQueue(label: "background_restart").async {
    95         self.restartFn()
    96         // Report done to main thread
    97         DispatchQueue.main.async {
    98           self.reEnableButton()
    99         }
    100       }
    101     } else {
    102       NSLog("Can't restart a non running router, start it however...")
    103       RouterManager.shared().routerRunner.StartAgent()
    104     }
    105   }
    106  
    10787  func handlerRouterStart(information:Any?) {
    10888    NSLog("Triggered handlerRouterStart")
     
    145125    openConsoleButton!.cell!.action = #selector(self.actionBtnOpenConsole(_:))
    146126    openConsoleButton!.cell!.target = self
    147     restartRouterButton!.cell!.action = #selector(self.actionBtnRestartRouter(_:))
    148     restartRouterButton!.cell!.target = self
    149127   
    150128  }
Note: See TracChangeset for help on using the changeset viewer.