Skip to content
This repository has been archived by the owner on Dec 17, 2017. It is now read-only.

Commit

Permalink
Updates device list when sound system settings changed
Browse files Browse the repository at this point in the history
  • Loading branch information
kuzmas committed Jan 28, 2014
1 parent 7bdc69d commit e4f5bdf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
14 changes: 8 additions & 6 deletions razorqt-panel/plugin-volume/razorvolume.cpp
Expand Up @@ -55,7 +55,8 @@ RazorVolume::RazorVolume(const IRazorPanelPluginStartupInfo &startupInfo):
IRazorPanelPlugin(startupInfo),
m_engine(0),
m_defaultSinkIndex(0),
m_defaultSink(0)
m_defaultSink(0),
m_configWindow(0)
{
m_volumeButton = new VolumeButton(this);

Expand Down Expand Up @@ -180,7 +181,8 @@ void RazorVolume::settingsChanged()

void RazorVolume::updateConfigurationSinkList()
{

if (m_configWindow)
m_configWindow->setSinkList(m_engine->sinks());
}

void RazorVolume::handleShortcutVolumeUp()
Expand Down Expand Up @@ -221,13 +223,13 @@ void RazorVolume::realign()

QDialog *RazorVolume::configureDialog()
{
RazorVolumeConfiguration *configWindow = new RazorVolumeConfiguration(*settings());
configWindow->setAttribute(Qt::WA_DeleteOnClose, true);
if (!m_configWindow)
m_configWindow = new RazorVolumeConfiguration(*settings());

if (m_engine)
configWindow->setSinkList(m_engine->sinks());
m_configWindow->setSinkList(m_engine->sinks());

return configWindow;
return m_configWindow;
}

#undef DEFAULT_UP_SHORTCUT
Expand Down
2 changes: 2 additions & 0 deletions razorqt-panel/plugin-volume/razorvolume.h
Expand Up @@ -37,6 +37,7 @@ class VolumeButton;
class AudioEngine;
class AudioDevice;
class RazorNotification;
class RazorVolumeConfiguration;
namespace GlobalKeyShortcut
{
class Action;
Expand Down Expand Up @@ -72,6 +73,7 @@ protected slots:
GlobalKeyShortcut::Action *m_keyVolumeDown;
GlobalKeyShortcut::Action *m_keyMuteToggle;
RazorNotification *m_notification;
RazorVolumeConfiguration *m_configWindow;
};


Expand Down

0 comments on commit e4f5bdf

Please sign in to comment.