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