Ignore:
Timestamp:
May 3, 2016, 5:25:45 PM (9 years ago)
Author:
Silvan Scherrer
Message:

smplayer: update trunk to version 16.4

Location:
smplayer/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • smplayer/trunk

  • smplayer/trunk/src/prefinterface.cpp

    r170 r176  
    11/*  smplayer, GUI front-end for mplayer.
    2     Copyright (C) 2006-2014 Ricardo Villalba <rvm@users.sourceforge.net>
     2    Copyright (C) 2006-2016 Ricardo Villalba <rvm@users.sourceforge.net>
    33
    44    This program is free software; you can redistribute it and/or modify
     
    6060        QStringList iconsets = icon_dir.entryList(QDir::Dirs | QDir::NoDotAndDotDot);
    6161        for (int n=0; n < iconsets.count(); n++) {
    62                 QString theme_dir = Paths::configPath() + "/themes/" + iconsets[n];
    63                 #ifdef USE_RESOURCES
    64                 if (!QFile::exists(theme_dir + "/" + iconsets[n] + ".rcc")) continue;
    65                 #endif
    66 
    6762                #ifdef SKINS
    68                 QString css_file = theme_dir + "/main.css";
     63                QString css_file = Paths::configPath() + "/themes/" + iconsets[n] + "/main.css";
    6964                bool is_skin = QFile::exists(css_file);
    7065                //qDebug("***** %s %d", css_file.toUtf8().constData(), is_skin);
     
    8277        iconsets = icon_dir.entryList(QDir::Dirs | QDir::NoDotAndDotDot);
    8378        for (int n=0; n < iconsets.count(); n++) {
    84                 QString theme_dir = Paths::themesPath() + "/" + iconsets[n];
    85                 #ifdef USE_RESOURCES
    86                 if (!QFile::exists(theme_dir + "/" + iconsets[n] + ".rcc")) continue;
    87                 #endif
    88 
    8979                #ifdef SKINS
    90                 QString css_file = theme_dir + "/main.css";
     80                QString css_file = Paths::themesPath() + "/" + iconsets[n] + "/main.css";
    9181                bool is_skin = QFile::exists(css_file);
    9282                //qDebug("***** %s %d", css_file.toUtf8().constData(), is_skin);
     
    119109            this, SLOT(GUIChanged(int)));
    120110#endif
     111
     112        connect(mainwindow_resize_combo, SIGNAL(currentIndexChanged(int)),
     113            this, SLOT(resizeMethodChanged(int)));
    121114
    122115#ifndef SEEKBAR_RESOLUTION
     
    174167
    175168        // Icons
    176         resize_window_icon->setPixmap( Images::icon("resize_window") );
     169        /* resize_window_icon->setPixmap( Images::icon("resize_window") ); */
    177170        /* volume_icon->setPixmap( Images::icon("speaker") ); */
    178171
     
    188181
    189182        if (qApp->isLeftToRight()) {
    190                 seek1->setIcon( Images::icon("forward10s") );
    191                 seek2->setIcon( Images::icon("forward1m") );
    192                 seek3->setIcon( Images::icon("forward10m") );
     183                seek1->setIcon( Images::icon("forward10s", 32) );
     184                seek2->setIcon( Images::icon("forward1m", 32) );
     185                seek3->setIcon( Images::icon("forward10m", 32) );
    193186        } else {
    194                 seek1->setIcon( Images::flippedIcon("forward10s") );
    195                 seek2->setIcon( Images::flippedIcon("forward1m") );
    196                 seek3->setIcon( Images::flippedIcon("forward10m") );
    197         }
    198         seek4->setIcon( Images::icon("mouse", seek1->icon()->width()) );
     187                seek1->setIcon( Images::flippedIcon("forward10s", 32) );
     188                seek2->setIcon( Images::flippedIcon("forward1m", 32) );
     189                seek3->setIcon( Images::flippedIcon("forward10m", 32) );
     190        }
     191        seek4->setIcon( Images::icon("mouse",32) );
    199192
    200193        // Language combo
     
    212205        int gui_index = gui_combo->currentIndex();
    213206        gui_combo->clear();
     207#ifdef DEFAULTGUI
    214208        gui_combo->addItem( tr("Basic GUI"), "DefaultGUI");
     209#endif
     210#ifdef MINIGUI
    215211        gui_combo->addItem( tr("Mini GUI"), "MiniGUI");
     212#endif
    216213#ifdef MPCGUI
    217214        gui_combo->addItem( tr("Mpc GUI"), "MpcGUI");
     
    239236        setSaveSize( pref->save_window_size_on_exit );
    240237
    241         move_when_dragging_check->setChecked(pref->move_when_dragging);
     238        center_window_check->setChecked(pref->center_window);
     239        center_if_outside_check->setChecked(pref->center_window_if_outside);
    242240
    243241#ifdef SINGLE_INSTANCE
     
    306304        pref->save_window_size_on_exit = saveSize();
    307305
    308         pref->move_when_dragging = move_when_dragging_check->isChecked();
     306        pref->center_window = center_window_check->isChecked();
     307        pref->center_window_if_outside = center_if_outside_check->isChecked();
    309308
    310309#ifdef SINGLE_INSTANCE
     
    479478#endif
    480479
     480void PrefInterface::resizeMethodChanged(int index) {
     481        center_if_outside_check->setEnabled(index != 0);
     482}
     483
    481484#ifdef SINGLE_INSTANCE
    482485void PrefInterface::setUseSingleInstance(bool b) {
     
    658661           "you prefer.") );
    659662
     663        setWhatsThis(center_if_outside_check, tr("Prevent window to get outside of screen"),
     664                tr("If after an autoresize the main window gets outside of the screen this option "
     665           "will center the window to prevent it.") );
     666
     667        setWhatsThis(center_window_check, tr("Center window"),
     668        tr("When this option is enabled, the main window will be centered on the desktop.") );
     669
    660670        setWhatsThis(save_size_check, tr("Remember position and size"),
    661671        tr("If you check this option, the position and size of the main "
     
    664674        setWhatsThis(hide_video_window_on_audio_check, tr("Hide video window when playing audio files"),
    665675        tr("If this option is enabled the video window will be hidden when playing audio files.") );
    666 
    667         setWhatsThis(move_when_dragging_check, tr("Move the window when the video area is dragged"),
    668         tr("If this option is checked, the main window will be moved if you drag the mouse over the video area.") );
    669676
    670677        setWhatsThis(language_combo, tr("Language"),
     
    676683           "toolbar and control bar.") +" "+
    677684        tr("The <b>Mini GUI</b> provides a more simple interface, without toolbar and a control bar with few "
    678            "buttons.") +" "+
    679         tr("The <b>Skinnable GUI</b> provides an interface where several skins are available.")
     685           "buttons.")
    680686#ifdef MPCGUI
    681687        +" "+
    682688        tr("The <b>Mpc GUI</b> looks like the interface in Media Player Classic.")
    683689#endif
     690#ifdef SKINS
     691        +" "+
     692        tr("The <b>Skinnable GUI</b> provides an interface where several skins are available.")
     693#endif
     694
    684695        );
    685696
     
    736747           "so if you press play button the media will resume at the same point. You need "
    737748           "to press the stop button twice to reset the time position, but if this "
    738            "option is checked the time position will be set to 0 with only once "
     749           "option is checked the time position will be set to 0 with only one "
    739750           "press of the stop button.") );
    740751
Note: See TracChangeset for help on using the changeset viewer.