bsd lang segv fix, enable bsd lv2, lv2 gui enable fix, proxy/ffmpeg toggle resize...
[goodguy/history.git] / cinelerra-5.1 / cinelerra / interfaceprefs.C
1
2 /*
3  * CINELERRA
4  * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  *
20  */
21
22 #include "deleteallindexes.h"
23 #include "edl.h"
24 #include "edlsession.h"
25 #include "file.h"
26 #include "filesystem.h"
27 #include "language.h"
28 #include "mwindow.h"
29 #include "preferences.h"
30 #include "preferencesthread.h"
31 #include "probeprefs.h"
32 #include "interfaceprefs.h"
33 #include "shbtnprefs.h"
34 #include "theme.h"
35
36 #if 0
37 N_("Drag all following edits")
38 N_("Drag only one edit")
39 N_("Drag source only")
40 N_("No effect")
41 #endif
42
43 #define MOVE_ALL_EDITS_TITLE N_("Drag all following edits")
44 #define MOVE_ONE_EDIT_TITLE N_("Drag only one edit")
45 #define MOVE_NO_EDITS_TITLE N_("Drag source only")
46 #define MOVE_EDITS_DISABLED_TITLE N_("No effect")
47
48 InterfacePrefs::InterfacePrefs(MWindow *mwindow, PreferencesWindow *pwindow)
49  : PreferencesDialog(mwindow, pwindow)
50 {
51         min_db = 0;
52         max_db = 0;
53         shbtn_dialog = 0;
54         file_probe_dialog = 0;
55 }
56
57 InterfacePrefs::~InterfacePrefs()
58 {
59         delete min_db;
60         delete max_db;
61         delete shbtn_dialog;
62         delete file_probe_dialog;
63 }
64
65
66 void InterfacePrefs::create_objects()
67 {
68         BC_Resources *resources = BC_WindowBase::get_resources();
69         int margin = mwindow->theme->widget_border;
70         char string[BCTEXTLEN];
71         int x0 = mwindow->theme->preferencesoptions_x;
72         int y0 = mwindow->theme->preferencesoptions_y;
73         int x = x0, y = y0;
74
75         add_subwindow(new BC_Title(x, y, _("Editing:"), LARGEFONT,
76                 resources->text_default));
77         y += 35;
78
79         int x2 = get_w()/2, y2 = y;
80         x = x2;
81         BC_Title *title;
82         add_subwindow(title = new BC_Title(x, y, _("Keyframe reticle:")));
83         y += title->get_h() + 5;
84         keyframe_reticle = new KeyframeReticle(pwindow, this, x, y,
85                 &pwindow->thread->preferences->keyframe_reticle);
86         add_subwindow(keyframe_reticle);
87         keyframe_reticle->create_objects();
88
89         y += 30;
90         add_subwindow(title = new BC_Title(x, y, _("Snapshot path:")));
91         y += title->get_h() + 5;
92         add_subwindow(snapshot_path = new SnapshotPathText(pwindow, this, x, y, get_w()-x-30));
93
94         x = x0;  y = y2;
95         add_subwindow(new BC_Title(x, y, _("Clicking on edit boundaries does what:")));
96         y += 25;
97         add_subwindow(new BC_Title(x, y, _("Button 1:")));
98
99         int x1 = x + 100;
100         ViewBehaviourText *text;
101         add_subwindow(text = new ViewBehaviourText(x1, y - 5,
102                 behavior_to_text(pwindow->thread->edl->session->edit_handle_mode[0]),
103                         pwindow,
104                         &(pwindow->thread->edl->session->edit_handle_mode[0])));
105         text->create_objects();
106         y += 30;
107         add_subwindow(new BC_Title(x, y, _("Button 2:")));
108         add_subwindow(text = new ViewBehaviourText(x1,
109                 y - 5,
110                 behavior_to_text(pwindow->thread->edl->session->edit_handle_mode[1]),
111                         pwindow,
112                         &(pwindow->thread->edl->session->edit_handle_mode[1])));
113         text->create_objects();
114         y += 30;
115         add_subwindow(new BC_Title(x, y, _("Button 3:")));
116         add_subwindow(text = new ViewBehaviourText(x1, y - 5,
117                 behavior_to_text(pwindow->thread->edl->session->edit_handle_mode[2]),
118                         pwindow,
119                         &(pwindow->thread->edl->session->edit_handle_mode[2])));
120         text->create_objects();
121         y += text->get_h() + 30;
122
123         x = x0;
124         add_subwindow(new BC_Bar(5, y,  get_w() - 10));
125         y += 5;
126         add_subwindow(new BC_Title(x, y, _("Operation:"), LARGEFONT,
127                 resources->text_default));
128         y += 35;
129
130         int y1 = y;
131         AndroidRemote *android_remote = new AndroidRemote(pwindow, x2, y);
132         add_subwindow(android_remote);
133         y += android_remote->get_h() + 10;
134         add_subwindow(title = new BC_Title(x2, y, _("Port:")));
135         int x3 = x2 + title->get_w() + margin;
136         AndroidPort *android_port = new AndroidPort(pwindow, x3, y);
137         add_subwindow(android_port);
138         y += title->get_h() + 10;
139         add_subwindow(title = new BC_Title(x2, y, _("PIN:")));
140         AndroidPIN *android_pin = new AndroidPIN(pwindow, x3, y);
141         add_subwindow(android_pin);
142         y += title->get_h() + 30;
143
144         ShBtnPrefs *shbtn_prefs = new ShBtnPrefs(pwindow, this, x2, y);
145         add_subwindow(shbtn_prefs);
146         y += shbtn_prefs->get_h() + 30;
147
148         add_subwindow(title = new BC_Title(x2, y, _("Default LV2_PATH:")));
149         y += title->get_h() + 10;
150         PrefsLV2PathText *lv2_path_text = new PrefsLV2PathText(pwindow, this, x2, y, get_w()-x2-30);
151         add_subwindow(lv2_path_text);
152         y += 30;
153
154         y2 = y;
155         x = x0;  y = y1;
156         add_subwindow(file_probes = new PrefsFileProbes(pwindow, this, x, y));
157         y += 30;
158
159         PrefsTrapSigSEGV *trap_segv = new PrefsTrapSigSEGV(this, x, y);
160         add_subwindow(trap_segv);
161         x1 = x + trap_segv->get_w() + 10;
162         add_subwindow(new BC_Title(x1, y, _("(must be root)"), MEDIUMFONT, RED));
163         y += 30;
164
165         PrefsTrapSigINTR *trap_intr = new PrefsTrapSigINTR(this, x, y);
166         add_subwindow(trap_intr);
167         add_subwindow(new BC_Title(x1, y, _("(must be root)"), MEDIUMFONT, RED));
168         y += 30;
169
170         yuv420p_dvdlace = new PrefsYUV420P_DVDlace(pwindow, this, x, y);
171         add_subwindow(yuv420p_dvdlace);
172         y += 30;
173
174         add_subwindow(title = new BC_Title(x1=x, y + 5, _("Min DB for meter:")));
175         x1 += title->get_w() + 10;
176         sprintf(string, "%d", pwindow->thread->edl->session->min_meter_db);
177         add_subwindow(min_db = new MeterMinDB(pwindow, string, x1, y));
178         x1 += min_db->get_w() + 10;
179         add_subwindow(title = new BC_Title(x1, y + 5, _("Max DB:")));
180         x1 += title->get_w() + 10;
181         sprintf(string, "%d", pwindow->thread->edl->session->max_meter_db);
182         add_subwindow(max_db = new MeterMaxDB(pwindow, string, x1, y));
183         y += 30;
184
185         StillImageUseDuration *use_stduration = new StillImageUseDuration(pwindow,
186                 pwindow->thread->edl->session->si_useduration, x, y);
187         add_subwindow(use_stduration);
188         x1 = x + use_stduration->get_w() + 10;
189         StillImageDuration *stduration = new StillImageDuration(pwindow, x1, y);
190         add_subwindow(stduration);
191         x1 += stduration->get_w() + 10;
192         add_subwindow(new BC_Title(x1, y, _("Seconds")));
193         y += 30;
194
195         PrefsAutostartLV2UI *autostart_lv2ui = new PrefsAutostartLV2UI(x, y,pwindow);
196         add_subwindow(autostart_lv2ui);
197         y += autostart_lv2ui->get_h() + 10;
198
199         if( y2 > y ) y = y2;
200         x = x0;
201         add_subwindow(new BC_Bar(5, y,  get_w() - 10));
202         y += 5;
203
204         add_subwindow(new BC_Title(x, y, _("Index files:"), LARGEFONT, resources->text_default));
205         y += 30;
206
207         add_subwindow(new BC_Title(x, y + 5,
208                 _("Index files go here:"), MEDIUMFONT, resources->text_default));
209         x1 = x + 230;
210         add_subwindow(ipathtext = new IndexPathText(x1, y, pwindow,
211                 pwindow->thread->preferences->index_directory));
212         x1 +=  ipathtext->get_w();
213         add_subwindow(ipath = new BrowseButton(mwindow->theme, this, ipathtext, x1, y,
214                 pwindow->thread->preferences->index_directory,
215                 _("Index Path"), _("Select the directory for index files"), 1));
216
217         y += 30;
218         add_subwindow(new BC_Title(x, y + 5, _("Size of index file:"),
219                 MEDIUMFONT, resources->text_default));
220         sprintf(string, "%jd", pwindow->thread->preferences->index_size);
221         add_subwindow(isize = new IndexSize(x + 230, y, pwindow, string));
222         add_subwindow(new ScanCommercials(pwindow, 400,y));
223
224         y += 30;
225         add_subwindow(new BC_Title(x, y + 5, _("Number of index files to keep:"),
226                 MEDIUMFONT, resources->text_default));
227         sprintf(string, "%ld", (long)pwindow->thread->preferences->index_count);
228         add_subwindow(icount = new IndexCount(x + 230, y, pwindow, string));
229         add_subwindow(deleteall = new DeleteAllIndexes(mwindow, pwindow, 400, y));
230         y += 30;
231         add_subwindow(ffmpeg_marker_files = new IndexFFMPEGMarkerFiles(this, x, y));
232         y += 35;
233 }
234
235 const char* InterfacePrefs::behavior_to_text(int mode)
236 {
237         switch(mode) {
238                 case MOVE_ALL_EDITS: return _(MOVE_ALL_EDITS_TITLE);
239                 case MOVE_ONE_EDIT:  return _(MOVE_ONE_EDIT_TITLE);
240                 case MOVE_NO_EDITS:  return _(MOVE_NO_EDITS_TITLE);
241                 case MOVE_EDITS_DISABLED: return _(MOVE_EDITS_DISABLED_TITLE);
242                 default: return "";
243         }
244 }
245
246 IndexPathText::IndexPathText(int x, int y, PreferencesWindow *pwindow, char *text)
247  : BC_TextBox(x, y, 240, 1, text)
248 {
249         this->pwindow = pwindow;
250 }
251
252 IndexPathText::~IndexPathText() {}
253
254 int IndexPathText::handle_event()
255 {
256         strcpy(pwindow->thread->preferences->index_directory, get_text());
257         return 1;
258 }
259
260
261
262
263 IndexSize::IndexSize(int x, int y, PreferencesWindow *pwindow, char *text)
264  : BC_TextBox(x, y, 100, 1, text)
265 {
266         this->pwindow = pwindow;
267 }
268
269 int IndexSize::handle_event()
270 {
271         long result;
272
273         result = atol(get_text());
274         if(result < 64000) result = 64000;
275         //if(result < 500000) result = 500000;
276         pwindow->thread->preferences->index_size = result;
277         return 0;
278 }
279
280
281
282 IndexCount::IndexCount(int x, int y, PreferencesWindow *pwindow, char *text)
283  : BC_TextBox(x, y, 100, 1, text)
284 {
285         this->pwindow = pwindow;
286 }
287
288 int IndexCount::handle_event()
289 {
290         long result;
291
292         result = atol(get_text());
293         if(result < 1) result = 1;
294         pwindow->thread->preferences->index_count = result;
295         return 0;
296 }
297
298
299
300 IndexFFMPEGMarkerFiles::IndexFFMPEGMarkerFiles(InterfacePrefs *iface_prefs, int x, int y)
301  : BC_CheckBox(x, y,
302         iface_prefs->pwindow->thread->preferences->ffmpeg_marker_indexes,
303         _("build ffmpeg marker indexes"))
304 {
305         this->iface_prefs = iface_prefs;
306 }
307 IndexFFMPEGMarkerFiles::~IndexFFMPEGMarkerFiles()
308 {
309 }
310
311 int IndexFFMPEGMarkerFiles::handle_event()
312 {
313         iface_prefs->pwindow->thread->preferences->ffmpeg_marker_indexes = get_value();
314         return 1;
315 }
316
317
318 ViewBehaviourText::ViewBehaviourText(int x, int y, const char *text, PreferencesWindow *pwindow,
319         int *output)
320  : BC_PopupMenu(x, y, 200, text)
321 {
322         this->output = output;
323 }
324
325 ViewBehaviourText::~ViewBehaviourText()
326 {
327 }
328
329 int ViewBehaviourText::handle_event()
330 {
331         return 0;
332 }
333
334 void ViewBehaviourText::create_objects()
335 {
336         add_item(new ViewBehaviourItem(this, _(MOVE_ALL_EDITS_TITLE), MOVE_ALL_EDITS));
337         add_item(new ViewBehaviourItem(this, _(MOVE_ONE_EDIT_TITLE), MOVE_ONE_EDIT));
338         add_item(new ViewBehaviourItem(this, _(MOVE_NO_EDITS_TITLE), MOVE_NO_EDITS));
339         add_item(new ViewBehaviourItem(this, _(MOVE_EDITS_DISABLED_TITLE), MOVE_EDITS_DISABLED));
340 }
341
342
343 ViewBehaviourItem::ViewBehaviourItem(ViewBehaviourText *popup, char *text, int behaviour)
344  : BC_MenuItem(text)
345 {
346         this->popup = popup;
347         this->behaviour = behaviour;
348 }
349
350 ViewBehaviourItem::~ViewBehaviourItem()
351 {
352 }
353
354 int ViewBehaviourItem::handle_event()
355 {
356         popup->set_text(get_text());
357         *(popup->output) = behaviour;
358         return 1;
359 }
360
361
362 MeterMinDB::MeterMinDB(PreferencesWindow *pwindow, char *text, int x, int y)
363  : BC_TextBox(x, y, 50, 1, text)
364 {
365         this->pwindow = pwindow;
366 }
367
368 int MeterMinDB::handle_event()
369 {
370         pwindow->thread->redraw_meters = 1;
371         pwindow->thread->edl->session->min_meter_db = atol(get_text());
372         return 0;
373 }
374
375
376 MeterMaxDB::MeterMaxDB(PreferencesWindow *pwindow, char *text, int x, int y)
377  : BC_TextBox(x, y, 50, 1, text)
378 {
379         this->pwindow = pwindow;
380 }
381
382 int MeterMaxDB::handle_event()
383 {
384         pwindow->thread->redraw_meters = 1;
385         pwindow->thread->edl->session->max_meter_db = atol(get_text());
386         return 0;
387 }
388
389
390 ScanCommercials::ScanCommercials(PreferencesWindow *pwindow, int x, int y)
391  : BC_CheckBox(x,
392         y,
393         pwindow->thread->preferences->scan_commercials,
394         _("Scan for commercials during toc build"))
395 {
396         this->pwindow = pwindow;
397 }
398 int ScanCommercials::handle_event()
399 {
400         pwindow->thread->preferences->scan_commercials = get_value();
401         return 1;
402 }
403
404
405 AndroidRemote::AndroidRemote(PreferencesWindow *pwindow, int x, int y)
406  : BC_CheckBox(x, y,
407         pwindow->thread->preferences->android_remote,
408         _("Android Remote Control"))
409 {
410         this->pwindow = pwindow;
411 }
412 int AndroidRemote::handle_event()
413 {
414         pwindow->thread->preferences->android_remote = get_value();
415         return 1;
416 }
417
418 AndroidPIN::AndroidPIN(PreferencesWindow *pwindow, int x, int y)
419  : BC_TextBox(x, y, 240, 1, pwindow->thread->preferences->android_pin)
420 {
421         this->pwindow = pwindow;
422 }
423
424 int AndroidPIN::handle_event()
425 {
426         char *txt = pwindow->thread->preferences->android_pin;
427         int len = sizeof(pwindow->thread->preferences->android_pin);
428         strncpy(txt, get_text(), len);
429         return 1;
430 }
431
432
433 AndroidPort::AndroidPort(PreferencesWindow *pwindow, int x, int y)
434  : BC_TextBox(x, y, 72, 1, pwindow->thread->preferences->android_port)
435 {
436         this->pwindow = pwindow;
437 }
438
439 int AndroidPort::handle_event()
440 {
441         unsigned short port = atoi(get_text());
442         if( port < 1024 ) port = 1024;
443         pwindow->thread->preferences->android_port = port;
444         char str[BCSTRLEN];
445         sprintf(str,"%u",port);
446         update(str);
447         return 1;
448 }
449
450 int InterfacePrefs::start_shbtn_dialog()
451 {
452         if( !shbtn_dialog )
453                 shbtn_dialog = new ShBtnEditDialog(pwindow);
454         shbtn_dialog->start();
455         return 1;
456 }
457
458 ShBtnPrefs::ShBtnPrefs(PreferencesWindow *pwindow, InterfacePrefs *iface_prefs, int x, int y)
459  : BC_GenericButton(x, y, _("Shell Commands"))
460 {
461         this->pwindow = pwindow;
462         this->iface_prefs = iface_prefs;
463         set_tooltip(_("Main Menu Shell Commands"));
464 }
465
466 int ShBtnPrefs::handle_event()
467 {
468         return iface_prefs->start_shbtn_dialog();
469 }
470
471
472 StillImageUseDuration::StillImageUseDuration(PreferencesWindow *pwindow, int value, int x, int y)
473  : BC_CheckBox(x, y, value, _("Import images with a duration of"))
474 {
475         this->pwindow = pwindow;
476 }
477
478 int StillImageUseDuration::handle_event()
479 {
480         pwindow->thread->edl->session->si_useduration = get_value();
481         return 1;
482 }
483
484 StillImageDuration::StillImageDuration(PreferencesWindow *pwindow, int x, int y)
485  : BC_TextBox(x, y, 70, 1, pwindow->thread->edl->session->si_duration)
486 {
487         this->pwindow = pwindow;
488 }
489 int StillImageDuration::handle_event()
490 {
491         pwindow->thread->edl->session->si_duration = atof(get_text());
492         return 1;
493 }
494
495
496 HairlineItem::HairlineItem(KeyframeReticle *popup, int hairline)
497  : BC_MenuItem(popup->hairline_to_string(hairline))
498 {
499         this->popup = popup;
500         this->hairline = hairline;
501 }
502
503 HairlineItem::~HairlineItem()
504 {
505 }
506
507 int HairlineItem::handle_event()
508 {
509         popup->pwindow->thread->redraw_overlays = 1;
510         popup->set_text(get_text());
511         *(popup->output) = hairline;
512         return 1;
513 }
514
515
516 KeyframeReticle::KeyframeReticle(PreferencesWindow *pwindow,
517         InterfacePrefs *iface_prefs, int x, int y, int *output)
518  : BC_PopupMenu(x, y, 220, hairline_to_string(*output))
519 {
520         this->pwindow = pwindow;
521         this->iface_prefs = iface_prefs;
522         this->output = output;
523 }
524
525 KeyframeReticle::~KeyframeReticle()
526 {
527 }
528
529 const char *KeyframeReticle::hairline_to_string(int type)
530 {
531         switch( type ) {
532         case HAIRLINE_NEVER:    return _("Never");
533         case HAIRLINE_DRAGGING: return _("Dragging");
534         case HAIRLINE_ALWAYS:   return _("Always");
535         }
536         return _("Unknown");
537 }
538
539 void KeyframeReticle::create_objects()
540 {
541         add_item(new HairlineItem(this, HAIRLINE_NEVER));
542         add_item(new HairlineItem(this, HAIRLINE_DRAGGING));
543         add_item(new HairlineItem(this, HAIRLINE_ALWAYS));
544 }
545
546 PrefsTrapSigSEGV::PrefsTrapSigSEGV(InterfacePrefs *subwindow, int x, int y)
547  : BC_CheckBox(x, y,
548         subwindow->pwindow->thread->preferences->trap_sigsegv,
549         _("trap sigSEGV"))
550 {
551         this->subwindow = subwindow;
552 }
553 PrefsTrapSigSEGV::~PrefsTrapSigSEGV()
554 {
555 }
556 int PrefsTrapSigSEGV::handle_event()
557 {
558         subwindow->pwindow->thread->preferences->trap_sigsegv = get_value();
559         return 1;
560 }
561
562 PrefsTrapSigINTR::PrefsTrapSigINTR(InterfacePrefs *subwindow, int x, int y)
563  : BC_CheckBox(x, y,
564         subwindow->pwindow->thread->preferences->trap_sigintr,
565         _("trap sigINT"))
566 {
567         this->subwindow = subwindow;
568 }
569 PrefsTrapSigINTR::~PrefsTrapSigINTR()
570 {
571 }
572 int PrefsTrapSigINTR::handle_event()
573 {
574         subwindow->pwindow->thread->preferences->trap_sigintr = get_value();
575         return 1;
576 }
577
578
579 void InterfacePrefs::start_probe_dialog()
580 {
581         if( !file_probe_dialog )
582                 file_probe_dialog = new FileProbeDialog(pwindow);
583         file_probe_dialog->start();
584 }
585
586 PrefsFileProbes::PrefsFileProbes(PreferencesWindow *pwindow,
587                 InterfacePrefs *subwindow, int x, int y)
588  : BC_GenericButton(x, y, _("Probe Order"))
589 {
590         this->pwindow = pwindow;
591         this->subwindow = subwindow;
592         set_tooltip(_("File Open Probe Ordering"));
593 }
594
595 int PrefsFileProbes::handle_event()
596 {
597         subwindow->start_probe_dialog();
598         return 1;
599 }
600
601
602 PrefsYUV420P_DVDlace::PrefsYUV420P_DVDlace(PreferencesWindow *pwindow,
603         InterfacePrefs *subwindow, int x, int y)
604  : BC_CheckBox(x, y, pwindow->thread->preferences->dvd_yuv420p_interlace,
605         _("Use yuv420p dvd interlace format"))
606 {
607         this->pwindow = pwindow;
608         this->subwindow = subwindow;
609 }
610
611 int PrefsYUV420P_DVDlace::handle_event()
612 {
613         pwindow->thread->preferences->dvd_yuv420p_interlace = get_value();
614         return 1;
615 }
616
617
618 SnapshotPathText::SnapshotPathText(PreferencesWindow *pwindow,
619         InterfacePrefs *subwindow, int x, int y, int w)
620  : BC_TextBox(x, y, w, 1, pwindow->thread->preferences->snapshot_path)
621 {
622         this->pwindow = pwindow;
623         this->subwindow = subwindow;
624 }
625
626 SnapshotPathText::~SnapshotPathText()
627 {
628 }
629
630 int SnapshotPathText::handle_event()
631 {
632         strcpy(pwindow->thread->preferences->snapshot_path, get_text());
633         return 1;
634 }
635
636 PrefsAutostartLV2UI::PrefsAutostartLV2UI(int x, int y, PreferencesWindow *pwindow)
637  : BC_CheckBox(x, y,
638         pwindow->thread->preferences->autostart_lv2ui, _("Auto start lv2 gui"))
639 {
640         this->pwindow = pwindow;
641 }
642 int PrefsAutostartLV2UI::handle_event()
643 {
644         pwindow->thread->preferences->autostart_lv2ui = get_value();
645         return 1;
646 }
647
648 PrefsLV2PathText::PrefsLV2PathText(PreferencesWindow *pwindow,
649         InterfacePrefs *subwindow, int x, int y, int w)
650  : BC_TextBox(x, y, w, 1, pwindow->thread->preferences->lv2_path)
651 {
652         this->pwindow = pwindow;
653         this->subwindow = subwindow;
654 }
655
656 PrefsLV2PathText::~PrefsLV2PathText()
657 {
658 }
659
660 int PrefsLV2PathText::handle_event()
661 {
662         strcpy(pwindow->thread->preferences->lv2_path, get_text());
663         return 1;
664 }
665