-rw-r--r-- | core/applets/volumeapplet/volume.cpp | 7 | ||||
-rw-r--r-- | core/applets/volumeapplet/volumeappletimpl.cpp | 12 |
2 files changed, 17 insertions, 2 deletions
diff --git a/core/applets/volumeapplet/volume.cpp b/core/applets/volumeapplet/volume.cpp index 069f8ab..19e71c5 100644 --- a/core/applets/volumeapplet/volume.cpp +++ b/core/applets/volumeapplet/volume.cpp | |||
@@ -325,16 +325,23 @@ void VolumeApplet::micChanged( bool nowMuted ) | |||
325 | 325 | ||
326 | void VolumeApplet::mute( bool toggled ) | 326 | void VolumeApplet::mute( bool toggled ) |
327 | { | 327 | { |
328 | muted = toggled; | 328 | muted = toggled; |
329 | 329 | ||
330 | // clear if removing mute | 330 | // clear if removing mute |
331 | repaint( !toggled ); | 331 | repaint( !toggled ); |
332 | writeSystemVolume(); | 332 | writeSystemVolume(); |
333 | Config cfg("qpe"); | ||
334 | cfg.setGroup("Volume"); | ||
335 | if(muted) | ||
336 | cfg.writeEntry("Mute", "TRUE"); | ||
337 | else | ||
338 | cfg.writeEntry("Mute", "FALSE"); | ||
339 | cfg.write(); | ||
333 | } | 340 | } |
334 | 341 | ||
335 | 342 | ||
336 | void VolumeApplet::sliderMoved( int percent ) | 343 | void VolumeApplet::sliderMoved( int percent ) |
337 | { | 344 | { |
338 | setVolume( 100 - percent ); | 345 | setVolume( 100 - percent ); |
339 | } | 346 | } |
340 | 347 | ||
diff --git a/core/applets/volumeapplet/volumeappletimpl.cpp b/core/applets/volumeapplet/volumeappletimpl.cpp index fb2b79f..943e71a 100644 --- a/core/applets/volumeapplet/volumeappletimpl.cpp +++ b/core/applets/volumeapplet/volumeappletimpl.cpp | |||
@@ -15,33 +15,41 @@ | |||
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #include "volume.h" | 20 | #include "volume.h" |
21 | #include "volumeappletimpl.h" | 21 | #include "volumeappletimpl.h" |
22 | #include <qpe/qcopenvelope_qws.h> | 22 | #include <qpe/qcopenvelope_qws.h> |
23 | 23 | #include <qpe/config.h> | |
24 | 24 | ||
25 | VolumeAppletImpl::VolumeAppletImpl() | 25 | VolumeAppletImpl::VolumeAppletImpl() |
26 | : volume(0), ref(0) | 26 | : volume(0), ref(0) |
27 | { | 27 | { |
28 | } | 28 | } |
29 | 29 | ||
30 | VolumeAppletImpl::~VolumeAppletImpl() | 30 | VolumeAppletImpl::~VolumeAppletImpl() |
31 | { | 31 | { |
32 | delete volume; | 32 | delete volume; |
33 | } | 33 | } |
34 | 34 | ||
35 | QWidget *VolumeAppletImpl::applet( QWidget *parent ) | 35 | QWidget *VolumeAppletImpl::applet( QWidget *parent ) |
36 | { | 36 | { |
37 | if ( !volume ) | 37 | if ( !volume ) |
38 | volume = new VolumeApplet( parent ); | 38 | volume = new VolumeApplet( parent ); |
39 | QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << TRUE; //mute | 39 | |
40 | Config cfg("qpe"); | ||
41 | cfg.setGroup("Volume"); | ||
42 | QString foo = cfg.readEntry("Mute","TRUE"); | ||
43 | bool muted; | ||
44 | if(foo.find("TRUE",0,TRUE) != -1) | ||
45 | muted = TRUE; | ||
46 | else muted = FALSE; | ||
47 | QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << muted; //mute | ||
40 | return volume; | 48 | return volume; |
41 | } | 49 | } |
42 | 50 | ||
43 | int VolumeAppletImpl::position() const | 51 | int VolumeAppletImpl::position() const |
44 | { | 52 | { |
45 | return 6; | 53 | return 6; |
46 | } | 54 | } |
47 | 55 | ||