Rename 'Info' to 'Server Info'
This commit is contained in:
@@ -33,7 +33,7 @@ SET( CANTATA_SRCS
|
||||
gui/librarypage.cpp
|
||||
gui/albumspage.cpp
|
||||
gui/folderpage.cpp
|
||||
gui/infopage.cpp
|
||||
gui/serverinfopage.cpp
|
||||
gui/playlistspage.cpp
|
||||
models/musiclibraryitem.cpp
|
||||
models/musiclibraryitemroot.cpp
|
||||
@@ -83,7 +83,7 @@ SET( CANTATA_MOC_HDRS
|
||||
gui/albumspage.h
|
||||
gui/playlistspage.h
|
||||
gui/streamspage.h
|
||||
gui/infopage.h
|
||||
gui/serverinfopage.h
|
||||
gui/streamdialog.h
|
||||
gui/playbacksettings.h
|
||||
gui/outputsettings.h
|
||||
@@ -120,7 +120,7 @@ SET( CANTATA_UIS
|
||||
gui/albumspage.ui
|
||||
gui/playlistspage.ui
|
||||
gui/streamspage.ui
|
||||
gui/infopage.ui
|
||||
gui/serverinfopage.ui
|
||||
gui/interfacesettings.ui
|
||||
gui/playbacksettings.ui
|
||||
gui/serversettings.ui
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
#include "folderpage.h"
|
||||
#include "streamspage.h"
|
||||
#include "lyricspage.h"
|
||||
#include "infopage.h"
|
||||
#include "serverinfopage.h"
|
||||
#include "streamsmodel.h"
|
||||
#include "playlistspage.h"
|
||||
#include "fancytabwidget.h"
|
||||
@@ -321,8 +321,8 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent),
|
||||
streamsTabAction = actionCollection()->addAction("showstreamstab");
|
||||
streamsTabAction->setText(i18n("Streams"));
|
||||
|
||||
infoTabAction = actionCollection()->addAction("showinfotab");
|
||||
infoTabAction->setText(i18n("Info"));
|
||||
serverInfoTabAction = actionCollection()->addAction("showserverinfotab");
|
||||
serverInfoTabAction->setText(i18n("Server Info"));
|
||||
#else
|
||||
quitAction = new QAction(tr("&Quit"), this);
|
||||
connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
|
||||
@@ -355,7 +355,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent),
|
||||
playlistsTabAction = new QAction(tr("Playlists"), this);
|
||||
lyricsTabAction = new QAction(tr("Lyrics"), this);
|
||||
streamsTabAction = new QAction(tr("Streams"), this);
|
||||
infoTabAction = new QAction(tr("Info"), this);
|
||||
serverInfoTabAction = new QAction(tr("Server Info"), this);
|
||||
#endif
|
||||
libraryTabAction->setShortcut(Qt::Key_F5);
|
||||
albumsTabAction->setShortcut(Qt::Key_F6);
|
||||
@@ -363,7 +363,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent),
|
||||
playlistsTabAction->setShortcut(Qt::Key_F8);
|
||||
streamsTabAction->setShortcut(Qt::Key_F9);
|
||||
lyricsTabAction->setShortcut(Qt::Key_F10);
|
||||
infoTabAction->setShortcut(Qt::Key_F11);
|
||||
serverInfoTabAction->setShortcut(Qt::Key_F11);
|
||||
|
||||
// Setup event handler for volume adjustment
|
||||
volumeSliderEventHandler = new VolumeSliderEventHandler(this);
|
||||
@@ -401,7 +401,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent),
|
||||
playlistsTabAction->setIcon(QIcon::fromTheme("view-media-playlist"));
|
||||
lyricsTabAction->setIcon(QIcon::fromTheme("view-media-lyrics"));
|
||||
streamsTabAction->setIcon(QIcon::fromTheme("applications-internet"));
|
||||
infoTabAction->setIcon(QIcon::fromTheme("server-database"));
|
||||
serverInfoTabAction->setIcon(QIcon::fromTheme("server-database"));
|
||||
|
||||
addToStoredPlaylistAction->setMenu(PlaylistsModel::self()->menu());
|
||||
|
||||
@@ -424,7 +424,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent),
|
||||
playlistsPage = new PlaylistsPage(this);
|
||||
streamsPage = new StreamsPage(this);
|
||||
lyricsPage = new LyricsPage(this);
|
||||
infoPage = new InfoPage(this);
|
||||
serverInfoPage = new ServerInfoPage(this);
|
||||
|
||||
connect(&libraryPage->getModel(), SIGNAL(updated(const MusicLibraryItemRoot *)), albumsPage, SLOT(update(const MusicLibraryItemRoot *)));
|
||||
connect(&libraryPage->getModel(), SIGNAL(updateGenres(const QStringList &)), albumsPage, SLOT(updateGenres(const QStringList &)));
|
||||
@@ -445,7 +445,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent),
|
||||
tabWidget->AddTab(playlistsPage, playlistsTabAction->icon(), playlistsTabAction->text(), !hiddenPages.contains(playlistsPage->metaObject()->className()));
|
||||
tabWidget->AddTab(streamsPage, streamsTabAction->icon(), streamsTabAction->text(), !hiddenPages.contains(streamsPage->metaObject()->className()));
|
||||
tabWidget->AddTab(lyricsPage, lyricsTabAction->icon(), lyricsTabAction->text(), !hiddenPages.contains(lyricsPage->metaObject()->className()));
|
||||
tabWidget->AddTab(infoPage, infoTabAction->icon(), infoTabAction->text(), !hiddenPages.contains(infoPage->metaObject()->className()));
|
||||
tabWidget->AddTab(serverInfoPage, serverInfoTabAction->icon(), serverInfoTabAction->text(), !hiddenPages.contains(serverInfoPage->metaObject()->className()));
|
||||
|
||||
tabWidget->SetMode(FancyTabWidget::Mode_LargeSidebar);
|
||||
connect(tabWidget, SIGNAL(CurrentChanged(int)), this, SLOT(currentTabChanged(int)));
|
||||
@@ -599,7 +599,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent),
|
||||
connect(playlistsTabAction, SIGNAL(activated()), this, SLOT(showPlaylistsTab()));
|
||||
connect(lyricsTabAction, SIGNAL(activated()), this, SLOT(showLyricsTab()));
|
||||
connect(streamsTabAction, SIGNAL(activated()), this, SLOT(showStreamsTab()));
|
||||
connect(infoTabAction, SIGNAL(activated()), this, SLOT(showInfoTab()));
|
||||
connect(serverInfoTabAction, SIGNAL(activated()), this, SLOT(showServerInfoTab()));
|
||||
connect(PlaylistsModel::self(), SIGNAL(addToNew()), this, SLOT(addToNewStoredPlaylist()));
|
||||
connect(PlaylistsModel::self(), SIGNAL(addToExisting(const QString &)), this, SLOT(addToExistingStoredPlaylist(const QString &)));
|
||||
connect(playlistsPage, SIGNAL(add(const QStringList &)), &playQueueModel, SLOT(addItems(const QStringList &)));
|
||||
@@ -711,7 +711,7 @@ void MainWindow::mpdConnectionStateChanged(bool connected)
|
||||
playlistsPage->clear();
|
||||
playQueueModel.clear();
|
||||
lyricsPage->text->clear();
|
||||
infoPage->clear();
|
||||
serverInfoPage->clear();
|
||||
showPreferencesDialog();
|
||||
}
|
||||
}
|
||||
@@ -1522,7 +1522,7 @@ void MainWindow::currentTabChanged(int index)
|
||||
lyricsNeedUpdating=false;
|
||||
}
|
||||
break;
|
||||
case PAGE_INFO:
|
||||
case PAGE_SERVER_INFO:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ class FolderPage;
|
||||
class PlaylistsPage;
|
||||
class LyricsPage;
|
||||
class StreamsPage;
|
||||
class InfoPage;
|
||||
class ServerInfoPage;
|
||||
class QThread;
|
||||
class QAbstractItemView;
|
||||
|
||||
@@ -156,7 +156,7 @@ public:
|
||||
PAGE_PLAYLISTS,
|
||||
PAGE_STREAMS,
|
||||
PAGE_LYRICS,
|
||||
PAGE_INFO
|
||||
PAGE_SERVER_INFO
|
||||
};
|
||||
|
||||
MainWindow(QWidget *parent = 0);
|
||||
@@ -233,7 +233,7 @@ private Q_SLOTS:
|
||||
void showPlaylistsTab() { showTab(PAGE_PLAYLISTS); }
|
||||
void showStreamsTab() { showTab(PAGE_STREAMS); }
|
||||
void showLyricsTab() { showTab(PAGE_LYRICS); }
|
||||
void showInfoTab() { showTab(PAGE_INFO); }
|
||||
void showServerInfoTab() { showTab(PAGE_SERVER_INFO); }
|
||||
|
||||
private:
|
||||
bool currentIsStream();
|
||||
@@ -284,7 +284,7 @@ private:
|
||||
Action *playlistsTabAction;
|
||||
Action *lyricsTabAction;
|
||||
Action *streamsTabAction;
|
||||
Action *infoTabAction;
|
||||
Action *serverInfoTabAction;
|
||||
Action *updateDbAction;
|
||||
QList<QAction *> viewActions;
|
||||
QSystemTrayIcon *trayIcon;
|
||||
@@ -303,7 +303,7 @@ private:
|
||||
PlaylistsPage *playlistsPage;
|
||||
LyricsPage *lyricsPage;
|
||||
StreamsPage *streamsPage;
|
||||
InfoPage *infoPage;
|
||||
ServerInfoPage *serverInfoPage;
|
||||
QThread *mpdThread;
|
||||
friend class VolumeSliderEventHandler;
|
||||
// friend class CoverEventHandler;
|
||||
@@ -313,7 +313,7 @@ private:
|
||||
friend class PlaylistsPage;
|
||||
friend class StreamsPage;
|
||||
friend class LyricsPage;
|
||||
friend class InfoPage;
|
||||
friend class ServerInfoPage;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include "infopage.h"
|
||||
#include "serverinfopage.h"
|
||||
#include "mpdconnection.h"
|
||||
#include "mpdstats.h"
|
||||
#include "mainwindow.h"
|
||||
@@ -36,7 +36,7 @@
|
||||
#endif
|
||||
|
||||
|
||||
InfoPage::InfoPage(MainWindow *p)
|
||||
ServerInfoPage::ServerInfoPage(MainWindow *p)
|
||||
: QWidget(p)
|
||||
{
|
||||
setupUi(this);
|
||||
@@ -56,11 +56,11 @@ InfoPage::InfoPage(MainWindow *p)
|
||||
clear();
|
||||
}
|
||||
|
||||
InfoPage::~InfoPage()
|
||||
ServerInfoPage::~ServerInfoPage()
|
||||
{
|
||||
}
|
||||
|
||||
void InfoPage::clear()
|
||||
void ServerInfoPage::clear()
|
||||
{
|
||||
version->setText(QString());
|
||||
uptime->setText(QString());
|
||||
@@ -72,7 +72,7 @@ void InfoPage::clear()
|
||||
lastUpdate->setText(QString());
|
||||
}
|
||||
|
||||
void InfoPage::statsUpdated()
|
||||
void ServerInfoPage::statsUpdated()
|
||||
{
|
||||
uptime->setText(MPDParseUtils::formatDuration(MPDStats::self()->uptime()));
|
||||
timePlaying->setText(MPDParseUtils::formatDuration(MPDStats::self()->playtime()));
|
||||
@@ -87,7 +87,7 @@ void InfoPage::statsUpdated()
|
||||
#endif
|
||||
}
|
||||
|
||||
void InfoPage::mpdVersion(long v)
|
||||
void ServerInfoPage::mpdVersion(long v)
|
||||
{
|
||||
version->setText(QString("%1.%2.%3").arg((v>>16)&0xFF).arg((v>>8)&0xFF).arg(v&0xFF));
|
||||
}
|
||||
@@ -21,20 +21,20 @@
|
||||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef INFOPAGE_H
|
||||
#define INFOPAGE_H
|
||||
#ifndef SERVERINFOPAGE_H
|
||||
#define SERVERINFOPAGE_H
|
||||
|
||||
#include <QWidget>
|
||||
#include "ui_infopage.h"
|
||||
#include "ui_serverinfopage.h"
|
||||
#include "mainwindow.h"
|
||||
|
||||
class InfoPage : public QWidget, public Ui::InfoPage
|
||||
class ServerInfoPage : public QWidget, public Ui::ServerInfoPage
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
InfoPage(MainWindow *p);
|
||||
~InfoPage();
|
||||
ServerInfoPage(MainWindow *p);
|
||||
~ServerInfoPage();
|
||||
|
||||
void clear();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>InfoPage</class>
|
||||
<widget class="QWidget" name="InfoPage">
|
||||
<class>ServerInfoPage</class>
|
||||
<widget class="QWidget" name="ServerInfoPage">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
@@ -240,7 +240,7 @@ QStringList Settings::hiddenPages()
|
||||
{
|
||||
QStringList def;
|
||||
def << "FolderPage"
|
||||
<< "InfoPage";
|
||||
<< "ServerInfoPage";
|
||||
return GET_STRINGLIST("hiddenPages", def);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user