src/xmpedit.vala (709B) - raw
1 /* 2 * xmpedit 3 * Copyright 2010 Dan Callaghan <djc@djc.id.au> 4 * Released under GPLv2 5 */ 6 7 namespace Xmpedit { 8 9 #if TEST 10 11 public int main(string[] args) { 12 Test.init(ref args); 13 RDF.register_tests(); 14 Exiv2.Tests.register_tests(); 15 Test.run(); 16 return 0; 17 } 18 19 #else 20 21 public int main (string[] args) { 22 Gtk.init_with_args(ref args, "PHOTO_FILENAME", { }, /* translation_domain */ null); 23 if (args.length < 2) { 24 stderr.puts("xmpedit: no photo filename supplied\n"); 25 return 2; 26 } 27 var path = args[1]; 28 MainWindow main_window = new MainWindow(path); 29 main_window.destroy.connect(Gtk.main_quit); 30 main_window.show_all(); 31 Gtk.main(); 32 return 0; 33 } 34 35 #endif 36 37 }