From 2888a8349d11a3e959c300256ce36e824337e636 Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Wed, 13 Apr 2016 23:13:15 +0800 Subject: Ghost Lead. --- ChangeLog | 5 ++ debian/rules | 2 +- doc/styles.css | 3 ++ img/qmidiplayer.ico | Bin 0 -> 44720 bytes img/qmidiplayer.xpm | 72 ++++++++++++++++++++++++++++ qmidiplayer-desktop/qmidiplayer-desktop.pro | 1 + qmidiplayer-desktop/qmidiplayer.desktop | 4 +- qmidiplayer-desktop/qmidiplayer.rc | 1 + qmidiplayer-desktop/qmpchannelswindow.cpp | 5 ++ qmidiplayer-desktop/qmpchannelswindow.hpp | 1 + qmidiplayer-desktop/qmphelpwindow.hpp | 2 +- qmidiplayer-desktop/qmpmainwindow.cpp | 6 +-- qmidiplayer-desktop/qmppresetselect.cpp | 1 + 13 files changed, 97 insertions(+), 6 deletions(-) create mode 100644 img/qmidiplayer.ico create mode 100644 img/qmidiplayer.xpm mode change 100644 => 100755 qmidiplayer-desktop/qmidiplayer.desktop create mode 100644 qmidiplayer-desktop/qmidiplayer.rc diff --git a/ChangeLog b/ChangeLog index 839f750..726db06 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2016-04-13 0.7.2 beta +Reset channel activity indicators properly. +Windows version now has an icon. +Fixed a null pointer reference. + 2016-04-12 0.7.2 beta Partially fixed unicode file name issue on Windows. First steps to l10n. diff --git a/debian/rules b/debian/rules index f88b391..b606ceb 100755 --- a/debian/rules +++ b/debian/rules @@ -2,4 +2,4 @@ %: dh $@ --parallel override_dh_auto_install: - $(MAKE) INSTALL_ROOT=$$(pwd)/debian/tmp prefix=/usr install \ No newline at end of file + $(MAKE) INSTALL_ROOT=$$(pwd)/debian/tmp prefix=/usr install diff --git a/doc/styles.css b/doc/styles.css index 1387124..dd149d9 100644 --- a/doc/styles.css +++ b/doc/styles.css @@ -1,3 +1,6 @@ +body { + font-family: 'FreeMono', 'Courier New', Courier, monospace; +} #panel ul{ padding:0; } diff --git a/img/qmidiplayer.ico b/img/qmidiplayer.ico new file mode 100644 index 0000000..36ab403 Binary files /dev/null and b/img/qmidiplayer.ico differ diff --git a/img/qmidiplayer.xpm b/img/qmidiplayer.xpm new file mode 100644 index 0000000..29404d7 --- /dev/null +++ b/img/qmidiplayer.xpm @@ -0,0 +1,72 @@ +/* XPM */ +static char *qmidiplyr[] = { +/* columns rows colors chars-per-pixel */ +"64 64 2 1 ", +" c black", +". c None", +/* pixels */ +"................................................................", +"................................................................", +"................................................................", +"............................. .............................", +"........................ ........................", +"..................... .............. .....................", +"................... ..... ..... ...................", +"................. ... ........ ... .................", +"................ ... ................ ... ................", +".............. ... .................... ... ..............", +"............. .. ........................ .. .............", +"............ .. ............................ .. ............", +"........... .. .............................. .. ...........", +".......... .. .............. .............. .. ..........", +"......... .. ............... .. ............... .. .........", +"......... .. .............. .... .............. .. .........", +"........ .. ............... ...... ............... .. ........", +"....... . ......... ...... ...... ...... ......... . .......", +"....... .. ........ .... ..... .... ........ .. .......", +"...... . ....... ... .... .... .... .... ....... . ......", +"...... .. ........ ..... ... .... ..... ........ .. ......", +"..... . ....... ..... ............ ..... ....... . .....", +"..... .. ......... ..... ............ ..... ......... .. .....", +"..... . ......... ..... .............. .... ......... . .....", +".... . ........... ................ ........... . ....", +".... .. ............ .................. ............ .. ....", +".... .. ................................................ .. ....", +".... . ................................................ . ....", +".... . ........ .......................... ........ . ....", +"... . ....... .. ....................... ... ....... . ...", +"... . ...... ..... ...................... ..... ...... . ...", +"... . ...... ...... ...................... ...... ...... . ...", +"... . ...... ...... ...................... ...... ...... . ...", +"... . ...... ..... ...................... ..... ...... . ...", +"... . ....... ... ....................... .. ....... . ...", +".... . ........ .......................... ........ . ....", +".... . ................................................ . ....", +".... .. ................................................ .. ....", +".... .. ................................................ .. ....", +".... . ................................................ . ....", +"..... . .............................................. . .....", +"..... .. .............................................. .. .....", +"..... . ............................................ . .....", +"...... .. ............................................ .. ......", +"...... . .......................................... . ......", +"....... .. .......................................... .. .......", +"....... . .............................. ........ . .......", +"........ .. .............................. ...... .. ........", +"......... .. .............................. .... .. .........", +"......... .. ............................... ... .. .........", +".......... .. .............................. .. ..........", +"........... .. .............................. . ...........", +"............ .. ........... ........... ............", +"............. .. ........ .... ........ .. .............", +".............. ... ..... ...... ..... ... ............", +"................ ... ... ........ ... ... ... ...........", +"................. ... ........ ... ..... ..........", +"................... .................... ........ .........", +"..................... .............. ........... ........", +"........................ ............... .......", +"............................. .............................", +"................................................................", +"................................................................", +"................................................................" +}; diff --git a/qmidiplayer-desktop/qmidiplayer-desktop.pro b/qmidiplayer-desktop/qmidiplayer-desktop.pro index f4f29d4..c7d2e99 100644 --- a/qmidiplayer-desktop/qmidiplayer-desktop.pro +++ b/qmidiplayer-desktop/qmidiplayer-desktop.pro @@ -86,5 +86,6 @@ win32{ LIBS += e:/libs/rtmidi/rtmidi.lib INCLUDEPATH += e:/libs/fluidsynth/include INCLUDEPATH += e:/libs/rtmidi + RC_FILE = qmidiplayer.rc } RESOURCES = resources.qrc diff --git a/qmidiplayer-desktop/qmidiplayer.desktop b/qmidiplayer-desktop/qmidiplayer.desktop old mode 100644 new mode 100755 index 38fae66..b49113f --- a/qmidiplayer-desktop/qmidiplayer.desktop +++ b/qmidiplayer-desktop/qmidiplayer.desktop @@ -1,10 +1,12 @@ +#!/usr/bin/env xdg-open [Desktop Entry] +Type=Application Name=QMidiPlayer Version=0.7.2 GenericName=MIDI Player Comment=QMidiPlayer is a midi file player based on Fluidsynth and Qt. Exec=/usr/bin/qmidiplayer Icon=qmidiplyr +Keywords=audio;sound; Categories=Audio;AudioVideo;Midi;X-Alsa;X-Jack;Qt; Terminal=false -Type=Application diff --git a/qmidiplayer-desktop/qmidiplayer.rc b/qmidiplayer-desktop/qmidiplayer.rc new file mode 100644 index 0000000..ddf1bc1 --- /dev/null +++ b/qmidiplayer-desktop/qmidiplayer.rc @@ -0,0 +1 @@ +IDI_ICON1 ICON DISCARDABLE "../img/qmidiplayer.ico" diff --git a/qmidiplayer-desktop/qmpchannelswindow.cpp b/qmidiplayer-desktop/qmpchannelswindow.cpp index 0c33043..282a4cc 100644 --- a/qmidiplayer-desktop/qmpchannelswindow.cpp +++ b/qmidiplayer-desktop/qmpchannelswindow.cpp @@ -101,6 +101,11 @@ void qmpChannelsWindow::moveEvent(QMoveEvent *event) } } +void qmpChannelsWindow::resetAcitivity() +{ + for(int i=0;i<16;++i)ui->twChannels->item(i,0)->setIcon(*chi); +} + void qmpChannelsWindow::updateChannelActivity() { ++callbacksc; diff --git a/qmidiplayer-desktop/qmpchannelswindow.hpp b/qmidiplayer-desktop/qmpchannelswindow.hpp index 25c897a..fef6ab7 100644 --- a/qmidiplayer-desktop/qmpchannelswindow.hpp +++ b/qmidiplayer-desktop/qmpchannelswindow.hpp @@ -78,6 +78,7 @@ class qmpChannelsWindow:public QDialog void showEvent(QShowEvent *event); void closeEvent(QCloseEvent *event); void moveEvent(QMoveEvent *event); + void resetAcitivity(); signals: void dialogClosing(); public slots: diff --git a/qmidiplayer-desktop/qmphelpwindow.hpp b/qmidiplayer-desktop/qmphelpwindow.hpp index af1b746..8264fcd 100644 --- a/qmidiplayer-desktop/qmphelpwindow.hpp +++ b/qmidiplayer-desktop/qmphelpwindow.hpp @@ -2,7 +2,7 @@ #define QMPHELPWINDOW_H #include -#define APP_VERSION "0.7.1" +#define APP_VERSION "0.7.2" namespace Ui { class qmpHelpWindow; diff --git a/qmidiplayer-desktop/qmpmainwindow.cpp b/qmidiplayer-desktop/qmpmainwindow.cpp index 380b0c1..45ab634 100644 --- a/qmidiplayer-desktop/qmpmainwindow.cpp +++ b/qmidiplayer-desktop/qmpmainwindow.cpp @@ -180,7 +180,7 @@ void qmpMainWindow::updateWidgets() if(!plistw->getRepeat()) { timer->stop();stopped=true;playing=false; - fnA2->setEnabled(stopped); + fnA2->setEnabled(stopped);chnlw->resetAcitivity(); player->playerDeinit();playerTh->join(); delete playerTh;playerTh=NULL; if(singleFS)player->playerPanic(true); @@ -320,7 +320,7 @@ void qmpMainWindow::on_pbPlayPause_clicked() { if(!playing) { - player->playerPanic(); + player->playerPanic();chnlw->resetAcitivity(); offset=ui->hsTimer->value()/100.*player->getFtime(); } else @@ -371,7 +371,7 @@ void qmpMainWindow::on_pbStop_clicked() { timer->stop();stopped=true;playing=false; player->playerDeinit();fnA2->setEnabled(stopped); - if(singleFS)player->playerPanic(true); + if(singleFS)player->playerPanic(true);chnlw->resetAcitivity(); if(playerTh){playerTh->join();delete playerTh;playerTh=NULL;} chnlw->on_pbUnmute_clicked();chnlw->on_pbUnsolo_clicked(); ui->pbPlayPause->setIcon(QIcon(":/img/play.png")); diff --git a/qmidiplayer-desktop/qmppresetselect.cpp b/qmidiplayer-desktop/qmppresetselect.cpp index be589c5..ef67d70 100644 --- a/qmidiplayer-desktop/qmppresetselect.cpp +++ b/qmidiplayer-desktop/qmppresetselect.cpp @@ -73,6 +73,7 @@ void qmpPresetSelector::on_pbCancel_clicked() void qmpPresetSelector::on_pbOk_clicked() { CMidiPlayer *plyr=qmpMainWindow::getInstance()->getPlayer(); + if(!ui->lwBankSelect->currentItem()||!ui->lwPresetSelect->currentItem())return (void)close(); int b,p;sscanf(ui->lwBankSelect->currentItem()->text().toStdString().c_str(),"%d",&b); sscanf(ui->lwPresetSelect->currentItem()->text().toStdString().c_str(),"%d",&p); plyr->setChannelPreset(ch,b,p); -- cgit v1.2.3