Skip to content

Commit

Permalink
Merge pull request #2 from corrados/master
Browse files Browse the repository at this point in the history
update
  • Loading branch information
ignotus666 authored Jun 8, 2020
2 parents 88064b5 + bde6e0b commit 871e082
Show file tree
Hide file tree
Showing 18 changed files with 531 additions and 421 deletions.
9 changes: 9 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

3.5.6git

- support sorting faders by channel name (#178)

- enable/disable recording from command line, coded by pljones (#228)

- add Audacity "list of files" writer to jam recorder, by pljones (#315)
Expand All @@ -24,6 +26,13 @@
by OS level Nap, Sleep, and Thread Priority systems, coded by AronVietti (#23)


TODO fix Windows installer: fix check for app run, fix Qt dlls missing








3.5.5 (2020-05-26)
Expand Down
2 changes: 1 addition & 1 deletion distributions/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
jamulus (3.5.2) UNRELEASED; urgency=medium
jamulus (3.5.6~git-0) UNRELEASED; urgency=medium

* Initial release.

Expand Down
3 changes: 2 additions & 1 deletion distributions/debian/copyright
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ License: GPL-2

Files: debian/*
Copyright:
2020 Tormod Volden <[email protected]>
2020 Olivier Humbert <[email protected]>
2019 "Marc Landolt jr" <[email protected]>
2019 Marc Landolt jr <[email protected]>
License: GPL-2

License: GPL-2
Expand Down
1 change: 1 addition & 0 deletions distributions/debian/jamulus.install
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
distributions/jamulus-server.service lib/systemd/system
13 changes: 1 addition & 12 deletions distributions/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,8 @@
dh $@

override_dh_auto_configure:
qmake CONFIG+=noupcasename Jamulus.pro
qmake CONFIG+=noupcasename PREFIX=/usr Jamulus.pro

override_dh_auto_build:
cd src/res/translation && lrelease *.ts
dh_auto_build

override_dh_usrlocal:
echo $$(pwd)
mkdir -p $$(pwd)/debian/jamulus/usr/bin/
install -D -m 0755 jamulus $$(pwd)/debian/jamulus/usr/bin/
mkdir -p $$(pwd)/debian/jamulus/usr/share/applications/
install -D -m 0755 $$(pwd)/distributions/jamulus.desktop $$(pwd)/debian/jamulus/usr/share/applications/
mkdir -p $$(pwd)/debian/jamulus/usr/share/icons/hicolor/512x512/apps/
cp $$(pwd)/distributions/jamulus.png $$(pwd)/debian/jamulus/usr/share/icons/hicolor/512x512/apps/
mkdir -p $$(pwd)/debian/jamulus/lib/systemd/system
cp $$(pwd)/distributions/jamulus-server.service $$(pwd)/debian/jamulus/lib/systemd/system/
1 change: 1 addition & 0 deletions distributions/debian/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0 (quilt)
67 changes: 47 additions & 20 deletions src/audiomixerboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@
/******************************************************************************\
* CChanneFader *
\******************************************************************************/
CChannelFader::CChannelFader ( QWidget* pNW,
QHBoxLayout* pParentLayout )
CChannelFader::CChannelFader ( QWidget* pNW )
{
// create new GUI control objects and store pointers to them (note that
// QWidget takes the ownership of the pMainGrid so that this only has
Expand Down Expand Up @@ -120,9 +119,6 @@ CChannelFader::CChannelFader ( QWidget* pNW,
pMainGrid->addWidget ( pMuteSoloBox, 0, Qt::AlignHCenter );
pMainGrid->addWidget ( pLabelInstBox );

// add fader frame to audio mixer board layout
pParentLayout->addWidget( pFrame );

// reset current fader
Reset();

Expand Down Expand Up @@ -430,29 +426,28 @@ void CChannelFader::SetChannelLevel ( const uint16_t iLevel )
plbrChannelLevel->setValue ( iLevel );
}

void CChannelFader::SetText ( const CChannelInfo& ChanInfo )
void CChannelFader::SetChannelInfos ( const CChannelInfo& cChanInfo )
{
// init properties for the tool tip
int iTTInstrument = CInstPictures::GetNotUsedInstrument();
QLocale::Country eTTCountry = QLocale::AnyCountry;


// Label text --------------------------------------------------------------
// store original received name
strReceivedName = ChanInfo.strName;
strReceivedName = cChanInfo.strName;

// break text at predefined position
const int iBreakPos = MAX_LEN_FADER_TAG / 2;

QString strModText = ChanInfo.strName;
QString strModText = cChanInfo.strName;

if ( strModText.length() > iBreakPos )
{
strModText.insert ( iBreakPos, QString ( "\n" ) );
}

plblLabel->setText ( strModText );
}

void CChannelFader::SetChannelInfos ( const CChannelInfo& cChanInfo )
{
// init properties for the tool tip
int iTTInstrument = CInstPictures::GetNotUsedInstrument();
QLocale::Country eTTCountry = QLocale::AnyCountry;


// Instrument picture ------------------------------------------------------
Expand Down Expand Up @@ -630,8 +625,11 @@ CAudioMixerBoard::CAudioMixerBoard ( QWidget* parent, Qt::WindowFlags ) :

for ( int i = 0; i < MAX_NUM_CHANNELS; i++ )
{
vecpChanFader[i] = new CChannelFader ( this, pMainLayout );
vecpChanFader[i] = new CChannelFader ( this );
vecpChanFader[i]->Hide();

// add fader frame to audio mixer board layout
pMainLayout->addWidget ( vecpChanFader[i]->GetMainWidget() );
}

// insert horizontal spacer
Expand Down Expand Up @@ -759,10 +757,42 @@ void CAudioMixerBoard::HideAll()
bNoFaderVisible = true;
iMyChannelID = INVALID_INDEX;

// use original order of channel (by server ID)
ChangeFaderOrder ( false );

// emit status of connected clients
emit NumClientsChanged ( 0 ); // -> no clients connected
}

void CAudioMixerBoard::ChangeFaderOrder ( const bool bDoSort )
{
// TODO better solution to sort by names and get the indexes after sorting (here
// we utilize the "data" property to store the original ID value)
QListWidget ListWidget;
for ( int i = 0; i < MAX_NUM_CHANNELS; i++ )
{
// fill list widget (used for sorting the channels)
QListWidgetItem* pNewItem = new QListWidgetItem ( vecpChanFader[i]->GetReceivedName() );
pNewItem->setData ( Qt::UserRole, i );
ListWidget.addItem ( pNewItem );

// remove channels from layout (note that we keep the spacer on the right side)
pMainLayout->removeWidget ( vecpChanFader[i]->GetMainWidget() );
}
if ( bDoSort )
{
ListWidget.sortItems();
}

// add channels to the layout in the new order (since we insert on the left, we
// have to use a backwards counting loop)
for ( int i = MAX_NUM_CHANNELS - 1; i >= 0; i-- )
{
// add fader frame to the audio mixer board layout
pMainLayout->insertWidget ( 0, vecpChanFader[ListWidget.item ( i )->data ( Qt::UserRole ).toInt()]->GetMainWidget() );
}
}

void CAudioMixerBoard::ApplyNewConClientList ( CVector<CChannelInfo>& vecChanInfo )
{
// we want to set the server name only if the very first faders appear
Expand Down Expand Up @@ -841,10 +871,7 @@ void CAudioMixerBoard::ApplyNewConClientList ( CVector<CChannelInfo>& vecChanInf
}
}

// set the text in the fader
vecpChanFader[i]->SetText ( vecChanInfo[j] );

// update other channel infos
// set the channel infos
vecpChanFader[i]->SetChannelInfos ( vecChanInfo[j] );

bFaderIsUsed = true;
Expand Down
6 changes: 4 additions & 2 deletions src/audiomixerboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include <QDial>
#include <QSizePolicy>
#include <QHostAddress>
#include <QListWidget>
#include "global.h"
#include "util.h"
#include "multicolorledbar.h"
Expand All @@ -46,9 +47,8 @@ class CChannelFader : public QObject
Q_OBJECT

public:
CChannelFader ( QWidget* pNW, QHBoxLayout* pParentLayout );
CChannelFader ( QWidget* pNW );

void SetText ( const CChannelInfo& ChanInfo );
QString GetReceivedName() { return strReceivedName; }
void SetChannelInfos ( const CChannelInfo& cChanInfo );
void Show() { pFrame->show(); }
Expand All @@ -60,6 +60,7 @@ class CChannelFader : public QObject
void SetDisplayChannelLevel ( const bool eNDCL );
bool GetDisplayChannelLevel();
void SetDisplayPans ( const bool eNDP );
QFrame* GetMainWidget() { return pFrame; }

void UpdateSoloState ( const bool bNewOtherSoloState );
void SetFaderLevel ( const int iLevel );
Expand Down Expand Up @@ -143,6 +144,7 @@ class CAudioMixerBoard :
CAudioMixerBoard ( QWidget* parent = nullptr, Qt::WindowFlags f = nullptr );

void HideAll();
void ChangeFaderOrder ( const bool bDoSort );
void ApplyNewConClientList ( CVector<CChannelInfo>& vecChanInfo );
void SetServerName ( const QString& strNewServerName );
void SetGUIDesign ( const EGUIDesign eNewDesign );
Expand Down
8 changes: 8 additions & 0 deletions src/clientdlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -279,10 +279,18 @@ CClientDlg::CClientDlg ( CClient* pNCliP,
SLOT ( close() ), QKeySequence ( Qt::CTRL + Qt::Key_Q ) );


// Edit menu --------------------------------------------------------------
pEditMenu = new QMenu ( tr ( "&Edit" ), this );

pEditMenu->addAction ( tr ( "&Sort Channels by Name..." ), this,
SLOT ( OnSortChannelsByName() ), QKeySequence ( Qt::CTRL + Qt::Key_N ) );


// Main menu bar -----------------------------------------------------------
pMenu = new QMenuBar ( this );

pMenu->addMenu ( pViewMenu );
pMenu->addMenu ( pEditMenu );
pMenu->addMenu ( new CHelpMenu ( true, this ) );

// Now tell the layout about the menu
Expand Down
2 changes: 2 additions & 0 deletions src/clientdlg.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ class CClientDlg : public QDialog, private Ui_CClientDlgBase
void UpdateDisplay();

QMenu* pViewMenu;
QMenu* pEditMenu;
QMenuBar* pMenu;
QMenu* pInstrPictPopupMenu;
QMenu* pCountryFlagPopupMenu;
Expand Down Expand Up @@ -151,6 +152,7 @@ public slots:
void OnOpenGeneralSettings() { ShowGeneralSettings(); }
void OnOpenChatDialog() { ShowChatWindow(); }
void OnOpenAnalyzerConsole() { ShowAnalyzerConsole(); }
void OnSortChannelsByName() { MainMixerBoard->ChangeFaderOrder ( true ); }

void OnSettingsStateChanged ( int value );
void OnChatStateChanged ( int value );
Expand Down
Binary file modified src/res/translation/translation_de_DE.qm
Binary file not shown.
Loading

0 comments on commit 871e082

Please sign in to comment.