Check that the sound system is enabled before setting bell to System Notification (BR71551).

svn path=/trunk/kdebase/konsole/; revision=322009
wilder-portage
Kurt Hindenburg 22 years ago
parent 45cc65d563
commit 4c9ee3c6a3
  1. 14
      konsole/konsole.cpp
  2. 7
      konsole/konsole.h

@ -1337,6 +1337,15 @@ void Konsole::slotTabbarToggleDynamicHide()
switchToFlat();
}
// Check to see if the system-wide sound system is enabled.
void Konsole::checkSoundSystem()
{
KConfig *arts_config = new KConfig("kcmartsrc");
arts_config->setGroup("Arts");
b_soundSystemEnabled = arts_config->readBoolEntry("StartServer", false);
}
/* ------------------------------------------------------------------------- */
/* */
/* Configuration */
@ -1495,6 +1504,11 @@ void Konsole::readProperties(KConfig* config, const QString &schema, bool global
n_scroll = QMIN(config->readUnsignedNumEntry("scrollbar",TEWidget::SCRRIGHT),2);
n_tabbar = QMIN(config->readUnsignedNumEntry("tabbar",TabBottom),2);
n_bell = QMIN(config->readUnsignedNumEntry("bellmode",TEWidget::BELLSYSTEM),2);
checkSoundSystem();
if ( !b_soundSystemEnabled && (n_bell == BELLNOTIFY) )
n_bell = BELLSYSTEM;
// Options that should be applied to all sessions /////////////
// (1) set menu items and Konsole members

@ -111,6 +111,8 @@ public:
enum TabPosition { TabNone, TabTop, TabBottom };
enum TabViewModes { ShowIconAndText = 0, ShowTextOnly = 1, ShowIconOnly = 2 };
enum { BELLSYSTEM=0, BELLNOTIFY=1, BELLVISUAL=2 }; // From TEWidget.h
public slots:
void activateSession(int position);
void activateSession(QWidget*);
@ -264,6 +266,8 @@ private:
bool eventFilter( QObject *o, QEvent *e );
void checkSoundSystem();
QPtrList<TEWidget> activeTEs();
QPtrDict<TESession> action2session;
@ -397,6 +401,9 @@ private:
bool b_histEnabled:1;
bool b_fullScripting:1;
bool b_showstartuptip:1;
bool b_soundSystemEnabled;
unsigned int m_histSize;
int m_separator_id;

Loading…
Cancel
Save