Ignore:
Timestamp:
Oct 9, 2014, 11:54:00 AM (11 years ago)
Author:
Silvan Scherrer
Message:

SMPlayer: update vendor to 14.9.0

File:
1 edited

Legend:

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

    r163 r168  
    117117#endif
    118118
     119#ifdef AUTO_SHUTDOWN_PC
     120#include "shutdowndialog.h"
     121#include "shutdown.h"
     122#endif
     123
    119124using namespace Global;
    120125
     
    123128{
    124129#if defined(Q_OS_WIN) || defined(Q_OS_OS2)
     130#ifdef AVOID_SCREENSAVER
    125131        /* Disable screensaver by event */
    126132        just_stopped = false;
     133#endif
    127134#endif
    128135        ignore_show_hide_events = false;
     
    16761683        showConfigAct->change( Images::icon("show_config"), tr("&Open configuration folder") );
    16771684#ifdef REMINDER_ACTIONS
    1678         donateAct->change( Images::icon("donate"), tr("&Donate") );
    1679 #endif
    1680         aboutThisAct->change( Images::icon("logo_small"), tr("About &SMPlayer") );
     1685        donateAct->change( Images::icon("donate"), tr("&Donate / Share with your friends") );
     1686#endif
     1687        aboutThisAct->change( Images::icon("logo"), tr("About &SMPlayer") );
    16811688
    16821689#ifdef SHARE_MENU
     
    30343041
    30353042void BaseGui::newMediaLoaded() {
    3036     qDebug("BaseGui::newMediaLoaded");
    3037 
    3038         pref->history_recents->addItem( core->mdat.filename );
     3043        qDebug("BaseGui::newMediaLoaded");
     3044
     3045        QString stream_title = core->mdat.stream_title;
     3046        qDebug("BaseGui::newMediaLoaded: mdat.stream_title: %s", stream_title.toUtf8().constData());
     3047
     3048        if (!stream_title.isEmpty()) {
     3049                pref->history_recents->addItem( core->mdat.filename, stream_title );
     3050                //pref->history_recents->list();
     3051        } else {
     3052                pref->history_recents->addItem( core->mdat.filename );
     3053        }
    30393054        updateRecents();
    30403055
     
    33233338                        }
    33243339
    3325                         QAction * a = recentfiles_menu->addAction( QString("%1. " + filename ).arg( i.insert( i.size()-1, '&' ), 3, ' ' ));
     3340                        QString show_name = filename;
     3341                        QString title = pref->history_recents->title(n);
     3342                        if (!title.isEmpty()) show_name = title;
     3343
     3344                        QAction * a = recentfiles_menu->addAction( QString("%1. " + show_name ).arg( i.insert( i.size()-1, '&' ), 3, ' ' ));
    33263345                        a->setStatusTip(fullname);
    33273346                        a->setData(n);
     
    45674586                files = Helper::resolveSymlinks(files); // Check for Windows shortcuts
    45684587                #endif
     4588                files.sort();
    45694589
    45704590                if (files.count() == 1) {
     
    46874707
    46884708        if (arg_close_on_finish != 0) {
    4689                 if ((arg_close_on_finish == 1) || (pref->close_on_finish)) exitAct->trigger();
     4709                if ((arg_close_on_finish == 1) || (pref->close_on_finish)) {
     4710                        #ifdef AUTO_SHUTDOWN_PC
     4711                        if (pref->auto_shutdown_pc) {
     4712                                ShutdownDialog d(this);
     4713                                if (d.exec() == QDialog::Accepted) {
     4714                                        qDebug("BaseGui::playlistHasFinished: the PC will shut down");
     4715                                        Shutdown::shutdown();
     4716                                } else {
     4717                                        qDebug("BaseGui::playlistHasFinished: shutdown aborted");
     4718                                }
     4719                        }
     4720                        #endif
     4721                        exitAct->trigger();
     4722                }
    46904723        }
    46914724}
     
    47014734
    47024735#if defined(Q_OS_WIN) || defined(Q_OS_OS2)
     4736#ifdef AVOID_SCREENSAVER
    47034737        /* Disable screensaver by event */
    47044738        just_stopped = false;
     
    47094743                QTimer::singleShot( time, this, SLOT(clear_just_stopped()) );
    47104744        }
     4745#endif
    47114746#endif
    47124747}
     
    49675002        QString styleSheet = QLatin1String(file.readAll());
    49685003
     5004#ifdef USE_RESOURCES
     5005        Images::setTheme(pref->iconset);
     5006        QString path = ":/" + pref->iconset;
     5007#else
    49695008        QDir current = QDir::current();
    49705009        QString td = Images::themesDirectory();
    4971         QString relativePath = current.relativeFilePath(td);
     5010        QString path = current.relativeFilePath(td);
     5011#endif
    49725012        styleSheet.replace(QRegExp("url\\s*\\(\\s*([^\\);]+)\\s*\\)", Qt::CaseSensitive, QRegExp::RegExp2),
    4973                                                 QString("url(%1\\1)").arg(relativePath + "/"));
    4974         qDebug("styeSheet: %s", styleSheet.toUtf8().constData());
    4975 
     5013                                                QString("url(%1\\1)").arg(path + "/"));
     5014        //qDebug("BaseGui::loadQss: styeSheet: %s", styleSheet.toUtf8().constData());
    49765015        qApp->setStyleSheet(styleSheet);
    49775016}
     
    52505289
    52515290#if defined(Q_OS_WIN) || defined(Q_OS_OS2)
     5291#ifdef AVOID_SCREENSAVER
    52525292void BaseGui::clear_just_stopped() {
    52535293        qDebug("BaseGui::clear_just_stopped");
     
    52555295}
    52565296#endif
     5297#endif
    52575298
    52585299#include "moc_basegui.cpp"
Note: See TracChangeset for help on using the changeset viewer.