gif rework, C41 booby fix, add ext+s for list seq, features5
[goodguy/cinelerra.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 #define MOVE_RIPPLE_TITLE N_("All Edits (ripple)")
37 #define MOVE_ROLL_TITLE   N_("One Edit  (roll)")
38 #define MOVE_SLIP_TITLE   N_("Src Only  (slip)")
39 #define MOVE_SLIDE_TITLE  N_("Move Edit (slide)")
40 #define MOVE_EDGE_TITLE   N_("Drag Edge (edge)")
41 #define MOVE_EDITS_DISABLED_TITLE N_("No effect")
42
43
44 InterfacePrefs::InterfacePrefs(MWindow *mwindow, PreferencesWindow *pwindow)
45  : PreferencesDialog(mwindow, pwindow)
46 {
47         min_db = 0;
48         max_db = 0;
49         shbtn_dialog = 0;
50         file_probe_dialog = 0;
51 }
52
53 InterfacePrefs::~InterfacePrefs()
54 {
55         delete min_db;
56         delete max_db;
57         delete shbtn_dialog;
58         delete file_probe_dialog;
59 }
60
61
62 void InterfacePrefs::create_objects()
63 {
64         BC_Resources *resources = BC_WindowBase::get_resources();
65         int margin = mwindow->theme->widget_border;
66         char string[BCTEXTLEN];
67         int x0 = mwindow->theme->preferencesoptions_x;
68         int y0 = mwindow->theme->preferencesoptions_y;
69         int x = x0, y = y0;
70
71         add_subwindow(new BC_Title(x, y, _("Editing:"), LARGEFONT,
72                 resources->text_default));
73         y += 35;
74
75         int x2 = get_w()/2, y2 = y;
76         x = x2;
77         BC_Title *title;
78         add_subwindow(title = new BC_Title(x, y, _("Keyframe reticle:")));
79         y += title->get_h() + 5;
80         keyframe_reticle = new KeyframeReticle(pwindow, this, x, y,
81                 &pwindow->thread->preferences->keyframe_reticle);
82         add_subwindow(keyframe_reticle);
83         keyframe_reticle->create_objects();
84
85         y += 30;
86         add_subwindow(title = new BC_Title(x, y, _("Snapshot path:")));
87         y += title->get_h() + 5;
88         add_subwindow(snapshot_path = new SnapshotPathText(pwindow, this, x, y, get_w()-x-30));
89
90         x = x0;  y = y2;
91         add_subwindow(title = new BC_Title(x, y, _("Clicking on edit boundaries does what:")));
92         y += title->get_h() + 10;
93         add_subwindow(new BC_Title(x, y, _("Button 1:")));
94         int x1 = x + 100;
95
96         ViewBehaviourText *text;
97         add_subwindow(text = new ViewBehaviourText(x1, y - 5,
98                 behavior_to_text(pwindow->thread->edl->session->edit_handle_mode[0]),
99                         pwindow,
100                         &(pwindow->thread->edl->session->edit_handle_mode[0])));
101         text->create_objects();
102         y += 30;
103         add_subwindow(new BC_Title(x, y, _("Button 2:")));
104         add_subwindow(text = new ViewBehaviourText(x1,
105                 y - 5,
106                 behavior_to_text(pwindow->thread->edl->session->edit_handle_mode[1]),
107                         pwindow,
108                         &(pwindow->thread->edl->session->edit_handle_mode[1])));
109         text->create_objects();
110         y += 30;
111         add_subwindow(new BC_Title(x, y, _("Button 3:")));
112         add_subwindow(text = new ViewBehaviourText(x1, y - 5,
113                 behavior_to_text(pwindow->thread->edl->session->edit_handle_mode[2]),
114                         pwindow,
115                         &(pwindow->thread->edl->session->edit_handle_mode[2])));
116         text->create_objects();
117         y += text->get_h() + 30;
118
119         x = x0;
120         add_subwindow(new BC_Bar(5, y,  get_w() - 10));
121         y += 5;
122         add_subwindow(new BC_Title(x, y, _("Operation:"), LARGEFONT,
123                 resources->text_default));
124
125         int y1 = y;
126         y += 15;
127
128         AndroidRemote *android_remote = new AndroidRemote(pwindow, x2, y);
129         add_subwindow(android_remote);
130         y += android_remote->get_h() + 10;
131         add_subwindow(title = new BC_Title(x2, y, _("Port:")));
132         int x3 = x2 + title->get_w() + margin;
133         AndroidPort *android_port = new AndroidPort(pwindow, x3, y);
134         add_subwindow(android_port);
135         y += title->get_h() + 10;
136         add_subwindow(title = new BC_Title(x2, y, _("PIN:")));
137         AndroidPIN *android_pin = new AndroidPIN(pwindow, x3, y);
138         add_subwindow(android_pin);
139         y += title->get_h() + 20;
140
141         ShBtnPrefs *shbtn_prefs = new ShBtnPrefs(pwindow, this, x2, y);
142         add_subwindow(shbtn_prefs);
143         y += shbtn_prefs->get_h() + 20;
144
145         add_subwindow(reload_plugins = new PrefsReloadPlugins(pwindow, this, x2, y));
146         y += reload_plugins->get_h() + 10;
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 + 35;
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() + 4;
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() + 4;
179         add_subwindow(title = new BC_Title(x1, y + 5, _("Max:")));
180         x1 += title->get_w() + 4;
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_RIPPLE: return _(MOVE_RIPPLE_TITLE);
241         case MOVE_ROLL: return _(MOVE_ROLL_TITLE);
242         case MOVE_SLIP: return _(MOVE_SLIP_TITLE);
243         case MOVE_SLIDE: return _(MOVE_SLIDE_TITLE);
244         case MOVE_EDGE: return _(MOVE_EDGE_TITLE);
245         case MOVE_EDITS_DISABLED: return _(MOVE_EDITS_DISABLED_TITLE);
246         }
247         return "";
248 }
249
250 IndexPathText::IndexPathText(int x, int y, PreferencesWindow *pwindow, char *text)
251  : BC_TextBox(x, y, 240, 1, text)
252 {
253         this->pwindow = pwindow;
254 }
255
256 IndexPathText::~IndexPathText() {}
257
258 int IndexPathText::handle_event()
259 {
260         strcpy(pwindow->thread->preferences->index_directory, get_text());
261         return 1;
262 }
263
264
265
266
267 IndexSize::IndexSize(int x, int y, PreferencesWindow *pwindow, char *text)
268  : BC_TextBox(x, y, 100, 1, text)
269 {
270         this->pwindow = pwindow;
271 }
272
273 int IndexSize::handle_event()
274 {
275         long result;
276
277         result = atol(get_text());
278         if(result < 64000) result = 64000;
279         //if(result < 500000) result = 500000;
280         pwindow->thread->preferences->index_size = result;
281         return 0;
282 }
283
284
285
286 IndexCount::IndexCount(int x, int y, PreferencesWindow *pwindow, char *text)
287  : BC_TextBox(x, y, 100, 1, text)
288 {
289         this->pwindow = pwindow;
290 }
291
292 int IndexCount::handle_event()
293 {
294         long result;
295
296         result = atol(get_text());
297         if(result < 1) result = 1;
298         pwindow->thread->preferences->index_count = result;
299         return 0;
300 }
301
302
303
304 IndexFFMPEGMarkerFiles::IndexFFMPEGMarkerFiles(InterfacePrefs *iface_prefs, int x, int y)
305  : BC_CheckBox(x, y,
306         iface_prefs->pwindow->thread->preferences->ffmpeg_marker_indexes,
307         _("build ffmpeg marker indexes"))
308 {
309         this->iface_prefs = iface_prefs;
310 }
311 IndexFFMPEGMarkerFiles::~IndexFFMPEGMarkerFiles()
312 {
313 }
314
315 int IndexFFMPEGMarkerFiles::handle_event()
316 {
317         iface_prefs->pwindow->thread->preferences->ffmpeg_marker_indexes = get_value();
318         return 1;
319 }
320
321
322 ViewBehaviourText::ViewBehaviourText(int x, int y, const char *text, PreferencesWindow *pwindow,
323         int *output)
324  : BC_PopupMenu(x, y, 250, text)
325 {
326         this->output = output;
327 }
328
329 ViewBehaviourText::~ViewBehaviourText()
330 {
331 }
332
333 int ViewBehaviourText::handle_event()
334 {
335         return 0;
336 }
337
338 void ViewBehaviourText::create_objects()
339 {
340         for( int mode=0; mode<=EDIT_HANDLE_MODES; ++mode )
341                 add_item(new ViewBehaviourItem(this,
342                         InterfacePrefs::behavior_to_text(mode), mode));
343 }
344
345
346 ViewBehaviourItem::ViewBehaviourItem(ViewBehaviourText *popup,
347                 const char *text, int behaviour)
348  : BC_MenuItem(text)
349 {
350         this->popup = popup;
351         this->behaviour = behaviour;
352 }
353
354 ViewBehaviourItem::~ViewBehaviourItem()
355 {
356 }
357
358 int ViewBehaviourItem::handle_event()
359 {
360         popup->set_text(get_text());
361         *(popup->output) = behaviour;
362         return 1;
363 }
364
365
366 MeterMinDB::MeterMinDB(PreferencesWindow *pwindow, char *text, int x, int y)
367  : BC_TextBox(x, y, 50, 1, text)
368 {
369         this->pwindow = pwindow;
370 }
371
372 int MeterMinDB::handle_event()
373 {
374         pwindow->thread->redraw_meters = 1;
375         pwindow->thread->edl->session->min_meter_db = atol(get_text());
376         return 0;
377 }
378
379
380 MeterMaxDB::MeterMaxDB(PreferencesWindow *pwindow, char *text, int x, int y)
381  : BC_TextBox(x, y, 50, 1, text)
382 {
383         this->pwindow = pwindow;
384 }
385
386 int MeterMaxDB::handle_event()
387 {
388         pwindow->thread->redraw_meters = 1;
389         pwindow->thread->edl->session->max_meter_db = atol(get_text());
390         return 0;
391 }
392
393
394 ScanCommercials::ScanCommercials(PreferencesWindow *pwindow, int x, int y)
395  : BC_CheckBox(x,
396         y,
397         pwindow->thread->preferences->scan_commercials,
398         _("Scan for commercials during toc build"))
399 {
400         this->pwindow = pwindow;
401 }
402 int ScanCommercials::handle_event()
403 {
404         pwindow->thread->preferences->scan_commercials = get_value();
405         return 1;
406 }
407
408
409 AndroidRemote::AndroidRemote(PreferencesWindow *pwindow, int x, int y)
410  : BC_CheckBox(x, y,
411         pwindow->thread->preferences->android_remote,
412         _("Android Remote Control"))
413 {
414         this->pwindow = pwindow;
415 }
416 int AndroidRemote::handle_event()
417 {
418         pwindow->thread->preferences->android_remote = get_value();
419         return 1;
420 }
421
422 AndroidPIN::AndroidPIN(PreferencesWindow *pwindow, int x, int y)
423  : BC_TextBox(x, y, 240, 1, pwindow->thread->preferences->android_pin)
424 {
425         this->pwindow = pwindow;
426 }
427
428 int AndroidPIN::handle_event()
429 {
430         char *txt = pwindow->thread->preferences->android_pin;
431         int len = sizeof(pwindow->thread->preferences->android_pin);
432         strncpy(txt, get_text(), len);
433         return 1;
434 }
435
436
437 AndroidPort::AndroidPort(PreferencesWindow *pwindow, int x, int y)
438  : BC_TextBox(x, y, 72, 1, pwindow->thread->preferences->android_port)
439 {
440         this->pwindow = pwindow;
441 }
442
443 int AndroidPort::handle_event()
444 {
445         unsigned short port = atoi(get_text());
446         if( port < 1024 ) port = 1024;
447         pwindow->thread->preferences->android_port = port;
448         char str[BCSTRLEN];
449         sprintf(str,"%u",port);
450         update(str);
451         return 1;
452 }
453
454 int InterfacePrefs::start_shbtn_dialog()
455 {
456         if( !shbtn_dialog )
457                 shbtn_dialog = new ShBtnEditDialog(pwindow);
458         shbtn_dialog->start();
459         return 1;
460 }
461
462 ShBtnPrefs::ShBtnPrefs(PreferencesWindow *pwindow, InterfacePrefs *iface_prefs, int x, int y)
463  : BC_GenericButton(x, y, _("Shell Commands"))
464 {
465         this->pwindow = pwindow;
466         this->iface_prefs = iface_prefs;
467         set_tooltip(_("Main Menu Shell Commands"));
468 }
469
470 int ShBtnPrefs::handle_event()
471 {
472         return iface_prefs->start_shbtn_dialog();
473 }
474
475
476 StillImageUseDuration::StillImageUseDuration(PreferencesWindow *pwindow, int value, int x, int y)
477  : BC_CheckBox(x, y, value, _("Import images with a duration of"))
478 {
479         this->pwindow = pwindow;
480 }
481
482 int StillImageUseDuration::handle_event()
483 {
484         pwindow->thread->edl->session->si_useduration = get_value();
485         return 1;
486 }
487
488 StillImageDuration::StillImageDuration(PreferencesWindow *pwindow, int x, int y)
489  : BC_TextBox(x, y, 70, 1, pwindow->thread->edl->session->si_duration)
490 {
491         this->pwindow = pwindow;
492 }
493 int StillImageDuration::handle_event()
494 {
495         pwindow->thread->edl->session->si_duration = atof(get_text());
496         return 1;
497 }
498
499
500 HairlineItem::HairlineItem(KeyframeReticle *popup, int hairline)
501  : BC_MenuItem(popup->hairline_to_string(hairline))
502 {
503         this->popup = popup;
504         this->hairline = hairline;
505 }
506
507 HairlineItem::~HairlineItem()
508 {
509 }
510
511 int HairlineItem::handle_event()
512 {
513         popup->pwindow->thread->redraw_overlays = 1;
514         popup->set_text(get_text());
515         *(popup->output) = hairline;
516         return 1;
517 }
518
519
520 KeyframeReticle::KeyframeReticle(PreferencesWindow *pwindow,
521         InterfacePrefs *iface_prefs, int x, int y, int *output)
522  : BC_PopupMenu(x, y, 220, hairline_to_string(*output))
523 {
524         this->pwindow = pwindow;
525         this->iface_prefs = iface_prefs;
526         this->output = output;
527 }
528
529 KeyframeReticle::~KeyframeReticle()
530 {
531 }
532
533 const char *KeyframeReticle::hairline_to_string(int type)
534 {
535         switch( type ) {
536         case HAIRLINE_NEVER:    return _("Never");
537         case HAIRLINE_DRAGGING: return _("Dragging");
538         case HAIRLINE_ALWAYS:   return _("Always");
539         }
540         return _("Unknown");
541 }
542
543 void KeyframeReticle::create_objects()
544 {
545         add_item(new HairlineItem(this, HAIRLINE_NEVER));
546         add_item(new HairlineItem(this, HAIRLINE_DRAGGING));
547         add_item(new HairlineItem(this, HAIRLINE_ALWAYS));
548 }
549
550 PrefsTrapSigSEGV::PrefsTrapSigSEGV(InterfacePrefs *subwindow, int x, int y)
551  : BC_CheckBox(x, y,
552         subwindow->pwindow->thread->preferences->trap_sigsegv,
553         _("trap sigSEGV"))
554 {
555         this->subwindow = subwindow;
556 }
557 PrefsTrapSigSEGV::~PrefsTrapSigSEGV()
558 {
559 }
560 int PrefsTrapSigSEGV::handle_event()
561 {
562         subwindow->pwindow->thread->preferences->trap_sigsegv = get_value();
563         return 1;
564 }
565
566 PrefsTrapSigINTR::PrefsTrapSigINTR(InterfacePrefs *subwindow, int x, int y)
567  : BC_CheckBox(x, y,
568         subwindow->pwindow->thread->preferences->trap_sigintr,
569         _("trap sigINT"))
570 {
571         this->subwindow = subwindow;
572 }
573 PrefsTrapSigINTR::~PrefsTrapSigINTR()
574 {
575 }
576 int PrefsTrapSigINTR::handle_event()
577 {
578         subwindow->pwindow->thread->preferences->trap_sigintr = get_value();
579         return 1;
580 }
581
582
583 void InterfacePrefs::start_probe_dialog()
584 {
585         if( !file_probe_dialog )
586                 file_probe_dialog = new FileProbeDialog(pwindow);
587         file_probe_dialog->start();
588 }
589
590 PrefsFileProbes::PrefsFileProbes(PreferencesWindow *pwindow,
591                 InterfacePrefs *subwindow, int x, int y)
592  : BC_GenericButton(x, y, _("Probe Order"))
593 {
594         this->pwindow = pwindow;
595         this->subwindow = subwindow;
596         set_tooltip(_("File Open Probe Ordering"));
597 }
598
599 int PrefsFileProbes::handle_event()
600 {
601         subwindow->start_probe_dialog();
602         return 1;
603 }
604
605
606 PrefsYUV420P_DVDlace::PrefsYUV420P_DVDlace(PreferencesWindow *pwindow,
607         InterfacePrefs *subwindow, int x, int y)
608  : BC_CheckBox(x, y, pwindow->thread->preferences->dvd_yuv420p_interlace,
609         _("Use yuv420p dvd interlace format"))
610 {
611         this->pwindow = pwindow;
612         this->subwindow = subwindow;
613 }
614
615 int PrefsYUV420P_DVDlace::handle_event()
616 {
617         pwindow->thread->preferences->dvd_yuv420p_interlace = get_value();
618         return 1;
619 }
620
621
622 SnapshotPathText::SnapshotPathText(PreferencesWindow *pwindow,
623         InterfacePrefs *subwindow, int x, int y, int w)
624  : BC_TextBox(x, y, w, 1, pwindow->thread->preferences->snapshot_path)
625 {
626         this->pwindow = pwindow;
627         this->subwindow = subwindow;
628 }
629
630 SnapshotPathText::~SnapshotPathText()
631 {
632 }
633
634 int SnapshotPathText::handle_event()
635 {
636         strcpy(pwindow->thread->preferences->snapshot_path, get_text());
637         return 1;
638 }
639
640 PrefsAutostartLV2UI::PrefsAutostartLV2UI(int x, int y, PreferencesWindow *pwindow)
641  : BC_CheckBox(x, y,
642         pwindow->thread->preferences->autostart_lv2ui, _("Auto start lv2 gui"))
643 {
644         this->pwindow = pwindow;
645 }
646 int PrefsAutostartLV2UI::handle_event()
647 {
648         pwindow->thread->preferences->autostart_lv2ui = get_value();
649         return 1;
650 }
651
652 PrefsReloadPlugins::PrefsReloadPlugins(PreferencesWindow *pwindow,
653         InterfacePrefs *iface_prefs, int x, int y)
654  : BC_GenericButton(x, y, _("Reload plugin index"))
655 {
656         this->pwindow = pwindow;
657         this->iface_prefs = iface_prefs;
658 }
659
660 int PrefsReloadPlugins::handle_event()
661 {
662         pwindow->thread->reload_plugins = 1;
663         text_color(get_resources()->button_highlighted);
664         draw_face(1);
665         return 1;
666 }
667
668 PrefsLV2PathText::PrefsLV2PathText(PreferencesWindow *pwindow,
669         InterfacePrefs *subwindow, int x, int y, int w)
670  : BC_TextBox(x, y, w, 1, pwindow->thread->preferences->lv2_path)
671 {
672         this->pwindow = pwindow;
673         this->subwindow = subwindow;
674 }
675
676 PrefsLV2PathText::~PrefsLV2PathText()
677 {
678 }
679
680 int PrefsLV2PathText::handle_event()
681 {
682         strcpy(pwindow->thread->preferences->lv2_path, get_text());
683         return 1;
684 }
685