Ignore:
Timestamp:
Dec 22, 2011, 6:27:52 PM (14 years ago)
Author:
Silvan Scherrer
Message:

smplayer vendor udate

File:
1 edited

Legend:

Unmodified
Added
Removed
  • smplayer/vendor/current/src/baseguiplus.cpp

    r90 r118  
    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
     
    7777        connect( showTrayAct, SIGNAL(toggled(bool)),
    7878             tray, SLOT(setVisible(bool)) );
     79
     80#ifndef Q_OS_OS2
    7981        optionsMenu->addAction(showTrayAct);
     82#else
     83        trayAvailable();
     84        connect( optionsMenu, SIGNAL(aboutToShow()),
     85             this, SLOT(trayAvailable()) );
     86#endif
    8087
    8188        showAllAct = new MyAction(this, "restore/hide");
     
    149156
    150157bool BaseGuiPlus::startHidden() {
    151 #ifdef Q_OS_WIN
     158#if defined(Q_OS_WIN) || defined(Q_OS_OS2)
    152159        return false;
    153160#else
     
    607614}
    608615
     616#ifdef Q_OS_OS2
     617// we test if xcenter is available at all. if not disable the tray action. this is possible when xcenter is not opened or crashed
     618void BaseGuiPlus::trayAvailable() {
     619        if (!tray->isSystemTrayAvailable()) {
     620                        optionsMenu->removeAction(showTrayAct);
     621        }
     622        else {
     623                optionsMenu->addAction(showTrayAct);
     624        }
     625}
     626#endif
     627
    609628#include "moc_baseguiplus.cpp"
Note: See TracChangeset for help on using the changeset viewer.