Assists music production by grouping standalone programs into sessions. Community version of "Non Session Manager".
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

104 lines
2.5KB

  1. # data file for the Fltk User Interface Designer (fluid)
  2. version 1.0300
  3. header_name {.h}
  4. code_name {.cxx}
  5. decl {\#include <FL/Fl_File_Chooser.H>} {private local
  6. }
  7. decl {\#include <FL/Fl.H>} {private local
  8. }
  9. decl {\#include <FL/x.H>} {private local
  10. }
  11. decl {\#include <unistd.h>} {private local
  12. }
  13. decl {\#include <sys/types.h>} {private local
  14. }
  15. decl {\#include <sys/wait.h>} {private local
  16. }
  17. Function {} {open
  18. } {
  19. code {UserInterface *ui = new UserInterface();
  20. Fl_Double_Window *w = ui->make_window();
  21. w->show();
  22. Fl::run();
  23. return 0;} {}
  24. }
  25. class UserInterface {open
  26. } {
  27. Function {make_window()} {open
  28. } {
  29. Fl_Window main_window {
  30. label {Import Ardour Session} open
  31. xywh {610 468 395 310} type Double xclass {Non-Timeline} visible
  32. } {
  33. Fl_Box {} {
  34. label {Non Timeline : Ardour Session Importer}
  35. xywh {5 6 385 54} box ROUND_UP_BOX color 90 labelfont 1 labelsize 16
  36. }
  37. Fl_Box {} {
  38. label {This program will non-descrutively examine an existing Ardour 1, 2 or 3 format session file and replace the current Non Timeline project with the Tracks and Regions it finds. This program will only operate on a new (empty) Non Timeline project.}
  39. xywh {5 66 385 128} box ROUND_UP_BOX align 128
  40. }
  41. Fl_Return_Button {} {
  42. label Import
  43. callback {pid_t pid;
  44. if ( ! (pid = fork()) )
  45. {
  46. char *s;
  47. // asprintf( &s, "xterm -into 0x%lx -e import-ardour-session --overwrite '%s' '%s'", fl_xid( main_window ), file_input->value(), getenv("PWD" ));
  48. asprintf( &s, "import-ardour-session --overwrite '%s' '%s'", file_input->value(), getenv("PWD" ));
  49. exit( system( s ) );
  50. }
  51. int status;
  52. while ( 0 == waitpid( pid, &status, WNOHANG ) )
  53. {
  54. Fl::wait(0.01);
  55. if ( progress->value() >= 100 )
  56. progress->value( 0 );
  57. else
  58. progress->value( progress->value() + 5 );
  59. progress->redraw();
  60. }
  61. if ( 0 == status )
  62. fl_message( "Import succesful. You've been freed. Go make music!" );
  63. else
  64. fl_alert( "There was an error importing this session!" );
  65. exit(0);} selected
  66. xywh {270 270 115 30}
  67. }
  68. Fl_File_Input file_input {
  69. label {Path to .ardour File:}
  70. xywh {10 226 285 34} align 1
  71. }
  72. Fl_Button {} {
  73. label Browse
  74. callback {file_input->value( fl_file_chooser( ".ardour file", "*.ardour", NULL, 0 ) );}
  75. xywh {300 231 85 30}
  76. }
  77. Fl_Slider progress {
  78. label {slider:}
  79. xywh {15 272 245 27} type Horizontal color 48 selection_color 63 labeltype NO_LABEL align 18 maximum 100 deactivate
  80. }
  81. }
  82. }
  83. }