Commit 1582b152 authored by Emmanuel Milou's avatar Emmanuel Milou

[#2349] Load/Save properly audio params

parent ad683d25
xml2po -o sflphone-usermanual.pot sflphone.xml
This diff is collapsed.
......@@ -815,7 +815,7 @@ GtkWidget* create_audio_configuration()
pa_mute_widget = gtk_check_button_new_with_mnemonic(_("_Mute other applications during a call"));
gtk_widget_set_sensitive(pa_mute_widget, pulse_audio);
gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(pa_mute_widget), dbus_get_pulse_app_volume_control() );
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (pa_mute_widget), (g_strcasecmp (dbus_get_pulse_app_volume_control(), "true") == 0)? TRUE: FALSE);
g_signal_connect(G_OBJECT( pa_mute_widget ) , "clicked" , G_CALLBACK( dbus_set_pulse_app_volume_control ) , NULL);
gtk_table_attach( GTK_TABLE(table), pa_mute_widget, 0, 1, 1, 2, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 5);
......
......@@ -292,7 +292,7 @@
</method>
<method name="getPulseAppVolumeControl">
<arg type="i" name="state" direction="out"/>
<arg type="s" name="state" direction="out"/>
</method>
<method name="setSipPort">
......@@ -303,21 +303,6 @@
<arg type="i" name="port" direction="out"/>
</method>
<method name="setStunServer">
<arg type="s" name="server" direction="in"/>
</method>
<method name="getStunServer">
<arg type="s" name="server" direction="out"/>
</method>
<method name="enableStun">
</method>
<method name="isStunEnabled">
<arg type="i" name="state" direction="out"/>
</method>
<!-- Addressbook configuration -->
<method name="getAddressbookSettings">
<annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="MapStringInt"/>
......
......@@ -2090,10 +2090,10 @@ dbus_set_pulse_app_volume_control( void )
}
}
int
gchar*
dbus_get_pulse_app_volume_control( void )
{
int state;
gchar* state;
GError* error = NULL;
org_sflphone_SFLphone_ConfigurationManager_get_pulse_app_volume_control(
configurationManagerProxy,
......@@ -2132,62 +2132,6 @@ dbus_get_sip_port( void )
return (guint)portNum;
}
gchar* dbus_get_stun_server (void)
{
GError* error = NULL;
gchar* server;
org_sflphone_SFLphone_ConfigurationManager_get_stun_server(
configurationManagerProxy,
&server,
&error);
if(error)
{
g_error_free(error);
}
return server;
}
void dbus_set_stun_server( gchar* server)
{
GError* error = NULL;
org_sflphone_SFLphone_ConfigurationManager_set_stun_server(
configurationManagerProxy,
server,
&error);
if(error)
{
g_error_free(error);
}
}
gint dbus_stun_is_enabled (void)
{
GError* error = NULL;
gint stun;
org_sflphone_SFLphone_ConfigurationManager_is_stun_enabled(
configurationManagerProxy,
&stun,
&error);
if(error)
{
g_error_free(error);
}
return stun;
}
void dbus_enable_stun (void)
{
GError* error = NULL;
org_sflphone_SFLphone_ConfigurationManager_enable_stun(
configurationManagerProxy,
&error);
if(error)
{
g_error_free(error);
}
}
GHashTable* dbus_get_addressbook_settings (void) {
GError *error = NULL;
......
......@@ -357,7 +357,7 @@ void dbus_set_pulse_app_volume_control( void );
/**
* ConfigurationManager - Get PA behaviour for the other sound streams
*/
int dbus_get_pulse_app_volume_control( void );
gchar* dbus_get_pulse_app_volume_control( void );
/**
* ConfigurationManager - Get the ringtone
......@@ -514,12 +514,6 @@ void dbus_set_sip_port(const guint portNum);
guint dbus_get_sip_port();
gchar* dbus_get_stun_server (void);
void dbus_set_stun_server( gchar* server);
gint dbus_stun_is_enabled (void);
void dbus_enable_stun (void);
void dbus_add_participant(const gchar* callID, const gchar* confID);
void dbus_set_record (const gchar * id);
......
......@@ -292,7 +292,7 @@
</method>
<method name="getPulseAppVolumeControl">
<arg type="i" name="state" direction="out"/>
<arg type="s" name="state" direction="out"/>
</method>
<method name="setSipPort">
......
......@@ -699,7 +699,7 @@ ConfigurationManager::getMailNotify (void)
return Manager::instance().getMailNotify();
}
int32_t
std::string
ConfigurationManager::getPulseAppVolumeControl (void)
{
return Manager::instance().getPulseAppVolumeControl();
......
......@@ -113,7 +113,7 @@ public:
void setNotify( void );
int32_t getMailNotify( void );
void setMailNotify( void );
int32_t getPulseAppVolumeControl( void );
std::string getPulseAppVolumeControl( void );
void setPulseAppVolumeControl( void );
int32_t getSipPort( void );
void setSipPort( const int32_t& portNum);
......
......@@ -2964,16 +2964,16 @@ ManagerImpl::getMailNotify (void)
return getConfigInt (PREFERENCES, CONFIG_MAIL_NOTIFY);
}
int32_t
std::string
ManagerImpl::getPulseAppVolumeControl (void)
{
return getConfigInt (PREFERENCES , CONFIG_PA_VOLUME_CTRL);
return getConfigString (PREFERENCES , CONFIG_PA_VOLUME_CTRL);
}
void
ManagerImpl::setPulseAppVolumeControl (void)
{
(getConfigInt (PREFERENCES , CONFIG_PA_VOLUME_CTRL) == 1) ? setConfig (PREFERENCES , CONFIG_PA_VOLUME_CTRL , FALSE_STR) : setConfig (PREFERENCES , CONFIG_PA_VOLUME_CTRL , TRUE_STR) ;
(getConfigString (PREFERENCES , CONFIG_PA_VOLUME_CTRL) == TRUE_STR) ? setConfig (PREFERENCES , CONFIG_PA_VOLUME_CTRL , FALSE_STR) : setConfig (PREFERENCES , CONFIG_PA_VOLUME_CTRL , TRUE_STR) ;
}
void ManagerImpl::setAudioManager (const int32_t& api)
......
......@@ -742,7 +742,7 @@ class ManagerImpl {
void switchAudioManager( void );
void setPulseAppVolumeControl( void );
int32_t getPulseAppVolumeControl( void );
std::string getPulseAppVolumeControl( void );
/**
* Get the desktop mail notification level
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment