Ignore:
Timestamp:
Mar 29, 2012, 3:09:42 PM (13 years ago)
Author:
Silvan Scherrer
Message:

SMPlayer: update to latest svn

File:
1 edited

Legend:

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

    r121 r127  
    6767        }
    6868
     69#ifdef SINGLE_INSTANCE
    6970        connect(single_instance_check, SIGNAL(toggled(bool)),
    7071            this, SLOT(changeInstanceImages()));
     72#else
     73        tabWidget->setTabEnabled(SINGLE_INSTANCE_TAB, false);
     74#endif
    7175
    7276#ifdef Q_OS_WIN
     
    121125        /* volume_icon->setPixmap( Images::icon("speaker") ); */
    122126
     127#ifdef SINGLE_INSTANCE
    123128        changeInstanceImages();
     129#endif
    124130
    125131        // Seek widgets
     
    171177        setResizeMethod( pref->resize_method );
    172178        setSaveSize( pref->save_window_size_on_exit );
     179#ifdef SINGLE_INSTANCE
    173180        setUseSingleInstance(pref->use_single_instance);
    174         setServerPort(pref->connection_port);
    175         setUseAutoPort(pref->use_autoport);
     181#endif
    176182        setRecentsMaxItems(pref->history_recents->maxItems());
    177183
     
    208214        language_changed = false;
    209215        iconset_changed = false;
     216        gui_changed = false;
     217        style_changed = false;
    210218        recents_changed = false;
    211         port_changed = false;
    212         style_changed = false;
    213219
    214220        if (pref->language != language()) {
     
    223229        }
    224230
     231        if (pref->gui != GUI()) {
     232                pref->gui = GUI();
     233                gui_changed = true;
     234        }
     235
    225236        pref->resize_method = resizeMethod();
    226237        pref->save_window_size_on_exit = saveSize();
    227238
     239#ifdef SINGLE_INSTANCE
    228240        pref->use_single_instance = useSingleInstance();
    229         if (pref->connection_port != serverPort()) {
    230                 pref->connection_port = serverPort();
    231                 port_changed = true;
    232         }
    233 
    234         if (pref->use_autoport != useAutoPort()) {
    235                 pref->use_autoport = useAutoPort();
    236                 port_changed = true;
    237         }
     241#endif
    238242
    239243        if (pref->history_recents->maxItems() != recentsMaxItems()) {
     
    261265        }
    262266#endif
    263 
    264         pref->gui = GUI();
    265267
    266268        pref->floating_control_animated = floatingAnimated();
     
    348350}
    349351
     352#ifdef SINGLE_INSTANCE
    350353void PrefInterface::setUseSingleInstance(bool b) {
    351354        single_instance_check->setChecked(b);
     
    356359        return single_instance_check->isChecked();
    357360}
    358 
    359 void PrefInterface::setServerPort(int port) {
    360         server_port_spin->setValue(port);
    361 }
    362 
    363 int PrefInterface::serverPort() {
    364         return server_port_spin->value();
    365 }
    366 
    367 void PrefInterface::setUseAutoPort(bool b) {
    368         automatic_port_button->setChecked(b);
    369         manual_port_button->setChecked(!b);
    370 }
    371 
    372 bool PrefInterface::useAutoPort() {
    373         return automatic_port_button->isChecked();
    374 }
    375 
    376 void PrefInterface::setSingleInstanceTabEnabled(bool b) {
    377         tabWidget->setTabEnabled(SINGLE_INSTANCE_TAB, b);
    378 }
    379 
    380 bool PrefInterface::singleInstanceTabEnabled() {
    381         return tabWidget->isTabEnabled(SINGLE_INSTANCE_TAB);
    382 }
     361#endif
    383362
    384363void PrefInterface::setRecentsMaxItems(int n) {
     
    473452}
    474453
     454#ifdef SINGLE_INSTANCE
    475455void PrefInterface::changeInstanceImages() {
    476456        if (single_instance_check->isChecked())
     
    479459                instances_icon->setPixmap( Images::icon("instance2") );
    480460}
     461#endif
    481462
    482463void PrefInterface::setHideVideoOnAudioFiles(bool b) {
     
    605586                tr("Note: this option only works with MPlayer2") );
    606587
     588#ifdef SINGLE_INSTANCE
    607589        addSectionTitle(tr("Instances"));
    608590
     
    611593        tr("Check this option if you want to use an already running instance "
    612594           "of SMPlayer when opening other files.") );
    613 
    614         setWhatsThis(automatic_port_button, tr("Automatic port"),
    615         tr("SMPlayer needs to listen to a port to receive commands from other "
    616            "instances. If you select this option, a port will be "
    617            "automatically chosen.") );
    618 
    619         setWhatsThis(server_port_spin, tr("Manual port"),
    620         tr("SMPlayer needs to listen to a port to receive commands from other "
    621            "instances. You can change the port in case the default one is "
    622            "used by another application.") );
    623 
    624         manual_port_button->setWhatsThis( server_port_spin->whatsThis() );
     595#endif
    625596
    626597        addSectionTitle(tr("Floating control"));
Note: See TracChangeset for help on using the changeset viewer.