Commit f8a3fb1a authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: hide the MRL field by default and shrink it. You can make it appear by...

macosx: hide the MRL field by default and shrink it. You can make it appear by clicking on the triangle button next to the MRL label.
parent 0b7bd6a2
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
}, },
{ {
ACTIONS = { ACTIONS = {
expandMRLfieldAction = id;
eyetvGetPlugin = id; eyetvGetPlugin = id;
eyetvLaunch = id; eyetvLaunch = id;
eyetvSwitchChannel = id; eyetvSwitchChannel = id;
...@@ -103,7 +104,9 @@ ...@@ -103,7 +104,9 @@
"o_file_sub_size_lbl" = id; "o_file_sub_size_lbl" = id;
"o_file_sub_size_pop" = id; "o_file_sub_size_pop" = id;
"o_mrl" = id; "o_mrl" = id;
"o_mrl_btn" = id;
"o_mrl_lbl" = id; "o_mrl_lbl" = id;
"o_mrl_view" = id;
"o_net_help_lbl" = id; "o_net_help_lbl" = id;
"o_net_help_udp_lbl" = id; "o_net_help_udp_lbl" = id;
"o_net_http_url" = id; "o_net_http_url" = id;
......
...@@ -3,13 +3,15 @@ ...@@ -3,13 +3,15 @@
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
<key>IBDocumentLocation</key> <key>IBDocumentLocation</key>
<string>97 169 356 240 0 0 1280 778 </string> <string>63 88 356 240 0 0 1280 778 </string>
<key>IBEditorPositions</key> <key>IBEditorPositions</key>
<dict> <dict>
<key>2297</key> <key>2297</key>
<string>366 401 548 264 0 0 1280 778 </string> <string>366 401 548 264 0 0 1280 778 </string>
<key>2346</key> <key>2346</key>
<string>366 401 548 264 0 0 1280 778 </string> <string>366 401 548 264 0 0 1280 778 </string>
<key>2837</key>
<string>353 532 573 94 0 0 1280 778 </string>
</dict> </dict>
<key>IBFramework Version</key> <key>IBFramework Version</key>
<string>489.0</string> <string>489.0</string>
...@@ -17,10 +19,11 @@ ...@@ -17,10 +19,11 @@
<integer>5</integer> <integer>5</integer>
<key>IBOpenObjects</key> <key>IBOpenObjects</key>
<array> <array>
<integer>2792</integer>
<integer>2346</integer> <integer>2346</integer>
<integer>636</integer> <integer>636</integer>
<integer>2792</integer>
<integer>2297</integer> <integer>2297</integer>
<integer>2837</integer>
</array> </array>
<key>IBSystem Version</key> <key>IBSystem Version</key>
<string>9G55</string> <string>9G55</string>
......
...@@ -37,6 +37,8 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class ); ...@@ -37,6 +37,8 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class );
IBOutlet id o_mrl; IBOutlet id o_mrl;
IBOutlet id o_mrl_lbl; IBOutlet id o_mrl_lbl;
IBOutlet id o_mrl_view;
IBOutlet id o_mrl_btn;
IBOutlet id o_tabview; IBOutlet id o_tabview;
IBOutlet id o_btn_ok; IBOutlet id o_btn_ok;
...@@ -158,6 +160,7 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class ); ...@@ -158,6 +160,7 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class );
- (void)openTarget:(int)i_type; - (void)openTarget:(int)i_type;
- (void)tabView:(NSTabView *)o_tv didSelectTabViewItem:(NSTabViewItem *)o_tvi; - (void)tabView:(NSTabView *)o_tv didSelectTabViewItem:(NSTabViewItem *)o_tvi;
- (void)textFieldWasClicked:(NSNotification *)o_notification; - (void)textFieldWasClicked:(NSNotification *)o_notification;
- (IBAction)expandMRLfieldAction:(id)sender;
- (void)openFileGeneric; - (void)openFileGeneric;
- (void)openFilePathChanged:(NSNotification *)o_notification; - (void)openFilePathChanged:(NSNotification *)o_notification;
......
...@@ -161,7 +161,7 @@ static VLCOpen *_o_sharedMainInstance = nil; ...@@ -161,7 +161,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
- (void)awakeFromNib - (void)awakeFromNib
{ {
[o_panel setTitle: _NS("Open Source")]; [o_panel setTitle: _NS("Open Source")];
[o_mrl_lbl setTitle: _NS("Media Resource Locator (MRL)")]; [o_mrl_lbl setStringValue: _NS("Media Resource Locator (MRL)")];
[o_btn_ok setTitle: _NS("Open")]; [o_btn_ok setTitle: _NS("Open")];
[o_btn_cancel setTitle: _NS("Cancel")]; [o_btn_cancel setTitle: _NS("Cancel")];
...@@ -448,6 +448,38 @@ static VLCOpen *_o_sharedMainInstance = nil; ...@@ -448,6 +448,38 @@ static VLCOpen *_o_sharedMainInstance = nil;
} }
} }
- (IBAction)expandMRLfieldAction:(id)sender
{
NSRect o_win_rect, o_view_rect;
o_win_rect = [o_panel frame];
o_view_rect = [o_mrl_view frame];
if( [o_mrl_btn state] == NSOffState )
{
/* we need to collaps, restore the panel size */
o_win_rect.size.height = o_win_rect.size.height - o_view_rect.size.height;
o_win_rect.origin.y = ( o_win_rect.origin.y + o_view_rect.size.height ) - o_view_rect.size.height;
/* remove the MRL view */
[o_mrl_view removeFromSuperviewWithoutNeedingDisplay];
} else {
/* we need to expand */
[o_mrl_view setFrame: NSMakeRect( 0,
[o_mrl_btn frame].origin.y,
o_view_rect.size.width,
o_view_rect.size.height )];
[o_mrl_view setNeedsDisplay: YES];
[o_mrl_view setAutoresizesSubviews: YES];
/* add the MRL view */
[[o_panel contentView] addSubview: o_mrl_view];
o_win_rect.size.height = o_win_rect.size.height + o_view_rect.size.height;
}
[o_panel setFrame: o_win_rect display:YES animate: YES];
[o_panel displayIfNeeded];
}
- (void)openFileGeneric - (void)openFileGeneric
{ {
[self openFilePathChanged: nil]; [self openFilePathChanged: nil];
......
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