mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-04-07 01:22:49 +02:00
Merge branch 'master' into infosystem-threadify
This commit is contained in:
commit
750331d920
@ -39,6 +39,11 @@ INCLUDE( MacroLogFeature )
|
||||
set(LIBLASTFM_FOUND true)
|
||||
|
||||
find_package(Phonon REQUIRED)
|
||||
if(PHONON_VERSION STRLESS "4.5.0")
|
||||
message(FATAL_ERROR "Phonon version 4.5.0 or higher is required, you have version ${PHONON_VERSION}")
|
||||
else()
|
||||
message(STATUS "Phonon found; ensure that phonon-vlc is at least 0.4")
|
||||
endif()
|
||||
|
||||
macro_optional_find_package(LibEchonest 1.1.1)
|
||||
macro_log_feature(LIBECHONEST_FOUND "Echonest" "Qt library for communicating with The Echo Nest" "http://projects.kde.org/libechonest" TRUE "" "libechonest is needed for dynamic playlists and the infosystem")
|
||||
|
@ -21,6 +21,8 @@
|
||||
|
||||
#include <QAction>
|
||||
#include <QCloseEvent>
|
||||
#include <QShowEvent>
|
||||
#include <QHideEvent>
|
||||
#include <QInputDialog>
|
||||
#include <QPixmap>
|
||||
#include <QPropertyAnimation>
|
||||
@ -265,6 +267,13 @@ TomahawkWindow::setupSignals()
|
||||
connect( ui->actionCreate_New_Station, SIGNAL( triggered() ), SLOT( createStation() ));
|
||||
connect( ui->actionAboutTomahawk, SIGNAL( triggered() ), SLOT( showAboutTomahawk() ) );
|
||||
connect( ui->actionExit, SIGNAL( triggered() ), APP, SLOT( quit() ) );
|
||||
#if defined( Q_OS_DARWIN )
|
||||
connect( ui->actionMinimize, SIGNAL( triggered() ), SLOT( minimize() ) );
|
||||
connect( ui->actionZoom, SIGNAL( triggered() ), SLOT( maximize() ) );
|
||||
#else
|
||||
ui->menuWindow->clear();
|
||||
ui->menuWindow->menuAction()->setVisible( false );
|
||||
#endif
|
||||
|
||||
// <SipHandler>
|
||||
connect( APP->sipHandler(), SIGNAL( connected() ), SLOT( onSipConnected() ) );
|
||||
@ -292,7 +301,6 @@ TomahawkWindow::changeEvent( QEvent* e )
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TomahawkWindow::closeEvent( QCloseEvent* e )
|
||||
{
|
||||
@ -308,6 +316,27 @@ TomahawkWindow::closeEvent( QCloseEvent* e )
|
||||
e->accept();
|
||||
}
|
||||
|
||||
void
|
||||
TomahawkWindow::showEvent( QShowEvent* e )
|
||||
{
|
||||
QMainWindow::showEvent( e );
|
||||
|
||||
#if defined( Q_OS_DARWIN )
|
||||
ui->actionMinimize->setDisabled( false );
|
||||
ui->actionZoom->setDisabled( false );
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
TomahawkWindow::hideEvent( QHideEvent* e )
|
||||
{
|
||||
QMainWindow::hideEvent( e );
|
||||
|
||||
#if defined( Q_OS_DARWIN )
|
||||
ui->actionMinimize->setDisabled( true );
|
||||
ui->actionZoom->setDisabled( true );
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
TomahawkWindow::showSettingsDialog()
|
||||
@ -515,3 +544,25 @@ TomahawkWindow::checkForUpdates()
|
||||
Tomahawk::checkForUpdates();
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
TomahawkWindow::minimize()
|
||||
{
|
||||
if ( isMinimized() )
|
||||
{
|
||||
showNormal();
|
||||
} else {
|
||||
showMinimized();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
TomahawkWindow::maximize()
|
||||
{
|
||||
if ( isMaximized() )
|
||||
{
|
||||
showNormal();
|
||||
} else {
|
||||
showMaximized();
|
||||
}
|
||||
}
|
||||
|
@ -56,6 +56,8 @@ public:
|
||||
protected:
|
||||
void changeEvent( QEvent* e );
|
||||
void closeEvent( QCloseEvent* e );
|
||||
void showEvent( QShowEvent* e );
|
||||
void hideEvent( QHideEvent* e );
|
||||
|
||||
public slots:
|
||||
void createAutomaticPlaylist();
|
||||
@ -81,6 +83,9 @@ private slots:
|
||||
void showAboutTomahawk();
|
||||
void checkForUpdates();
|
||||
|
||||
void minimize();
|
||||
void maximize();
|
||||
|
||||
private:
|
||||
void loadSettings();
|
||||
void saveSettings();
|
||||
|
@ -72,6 +72,13 @@
|
||||
<addaction name="actionToggleConnect"/>
|
||||
<addaction name="separator"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menuWindow">
|
||||
<property name="title">
|
||||
<string>&Window</string>
|
||||
</property>
|
||||
<addaction name="actionMinimize"/>
|
||||
<addaction name="actionZoom"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menu_Help">
|
||||
<property name="title">
|
||||
<string>&Help</string>
|
||||
@ -82,6 +89,7 @@
|
||||
<addaction name="menuPlaylist"/>
|
||||
<addaction name="menuNetwork"/>
|
||||
<addaction name="menuSettings"/>
|
||||
<addaction name="menuWindow"/>
|
||||
<addaction name="menu_Help"/>
|
||||
</widget>
|
||||
<widget class="QStatusBar" name="statusBar"/>
|
||||
@ -157,6 +165,22 @@
|
||||
<string>Hide Offline Sources</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionMinimize">
|
||||
<property name="text">
|
||||
<string>Minimize</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+M</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionZoom">
|
||||
<property name="text">
|
||||
<string>Zoom</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Meta+Ctrl+Z</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<resources/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user