Merge branch 'export-dialog' into cairocanvas
authorColin Fletcher <colin.m.fletcher@googlemail.com>
Mon, 19 May 2014 19:54:36 +0000 (20:54 +0100)
committerColin Fletcher <colin.m.fletcher@googlemail.com>
Mon, 19 May 2014 19:54:36 +0000 (20:54 +0100)
Fix merge conflicts in:
gtk2_ardour/export_range_markers_dialog.cc
gtk2_ardour/wscript
libs/ardour/ardour/export_handler.h
libs/ardour/system_exec.cc
libs/pbd/pbd/system_exec.h
libs/pbd/system_exec.cc

13 files changed:
1  2 
gtk2_ardour/export_channel_selector.h
gtk2_ardour/export_dialog.cc
gtk2_ardour/export_format_dialog.h
gtk2_ardour/export_timespan_selector.cc
gtk2_ardour/export_timespan_selector.h
gtk2_ardour/wscript
libs/ardour/ardour/export_format_manager.h
libs/ardour/ardour/export_format_specification.h
libs/ardour/ardour/export_handler.h
libs/ardour/export_handler.cc
libs/ardour/wscript
libs/pbd/pbd/system_exec.h
libs/pbd/system_exec.cc

Simple merge
Simple merge
Simple merge
index 920f71bd7db343efb917b1aa7fe376e92a34e5d8,facc1297140e22c403dd70e9f21a7a24ab451585..2cfd2ea4977da5b2fbd801337aac28c19e2e6afa
@@@ -204,6 -209,9 +204,7 @@@ gtk2_ardour_sources = 
          'session_option_editor.cc',
          'sfdb_ui.cc',
          'shuttle_control.cc',
 -        'simpleline.cc',
 -        'simplerect.cc',
+         'soundcloud_export_selector.cc',
          'splash.cc',
          'speaker_dialog.cc',
          'startup.cc',
index 1bc80a80e976693c7e194ca7c2fcfaf23634680e,e2c0a7b2b7548488440a7e640cba10df7ec6c13c..25a87045a8d815b66c36fba9f27a6410e0886c73
@@@ -29,8 -29,8 +29,9 @@@
  
  #include "ardour/export_pointers.h"
  #include "ardour/session.h"
 +#include "ardour/libardour_visibility.h"
  #include "ardour/types.h"
+ #include "pbd/signals.h"
  
  namespace AudioGrapher {
        class BroadcastInfo;
@@@ -68,7 -68,7 +69,7 @@@ class LIBARDOUR_API ExportElementFactor
        Session & session;
  };
  
- class LIBARDOUR_API ExportHandler : public ExportElementFactory
 -class ExportHandler : public ExportElementFactory, public sigc::trackable
++class LIBARDOUR_API ExportHandler : public ExportElementFactory, public sigc::trackable
  {
    public:
        struct FileSpec {
Simple merge
Simple merge
index 1232175fecc8192643c4bc2db22c3b5afbe56bc7,dc17ced2f673236860b36ad8ece7d71faad4ba56..ce6e5a9c4f9367664107aa47b40340d8d39a89f0
@@@ -42,7 -33,9 +42,9 @@@
  #include <string>
  #include <pthread.h>
  #include <signal.h>
 -#ifdef NOPBD  /* outside ardour */
+ #include <map>
 +#ifdef NOPBD  /* unit-test outside ardour */
  #include <sigc++/bind.h>
  #include <sigc++/signal.h>
  #else
@@@ -94,8 -85,26 +96,25 @@@ class LIBPBD_API SystemExe
                 *
                 */
                SystemExec (std::string c, char ** a);
+               /** similar to \ref SystemExec but expects a whole command line, and
+                * handles some simple escape sequences.
+                *
+                * @param command complete command-line to be executed
+                * @param subs a map of <char, std::string> listing the % substitutions to
+                *             be made.
+                *
+                * creates an argv array from the given command string, splitting into
+                * parameters at spaces.
+                * "\ " is non-splitting space, "\\" (and "\" at end of command) as "\",
+                * for "%<char>", <char> is looked up in subs and the corresponding string
+                * substituted. "%%" (and "%" at end of command)
+                * returns an argv array suitable for creating a new SystemExec with
+                */
+               SystemExec (std::string command, const std::map<char, std::string> subs);
                virtual ~SystemExec ();
  
 -
                /** fork and execute the given program
                 *
                 * @param stderr_mode select what to do with program's standard error
index 0102323505cf651336b2900987ef09e3868fc9f3,bf02fd72540d39a0beca7022529b9ff4783cdcae..82398af0c84c7854fbd640901dab2a441ce89d73
@@@ -149,11 -142,10 +149,10 @@@ static int close_allv(const int except_
  
        return 0;
  }
 -#endif /* not on windows */
 +#endif /* not on windows, nor vfork */
  
- SystemExec::SystemExec (std::string c, std::string a)
-       : cmd(c)
+ void
+ SystemExec::init ()
  {
        pthread_mutex_init(&write_lock, NULL);
        thread_active=false;
        pin[1] = -1;
        nicelevel = 0;
        envp = NULL;
-       argp = NULL;
 -#ifdef __WIN32__
 +#ifdef PLATFORM_WINDOWS
        stdinP[0] = stdinP[1] = INVALID_HANDLE_VALUE;
        stdoutP[0] = stdoutP[1] = INVALID_HANDLE_VALUE;
        stderrP[0] = stderrP[1] = INVALID_HANDLE_VALUE;
@@@ -174,16 -173,9 +180,9 @@@ SystemExec::SystemExec (std::string c, 
  SystemExec::SystemExec (std::string c, char **a)
        : cmd(c) , argp(a)
  {
-       pthread_mutex_init(&write_lock, NULL);
-       thread_active=false;
-       pid = 0;
-       pin[1] = -1;
-       nicelevel = 0;
-       envp = NULL;
+       init ();
 -#ifdef __WIN32__
 +#ifdef PLATFORM_WINDOWS
-       stdinP[0] = stdinP[1] = INVALID_HANDLE_VALUE;
-       stdoutP[0] = stdoutP[1] = INVALID_HANDLE_VALUE;
-       stderrP[0] = stderrP[1] = INVALID_HANDLE_VALUE;
        make_wargs(a);
  #endif
        make_envp();