add bins/folders, fix listbox bad wdw ref, hide vicons fix, remove sort by time
[goodguy/history.git] / cinelerra-5.1 / cinelerra / mainsession.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 "bcdisplayinfo.h"
23 #include "clip.h"
24 #include "bchash.h"
25 #include "edl.h"
26 #include "edlsession.h"
27 #include "guicast.h"
28 #include "indexable.h"
29 #include "mainsession.h"
30 #include "meterpanel.h"
31 #include "mwindow.h"
32 #include "mwindowgui.h"
33 #include "auto.h"
34
35 MainSession::MainSession(MWindow *mwindow)
36 {
37         this->mwindow = mwindow;
38         changes_made = 0;
39         filename[0] = 0;
40 //      playback_cursor_visible = 0;
41 //      is_playing_back = 0;
42         track_highlighted = 0;
43         plugin_highlighted = 0;
44         pluginset_highlighted = 0;
45         edit_highlighted = 0;
46         current_operation = NO_OPERATION;
47         drag_pluginservers = new ArrayList<PluginServer*>;
48         drag_plugin = 0;
49         drag_assets = new ArrayList<Indexable*>;
50         drag_auto_gang = new ArrayList<Auto*>;
51         drag_clips = new ArrayList<EDL*>;
52         drag_proxy = new ArrayList<EDL*>;
53         drag_edits = new ArrayList<Edit*>;
54         drag_edit = 0;
55         clip_number = 1;
56         brender_end = 0;
57         cwindow_controls = 1;
58         trim_edits = 0;
59         current_tip = -1;
60         drag_handle = 0;
61         cwindow_fullscreen = 0;
62         rwindow_fullscreen = 0;
63         vwindow_fullscreen = 0;
64         zwindow_fullscreen = 0;
65         selected_zwindow = -1;
66         actual_frame_rate = 0;
67         window_config = 0;
68         a_x11_host[0] = 0;
69         b_x11_host[0] = 0;
70         record_scope = 0;
71
72         drag_auto = 0;
73         drag_button = 0;
74         drag_handle = 0;
75         drag_position = 0;
76         drag_start = 0;
77         drag_origin_x = drag_origin_y = 0;
78         drag_start_percentage = 0;
79         drag_start_position = 0;
80         cwindow_output_x = cwindow_output_y = 0;
81         batchrender_x = batchrender_y = batchrender_w = batchrender_h = 0;
82         lwindow_x = lwindow_y = lwindow_w = lwindow_h = 0;
83         mwindow_x = mwindow_y = mwindow_w = mwindow_h = 0;
84         vwindow_x = vwindow_y = vwindow_w = vwindow_h = 0;
85         cwindow_x = cwindow_y = cwindow_w = cwindow_h = 0;
86         ctool_x = ctool_y = 0;
87         awindow_x = awindow_y = awindow_w = awindow_h = 0;
88         bwindow_w = bwindow_h = 0;
89         rmonitor_x = rmonitor_y = rmonitor_w = rmonitor_h = 0;
90         rwindow_x = rwindow_y = rwindow_w = rwindow_h = 0;
91         gwindow_x = gwindow_y = 0;
92         cswindow_x = cswindow_y = cswindow_w = cswindow_h = 0;
93         swindow_x = swindow_y = swindow_w = swindow_h = 0;
94         ewindow_w = ewindow_h = 0;
95         channels_x = channels_y = 0;
96         picture_x = picture_y = 0;
97         scope_x = scope_y = scope_w = scope_h = 0;
98         histogram_x = histogram_y = histogram_w = histogram_h = 0;
99         use_hist = 0;
100         use_wave = 0;
101         use_vector = 0;
102         use_hist_parade = 0;
103         use_wave_parade = 0;
104         afolders_w = 0;
105         show_vwindow = show_awindow = show_cwindow = show_gwindow = show_lwindow = 0;
106         plugindialog_w = plugindialog_h = 0;
107 //      presetdialog_w = presetdialog_h = 0;
108         keyframedialog_w = keyframedialog_h = 0;
109         keyframedialog_column1 = 0;
110         keyframedialog_column2 = 0;
111         keyframedialog_all = 0;
112         menueffect_w = menueffect_h = 0;
113         transitiondialog_w = transitiondialog_h = 0;
114 }
115
116 MainSession::~MainSession()
117 {
118         clear_drag_proxy();
119         delete drag_pluginservers;
120         delete drag_assets;
121         delete drag_auto_gang;
122         delete drag_clips;
123         delete drag_proxy;
124         delete drag_edits;
125 }
126
127 void MainSession::boundaries()
128 {
129         lwindow_x = MAX(0, lwindow_x);
130         lwindow_y = MAX(0, lwindow_y);
131         mwindow_x = MAX(0, mwindow_x);
132         mwindow_y = MAX(0, mwindow_y);
133         cwindow_x = MAX(0, cwindow_x);
134         cwindow_y = MAX(0, cwindow_y);
135         vwindow_x = MAX(0, vwindow_x);
136         vwindow_y = MAX(0, vwindow_y);
137         awindow_x = MAX(0, awindow_x);
138         awindow_y = MAX(0, awindow_y);
139         gwindow_x = MAX(0, gwindow_x);
140         gwindow_y = MAX(0, gwindow_y);
141         rwindow_x = MAX(0, rwindow_x);
142         rwindow_y = MAX(0, rwindow_y);
143         rmonitor_x = MAX(0, rmonitor_x);
144         rmonitor_y = MAX(0, rmonitor_y);
145         CLAMP(cwindow_controls, 0, 1);
146 }
147
148 void MainSession::clear_drag_proxy()
149 {
150         for( int i=drag_proxy->size(); --i>=0; )
151                 drag_proxy->get(i)->remove_user();
152         drag_proxy->remove_all();
153 }
154
155 void MainSession::save_x11_host(int play_config, const char *x11_host)
156 {
157         strcpy(!play_config ? a_x11_host : b_x11_host, x11_host);
158 }
159
160 // set default x11 host, window_config, return screens
161 int MainSession::set_default_x11_host(int win_config)
162 {
163         if( win_config < 0 ) win_config = window_config;
164         const char *x11_host = win_config!=1 ? a_x11_host : b_x11_host;
165         BC_DisplayInfo display_info(x11_host,0);
166         int screen = display_info.get_screen();
167         if( screen < 0 && strcmp(a_x11_host, b_x11_host) ) {
168                 win_config = win_config==1 ? 0 : 1;
169                 x11_host = win_config!=1 ? a_x11_host : b_x11_host;
170                 display_info.init_window(x11_host,0);
171                 screen = display_info.get_screen();
172         }
173         if( screen < 0 ) {
174                 x11_host = "";
175                 display_info.init_window(x11_host,1);
176         }
177         int screens = 1;
178         if( display_info.get_screen_count() > 1 )
179                 screens = strcmp(a_x11_host, b_x11_host) != 0 ? 2 : 1;
180         window_config = win_config;
181         BC_Window::set_default_x11_host(x11_host);
182         return screens;
183 }
184
185 void MainSession::default_window_positions(int window_config)
186 {
187 // 0 - all windows on a, playback_config a
188 // 1 - all windows on b, playback_config b
189 // 2 - all windows on a, except composer on b, playback_config b
190         int screens = set_default_x11_host(window_config);
191         mwindow->set_screens(screens);
192
193         BC_DisplayInfo display_info(BC_Window::get_default_x11_host());
194 // Get defaults based on root window size
195         int root_x = 0;
196         int root_y = 0;
197         int root_w = display_info.get_root_w();
198         int root_h = display_info.get_root_h();
199
200         int border_left = display_info.get_left_border();
201         int border_right = display_info.get_right_border();
202         int border_top = display_info.get_top_border();
203         int border_bottom = display_info.get_bottom_border();
204
205         int dual_head = screens > 1 ? 1 : 0;
206         int right_w = root_w;
207 // Wider than 16:9, narrower than dual head
208         if( screens < 2 && (float)root_w / root_h > 1.8) {
209                 dual_head = 1;
210                 switch( root_h ) {
211                 case 600:  right_w = 800;   break;
212                 case 720:  right_w = 1280;  break;
213                 case 1024: right_w = 1280;  break;
214                 case 1200: right_w = 1600;  break;
215                 case 1080: right_w = 1920;  break;
216                 default:   right_w = root_w/2;  break;
217                 }
218                 if( window_config == 1 ) {
219                         root_x = root_w - right_w;
220                         root_w = right_w;
221                 }
222                 else {
223                         // use same aspect ratio to compute left height
224                         root_w -= right_w;
225                         root_h = (root_w*root_h) / right_w;
226                 }
227         }
228
229         vwindow_x = root_x;
230         vwindow_y = root_y;
231         vwindow_w = root_w / 2 - border_left - border_right;
232         vwindow_h = root_h * 6 / 10 - border_top - border_bottom;
233
234         int b_root_w = root_w;
235         int b_root_h = root_h;
236         if( !dual_head || window_config != 2 ) {
237                 cwindow_x = root_x + root_w / 2;
238                 cwindow_y = root_y;
239                 cwindow_w = vwindow_w;
240                 cwindow_h = vwindow_h;
241         }
242         else {
243 // Get defaults based on root window size
244                 BC_DisplayInfo b_display_info(b_x11_host);
245                 b_root_w = b_display_info.get_root_w();
246                 b_root_h = b_display_info.get_root_h();
247                 cwindow_x = 50;
248                 cwindow_y = 50;
249                 cwindow_w = b_root_w-100;
250                 cwindow_h = b_root_h-100;
251         }
252
253         ctool_x = cwindow_x + cwindow_w / 2;
254         ctool_y = cwindow_y + cwindow_h / 2;
255
256         mwindow_x = root_x;
257         mwindow_y = vwindow_y + vwindow_h + border_top + border_bottom;
258         mwindow_w = root_w * 2 / 3 - border_left - border_right;
259         mwindow_h = root_h - mwindow_y - border_top - border_bottom;
260
261         awindow_x = mwindow_x + border_left + border_right + mwindow_w;
262         awindow_y = mwindow_y;
263         awindow_w = root_x + root_w - awindow_x - border_left - border_right;
264         awindow_h = mwindow_h;
265
266         bwindow_w = 520;
267         bwindow_h = 340;
268
269         ewindow_w = 640;
270         ewindow_h = 240;
271
272         channels_x = 0;
273         channels_y = 0;
274         picture_x = 0;
275         picture_y = 0;
276         scope_x = 0;
277         scope_y = 0;
278         scope_w = 640;
279         scope_h = 320;
280         histogram_x = 0;
281         histogram_y = 0;
282         histogram_w = 320;
283         histogram_h = 480;
284         record_scope = 0;
285         use_hist = 1;
286         use_wave = 1;
287         use_vector = 1;
288         use_hist_parade = 1;
289         use_wave_parade = 1;
290
291         if(mwindow->edl)
292                 lwindow_w = MeterPanel::get_meters_width(mwindow->theme,
293                         mwindow->edl->session->audio_channels,
294                         1);
295         else
296                 lwindow_w = 100;
297
298         lwindow_y = 0;
299         lwindow_x = root_w - lwindow_w;
300         lwindow_h = mwindow_y;
301
302         rwindow_x = root_x;
303         rwindow_y = root_y;
304         rwindow_h = 500;
305         rwindow_w = 650;
306
307         cswindow_x = root_x;
308         cswindow_y = root_y;
309         cswindow_w = 1280;
310         cswindow_h = 600;
311
312         if( !dual_head || window_config != 2 ) {
313                 rmonitor_x = rwindow_x + rwindow_w + 10;
314                 rmonitor_y = rwindow_y;
315                 rmonitor_w = root_x + root_w - rmonitor_x;
316                 rmonitor_h = rwindow_h;
317         }
318         else {
319                 rmonitor_x = cswindow_x = 50;
320                 rmonitor_y = cswindow_y = 50;
321                 rmonitor_w = b_root_w-100;
322                 rmonitor_h = b_root_h-100;
323                 if( cswindow_w < rmonitor_w ) cswindow_w = rmonitor_w;
324                 if( cswindow_h < rmonitor_h ) cswindow_h = rmonitor_h;
325         }
326
327         swindow_x = root_x;
328         swindow_y = root_y;
329         swindow_w = 600;
330         swindow_h = 400;
331
332         batchrender_w = 750;
333         batchrender_h = 400;
334         batchrender_x = root_w / 2 - batchrender_w / 2;
335         batchrender_y = root_h / 2 - batchrender_h / 2;
336 }
337
338 int MainSession::load_defaults(BC_Hash *defaults)
339 {
340 // Setup main windows
341         strcpy(a_x11_host, defaults->get("A_X11_HOST", a_x11_host));
342         strcpy(b_x11_host, defaults->get("B_X11_HOST", b_x11_host));
343         window_config = defaults->get("WINDOW_CONFIG", window_config);
344         default_window_positions(window_config);
345
346         vwindow_x = defaults->get("VWINDOW_X", vwindow_x);
347         vwindow_y = defaults->get("VWINDOW_Y", vwindow_y);
348         vwindow_w = defaults->get("VWINDOW_W", vwindow_w);
349         vwindow_h = defaults->get("VWINDOW_H", vwindow_h);
350
351
352         cwindow_x = defaults->get("CWINDOW_X", cwindow_x);
353         cwindow_y = defaults->get("CWINDOW_Y", cwindow_y);
354         cwindow_w = defaults->get("CWINDOW_W", cwindow_w);
355         cwindow_h = defaults->get("CWINDOW_H", cwindow_h);
356
357         ctool_x = defaults->get("CTOOL_X", ctool_x);
358         ctool_y = defaults->get("CTOOL_Y", ctool_y);
359
360         gwindow_x = defaults->get("GWINDOW_X", gwindow_x);
361         gwindow_y = defaults->get("GWINDOW_Y", gwindow_y);
362
363         mwindow_x = defaults->get("MWINDOW_X", mwindow_x);
364         mwindow_y = defaults->get("MWINDOW_Y", mwindow_y);
365         mwindow_w = defaults->get("MWINDOW_W", mwindow_w);
366         mwindow_h = defaults->get("MWINDOW_H", mwindow_h);
367
368         lwindow_x = defaults->get("LWINDOW_X", lwindow_x);
369         lwindow_y = defaults->get("LWINDOW_Y", lwindow_y);
370         lwindow_w = defaults->get("LWINDOW_W", lwindow_w);
371         lwindow_h = defaults->get("LWINDOW_H", lwindow_h);
372
373
374         awindow_x = defaults->get("AWINDOW_X", awindow_x);
375         awindow_y = defaults->get("AWINDOW_Y", awindow_y);
376         awindow_w = defaults->get("AWINDOW_W", awindow_w);
377         awindow_h = defaults->get("AWINDOW_H", awindow_h);
378
379         ewindow_w = defaults->get("EWINDOW_W", ewindow_w);
380         ewindow_h = defaults->get("EWINDOW_H", ewindow_h);
381
382         channels_x = defaults->get("CHANNELS_X", channels_x);
383         channels_y = defaults->get("CHANNELS_Y", channels_y);
384         picture_x = defaults->get("PICTURE_X", picture_x);
385         picture_y = defaults->get("PICTURE_Y", picture_y);
386         scope_x = defaults->get("SCOPE_X", scope_x);
387         scope_y = defaults->get("SCOPE_Y", scope_y);
388         scope_w = defaults->get("SCOPE_W", scope_w);
389         scope_h = defaults->get("SCOPE_H", scope_h);
390         histogram_x = defaults->get("HISTOGRAM_X", histogram_x);
391         histogram_y = defaults->get("HISTOGRAM_Y", histogram_y);
392         histogram_w = defaults->get("HISTOGRAM_W", histogram_w);
393         histogram_h = defaults->get("HISTOGRAM_H", histogram_h);
394         record_scope = defaults->get("RECORD_SCOPE", record_scope);
395         use_hist = defaults->get("USE_HIST", use_hist);
396         use_wave = defaults->get("USE_WAVE", use_wave);
397         use_vector = defaults->get("USE_VECTOR", use_vector);
398         use_hist_parade = defaults->get("USE_HIST_PARADE", use_hist_parade);
399         use_wave_parade = defaults->get("USE_WAVE_PARADE", use_wave_parade);
400
401 //printf("MainSession::load_defaults 1\n");
402
403 // Other windows
404         afolders_w = defaults->get("ABINS_W", 200);
405
406         bwindow_w = defaults->get("BWINDOW_W", bwindow_w);
407         bwindow_h = defaults->get("BWINDOW_H", bwindow_h);
408
409         rwindow_x = defaults->get("RWINDOW_X", rwindow_x);
410         rwindow_y = defaults->get("RWINDOW_Y", rwindow_y);
411         rwindow_w = defaults->get("RWINDOW_W", rwindow_w);
412         rwindow_h = defaults->get("RWINDOW_H", rwindow_h);
413
414         cswindow_x = defaults->get("CSWINDOW_X", cswindow_x);
415         cswindow_y = defaults->get("CSWINDOW_Y", cswindow_y);
416         cswindow_w = defaults->get("CSWINDOW_W", cswindow_w);
417         cswindow_h = defaults->get("CSWINDOW_H", cswindow_h);
418
419         swindow_x = defaults->get("SWINDOW_X", swindow_x);
420         swindow_y = defaults->get("SWINDOW_Y", swindow_y);
421         swindow_w = defaults->get("SWINDOW_W", swindow_w);
422         swindow_h = defaults->get("SWINDOW_H", swindow_h);
423
424         rmonitor_x = defaults->get("RMONITOR_X", rmonitor_x);
425         rmonitor_y = defaults->get("RMONITOR_Y", rmonitor_y);
426         rmonitor_w = defaults->get("RMONITOR_W", rmonitor_w);
427         rmonitor_h = defaults->get("RMONITOR_H", rmonitor_h);
428
429         batchrender_x = defaults->get("BATCHRENDER_X", batchrender_x);
430         batchrender_y = defaults->get("BATCHRENDER_Y", batchrender_y);
431         batchrender_w = defaults->get("BATCHRENDER_W", batchrender_w);
432         batchrender_h = defaults->get("BATCHRENDER_H", batchrender_h);
433
434         show_vwindow = defaults->get("SHOW_VWINDOW", 1);
435         show_awindow = defaults->get("SHOW_AWINDOW", 1);
436         show_cwindow = defaults->get("SHOW_CWINDOW", 1);
437         show_lwindow = defaults->get("SHOW_LWINDOW", 0);
438         show_gwindow = defaults->get("SHOW_GWINDOW", 0);
439
440         cwindow_controls = defaults->get("CWINDOW_CONTROLS", cwindow_controls);
441
442         plugindialog_w = defaults->get("PLUGINDIALOG_W", 510);
443         plugindialog_h = defaults->get("PLUGINDIALOG_H", 415);
444 //      presetdialog_w = defaults->get("PRESETDIALOG_W", 510);
445 //      presetdialog_h = defaults->get("PRESETDIALOG_H", 415);
446         keyframedialog_w = defaults->get("KEYFRAMEDIALOG_W", 320);
447         keyframedialog_h = defaults->get("KEYFRAMEDIALOG_H", 415);
448         keyframedialog_column1 = defaults->get("KEYFRAMEDIALOG_COLUMN1", 150);
449         keyframedialog_column2 = defaults->get("KEYFRAMEDIALOG_COLUMN2", 100);
450         keyframedialog_all = defaults->get("KEYFRAMEDIALOG_ALL", 0);
451         menueffect_w = defaults->get("MENUEFFECT_W", 580);
452         menueffect_h = defaults->get("MENUEFFECT_H", 350);
453         transitiondialog_w = defaults->get("TRANSITIONDIALOG_W", 320);
454         transitiondialog_h = defaults->get("TRANSITIONDIALOG_H", 512);
455
456         current_tip = defaults->get("CURRENT_TIP", current_tip);
457         actual_frame_rate = defaults->get("ACTUAL_FRAME_RATE", (float)-1);
458
459         boundaries();
460         return 0;
461 }
462
463 int MainSession::save_defaults(BC_Hash *defaults)
464 {
465         defaults->update("A_X11_HOST", a_x11_host);
466         defaults->update("B_X11_HOST", b_x11_host);
467         defaults->update("WINDOW_CONFIG", window_config);
468 // Window positions
469         defaults->update("MWINDOW_X", mwindow_x);
470         defaults->update("MWINDOW_Y", mwindow_y);
471         defaults->update("MWINDOW_W", mwindow_w);
472         defaults->update("MWINDOW_H", mwindow_h);
473
474         defaults->update("LWINDOW_X", lwindow_x);
475         defaults->update("LWINDOW_Y", lwindow_y);
476         defaults->update("LWINDOW_W", lwindow_w);
477         defaults->update("LWINDOW_H", lwindow_h);
478
479         defaults->update("VWINDOW_X", vwindow_x);
480         defaults->update("VWINDOW_Y", vwindow_y);
481         defaults->update("VWINDOW_W", vwindow_w);
482         defaults->update("VWINDOW_H", vwindow_h);
483
484         defaults->update("CWINDOW_X", cwindow_x);
485         defaults->update("CWINDOW_Y", cwindow_y);
486         defaults->update("CWINDOW_W", cwindow_w);
487         defaults->update("CWINDOW_H", cwindow_h);
488
489         defaults->update("CTOOL_X", ctool_x);
490         defaults->update("CTOOL_Y", ctool_y);
491
492         defaults->update("GWINDOW_X", gwindow_x);
493         defaults->update("GWINDOW_Y", gwindow_y);
494
495         defaults->update("AWINDOW_X", awindow_x);
496         defaults->update("AWINDOW_Y", awindow_y);
497         defaults->update("AWINDOW_W", awindow_w);
498         defaults->update("AWINDOW_H", awindow_h);
499
500         defaults->update("BWINDOW_W", bwindow_w);
501         defaults->update("BWINDOW_H", bwindow_h);
502
503         defaults->update("EWINDOW_W", ewindow_w);
504         defaults->update("EWINDOW_H", ewindow_h);
505
506         defaults->update("CHANNELS_X", channels_x);
507         defaults->update("CHANNELS_Y", channels_y);
508         defaults->update("PICTURE_X", picture_x);
509         defaults->update("PICTURE_Y", picture_y);
510         defaults->update("SCOPE_X", scope_x);
511         defaults->update("SCOPE_Y", scope_y);
512         defaults->update("SCOPE_W", scope_w);
513         defaults->update("SCOPE_H", scope_h);
514         defaults->update("HISTOGRAM_X", histogram_x);
515         defaults->update("HISTOGRAM_Y", histogram_y);
516         defaults->update("HISTOGRAM_W", histogram_w);
517         defaults->update("HISTOGRAM_H", histogram_h);
518         defaults->update("RECORD_SCOPE", record_scope);
519         defaults->update("USE_HIST", use_hist);
520         defaults->update("USE_WAVE", use_wave);
521         defaults->update("USE_VECTOR", use_vector);
522         defaults->update("USE_HIST_PARADE", use_hist_parade);
523         defaults->update("USE_WAVE_PARADE", use_wave_parade);
524
525         defaults->update("ABINS_W", afolders_w);
526
527         defaults->update("RMONITOR_X", rmonitor_x);
528         defaults->update("RMONITOR_Y", rmonitor_y);
529         defaults->update("RMONITOR_W", rmonitor_w);
530         defaults->update("RMONITOR_H", rmonitor_h);
531
532         defaults->update("RWINDOW_X", rwindow_x);
533         defaults->update("RWINDOW_Y", rwindow_y);
534         defaults->update("RWINDOW_W", rwindow_w);
535         defaults->update("RWINDOW_H", rwindow_h);
536
537         defaults->update("CSWINDOW_X", cswindow_x);
538         defaults->update("CSWINDOW_Y", cswindow_y);
539         defaults->update("CSWINDOW_W", cswindow_w);
540         defaults->update("CSWINDOW_H", cswindow_h);
541
542         defaults->update("SWINDOW_X", swindow_x);
543         defaults->update("SWINDOW_Y", swindow_y);
544         defaults->update("SWINDOW_W", swindow_w);
545         defaults->update("SWINDOW_H", swindow_h);
546
547         defaults->update("BATCHRENDER_X", batchrender_x);
548         defaults->update("BATCHRENDER_Y", batchrender_y);
549         defaults->update("BATCHRENDER_W", batchrender_w);
550         defaults->update("BATCHRENDER_H", batchrender_h);
551
552         defaults->update("SHOW_VWINDOW", show_vwindow);
553         defaults->update("SHOW_AWINDOW", show_awindow);
554         defaults->update("SHOW_CWINDOW", show_cwindow);
555         defaults->update("SHOW_LWINDOW", show_lwindow);
556         defaults->update("SHOW_GWINDOW", show_gwindow);
557
558         defaults->update("CWINDOW_CONTROLS", cwindow_controls);
559
560         defaults->update("PLUGINDIALOG_W", plugindialog_w);
561         defaults->update("PLUGINDIALOG_H", plugindialog_h);
562 //      defaults->update("PRESETDIALOG_W", presetdialog_w);
563 //      defaults->update("PRESETDIALOG_H", presetdialog_h);
564         defaults->update("KEYFRAMEDIALOG_W", keyframedialog_w);
565         defaults->update("KEYFRAMEDIALOG_H", keyframedialog_h);
566         defaults->update("KEYFRAMEDIALOG_COLUMN1", keyframedialog_column1);
567         defaults->update("KEYFRAMEDIALOG_COLUMN2", keyframedialog_column2);
568         defaults->update("KEYFRAMEDIALOG_ALL", keyframedialog_all);
569
570         defaults->update("MENUEFFECT_W", menueffect_w);
571         defaults->update("MENUEFFECT_H", menueffect_h);
572
573         defaults->update("TRANSITIONDIALOG_W", transitiondialog_w);
574         defaults->update("TRANSITIONDIALOG_H", transitiondialog_h);
575
576         defaults->update("ACTUAL_FRAME_RATE", actual_frame_rate);
577         defaults->update("CURRENT_TIP", current_tip);
578
579
580         return 0;
581 }