xmpedit

GTK+ editor for XMP metadata embedded in images
git clone https://code.djc.id.au/git/xmpedit/
commit 62cb4ca3d339d595347f2f16ed83902769778eff
parent 78a64d22dad8f37694818152eba49319d89b1ba6
Author: Dan Callaghan <djc@djc.id.au>
Date:   Thu, 25 Dec 2008 17:22:00 +1000

that was dumb >_>

Diffstat:
Mxmpedit.cpp | 20++++++++------------
1 file changed, 8 insertions(+), 12 deletions(-)
diff --git a/xmpedit.cpp b/xmpedit.cpp
@@ -5,25 +5,21 @@
 #include "MainWindow.h"
 
 int main(int argc, char *argv[]) {
-    Glib::OptionContext options("PHOTO_FILENAME");
     try {
+        Glib::OptionContext options("PHOTO_FILENAME");
         Gtk::Main kit(argc, argv, options);
+        if (argc < 2) {
+            std::cerr << argv[0] << ": no photo filename supplied" << std::endl;
+            exit(2);
+        }
+        MainWindow window(argv[1]);
+        Gtk::Main::run(window);
+        return 0;
     } catch (Glib::OptionError e) {
         std::cerr << argv[0] << ": option error: " << e.what() << std::endl;
         exit(1);
-    }
-
-    if (argc < 2) {
-        std::cerr << argv[0] << ": no photo filename supplied" << std::endl;
-        exit(2);
-    }
-
-    try {
-        MainWindow window(argv[1]);
-        Gtk::Main::run(window);
     } catch (Exiv2::Error e) {
         std::cerr << argv[0] << ": exiv2 error: " << e.what() << std::endl;
         exit(3);
     }
-    return 0;
 }