Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/jarabe/model/sound.py
diff options
context:
space:
mode:
authorSimon Schampijer <erikos@localhost.localdomain>2008-10-11 16:19:59 (GMT)
committer Simon Schampijer <erikos@localhost.localdomain>2008-10-11 16:19:59 (GMT)
commit8361ca82ae89ce8b038a4faa8274b2b88cfe81a6 (patch)
treed89a24023f019235a88c104b10fa6a2291bd82c8 /src/jarabe/model/sound.py
parent38cb73f56dd83c58252a27ace7b067109cefa311 (diff)
Use gconf for the profile
Diffstat (limited to 'src/jarabe/model/sound.py')
-rw-r--r--src/jarabe/model/sound.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/jarabe/model/sound.py b/src/jarabe/model/sound.py
index c6cb75f..65090a4 100644
--- a/src/jarabe/model/sound.py
+++ b/src/jarabe/model/sound.py
@@ -14,7 +14,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-from sugar.profile import get_profile
+import gconf
+
from sugar import env
from sugar import _sugarext
from sugar import dispatch
@@ -46,13 +47,12 @@ def set_muted(new_state):
def save():
if env.is_emulator() is False:
- profile = get_profile()
- profile.sound_volume = get_volume()
- profile.save()
+ client = gconf.client_get_default()
+ client.set_int('/desktop/sugar/sound/volume', get_volume())
def restore():
if env.is_emulator() is False:
- profile = get_profile()
- set_volume(profile.sound_volume)
+ client = gconf.client_get_default()
+ set_volume(client.get_int('/desktop/sugar/sound/volume'))
_volume = _sugarext.VolumeAlsa()