initial commit
[goodguy/history.git] / cinelerra-5.0 / cinelerra / plugindialog.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 "bcsignals.h"
23 #include "condition.h"
24 #include "edl.h"
25 #include "edlsession.h"
26 #include "language.h"
27 #include "localsession.h"
28 #include "mainsession.h"
29 #include "mainundo.h"
30 #include "mwindow.h"
31 #include "mwindowgui.h"
32 #include "module.h"
33 #include "mutex.h"
34 #include "plugin.h"
35 #include "plugindialog.h"
36 #include "pluginserver.h"
37 #include "theme.h"
38 #include "track.h"
39 #include "tracks.h"
40 #include "transition.h"
41
42
43 PluginDialogThread::PluginDialogThread(MWindow *mwindow)
44  : BC_DialogThread()
45 {
46         this->mwindow = mwindow;
47         plugin = 0;
48 }
49
50 PluginDialogThread::~PluginDialogThread()
51 {
52 }
53
54 void PluginDialogThread::start_window(Track *track,
55         Plugin *plugin, 
56         const char *title,
57         int is_mainmenu,
58         int data_type)
59 {
60         if(!BC_DialogThread::is_running())
61         {
62 // At this point, the caller should hold the main window mutex.
63 //              mwindow->gui->lock_window("PluginDialogThread::start_window");
64                 this->track = track;
65                 this->data_type = data_type;
66                 this->plugin = plugin;
67                 this->is_mainmenu = is_mainmenu;
68                 single_standalone = mwindow->edl->session->single_standalone;
69
70                 if(plugin)
71                 {
72                         plugin->calculate_title(plugin_title, 0);
73                         this->shared_location = plugin->shared_location;
74                         this->plugin_type = plugin->plugin_type;
75                 }
76                 else
77                 {
78                         this->plugin_title[0] = 0;
79                         this->shared_location.plugin = -1;
80                         this->shared_location.module = -1;
81                         this->plugin_type = PLUGIN_NONE;
82                 }
83
84                 strcpy(this->window_title, title);
85                 mwindow->gui->unlock_window();
86
87                 BC_DialogThread::start();
88                 mwindow->gui->lock_window("PluginDialogThread::start_window");
89         }
90 }
91
92 BC_Window* PluginDialogThread::new_gui()
93 {
94         mwindow->gui->lock_window("PluginDialogThread::new_gui");
95         int x = mwindow->gui->get_abs_cursor_x(0) - 
96                 mwindow->session->plugindialog_w / 2;
97         int y = mwindow->gui->get_abs_cursor_y(0) - 
98                 mwindow->session->plugindialog_h / 2;
99         plugin_type = 0;
100         PluginDialog *window = new PluginDialog(mwindow, 
101                 this, 
102                 window_title, 
103                 x, 
104                 y);
105         window->create_objects();
106         mwindow->gui->unlock_window();
107         return window;
108 }
109
110 void PluginDialogThread::handle_done_event(int result)
111 {
112         PluginDialog *window = (PluginDialog*)BC_DialogThread::get_gui();
113         if(window->selected_available >= 0)
114         {
115                 window->attach_new(window->selected_available);
116         }
117         else
118         if(window->selected_shared >= 0)
119         {
120                 window->attach_shared(window->selected_shared);
121         }
122         else
123         if(window->selected_modules >= 0)
124         {
125                 window->attach_module(window->selected_modules);
126         }
127         mwindow->edl->session->single_standalone = single_standalone;
128 }
129
130 void PluginDialogThread::handle_close_event(int result)
131 {
132         if(!result)
133         {
134                 if(plugin_type)
135                 {
136                         mwindow->gui->lock_window("PluginDialogThread::run 3");
137
138
139                         mwindow->undo->update_undo_before();
140                         if(is_mainmenu)
141                         {
142                                 mwindow->insert_effect(plugin_title, 
143                                         &shared_location,
144                                         data_type,
145                                         plugin_type,
146                                         single_standalone);
147                         }
148                         else
149                         {
150                                 if(plugin)
151                                 {
152                                         if(mwindow->edl->tracks->plugin_exists(plugin))
153                                         {
154                                                 plugin->change_plugin(plugin_title,
155                                                         &shared_location,
156                                                         plugin_type);
157                                         }
158                                 }
159                                 else
160                                 {
161                                         if(mwindow->edl->tracks->track_exists(track))
162                                         {
163                                                 mwindow->insert_effect(plugin_title, 
164                                                                                 &shared_location,
165                                                                                 track,
166                                                                                 0,
167                                                                                 0,
168                                                                                 0,
169                                                                                 plugin_type);
170                                         }
171                                 }
172                         }
173                         
174                         mwindow->save_backup();
175                         mwindow->undo->update_undo_after(_("attach effect"), LOAD_EDITS | LOAD_PATCHES);
176                         mwindow->restart_brender();
177                         mwindow->update_plugin_states();
178                         mwindow->sync_parameters(CHANGE_EDL);
179                         mwindow->gui->update(1,
180                                 1,
181                                 0,
182                                 0,
183                                 1, 
184                                 0,
185                                 0);
186
187                         mwindow->gui->unlock_window();
188                 }
189         }
190         plugin = 0;
191 }
192
193
194
195
196
197
198
199
200
201 PluginDialog::PluginDialog(MWindow *mwindow, 
202         PluginDialogThread *thread, 
203         const char *window_title,
204         int x,
205         int y)
206  : BC_Window(window_title, 
207         x,
208         y,
209         mwindow->session->plugindialog_w, 
210         mwindow->session->plugindialog_h, 
211         510, 
212         415,
213         1,
214         0,
215         1)
216 {
217         this->mwindow = mwindow;  
218         this->thread = thread;
219         single_standalone = 0;
220 }
221
222 PluginDialog::~PluginDialog()
223 {
224         lock_window("PluginDialog::~PluginDialog");
225         standalone_data.remove_all_objects();
226         
227         shared_data.remove_all_objects();
228         
229         module_data.remove_all_objects();
230
231         plugin_locations.remove_all_objects();
232
233         module_locations.remove_all_objects();
234
235         delete standalone_list;
236         delete shared_list;
237         delete module_list;
238         unlock_window();
239 }
240
241 void PluginDialog::create_objects()
242 {
243 //      int use_default = 1;
244         char string[BCTEXTLEN];
245         mwindow->theme->get_plugindialog_sizes();
246
247         lock_window("PluginDialog::create_objects");
248         if(thread->plugin)
249         {
250                 strcpy(string, thread->plugin->title);
251                 //use_default = 0;
252         }
253         else
254         {
255 // no plugin
256                 sprintf(string, _("None"));
257         }
258
259
260
261
262
263
264 // GET A LIST OF ALL THE PLUGINS AVAILABLE
265         mwindow->search_plugindb(thread->data_type == TRACK_AUDIO, 
266                 thread->data_type == TRACK_VIDEO, 
267                 1, 0, 0, plugindb);
268
269         mwindow->edl->get_shared_plugins(thread->track,
270                 &plugin_locations,
271                 thread->is_mainmenu,
272                 thread->data_type);
273         mwindow->edl->get_shared_tracks(thread->track,
274                 &module_locations,
275                 thread->is_mainmenu,
276                 thread->data_type);
277
278 // Construct listbox items
279         for(int i = 0; i < plugindb.total; i++)
280                 standalone_data.append(new BC_ListBoxItem(_(plugindb.values[i]->title)));
281         for(int i = 0; i < plugin_locations.total; i++)
282         {
283                 Track *track = mwindow->edl->tracks->number(plugin_locations.values[i]->module);
284                 char *track_title = track->title;
285                 int number = plugin_locations.values[i]->plugin;
286                 Plugin *plugin = track->get_current_plugin(mwindow->edl->local_session->get_selectionstart(1), 
287                         number, 
288                         PLAY_FORWARD,
289                         1,
290                         0);
291                 char *plugin_title = plugin->title;
292                 char string[BCTEXTLEN];
293
294                 sprintf(string, "%s: %s", track_title, _(plugin_title));
295                 shared_data.append(new BC_ListBoxItem(string));
296         }
297         for(int i = 0; i < module_locations.total; i++)
298         {
299                 Track *track = mwindow->edl->tracks->number(module_locations.values[i]->module);
300                 module_data.append(new BC_ListBoxItem(track->title));
301         }
302
303
304
305
306
307 // Create widgets
308         add_subwindow(standalone_title = new BC_Title(mwindow->theme->plugindialog_new_x, 
309                 mwindow->theme->plugindialog_new_y - 20, 
310                 _("Plugins:")));
311         add_subwindow(standalone_list = new PluginDialogNew(this, 
312                 &standalone_data, 
313                 mwindow->theme->plugindialog_new_x, 
314                 mwindow->theme->plugindialog_new_y,
315                 mwindow->theme->plugindialog_new_w,
316                 mwindow->theme->plugindialog_new_h));
317 // 
318 //      if(thread->plugin)
319 //              add_subwindow(standalone_change = new PluginDialogChangeNew(mwindow,
320 //                      this,
321 //                      mwindow->theme->plugindialog_newattach_x,
322 //                      mwindow->theme->plugindialog_newattach_y));
323 //      else
324 //              add_subwindow(standalone_attach = new PluginDialogAttachNew(mwindow, 
325 //                      this, 
326 //                      mwindow->theme->plugindialog_newattach_x, 
327 //                      mwindow->theme->plugindialog_newattach_y));
328 // 
329
330
331
332
333
334
335
336         add_subwindow(shared_title = new BC_Title(mwindow->theme->plugindialog_shared_x, 
337                 mwindow->theme->plugindialog_shared_y - 20, 
338                 _("Shared effects:")));
339         add_subwindow(shared_list = new PluginDialogShared(this, 
340                 &shared_data, 
341                 mwindow->theme->plugindialog_shared_x, 
342                 mwindow->theme->plugindialog_shared_y,
343                 mwindow->theme->plugindialog_shared_w,
344                 mwindow->theme->plugindialog_shared_h));
345 //      if(thread->plugin)
346 //       add_subwindow(shared_change = new PluginDialogChangeShared(mwindow,
347 //          this,
348 //          mwindow->theme->plugindialog_sharedattach_x,
349 //          mwindow->theme->plugindialog_sharedattach_y));
350 //    else
351 //              add_subwindow(shared_attach = new PluginDialogAttachShared(mwindow, 
352 //                      this, 
353 //                      mwindow->theme->plugindialog_sharedattach_x, 
354 //                      mwindow->theme->plugindialog_sharedattach_y));
355 // 
356
357
358
359
360
361
362
363
364         add_subwindow(module_title = new BC_Title(mwindow->theme->plugindialog_module_x, 
365                 mwindow->theme->plugindialog_module_y - 20, 
366                 _("Shared tracks:")));
367         add_subwindow(module_list = new PluginDialogModules(this, 
368                 &module_data, 
369                 mwindow->theme->plugindialog_module_x, 
370                 mwindow->theme->plugindialog_module_y,
371                 mwindow->theme->plugindialog_module_w,
372                 mwindow->theme->plugindialog_module_h));
373 //      if(thread->plugin)
374 //       add_subwindow(module_change = new PluginDialogChangeModule(mwindow,
375 //          this,
376 //          mwindow->theme->plugindialog_moduleattach_x,
377 //          mwindow->theme->plugindialog_moduleattach_y));
378 //    else
379 //              add_subwindow(module_attach = new PluginDialogAttachModule(mwindow, 
380 //                      this, 
381 //                      mwindow->theme->plugindialog_moduleattach_x, 
382 //                      mwindow->theme->plugindialog_moduleattach_y));
383 // 
384
385
386 // Add option for the menu invocation
387 //      add_subwindow(file_title = new BC_Title(
388 //              mwindow->theme->menueffect_file_x, 
389 //              mwindow->theme->menueffect_file_y, 
390 //              _("One standalone effect is attached to the first track.\n"
391 //              "Shared effects are attached to the remaining tracks.")));
392
393         if(thread->is_mainmenu)
394                 add_subwindow(single_standalone = new PluginDialogSingle(this, 
395                         mwindow->theme->plugindialog_new_x + BC_OKButton::calculate_w() + 10, 
396                         mwindow->theme->plugindialog_new_y + 
397                                 mwindow->theme->plugindialog_new_h +
398                                 get_text_height(MEDIUMFONT)));
399
400
401
402         add_subwindow(new BC_OKButton(this));
403         add_subwindow(new BC_CancelButton(this));
404
405         selected_available = -1;
406         selected_shared = -1;
407         selected_modules = -1;
408         
409         show_window();
410         flush();
411         unlock_window();
412 }
413
414 int PluginDialog::resize_event(int w, int h)
415 {
416         mwindow->session->plugindialog_w = w;
417         mwindow->session->plugindialog_h = h;
418         mwindow->theme->get_plugindialog_sizes();
419
420
421         standalone_title->reposition_window(mwindow->theme->plugindialog_new_x, 
422                 mwindow->theme->plugindialog_new_y - 20);
423         standalone_list->reposition_window(mwindow->theme->plugindialog_new_x, 
424                 mwindow->theme->plugindialog_new_y,
425                 mwindow->theme->plugindialog_new_w,
426                 mwindow->theme->plugindialog_new_h);
427 //      if(standalone_attach)
428 //              standalone_attach->reposition_window(mwindow->theme->plugindialog_newattach_x, 
429 //                      mwindow->theme->plugindialog_newattach_y);
430 //      else
431 //              standalone_change->reposition_window(mwindow->theme->plugindialog_newattach_x,
432 //                      mwindow->theme->plugindialog_newattach_y);
433
434
435
436
437
438         shared_title->reposition_window(mwindow->theme->plugindialog_shared_x, 
439                 mwindow->theme->plugindialog_shared_y - 20);
440         shared_list->reposition_window(mwindow->theme->plugindialog_shared_x, 
441                 mwindow->theme->plugindialog_shared_y,
442                 mwindow->theme->plugindialog_shared_w,
443                 mwindow->theme->plugindialog_shared_h);
444 //      if(shared_attach)
445 //              shared_attach->reposition_window(mwindow->theme->plugindialog_sharedattach_x, 
446 //                      mwindow->theme->plugindialog_sharedattach_y);
447 //      else
448 //              shared_change->reposition_window(mwindow->theme->plugindialog_sharedattach_x,
449 //                      mwindow->theme->plugindialog_sharedattach_y);
450 // 
451
452
453
454
455         module_title->reposition_window(mwindow->theme->plugindialog_module_x, 
456                 mwindow->theme->plugindialog_module_y - 20);
457         module_list->reposition_window(mwindow->theme->plugindialog_module_x, 
458                 mwindow->theme->plugindialog_module_y,
459                 mwindow->theme->plugindialog_module_w,
460                 mwindow->theme->plugindialog_module_h);
461 //      if(module_attach)
462 //              module_attach->reposition_window(mwindow->theme->plugindialog_moduleattach_x, 
463 //                      mwindow->theme->plugindialog_moduleattach_y);
464 //      else
465 //              module_change->reposition_window(mwindow->theme->plugindialog_moduleattach_x,
466 //                      mwindow->theme->plugindialog_moduleattach_y);
467
468
469         if(single_standalone)
470                 single_standalone->reposition_window(mwindow->theme->plugindialog_new_x, 
471                         mwindow->theme->plugindialog_new_y + 
472                                 mwindow->theme->plugindialog_new_h +
473                                 get_text_height(MEDIUMFONT));
474
475         flush();
476         return 0;
477 }
478
479 int PluginDialog::attach_new(int number)
480 {
481         if(number > -1 && number < standalone_data.total) 
482         {
483                 strcpy(thread->plugin_title, plugindb.values[number]->title);
484                 thread->plugin_type = PLUGIN_STANDALONE;         // type is plugin
485         }
486         return 0;
487 }
488
489 int PluginDialog::attach_shared(int number)
490 {
491         if(number > -1 && number < shared_data.total) 
492         {
493                 thread->plugin_type = PLUGIN_SHAREDPLUGIN;         // type is shared plugin
494                 thread->shared_location = *(plugin_locations.values[number]); // copy location
495         }
496         return 0;
497 }
498
499 int PluginDialog::attach_module(int number)
500 {
501         if(number > -1 && number < module_data.total) 
502         {
503 //              title->update(module_data.values[number]->get_text());
504                 thread->plugin_type = PLUGIN_SHAREDMODULE;         // type is module
505                 thread->shared_location = *(module_locations.values[number]); // copy location
506         }
507         return 0;
508 }
509
510 int PluginDialog::save_settings()
511 {
512         return 0;
513 }
514
515
516
517
518
519
520
521 // 
522 // PluginDialogTextBox::PluginDialogTextBox(PluginDialog *dialog, char *text, int x, int y)
523 //  : BC_TextBox(x, y, 200, 1, text) 
524 // { 
525 //      this->dialog = dialog;
526 // }
527 // PluginDialogTextBox::~PluginDialogTextBox() 
528 // { }
529 // int PluginDialogTextBox::handle_event() 
530 // { }
531 // 
532 // PluginDialogDetach::PluginDialogDetach(MWindow *mwindow, PluginDialog *dialog, int x, int y)
533 //  : BC_GenericButton(x, y, _("Detach")) 
534 // { 
535 //      this->dialog = dialog; 
536 // }
537 // PluginDialogDetach::~PluginDialogDetach() 
538 // { }
539 // int PluginDialogDetach::handle_event() 
540 // {
541 // //   dialog->title->update(_("None"));
542 //      dialog->thread->plugin_type = 0;         // type is none
543 //      dialog->thread->plugin_title[0] = 0;
544 //      return 1;
545 // }
546 // 
547
548
549
550
551
552
553
554
555
556
557
558
559
560 PluginDialogNew::PluginDialogNew(PluginDialog *dialog, 
561         ArrayList<BC_ListBoxItem*> *standalone_data, 
562         int x,
563         int y,
564         int w,
565         int h)
566  : BC_ListBox(x, 
567         y, 
568         w, 
569         h, 
570         LISTBOX_TEXT,
571         standalone_data) 
572
573         this->dialog = dialog; 
574 }
575 PluginDialogNew::~PluginDialogNew() { }
576 int PluginDialogNew::handle_event() 
577
578 //      dialog->attach_new(get_selection_number(0, 0)); 
579 //      deactivate();
580
581         set_done(0); 
582         return 1;
583 }
584 int PluginDialogNew::selection_changed()
585 {
586         dialog->selected_available = get_selection_number(0, 0);
587
588
589         dialog->shared_list->set_all_selected(&dialog->shared_data, 0);
590         dialog->shared_list->draw_items(1);
591         dialog->module_list->set_all_selected(&dialog->module_data, 0);
592         dialog->module_list->draw_items(1);
593         dialog->selected_shared = -1;
594         dialog->selected_modules = -1;
595         return 1;
596 }
597
598 // PluginDialogAttachNew::PluginDialogAttachNew(MWindow *mwindow, PluginDialog *dialog, int x, int y)
599 //  : BC_GenericButton(x, y, _("Attach")) 
600 // { 
601 //      this->dialog = dialog; 
602 // }
603 // PluginDialogAttachNew::~PluginDialogAttachNew() 
604 // {
605 // }
606 // int PluginDialogAttachNew::handle_event() 
607 // {
608 //      dialog->attach_new(dialog->selected_available); 
609 //      set_done(0);
610 //      return 1;
611 // }
612 // 
613 // PluginDialogChangeNew::PluginDialogChangeNew(MWindow *mwindow, PluginDialog *dialog, int x, int y)
614 //  : BC_GenericButton(x, y, _("Change"))
615 // {
616 //    this->dialog = dialog;
617 // }
618 // PluginDialogChangeNew::~PluginDialogChangeNew()
619 // {
620 // }
621 // int PluginDialogChangeNew::handle_event() 
622 // {  
623 //    dialog->attach_new(dialog->selected_available);
624 //    set_done(0);
625 //    return 1;
626 // }
627
628
629
630
631
632
633
634
635
636
637 PluginDialogShared::PluginDialogShared(PluginDialog *dialog, 
638         ArrayList<BC_ListBoxItem*> *shared_data, 
639         int x,
640         int y,
641         int w,
642         int h)
643  : BC_ListBox(x, 
644         y, 
645         w, 
646         h, 
647         LISTBOX_TEXT, 
648         shared_data) 
649
650         this->dialog = dialog; 
651 }
652 PluginDialogShared::~PluginDialogShared() { }
653 int PluginDialogShared::handle_event()
654
655 //      dialog->attach_shared(get_selection_number(0, 0)); 
656 //      deactivate();
657         set_done(0); 
658         return 1;
659 }
660 int PluginDialogShared::selection_changed()
661 {
662         dialog->selected_shared = get_selection_number(0, 0);
663
664
665         dialog->standalone_list->set_all_selected(&dialog->standalone_data, 0);
666         dialog->standalone_list->draw_items(1);
667         dialog->module_list->set_all_selected(&dialog->module_data, 0);
668         dialog->module_list->draw_items(1);
669         dialog->selected_available = -1;
670         dialog->selected_modules = -1;
671         return 1;
672 }
673
674 // PluginDialogAttachShared::PluginDialogAttachShared(MWindow *mwindow, 
675 //      PluginDialog *dialog, 
676 //      int x,
677 //      int y)
678 //  : BC_GenericButton(x, y, _("Attach")) 
679 // { 
680 //      this->dialog = dialog; 
681 // }
682 // PluginDialogAttachShared::~PluginDialogAttachShared() { }
683 // int PluginDialogAttachShared::handle_event() 
684 // { 
685 //      dialog->attach_shared(dialog->selected_shared); 
686 //      set_done(0);
687 //      return 1;
688 // }
689 // 
690 // PluginDialogChangeShared::PluginDialogChangeShared(MWindow *mwindow,
691 //    PluginDialog *dialog,
692 //    int x,
693 //    int y)
694 //  : BC_GenericButton(x, y, _("Change"))
695 // {
696 //    this->dialog = dialog;
697 // }
698 // PluginDialogChangeShared::~PluginDialogChangeShared() { }
699 // int PluginDialogChangeShared::handle_event()
700 // {
701 //    dialog->attach_shared(dialog->selected_shared);
702 //    set_done(0);
703 //    return 1;
704 // }
705 // 
706
707
708
709
710
711
712
713
714
715
716
717
718 PluginDialogModules::PluginDialogModules(PluginDialog *dialog, 
719         ArrayList<BC_ListBoxItem*> *module_data, 
720         int x, 
721         int y,
722         int w,
723         int h)
724  : BC_ListBox(x, 
725         y, 
726         w, 
727         h, 
728         LISTBOX_TEXT, 
729         module_data) 
730
731         this->dialog = dialog; 
732 }
733 PluginDialogModules::~PluginDialogModules() { }
734 int PluginDialogModules::handle_event()
735
736 //      dialog->attach_module(get_selection_number(0, 0)); 
737 //      deactivate();
738
739         set_done(0); 
740         return 1;
741 }
742 int PluginDialogModules::selection_changed()
743 {
744         dialog->selected_modules = get_selection_number(0, 0);
745
746
747         dialog->standalone_list->set_all_selected(&dialog->standalone_data, 0);
748         dialog->standalone_list->draw_items(1);
749         dialog->shared_list->set_all_selected(&dialog->shared_data, 0);
750         dialog->shared_list->draw_items(1);
751         dialog->selected_available = -1;
752         dialog->selected_shared = -1;
753         return 1;
754 }
755
756
757 PluginDialogSingle::PluginDialogSingle(PluginDialog *dialog, int x, int y)
758  : BC_CheckBox(x, 
759         y, 
760         dialog->thread->single_standalone, 
761         _("Attach single standlone and share others"))
762 {
763         this->dialog = dialog;
764 }
765
766 int PluginDialogSingle::handle_event()
767 {
768         dialog->thread->single_standalone = get_value();
769         return 1;
770 }
771
772
773 // PluginDialogAttachModule::PluginDialogAttachModule(MWindow *mwindow, 
774 //      PluginDialog *dialog, 
775 //      int x, 
776 //      int y)
777 //  : BC_GenericButton(x, y, _("Attach")) 
778 // { 
779 //      this->dialog = dialog; 
780 // }
781 // PluginDialogAttachModule::~PluginDialogAttachModule() { }
782 // int PluginDialogAttachModule::handle_event() 
783 // { 
784 //      dialog->attach_module(dialog->selected_modules);
785 //      set_done(0);
786 //      return 1;
787 // }
788 // 
789 // PluginDialogChangeModule::PluginDialogChangeModule(MWindow *mwindow,
790 //    PluginDialog *dialog,
791 //    int x,
792 //    int y)
793 //  : BC_GenericButton(x, y, _("Change"))
794 // {
795 //    this->dialog = dialog;
796 // }
797 // PluginDialogChangeModule::~PluginDialogChangeModule() { }
798 // int PluginDialogChangeModule::handle_event()
799 // {
800 //    dialog->attach_module(dialog->selected_modules);
801 //    set_done(0);
802 //    return 1;
803 // }
804 // 
805
806
807
808
809
810
811
812
813
814
815
816
817
818