/[svn]/gigedit/trunk/src/gigedit/main.cpp
ViewVC logotype

Diff of /gigedit/trunk/src/gigedit/main.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1322 by schoenebeck, Tue Sep 4 11:04:56 2007 UTC revision 3489 by persson, Sun Mar 3 09:08:20 2019 UTC
# Line 1  Line 1 
1  /*  /*
2   * Copyright (C) 2006, 2007 Andreas Persson   * Copyright (C) 2006 - 2019 Andreas Persson
3   *   *
4   * This program is free software; you can redistribute it and/or   * This program is free software; you can redistribute it and/or
5   * modify it under the terms of the GNU General Public License as   * modify it under the terms of the GNU General Public License as
# Line 17  Line 17 
17   * 02110-1301 USA.   * 02110-1301 USA.
18   */   */
19    
20    #include "global.h"
21    #include <gtk/gtk.h>
22  #include "gigedit.h"  #include "gigedit.h"
23    #ifdef GTKMM_HEADER_FILE
24    # include GTKMM_HEADER_FILE(gtkmm.h)
25    #else
26    # include <gtkmm.h>
27    #endif
28    
29    #if defined(WIN32)
30    #include <windows.h>
31    
32    int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
33        LPSTR lpCmdLine, int nCmdShow)
34    {
35        #if GTKMM_MAJOR_VERSION >= 3
36        enforceGtk3Settings(__argc, __argv);
37        #endif
38    
39        GigEdit app;
40        return app.run(__argc, __argv);
41    }
42    
43    #else
44    
45  int main(int argc, char* argv[])  int main(int argc, char* argv[])
46  {  {
47    #ifdef __APPLE__
48        // remove the argument added by the OS
49        if (argc > 1 && strncmp(argv[1], "-psn", 4) == 0) {
50            argc--;
51            for (int i = 1 ; i < argc ; i++) {
52                argv[i] = argv[i + 1];
53            }
54        }
55    #endif
56      GigEdit app;      GigEdit app;
57      return (argc >= 2) ? app.run(argv[1])      return app.run(argc, argv);
                        : app.run();  
58  }  }
59    
60    #endif

Legend:
Removed from v.1322  
changed lines
  Added in v.3489

  ViewVC Help
Powered by ViewVC