Ignore:
Timestamp:
Dec 27, 2011, 5:44:12 PM (14 years ago)
Author:
Silvan Scherrer
Message:

SMPlayer: latest svn update

Location:
smplayer/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • smplayer/trunk

  • smplayer/trunk/src/baseguiplus.cpp

    r112 r119  
    11/*  smplayer, GUI front-end for mplayer.
    2     Copyright (C) 2006-2010 Ricardo Villalba <rvm@escomposlinux.org>
     2    Copyright (C) 2006-2011 Ricardo Villalba <rvm@escomposlinux.org>
    33
    44    This program is free software; you can redistribute it and/or modify
     
    8181        optionsMenu->addAction(showTrayAct);
    8282#else
    83         trayAvailable();
    84         connect( optionsMenu, SIGNAL(aboutToShow()),
     83        trayAvailable();
     84        connect( optionsMenu, SIGNAL(aboutToShow()),
    8585             this, SLOT(trayAvailable()) );
    8686#endif
     
    8989        connect( showAllAct, SIGNAL(triggered()),
    9090             this, SLOT(toggleShowAll()) );
     91
    9192
    9293        context_menu = new QMenu(this);
     
    113114        context_menu->addSeparator();
    114115        context_menu->addAction(quitAct);
    115 
     116       
    116117        tray->setContextMenu( context_menu );
     118
    117119#if DOCK_PLAYLIST
    118120        // Playlistdock
     
    172174void BaseGuiPlus::closeWindow() {
    173175        qDebug("BaseGuiPlus::closeWindow");
     176
    174177        if (tray->isVisible()) {
    175178                //e->ignore();
     
    201204
    202205        quitAct->change( Images::icon("exit"), tr("&Quit") );
    203 
    204206        showTrayAct->change( Images::icon("systray"), tr("S&how icon in system tray") );
     207
    205208        updateShowAllAct();
    206209
     
    253256
    254257        bool show_tray_icon = set->value( "show_tray_icon", false).toBool();
    255 
    256258        showTrayAct->setChecked( show_tray_icon );
    257259        //tray->setVisible( show_tray_icon );
     260
    258261        mainwindow_visible = set->value("mainwindow_visible", true).toBool();
    259262
     
    277280        updateShowAllAct();
    278281}
     282
    279283
    280284void BaseGuiPlus::trayIconActivated(QSystemTrayIcon::ActivationReason reason) {
     
    354358void BaseGuiPlus::resizeWindow(int w, int h) {
    355359    qDebug("BaseGuiPlus::resizeWindow: %d, %d", w, h);
     360
    356361        if ( (tray->isVisible()) && (!isVisible()) ) showAll(true);
     362
    357363        BaseGui::resizeWindow(w, h );
    358364}
     
    361367    qDebug("BaseGuiPlus::updateMediaInfo");
    362368        BaseGui::updateMediaInfo();
     369
    363370        tray->setToolTip( windowTitle() );
    364371}
     
    366373void BaseGuiPlus::setWindowCaption(const QString & title) {
    367374        tray->setToolTip( title );
     375
    368376        BaseGui::setWindowCaption( title );
    369377}
     
    605613        return volumeslider_action;
    606614}
     615
    607616#ifdef Q_OS_OS2
    608617// we test if xcenter is available at all. if not disable the tray action. this is possible when xcenter is not opened or crashed
    609 void BaseGuiPlus::trayAvailable()
    610 {
    611         if (!tray->isSystemTrayAvailable()) {
    612            optionsMenu->removeAction(showTrayAct);
    613         }
    614         else {
    615            optionsMenu->addAction(showTrayAct);
    616         }
    617 }
    618 #endif
     618void BaseGuiPlus::trayAvailable() {
     619        if (!tray->isSystemTrayAvailable()) {
     620                        optionsMenu->removeAction(showTrayAct);
     621        }
     622        else {
     623                optionsMenu->addAction(showTrayAct);
     624        }
     625}
     626#endif
     627
    619628#include "moc_baseguiplus.cpp"
Note: See TracChangeset for help on using the changeset viewer.