mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-11 09:03:40 +02:00
2021-02-23 Fred Gleason <fredg@paravelsystems.com>
* Removed the Qt3Support library from the build system. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
## Makefile.am
|
||||
##
|
||||
## (C) Copyright 2002-2020 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
|
||||
@@ -17,7 +17,7 @@
|
||||
##
|
||||
## Use automake to process this into a Makefile.in
|
||||
|
||||
AM_CPPFLAGS = -Wall -DPREFIX=\"$(prefix)\" -I$(top_srcdir)/lib @QT4_CFLAGS@ @MUSICBRAINZ_CFLAGS@ -DQT3_SUPPORT -I/usr/include/Qt3Support
|
||||
AM_CPPFLAGS = -Wall -DPREFIX=\"$(prefix)\" -I$(top_srcdir)/lib @QT4_CFLAGS@ @MUSICBRAINZ_CFLAGS@
|
||||
LIBS = -L$(top_srcdir)/lib
|
||||
MOC = @QT_MOC@
|
||||
|
||||
@@ -31,7 +31,7 @@ dist_rdsoftkeys_SOURCES = rdsoftkeys.cpp rdsoftkeys.h
|
||||
|
||||
nodist_rdsoftkeys_SOURCES = moc_rdsoftkeys.cpp
|
||||
|
||||
rdsoftkeys_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ -lQt3Support
|
||||
rdsoftkeys_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@
|
||||
|
||||
CLEANFILES = *~\
|
||||
*.exe\
|
||||
|
@@ -61,7 +61,7 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
// Create And Set Icon
|
||||
//
|
||||
key_icon_map=new QPixmap(rivendell_22x22_xpm);
|
||||
setIcon(*key_icon_map);
|
||||
setWindowIcon(*key_icon_map);
|
||||
|
||||
//
|
||||
// RML Send Socket
|
||||
@@ -106,7 +106,7 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
QString().sprintf("Color%d",n+1),"")).
|
||||
isEmpty()) {
|
||||
color=QColor(color_name);
|
||||
QPalette pal=QPalette(color,backgroundColor());
|
||||
QPalette pal=QPalette(color,palette().color(QPalette::Background));
|
||||
color.getHsv(&h,&s,&v);
|
||||
if((h>180)&&(h<300)) {
|
||||
v=255;
|
||||
@@ -121,8 +121,8 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
}
|
||||
s=0;
|
||||
color.setHsv(h,s,v);
|
||||
pal.setColor(QPalette::Active,QColorGroup::ButtonText,color);
|
||||
pal.setColor(QPalette::Inactive,QColorGroup::ButtonText,color);
|
||||
pal.setColor(QPalette::Active,QPalette::ButtonText,color);
|
||||
pal.setColor(QPalette::Inactive,QPalette::ButtonText,color);
|
||||
button->setPalette(pal);
|
||||
}
|
||||
mapper->setMapping(button,n);
|
||||
@@ -142,8 +142,7 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
//
|
||||
if (!key_macros.size()) {
|
||||
QMessageBox::critical(this, tr("RDSoftKeys"),
|
||||
tr(QString("No SoftKey definitions found in file\n%1")
|
||||
.arg(map_filename)));
|
||||
tr("No SoftKey definitions found in file")+"\n"+map_filename);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@@ -182,7 +181,7 @@ QSizePolicy MainWidget::sizePolicy() const
|
||||
void MainWidget::buttonData(int id)
|
||||
{
|
||||
QHostAddress addr;
|
||||
struct hostent *hostent=gethostbyname(key_addrs[id]);
|
||||
struct hostent *hostent=gethostbyname(key_addrs[id].toUtf8().constData());
|
||||
if(hostent==NULL) {
|
||||
QMessageBox::warning(this,tr("RDSoftKeys"),hstrerror(h_errno));
|
||||
return;
|
||||
@@ -196,7 +195,7 @@ void MainWidget::buttonData(int id)
|
||||
addr.setAddress(key_addrs[id]);
|
||||
}
|
||||
key_socket->
|
||||
writeDatagram(key_macros[id].toUtf8(),addr,(Q_UINT16)RD_RML_NOECHO_PORT);
|
||||
writeDatagram(key_macros[id].toUtf8(),addr,(uint16_t)RD_RML_NOECHO_PORT);
|
||||
}
|
||||
|
||||
|
||||
@@ -217,26 +216,28 @@ int main(int argc,char *argv[])
|
||||
QString tr_path;
|
||||
QString qt_path;
|
||||
|
||||
tr_path=QString(PREFIX)+QString("/share/srlabs/");
|
||||
qt_path=QString("/usr/share/qt4/translation/");
|
||||
QString loc=RDApplication::locale();
|
||||
if(!loc.isEmpty()) {
|
||||
tr_path=QString(PREFIX)+QString("/share/srlabs/");
|
||||
qt_path=QString("/usr/share/qt4/translation/");
|
||||
|
||||
QTranslator qt(0);
|
||||
qt.load(qt_path+QString("qt_")+QTextCodec::locale(),".");
|
||||
a.installTranslator(&qt);
|
||||
QTranslator qt(0);
|
||||
qt.load(qt_path+QString("qt_")+loc,".");
|
||||
a.installTranslator(&qt);
|
||||
|
||||
QTranslator libradio(0);
|
||||
libradio.load(tr_path+QString("librd_")+QTextCodec::locale(),".");
|
||||
a.installTranslator(&libradio);
|
||||
QTranslator libradio(0);
|
||||
libradio.load(tr_path+QString("librd_")+loc,".");
|
||||
a.installTranslator(&libradio);
|
||||
|
||||
QTranslator tests(0);
|
||||
tests.load(tr_path+QString("rdsoftkeys_")+QTextCodec::locale(),".");
|
||||
a.installTranslator(&tests);
|
||||
QTranslator tests(0);
|
||||
tests.load(tr_path+QString("rdsoftkeys_")+loc,".");
|
||||
a.installTranslator(&tests);
|
||||
}
|
||||
|
||||
//
|
||||
// Start Event Loop
|
||||
//
|
||||
MainWidget *w=new MainWidget();
|
||||
a.setMainWidget(w);
|
||||
w->setGeometry(w->geometry().x(),w->geometry().y(),w->sizeHint().width(),w->sizeHint().height());
|
||||
w->show();
|
||||
return a.exec();
|
||||
|
Reference in New Issue
Block a user