lock xft, plugin index builder lock, clear clip thumbnails, clear vwin clock, setpoin...
[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(del_indexes = new DeleteAllIndexes(mwindow, pwindow, 400, y,
230                 _("Delete existing indexes"), "[*.idx][*.toc][*.mkr]"));
231         y += 30;
232         add_subwindow(ffmpeg_marker_files = new IndexFFMPEGMarkerFiles(this, x, y));
233         add_subwindow(del_clipngs = new DeleteAllIndexes(mwindow, pwindow, 400, y,
234                 _("Delete clip thumbnails"), "clip_*.png"));
235 }
236
237 const char* InterfacePrefs::behavior_to_text(int mode)
238 {
239         switch(mode) {
240                 case MOVE_ALL_EDITS: return _(MOVE_ALL_EDITS_TITLE);
241                 case MOVE_ONE_EDIT:  return _(MOVE_ONE_EDIT_TITLE);
242                 case MOVE_NO_EDITS:  return _(MOVE_NO_EDITS_TITLE);
243                 case MOVE_EDITS_DISABLED: return _(MOVE_EDITS_DISABLED_TITLE);
244                 default: return "";
245         }
246 }
247
248 IndexPathText::IndexPathText(int x, int y, PreferencesWindow *pwindow, char *text)
249  : BC_TextBox(x, y, 240, 1, text)
250 {
251         this->pwindow = pwindow;
252 }
253
254 IndexPathText::~IndexPathText() {}
255
256 int IndexPathText::handle_event()
257 {
258         strcpy(pwindow->thread->preferences->index_directory, get_text());
259         return 1;
260 }
261
262
263
264
265 IndexSize::IndexSize(int x, int y, PreferencesWindow *pwindow, char *text)
266  : BC_TextBox(x, y, 100, 1, text)
267 {
268         this->pwindow = pwindow;
269 }
270
271 int IndexSize::handle_event()
272 {
273         long result;
274
275         result = atol(get_text());
276         if(result < 64000) result = 64000;
277         //if(result < 500000) result = 500000;
278         pwindow->thread->preferences->index_size = result;
279         return 0;
280 }
281
282
283
284 IndexCount::IndexCount(int x, int y, PreferencesWindow *pwindow, char *text)
285  : BC_TextBox(x, y, 100, 1, text)
286 {
287         this->pwindow = pwindow;
288 }
289
290 int IndexCount::handle_event()
291 {
292         long result;
293
294         result = atol(get_text());
295         if(result < 1) result = 1;
296         pwindow->thread->preferences->index_count = result;
297         return 0;
298 }
299
300
301
302 IndexFFMPEGMarkerFiles::IndexFFMPEGMarkerFiles(InterfacePrefs *iface_prefs, int x, int y)
303  : BC_CheckBox(x, y,
304         iface_prefs->pwindow->thread->preferences->ffmpeg_marker_indexes,
305         _("build ffmpeg marker indexes"))
306 {
307         this->iface_prefs = iface_prefs;
308 }
309 IndexFFMPEGMarkerFiles::~IndexFFMPEGMarkerFiles()
310 {
311 }
312
313 int IndexFFMPEGMarkerFiles::handle_event()
314 {
315         iface_prefs->pwindow->thread->preferences->ffmpeg_marker_indexes = get_value();
316         return 1;
317 }
318
319
320 ViewBehaviourText::ViewBehaviourText(int x, int y, const char *text, PreferencesWindow *pwindow,
321         int *output)
322  : BC_PopupMenu(x, y, 200, text)
323 {
324         this->output = output;
325 }
326
327 ViewBehaviourText::~ViewBehaviourText()
328 {
329 }
330
331 int ViewBehaviourText::handle_event()
332 {
333         return 0;
334 }
335
336 void ViewBehaviourText::create_objects()
337 {
338         add_item(new ViewBehaviourItem(this, _(MOVE_ALL_EDITS_TITLE), MOVE_ALL_EDITS));
339         add_item(new ViewBehaviourItem(this, _(MOVE_ONE_EDIT_TITLE), MOVE_ONE_EDIT));
340         add_item(new ViewBehaviourItem(this, _(MOVE_NO_EDITS_TITLE), MOVE_NO_EDITS));
341         add_item(new ViewBehaviourItem(this, _(MOVE_EDITS_DISABLED_TITLE), MOVE_EDITS_DISABLED));
342 }
343
344
345 ViewBehaviourItem::ViewBehaviourItem(ViewBehaviourText *popup, char *text, int behaviour)
346  : BC_MenuItem(text)
347 {
348         this->popup = popup;
349         this->behaviour = behaviour;
350 }
351
352 ViewBehaviourItem::~ViewBehaviourItem()
353 {
354 }
355
356 int ViewBehaviourItem::handle_event()
357 {
358         popup->set_text(get_text());
359         *(popup->output) = behaviour;
360         return 1;
361 }
362
363
364 MeterMinDB::MeterMinDB(PreferencesWindow *pwindow, char *text, int x, int y)
365  : BC_TextBox(x, y, 50, 1, text)
366 {
367         this->pwindow = pwindow;
368 }
369
370 int MeterMinDB::handle_event()
371 {
372         pwindow->thread->redraw_meters = 1;
373         pwindow->thread->edl->session->min_meter_db = atol(get_text());
374         return 0;
375 }
376
377
378 MeterMaxDB::MeterMaxDB(PreferencesWindow *pwindow, char *text, int x, int y)
379  : BC_TextBox(x, y, 50, 1, text)
380 {
381         this->pwindow = pwindow;
382 }
383
384 int MeterMaxDB::handle_event()
385 {
386         pwindow->thread->redraw_meters = 1;
387         pwindow->thread->edl->session->max_meter_db = atol(get_text());
388         return 0;
389 }
390
391
392 ScanCommercials::ScanCommercials(PreferencesWindow *pwindow, int x, int y)
393  : BC_CheckBox(x,
394         y,
395         pwindow->thread->preferences->scan_commercials,
396         _("Scan for commercials during toc build"))
397 {
398         this->pwindow = pwindow;
399 }
400 int ScanCommercials::handle_event()
401 {
402         pwindow->thread->preferences->scan_commercials = get_value();
403         return 1;
404 }
405
406
407 AndroidRemote::AndroidRemote(PreferencesWindow *pwindow, int x, int y)
408  : BC_CheckBox(x, y,
409         pwindow->thread->preferences->android_remote,
410         _("Android Remote Control"))
411 {
412         this->pwindow = pwindow;
413 }
414 int AndroidRemote::handle_event()
415 {
416         pwindow->thread->preferences->android_remote = get_value();
417         return 1;
418 }
419
420 AndroidPIN::AndroidPIN(PreferencesWindow *pwindow, int x, int y)
421  : BC_TextBox(x, y, 240, 1, pwindow->thread->preferences->android_pin)
422 {
423         this->pwindow = pwindow;
424 }
425
426 int AndroidPIN::handle_event()
427 {
428         char *txt = pwindow->thread->preferences->android_pin;
429         int len = sizeof(pwindow->thread->preferences->android_pin);
430         strncpy(txt, get_text(), len);
431         return 1;
432 }
433
434
435 AndroidPort::AndroidPort(PreferencesWindow *pwindow, int x, int y)
436  : BC_TextBox(x, y, 72, 1, pwindow->thread->preferences->android_port)
437 {
438         this->pwindow = pwindow;
439 }
440
441 int AndroidPort::handle_event()
442 {
443         unsigned short port = atoi(get_text());
444         if( port < 1024 ) port = 1024;
445         pwindow->thread->preferences->android_port = port;
446         char str[BCSTRLEN];
447         sprintf(str,"%u",port);
448         update(str);
449         return 1;
450 }
451
452 int InterfacePrefs::start_shbtn_dialog()
453 {
454         if( !shbtn_dialog )
455                 shbtn_dialog = new ShBtnEditDialog(pwindow);
456         shbtn_dialog->start();
457         return 1;
458 }
459
460 ShBtnPrefs::ShBtnPrefs(PreferencesWindow *pwindow, InterfacePrefs *iface_prefs, int x, int y)
461  : BC_GenericButton(x, y, _("Shell Commands"))
462 {
463         this->pwindow = pwindow;
464         this->iface_prefs = iface_prefs;
465         set_tooltip(_("Main Menu Shell Commands"));
466 }
467
468 int ShBtnPrefs::handle_event()
469 {
470         return iface_prefs->start_shbtn_dialog();
471 }
472
473
474 StillImageUseDuration::StillImageUseDuration(PreferencesWindow *pwindow, int value, int x, int y)
475  : BC_CheckBox(x, y, value, _("Import images with a duration of"))
476 {
477         this->pwindow = pwindow;
478 }
479
480 int StillImageUseDuration::handle_event()
481 {
482         pwindow->thread->edl->session->si_useduration = get_value();
483         return 1;
484 }
485
486 StillImageDuration::StillImageDuration(PreferencesWindow *pwindow, int x, int y)
487  : BC_TextBox(x, y, 70, 1, pwindow->thread->edl->session->si_duration)
488 {
489         this->pwindow = pwindow;
490 }
491 int StillImageDuration::handle_event()
492 {
493         pwindow->thread->edl->session->si_duration = atof(get_text());
494         return 1;
495 }
496
497
498 HairlineItem::HairlineItem(KeyframeReticle *popup, int hairline)
499  : BC_MenuItem(popup->hairline_to_string(hairline))
500 {
501         this->popup = popup;
502         this->hairline = hairline;
503 }
504
505 HairlineItem::~HairlineItem()
506 {
507 }
508
509 int HairlineItem::handle_event()
510 {
511         popup->pwindow->thread->redraw_overlays = 1;
512         popup->set_text(get_text());
513         *(popup->output) = hairline;
514         return 1;
515 }
516
517
518 KeyframeReticle::KeyframeReticle(PreferencesWindow *pwindow,
519         InterfacePrefs *iface_prefs, int x, int y, int *output)
520  : BC_PopupMenu(x, y, 220, hairline_to_string(*output))
521 {
522         this->pwindow = pwindow;
523         this->iface_prefs = iface_prefs;
524         this->output = output;
525 }
526
527 KeyframeReticle::~KeyframeReticle()
528 {
529 }
530
531 const char *KeyframeReticle::hairline_to_string(int type)
532 {
533         switch( type ) {
534         case HAIRLINE_NEVER:    return _("Never");
535         case HAIRLINE_DRAGGING: return _("Dragging");
536         case HAIRLINE_ALWAYS:   return _("Always");
537         }
538         return _("Unknown");
539 }
540
541 void KeyframeReticle::create_objects()
542 {
543         add_item(new HairlineItem(this, HAIRLINE_NEVER));
544         add_item(new HairlineItem(this, HAIRLINE_DRAGGING));
545         add_item(new HairlineItem(this, HAIRLINE_ALWAYS));
546 }
547
548 PrefsTrapSigSEGV::PrefsTrapSigSEGV(InterfacePrefs *subwindow, int x, int y)
549  : BC_CheckBox(x, y,
550         subwindow->pwindow->thread->preferences->trap_sigsegv,
551         _("trap sigSEGV"))
552 {
553         this->subwindow = subwindow;
554 }
555 PrefsTrapSigSEGV::~PrefsTrapSigSEGV()
556 {
557 }
558 int PrefsTrapSigSEGV::handle_event()
559 {
560         subwindow->pwindow->thread->preferences->trap_sigsegv = get_value();
561         return 1;
562 }
563
564 PrefsTrapSigINTR::PrefsTrapSigINTR(InterfacePrefs *subwindow, int x, int y)
565  : BC_CheckBox(x, y,
566         subwindow->pwindow->thread->preferences->trap_sigintr,
567         _("trap sigINT"))
568 {
569         this->subwindow = subwindow;
570 }
571 PrefsTrapSigINTR::~PrefsTrapSigINTR()
572 {
573 }
574 int PrefsTrapSigINTR::handle_event()
575 {
576         subwindow->pwindow->thread->preferences->trap_sigintr = get_value();
577         return 1;
578 }
579
580
581 void InterfacePrefs::start_probe_dialog()
582 {
583         if( !file_probe_dialog )
584                 file_probe_dialog = new FileProbeDialog(pwindow);
585         file_probe_dialog->start();
586 }
587
588 PrefsFileProbes::PrefsFileProbes(PreferencesWindow *pwindow,
589                 InterfacePrefs *subwindow, int x, int y)
590  : BC_GenericButton(x, y, _("Probe Order"))
591 {
592         this->pwindow = pwindow;
593         this->subwindow = subwindow;
594         set_tooltip(_("File Open Probe Ordering"));
595 }
596
597 int PrefsFileProbes::handle_event()
598 {
599         subwindow->start_probe_dialog();
600         return 1;
601 }
602
603
604 PrefsYUV420P_DVDlace::PrefsYUV420P_DVDlace(PreferencesWindow *pwindow,
605         InterfacePrefs *subwindow, int x, int y)
606  : BC_CheckBox(x, y, pwindow->thread->preferences->dvd_yuv420p_interlace,
607         _("Use yuv420p dvd interlace format"))
608 {
609         this->pwindow = pwindow;
610         this->subwindow = subwindow;
611 }
612
613 int PrefsYUV420P_DVDlace::handle_event()
614 {
615         pwindow->thread->preferences->dvd_yuv420p_interlace = get_value();
616         return 1;
617 }
618
619
620 SnapshotPathText::SnapshotPathText(PreferencesWindow *pwindow,
621         InterfacePrefs *subwindow, int x, int y, int w)
622  : BC_TextBox(x, y, w, 1, pwindow->thread->preferences->snapshot_path)
623 {
624         this->pwindow = pwindow;
625         this->subwindow = subwindow;
626 }
627
628 SnapshotPathText::~SnapshotPathText()
629 {
630 }
631
632 int SnapshotPathText::handle_event()
633 {
634         strcpy(pwindow->thread->preferences->snapshot_path, get_text());
635         return 1;
636 }
637
638 PrefsAutostartLV2UI::PrefsAutostartLV2UI(int x, int y, PreferencesWindow *pwindow)
639  : BC_CheckBox(x, y,
640         pwindow->thread->preferences->autostart_lv2ui, _("Auto start lv2 gui"))
641 {
642         this->pwindow = pwindow;
643 }
644 int PrefsAutostartLV2UI::handle_event()
645 {
646         pwindow->thread->preferences->autostart_lv2ui = get_value();
647         return 1;
648 }
649
650 PrefsLV2PathText::PrefsLV2PathText(PreferencesWindow *pwindow,
651         InterfacePrefs *subwindow, int x, int y, int w)
652  : BC_TextBox(x, y, w, 1, pwindow->thread->preferences->lv2_path)
653 {
654         this->pwindow = pwindow;
655         this->subwindow = subwindow;
656 }
657
658 PrefsLV2PathText::~PrefsLV2PathText()
659 {
660 }
661
662 int PrefsLV2PathText::handle_event()
663 {
664         strcpy(pwindow->thread->preferences->lv2_path, get_text());
665         return 1;
666 }
667