X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=macosx%2Fmain.mm;h=d4a05b5d2adbbe58bd166b2e5e210654226c4517;hb=6e499d70fd7147fec222062679e24550a4881892;hp=56aa102faa4cfb25e99a7bf4db6f3b4e45cdac8d;hpb=978b5df21a0ab14687411c2191f1b6e938ce764d;p=handbrake-jp%2Fhandbrake-jp-git.git
diff --git a/macosx/main.mm b/macosx/main.mm
index 56aa102f..d4a05b5d 100644
--- a/macosx/main.mm
+++ b/macosx/main.mm
@@ -1,12 +1,33 @@
-/* $Id: main.mm,v 1.5 2003/09/30 14:38:15 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 );
}