Commit b52970e2 authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

* extras/MacOSX/Resources/English.lproj/MainMenu.nib

* modules/gui/macosx/output.m:
  - changed the textfields for bitrate into comboboxes with suggested values
    identical to the ones in wxwindows intf.
  - changed "bitrate (bps)" into "bitrate (kb/s)
* modules/gui/macosx/prefs.?:
  - update the current view when advanced is changed.
  - module_lists now use the description strings.
  - always wraptext on tooltips. Currently japanese language is breaking.
  - we now have sliders for int/float config options with ranges.
  - fixed a warning message about an un-init'ed module_t.
* modules/video_filter/adjust.c:
  - added the ranges to the description strings of the config options.
  - blur-factor now uses a range as according to it's description string
    it already should have used this.
parent ee68542e
......@@ -2,7 +2,7 @@
* output.m: MacOS X Output Dialog
*****************************************************************************
* Copyright (C) 2002-2003 VideoLAN
* $Id: output.m,v 1.6 2003/05/25 17:27:13 massiot Exp $
* $Id: output.m,v 1.7 2003/05/26 01:25:12 hartman Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr>
......@@ -112,6 +112,10 @@
- (void)initStrings
{
NSArray *o_a_bitrates = [NSArray arrayWithObjects:@"96", @"128", @"192", @"256", @"512", nil];
NSArray *o_v_bitrates = [NSArray arrayWithObjects:
@"100", @"150", @"200", @"400", @"500", @"500", @"750", @"1000", @"2000", @"3000", nil];
[o_output_ckbox setTitle: _NS("Advanced output:")];
[o_output_settings setTitle: _NS("Settings...")];
[o_btn_ok setTitle: _NS("OK")];
......@@ -146,11 +150,13 @@
[[o_transcode_video_selector itemAtIndex: 5] setTitle: @"H263"];
[[o_transcode_video_selector itemAtIndex: 6] setTitle: @"I263"];
[[o_transcode_video_selector itemAtIndex: 7] setTitle: @"WMV1"];
[o_transcode_video_bitrate_lbl setStringValue: _NS("Bitrate (bps)")];
[o_transcode_video_bitrate_lbl setStringValue: _NS("Bitrate (kb/s)")];
[o_transcode_video_bitrate addItemsWithObjectValues: o_v_bitrates];
[o_transcode_audio_chkbox setTitle: _NS("Audio")];
[[o_transcode_audio_selector itemAtIndex: 0] setTitle: _NS("mpga")];
[[o_transcode_audio_selector itemAtIndex: 1] setTitle: _NS("a52 ")];
[o_transcode_audio_bitrate_lbl setStringValue: _NS("Bitrate (bps)")];
[[o_transcode_audio_selector itemAtIndex: 0] setTitle: @"mpga"];
[[o_transcode_audio_selector itemAtIndex: 1] setTitle: @"a52 "];
[o_transcode_audio_bitrate_lbl setStringValue: _NS("Bitrate (kb/s)")];
[o_transcode_audio_bitrate addItemsWithObjectValues: o_a_bitrates];
}
- (IBAction)outputChanged:(id)sender;
......
......@@ -2,7 +2,7 @@
* prefs.h: MacOS X plugin for vlc
*****************************************************************************
* Copyright (C) 2002-2003 VideoLAN
* $Id: prefs.h,v 1.7 2003/05/25 17:27:13 massiot Exp $
* $Id: prefs.h,v 1.8 2003/05/26 01:25:12 hartman Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
*
......@@ -155,6 +155,7 @@ INTF_CONTROL_CONFIG(Button);
INTF_CONTROL_CONFIG(PopUpButton);
INTF_CONTROL_CONFIG(ComboBox);
INTF_CONTROL_CONFIG(TextField);
INTF_CONTROL_CONFIG(Slider);
#define CONTROL_CONFIG( obj, mname, ctype, cname ) \
{ \
......
......@@ -2,7 +2,7 @@
* prefs.m: MacOS X plugin for vlc
*****************************************************************************
* Copyright (C) 2002-2003 VideoLAN
* $Id: prefs.m,v 1.27 2003/05/25 17:27:13 massiot Exp $
* $Id: prefs.m,v 1.28 2003/05/26 01:25:12 hartman Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Derk-Jan Hartman <thedj at users.sf.net>
......@@ -105,7 +105,8 @@
{
b_advanced = !b_advanced;
[o_advanced_ckb setState: b_advanced];
[o_tree selectRow: [o_tree selectedRow] byExtendingSelection:NO];
[self showViewForID: [[o_tree itemAtRow:[o_tree selectedRow]] getObjectID]
andName: [[o_tree itemAtRow:[o_tree selectedRow]] getName]];
}
- (void)loadConfigTree
......@@ -119,7 +120,8 @@
- (void)outlineViewSelectionDidChange:(NSNotification *)o_notification
{
[self showViewForID: [[o_tree itemAtRow:[o_tree selectedRow]] getObjectID] andName: [[o_tree itemAtRow:[o_tree selectedRow]] getName]];
[self showViewForID: [[o_tree itemAtRow:[o_tree selectedRow]] getObjectID]
andName: [[o_tree itemAtRow:[o_tree selectedRow]] getName]];
}
- (void)configChanged:(id)o_unknown
......@@ -137,12 +139,17 @@
case CONFIG_ITEM_MODULE:
{
char *psz_value;
NSString *o_value;
module_t *p_a_module;
int i_id = [[o_vlc_config selectedItem] tag];
o_value = [o_vlc_config titleOfSelectedItem];
psz_value = [o_value isEqualToString: _NS("Auto") ] ? "" :
(char *)[o_value UTF8String];
config_PutPsz( p_intf, psz_name, psz_value );
p_a_module = (module_t *)vlc_object_get( p_intf, i_id );
if( p_a_module == NULL || p_a_module->i_object_type != VLC_OBJECT_MODULE )
{
i_id = -1;
}
psz_value = ( i_id == -1 ) ? "" : p_a_module->psz_object_name ;
config_PutPsz( p_intf, psz_name, strdup(psz_value) );
}
break;
......@@ -246,8 +253,8 @@
#define INPUT_FIELD( ctype, cname, label, w, msg, param, tip ) \
{ \
char * psz_duptip = NULL; \
if ( p_item->psz_longtext != NULL && [NSApp getEncoding] == NSISOLatin1StringEncoding ) \
psz_duptip = strdup(p_item->psz_longtext); \
if ( p_item->psz_longtext != NULL ) \
psz_duptip = vlc_wraptext( strdup( p_item->psz_longtext ), PREFS_WRAP ); \
s_rc.size.height = 25; \
s_rc.size.width = w; \
s_rc.origin.y += 10; \
......@@ -259,7 +266,7 @@
if ( psz_duptip != NULL ) \
{ \
[o_text_field setToolTip: [NSApp localizedString: \
vlc_wraptext(psz_duptip, PREFS_WRAP)]]; \
psz_duptip]]; \
free(psz_duptip);\
} \
[o_view addSubview: [o_text_field autorelease]]; \
......@@ -314,8 +321,9 @@
VLCPopUpButton *o_modules;
module_t *p_a_module;
char * psz_duptip = NULL;
if ( p_item->psz_longtext != NULL && [NSApp getEncoding] == NSISOLatin1StringEncoding )
psz_duptip = strdup(p_item->psz_longtext);
if ( p_item->psz_longtext != NULL )
psz_duptip = vlc_wraptext( strdup( p_item->psz_longtext ), PREFS_WRAP );
s_rc.size.height = 30;
s_rc.size.width = 200;
......@@ -332,13 +340,14 @@
if ( psz_duptip != NULL )
{
[o_modules setToolTip: [NSApp localizedString:
vlc_wraptext(psz_duptip, PREFS_WRAP)]];
[o_modules setToolTip: [NSApp localizedString: psz_duptip]];
free( psz_duptip );
}
[o_view addSubview: [o_modules autorelease]];
[o_modules addItemWithTitle: _NS("Auto")];
[o_modules addItemWithTitle: _NS("None")];
[[o_modules lastItem] setTag: -1];
[o_modules selectItem: [o_modules lastItem]];
/* build a list of available modules */
{
......@@ -349,9 +358,16 @@
if( !strcmp( p_a_module->psz_capability,
p_item->psz_type ) )
{
NSString *o_object_name = [NSApp
localizedString: p_a_module->psz_object_name];
[o_modules addItemWithTitle: o_object_name];
NSString *o_description = [NSApp
localizedString: p_a_module->psz_longname];
[o_modules addItemWithTitle: o_description];
[[o_modules lastItem] setTag: p_a_module->i_object_id];
NSLog(@"%@", [[o_modules lastItem] title]);
if( p_item->psz_value &&
!strcmp( p_item->psz_value, p_a_module->psz_object_name ) )
{
[o_modules selectItem:[o_modules lastItem]];
}
}
}
}
......@@ -365,7 +381,7 @@
}
else
{
[o_modules selectItemWithTitle: _NS("Auto")];
[o_modules selectItemWithTitle: _NS("None")];
}
CONTROL_LABEL( p_item->psz_text );
......@@ -393,8 +409,8 @@
int i;
VLCComboBox *o_combo_box;
char * psz_duptip = NULL;
if ( p_item->psz_longtext != NULL && [NSApp getEncoding] == NSISOLatin1StringEncoding )
psz_duptip = strdup(p_item->psz_longtext);
if ( p_item->psz_longtext != NULL )
psz_duptip = vlc_wraptext( strdup( p_item->psz_longtext ), PREFS_WRAP );
s_rc.size.height = 27;
s_rc.size.width = 200;
......@@ -411,8 +427,7 @@
if ( psz_duptip != NULL )
{
[o_combo_box setToolTip: [NSApp localizedString:
vlc_wraptext(psz_duptip, PREFS_WRAP)]];
[o_combo_box setToolTip: [NSApp localizedString: psz_duptip]];
free( psz_duptip );
}
[o_view addSubview: [o_combo_box autorelease]];
......@@ -435,25 +450,102 @@
break;
case CONFIG_ITEM_INTEGER:
{
if( p_item->i_min == p_item->i_max )
{
INPUT_FIELD_INTEGER( p_item->psz_name, p_item->psz_text, 70,
p_item->i_value, p_item->psz_longtext );
}
else
{
/*create a slider */
VLCSlider *o_slider;
char * psz_duptip = NULL;
if ( p_item->psz_longtext != NULL )
psz_duptip = vlc_wraptext( strdup( p_item->psz_longtext ), PREFS_WRAP );
s_rc.size.height = 27;
s_rc.size.width = 200;
s_rc.origin.y += 10;
CHECK_VIEW_HEIGHT;
o_slider = [[VLCSlider alloc] initWithFrame: s_rc];
[o_slider setMinValue: p_item->i_min];
[o_slider setMaxValue: p_item->i_max];
[o_slider setIntValue: p_item->i_value];
if ( psz_duptip != NULL )
{
[o_slider setToolTip: [NSApp localizedString: psz_duptip]];
free( psz_duptip );
}
[o_slider setTarget: self];
[o_slider setAction: @selector(configChanged:)];
[o_slider sendActionOn:NSLeftMouseUpMask];
CONTROL_CONFIG( o_slider, o_module_name,
CONFIG_ITEM_INTEGER, p_item->psz_name );
[o_view addSubview: [o_slider autorelease]];
CONTROL_LABEL( p_item->psz_text );
s_rc.origin.y += s_rc.size.height;
s_rc.origin.x = X_ORIGIN;
}
}
break;
case CONFIG_ITEM_FLOAT:
{
if( p_item->f_min == p_item->f_max )
{
INPUT_FIELD_FLOAT( p_item->psz_name, p_item->psz_text, 70,
p_item->f_value, p_item->psz_longtext );
}
else
{
/* create a slider */
VLCSlider *o_slider;
char * psz_duptip = NULL;
if ( p_item->psz_longtext != NULL )
psz_duptip = vlc_wraptext( strdup( p_item->psz_longtext ), PREFS_WRAP );
s_rc.size.height = 27;
s_rc.size.width = 200;
s_rc.origin.y += 10;
CHECK_VIEW_HEIGHT;
o_slider = [[VLCSlider alloc] initWithFrame: s_rc];
[o_slider setMinValue: p_item->f_min];
[o_slider setMaxValue: p_item->f_max];
[o_slider setFloatValue: p_item->f_value];
if ( psz_duptip != NULL )
{
[o_slider setToolTip: [NSApp localizedString: psz_duptip]];
free( psz_duptip );
}
[o_slider setTarget: self];
[o_slider setAction: @selector(configChanged:)];
[o_slider sendActionOn:NSLeftMouseUpMask];
CONTROL_CONFIG( o_slider, o_module_name,
CONFIG_ITEM_FLOAT, p_item->psz_name );
[o_view addSubview: [o_slider autorelease]];
CONTROL_LABEL( p_item->psz_text );
s_rc.origin.y += s_rc.size.height;
s_rc.origin.x = X_ORIGIN;
}
}
break;
case CONFIG_ITEM_BOOL:
{
VLCButton *o_btn_bool;
char * psz_duptip = NULL;
if ( p_item->psz_longtext != NULL && [NSApp getEncoding] == NSISOLatin1StringEncoding )
psz_duptip = strdup(p_item->psz_longtext);
if ( p_item->psz_longtext != NULL )
psz_duptip = vlc_wraptext( strdup( p_item->psz_longtext ), PREFS_WRAP );
s_rc.size.height = 27;
s_rc.size.width = s_vrc.size.width - X_ORIGIN * 2 - 20;
......@@ -464,12 +556,10 @@
o_btn_bool = [[VLCButton alloc] initWithFrame: s_rc];
[o_btn_bool setButtonType: NSSwitchButton];
[o_btn_bool setIntValue: p_item->i_value];
[o_btn_bool setTitle:
[NSApp localizedString: p_item->psz_text]];
[o_btn_bool setTitle: [NSApp localizedString: p_item->psz_text]];
if ( psz_duptip != NULL )
{
[o_btn_bool setToolTip: [NSApp localizedString:
vlc_wraptext(psz_duptip, PREFS_WRAP)]];
[o_btn_bool setToolTip: [NSApp localizedString: psz_duptip]];
free( psz_duptip );
}
[o_btn_bool setTarget: self];
......@@ -560,7 +650,7 @@ static VLCTreeItem *o_root_item = nil;
if (o_children == NULL) {
intf_thread_t *p_intf = [NSApp getIntf];
vlc_list_t *p_list;
module_t *p_module;
module_t *p_module = NULL;
module_config_t *p_item;
int i_index,j;
......@@ -579,6 +669,11 @@ static VLCTreeItem *o_root_item = nil;
if( !strcmp( p_module->psz_object_name, "main" ) )
break;
}
if( p_module == NULL )
{
msg_Err( p_intf, "Could not find the main module in our prefs" );
return nil;
}
if( i_index < p_list->i_count )
{
/* We found the main module */
......@@ -809,3 +904,4 @@ IMPL_CONTROL_CONFIG(Button);
IMPL_CONTROL_CONFIG(PopUpButton);
IMPL_CONTROL_CONFIG(ComboBox);
IMPL_CONTROL_CONFIG(TextField);
IMPL_CONTROL_CONFIG(Slider);
......@@ -2,7 +2,7 @@
* adjust.c : Contrast/Hue/Saturation/Brightness video plugin for vlc
*****************************************************************************
* Copyright (C) 2000, 2001, 2002, 2003 VideoLAN
* $Id: adjust.c,v 1.12 2003/05/15 22:27:37 massiot Exp $
* $Id: adjust.c,v 1.13 2003/05/26 01:25:12 hartman Exp $
*
* Authors: Simon Latapie <garf@via.ecp.fr>
*
......@@ -58,13 +58,13 @@ static int SendEvents( vlc_object_t *, char const *,
*****************************************************************************/
#define CONT_TEXT N_("Set image contrast")
#define CONT_LONGTEXT N_("Set the image contrast. Defaults to 1")
#define CONT_LONGTEXT N_("Set the image contrast, between 0 and 2. Defaults to 1")
#define HUE_TEXT N_("Set image hue")
#define HUE_LONGTEXT N_("Set the image hue, between 0 and 360. Defaults to 0")
#define SAT_TEXT N_("Set image saturation")
#define SAT_LONGTEXT N_("Set the image saturation. Defaults to 1")
#define SAT_LONGTEXT N_("Set the image saturation, between 0 and 3. Defaults to 1")
#define LUM_TEXT N_("Set image brightness")
#define LUM_LONGTEXT N_("Set the image brightness. Defaults to 1")
#define LUM_LONGTEXT N_("Set the image brightness, between 0 and 2. Defaults to 1")
vlc_module_begin();
......
......@@ -2,7 +2,7 @@
* motion_blur.c : motion blur filter for vlc
*****************************************************************************
* Copyright (C) 2000, 2001, 2002, 2003 VideoLAN
* $Id: motionblur.c,v 1.11 2003/05/15 22:27:37 massiot Exp $
* $Id: motionblur.c,v 1.12 2003/05/26 01:25:12 hartman Exp $
*
* Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
*
......@@ -56,7 +56,7 @@ static int SendEvents( vlc_object_t *, char const *,
vlc_module_begin();
add_category_hint( N_("Miscellaneous"), NULL, VLC_FALSE );
add_integer( "blur-factor", 80, NULL, MODE_TEXT, MODE_LONGTEXT, VLC_FALSE );
add_integer_with_range( "blur-factor", 80, 1, 127, NULL, MODE_TEXT, MODE_LONGTEXT, VLC_FALSE );
set_description( _("motion blur filter") );
set_capability( "video filter", 0 );
set_callbacks( Create, Destroy );
......
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