Fixing sample file dialog initialization and other things - Alex
[terminatorX.git] / src / tX_global.c
index bab42717f6c7f967b97a065677709c8dc1ce1739..1434f2784e24d964d511e1a0fef8e80a6a7021b8 100644 (file)
@@ -125,13 +125,19 @@ void set_global_defaults() {
 #endif 
 #endif         
        globals.use_stdout_cmdline=0;
-       globals.current_path = NULL;
+       strcpy(globals.current_path, "");
        globals.pitch=1.0;
        globals.volume=1.0;
        
        strcpy(globals.lrdf_path, "/usr/share/ladspa/rdf:/usr/local/share/ladspa/rdf");
        globals.fullscreen_enabled=0;
+       globals.confirm_events=0;
        globals.compress_set_files=0;
+       
+       globals.vtt_inertia=10.0;
+       
+       globals.alsa_free_hwstats=1;
+       globals.filename_length=20;
 }
 
 int load_globals_xml() {
@@ -183,7 +189,8 @@ int load_globals_xml() {
                        restore_int("alsa_buffer_time", globals.alsa_buffer_time);
                        restore_int("alsa_period_time", globals.alsa_period_time);
                        restore_int("alsa_samplerate", globals.alsa_samplerate);
-
+                       restore_int("alsa_free_hwstats", globals.alsa_free_hwstats);
+                       
                        restore_string("xinput_device", globals.xinput_device);
                        restore_int("xinput_enable", globals.xinput_enable);
                        restore_int("update_idle", globals.update_idle);
@@ -192,6 +199,7 @@ int load_globals_xml() {
                        restore_float("mouse_speed", globals.mouse_speed);
                        restore_int("width", globals.width);
                        restore_int("height", globals.height);
+                       restore_int("filename_length", globals.filename_length);
                        restore_int("tooltips", globals.tooltips);
                        restore_int("use_stdout", globals.use_stdout);
                        restore_int("show_nag", globals.show_nag);
@@ -205,9 +213,12 @@ int load_globals_xml() {
                        restore_string("record_filename", globals.record_filename);
                        restore_string("file_editor", globals.file_editor);
                        restore_string("lrdf_path", globals.lrdf_path);
+                       restore_string("last_path", globals.current_path);
                        
                        restore_int("compress_set_files", globals.compress_set_files);
                        restore_int("fullscreen_enabled", globals.fullscreen_enabled);
+                       restore_int("confirm_events", globals.confirm_events);
+                       restore_float("vtt_inertia", globals.vtt_inertia);
 
                        if (!elementFound) {
                                fprintf(stderr, "tX: Unhandled XML element: \"%s\"\n", cur->name);
@@ -268,6 +279,7 @@ void store_globals() {
                store_int("alsa_buffer_time", globals.alsa_buffer_time);
                store_int("alsa_period_time", globals.alsa_period_time);
                store_int("alsa_samplerate", globals.alsa_samplerate);          
+               store_int("alsa_free_hwstats", globals.alsa_free_hwstats);
                
                store_string("xinput_device", globals.xinput_device);
                store_int("xinput_enable", globals.xinput_enable);
@@ -277,6 +289,7 @@ void store_globals() {
                store_float("mouse_speed", globals.mouse_speed);
                store_int("width", globals.width);
                store_int("height", globals.height);
+               store_int("filename_length", globals.filename_length);
                store_int("tooltips", globals.tooltips);
                store_int("use_stdout", globals.use_stdout);
                // globals.use_stdout_from_conf_file=0; What the heck is this?
@@ -293,7 +306,11 @@ void store_globals() {
                store_string("lrdf_path", globals.lrdf_path);
                store_int("compress_set_files", globals.compress_set_files);
                store_int("fullscreen_enabled", globals.fullscreen_enabled);
-               
+               store_int("confirm_events", globals.confirm_events);
+               store_float("vtt_inertia", globals.vtt_inertia);
+
+               store_string("last_path", globals.current_path);
+
                fprintf(rc,"</terminatorXrc>\n");
        }
 }