build background streams menus programatically
This commit is contained in:
parent
89de27a9c1
commit
5fc4cf7f94
|
@ -396,14 +396,6 @@ MainWindow::MainWindow(Application* app, SystemTrayIcon* tray_icon, OSD* osd,
|
||||||
IconLoader::Load("document-save", IconLoader::Base));
|
IconLoader::Load("document-save", IconLoader::Base));
|
||||||
ui_->action_full_library_scan->setIcon(
|
ui_->action_full_library_scan->setIcon(
|
||||||
IconLoader::Load("view-refresh", IconLoader::Base));
|
IconLoader::Load("view-refresh", IconLoader::Base));
|
||||||
#ifdef HAVE_BACKGROUND_STREAMS
|
|
||||||
ui_->action_rain->setIcon(
|
|
||||||
IconLoader::Load("weather-showers-scattered", IconLoader::Base));
|
|
||||||
ui_->action_hypnotoad->setIcon(
|
|
||||||
IconLoader::Load("hypnotoad", IconLoader::Base));
|
|
||||||
ui_->action_enterprise->setIcon(
|
|
||||||
IconLoader::Load("enterprise", IconLoader::Base));
|
|
||||||
#endif
|
|
||||||
ui_->action_kittens->setIcon(IconLoader::Load("kittens", IconLoader::Base));
|
ui_->action_kittens->setIcon(IconLoader::Load("kittens", IconLoader::Base));
|
||||||
ui_->action_love->setIcon(IconLoader::Load("love", IconLoader::Lastfm));
|
ui_->action_love->setIcon(IconLoader::Load("love", IconLoader::Lastfm));
|
||||||
|
|
||||||
|
@ -501,15 +493,29 @@ MainWindow::MainWindow(Application* app, SystemTrayIcon* tray_icon, OSD* osd,
|
||||||
connect(this, SIGNAL(NewDebugConsole(Console*)), app_,
|
connect(this, SIGNAL(NewDebugConsole(Console*)), app_,
|
||||||
SIGNAL(NewDebugConsole(Console*)));
|
SIGNAL(NewDebugConsole(Console*)));
|
||||||
|
|
||||||
|
// Add menus for background streams
|
||||||
#ifdef HAVE_BACKGROUND_STREAMS
|
#ifdef HAVE_BACKGROUND_STREAMS
|
||||||
background_streams_->AddAction("Rain", ui_->action_rain);
|
QAction* action_rain =
|
||||||
background_streams_->AddAction("Hypnotoad", ui_->action_hypnotoad);
|
ui_->menu_extras->addAction(tr("Rain"));
|
||||||
background_streams_->AddAction("Make it so!", ui_->action_enterprise);
|
action_rain->setIcon(
|
||||||
#else
|
IconLoader::Load("weather-showers-scattered", IconLoader::Base));
|
||||||
ui_->action_rain->setVisible(false);
|
action_rain->setCheckable(true);
|
||||||
ui_->action_hypnotoad->setVisible(false);
|
background_streams_->AddAction("Rain", action_rain);
|
||||||
ui_->action_enterprise->setVisible(false);
|
|
||||||
#endif // HAVE_BACKGROUND_STREAMS
|
QAction* action_hypnotoad =
|
||||||
|
ui_->menu_extras->addAction(tr("All Glory to the Hypnotoad!"));
|
||||||
|
action_hypnotoad->setIcon(
|
||||||
|
IconLoader::Load("hypnotoad", IconLoader::Base));
|
||||||
|
action_hypnotoad->setCheckable(true);
|
||||||
|
background_streams_->AddAction("Hypnotoad", action_hypnotoad);
|
||||||
|
|
||||||
|
QAction* action_enterprise =
|
||||||
|
ui_->menu_extras->addAction(tr("Make it so!"));
|
||||||
|
action_enterprise->setIcon(
|
||||||
|
IconLoader::Load("enterprise", IconLoader::Base));
|
||||||
|
action_enterprise->setCheckable(true);
|
||||||
|
background_streams_->AddAction("Make it so!", action_enterprise);
|
||||||
|
#endif
|
||||||
|
|
||||||
// Playlist view actions
|
// Playlist view actions
|
||||||
ui_->action_next_playlist->setShortcuts(
|
ui_->action_next_playlist->setShortcuts(
|
||||||
|
@ -951,7 +957,7 @@ MainWindow::MainWindow(Application* app, SystemTrayIcon* tray_icon, OSD* osd,
|
||||||
connect(ui_->now_playing, SIGNAL(ShowAboveStatusBarChanged(bool)),
|
connect(ui_->now_playing, SIGNAL(ShowAboveStatusBarChanged(bool)),
|
||||||
SLOT(NowPlayingWidgetPositionChanged(bool)));
|
SLOT(NowPlayingWidgetPositionChanged(bool)));
|
||||||
#ifdef HAVE_BACKGROUND_STREAMS
|
#ifdef HAVE_BACKGROUND_STREAMS
|
||||||
connect(ui_->action_hypnotoad, SIGNAL(toggled(bool)), ui_->now_playing,
|
connect(action_hypnotoad, SIGNAL(toggled(bool)), ui_->now_playing,
|
||||||
SLOT(AllHail(bool)));
|
SLOT(AllHail(bool)));
|
||||||
#endif
|
#endif
|
||||||
connect(ui_->action_kittens, SIGNAL(toggled(bool)), ui_->now_playing,
|
connect(ui_->action_kittens, SIGNAL(toggled(bool)), ui_->now_playing,
|
||||||
|
|
|
@ -541,9 +541,6 @@
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>&Extras</string>
|
<string>&Extras</string>
|
||||||
</property>
|
</property>
|
||||||
<addaction name="action_rain"/>
|
|
||||||
<addaction name="action_hypnotoad"/>
|
|
||||||
<addaction name="action_enterprise"/>
|
|
||||||
<addaction name="action_kittens"/>
|
<addaction name="action_kittens"/>
|
||||||
<addaction name="action_console"/>
|
<addaction name="action_console"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
|
@ -735,30 +732,6 @@
|
||||||
<string>Cover Manager</string>
|
<string>Cover Manager</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="action_rain">
|
|
||||||
<property name="checkable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string comment="Label for button to enable/disable rain background sound.">Rain</string>
|
|
||||||
</property>
|
|
||||||
</action>
|
|
||||||
<action name="action_hypnotoad">
|
|
||||||
<property name="checkable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string comment="Label for button to enable/disable Hypnotoad background sound.">All Glory to the Hypnotoad!</string>
|
|
||||||
</property>
|
|
||||||
</action>
|
|
||||||
<action name="action_enterprise">
|
|
||||||
<property name="checkable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string comment="Label for button to enable/disable Enterprise background sound.">Make it so!</string>
|
|
||||||
</property>
|
|
||||||
</action>
|
|
||||||
<action name="action_kittens">
|
<action name="action_kittens">
|
||||||
<property name="checkable">
|
<property name="checkable">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
|
|
Loading…
Reference in New Issue