diff --git a/sflphone-client-gnome/src/config/audioconf.c b/sflphone-client-gnome/src/config/audioconf.c index bab96d27e7695ffc761541135ba5af91fe791516..d27b64d2f246e92d73b701036bafc14fbf3a4199 100644 --- a/sflphone-client-gnome/src/config/audioconf.c +++ b/sflphone-client-gnome/src/config/audioconf.c @@ -767,7 +767,7 @@ select_audio_manager( void ) if (gtk_toggle_action_get_active ( GTK_TOGGLE_ACTION (volumeToggle))) { main_window_volume_controls(FALSE); - dbus_set_volume_controls (FALSE); + eel_gconf_set_integer (SHOW_VOLUME_CONTROLS, FALSE); gtk_toggle_action_set_active ( GTK_TOGGLE_ACTION (volumeToggle), FALSE); } gtk_action_set_sensitive (GTK_ACTION (volumeToggle), FALSE); diff --git a/sflphone-client-gnome/src/dbus/dbus.c b/sflphone-client-gnome/src/dbus/dbus.c index ac3ec7cb14c4182de071a02a86bb2c372223ba73..a14d089e5a70f3b058ed2f69251232482b33316c 100644 --- a/sflphone-client-gnome/src/dbus/dbus.c +++ b/sflphone-client-gnome/src/dbus/dbus.c @@ -1726,32 +1726,6 @@ dbus_set_searchbar() } } -int -dbus_get_volume_controls() -{ - int state; - GError* error = NULL; - org_sflphone_SFLphone_ConfigurationManager_get_volume_controls( - configurationManagerProxy, &state, &error); - if (error) - { - g_error_free(error); - } - return state; -} - -void -dbus_set_volume_controls(gboolean display) -{ - GError* error = NULL; - org_sflphone_SFLphone_ConfigurationManager_set_volume_controls( - configurationManagerProxy, display, &error); - if (error) - { - g_error_free(error); - } -} - void dbus_join_participant(const gchar* sel_callID, const gchar* drag_callID) { diff --git a/sflphone-client-gnome/src/dbus/dbus.h b/sflphone-client-gnome/src/dbus/dbus.h index e7fce25dbfe200f6acf3e400b1972ea9a3de14b3..2ebdceae5e59f16e9c9616bc5eed604607a89d5f 100644 --- a/sflphone-client-gnome/src/dbus/dbus.h +++ b/sflphone-client-gnome/src/dbus/dbus.h @@ -414,18 +414,6 @@ void dbus_set_searchbar( ); */ int dbus_get_searchbar( void ); -/** - * ConfigurationManager - Set the volume controls visible or not - */ -void dbus_set_volume_controls (gboolean display); - -/** - * ConfigurationManager - Tells if the user wants to display the volume controls or not - * @return int 1 if the controls have to be displayed - * 0 otherwise - */ -int dbus_get_volume_controls( void ); - /** * ConfigurationManager - Configure the start-up option * At startup, SFLphone can be displayed or start hidden in the system tray diff --git a/sflphone-client-gnome/src/sflphone_const.h b/sflphone-client-gnome/src/sflphone_const.h index a0020b8fa43c5ecef0a524da2b96844223b3d6a2..c675713d2a88128d574abf277b83b3a6f5b444cb 100644 --- a/sflphone-client-gnome/src/sflphone_const.h +++ b/sflphone-client-gnome/src/sflphone_const.h @@ -140,7 +140,7 @@ log4c_category_t* log4c_sfl_gtk_category; /** Show/Hide the alsa configuration panel */ #define SHOW_ALSA_CONF ( dbus_get_audio_manager() == ALSA ) /** Show/Hide the volume controls */ -#define SHOW_VOLUME (dbus_get_volume_controls() && SHOW_ALSA_CONF) +#define SHOW_VOLUME (eel_gconf_get_integer (SHOW_VOLUME_CONTROLS) && SHOW_ALSA_CONF) /** Audio Managers */ #define ALSA 0 @@ -187,6 +187,7 @@ log4c_category_t* log4c_sfl_gtk_category; #define CONF_MAIN_WINDOW_POSITION_Y CONF_PREFIX "/state/window_position_y" /** Show/Hide the dialpad */ #define CONF_SHOW_DIALPAD CONF_PREFIX "/state/dialpad" +#define SHOW_VOLUME_CONTROLS CONF_PREFIX "/state/volume_controls" #define NOTIFY_ALL CONF_PREFIX "/state/notify_all" #endif diff --git a/sflphone-client-gnome/src/uimanager.c b/sflphone-client-gnome/src/uimanager.c index 6812ba62eff24bdaa4f5b4e2c80c58b152749d8d..d5ed013e54934dab092e5ac5b942a278342ad77c 100644 --- a/sflphone-client-gnome/src/uimanager.c +++ b/sflphone-client-gnome/src/uimanager.c @@ -353,7 +353,7 @@ volume_bar_cb(GtkToggleAction *togglemenuitem, gpointer user_data) return; main_window_volume_controls(toggled); if (toggled || SHOW_VOLUME) - dbus_set_volume_controls(toggled); + eel_gconf_set_integer (SHOW_VOLUME_CONTROLS, toggled); } static void