mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-07-05 15:09:10 +02:00
2021-02-25 Fred Gleason <fredg@paravelsystems.com>
* Fixed a regression in sound panels where changing the name of a panel would fail to be reflected in the panel selector. * Fixed regressions in sound panels where configuration changes would not be updated properly. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
parent
6ee9578318
commit
a923e8953d
@ -21223,3 +21223,8 @@
|
||||
2021-02-25 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Fixed regressions in rdcartslots(1) that caused widgets to fail
|
||||
to update properly after reloading slots.
|
||||
2021-02-25 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Fixed a regression in sound panels where changing the name of
|
||||
a panel would fail to be reflected in the panel selector.
|
||||
* Fixed regressions in sound panels where configuration changes
|
||||
would not be updated properly.
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// Button Editor for SoundPanel
|
||||
//
|
||||
// (C) Copyright 2002-2019 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2021 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
|
||||
@ -18,15 +18,14 @@
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
|
||||
#include <qpushbutton.h>
|
||||
#include <qlabel.h>
|
||||
#include <qcolordialog.h>
|
||||
#include <rddb.h>
|
||||
#include <rdcart.h>
|
||||
#include <rdcart_dialog.h>
|
||||
#include <rd.h>
|
||||
#include <rdbutton_dialog.h>
|
||||
#include <rdconf.h>
|
||||
#include <QColorDialog>
|
||||
|
||||
#include "rdbutton_dialog.h"
|
||||
#include "rdcart.h"
|
||||
#include "rdcart_dialog.h"
|
||||
#include "rdconf.h"
|
||||
#include "rd.h"
|
||||
#include "rddb.h"
|
||||
|
||||
RDButtonDialog::RDButtonDialog(QString station_name,const QString &caption,
|
||||
const QString &label_template,
|
||||
@ -154,7 +153,7 @@ int RDButtonDialog::exec(RDPanelButton *button,bool hookmode,
|
||||
|
||||
void RDButtonDialog::setCartData()
|
||||
{
|
||||
if(edit_cart_dialog->exec(&edit_cart,RDCart::All,edit_svcname,NULL)==0) {
|
||||
if(edit_cart_dialog->exec(&edit_cart,RDCart::All,edit_svcname,NULL)) {
|
||||
DisplayCart(edit_cart);
|
||||
}
|
||||
}
|
||||
@ -205,13 +204,13 @@ void RDButtonDialog::okData()
|
||||
edit_button->setActiveLength(edit_button->length(edit_hookmode));
|
||||
edit_button->setHookMode(edit_hookmode);
|
||||
delete cart;
|
||||
done(0);
|
||||
done(true);
|
||||
}
|
||||
|
||||
|
||||
void RDButtonDialog::cancelData()
|
||||
{
|
||||
done(-1);
|
||||
done(false);
|
||||
}
|
||||
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// Edit a SoundPanel Panel Name
|
||||
//
|
||||
// (C) Copyright 2002-2019 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2021 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
|
||||
@ -18,8 +18,7 @@
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
|
||||
#include <qlabel.h>
|
||||
#include <qpushbutton.h>
|
||||
#include <QPushButton>
|
||||
|
||||
#include <rdedit_panel_name.h>
|
||||
|
||||
@ -85,11 +84,11 @@ QSizePolicy RDEditPanelName::sizePolicy() const
|
||||
void RDEditPanelName::okData()
|
||||
{
|
||||
*panel_name=panel_name_edit->text();
|
||||
done(0);
|
||||
done(true);
|
||||
}
|
||||
|
||||
|
||||
void RDEditPanelName::cancelData()
|
||||
{
|
||||
done(-1);
|
||||
done(false);
|
||||
}
|
||||
|
@ -746,8 +746,7 @@ void RDSoundPanel::buttonMapperData(int id)
|
||||
if(panel_button_dialog->
|
||||
exec(panel_buttons[PanelOffset(panel_type,panel_number)]->
|
||||
panelButton(row,col),panel_playmode_box->currentIndex()==1,
|
||||
rda->user()->name(),rda->user()->password())
|
||||
==0) {
|
||||
rda->user()->name(),rda->user()->password())) {
|
||||
SaveButton(panel_type,panel_number,row,col);
|
||||
}
|
||||
}
|
||||
@ -843,15 +842,18 @@ void RDSoundPanel::panelSetupData()
|
||||
{
|
||||
if(rda->user()->configPanels()||(panel_type==RDAirPlayConf::UserPanel)) {
|
||||
QString sql;
|
||||
RDSqlQuery *q;
|
||||
int cutpt=panel_selector_box->currentText().indexOf(" ");
|
||||
if(panel_selector_box->currentText().left(5)==tr("Panel")) {
|
||||
cutpt=-1;
|
||||
}
|
||||
QString tag=panel_selector_box->currentText().left(cutpt);
|
||||
|
||||
QString panel_name=panel_selector_box->currentText().
|
||||
right(panel_selector_box->currentText().length()-cutpt-1);
|
||||
RDEditPanelName *edn=new RDEditPanelName(&panel_name);
|
||||
if(edn->exec()==0) {
|
||||
if(edn->exec()) {
|
||||
panel_selector_box->
|
||||
setItemText(panel_selector_box->currentIndex(),tag+" "+panel_name);
|
||||
panel_selector_box->
|
||||
setCurrentIndex(panel_selector_box->
|
||||
findText("["+PanelTag(panel_selector_box->
|
||||
@ -860,15 +862,14 @@ void RDSoundPanel::panelSetupData()
|
||||
QString().sprintf("(TYPE=%d)&&",panel_type)+
|
||||
"(OWNER=\""+RDEscapeString(PanelOwner(panel_type))+"\")&&"+
|
||||
QString().sprintf("(PANEL_NO=%d)",panel_number);
|
||||
q=new RDSqlQuery(sql);
|
||||
delete q;
|
||||
RDSqlQuery::apply(sql);
|
||||
|
||||
sql=QString("insert into ")+panel_name_tablename+" set "+
|
||||
QString().sprintf("TYPE=%d,",panel_type)+
|
||||
"OWNER=\""+RDEscapeString(PanelOwner(panel_type))+"\","+
|
||||
QString().sprintf("PANEL_NO=%d,",panel_number)+
|
||||
"NAME=\""+RDEscapeString(panel_name)+"\"";
|
||||
q=new RDSqlQuery(sql);
|
||||
delete q;
|
||||
RDSqlQuery::apply(sql);
|
||||
}
|
||||
delete edn;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user