Commit 316088db authored by Konstantin Pavlov's avatar Konstantin Pavlov Committed by Jean-Baptiste Kempf

Qt: remove the MAEMO hack, unneeded in Fremantle, now

But deactivate the systray on those systems
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 3d8c142e
...@@ -81,9 +81,7 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf ) ...@@ -81,9 +81,7 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
videoWidget = NULL; videoWidget = NULL;
playlistWidget = NULL; playlistWidget = NULL;
stackCentralOldWidget= NULL; stackCentralOldWidget= NULL;
#ifndef HAVE_MAEMO
sysTray = NULL; sysTray = NULL;
#endif
fullscreenControls = NULL; fullscreenControls = NULL;
cryptedLabel = NULL; cryptedLabel = NULL;
controls = NULL; controls = NULL;
...@@ -444,7 +442,6 @@ void MainInterface::createMainWidget( QSettings *settings ) ...@@ -444,7 +442,6 @@ void MainInterface::createMainWidget( QSettings *settings )
inline void MainInterface::initSystray() inline void MainInterface::initSystray()
{ {
#ifndef HAVE_MAEMO
bool b_systrayAvailable = QSystemTrayIcon::isSystemTrayAvailable(); bool b_systrayAvailable = QSystemTrayIcon::isSystemTrayAvailable();
bool b_systrayWanted = var_InheritBool( p_intf, "qt-system-tray" ); bool b_systrayWanted = var_InheritBool( p_intf, "qt-system-tray" );
...@@ -461,7 +458,6 @@ inline void MainInterface::initSystray() ...@@ -461,7 +458,6 @@ inline void MainInterface::initSystray()
if( b_systrayAvailable && b_systrayWanted ) if( b_systrayAvailable && b_systrayWanted )
createSystray(); createSystray();
#endif
} }
inline void MainInterface::createStatusBar() inline void MainInterface::createStatusBar()
...@@ -990,7 +986,6 @@ void MainInterface::showBuffering( float f_cache ) ...@@ -990,7 +986,6 @@ void MainInterface::showBuffering( float f_cache )
/***************************************************************************** /*****************************************************************************
* Systray Icon and Systray Menu * Systray Icon and Systray Menu
*****************************************************************************/ *****************************************************************************/
#ifndef HAVE_MAEMO
/** /**
* Create a SystemTray icon and a menu that would go with it. * Create a SystemTray icon and a menu that would go with it.
* Connects to a click handler on the icon. * Connects to a click handler on the icon.
...@@ -1157,7 +1152,6 @@ void MainInterface::updateSystrayTooltipStatus( int i_status ) ...@@ -1157,7 +1152,6 @@ void MainInterface::updateSystrayTooltipStatus( int i_status )
} }
QVLCMenu::updateSystrayMenu( this, p_intf ); QVLCMenu::updateSystrayMenu( this, p_intf );
} }
#endif
void MainInterface::changeEvent(QEvent *event) void MainInterface::changeEvent(QEvent *event)
{ {
...@@ -1323,13 +1317,11 @@ void MainInterface::emitBoss() ...@@ -1323,13 +1317,11 @@ void MainInterface::emitBoss()
void MainInterface::setBoss() void MainInterface::setBoss()
{ {
THEMIM->pause(); THEMIM->pause();
#ifndef HAVE_MAEMO
if( sysTray ) if( sysTray )
{ {
hide(); hide();
} }
else else
#endif
{ {
showMinimized(); showMinimized();
} }
......
...@@ -80,10 +80,8 @@ public: ...@@ -80,10 +80,8 @@ public:
int controlVideo( int i_query, va_list args ); int controlVideo( int i_query, va_list args );
/* Getters */ /* Getters */
#ifndef HAVE_MAEMO
QSystemTrayIcon *getSysTray() { return sysTray; } QSystemTrayIcon *getSysTray() { return sysTray; }
QMenu *getSysTrayMenu() { return systrayMenu; } QMenu *getSysTrayMenu() { return systrayMenu; }
#endif
int getControlsVisibilityStatus(); int getControlsVisibilityStatus();
bool isPlDocked() { return ( b_plDocked != false ); } bool isPlDocked() { return ( b_plDocked != false ); }
bool isInterfaceFullScreen() { return b_interfaceFullScreen; } bool isInterfaceFullScreen() { return b_interfaceFullScreen; }
...@@ -125,10 +123,8 @@ private: ...@@ -125,10 +123,8 @@ private:
/* */ /* */
QSettings *settings; QSettings *settings;
#ifndef HAVE_MAEMO
QSystemTrayIcon *sysTray; QSystemTrayIcon *sysTray;
QMenu *systrayMenu; QMenu *systrayMenu;
#endif
QString input_name; QString input_name;
QVBoxLayout *mainLayout; QVBoxLayout *mainLayout;
...@@ -183,11 +179,9 @@ public slots: ...@@ -183,11 +179,9 @@ public slots:
void dockPlaylist( bool b_docked = true ); void dockPlaylist( bool b_docked = true );
void toggleMinimalView( bool ); void toggleMinimalView( bool );
void togglePlaylist(); void togglePlaylist();
#ifndef HAVE_MAEMO
void toggleUpdateSystrayMenu(); void toggleUpdateSystrayMenu();
void showUpdateSystrayMenu(); void showUpdateSystrayMenu();
void hideUpdateSystrayMenu(); void hideUpdateSystrayMenu();
#endif
void toggleAdvancedButtons(); void toggleAdvancedButtons();
void toggleInterfaceFullScreen(); void toggleInterfaceFullScreen();
void toggleFSC(); void toggleFSC();
...@@ -218,11 +212,9 @@ private slots: ...@@ -218,11 +212,9 @@ private slots:
#if 0 #if 0
void visual(); void visual();
#endif #endif
#ifndef HAVE_MAEMO
void handleSystrayClick( QSystemTrayIcon::ActivationReason ); void handleSystrayClick( QSystemTrayIcon::ActivationReason );
void updateSystrayTooltipName( const QString& ); void updateSystrayTooltipName( const QString& );
void updateSystrayTooltipStatus( int ); void updateSystrayTooltipStatus( int );
#endif
void showCryptedLabel( bool ); void showCryptedLabel( bool );
void handleKeyPress( QKeyEvent * ); void handleKeyPress( QKeyEvent * );
......
...@@ -1083,7 +1083,6 @@ void QVLCMenu::PopupMenu( intf_thread_t *p_intf, bool show ) ...@@ -1083,7 +1083,6 @@ void QVLCMenu::PopupMenu( intf_thread_t *p_intf, bool show )
#undef POPUP_BOILERPLATE #undef POPUP_BOILERPLATE
#undef BAR_DADD #undef BAR_DADD
#ifndef HAVE_MAEMO
/************************************************************************ /************************************************************************
* Systray Menu * * Systray Menu *
************************************************************************/ ************************************************************************/
...@@ -1129,7 +1128,6 @@ void QVLCMenu::updateSystrayMenu( MainInterface *mi, ...@@ -1129,7 +1128,6 @@ void QVLCMenu::updateSystrayMenu( MainInterface *mi,
/* Set the menu */ /* Set the menu */
mi->getSysTray()->setContextMenu( sysMenu ); mi->getSysTray()->setContextMenu( sysMenu );
} }
#endif
#undef PUSH_VAR #undef PUSH_VAR
......
...@@ -197,8 +197,13 @@ vlc_module_begin () ...@@ -197,8 +197,13 @@ vlc_module_begin ()
add_bool( "qt-minimal-view", false, QT_MINIMAL_MODE_TEXT, add_bool( "qt-minimal-view", false, QT_MINIMAL_MODE_TEXT,
QT_MINIMAL_MODE_TEXT, false ); QT_MINIMAL_MODE_TEXT, false );
add_bool( "qt-system-tray", true, SYSTRAY_TEXT, add_bool( "qt-system-tray",
SYSTRAY_LONGTEXT, false) #ifdef HAVE_MAEMO
false,
#else
true,
#endif
SYSTRAY_TEXT, SYSTRAY_LONGTEXT, false)
add_bool( "qt-notification", true, NOTIFICATION_TEXT, add_bool( "qt-notification", true, NOTIFICATION_TEXT,
NOTIFICATION_LONGTEXT, false ) NOTIFICATION_LONGTEXT, false )
add_bool( "qt-start-minimized", false, MINIMIZED_TEXT, add_bool( "qt-start-minimized", false, MINIMIZED_TEXT,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment