]> git.sesse.net Git - vlc/commitdiff
* added a "Open CrashLog" button to the messages window in OSX.
authorDerk-Jan Hartman <hartman@videolan.org>
Wed, 5 Feb 2003 16:23:06 +0000 (16:23 +0000)
committerDerk-Jan Hartman <hartman@videolan.org>
Wed, 5 Feb 2003 16:23:06 +0000 (16:23 +0000)
extras/MacOSX/Resources/English.lproj/MainMenu.nib/classes.nib
extras/MacOSX/Resources/English.lproj/MainMenu.nib/info.nib
extras/MacOSX/Resources/English.lproj/MainMenu.nib/objects.nib
modules/gui/macosx/intf.h
modules/gui/macosx/intf.m

index b18099000e92a17e94f903f7898e8189909b7c5b..3963a31b712c7e7654ead563a6c9d84eb591bf28 100644 (file)
@@ -34,6 +34,7 @@
             ACTIONS = {
                 clearRecentItems = id; 
                 closeError = id; 
+                openCrashLog = id; 
                 openLicense = id; 
                 openReadMe = id; 
                 openRecentItem = id; 
                 "o_mi_vol_down" = id; 
                 "o_mi_vol_up" = id; 
                 "o_mi_website" = id; 
+                "o_msgs_btn_crashog" = id; 
                 "o_msgs_btn_ok" = id; 
                 "o_msgs_panel" = id; 
                 "o_mu_audio" = id; 
index 3eb73cf353c3883b2a3403533b568fa0de14c5c4..41170b74fe75adf93ca8817792d7a6aac722f979 100644 (file)
@@ -3,7 +3,7 @@
 <plist version="1.0">
 <dict>
        <key>IBDocumentLocation</key>
-       <string>282 82 365 441 0 0 1152 746 </string>
+       <string>913 -102 365 441 0 0 1280 1002 </string>
        <key>IBEditorPositions</key>
        <dict>
                <key>29</key>
@@ -25,7 +25,6 @@
        <array>
                <integer>21</integer>
                <integer>29</integer>
-               <integer>303</integer>
        </array>
        <key>IBSystem Version</key>
        <string>6G30</string>
index 67709c7b3f56524fb2325554636a88c9c85ebc89..f0d435a4b079605303b4679256b6f92c8174f030 100644 (file)
Binary files a/extras/MacOSX/Resources/English.lproj/MainMenu.nib/objects.nib and b/extras/MacOSX/Resources/English.lproj/MainMenu.nib/objects.nib differ
index 9e4e060dae3cfe6de957d716855d38b6e9543633..fd67f5fdc17114a0012f443d02d475bb020d2981 100644 (file)
@@ -2,7 +2,7 @@
  * 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>
@@ -117,6 +117,7 @@ struct intf_sys_t
     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     */
index 7d9854fb94c41aa8affad6eb7ec88073689319dc..56af99402d6909735fedb5fd5b761284c8ba1103 100644 (file)
@@ -2,7 +2,7 @@
  * 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>
@@ -262,6 +262,7 @@ int ExecuteOnMainThread( id target, SEL sel, void * p_arg )
     [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")];
@@ -1387,6 +1388,24 @@ int ExecuteOnMainThread( id target, SEL sel, void * p_arg )
                                    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 )