Ignore:
Timestamp:
Jan 24, 2017, 12:24:46 PM (9 years ago)
Author:
Silvan Scherrer
Message:

SMPlayer: update vendor to 17.1.0

File:
1 edited

Legend:

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

    r179 r186  
    11/*  smplayer, GUI front-end for mplayer.
    2     Copyright (C) 2006-2016 Ricardo Villalba <[email protected]>
     2    Copyright (C) 2006-201 Ricardo Villalba <[email protected]>
    33
    44    This program is free software; you can redistribute it and/or modify
     
    4242#include <QDesktopWidget>
    4343
    44 #include <cmath>
     44#include <h>
    4545
    4646#include "mplayerwindow.h"
     
    261261#endif
    262262
    263 #if defined(SHARE_ACTIONS) && !defined(SHARE_WIDGET)
     263#if
    264264        QTimer::singleShot(1000, this, SLOT(checkReminder()));
    265265#endif
     
    907907             this, SLOT(helpShowConfig()) );
    908908
    909 #ifdef SHARE_ACTIONS
    910909        donateAct = new MyAction( this, "donate" );
    911910        connect( donateAct, SIGNAL(triggered()),
    912911             this, SLOT(helpDonate()) );
    913 #endif
    914912
    915913        aboutThisAct = new MyAction( this, "about_smplayer" );
     
    10681066                         core, SLOT(nextWheelFunction()) );
    10691067
    1070         showFilenameAct = new MyAction(Qt::SHIFT | Qt::Key_I, this, "show_filename");
     1068        showFilenameAct = new MyAction(Qt::SHIFT | Qt::Key_I, this, "show_");
    10711069        connect( showFilenameAct, SIGNAL(triggered()), core, SLOT(showFilenameOnOSD()) );
    10721070
     
    14821480
    14831481        // Screenshot option
     1482
    14841483        bool screenshots_enabled = ( (pref->use_screenshot) &&
    14851484                                 (!pref->screenshot_directory.isEmpty()) &&
     
    14881487        screenshotAct->setEnabled( screenshots_enabled );
    14891488        screenshotsAct->setEnabled( screenshots_enabled );
     1489
    14901490
    14911491#ifdef CAPTURE_STREAM
     
    15681568        // Disable video filters if using vdpau
    15691569        if ((pref->vdpau.disable_video_filters) && (pref->vo.startsWith("vdpau"))) {
     1570
    15701571                screenshotAct->setEnabled(false);
    15711572                screenshotsAct->setEnabled(false);
     1573
    15721574                flipAct->setEnabled(false);
    15731575                mirrorAct->setEnabled(false);
     
    18441846#ifdef SHARE_ACTIONS
    18451847        donateAct->change( Images::icon("donate"), tr("&Donate / Share with your friends") );
     1848
     1849
    18461850#endif
    18471851        aboutThisAct->change( Images::icon("logo"), tr("About &SMPlayer") );
     
    18991903        nextWheelFunctionAct->change( Images::icon("next_wheel_function"), tr("Next wheel function") );
    19001904
    1901         showFilenameAct->change( tr("Show filename on OSD") );
     1905        showFilenameAct->change( tr("Show on OSD") );
    19021906        showTimeAct->change( tr("Show playback time on OSD") );
     1907
    19031908        toggleDeinterlaceAct->change( tr("Toggle deinterlacing") );
    19041909
     
    23202325        sharewidget = new ShareWidget(Global::settings, mplayerwindow);
    23212326        mplayerwindow->setCornerWidget(sharewidget);
    2322         #ifdef SHARE_ACTIONS
     2327        #ifdef SHARE_ACTIONS
    23232328        connect(sharewidget, SIGNAL(supportClicked()), this, SLOT(helpDonate()));
    2324         #endif
     2329        #endif
    23252330#endif
    23262331
     
    24342439            core, SLOT(open(const QString &, int)));
    24352440
     2441
     2442
     2443
    24362444        connect(playlist, SIGNAL(requestToAddCurrentFile()), this, SLOT(addToPlaylistCurrentFile()));
    24372445
    2438         if (playlist->automaticallyPlayNext()) {
    2439                 connect( core, SIGNAL(mediaFinished()), playlist, SLOT(playNext()), Qt::QueuedConnection );
    2440         }
     2446        connect( core, SIGNAL(mediaFinished()), playlist, SLOT(playNextAuto()), Qt::QueuedConnection );
     2447
    24412448        connect( core, SIGNAL(mplayerFailed(QProcess::ProcessError)), playlist, SLOT(playerFailed(QProcess::ProcessError)) );
    24422449        connect( core, SIGNAL(mplayerFinishedWithError(int)), playlist, SLOT(playerFinishedWithError(int)) );
     
    26962703        osd_menu->menuAction()->setObjectName("osd_menu");
    26972704        osd_menu->addActions(osdGroup->actions());
     2705
     2706
    26982707        osd_menu->addSeparator();
    26992708        osd_menu->addAction(decOSDScaleAct);
     
    29852994                helpMenu->addSeparator();
    29862995        }
    2987         #ifdef SHARE_ACTIONS
    29882996        helpMenu->addAction(donateAct);
    29892997        helpMenu->addSeparator();
    2990         #endif
    29912998        helpMenu->addAction(aboutThisAct);
    29922999
     
    31073114        pl->setSavePlaylistOnExit(playlist->savePlaylistOnExit());
    31083115        pl->setPlayFilesFromStart(playlist->playFilesFromStart());
     3116
     3117
    31093118        pl->setIgnorePlayerErrors(playlist->ignorePlayerErrors());
     3119
     3120
    31103121
    31113122        pref_dialog->show();
     
    31173128
    31183129        bool need_update_language = false;
     3130
    31193131
    31203132        PlayerID::Player old_player_type = PlayerID::player(pref->mplayer_bin);
     
    31243136        // Setup proxy
    31253137        setupNetworkProxy();
    3126 
    3127         // Change application font
    3128         if (!pref->default_font.isEmpty()) {
    3129                 QFont f;
    3130                 f.fromString( pref->default_font );
    3131                 if (QApplication::font() != f) {
    3132                         qDebug("BaseGui::applyNewPreferences: setting new font: %s", pref->default_font.toLatin1().constData());
    3133                         QApplication::setFont(f);
    3134                 }
    3135         }
    31363138
    31373139        PrefGeneral *_general = pref_dialog->mod_general();
     
    31503152                // Stylesheet
    31513153                #if ALLOW_CHANGE_STYLESHEET
    3152                 if (!_interface->guiChanged()) applyStyles();
     3154                if (!_interface->guiChanged()) ;
    31533155                #endif
    31543156        }
     3157
     3158
    31553159
    31563160#ifndef MOUSE_GESTURES
     
    31993203        playlist->setSavePlaylistOnExit(pl->savePlaylistOnExit());
    32003204        playlist->setPlayFilesFromStart(pl->playFilesFromStart());
     3205
     3206
    32013207        playlist->setIgnorePlayerErrors(pl->ignorePlayerErrors());
     3208
     3209
    32023210
    32033211#ifdef PLAYLIST_DOWNLOAD
     
    32143222#if STYLE_SWITCHING
    32153223        if (_interface->styleChanged()) {
    3216                 applyStyles();
    3217         }
    3218 #endif
    3219 
    3220     // Restart the video if needed
     3224                need_apply_styles = true;
     3225        }
     3226#endif
     3227
     3228        if (need_apply_styles) applyStyles();
     3229
     3230        // Restart the video if needed
    32213231        if (pref_dialog->requiresRestart())
    32223232                core->restart();
     
    40924102        qDebug("BaseGui::openFavorite");
    40934103
     4104
     4105
     4106
     4107
     4108
    40944109        openFiles(QStringList() << file);
    40954110}
     
    41574172
    41584173void BaseGui::openFile() {
    4159         qDebug("BaseGui::fileOpen");
     4174        qDebug("BaseGui::");
    41604175
    41614176        exitFullscreenIfNeeded();
     
    41764191
    41774192void BaseGui::openFile(QString file) {
    4178         qDebug("BaseGui::openFile: '%s'", file.toUtf8().data());
     4193        qDebug(;
    41794194
    41804195   if ( !file.isEmpty() ) {
    41814196
     4197
     4198
     4199
     4200
     4201
     4202
     4203
     4204
    41824205                //playlist->clear();
    41834206                //playlistdock->hide();
     
    44654488                #endif
    44664489        }
     4490
     4491
     4492
     4493
     4494
     4495
     4496
     4497
     4498
     4499
     4500
     4501
     4502
     4503
     4504
     4505
     4506
     4507
     4508
     4509
     4510
     4511
     4512
     4513
     4514
     4515
     4516
     4517
     4518
     4519
     4520
     4521
     4522
     4523
     4524
     4525
     4526
     4527
     4528
     4529
     4530
    44674531}
    44684532#endif
     
    46524716        updateWidgets();
    46534717
     4718
    46544719        if ((pref->add_blackborders_on_fullscreen) &&
    46554720        (!core->mset.add_letterbox))
     
    46584723                /* core->restart(); */
    46594724        }
     4725
    46604726
    46614727        setFocus(); // Fixes bug #2493415
     
    48904956#endif
    48914957
    4892 #if defined(SHARE_ACTIONS) && !defined(SHARE_WIDGET)
     4958#if
    48934959void BaseGui::checkReminder() {
    48944960        qDebug("BaseGui::checkReminder");
     
    49124978#endif
    49134979
     4980
    49144981        ShareDialog d(this);
    49154982        //d.showRemindCheck(false);
     
    49234990                set->endGroup();
    49244991        }
     4992
     4993
     4994
     4995
     4996
     4997
    49254998
    49264999        if (action > 0) {
     
    52225295        if (!core->mdat.filename.isEmpty()) {
    52235296                playlist->addItem(core->mdat.filename, "", 0);
     5297
    52245298                playlist->getMediaInfo(core->mdat);
    52255299        }
     
    52605334
    52615335void BaseGui::gotCurrentTime(double sec) {
    5262         //qDebug( "DefaultGui::displayTime: %f", sec);
     5336        //qDebug(;
    52635337
    52645338        static int last_second = 0;
    52655339
    5266         if (floor(sec)==last_second) return; // Update only once per second
    5267         last_second = (int) floor(sec);
     5340        if (last_second) return; // Update only once per second
     5341        last_second = loor(sec);
    52685342
    52695343        QString time = Helper::formatTime( (int) sec ) + " / " +
    52705344                           Helper::formatTime( (int) core->mdat.duration );
    5271 
    5272         //qDebug( " duration: %f, current_sec: %f", core->mdat.duration, core->mset.current_sec);
    52735345
    52745346        emit timeChanged(sec);
     
    54015473
    54025474        if (panel->isVisible()) {
     5475
     5476
    54035477                // Exit from fullscreen mode
    54045478                if (pref->fullscreen) { toggleFullscreen(false); update(); }
     
    56285702        }
    56295703
     5704
     5705
     5706
     5707
     5708
     5709
     5710
     5711
     5712
    56305713        //qDebug() << "BaseGui::changeStyleSheet: styleSheet:" << stylesheet;
    56315714        qApp->setStyleSheet(stylesheet);
     
    56355718void BaseGui::applyStyles() {
    56365719        qDebug("BaseGui::applyStyles");
     5720
     5721
     5722
     5723
     5724
     5725
     5726
     5727
     5728
     5729
     5730
    56375731
    56385732#if ALLOW_CHANGE_STYLESHEET
     
    56525746        }
    56535747#endif
     5748
    56545749}
    56555750
Note: See TracChangeset for help on using the changeset viewer.