Changeset 186 for smplayer/vendor/current/src/prefgeneral.cpp
- Timestamp:
- Jan 24, 2017, 12:24:46 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
smplayer/vendor/current/src/prefgeneral.cpp
r179 r186 1 1 /* smplayer, GUI front-end for mplayer. 2 Copyright (C) 2006-201 6Ricardo Villalba <rvm@users.sourceforge.net>2 Copyright (C) 2006-2017 Ricardo Villalba <rvm@users.sourceforge.net> 3 3 4 4 This program is free software; you can redistribute it and/or modify … … 27 27 #include "playerid.h" 28 28 29 #if USE_ALSA_DEVICES || USE_ DSOUND_DEVICES29 #if USE_ALSA_DEVICES || USE_PULSEAUDIO_DEVICES || USE_XV_ADAPTORS || USE_DSOUND_DEVICES 30 30 #include "deviceinfo.h" 31 31 #endif … … 65 65 #if USE_ALSA_DEVICES 66 66 alsa_devices = DeviceInfo::alsaDevices(); 67 #endif 68 #if USE_MPV_ALSA_DEVICES 69 mpv_alsa_devices = DeviceInfo::mpvAlsaDevices(); 70 #endif 71 #if USE_PULSEAUDIO_DEVICES 72 pa_devices = DeviceInfo::paDevices(); 67 73 #endif 68 74 #if USE_XV_ADAPTORS … … 89 95 #ifndef AUTO_SHUTDOWN_PC 90 96 shutdown_widget->hide(); 97 #endif 98 99 #ifndef ADD_BLACKBORDERS_FS 100 blackborders_on_fs_check->hide(); 101 #endif 102 103 #ifndef INITIAL_BLACKBORDERS 104 blackborders_check->hide(); 91 105 #endif 92 106 … … 245 259 setUseSlices( pref->use_slices ); 246 260 setStartInFullscreen( pref->start_in_fullscreen ); 261 262 #ifdef ADD_BLACKBORDERS_FS 247 263 setBlackbordersOnFullscreen( pref->add_blackborders_on_fullscreen ); 264 #endif 265 266 #ifdef INITIAL_BLACKBORDERS 267 blackborders_check->setChecked(pref->initial_blackborders); 268 #endif 269 248 270 setAutoq( pref->autoq ); 249 271 … … 338 360 TEST_AND_SET(pref->use_slices, useSlices()); 339 361 pref->start_in_fullscreen = startInFullscreen(); 362 363 #ifdef ADD_BLACKBORDERS_FS 340 364 if (pref->add_blackborders_on_fullscreen != blackbordersOnFullscreen()) { 341 365 pref->add_blackborders_on_fullscreen = blackbordersOnFullscreen(); 342 366 if (pref->fullscreen) requires_restart = true; 343 367 } 368 #endif 369 370 #ifdef INITIAL_BLACKBORDERS 371 pref->initial_blackborders = blackborders_check->isChecked(); 372 #endif 373 344 374 TEST_AND_SET(pref->autoq, autoq()); 345 375 … … 446 476 ao = ao_list[n].name(); 447 477 ao_combo->addItem( ao, ao ); 478 /* 448 479 #ifdef Q_OS_OS2 449 480 if ( ao == "kai") { … … 452 483 } 453 484 #endif 485 */ 454 486 #if USE_ALSA_DEVICES 455 487 if ((ao == "alsa") && (!alsa_devices.isEmpty())) { 456 488 for (int n=0; n < alsa_devices.count(); n++) { 457 ao_combo->addItem( "alsa (" + alsa_devices[n].ID().toString() + " - " + alsa_devices[n].desc() + ")", 458 "alsa:device=hw=" + alsa_devices[n].ID().toString() ); 489 ao_combo->addItem( DeviceInfo::printableName("alsa", alsa_devices[n]), DeviceInfo::internalName("alsa", alsa_devices[n]) ); 490 } 491 } 492 #endif 493 #if USE_MPV_ALSA_DEVICES 494 if ((ao == "alsa") && (!mpv_alsa_devices.isEmpty())) { 495 for (int n=0; n < mpv_alsa_devices.count(); n++) { 496 ao_combo->addItem( DeviceInfo::printableName("alsa", mpv_alsa_devices[n]), DeviceInfo::internalName("alsa", mpv_alsa_devices[n]) ); 497 } 498 } 499 #endif 500 #if USE_PULSEAUDIO_DEVICES 501 if ((ao == "pulse") && (!pa_devices.isEmpty())) { 502 for (int n=0; n < pa_devices.count(); n++) { 503 ao_combo->addItem( DeviceInfo::printableName("pulse", pa_devices[n]), DeviceInfo::internalName("pulse", pa_devices[n]) ); 459 504 } 460 505 } … … 463 508 if ((ao == "dsound") && (!dsound_devices.isEmpty())) { 464 509 for (int n=0; n < dsound_devices.count(); n++) { 465 ao_combo->addItem( "dsound (" + dsound_devices[n].ID().toString() + " - " + dsound_devices[n].desc() + ")", 466 "dsound:device=" + dsound_devices[n].ID().toString() ); 510 ao_combo->addItem( DeviceInfo::printableName("dsound", dsound_devices[n]), DeviceInfo::internalName("dsound", dsound_devices[n]) ); 467 511 } 468 512 } … … 519 563 520 564 QString PrefGeneral::screenshotDir() { 521 return screenshot_edit->text() ;565 return screenshot_edit->text().trimmed(); 522 566 } 523 567 … … 863 907 #endif 864 908 909 #ifdef ADD_BLACKBORDERS_FS 865 910 void PrefGeneral::setBlackbordersOnFullscreen(bool b) { 866 911 blackborders_on_fs_check->setChecked(b); … … 870 915 return blackborders_on_fs_check->isChecked(); 871 916 } 917 #endif 872 918 873 919 void PrefGeneral::setAutoq(int n) { … … 1058 1104 tr("<b>Note:</b> This option won't be used for TV channels.") ); 1059 1105 1106 #ifdef INITIAL_BLACKBORDERS 1107 setWhatsThis(blackborders_check, tr("Add black borders for subtitles by default"), 1108 tr("If this option is enabled, black borders will be added to the image " 1109 "by default on new opened files.")); 1110 #endif 1111 1060 1112 setWhatsThis(zoom_spin, tr("Default zoom"), 1061 1113 tr("This option sets the default zoom which will be used for " … … 1088 1140 "fullscreen mode.") ); 1089 1141 1142 #ifdef ADD_BLACKBORDERS_FS 1090 1143 setWhatsThis(blackborders_on_fs_check, tr("Add black borders on fullscreen"), 1091 1144 tr("If this option is enabled, black borders will be added to the " … … 1095 1148 "some video drivers (like gl) are already able to display the " 1096 1149 "subtitles automatically in the black borders.") */ ); 1150 #endif 1097 1151 1098 1152 #ifdef Q_OS_WIN
Note:
See TracChangeset
for help on using the changeset viewer.