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

* added "Magnify" to the available video filters

    - re-designed the view a bit, so it is smaller (and nicer IMO)
    - string fix
parent a9b12cae
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
"o_ckb_imgClone" = id; "o_ckb_imgClone" = id;
"o_ckb_imgCrop" = id; "o_ckb_imgCrop" = id;
"o_ckb_imgInvers" = id; "o_ckb_imgInvers" = id;
"o_ckb_intZoom" = id;
"o_ckb_trnsform" = id; "o_ckb_trnsform" = id;
"o_ckb_vlme_norm" = id; "o_ckb_vlme_norm" = id;
"o_expBtn_adjustImage" = id; "o_expBtn_adjustImage" = id;
......
...@@ -11,10 +11,10 @@ ...@@ -11,10 +11,10 @@
<key>32</key> <key>32</key>
<string>525 487 390 233 0 0 1440 878 </string> <string>525 487 390 233 0 0 1440 878 </string>
<key>5</key> <key>5</key>
<string>525 506 390 196 0 0 1440 878 </string> <string>467 464 392 178 0 0 1440 878 </string>
</dict> </dict>
<key>IBFramework Version</key> <key>IBFramework Version</key>
<string>437.0</string> <string>443.0</string>
<key>IBLockedObjects</key> <key>IBLockedObjects</key>
<array> <array>
<integer>32</integer> <integer>32</integer>
...@@ -22,10 +22,9 @@ ...@@ -22,10 +22,9 @@
<key>IBOpenObjects</key> <key>IBOpenObjects</key>
<array> <array>
<integer>18</integer> <integer>18</integer>
<integer>32</integer> <integer>5</integer>
<integer>13</integer>
</array> </array>
<key>IBSystem Version</key> <key>IBSystem Version</key>
<string>8C46</string> <string>8I127</string>
</dict> </dict>
</plist> </plist>
/***************************************************************************** /*****************************************************************************
* extended.h: MacOS X Extended interface panel * extended.h: MacOS X Extended interface panel
***************************************************************************** *****************************************************************************
* Copyright (C) 2005 the VideoLAN team * Copyright (C) 2005-2006 the VideoLAN team
* $Id$ * $Id$
* *
* Authors: Felix Kühne <fkuehne@users.sf.net> * Authors: Felix Kühne <fkuehne@users.sf.net>
...@@ -59,6 +59,7 @@ ...@@ -59,6 +59,7 @@
IBOutlet id o_ckb_imgCrop; IBOutlet id o_ckb_imgCrop;
IBOutlet id o_ckb_imgInvers; IBOutlet id o_ckb_imgInvers;
IBOutlet id o_ckb_trnsform; IBOutlet id o_ckb_trnsform;
IBOutlet id o_ckb_intZoom;
/* audio filters */ /* audio filters */
IBOutlet id o_ckb_vlme_norm; IBOutlet id o_ckb_vlme_norm;
......
/***************************************************************************** /*****************************************************************************
* extended.m: MacOS X Extended interface panel * extended.m: MacOS X Extended interface panel
***************************************************************************** *****************************************************************************
* Copyright (C) 2005 the VideoLAN team * Copyright (C) 2005-2006 the VideoLAN team
* $Id$ * $Id$
* *
* Authors: Felix Kühne <fkuehne@users.sf.net> * Authors: Felix Kühne <fkuehne@users.sf.net>
...@@ -88,7 +88,7 @@ static VLCExtended *_o_sharedInstance = nil; ...@@ -88,7 +88,7 @@ static VLCExtended *_o_sharedInstance = nil;
[o_ckb_distortion setTitle: _NS("Distortion")]; [o_ckb_distortion setTitle: _NS("Distortion")];
[o_ckb_distortion setToolTip: _NS("Adds distortion effects")]; [o_ckb_distortion setToolTip: _NS("Adds distortion effects")];
[o_ckb_imgClone setTitle: _NS("Image clone")]; [o_ckb_imgClone setTitle: _NS("Image clone")];
[o_ckb_imgClone setToolTip: _NS("Creates several copies of the Video " \ [o_ckb_imgClone setToolTip: _NS("Creates several copies of the Video "
"output window" )]; "output window" )];
[o_ckb_imgCrop setTitle: _NS("Image cropping")]; [o_ckb_imgCrop setTitle: _NS("Image cropping")];
[o_ckb_imgCrop setToolTip: _NS("Crops a defined part of the image")]; [o_ckb_imgCrop setToolTip: _NS("Crops a defined part of the image")];
...@@ -96,11 +96,13 @@ static VLCExtended *_o_sharedInstance = nil; ...@@ -96,11 +96,13 @@ static VLCExtended *_o_sharedInstance = nil;
[o_ckb_imgInvers setToolTip: _NS("Inverts the colors of the image")]; [o_ckb_imgInvers setToolTip: _NS("Inverts the colors of the image")];
[o_ckb_trnsform setTitle: _NS("Transformation")]; [o_ckb_trnsform setTitle: _NS("Transformation")];
[o_ckb_trnsform setToolTip: _NS("Rotates or flips the image")]; [o_ckb_trnsform setToolTip: _NS("Rotates or flips the image")];
[o_ckb_intZoom setTitle: _NS("Interactive Zoom")];
[o_ckb_intZoom setToolTip: _NS("Enables an interactive Zoom feature")];
[o_ckb_vlme_norm setTitle: _NS("Volume normalization")]; [o_ckb_vlme_norm setTitle: _NS("Volume normalization")];
[o_ckb_vlme_norm setToolTip: _NS("Prevents the audio output from going " \ [o_ckb_vlme_norm setToolTip: _NS("Prevents the audio output from going "
"over a predefined value.")]; "over a predefined value.")];
[o_ckb_hdphnVirt setTitle: _NS("Headphone virtualization")]; [o_ckb_hdphnVirt setTitle: _NS("Headphone virtualization")];
[o_ckb_hdphnVirt setToolTip: _NS("Imitates the effect of surround sound " \ [o_ckb_hdphnVirt setToolTip: _NS("Imitates the effect of surround sound "
"when using headphones.")]; "when using headphones.")];
[o_lbl_maxLevel setStringValue: _NS("Maximum level")]; [o_lbl_maxLevel setStringValue: _NS("Maximum level")];
[o_btn_rstrDefaults setTitle: _NS("Restore Defaults")]; [o_btn_rstrDefaults setTitle: _NS("Restore Defaults")];
...@@ -233,7 +235,7 @@ static VLCExtended *_o_sharedInstance = nil; ...@@ -233,7 +235,7 @@ static VLCExtended *_o_sharedInstance = nil;
[o_sld_maxLevel setFloatValue: f_value ]; [o_sld_maxLevel setFloatValue: f_value ];
} }
[o_sld_opaque setFloatValue: (config_GetFloat( p_intf, \ [o_sld_opaque setFloatValue: (config_GetFloat( p_intf,
"macosx-opaqueness") * 100)]; "macosx-opaqueness") * 100)];
...@@ -351,7 +353,7 @@ static VLCExtended *_o_sharedInstance = nil; ...@@ -351,7 +353,7 @@ static VLCExtended *_o_sharedInstance = nil;
id o_window = [NSApp keyWindow]; id o_window = [NSApp keyWindow];
NSArray *o_windows = [NSApp orderedWindows]; NSArray *o_windows = [NSApp orderedWindows];
NSEnumerator *o_enumerator = [o_windows objectEnumerator]; NSEnumerator *o_enumerator = [o_windows objectEnumerator];
playlist_t * p_playlist = vlc_object_find( VLCIntf, VLC_OBJECT_PLAYLIST, \ playlist_t * p_playlist = vlc_object_find( VLCIntf, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE ); FIND_ANYWHERE );
vout_thread_t *p_vout = vlc_object_find( VLCIntf, VLC_OBJECT_VOUT, FIND_ANYWHERE ); vout_thread_t *p_vout = vlc_object_find( VLCIntf, VLC_OBJECT_VOUT, FIND_ANYWHERE );
vout_thread_t *p_real_vout; vout_thread_t *p_real_vout;
...@@ -459,7 +461,6 @@ static VLCExtended *_o_sharedInstance = nil; ...@@ -459,7 +461,6 @@ static VLCExtended *_o_sharedInstance = nil;
if (o_adjImg_expanded) if (o_adjImg_expanded)
{ {
o_box_adjImg_rect.size.height = [o_box_adjImg frame].size.height - 171; o_box_adjImg_rect.size.height = [o_box_adjImg frame].size.height - 171;
msg_Dbg( VLCIntf, "collapsed adjust-image section");
o_adjImg_expanded = NO; o_adjImg_expanded = NO;
} else { } else {
/* insert view */ /* insert view */
...@@ -468,7 +469,6 @@ static VLCExtended *_o_sharedInstance = nil; ...@@ -468,7 +469,6 @@ static VLCExtended *_o_sharedInstance = nil;
[o_adjustImg_view setNeedsDisplay:YES]; [o_adjustImg_view setNeedsDisplay:YES];
[o_adjustImg_view setAutoresizesSubviews: YES]; [o_adjustImg_view setAutoresizesSubviews: YES];
[[o_box_adjImg contentView] addSubview: o_adjustImg_view]; [[o_box_adjImg contentView] addSubview: o_adjustImg_view];
msg_Dbg( VLCIntf, "expanded adjust-image section");
o_adjImg_expanded = YES; o_adjImg_expanded = YES;
} }
[o_box_adjImg setFrameFromContentFrame: o_box_adjImg_rect]; [o_box_adjImg setFrameFromContentFrame: o_box_adjImg_rect];
...@@ -501,7 +501,6 @@ static VLCExtended *_o_sharedInstance = nil; ...@@ -501,7 +501,6 @@ static VLCExtended *_o_sharedInstance = nil;
if (o_audFlts_expanded) if (o_audFlts_expanded)
{ {
o_box_audFlts_rect.size.height = [o_box_audFlts frame].size.height - 66; o_box_audFlts_rect.size.height = [o_box_audFlts frame].size.height - 66;
msg_Dbg( VLCIntf, "collapsed audio-filters section");
o_audFlts_expanded = NO; o_audFlts_expanded = NO;
} else { } else {
/* insert view */ /* insert view */
...@@ -510,7 +509,6 @@ static VLCExtended *_o_sharedInstance = nil; ...@@ -510,7 +509,6 @@ static VLCExtended *_o_sharedInstance = nil;
[o_audioFlts_view setNeedsDisplay:YES]; [o_audioFlts_view setNeedsDisplay:YES];
[o_audioFlts_view setAutoresizesSubviews: YES]; [o_audioFlts_view setAutoresizesSubviews: YES];
[[o_box_audFlts contentView] addSubview: o_audioFlts_view]; [[o_box_audFlts contentView] addSubview: o_audioFlts_view];
msg_Dbg( VLCIntf, "expanded audio-filters section");
o_audFlts_expanded = YES; o_audFlts_expanded = YES;
} }
[o_box_audFlts setFrameFromContentFrame: o_box_audFlts_rect]; [o_box_audFlts setFrameFromContentFrame: o_box_audFlts_rect];
...@@ -527,18 +525,18 @@ static VLCExtended *_o_sharedInstance = nil; ...@@ -527,18 +525,18 @@ static VLCExtended *_o_sharedInstance = nil;
{ {
/* move the window contents upwards (partially done through settings /* move the window contents upwards (partially done through settings
* inside the nib) and resize the window */ * inside the nib) and resize the window */
o_win_rect.size.height = o_win_rect.size.height - 134; o_win_rect.size.height = o_win_rect.size.height - 116;
o_win_rect.origin.y = [o_extended_window frame].origin.y + 134; o_win_rect.origin.y = [o_extended_window frame].origin.y + 116;
o_box_audFlts_rect.origin.y = o_box_audFlts_rect.origin.y + 134; o_box_audFlts_rect.origin.y = o_box_audFlts_rect.origin.y + 116;
/* remove the inserted view */ /* remove the inserted view */
[o_videoFilters_view removeFromSuperviewWithoutNeedingDisplay]; [o_videoFilters_view removeFromSuperviewWithoutNeedingDisplay];
}else{ }else{
/* move the window contents downwards and resize the window */ /* move the window contents downwards and resize the window */
o_win_rect.size.height = o_win_rect.size.height + 134; o_win_rect.size.height = o_win_rect.size.height + 116;
o_win_rect.origin.y = [o_extended_window frame].origin.y - 134; o_win_rect.origin.y = [o_extended_window frame].origin.y - 116;
o_box_audFlts_rect.origin.y = o_box_audFlts_rect.origin.y - 134; o_box_audFlts_rect.origin.y = o_box_audFlts_rect.origin.y - 116;
} }
[o_box_audFlts setFrameFromContentFrame: o_box_audFlts_rect]; [o_box_audFlts setFrameFromContentFrame: o_box_audFlts_rect];
...@@ -547,17 +545,15 @@ static VLCExtended *_o_sharedInstance = nil; ...@@ -547,17 +545,15 @@ static VLCExtended *_o_sharedInstance = nil;
if (o_vidFlts_expanded) if (o_vidFlts_expanded)
{ {
o_box_vidFlts_rect.size.height = [o_box_vidFlts frame].size.height - 134; o_box_vidFlts_rect.size.height = [o_box_vidFlts frame].size.height - 116;
msg_Dbg( VLCIntf, "collapsed video-filters section");
o_vidFlts_expanded = NO; o_vidFlts_expanded = NO;
} else { } else {
/* insert view */ /* insert view */
o_box_vidFlts_rect.size.height = [o_box_vidFlts frame].size.height + 134; o_box_vidFlts_rect.size.height = [o_box_vidFlts frame].size.height + 116;
[o_videoFilters_view setFrame: NSMakeRect( 20, -10, 370, 144)]; [o_videoFilters_view setFrame: NSMakeRect( 20, -10, 370, 116)];
[o_videoFilters_view setNeedsDisplay:YES]; [o_videoFilters_view setNeedsDisplay:YES];
[o_videoFilters_view setAutoresizesSubviews: YES]; [o_videoFilters_view setAutoresizesSubviews: YES];
[[o_box_vidFlts contentView] addSubview: o_videoFilters_view]; [[o_box_vidFlts contentView] addSubview: o_videoFilters_view];
msg_Dbg( VLCIntf, "expanded video-filters section");
o_vidFlts_expanded = YES; o_vidFlts_expanded = YES;
} }
[o_box_vidFlts setFrameFromContentFrame: o_box_vidFlts_rect]; [o_box_vidFlts setFrameFromContentFrame: o_box_vidFlts_rect];
...@@ -589,22 +585,25 @@ static VLCExtended *_o_sharedInstance = nil; ...@@ -589,22 +585,25 @@ static VLCExtended *_o_sharedInstance = nil;
else if (sender == o_ckb_trnsform) else if (sender == o_ckb_trnsform)
{ {
[self changeVFiltersString: "transform" onOrOff: [o_ckb_trnsform state]]; [self changeVFiltersString: "transform" onOrOff: [o_ckb_trnsform state]];
}
else if (sender == o_ckb_intZoom )
{
[self changeVFiltersString: "magnify" onOrOff: [o_ckb_intZoom state]];
} else { } else {
/* this shouldn't happen */ /* this shouldn't happen */
msg_Warn (VLCIntf, "cannot find selected video-filter"); msg_Warn (VLCIntf, "cannot find switched video-filter");
} }
} }
- (IBAction)vidFlts_mrInfo:(id)sender - (IBAction)vidFlts_mrInfo:(id)sender
{ {
/* show info sheet */ /* show info sheet */
/// \bug [String] Misplaced \n NSBeginInformationalAlertSheet(_NS("More Information"), _NS("OK"), @"", @"",
NSBeginInformationalAlertSheet(_NS("More Information"), _NS("OK"), @"", @"", \ o_extended_window, nil, nil, nil, nil, _NS("This panel allows to "
o_extended_window, nil, nil, nil, nil, _NS("This panel allows to " \ "select video effects filters to apply.\n"
"select video effects filters to apply.\n" \ "The filters can be configured individually in the Preferences, in "
"The filters can be configured indivudually in the Preferences, in " \ "the subsections of Video/Filters.\n"
"the subsections of Video/Filters\n." \ "To choose the order in which the filter are applied, a filter "
"To choose the order in which the filter are applied, a filter " \
"option string can be set in the Preferences, Video / Filters section.")); "option string can be set in the Preferences, Video / Filters section."));
} }
...@@ -761,24 +760,24 @@ static VLCExtended *_o_sharedInstance = nil; ...@@ -761,24 +760,24 @@ static VLCExtended *_o_sharedInstance = nil;
{ {
/* save the preferences to make sure that our module-changes will up on /* save the preferences to make sure that our module-changes will up on
* next launch again */ * next launch again */
playlist_t * p_playlist = vlc_object_find( VLCIntf, VLC_OBJECT_PLAYLIST, \ playlist_t * p_playlist = vlc_object_find( VLCIntf, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE ); FIND_ANYWHERE );
int returnedValue; int returnedValue;
NSArray * theModules; NSArray * theModules;
theModules = [[NSArray alloc] initWithObjects: @"main", @"headphone", \ theModules = [[NSArray alloc] initWithObjects: @"main", @"headphone",
@"transform", @"adjust", @"invert", @"motionblur", @"distort", \ @"transform", @"adjust", @"invert", @"motionblur", @"distort",
@"clone", @"crop", @"normvol", @"headphone_channel_mixer", @"macosx", \ @"clone", @"crop", @"normvol", @"headphone_channel_mixer", @"macosx",
nil]; nil];
unsigned int x = 0; unsigned int x = 0;
while ( x != [theModules count] ) while ( x != [theModules count] )
{ {
returnedValue = config_SaveConfigFile( p_playlist, [[theModules \ returnedValue = config_SaveConfigFile( p_playlist, [[theModules
objectAtIndex: x] UTF8String] ); objectAtIndex: x] UTF8String] );
if (returnedValue != 0) if (returnedValue != 0)
{ {
msg_Err(p_playlist, "unable to save the preferences of the " \ msg_Err(p_playlist, "unable to save the preferences of the "
"extended control attribute '%s' (%i)", "extended control attribute '%s' (%i)",
[[theModules objectAtIndex: x] UTF8String] , returnedValue); [[theModules objectAtIndex: x] UTF8String] , returnedValue);
[theModules release]; [theModules release];
......
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