group edge handle drag, expanders.txt, delete spurious auto in copy edl
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / pluginprefs.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 "pluginprefs.h"
23 #include "preferences.h"
24 #include <string.h>
25
26
27 #include <libintl.h>
28 #define _(String) gettext(String)
29 #define gettext_noop(String) String
30 #define N_(String) gettext_noop (String)
31
32
33 PluginPrefs::PluginPrefs(MWindow *mwindow, PreferencesWindow *pwindow)
34  : PreferencesDialog(mwindow, pwindow)
35 {
36 }
37
38 PluginPrefs::~PluginPrefs()
39 {
40         delete ipath;
41         delete ipathtext;
42         delete lpath;
43         delete lpathtext;
44 }
45
46 void PluginPrefs::create_objects()
47 {
48         char string[1024];
49         int x = 5, y = 5;
50
51 //      add_border(get_resources()->get_bg_shadow1(),
52 //              get_resources()->get_bg_shadow2(),
53 //              get_resources()->get_bg_color(),
54 //              get_resources()->get_bg_light2(),
55 //              get_resources()->get_bg_light1());
56
57         add_subwindow(new BC_Title(x, y, _("Plugin Set"), LARGEFONT, BLACK));
58         y += 35;
59         add_subwindow(new BC_Title(x, y, _("Look for global plugins here"), MEDIUMFONT, BLACK));
60         y += 20;
61         add_subwindow(ipathtext = new PluginGlobalPathText(x, y, pwindow, pwindow->thread->preferences->global_plugin_dir));
62         add_subwindow(ipath = new BrowseButton(mwindow,
63                 this,
64                 ipathtext,
65                 215,
66                 y,
67                 pwindow->thread->preferences->global_plugin_dir,
68                 _("Global Plugin Path"),
69                 _("Select the directory for plugins"),
70                 1));
71
72         y += 35;
73         add_subwindow(new BC_Title(x, y, _("Look for personal plugins here"), MEDIUMFONT, BLACK));
74         y += 20;
75         add_subwindow(lpathtext = new PluginLocalPathText(x, y, pwindow, pwindow->thread->preferences->local_plugin_dir));
76         add_subwindow(lpath = new BrowseButton(mwindow,
77                 this,
78                 lpathtext,
79                 215,
80                 y,
81                 pwindow->thread->preferences->local_plugin_dir,
82                 _("Personal Plugin Path"),
83                 _("Select the directory for plugins"),
84                 1));
85
86 }
87
88
89
90
91 PluginGlobalPathText::PluginGlobalPathText(int x, int y, PreferencesWindow *pwindow, char *text)
92  : BC_TextBox(x, y, 200, 1, text)
93 {
94         this->pwindow = pwindow;
95 }
96
97 PluginGlobalPathText::~PluginGlobalPathText() {}
98
99 int PluginGlobalPathText::handle_event()
100 {
101         strcpy(pwindow->thread->preferences->global_plugin_dir, get_text());
102 }
103
104
105
106
107
108 PluginLocalPathText::PluginLocalPathText(int x, int y, PreferencesWindow *pwindow, char *text)
109  : BC_TextBox(x, y, 200, 1, text)
110 {
111         this->pwindow = pwindow;
112 }
113
114 PluginLocalPathText::~PluginLocalPathText() {}
115
116 int PluginLocalPathText::handle_event()
117 {
118         strcpy(pwindow->thread->preferences->local_plugin_dir, get_text());
119 }