- gtk_set_locale();
- gtk_init(&ac, &av);
- return ac < 3 ?
- PluginLV2UI().run(ac, av) :
- PluginLV2ChildUI().run(ac, av);
+ return PluginLV2ChildUI().run(ac, av);
+}
+
+int PluginLV2ChildUI::run(int ac, char **av)
+{
+ this->ac = ac;
+ this->av = av;
+
+ if( ac > 3 ) {
+ signal(SIGINT, SIG_IGN);
+ ForkBase::child_fd = atoi(av[1]);
+ ForkBase::parent_fd = atoi(av[2]);
+ ForkBase::ppid = atoi(av[3]);
+ }
+ else {
+ int sample_rate = samplerate, bfrsz = block_length;
+ if( ac > 2 ) sample_rate = atoi(av[2]);
+ if( init_ui(av[1], sample_rate, bfrsz) ) {
+ fprintf(stderr," init_ui failed\n");
+ return 1;
+ }
+ start_gui();
+ }
+ return run_ui();