4 * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
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.
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.
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
22 #include "deleteallindexes.h"
24 #include "edlsession.h"
26 #include "filesystem.h"
29 #include "preferences.h"
30 #include "preferencesthread.h"
31 #include "probeprefs.h"
32 #include "interfaceprefs.h"
33 #include "shbtnprefs.h"
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")
44 InterfacePrefs::InterfacePrefs(MWindow *mwindow, PreferencesWindow *pwindow)
45 : PreferencesDialog(mwindow, pwindow)
50 file_probe_dialog = 0;
51 // *** CONTEXT_HELP ***
52 context_help_set_keyword("Interface");
55 InterfacePrefs::~InterfacePrefs()
60 delete file_probe_dialog;
64 void InterfacePrefs::create_objects()
66 int xs4 = xS(4), xs5 = xS(5), xs10 = xS(10), xs30 = xS(30);
67 int ys5 = yS(5), ys10 = yS(10), ys30 = yS(30), ys35 = yS(35);
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;
76 add_subwindow(title = new BC_Title(x, y, _("Editing:"), LARGEFONT,
77 resources->text_default));
78 title->context_help_set_keyword("Editing section");
81 int x2 = get_w()/2, y2 = y;
83 add_subwindow(title = new BC_Title(x, y, _("Keyframe reticle:")));
84 title->context_help_set_keyword("Using Autos");
85 y += title->get_h() + ys5;
86 keyframe_reticle = new KeyframeReticle(pwindow, this, x, y,
87 &pwindow->thread->preferences->keyframe_reticle);
88 add_subwindow(keyframe_reticle);
89 keyframe_reticle->create_objects();
90 keyframe_reticle->context_help_set_keyword("Using Autos");
93 add_subwindow(title = new BC_Title(x, y, _("Snapshot path:")));
94 title->context_help_set_keyword("Snapshot \\/ Grabshot");
95 y += title->get_h() + ys5;
96 add_subwindow(snapshot_path = new SnapshotPathText(pwindow, this, x, y, get_w()-x-xs30));
97 snapshot_path->context_help_set_keyword("Snapshot \\/ Grabshot");
100 add_subwindow(title = new BC_Title(x, y, _("Clicking on edit boundaries does what:")));
101 title->context_help_set_keyword("Using the Drag Handle with Trim");
102 y += title->get_h() + ys10;
103 add_subwindow(title = new BC_Title(x, y, _("Button 1:")));
104 title->context_help_set_keyword("Using the Drag Handle with Trim");
105 int x1 = x + xS(100);
107 ViewBehaviourText *text;
108 add_subwindow(text = new ViewBehaviourText(x1, y - ys5,
109 behavior_to_text(pwindow->thread->edl->session->edit_handle_mode[0]),
111 &(pwindow->thread->edl->session->edit_handle_mode[0])));
112 text->create_objects();
113 text->context_help_set_keyword("Using the Drag Handle with Trim");
115 add_subwindow(title = new BC_Title(x, y, _("Button 2:")));
116 title->context_help_set_keyword("Using the Drag Handle with Trim");
117 add_subwindow(text = new ViewBehaviourText(x1,
119 behavior_to_text(pwindow->thread->edl->session->edit_handle_mode[1]),
121 &(pwindow->thread->edl->session->edit_handle_mode[1])));
122 text->create_objects();
123 text->context_help_set_keyword("Using the Drag Handle with Trim");
125 add_subwindow(title = new BC_Title(x, y, _("Button 3:")));
126 title->context_help_set_keyword("Using the Drag Handle with Trim");
127 add_subwindow(text = new ViewBehaviourText(x1, y - ys5,
128 behavior_to_text(pwindow->thread->edl->session->edit_handle_mode[2]),
130 &(pwindow->thread->edl->session->edit_handle_mode[2])));
131 text->create_objects();
132 text->context_help_set_keyword("Using the Drag Handle with Trim");
133 y += text->get_h() + ys30;
136 add_subwindow(new BC_Bar(xs5, y, get_w() - xs10));
138 add_subwindow(title = new BC_Title(x, y, _("Operation:"), LARGEFONT,
139 resources->text_default));
140 title->context_help_set_keyword("Operation section");
145 AndroidRemote *android_remote = new AndroidRemote(pwindow, x2, y);
146 add_subwindow(android_remote);
147 android_remote->context_help_set_keyword("Android Remote Control");
148 y += android_remote->get_h() + ys10;
150 add_subwindow(title = new BC_Title(x3, y, _("Port:")));
151 title->context_help_set_keyword("Android Remote Control");
152 x3 += title->get_w() + margin;
153 AndroidPort *android_port = new AndroidPort(pwindow, x3, y);
154 add_subwindow(android_port);
155 android_port->context_help_set_keyword("Android Remote Control");
156 x3 += android_port->get_w() + 2*margin;
157 add_subwindow(title = new BC_Title(x3, y, _("PIN:")));
158 title->context_help_set_keyword("Android Remote Control");
159 x3 += title->get_w() + margin;
160 AndroidPIN *android_pin = new AndroidPIN(pwindow, x3, y);
161 add_subwindow(android_pin);
162 android_pin->context_help_set_keyword("Android Remote Control");
163 y += android_port->get_h() + 3*margin;
165 ShBtnPrefs *shbtn_prefs = new ShBtnPrefs(pwindow, this, x2, y);
166 add_subwindow(shbtn_prefs);
167 shbtn_prefs->context_help_set_keyword("Menu Bar Shell Commands");
168 x3 = x2 + shbtn_prefs->get_w() + 2*margin;
169 add_subwindow(reload_plugins = new PrefsReloadPlugins(pwindow, this, x3, y));
170 reload_plugins->context_help_set_keyword("Operation section");
171 y += reload_plugins->get_h() + 3*margin;
173 add_subwindow(title = new BC_Title(x2, y, _("Nested Proxy Path:")));
174 title->context_help_set_keyword("Proxy");
175 y += title->get_h() + ys10;
176 PrefsNestedProxyPath *nested_proxy_path = new PrefsNestedProxyPath(pwindow, this,
177 x2, y, get_w()-x2-xs30);
178 add_subwindow(nested_proxy_path);
179 nested_proxy_path->context_help_set_keyword("Proxy");
182 add_subwindow(title = new BC_Title(x2, y, _("Default LV2_PATH:")));
183 title->context_help_set_keyword("Audio LV2 \\/ Calf Plugins");
184 y += title->get_h() + ys10;
185 PrefsLV2PathText *lv2_path_text = new PrefsLV2PathText(pwindow, this,
186 x2, y, get_w()-x2-xs30);
187 add_subwindow(lv2_path_text);
188 lv2_path_text->context_help_set_keyword("Audio LV2 \\/ Calf Plugins");
192 x = x0; y = y1 + ys35;
193 add_subwindow(file_probes = new PrefsFileProbes(pwindow, this, x, y));
194 file_probes->context_help_set_keyword("Probe Order when Loading Media");
197 PrefsTrapSigSEGV *trap_segv = new PrefsTrapSigSEGV(this, x, y);
198 add_subwindow(trap_segv);
199 trap_segv->context_help_set_keyword("Operation section");
200 x1 = x + trap_segv->get_w() + xs10;
201 add_subwindow(title = new BC_Title(x1, y, _("(must be root)"), MEDIUMFONT, RED));
202 title->context_help_set_keyword("Operation section");
205 PrefsTrapSigINTR *trap_intr = new PrefsTrapSigINTR(this, x, y);
206 add_subwindow(trap_intr);
207 trap_intr->context_help_set_keyword("Operation section");
208 add_subwindow(title = new BC_Title(x1, y, _("(must be root)"), MEDIUMFONT, RED));
209 title->context_help_set_keyword("Operation section");
212 yuv420p_dvdlace = new PrefsYUV420P_DVDlace(pwindow, this, x, y);
213 add_subwindow(yuv420p_dvdlace);
214 yuv420p_dvdlace->context_help_set_keyword("Dvd Interlaced Chroma");
217 add_subwindow(title = new BC_Title(x1=x, y + ys5, _("Min DB for meter:")));
218 title->context_help_set_keyword("Sound Level Meters Window");
219 x1 += title->get_w() + xs4;
220 sprintf(string, "%d", pwindow->thread->edl->session->min_meter_db);
221 add_subwindow(min_db = new MeterMinDB(pwindow, string, x1, y));
222 min_db->context_help_set_keyword("Sound Level Meters Window");
223 x1 += min_db->get_w() + xs4;
224 add_subwindow(title = new BC_Title(x1, y + ys5, _("Max:")));
225 title->context_help_set_keyword("Sound Level Meters Window");
226 x1 += title->get_w() + xs4;
227 sprintf(string, "%d", pwindow->thread->edl->session->max_meter_db);
228 add_subwindow(max_db = new MeterMaxDB(pwindow, string, x1, y));
229 max_db->context_help_set_keyword("Sound Level Meters Window");
232 StillImageUseDuration *use_stduration = new StillImageUseDuration(pwindow,
233 pwindow->thread->edl->session->si_useduration, x, y);
234 add_subwindow(use_stduration);
235 use_stduration->context_help_set_keyword("Working with Still Images");
236 x1 = x + use_stduration->get_w() + xs10;
237 StillImageDuration *stduration = new StillImageDuration(pwindow, x1, y);
238 add_subwindow(stduration);
239 stduration->context_help_set_keyword("Working with Still Images");
240 x1 += stduration->get_w() + xs10;
241 add_subwindow(title = new BC_Title(x1, y, _("Seconds")));
242 title->context_help_set_keyword("Working with Still Images");
245 PrefsAutostartLV2UI *autostart_lv2ui = new PrefsAutostartLV2UI(x, y,pwindow);
246 add_subwindow(autostart_lv2ui);
247 autostart_lv2ui->context_help_set_keyword("Audio LV2 \\/ Calf Plugins");
248 y += autostart_lv2ui->get_h() + ys10;
252 add_subwindow(new BC_Bar(xs5, y, get_w() - xs10));
255 add_subwindow(title = new BC_Title(x, y, _("Index files:"), LARGEFONT, resources->text_default));
256 title->context_help_set_keyword("Index Files section");
259 add_subwindow(title = new BC_Title(x, y + ys5,
260 _("Index files go here:"), MEDIUMFONT, resources->text_default));
261 title->context_help_set_keyword("Index Files section");
263 add_subwindow(ipathtext = new IndexPathText(x1, y, pwindow,
264 pwindow->thread->preferences->index_directory));
265 ipathtext->context_help_set_keyword("Index Files section");
266 x1 += ipathtext->get_w();
267 add_subwindow(ipath = new BrowseButton(mwindow->theme, this, ipathtext, x1, y,
268 pwindow->thread->preferences->index_directory,
269 _("Index Path"), _("Select the directory for index files"), 1));
270 ipath->context_help_set_keyword("Index Files section");
273 add_subwindow(title = new BC_Title(x, y + ys5, _("Size of index file in KB:"),
274 MEDIUMFONT, resources->text_default));
275 title->context_help_set_keyword("Index Files section");
276 sprintf(string, "%jd", pwindow->thread->preferences->index_size/1024);
277 add_subwindow(isize = new IndexSize(x + xS(230), y, pwindow, string));
278 isize->context_help_set_keyword("Index Files section");
279 add_subwindow(new ScanCommercials(pwindow, xS(400),y));
282 add_subwindow(title = new BC_Title(x, y + ys5, _("Number of index files to keep:"),
283 MEDIUMFONT, resources->text_default));
284 title->context_help_set_keyword("Index Files section");
285 sprintf(string, "%ld", (long)pwindow->thread->preferences->index_count);
286 add_subwindow(icount = new IndexCount(x + xS(230), y, pwindow, string));
287 icount->context_help_set_keyword("Index Files section");
288 add_subwindow(del_indexes = new DeleteAllIndexes(mwindow, pwindow, xS(400), y,
289 _("Delete existing indexes"), "[*.idx][*.toc][*.mkr]"));
290 del_indexes->context_help_set_keyword("Index Files section");
292 add_subwindow(ffmpeg_marker_files = new IndexFFMPEGMarkerFiles(this, x, y));
293 ffmpeg_marker_files->context_help_set_keyword("Index Files section");
294 add_subwindow(del_clipngs = new DeleteAllIndexes(mwindow, pwindow, xS(400), y,
295 _("Delete clip thumbnails"), "clip_*.png"));
296 del_clipngs->context_help_set_keyword("Index Files section");
299 const char* InterfacePrefs::behavior_to_text(int mode)
302 case MOVE_RIPPLE: return _(MOVE_RIPPLE_TITLE);
303 case MOVE_ROLL: return _(MOVE_ROLL_TITLE);
304 case MOVE_SLIP: return _(MOVE_SLIP_TITLE);
305 case MOVE_SLIDE: return _(MOVE_SLIDE_TITLE);
306 case MOVE_EDGE: return _(MOVE_EDGE_TITLE);
307 case MOVE_EDITS_DISABLED: return _(MOVE_EDITS_DISABLED_TITLE);
312 IndexPathText::IndexPathText(int x, int y, PreferencesWindow *pwindow, char *text)
313 : BC_TextBox(x, y, xS(240), 1, text)
315 this->pwindow = pwindow;
318 IndexPathText::~IndexPathText() {}
320 int IndexPathText::handle_event()
322 strcpy(pwindow->thread->preferences->index_directory, get_text());
329 IndexSize::IndexSize(int x, int y, PreferencesWindow *pwindow, char *text)
330 : BC_TextBox(x, y, xS(100), 1, text)
332 this->pwindow = pwindow;
335 int IndexSize::handle_event()
339 result = atol(get_text()) * 1024;
340 if( result < 65536 ) result = 65536;
341 //if(result < 500000) result = 500000;
342 pwindow->thread->preferences->index_size = result;
348 IndexCount::IndexCount(int x, int y, PreferencesWindow *pwindow, char *text)
349 : BC_TextBox(x, y, 100, 1, text)
351 this->pwindow = pwindow;
354 int IndexCount::handle_event()
358 result = atol(get_text());
359 if(result < 1) result = 1;
360 pwindow->thread->preferences->index_count = result;
366 IndexFFMPEGMarkerFiles::IndexFFMPEGMarkerFiles(InterfacePrefs *iface_prefs, int x, int y)
368 iface_prefs->pwindow->thread->preferences->ffmpeg_marker_indexes,
369 _("build ffmpeg marker indexes"))
371 this->iface_prefs = iface_prefs;
373 IndexFFMPEGMarkerFiles::~IndexFFMPEGMarkerFiles()
377 int IndexFFMPEGMarkerFiles::handle_event()
379 iface_prefs->pwindow->thread->preferences->ffmpeg_marker_indexes = get_value();
384 ViewBehaviourText::ViewBehaviourText(int x, int y, const char *text, PreferencesWindow *pwindow,
386 : BC_PopupMenu(x, y, xS(250), text)
388 this->output = output;
391 ViewBehaviourText::~ViewBehaviourText()
395 int ViewBehaviourText::handle_event()
400 void ViewBehaviourText::create_objects()
402 for( int mode=0; mode<=EDIT_HANDLE_MODES; ++mode )
403 add_item(new ViewBehaviourItem(this,
404 InterfacePrefs::behavior_to_text(mode), mode));
408 ViewBehaviourItem::ViewBehaviourItem(ViewBehaviourText *popup,
409 const char *text, int behaviour)
413 this->behaviour = behaviour;
416 ViewBehaviourItem::~ViewBehaviourItem()
420 int ViewBehaviourItem::handle_event()
422 popup->set_text(get_text());
423 *(popup->output) = behaviour;
428 MeterMinDB::MeterMinDB(PreferencesWindow *pwindow, char *text, int x, int y)
429 : BC_TextBox(x, y, xS(50), 1, text)
431 this->pwindow = pwindow;
434 int MeterMinDB::handle_event()
436 pwindow->thread->redraw_meters = 1;
437 pwindow->thread->edl->session->min_meter_db = atol(get_text());
442 MeterMaxDB::MeterMaxDB(PreferencesWindow *pwindow, char *text, int x, int y)
443 : BC_TextBox(x, y, xS(50), 1, text)
445 this->pwindow = pwindow;
448 int MeterMaxDB::handle_event()
450 pwindow->thread->redraw_meters = 1;
451 pwindow->thread->edl->session->max_meter_db = atol(get_text());
456 ScanCommercials::ScanCommercials(PreferencesWindow *pwindow, int x, int y)
459 pwindow->thread->preferences->scan_commercials,
460 _("Scan for commercials during toc build"))
462 this->pwindow = pwindow;
463 // *** CONTEXT_HELP ***
464 context_help_set_keyword("The commercial DB");
466 int ScanCommercials::handle_event()
468 pwindow->thread->preferences->scan_commercials = get_value();
473 AndroidRemote::AndroidRemote(PreferencesWindow *pwindow, int x, int y)
475 pwindow->thread->preferences->android_remote,
476 _("Android Remote Control"))
478 this->pwindow = pwindow;
480 int AndroidRemote::handle_event()
482 pwindow->thread->preferences->android_remote = get_value();
486 AndroidPIN::AndroidPIN(PreferencesWindow *pwindow, int x, int y)
487 : BC_TextBox(x, y, xS(180), 1, pwindow->thread->preferences->android_pin)
489 this->pwindow = pwindow;
492 int AndroidPIN::handle_event()
494 char *txt = pwindow->thread->preferences->android_pin;
495 int len = sizeof(pwindow->thread->preferences->android_pin);
496 strncpy(txt, get_text(), len);
501 AndroidPort::AndroidPort(PreferencesWindow *pwindow, int x, int y)
502 : BC_TextBox(x, y, xS(72), 1, pwindow->thread->preferences->android_port)
504 this->pwindow = pwindow;
507 int AndroidPort::handle_event()
509 unsigned short port = atoi(get_text());
510 if( port < 1024 ) port = 1024;
511 pwindow->thread->preferences->android_port = port;
513 sprintf(str,"%u",port);
518 int InterfacePrefs::start_shbtn_dialog()
521 shbtn_dialog = new ShBtnEditDialog(pwindow);
522 shbtn_dialog->start();
526 ShBtnPrefs::ShBtnPrefs(PreferencesWindow *pwindow, InterfacePrefs *iface_prefs, int x, int y)
527 : BC_GenericButton(x, y, _("Shell Commands"))
529 this->pwindow = pwindow;
530 this->iface_prefs = iface_prefs;
531 set_tooltip(_("Main Menu Shell Commands"));
534 int ShBtnPrefs::handle_event()
536 return iface_prefs->start_shbtn_dialog();
540 StillImageUseDuration::StillImageUseDuration(PreferencesWindow *pwindow, int value, int x, int y)
541 : BC_CheckBox(x, y, value, _("Import images with a duration of"))
543 this->pwindow = pwindow;
546 int StillImageUseDuration::handle_event()
548 pwindow->thread->edl->session->si_useduration = get_value();
552 StillImageDuration::StillImageDuration(PreferencesWindow *pwindow, int x, int y)
553 : BC_TextBox(x, y, xS(70), 1, pwindow->thread->edl->session->si_duration)
555 this->pwindow = pwindow;
557 int StillImageDuration::handle_event()
559 pwindow->thread->edl->session->si_duration = atof(get_text());
564 HairlineItem::HairlineItem(KeyframeReticle *popup, int hairline)
565 : BC_MenuItem(popup->hairline_to_string(hairline))
568 this->hairline = hairline;
571 HairlineItem::~HairlineItem()
575 int HairlineItem::handle_event()
577 popup->pwindow->thread->redraw_overlays = 1;
578 popup->set_text(get_text());
579 *(popup->output) = hairline;
584 KeyframeReticle::KeyframeReticle(PreferencesWindow *pwindow,
585 InterfacePrefs *iface_prefs, int x, int y, int *output)
586 : BC_PopupMenu(x, y, xS(220), hairline_to_string(*output))
588 this->pwindow = pwindow;
589 this->iface_prefs = iface_prefs;
590 this->output = output;
593 KeyframeReticle::~KeyframeReticle()
597 const char *KeyframeReticle::hairline_to_string(int type)
600 case HAIRLINE_NEVER: return _("Never");
601 case HAIRLINE_DRAGGING: return _("Dragging");
602 case HAIRLINE_ALWAYS: return _("Always");
607 void KeyframeReticle::create_objects()
609 add_item(new HairlineItem(this, HAIRLINE_NEVER));
610 add_item(new HairlineItem(this, HAIRLINE_DRAGGING));
611 add_item(new HairlineItem(this, HAIRLINE_ALWAYS));
614 PrefsTrapSigSEGV::PrefsTrapSigSEGV(InterfacePrefs *subwindow, int x, int y)
616 subwindow->pwindow->thread->preferences->trap_sigsegv,
619 this->subwindow = subwindow;
621 PrefsTrapSigSEGV::~PrefsTrapSigSEGV()
624 int PrefsTrapSigSEGV::handle_event()
626 subwindow->pwindow->thread->preferences->trap_sigsegv = get_value();
630 PrefsTrapSigINTR::PrefsTrapSigINTR(InterfacePrefs *subwindow, int x, int y)
632 subwindow->pwindow->thread->preferences->trap_sigintr,
635 this->subwindow = subwindow;
637 PrefsTrapSigINTR::~PrefsTrapSigINTR()
640 int PrefsTrapSigINTR::handle_event()
642 subwindow->pwindow->thread->preferences->trap_sigintr = get_value();
647 void InterfacePrefs::start_probe_dialog()
649 if( !file_probe_dialog )
650 file_probe_dialog = new FileProbeDialog(pwindow);
651 file_probe_dialog->start();
654 PrefsFileProbes::PrefsFileProbes(PreferencesWindow *pwindow,
655 InterfacePrefs *subwindow, int x, int y)
656 : BC_GenericButton(x, y, _("Probe Order"))
658 this->pwindow = pwindow;
659 this->subwindow = subwindow;
660 set_tooltip(_("File Open Probe Ordering"));
663 int PrefsFileProbes::handle_event()
665 subwindow->start_probe_dialog();
670 PrefsYUV420P_DVDlace::PrefsYUV420P_DVDlace(PreferencesWindow *pwindow,
671 InterfacePrefs *subwindow, int x, int y)
672 : BC_CheckBox(x, y, pwindow->thread->preferences->dvd_yuv420p_interlace,
673 _("Use yuv420p dvd interlace format"))
675 this->pwindow = pwindow;
676 this->subwindow = subwindow;
679 int PrefsYUV420P_DVDlace::handle_event()
681 pwindow->thread->preferences->dvd_yuv420p_interlace = get_value();
686 SnapshotPathText::SnapshotPathText(PreferencesWindow *pwindow,
687 InterfacePrefs *subwindow, int x, int y, int w)
688 : BC_TextBox(x, y, w, 1, pwindow->thread->preferences->snapshot_path)
690 this->pwindow = pwindow;
691 this->subwindow = subwindow;
694 SnapshotPathText::~SnapshotPathText()
698 int SnapshotPathText::handle_event()
700 strcpy(pwindow->thread->preferences->snapshot_path, get_text());
704 PrefsAutostartLV2UI::PrefsAutostartLV2UI(int x, int y, PreferencesWindow *pwindow)
706 pwindow->thread->preferences->autostart_lv2ui, _("Auto start lv2 gui"))
708 this->pwindow = pwindow;
710 int PrefsAutostartLV2UI::handle_event()
712 pwindow->thread->preferences->autostart_lv2ui = get_value();
716 PrefsReloadPlugins::PrefsReloadPlugins(PreferencesWindow *pwindow,
717 InterfacePrefs *iface_prefs, int x, int y)
718 : BC_GenericButton(x, y, _("Reload plugin index"))
720 this->pwindow = pwindow;
721 this->iface_prefs = iface_prefs;
724 int PrefsReloadPlugins::handle_event()
726 pwindow->thread->reload_plugins = 1;
727 text_color(get_resources()->button_highlighted);
732 PrefsLV2PathText::PrefsLV2PathText(PreferencesWindow *pwindow,
733 InterfacePrefs *subwindow, int x, int y, int w)
734 : BC_TextBox(x, y, w, 1, pwindow->thread->preferences->lv2_path)
736 this->pwindow = pwindow;
737 this->subwindow = subwindow;
740 PrefsLV2PathText::~PrefsLV2PathText()
744 int PrefsLV2PathText::handle_event()
746 strcpy(pwindow->thread->preferences->lv2_path, get_text());
750 PrefsNestedProxyPath::PrefsNestedProxyPath(PreferencesWindow *pwindow,
751 InterfacePrefs *subwindow, int x, int y, int w)
752 : BC_TextBox(x, y, w, 1, pwindow->thread->preferences->nested_proxy_path)
754 this->pwindow = pwindow;
755 this->subwindow = subwindow;
758 PrefsNestedProxyPath::~PrefsNestedProxyPath()
762 int PrefsNestedProxyPath::handle_event()
764 strcpy(pwindow->thread->preferences->nested_proxy_path, get_text());