Browse Source

Reverting Floating window changes.

v1.2.3
Abhishek Banthia 9 years ago
parent
commit
6b2128f62c
  1. BIN
      Clocker.xcodeproj/project.xcworkspace/xcuserdata/abhishekbanthia.xcuserdatad/UserInterfaceState.xcuserstate
  2. 12
      Clocker/Appearance Tab/CLAppearanceView.xib
  3. 3
      Clocker/PanelController.h
  4. 37
      Clocker/PanelController.m

BIN
Clocker.xcodeproj/project.xcworkspace/xcuserdata/abhishekbanthia.xcuserdatad/UserInterfaceState.xcuserstate generated

Binary file not shown.

12
Clocker/Appearance Tab/CLAppearanceView.xib

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="9531" systemVersion="15C50" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES"> <document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="9531" systemVersion="15E65" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies> <dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="9531"/> <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="9531"/>
</dependencies> </dependencies>
@ -18,7 +18,7 @@
<rect key="frame" x="0.0" y="0.0" width="439" height="463"/> <rect key="frame" x="0.0" y="0.0" width="439" height="463"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<subviews> <subviews>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="iVw-cq-zLz"> <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" preferredMaxLayoutWidth="60" translatesAutoresizingMaskIntoConstraints="NO" id="iVw-cq-zLz">
<rect key="frame" x="188" y="349" width="64" height="18"/> <rect key="frame" x="188" y="349" width="64" height="18"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="18" id="2DP-wK-Ga8"/> <constraint firstAttribute="height" constant="18" id="2DP-wK-Ga8"/>
@ -30,7 +30,7 @@
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell> </textFieldCell>
</textField> </textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="5TC-RQ-gzI"> <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" preferredMaxLayoutWidth="100" translatesAutoresizingMaskIntoConstraints="NO" id="5TC-RQ-gzI">
<rect key="frame" x="168" y="411" width="104" height="18"/> <rect key="frame" x="168" y="411" width="104" height="18"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="18" id="gWc-u4-D8E"/> <constraint firstAttribute="height" constant="18" id="gWc-u4-D8E"/>
@ -59,7 +59,7 @@
<binding destination="WGI-5h-l6M" name="selectedLabel" keyPath="values.defaultTheme" id="vyq-YM-las"/> <binding destination="WGI-5h-l6M" name="selectedLabel" keyPath="values.defaultTheme" id="vyq-YM-las"/>
</connections> </connections>
</segmentedControl> </segmentedControl>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="YQi-x8-6f8"> <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" preferredMaxLayoutWidth="150" translatesAutoresizingMaskIntoConstraints="NO" id="YQi-x8-6f8">
<rect key="frame" x="143" y="287" width="154" height="18"/> <rect key="frame" x="143" y="287" width="154" height="18"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="18" id="eY8-bV-QLM"/> <constraint firstAttribute="height" constant="18" id="eY8-bV-QLM"/>
@ -181,7 +181,7 @@
<binding destination="WGI-5h-l6M" name="selectedIndex" keyPath="values.displayFutureSlider" id="zRQ-mQ-qBp"/> <binding destination="WGI-5h-l6M" name="selectedIndex" keyPath="values.displayFutureSlider" id="zRQ-mQ-qBp"/>
</connections> </connections>
</segmentedControl> </segmentedControl>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="HTZ-1V-qZb"> <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" preferredMaxLayoutWidth="120" translatesAutoresizingMaskIntoConstraints="NO" id="HTZ-1V-qZb">
<rect key="frame" x="158" y="232" width="124" height="19"/> <rect key="frame" x="158" y="232" width="124" height="19"/>
<constraints> <constraints>
<constraint firstAttribute="width" constant="120" id="1Lv-wC-hEM"/> <constraint firstAttribute="width" constant="120" id="1Lv-wC-hEM"/>
@ -227,8 +227,8 @@
</segments> </segments>
</segmentedCell> </segmentedCell>
<connections> <connections>
<binding destination="WGI-5h-l6M" name="selectedIndex" keyPath="values.showPlaceName" id="374-hG-giL"/>
<binding destination="-2" name="enabled" keyPath="self.enableOptions" id="g8k-2L-2XR"/> <binding destination="-2" name="enabled" keyPath="self.enableOptions" id="g8k-2L-2XR"/>
<binding destination="WGI-5h-l6M" name="selectedIndex" keyPath="values.showPlaceName" id="374-hG-giL"/>
</connections> </connections>
</segmentedControl> </segmentedControl>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="X5s-Mc-Yfo"> <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="X5s-Mc-Yfo">

3
Clocker/PanelController.h

@ -70,8 +70,6 @@
@property (strong, nonatomic) PanelController *panelWindow; @property (strong, nonatomic) PanelController *panelWindow;
@property (strong, nonatomic) NSTimer *floatingWindowTimer; @property (strong, nonatomic) NSTimer *floatingWindowTimer;
+ (instancetype)sharedPanel;
- (id)initWithDelegate:(id<PanelControllerDelegate>)delegate; - (id)initWithDelegate:(id<PanelControllerDelegate>)delegate;
- (void)openPanel; - (void)openPanel;
- (void)closePanel; - (void)closePanel;
@ -79,6 +77,5 @@
- (void)showOptions:(BOOL)value; - (void)showOptions:(BOOL)value;
- (void)removeContextHelpForSlider; - (void)removeContextHelpForSlider;
- (void)updatePanelColor; - (void)updatePanelColor;
- (void)openAsFloatingWindow;
@end @end

37
Clocker/PanelController.m

@ -118,20 +118,7 @@ static PanelController *sharedPanel = nil;
} }
/*
+ (instancetype)sharedPanel
{
if (sharedPanel == nil)
{
/*Using a thread safe pattern*/
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
sharedPanel = [[self alloc] initWithWindowNibName:@"Panel"];
});
}
return sharedPanel;
}
- (void)openAsFloatingWindow - (void)openAsFloatingWindow
{ {
@ -179,7 +166,7 @@ static PanelController *sharedPanel = nil;
{ {
[self.panelWindow.mainTableview reloadData]; [self.panelWindow.mainTableview reloadData];
} }
} }*/
#pragma mark - #pragma mark -
#pragma mark Updating Timezones #pragma mark Updating Timezones
@ -234,27 +221,7 @@ static PanelController *sharedPanel = nil;
- (void)windowWillClose:(NSNotification *)notification - (void)windowWillClose:(NSNotification *)notification
{ {
if ([notification.object isKindOfClass:[Panel class]])
{
for (NSWindow *currentWindow in [NSApplication sharedApplication].windows)
{
if ([currentWindow.windowController isKindOfClass:[CLOneWindowController class]])
{
CLOneWindowController *reference = (CLOneWindowController *)currentWindow.windowController;
CLAppearanceViewController *appearanceView = reference.appearanceView;
[appearanceView updateState];
self.panelWindow = nil;
}
}
[[NSUserDefaults standardUserDefaults] setObject:@0 forKey:CLShowAppInForeground];
return;
}
self.hasActivePanel = NO; self.hasActivePanel = NO;
} }
- (void)windowDidResignKey:(NSNotification *)notification; - (void)windowDidResignKey:(NSNotification *)notification;

Loading…
Cancel
Save