comparison src/crossfade/configure.c @ 3134:354e90c81253

crossfade: more cleanups
author Michal Lipski <tallica@o2.pl>
date Thu, 07 May 2009 13:13:54 +0200
parents 130edf534967
children a9593b76cf19
comparison
equal deleted inserted replaced
3133:005959102811 3134:354e90c81253
1000 1000
1001 /* lock buffer */ 1001 /* lock buffer */
1002 MUTEX_LOCK(&buffer_mutex); 1002 MUTEX_LOCK(&buffer_mutex);
1003 1003
1004 /* free existing strings */ 1004 /* free existing strings */
1005 if (config->oss_alt_audio_device) g_free(config->oss_alt_audio_device);
1006 if (config->oss_alt_mixer_device) g_free(config->oss_alt_mixer_device);
1007 if (config->op_config_string) g_free(config->op_config_string); 1005 if (config->op_config_string) g_free(config->op_config_string);
1008 if (config->op_name) g_free(config->op_name); 1006 if (config->op_name) g_free(config->op_name);
1009 if (config->ep_name) g_free(config->ep_name); 1007 if (config->ep_name) g_free(config->ep_name);
1010 1008
1011 /* copy current settings (dupping the strings) */ 1009 /* copy current settings (dupping the strings) */
1012 *config = *xfg; 1010 *config = *xfg;
1013 config->oss_alt_audio_device = g_strdup(xfg->oss_alt_audio_device);
1014 config->oss_alt_mixer_device = g_strdup(xfg->oss_alt_mixer_device);
1015 config->op_config_string = g_strdup(xfg->op_config_string); 1011 config->op_config_string = g_strdup(xfg->op_config_string);
1016 config->op_name = g_strdup(xfg->op_name); 1012 config->op_name = g_strdup(xfg->op_name);
1017 config->ep_name = g_strdup(xfg->ep_name); 1013 config->ep_name = g_strdup(xfg->ep_name);
1018 1014
1019 /* tell the engine that the config has changed */ 1015 /* tell the engine that the config has changed */
1052 1048
1053 /* update config_win when window is destroyed */ 1049 /* update config_win when window is destroyed */
1054 gtk_signal_connect(GTK_OBJECT(config_win), "destroy", GTK_SIGNAL_FUNC(gtk_widget_destroyed), &config_win); 1050 gtk_signal_connect(GTK_OBJECT(config_win), "destroy", GTK_SIGNAL_FUNC(gtk_widget_destroyed), &config_win);
1055 1051
1056 /* free any strings that might be left in our local copy of the config */ 1052 /* free any strings that might be left in our local copy of the config */
1057 if (xfg->oss_alt_audio_device) g_free(xfg->oss_alt_audio_device);
1058 if (xfg->oss_alt_mixer_device) g_free(xfg->oss_alt_mixer_device);
1059 if (xfg->op_config_string) g_free(xfg->op_config_string); 1053 if (xfg->op_config_string) g_free(xfg->op_config_string);
1060 if (xfg->op_name) g_free(xfg->op_name); 1054 if (xfg->op_name) g_free(xfg->op_name);
1061 if (xfg->ep_name) g_free(xfg->ep_name); 1055 if (xfg->ep_name) g_free(xfg->ep_name);
1062 1056
1063 /* copy current settings (dupping the strings) */ 1057 /* copy current settings (dupping the strings) */
1064 *xfg = *config; 1058 *xfg = *config;
1065 xfg->oss_alt_audio_device = g_strdup(config->oss_alt_audio_device);
1066 xfg->oss_alt_mixer_device = g_strdup(config->oss_alt_mixer_device);
1067 xfg->op_config_string = g_strdup(config->op_config_string); 1059 xfg->op_config_string = g_strdup(config->op_config_string);
1068 xfg->op_name = g_strdup(config->op_name); 1060 xfg->op_name = g_strdup(config->op_name);
1069 xfg->ep_name = g_strdup(config->ep_name); 1061 xfg->ep_name = g_strdup(config->ep_name);
1070 1062
1071 /* go to remembered notebook page */ 1063 /* go to remembered notebook page */