Add 'setCollection' to Cantata's DBUS interface.
BUG: 634
This commit is contained in:
committed by
craig.p.drummond
parent
7d256e5db8
commit
fe45cefb5b
@@ -21,6 +21,7 @@
|
||||
height. This should apply to all Linux Gtk-like styles, not just QGtkStyle.
|
||||
12. Use '#' for track number column title in table view.
|
||||
13. Allow setting of column alignments in table views.
|
||||
14. Add 'setCollection' to Cantata's DBUS interface.
|
||||
|
||||
1.5.2
|
||||
-----
|
||||
|
||||
@@ -12,5 +12,8 @@
|
||||
<method name="load">
|
||||
<arg name="urls" type="as" direction="in"/>
|
||||
</method>
|
||||
<method name="setCollection">
|
||||
<arg type="s" name="name" direction="in"/>
|
||||
</method>
|
||||
</interface>
|
||||
</node>
|
||||
|
||||
@@ -2366,6 +2366,21 @@ void MainWindow::dynamicStatus(const QString &message)
|
||||
#endif
|
||||
}
|
||||
|
||||
void MainWindow::setCollection(const QString &collection)
|
||||
{
|
||||
if (!connectionsAction->isVisible()) {
|
||||
return;
|
||||
}
|
||||
foreach (QAction *act, connectionsAction->menu()->actions()) {
|
||||
if (Utils::strippedText(act->text())==collection) {
|
||||
if (!act->isChecked()) {
|
||||
act->trigger();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::showPlayQueueSearch()
|
||||
{
|
||||
playQueueSearchWidget->activate();
|
||||
|
||||
@@ -166,6 +166,7 @@ public Q_SLOTS:
|
||||
void showError(const QString &message, bool showActions=false);
|
||||
void showInformation(const QString &message);
|
||||
void dynamicStatus(const QString &message);
|
||||
void setCollection(const QString &collection);
|
||||
void hideWindow();
|
||||
void restoreWindow();
|
||||
void load(const QStringList &urls) { playQueueModel.load(urls); }
|
||||
|
||||
Reference in New Issue
Block a user