X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=macosx%2Fmain.mm;h=9927a44e7c715860402ac4f90fbc98f55b61d033;hb=f35d39f9adca67471b72f3e47398855d51481f87;hp=bd649f8bafec6d5a28c2cac052bc239c92a29d9f;hpb=8cbde553128c9c57986d5a2a60d9f1bf53c49460;p=handbrake-jp%2Fhandbrake-jp-git.git
diff --git a/macosx/main.mm b/macosx/main.mm
index bd649f8b..9927a44e 100644
--- a/macosx/main.mm
+++ b/macosx/main.mm
@@ -1,12 +1,33 @@
-/* $Id: main.mm,v 1.1.1.1 2003/11/03 12:03:51 titer Exp $
+/* $Id: main.mm,v 1.3 2005/11/25 15:04:35 titer Exp $
This file is part of the HandBrake source code.
- Homepage: .
+ Homepage: .
It may be used under the terms of the GNU General Public License. */
-#import
+#include
+#import "hb.h"
+
+void SigHandler( int signal )
+{
+ [NSApp terminate: NULL];
+}
+
+/****************************************************************************
+ * hb_error_handler
+ *
+ * Change this to display a dialog box - and maybe move it somewhere else,
+ * this is the only place I could find that looked like C :)
+****************************************************************************/
+extern "C" {
+void hb_error_handler( const char *errmsg )
+{
+ fprintf(stderr, "GUI ERROR dialog: %s\n", errmsg );
+}
+}
int main( int argc, const char ** argv )
{
+ signal( SIGINT, SigHandler );
+ hb_register_error_handler(&hb_error_handler);
return NSApplicationMain( argc, argv );
}