Allow autostart programs be started without dialog

Documentation update
ImagesDirectory key renamed to DataDirectory; images renamed
to data to follow later changes
This commit is contained in:
Sanel Zukan
2007-09-11 14:06:44 +00:00
parent dffebaf72a
commit f0e0bc9032
14 changed files with 67 additions and 41 deletions

View File

@ -35,12 +35,15 @@ void run_all_cb(Fl_Widget*, void* w) {
win->run_all();
}
AstartDialog::AstartDialog(unsigned int sz) : Fl_Window(370, 305, _("Autostart warning")),
curr(0), lst_sz(sz), lst(0) {
AstartDialog::AstartDialog(unsigned int sz, bool do_show) : Fl_Window(370, 305, _("Autostart warning")),
curr(0), lst_sz(sz), show_dialog(do_show), lst(0) {
if(lst_sz)
lst = new AstartItem[lst_sz];
if(!show_dialog)
return;
begin();
img = new Fl_Box(10, 10, 65, 60);
img->image(warnpix);
@ -77,6 +80,11 @@ void AstartDialog::add_item(const edelib::String& n, const edelib::String& e) {
}
void AstartDialog::run(void) {
if(!show_dialog) {
run_all();
return;
}
for(unsigned int i = 0; i < curr; i++)
cbrowser->add(lst[i].name.c_str());
@ -88,6 +96,9 @@ void AstartDialog::run(void) {
}
void AstartDialog::run_selected(void) {
if(!show_dialog)
return;
int it = cbrowser->nchecked();
if(!it)
return;