diff options
Diffstat (limited to 'src/ui')
| -rw-r--r-- | src/ui/CMakeLists.txt | 7 | ||||
| -rw-r--r-- | src/ui/aboutdialog.cpp | 5 | ||||
| -rw-r--r-- | src/ui/qmmpstarter.cpp | 4 | ||||
| -rw-r--r-- | src/ui/textscroller.cpp | 3 | ||||
| -rw-r--r-- | src/ui/ui.pro | 9 | ||||
| -rw-r--r-- | src/ui/unixdomainsocket.cpp | 1 | ||||
| -rw-r--r-- | src/ui/version.h | 34 |
7 files changed, 7 insertions, 56 deletions
diff --git a/src/ui/CMakeLists.txt b/src/ui/CMakeLists.txt index 45b7b1c83..866cbbc14 100644 --- a/src/ui/CMakeLists.txt +++ b/src/ui/CMakeLists.txt @@ -17,12 +17,6 @@ include(${QT_USE_FILE}) ADD_DEFINITIONS( -Wall ) ADD_DEFINITIONS(-DQT_NO_DEBUG) ADD_DEFINITIONS(-DQT_THREAD) -ADD_DEFINITIONS(-DQMMP_VERSION=${QMMP_VERSION}) -IF(SVN_VERSION) -ADD_DEFINITIONS(-DQMMP_STR_VERSION=\\\"${QMMP_VERSION}-svn\\\") -ELSE(SVN_VERSION) -ADD_DEFINITIONS(-DQMMP_STR_VERSION=\\\"${QMMP_VERSION}\\\") -ENDIF(SVN_VERSION) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) @@ -128,7 +122,6 @@ SET(ui_MOC_HDRS titlebar.h togglebutton.h unixdomainsocket.h - version.h visualmenu.h volumebar.h ) diff --git a/src/ui/aboutdialog.cpp b/src/ui/aboutdialog.cpp index 87f0317b0..a2ad8fd2c 100644 --- a/src/ui/aboutdialog.cpp +++ b/src/ui/aboutdialog.cpp @@ -30,9 +30,10 @@ #include <qmmp/visualfactory.h> #include <qmmp/effect.h> #include <qmmp/effectfactory.h> +#include <qmmp/qmmp.h> #include <qmmpui/general.h> #include <qmmpui/generalfactory.h> -#include "version.h" + #include "aboutdialog.h" @@ -78,7 +79,7 @@ QString AboutDialog::loadAbout() text.append("<META content=\"text/html; charset=UTF-8\">"); text.append("</head>"); text.append("<h3>"+tr("Qt-based Multimedia Player (Qmmp)")+"</h3>"); - text.append("<h4>"+tr("Version:")+" "+ QMMP_STR_VERSION "</h4>"); + text.append("<h4>"+tr("Version:")+" "+ Qmmp::strVersion() + "</h4>"); text.append("<p>"+getstringFromResource(tr(":txt/description_en.txt"))+"</p>"); text.append("<h5>"+tr("Input plugins:")+"</h5>"); text.append("<ul type=\"square\">"); diff --git a/src/ui/qmmpstarter.cpp b/src/ui/qmmpstarter.cpp index 2ecee9315..aceae205f 100644 --- a/src/ui/qmmpstarter.cpp +++ b/src/ui/qmmpstarter.cpp @@ -29,11 +29,11 @@ #include "unixdomainsocket.h" #include "mainwindow.h" -#include "version.h" #include "qmmpstarter.h" #include "builtincommandlineoption.h" #define MAXCOMMANDSIZE 1024 +#define UDS_PATH QString("/tmp/qmmp.sock.%1").arg(getuid()).toAscii().constData() using namespace std; @@ -151,6 +151,6 @@ void QMMPStarter::printUsage() void QMMPStarter::printVersion() { - cout << qPrintable(tr("QMMP version:")) << " " << QMMP_STR_VERSION << endl; + cout << qPrintable(tr("QMMP version:")) << " " << qPrintable(Qmmp::strVersion()) << endl; cout << qPrintable(tr("Qt version:")) << " " << QT_VERSION_STR << endl; } diff --git a/src/ui/textscroller.cpp b/src/ui/textscroller.cpp index fe92a25f0..26330acd8 100644 --- a/src/ui/textscroller.cpp +++ b/src/ui/textscroller.cpp @@ -28,7 +28,6 @@ #include "skin.h" #include "textscroller.h" -#include "version.h" #define SCROLL_SEP "*** " @@ -49,7 +48,7 @@ TextScroller::TextScroller ( QWidget *parent ) resize(150,15); x = 0; m_progress = -1; - m_text = "Qt-based Multimedia Player (Qmmp " + QString(QMMP_STR_VERSION) + ")"; + m_text = "Qt-based Multimedia Player (Qmmp " + Qmmp::strVersion() + ")"; m_update = FALSE; readSettings(); m_timer = new QTimer ( this ); diff --git a/src/ui/ui.pro b/src/ui/ui.pro index a9391b9a1..dcc4fc4df 100644 --- a/src/ui/ui.pro +++ b/src/ui/ui.pro @@ -40,10 +40,8 @@ HEADERS += mainwindow.h \ pluginitem.h \ volumebar.h \ balancebar.h \ - playstate.h \ symboldisplay.h \ playlistcontrol.h \ - version.h \ qmmpstarter.h \ eqpreset.h \ preseteditor.h \ @@ -126,13 +124,6 @@ RESOURCES = images/images.qrc \ TEMPLATE = app target.path = /bin -DEFINES += QMMP_VERSION=$$QMMP_VERSION -contains(CONFIG, SVN_VERSION){ - DEFINES += QMMP_STR_VERSION=\\\"$$QMMP_VERSION-svn\\\" -}else { - DEFINES += QMMP_STR_VERSION=\\\"$$QMMP_VERSION\\\" -} - desktop.files = qmmp.desktop desktop.path = /share/applications diff --git a/src/ui/unixdomainsocket.cpp b/src/ui/unixdomainsocket.cpp index d499dc1de..0801ef6db 100644 --- a/src/ui/unixdomainsocket.cpp +++ b/src/ui/unixdomainsocket.cpp @@ -25,6 +25,7 @@ #include "unixdomainsocket.h" +#define LISTEN_PORT_BASE 33000 UnixDomainSocket::UnixDomainSocket(QObject * parent ) : QUdpSocket(parent){ _bound = false; diff --git a/src/ui/version.h b/src/ui/version.h deleted file mode 100644 index 7454f7e93..000000000 --- a/src/ui/version.h +++ /dev/null @@ -1,34 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2008 by Ilya Kotov * - * forkotov02@hotmail.ru * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - ***************************************************************************/ - -#ifndef _QMMP_VERSION_H -#define _QMMP_VERSION_H - -#ifndef QMMP_VERSION -#define QMMP_VERSION 0.2.0 -#endif - -#ifndef QMMP_STR_VERSION -#define QMMP_STR_VERSION "0.2.0" -#endif - -#define LISTEN_PORT_BASE 33000 -#define UDS_PATH QString("/tmp/qmmp.sock.%1").arg(getuid()).toAscii().constData() -#endif |
