Summary: | Play... Button stays enabled when no sound file | ||
---|---|---|---|
Product: | kab3 | Reporter: | Agron <agron> |
Component: | general | Assignee: | Tobias Koenig <tokoe> |
Status: | RESOLVED UNMAINTAINED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 3.2 | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Agron
2004-01-23 02:52:35 UTC
Subject: kdepim/kaddressbook CVS commit by tokoe: Enable/Disable the play button according to the content of the URL widget. That fixes #73300 and #73301. CCMAIL:73300-done@bugs.kde.org,73301-done@bugs.kde.org M +32 -23 soundwidget.cpp 1.8 M +20 -19 soundwidget.h 1.6 --- kdepim/kaddressbook/soundwidget.h #1.5:1.6 @@ -1,5 +1,5 @@ /* This file is part of KAddressBook. - Copyright (c) 2003 Tobias Koenig <tokoe@kde.org> + Copyright (c) 2003 - 2004 Tobias Koenig <tokoe@kde.org> This program is free software; you can redistribute it and/or modify @@ -50,4 +50,5 @@ class SoundWidget : public KAB::ContactE void loadSound(); void updateGUI(); + void urlChanged( const QString& ); private: --- kdepim/kaddressbook/soundwidget.cpp #1.7:1.8 @@ -1,5 +1,5 @@ /* This file is part of KAddressBook. - Copyright (c) 2003 Tobias Koenig <tokoe@kde.org> + Copyright (c) 2003 - 2004 Tobias Koenig <tokoe@kde.org> This program is free software; you can redistribute it and/or modify @@ -64,4 +64,6 @@ SoundWidget::SoundWidget( KABC::AddressB connect( mSoundUrl, SIGNAL( textChanged( const QString& ) ), SIGNAL( changed() ) ); + connect( mSoundUrl, SIGNAL( textChanged( const QString& ) ), + SLOT( urlChanged( const QString& ) ) ); connect( mUseSoundUrl, SIGNAL( toggled( bool ) ), SIGNAL( changed() ) ); @@ -159,7 +161,14 @@ void SoundWidget::loadSound() void SoundWidget::updateGUI() { - if ( !mReadOnly ) - mUseSoundUrl->setEnabled( true ); - mPlayButton->setEnabled( true ); + mUseSoundUrl->setEnabled( !mReadOnly ); +} + +void SoundWidget::urlChanged( const QString &url ) +{ + if ( !mUseSoundUrl->isChecked() ) { + bool state = !url.isEmpty(); + mPlayButton->setEnabled( state ); + mUseSoundUrl->setEnabled( state && !mSound.isIntern() ); + } } The development of the old KAddressBook will be discontinued for KDE 4.4. Since the new application has the same name, but a completly new code base we close all bug reports against the old version and ask the submitters to resend there reports against the new product. |