2024-08-26 Fred Gleason <fredg@paravelsystems.com>

* Modified the 'Select Log' dialog in the voice tracker in
	rdairplay(1) so as to retain previous service selection across
	invocations.
	* Modified the 'Podcast Item List' dialog in rdcastmanager(1) so as
	to retain previous service selection across invocations.
	* Modified the 'Edit Log Chain' dialog in rdlogedit(1) so as
	to retain previous user group selection across invocations.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason
2024-08-26 12:14:48 -04:00
parent 4afb55452e
commit 7599ec34ae
13 changed files with 78 additions and 69 deletions

View File

@@ -2,7 +2,7 @@
//
// Filter widget for picking Rivendell logs.
//
// (C) Copyright 2017-2022 Fred Gleason <fredg@paravelsystems.com>
// (C) Copyright 2017-2024 Fred Gleason <fredg@paravelsystems.com>
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2 as
@@ -184,18 +184,22 @@ QString RDLogFilter::limitSql() const
void RDLogFilter::changeUser()
{
if(filter_filter_mode==RDLogFilter::UserFilter) {
filter_service_box->clear();
filter_service_box->insertItem(filter_service_box->count(),tr("ALL"));
QString sql=QString("select `SERVICE_NAME` from `USER_SERVICE_PERMS` where ")+
"`USER_NAME`='"+RDEscapeString(rda->user()->name())+"' "+
"order by `SERVICE_NAME`";
RDSqlQuery *q=new RDSqlQuery(sql);
while(q->next()) {
filter_service_box->
insertItem(filter_service_box->count(),rda->iconEngine()->serviceIcon(),
q->value(0).toString());
if(filter_current_username!=rda->user()->name()) {
filter_service_box->clear();
filter_service_box->insertItem(filter_service_box->count(),tr("ALL"));
QString sql=
QString("select `SERVICE_NAME` from `USER_SERVICE_PERMS` where ")+
"`USER_NAME`='"+RDEscapeString(rda->user()->name())+"' "+
"order by `SERVICE_NAME`";
RDSqlQuery *q=new RDSqlQuery(sql);
while(q->next()) {
filter_service_box->insertItem(filter_service_box->count(),
rda->iconEngine()->serviceIcon(),
q->value(0).toString());
}
delete q;
filter_current_username=rda->user()->name();
}
delete q;
}
}