r1009: Move the dependencies to newer package names
[cinelerra_cv/mob.git] / cinelerra / pluginprefs.C
blob6f1a71ea8a9c742ff2e3c006261960327719905f
1 #include "pluginprefs.h"
2 #include "preferences.h"
3 #include <string.h>
6 #include <libintl.h>
7 #define _(String) gettext(String)
8 #define gettext_noop(String) String
9 #define N_(String) gettext_noop (String)
12 PluginPrefs::PluginPrefs(MWindow *mwindow, PreferencesWindow *pwindow)
13  : PreferencesDialog(mwindow, pwindow)
17 PluginPrefs::~PluginPrefs()
19         delete ipath;
20         delete ipathtext;
21         delete lpath;
22         delete lpathtext;
25 int PluginPrefs::create_objects()
27         char string[1024];
28         int x = 5, y = 5;
30 //      add_border(get_resources()->get_bg_shadow1(),
31 //              get_resources()->get_bg_shadow2(),
32 //              get_resources()->get_bg_color(),
33 //              get_resources()->get_bg_light2(),
34 //              get_resources()->get_bg_light1());
36         add_subwindow(new BC_Title(x, y, _("Plugin Set"), LARGEFONT, BLACK));
37         y += 35;
38         add_subwindow(new BC_Title(x, y, _("Look for global plugins here"), MEDIUMFONT, BLACK));
39         y += 20;
40         add_subwindow(ipathtext = new PluginGlobalPathText(x, y, pwindow, pwindow->thread->preferences->global_plugin_dir));
41         add_subwindow(ipath = new BrowseButton(mwindow,
42                 this,
43                 ipathtext, 
44                 215, 
45                 y, 
46                 pwindow->thread->preferences->global_plugin_dir, 
47                 _("Global Plugin Path"), 
48                 _("Select the directory for plugins"), 
49                 1));
50         
51         y += 35;
52         add_subwindow(new BC_Title(x, y, _("Look for personal plugins here"), MEDIUMFONT, BLACK));
53         y += 20;
54         add_subwindow(lpathtext = new PluginLocalPathText(x, y, pwindow, pwindow->thread->preferences->local_plugin_dir));
55         add_subwindow(lpath = new BrowseButton(mwindow,
56                 this,
57                 lpathtext, 
58                 215, 
59                 y, 
60                 pwindow->thread->preferences->local_plugin_dir, 
61                 _("Personal Plugin Path"), 
62                 _("Select the directory for plugins"), 
63                 1));
66         return 0;
72 PluginGlobalPathText::PluginGlobalPathText(int x, int y, PreferencesWindow *pwindow, char *text)
73  : BC_TextBox(x, y, 200, 1, text)
74
75         this->pwindow = pwindow; 
78 PluginGlobalPathText::~PluginGlobalPathText() {}
80 int PluginGlobalPathText::handle_event()
82         strcpy(pwindow->thread->preferences->global_plugin_dir, get_text());
89 PluginLocalPathText::PluginLocalPathText(int x, int y, PreferencesWindow *pwindow, char *text)
90  : BC_TextBox(x, y, 200, 1, text)
91
92         this->pwindow = pwindow; 
95 PluginLocalPathText::~PluginLocalPathText() {}
97 int PluginLocalPathText::handle_event()
99         strcpy(pwindow->thread->preferences->local_plugin_dir, get_text());