Changeset 119 for smplayer/trunk/src/baseguiplus.cpp
- Timestamp:
- Dec 27, 2011, 5:44:12 PM (14 years ago)
- Location:
- smplayer/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
smplayer/trunk
-
Property svn:mergeinfo
set to
/smplayer/vendor/current merged eligible
-
Property svn:mergeinfo
set to
-
smplayer/trunk/src/baseguiplus.cpp
r112 r119 1 1 /* smplayer, GUI front-end for mplayer. 2 Copyright (C) 2006-201 0Ricardo Villalba <rvm@escomposlinux.org>2 Copyright (C) 2006-2011 Ricardo Villalba <rvm@escomposlinux.org> 3 3 4 4 This program is free software; you can redistribute it and/or modify … … 81 81 optionsMenu->addAction(showTrayAct); 82 82 #else 83 84 83 trayAvailable(); 84 connect( optionsMenu, SIGNAL(aboutToShow()), 85 85 this, SLOT(trayAvailable()) ); 86 86 #endif … … 89 89 connect( showAllAct, SIGNAL(triggered()), 90 90 this, SLOT(toggleShowAll()) ); 91 91 92 92 93 context_menu = new QMenu(this); … … 113 114 context_menu->addSeparator(); 114 115 context_menu->addAction(quitAct); 115 116 116 117 tray->setContextMenu( context_menu ); 118 117 119 #if DOCK_PLAYLIST 118 120 // Playlistdock … … 172 174 void BaseGuiPlus::closeWindow() { 173 175 qDebug("BaseGuiPlus::closeWindow"); 176 174 177 if (tray->isVisible()) { 175 178 //e->ignore(); … … 201 204 202 205 quitAct->change( Images::icon("exit"), tr("&Quit") ); 203 204 206 showTrayAct->change( Images::icon("systray"), tr("S&how icon in system tray") ); 207 205 208 updateShowAllAct(); 206 209 … … 253 256 254 257 bool show_tray_icon = set->value( "show_tray_icon", false).toBool(); 255 256 258 showTrayAct->setChecked( show_tray_icon ); 257 259 //tray->setVisible( show_tray_icon ); 260 258 261 mainwindow_visible = set->value("mainwindow_visible", true).toBool(); 259 262 … … 277 280 updateShowAllAct(); 278 281 } 282 279 283 280 284 void BaseGuiPlus::trayIconActivated(QSystemTrayIcon::ActivationReason reason) { … … 354 358 void BaseGuiPlus::resizeWindow(int w, int h) { 355 359 qDebug("BaseGuiPlus::resizeWindow: %d, %d", w, h); 360 356 361 if ( (tray->isVisible()) && (!isVisible()) ) showAll(true); 362 357 363 BaseGui::resizeWindow(w, h ); 358 364 } … … 361 367 qDebug("BaseGuiPlus::updateMediaInfo"); 362 368 BaseGui::updateMediaInfo(); 369 363 370 tray->setToolTip( windowTitle() ); 364 371 } … … 366 373 void BaseGuiPlus::setWindowCaption(const QString & title) { 367 374 tray->setToolTip( title ); 375 368 376 BaseGui::setWindowCaption( title ); 369 377 } … … 605 613 return volumeslider_action; 606 614 } 615 607 616 #ifdef Q_OS_OS2 608 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 609 void BaseGuiPlus::trayAvailable() 610 {611 if (!tray->isSystemTrayAvailable()) { 612 optionsMenu->removeAction(showTrayAct); 613 } 614 else { 615 optionsMenu->addAction(showTrayAct); 616 617 } 618 #endif 618 void BaseGuiPlus::trayAvailable() { 619 if (!tray->isSystemTrayAvailable()) { 620 optionsMenu->removeAction(showTrayAct); 621 } 622 else { 623 optionsMenu->addAction(showTrayAct); 624 } 625 } 626 #endif 627 619 628 #include "moc_baseguiplus.cpp"
Note:
See TracChangeset
for help on using the changeset viewer.