* intf.h: MacOS X interface plugin
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: intf.h,v 1.21 2003/02/05 01:36:00 hartman Exp $
+ * $Id: intf.h,v 1.22 2003/02/05 16:23:06 hartman Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr>
IBOutlet id o_msgs_btn_ok; /* messages btn */
NSMutableArray * o_msg_arr; /* messages array */
NSLock * o_msg_lock; /* messages lock */
+ IBOutlet id o_msgs_btn_crashlog; /* messages open crashlog */
IBOutlet id o_error; /* error panel */
IBOutlet id o_err_msg; /* NSTextView */
* intf.m: MacOS X interface plugin
*****************************************************************************
* Copyright (C) 2002-2003 VideoLAN
- * $Id: intf.m,v 1.45 2003/02/05 01:36:00 hartman Exp $
+ * $Id: intf.m,v 1.46 2003/02/05 16:23:06 hartman Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr>
[o_msgs_panel setTitle: _NS("Messages")];
[o_msgs_panel setExcludedFromWindowsMenu: TRUE];
[o_msgs_btn_ok setTitle: _NS("Close")];
+ [o_msgs_btn_crashlog setTitle: _NS("Open CrashLog")];
/* main menu */
[o_mi_about setTitle: _NS("About VLC Media Player")];
withApplication: @"TextEdit"];
}
+- (IBAction)openCrashLog:(id)sender
+{
+ NSString * o_path = [@"~/Library/Logs/CrashReporter/vlc.crash.log"
+ stringByExpandingTildeInPath];
+
+
+ if ( [[NSFileManager defaultManager] fileExistsAtPath: o_path ] )
+ {
+ [[NSWorkspace sharedWorkspace] openFile: o_path
+ withApplication: @"Console"];
+ }
+ else
+ {
+ NSBeginInformationalAlertSheet(_NS("No CrashLog found"), @"Continue", nil, nil, o_msgs_panel, self, NULL, NULL, nil, _NS("Either you are running Mac OS X pre 10.2 or you haven't experienced any heavy crashes yet.") );
+
+ }
+}
+
- (void)windowDidBecomeKey:(NSNotification *)o_notification
{
if( [o_notification object] == o_msgs_panel )