Commit 5caa4176 authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

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

  - Added the duration column
  - Added a 'surpress error dialog' option to the dialog
* ALL: copyright year and author changes
parent 1114ee5a
......@@ -90,6 +90,7 @@
"o_err_btn_dismiss" = id;
"o_err_btn_msgs" = id;
"o_err_bug_lbl" = id;
"o_err_ckbk_surpress" = id;
"o_err_lbl" = id;
"o_err_msg" = id;
"o_error" = id;
......@@ -349,6 +350,7 @@
"o_status_field" = id;
"o_table_view" = id;
"o_tc_author" = id;
"o_tc_duration" = id;
"o_tc_name" = id;
"o_window" = id;
};
......
......@@ -3,11 +3,11 @@
<plist version="1.0">
<dict>
<key>IBDocumentLocation</key>
<string>313 340 505 541 0 0 1280 1002 </string>
<string>323 227 505 541 0 0 1280 1002 </string>
<key>IBEditorPositions</key>
<dict>
<key>1617</key>
<string>541 480 104 149 0 0 1024 746 </string>
<string>692 686 104 149 0 0 1280 1002 </string>
<key>29</key>
<string>165 929 419 44 0 0 1280 1002 </string>
<key>915</key>
......@@ -19,11 +19,12 @@
<array/>
<key>IBOpenObjects</key>
<array>
<integer>1647</integer>
<integer>1617</integer>
<integer>984</integer>
<integer>21</integer>
<integer>1647</integer>
</array>
<key>IBSystem Version</key>
<string>7C107</string>
<string>7D24</string>
</dict>
</plist>
This diff is collapsed.
/*****************************************************************************
* variables.h: variables handling
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: variables.h,v 1.20 2004/01/09 20:36:21 hartman Exp $
* Copyright (C) 2002-2004 VideoLAN
* $Id: variables.h,v 1.21 2004/01/09 22:11:04 hartman Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Gildas Bazin <gbazin@netcourrier.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
......@@ -2,9 +2,9 @@
* info.m: MacOS X info panel
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: info.m,v 1.8 2003/10/19 13:39:12 hartman Exp $
* $Id: info.m,v 1.9 2004/01/09 22:11:04 hartman Exp $
*
* Authors: Derk-Jan Hartman <thedj@users.sourceforge.net>
* Authors: Derk-Jan Hartman <hartman at videolan dot org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
/*****************************************************************************
* intf.h: MacOS X interface plugin
*****************************************************************************
* Copyright (C) 2002-2003 VideoLAN
* $Id: intf.h,v 1.54 2004/01/04 21:44:44 kuehne Exp $
* Copyright (C) 2002-2004 VideoLAN
* $Id: intf.h,v 1.55 2004/01/09 22:11:04 hartman Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr>
* Derk-Jan Hartman <thedj@users.sourceforge.net>
* Derk-Jan Hartman <hartman at videolan dot org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -130,6 +130,7 @@ struct intf_sys_t
IBOutlet id o_err_bug_lbl;
IBOutlet id o_err_btn_msgs; /* Open Messages */
IBOutlet id o_err_btn_dismiss;
IBOutlet id o_err_ckbk_surpress;
IBOutlet id o_info_window; /* Info panel */
......
/*****************************************************************************
* intf.m: MacOS X interface plugin
*****************************************************************************
* Copyright (C) 2002-2003 VideoLAN
* $Id: intf.m,v 1.112 2004/01/05 18:43:17 bigben Exp $
* Copyright (C) 2002-2004 VideoLAN
* $Id: intf.m,v 1.113 2004/01/09 22:11:04 hartman Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr>
......@@ -556,6 +556,7 @@ unsigned int VLCModifiersToCocoa( unsigned int i_key )
[o_err_bug_lbl setStringValue: _NS("If you believe that it is a bug, please follow the instructions at:")];
[o_err_btn_msgs setTitle: _NS("Open Messages Window")];
[o_err_btn_dismiss setTitle: _NS("Dismiss")];
[o_err_ckbk_surpress setTitle: _NS("Surpress further errors")];
[o_info_window setTitle: _NS("Info")];
}
......@@ -940,6 +941,7 @@ unsigned int VLCModifiersToCocoa( unsigned int i_key )
{
int i_start, i_stop;
intf_thread_t * p_intf = [NSApp getIntf];
vlc_value_t quiet;
vlc_mutex_lock( p_intf->p_sys->p_sub->p_lock );
i_stop = *p_intf->p_sys->p_sub->pi_stop;
......@@ -994,7 +996,9 @@ unsigned int VLCModifiersToCocoa( unsigned int i_key )
[o_msg_lock unlock];
if( i_type == 1 )
var_Get( p_intf->p_vlc, "verbose", &quiet );
if( i_type == 1 && quiet.i_int > -1 )
{
NSString *o_my_msg = [NSString stringWithFormat: @"%s: %s\n",
p_intf->p_sys->p_sub->p_msg[i_start].psz_module,
......@@ -1212,6 +1216,14 @@ unsigned int VLCModifiersToCocoa( unsigned int i_key )
- (IBAction)closeError:(id)sender
{
vlc_value_t val;
intf_thread_t * p_intf = [NSApp getIntf];
if( [o_err_ckbk_surpress state] == NSOnState )
{
val.i_int = -1;
var_Set( p_intf->p_vlc, "verbose", val );
}
[o_err_msg setString: @""];
[o_error performClose: self];
}
......
/*****************************************************************************
* playlist.h: MacOS X interface plugin
*****************************************************************************
* Copyright (C) 2002-2003 VideoLAN
* $Id: playlist.h,v 1.16 2003/12/11 19:34:46 hartman Exp $
* Copyright (C) 2002-2004 VideoLAN
* $Id: playlist.h,v 1.17 2004/01/09 22:11:04 hartman Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Derk-Jan Hartman <thedj@users.sourceforge.net>
* Derk-Jan Hartman <hartman at videolan dot org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -45,6 +45,7 @@
IBOutlet id o_status_field;
IBOutlet id o_tc_name;
IBOutlet id o_tc_author;
IBOutlet id o_tc_duration;
IBOutlet id o_ctx_menu;
IBOutlet id o_mi_save_playlist;
......
/*****************************************************************************
* playlist.m: MacOS X interface plugin
*****************************************************************************
* Copyright (C) 2002-2003 VideoLAN
* $Id: playlist.m,v 1.50 2004/01/05 13:07:03 zorglub Exp $
* Copyright (C) 2002-2004 VideoLAN
* $Id: playlist.m,v 1.51 2004/01/09 22:11:04 hartman Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Derk-Jan Hartman <thedj@users.sourceforge.net>
* Derk-Jan Hartman <hartman at videolan dot org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -145,6 +145,7 @@
[o_mi_selectall setTitle: _NS("Select All")];
[[o_tc_name headerCell] setStringValue:_NS("Name")];
[[o_tc_author headerCell] setStringValue:_NS("Author")];
[[o_tc_duration headerCell] setStringValue:_NS("Duration")];
[o_random_ckb setTitle: _NS("Shuffle")];
[o_loop_ckb setTitle: _NS("Repeat Playlist")];
[o_repeat_ckb setTitle: _NS("Repeat Item")];
......@@ -342,25 +343,24 @@
{
/* One item */
NSDictionary *o_one_item;
int j;
int i_total_options = 0;
int j, i_new_position = -1;
int i_mode = PLAYLIST_INSERT;
BOOL b_rem = FALSE, b_dir = FALSE;
NSString *o_url, *o_name;
NSString *o_uri, *o_name;
NSArray *o_options;
char **ppsz_options = NULL;
NSURL *o_true_file;
/* Get the item */
o_one_item = [o_array objectAtIndex: i_item];
o_url = (NSString *)[o_one_item objectForKey: @"ITEM_URL"];
o_uri = (NSString *)[o_one_item objectForKey: @"ITEM_URL"];
o_name = (NSString *)[o_one_item objectForKey: @"ITEM_NAME"];
o_options = (NSArray *)[o_one_item objectForKey: @"ITEM_OPTIONS"];
/* If no name, then make a guess */
if( !o_name) o_name = [[NSFileManager defaultManager] displayNameAtPath: o_url];
if( !o_name) o_name = [[NSFileManager defaultManager] displayNameAtPath: o_uri];
if( [[NSFileManager defaultManager] fileExistsAtPath:o_url isDirectory:&b_dir] && b_dir &&
[[NSWorkspace sharedWorkspace] getFileSystemInfoForPath: o_url isRemovable: &b_rem
if( [[NSFileManager defaultManager] fileExistsAtPath:o_uri isDirectory:&b_dir] && b_dir &&
[[NSWorkspace sharedWorkspace] getFileSystemInfoForPath: o_uri isRemovable: &b_rem
isWritable:NULL isUnmountable:NULL description:NULL type:NULL] && b_rem )
{
/* All of this is to make sure CD's play when you D&D them on VLC */
......@@ -368,50 +368,38 @@
struct statfs *buf;
char *psz_dev, *temp;
buf = (struct statfs *) malloc (sizeof(struct statfs));
statfs( [o_url fileSystemRepresentation], buf );
statfs( [o_uri fileSystemRepresentation], buf );
psz_dev = strdup(buf->f_mntfromname);
free( buf );
temp = strrchr( psz_dev , 's' );
psz_dev[temp - psz_dev] = '\0';
o_url = [NSString stringWithCString: psz_dev ];
o_uri = [NSString stringWithCString: psz_dev ];
}
if (i_item == 0 && !b_enqueue)
i_mode |= PLAYLIST_GO;
if( o_options && [o_options count] > 0 )
/* Add the item */
i_new_position = playlist_Add( p_playlist, [o_uri fileSystemRepresentation],
[o_name UTF8String], i_mode,
i_position == -1 ? PLAYLIST_END : i_position + i_item);
/* Add the options, when there are any */
if( o_options )
{
/* Count the input options */
i_total_options = [o_options count];
/* Allocate ppsz_options */
for( j = 0; j < i_total_options; j++ )
for( j = 0; j < [o_options count]; j++ )
{
if( !ppsz_options )
ppsz_options = (char **)malloc( sizeof(char *) * i_total_options );
ppsz_options[j] = strdup([[o_options objectAtIndex:j] UTF8String]);
playlist_AddOption( p_playlist, i_new_position,
strdup( [[o_options objectAtIndex:j] UTF8String] ) );
}
}
playlist_Add( p_playlist, [o_url fileSystemRepresentation],
[o_name UTF8String], i_mode,
i_position == -1 ? PLAYLIST_END : i_position + i_item);
/*-1,
(ppsz_options != NULL ) ? (const char **)ppsz_options : 0, i_total_options,
i_mode, i_position == -1 ? PLAYLIST_END : i_position + i_item);*/
/* clean up */
for( j = 0; j < i_total_options; j++ )
free( ppsz_options[j] );
if( ppsz_options ) free( ppsz_options );
/* Recent documents menu */
NSURL *o_true_url = [NSURL fileURLWithPath: o_url];
if( o_true_url != nil )
o_true_file = [NSURL fileURLWithPath: o_uri];
if( o_true_file != nil )
{
[[NSDocumentController sharedDocumentController]
noteNewRecentDocumentURL: o_true_url];
noteNewRecentDocumentURL: o_true_file];
}
}
......@@ -505,7 +493,7 @@
{
vlc_mutex_lock( &p_playlist->object_lock );
o_value = [[NSString stringWithUTF8String:
p_playlist->pp_items[i_row]->psz_name] lastPathComponent];
p_playlist->pp_items[i_row]->psz_name] lastPathComponent];
vlc_mutex_unlock( &p_playlist->object_lock );
}
else if( [[o_tc identifier] isEqualToString:@"2"] )
......@@ -515,6 +503,20 @@
playlist_GetInfo(p_playlist, i_row ,_("General"),_("Author") )];
vlc_mutex_unlock( &p_playlist->object_lock );
}
else if( [[o_tc identifier] isEqualToString:@"3"] )
{
char psz_duration[MSTRTIME_MAX_SIZE];
mtime_t dur = p_playlist->pp_items[i_row]->i_duration;
if( dur != -1 )
{
secstotimestr( psz_duration, dur/1000000 );
o_value = [NSString stringWithUTF8String: psz_duration];
}
else
{
o_value = @"-:--:--";
}
}
vlc_object_release( p_playlist );
......
###############################################################################
# vlc.ebuild: A Gentoo ebuild for vlc
###############################################################################
# Copyright (C) 2003 VideoLAN
# $Id: vlc.ebuild,v 1.24 2004/01/08 22:37:59 hartman Exp $
# Copyright (C) 2003-2004 VideoLAN
# $Id: vlc.ebuild,v 1.25 2004/01/09 22:11:04 hartman Exp $
#
# Authors: Derk-Jan Hartman <thedj at users.sf.net>
# Authors: Derk-Jan Hartman <hartman at videolan dot org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
......
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