Commit 4012f039 authored by Felix Paul Kühne's avatar Felix Paul Kühne
Browse files

macosx: really fix the messages panel (fixes #5541) and added a 'live update'...

macosx: really fix the messages panel (fixes #5541) and added a 'live update' checkbox to turn off frequent updates since this is quite load intensive
parent fbaafcaf
......@@ -21,14 +21,15 @@
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="4895"/>
<integer value="1617"/>
<integer value="4596"/>
<integer value="2"/>
<integer value="2730"/>
<integer value="4722"/>
<integer value="915"/>
<integer value="1617"/>
<integer value="283"/>
<integer value="4682"/>
<integer value="29"/>
<integer value="915"/>
<integer value="2730"/>
<integer value="4596"/>
<integer value="4895"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
......@@ -2563,7 +2564,7 @@
<string key="NSWindowContentMaxSize">{1.7976931348623157e+308, 1.7976931348623157e+308}</string>
<string key="NSWindowContentMinSize">{599, 368}</string>
<object class="NSView" key="NSWindowView" id="584094047">
<nil key="NSNextResponder"/>
<reference key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
......@@ -2771,8 +2772,38 @@
<int key="NSPeriodicInterval">25</int>
</object>
</object>
<object class="NSButton" id="911014409">
<reference key="NSNextResponder" ref="584094047"/>
<int key="NSvFlags">289</int>
<string key="NSFrame">{{383, 17}, {198, 18}}</string>
<reference key="NSSuperview" ref="584094047"/>
<string key="NSReuseIdentifierKey">_NS:682</string>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="647591294">
<int key="NSCellFlags">67239424</int>
<int key="NSCellFlags2">67239936</int>
<string key="NSContents">Live Update</string>
<reference key="NSSupport" ref="26"/>
<string key="NSCellIdentifier">_NS:682</string>
<reference key="NSControlView" ref="911014409"/>
<int key="NSButtonFlags">1210864127</int>
<int key="NSButtonFlags2">2</int>
<object class="NSCustomResource" key="NSNormalImage">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">NSSwitch</string>
</object>
<object class="NSButtonImageSource" key="NSAlternateImage" id="1063">
<string key="NSImageName">NSSwitch</string>
</object>
<string key="NSAlternateContents"/>
<string key="NSKeyEquivalent"/>
<int key="NSPeriodicDelay">200</int>
<int key="NSPeriodicInterval">25</int>
</object>
</object>
</object>
<string key="NSFrameSize">{599, 368}</string>
<reference key="NSSuperview"/>
</object>
<string key="NSScreenRect">{{0, 0}, {1280, 778}}</string>
<string key="NSMinSize">{599, 384}</string>
......@@ -4049,9 +4080,7 @@ LCAuLi4</string>
<reference key="NSControlView" ref="511315905"/>
<int key="NSButtonFlags">1211912703</int>
<int key="NSButtonFlags2">2</int>
<object class="NSButtonImageSource" key="NSAlternateImage">
<string key="NSImageName">NSSwitch</string>
</object>
<reference key="NSAlternateImage" ref="1063"/>
<string key="NSAlternateContents"/>
<string key="NSKeyEquivalent"/>
<int key="NSPeriodicDelay">200</int>
......@@ -7332,6 +7361,22 @@ LCAuLi4</string>
</object>
<int key="connectionID">4920</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">o_msgs_liveUpdate_ckb</string>
<reference key="source" ref="199714555"/>
<reference key="destination" ref="911014409"/>
</object>
<int key="connectionID">4923</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">liveUpdateMessagesPanel:</string>
<reference key="source" ref="199714555"/>
<reference key="destination" ref="911014409"/>
</object>
<int key="connectionID">4924</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
......@@ -8395,6 +8440,7 @@ LCAuLi4</string>
<reference ref="23828214"/>
<reference ref="135002307"/>
<reference ref="158197552"/>
<reference ref="911014409"/>
</object>
<reference key="parent" ref="509304476"/>
</object>
......@@ -10094,6 +10140,20 @@ LCAuLi4</string>
<reference key="object" ref="304081293"/>
<reference key="parent" ref="129808516"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">4921</int>
<reference key="object" ref="911014409"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="647591294"/>
</object>
<reference key="parent" ref="584094047"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">4922</int>
<reference key="object" ref="647591294"/>
<reference key="parent" ref="911014409"/>
</object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
......@@ -10820,6 +10880,9 @@ LCAuLi4</string>
<string>4904.CustomClassName</string>
<string>4904.IBPluginDependency</string>
<string>4919.IBPluginDependency</string>
<string>4921.IBPluginDependency</string>
<string>4921.IBViewBoundsToFrameTransform</string>
<string>4922.IBPluginDependency</string>
<string>5.IBPluginDependency</string>
<string>5.ImportedFromIB2</string>
<string>56.IBPluginDependency</string>
......@@ -11659,6 +11722,11 @@ LCAuLi4</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABDyoAAwhAAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="YES"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="YES"/>
......@@ -11717,7 +11785,7 @@ LCAuLi4</string>
</object>
</object>
<nil key="sourceID"/>
<int key="maxID">4920</int>
<int key="maxID">4924</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
......@@ -14453,7 +14521,7 @@ LCAuLi4</string>
<object class="IBPartialClassDescription">
<string key="className">VLCApplication</string>
<string key="superclassName">NSApplication</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<object class="IBClassDescriptionSource" key="sourceIdentifier" id="342401359">
<string key="majorKey">IBDocumentRelativeSource</string>
<string key="minorKey">../../../../../modules/gui/macosx/intf.h</string>
</object>
......@@ -14726,6 +14794,7 @@ LCAuLi4</string>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>crashReporterAction:</string>
<string>liveUpdateMessagesPanel:</string>
<string>openCrashLog:</string>
<string>saveDebugLog:</string>
<string>showMessagesPanel:</string>
......@@ -14736,6 +14805,7 @@ LCAuLi4</string>
<string>id</string>
<string>id</string>
<string>id</string>
<string>id</string>
</object>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
......@@ -14743,6 +14813,7 @@ LCAuLi4</string>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>crashReporterAction:</string>
<string>liveUpdateMessagesPanel:</string>
<string>openCrashLog:</string>
<string>saveDebugLog:</string>
<string>showMessagesPanel:</string>
......@@ -14753,6 +14824,10 @@ LCAuLi4</string>
<string key="name">crashReporterAction:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">liveUpdateMessagesPanel:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">openCrashLog:</string>
<string key="candidateClassName">id</string>
......@@ -14787,9 +14862,9 @@ LCAuLi4</string>
<string>o_eyetv</string>
<string>o_info</string>
<string>o_mainmenu</string>
<string>o_mainwindow</string>
<string>o_messages</string>
<string>o_msgs_crashlog_btn</string>
<string>o_msgs_liveUpdate_ckb</string>
<string>o_msgs_panel</string>
<string>o_msgs_save_btn</string>
<string>o_open</string>
......@@ -14816,9 +14891,9 @@ LCAuLi4</string>
<string>id</string>
<string>id</string>
<string>id</string>
<string>id</string>
<string>NSTextView</string>
<string>NSButton</string>
<string>NSButton</string>
<string>NSWindow</string>
<string>NSButton</string>
<string>id</string>
......@@ -14848,9 +14923,9 @@ LCAuLi4</string>
<string>o_eyetv</string>
<string>o_info</string>
<string>o_mainmenu</string>
<string>o_mainwindow</string>
<string>o_messages</string>
<string>o_msgs_crashlog_btn</string>
<string>o_msgs_liveUpdate_ckb</string>
<string>o_msgs_panel</string>
<string>o_msgs_save_btn</string>
<string>o_open</string>
......@@ -14925,10 +15000,6 @@ LCAuLi4</string>
<string key="name">o_mainmenu</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">o_mainwindow</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">o_messages</string>
<string key="candidateClassName">NSTextView</string>
......@@ -14937,6 +15008,10 @@ LCAuLi4</string>
<string key="name">o_msgs_crashlog_btn</string>
<string key="candidateClassName">NSButton</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">o_msgs_liveUpdate_ckb</string>
<string key="candidateClassName">NSButton</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">o_msgs_panel</string>
<string key="candidateClassName">NSWindow</string>
......@@ -14967,10 +15042,7 @@ LCAuLi4</string>
</object>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBDocumentRelativeSource</string>
<string key="minorKey">../../../../../modules/gui/macosx/intf.h</string>
</object>
<reference key="sourceIdentifier" ref="342401359"/>
</object>
<object class="IBPartialClassDescription">
<string key="className">VLCMainMenu</string>
......@@ -17574,6 +17646,7 @@ LCAuLi4</string>
<string>NSApplicationIcon</string>
<string>NSMenuCheckmark</string>
<string>NSMenuMixedState</string>
<string>NSSwitch</string>
<string>back</string>
<string>back-pressed</string>
<string>dropzone</string>
......@@ -17616,6 +17689,7 @@ LCAuLi4</string>
<string>{128, 128}</string>
<string>{9, 8}</string>
<string>{7, 2}</string>
<string>{15, 15}</string>
<string>{35, 23}</string>
<string>{35, 23}</string>
<string>{128, 128}</string>
......
......@@ -123,6 +123,8 @@ struct intf_sys_t
BOOL b_msg_arr_changed; /* did the array change? */
IBOutlet NSButton * o_msgs_crashlog_btn; /* messages open crashlog */
IBOutlet NSButton * o_msgs_save_btn; /* save the log as rtf */
IBOutlet NSButton * o_msgs_liveUpdate_ckb; /* always update the panel when visible */
BOOL b_msg_live_update;
/* CrashReporter panel */
IBOutlet NSButton * o_crashrep_dontSend_btn;
......@@ -199,6 +201,7 @@ struct intf_sys_t
- (IBAction)openCrashLog:(id)sender;
- (IBAction)saveDebugLog:(id)sender;
- (IBAction)showMessagesPanel:(id)sender;
- (IBAction)liveUpdateMessagesPanel:(id)sender;
- (void)processReceivedlibvlcMessage:(const msg_item_t *) item ofType: (int)type withStr: (char *)str;
......
......@@ -534,6 +534,11 @@ static VLCMain *_o_sharedMainInstance = nil;
object: @"VLCEyeTVSupport"
userInfo: NULL
deliverImmediately: YES];
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSDictionary *appDefaults = [NSDictionary dictionaryWithObject:@"NO" forKey:@"LiveUpdateTheMessagesPanel"];
[defaults registerDefaults:appDefaults];
return _o_sharedMainInstance;
}
......@@ -606,6 +611,9 @@ static VLCMain *_o_sharedMainInstance = nil;
[o_remote setClickCountEnabledButtons: kRemoteButtonPlay];
[o_remote setDelegate: _o_sharedMainInstance];
b_msg_live_update = [[NSUserDefaults standardUserDefaults] boolForKey:@"LiveUpdateTheMessagesPanel"];
[o_msgs_liveUpdate_ckb setState: b_msg_live_update];
/* yeah, we are done */
b_nativeFullscreenMode = config_GetInt( p_intf, "macosx-nativefullscreenmode" );
nib_main_loaded = TRUE;
......@@ -652,6 +660,7 @@ static VLCMain *_o_sharedMainInstance = nil;
[o_msgs_panel setTitle: _NS("Messages")];
[o_msgs_crashlog_btn setTitle: _NS("Open CrashLog...")];
[o_msgs_save_btn setTitle: _NS("Save this Log...")];
[o_msgs_liveUpdate_ckb setTitle: _NS("Live Update")];
/* crash reporter panel */
[o_crashrep_send_btn setTitle: _NS("Send")];
......@@ -1837,6 +1846,17 @@ unsigned int CocoaKeyToVLC( unichar i_key )
#pragma mark -
#pragma mark Errors, warnings and messages
- (IBAction)liveUpdateMessagesPanel:(id)sender
{
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"LiveUpdateTheMessagesPanel"])
[[NSUserDefaults standardUserDefaults] setObject:@"NO" forKey:@"LiveUpdateTheMessagesPanel"];
else
[[NSUserDefaults standardUserDefaults] setObject:@"YES" forKey:@"LiveUpdateTheMessagesPanel"];
b_msg_live_update = [[NSUserDefaults standardUserDefaults] boolForKey:@"LiveUpdateTheMessagesPanel"];
[o_msgs_liveUpdate_ckb setState: b_msg_live_update];
}
- (IBAction)showMessagesPanel:(id)sender
{
[o_msgs_panel makeKeyAndOrderFront: sender];
......@@ -1850,7 +1870,7 @@ unsigned int CocoaKeyToVLC( unichar i_key )
- (void)updateMessageDisplay
{
if( [o_msgs_panel isVisible] && b_msg_arr_changed )
if( [o_msgs_panel isVisible] && (b_msg_live_update || [o_msgs_panel isKeyWindow]) && b_msg_arr_changed )
{
id o_msg;
NSEnumerator * o_enum;
......@@ -1901,7 +1921,7 @@ unsigned int CocoaKeyToVLC( unichar i_key )
b_msg_arr_changed = YES;
[o_msg_lock unlock];
[self updateMessageDisplay];
[self performSelectorOnMainThread:@selector(updateMessageDisplay) withObject: nil waitUntilDone:NO];
}
- (IBAction)saveDebugLog:(id)sender
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment