From 819638a9fa4d4ca68a12882f19b1ee2ae842776f Mon Sep 17 00:00:00 2001 From: Alex Montgomery Date: Sat, 7 May 2011 17:56:10 +0100 Subject: [PATCH] now correctly setting the window's icon --- TODO | 11 +++++++++++ VERSION | 2 +- configure | 7 +++++++ configure.ac | 3 +++ qt/src/mainWindow.cpp | 5 +++++ 5 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 TODO diff --git a/TODO b/TODO new file mode 100644 index 0000000..71cb6a1 --- /dev/null +++ b/TODO @@ -0,0 +1,11 @@ +- thread-proof / separate the listen loop +- allow 'verbose' to be changed while listening +- use XML for settings +- have listen on startup automatically save to defaults +- make Help/About work +- update NEWS, VERSION +- update screenshots +- update documentation +- upload tarball +- announce +- make portage file for overlay diff --git a/VERSION b/VERSION index 77cb7c8..eca01f2 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -QJackMMC / JackCtlMMC version 3 written by Alex Montgomery and Nedko Arnaudov. This application lets you drive JACK transport by connecting devices or programs that send Midi Machine Code. +QJackMMC / JackCtlMMC version 4 written by Alex Montgomery and Nedko Arnaudov. This application lets you drive JACK transport by connecting devices or programs that send Midi Machine Code. diff --git a/configure b/configure index ee37379..86d6228 100755 --- a/configure +++ b/configure @@ -2317,6 +2317,13 @@ cat >>confdefs.h <<_ACEOF _ACEOF +ac_icon_dir="$ac_prefix/share/pixmaps" + +cat >>confdefs.h <<_ACEOF +#define ICON_DIR "$ac_icon_dir" +_ACEOF + + ac_cflags="$ac_cflags -Wall" ac_build_jackctlmmc="yes" ac_build_qjackmmc="yes" diff --git a/configure.ac b/configure.ac index 60fc81f..decafae 100644 --- a/configure.ac +++ b/configure.ac @@ -14,6 +14,9 @@ fi AC_SUBST(ac_prefix) AC_DEFINE_UNQUOTED(CONFIG_PREFIX, ["$ac_prefix"], [Default installation prefix.]) +ac_icon_dir="$ac_prefix/share/pixmaps" +AC_DEFINE_UNQUOTED(ICON_DIR, ["$ac_icon_dir"], [Default icon directory.]) + ac_cflags="$ac_cflags -Wall" ac_build_jackctlmmc="yes" ac_build_qjackmmc="yes" diff --git a/qt/src/mainWindow.cpp b/qt/src/mainWindow.cpp index 376c28f..8465acd 100644 --- a/qt/src/mainWindow.cpp +++ b/qt/src/mainWindow.cpp @@ -44,6 +44,11 @@ MainWindow::MainWindow() : sequencerThread(0) // make sure the device edit box only take positive hexadecimal values validator = new HexValidator(this); deviceEdit->setValidator(validator); + + // set the program's icon + const QString iconPath(QString(ICON_DIR) + "/qjackmmc.png"); + if (QFile::exists(iconPath)) + setWindowIcon(QPixmap(iconPath)); } bool MainWindow::init(int argc, char *argv[]) -- 2.11.4.GIT