New tab item for settings
This commit is contained in:
parent
877a7a7ea2
commit
3ceae82d36
Binary file not shown.
21
OTRS-Watch/Assets.xcassets/icon-transparent.imageset/Contents.json
vendored
Normal file
21
OTRS-Watch/Assets.xcassets/icon-transparent.imageset/Contents.json
vendored
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"filename" : "icon-transparent.png",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"version" : 1,
|
||||||
|
"author" : "xcode"
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
OTRS-Watch/Assets.xcassets/icon-transparent.imageset/icon-transparent.png
vendored
Normal file
BIN
OTRS-Watch/Assets.xcassets/icon-transparent.imageset/icon-transparent.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 74 KiB |
@ -675,14 +675,20 @@
|
|||||||
<toolbarItem implicitItemIdentifier="NSToolbarPrintItem" id="GwS-Vr-90W"/>
|
<toolbarItem implicitItemIdentifier="NSToolbarPrintItem" id="GwS-Vr-90W"/>
|
||||||
<toolbarItem implicitItemIdentifier="NSToolbarSpaceItem" id="46s-4Y-0D4"/>
|
<toolbarItem implicitItemIdentifier="NSToolbarSpaceItem" id="46s-4Y-0D4"/>
|
||||||
<toolbarItem implicitItemIdentifier="NSToolbarFlexibleSpaceItem" id="rDU-kC-B36"/>
|
<toolbarItem implicitItemIdentifier="NSToolbarFlexibleSpaceItem" id="rDU-kC-B36"/>
|
||||||
<toolbarItem implicitItemIdentifier="A42EF47E-64EE-472A-B852-11FA2922A300" label="Neu laden" paletteLabel="Neu laden" tag="-1" image="NSRefreshTemplate" id="eMt-Dh-Yhp">
|
<toolbarItem implicitItemIdentifier="A42EF47E-64EE-472A-B852-11FA2922A300" label="Tickets" paletteLabel="Tickets" tag="-1" image="icon-transparent" id="eMt-Dh-Yhp">
|
||||||
<connections>
|
<connections>
|
||||||
<action selector="toolbarActionReload:" target="B8D-0N-5wS" id="mgg-0v-kkd"/>
|
<action selector="toolbarActionReload:" target="B8D-0N-5wS" id="mgg-0v-kkd"/>
|
||||||
</connections>
|
</connections>
|
||||||
</toolbarItem>
|
</toolbarItem>
|
||||||
|
<toolbarItem implicitItemIdentifier="CC0BF630-F7BB-4131-B276-10BB3A0ACF88" label="Einstellungen" paletteLabel="Einstellungen" tag="-1" image="NSPreferencesGeneral" id="31c-eE-1XB">
|
||||||
|
<connections>
|
||||||
|
<action selector="toolbarActionSettings:" target="B8D-0N-5wS" id="3Qw-ua-kEb"/>
|
||||||
|
</connections>
|
||||||
|
</toolbarItem>
|
||||||
</allowedToolbarItems>
|
</allowedToolbarItems>
|
||||||
<defaultToolbarItems>
|
<defaultToolbarItems>
|
||||||
<toolbarItem reference="eMt-Dh-Yhp"/>
|
<toolbarItem reference="eMt-Dh-Yhp"/>
|
||||||
|
<toolbarItem reference="31c-eE-1XB"/>
|
||||||
<toolbarItem reference="rDU-kC-B36"/>
|
<toolbarItem reference="rDU-kC-B36"/>
|
||||||
<toolbarItem reference="GwS-Vr-90W"/>
|
<toolbarItem reference="GwS-Vr-90W"/>
|
||||||
</defaultToolbarItems>
|
</defaultToolbarItems>
|
||||||
@ -710,7 +716,7 @@
|
|||||||
<font key="font" metaFont="system"/>
|
<font key="font" metaFont="system"/>
|
||||||
<tabViewItems>
|
<tabViewItems>
|
||||||
<tabViewItem label="Übersicht" identifier="1" id="MIJ-kl-tQe">
|
<tabViewItem label="Übersicht" identifier="1" id="MIJ-kl-tQe">
|
||||||
<view key="view" ambiguous="YES" id="3eX-zs-jOD">
|
<view key="view" id="3eX-zs-jOD">
|
||||||
<rect key="frame" x="10" y="33" width="692" height="417"/>
|
<rect key="frame" x="10" y="33" width="692" height="417"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
@ -832,7 +838,7 @@
|
|||||||
</subviews>
|
</subviews>
|
||||||
</clipView>
|
</clipView>
|
||||||
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="YES" id="yAG-0l-MrF">
|
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="YES" id="yAG-0l-MrF">
|
||||||
<rect key="frame" x="1" y="400" width="696" height="16"/>
|
<rect key="frame" x="1" y="-16" width="0.0" height="16"/>
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
</scroller>
|
</scroller>
|
||||||
<scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="NO" id="0Mc-1B-cqp">
|
<scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="NO" id="0Mc-1B-cqp">
|
||||||
@ -848,7 +854,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</tabViewItem>
|
</tabViewItem>
|
||||||
<tabViewItem label="Einstellungen" identifier="2" id="yzk-gj-wT8">
|
<tabViewItem label="Einstellungen" identifier="2" id="yzk-gj-wT8">
|
||||||
<view key="view" id="lU4-zL-hyv">
|
<view key="view" ambiguous="YES" id="lU4-zL-hyv">
|
||||||
<rect key="frame" x="10" y="33" width="692" height="417"/>
|
<rect key="frame" x="10" y="33" width="692" height="417"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
@ -966,6 +972,7 @@
|
|||||||
</subviews>
|
</subviews>
|
||||||
</view>
|
</view>
|
||||||
<connections>
|
<connections>
|
||||||
|
<outlet property="tabView" destination="Zi9-hf-1KA" id="WBf-Lj-rLk"/>
|
||||||
<outlet property="ticketTableView" destination="uqq-D2-JrZ" id="Csb-WI-8ex"/>
|
<outlet property="ticketTableView" destination="uqq-D2-JrZ" id="Csb-WI-8ex"/>
|
||||||
<outlet property="txtBaseURL" destination="J3Z-8V-Igs" id="MNC-l0-bgU"/>
|
<outlet property="txtBaseURL" destination="J3Z-8V-Igs" id="MNC-l0-bgU"/>
|
||||||
<outlet property="txtPassword" destination="dBq-YZ-1Lb" id="zcP-17-bRV"/>
|
<outlet property="txtPassword" destination="dBq-YZ-1Lb" id="zcP-17-bRV"/>
|
||||||
@ -979,6 +986,7 @@
|
|||||||
</scene>
|
</scene>
|
||||||
</scenes>
|
</scenes>
|
||||||
<resources>
|
<resources>
|
||||||
<image name="NSRefreshTemplate" width="11" height="15"/>
|
<image name="NSPreferencesGeneral" width="32" height="32"/>
|
||||||
|
<image name="icon-transparent" width="990" height="990"/>
|
||||||
</resources>
|
</resources>
|
||||||
</document>
|
</document>
|
||||||
|
|||||||
@ -38,4 +38,11 @@ struct Constants {
|
|||||||
static let IN = "nf::ticket::in"
|
static let IN = "nf::ticket::in"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct TABS {
|
||||||
|
struct TAB {
|
||||||
|
static let OTRS = 0
|
||||||
|
static let SETTINGS = 1
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,6 +15,7 @@ class ViewController: NSViewController {
|
|||||||
@IBOutlet weak var txtQueue: NSTextField!
|
@IBOutlet weak var txtQueue: NSTextField!
|
||||||
@IBOutlet weak var txtBaseURL: NSTextField!
|
@IBOutlet weak var txtBaseURL: NSTextField!
|
||||||
@IBOutlet weak var ticketTableView: NSTableView!
|
@IBOutlet weak var ticketTableView: NSTableView!
|
||||||
|
@IBOutlet weak var tabView: NSTabView!
|
||||||
|
|
||||||
override func viewDidLoad() {
|
override func viewDidLoad() {
|
||||||
super.viewDidLoad()
|
super.viewDidLoad()
|
||||||
@ -67,6 +68,8 @@ class ViewController: NSViewController {
|
|||||||
UserDefaults.standard.setValue(txtQueue.stringValue, forKey: Constants.USER_SETTINGS.OTRS.QUEUE)
|
UserDefaults.standard.setValue(txtQueue.stringValue, forKey: Constants.USER_SETTINGS.OTRS.QUEUE)
|
||||||
|
|
||||||
UserDefaults.standard.setValue(txtBaseURL.stringValue, forKey: Constants.USER_SETTINGS.OTRS.BASE_URL)
|
UserDefaults.standard.setValue(txtBaseURL.stringValue, forKey: Constants.USER_SETTINGS.OTRS.BASE_URL)
|
||||||
|
|
||||||
|
self.tabView.selectTabViewItem(at: Constants.TABS.TAB.OTRS)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -10,11 +10,11 @@ import Cocoa
|
|||||||
|
|
||||||
class WindowController: NSWindowController {
|
class WindowController: NSWindowController {
|
||||||
|
|
||||||
/*var viewController: ViewController {
|
var viewController: ViewController {
|
||||||
get {
|
get {
|
||||||
return self.window!.contentViewController! as! ViewController
|
return self.window!.contentViewController! as! ViewController
|
||||||
}
|
}
|
||||||
}*/
|
}
|
||||||
|
|
||||||
override func windowDidLoad() {
|
override func windowDidLoad() {
|
||||||
super.windowDidLoad()
|
super.windowDidLoad()
|
||||||
@ -26,6 +26,12 @@ class WindowController: NSWindowController {
|
|||||||
if let que:Int = Int(UserDefaults.standard.string(forKey: Constants.USER_SETTINGS.OTRS.QUEUE)!) {
|
if let que:Int = Int(UserDefaults.standard.string(forKey: Constants.USER_SETTINGS.OTRS.QUEUE)!) {
|
||||||
OTRS.sharedInstance.reload(que: que)
|
OTRS.sharedInstance.reload(que: que)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
self.viewController.tabView.selectTabViewItem(at: Constants.TABS.TAB.OTRS)
|
||||||
|
}
|
||||||
|
|
||||||
|
@IBAction func toolbarActionSettings(_ sender: NSToolbarItem) {
|
||||||
|
self.viewController.tabView.selectTabViewItem(at: Constants.TABS.TAB.SETTINGS)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user