Changeset 188 for smplayer/trunk/src/prefgeneral.cpp
- Timestamp:
- Jan 24, 2017, 12:41:54 PM (8 years ago)
- Location:
- smplayer/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
smplayer/trunk
- Property svn:mergeinfo changed
/smplayer/vendor/current merged: 186
- Property svn:mergeinfo changed
-
smplayer/trunk/src/prefgeneral.cpp
r182 r188 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 … … 68 68 #if USE_ALSA_DEVICES 69 69 alsa_devices = DeviceInfo::alsaDevices(); 70 #endif 71 #if USE_MPV_ALSA_DEVICES 72 mpv_alsa_devices = DeviceInfo::mpvAlsaDevices(); 73 #endif 74 #if USE_PULSEAUDIO_DEVICES 75 pa_devices = DeviceInfo::paDevices(); 70 76 #endif 71 77 #if USE_XV_ADAPTORS … … 92 98 #ifndef AUTO_SHUTDOWN_PC 93 99 shutdown_widget->hide(); 100 #endif 101 102 #ifndef ADD_BLACKBORDERS_FS 103 blackborders_on_fs_check->hide(); 104 #endif 105 106 #ifndef INITIAL_BLACKBORDERS 107 blackborders_check->hide(); 94 108 #endif 95 109 … … 248 262 setUseSlices( pref->use_slices ); 249 263 setStartInFullscreen( pref->start_in_fullscreen ); 264 265 #ifdef ADD_BLACKBORDERS_FS 250 266 setBlackbordersOnFullscreen( pref->add_blackborders_on_fullscreen ); 267 #endif 268 269 #ifdef INITIAL_BLACKBORDERS 270 blackborders_check->setChecked(pref->initial_blackborders); 271 #endif 272 251 273 setAutoq( pref->autoq ); 252 274 … … 341 363 TEST_AND_SET(pref->use_slices, useSlices()); 342 364 pref->start_in_fullscreen = startInFullscreen(); 365 366 #ifdef ADD_BLACKBORDERS_FS 343 367 if (pref->add_blackborders_on_fullscreen != blackbordersOnFullscreen()) { 344 368 pref->add_blackborders_on_fullscreen = blackbordersOnFullscreen(); 345 369 if (pref->fullscreen) requires_restart = true; 346 370 } 371 #endif 372 373 #ifdef INITIAL_BLACKBORDERS 374 pref->initial_blackborders = blackborders_check->isChecked(); 375 #endif 376 347 377 TEST_AND_SET(pref->autoq, autoq()); 348 378 … … 449 479 ao = ao_list[n].name(); 450 480 ao_combo->addItem( ao, ao ); 481 /* 451 482 #ifdef Q_OS_OS2 452 483 if ( ao == "kai") { … … 455 486 } 456 487 #endif 488 */ 457 489 #if USE_ALSA_DEVICES 458 490 if ((ao == "alsa") && (!alsa_devices.isEmpty())) { 459 491 for (int n=0; n < alsa_devices.count(); n++) { 460 ao_combo->addItem( "alsa (" + alsa_devices[n].ID().toString() + " - " + alsa_devices[n].desc() + ")", 461 "alsa:device=hw=" + alsa_devices[n].ID().toString() ); 492 ao_combo->addItem( DeviceInfo::printableName("alsa", alsa_devices[n]), DeviceInfo::internalName("alsa", alsa_devices[n]) ); 493 } 494 } 495 #endif 496 #if USE_MPV_ALSA_DEVICES 497 if ((ao == "alsa") && (!mpv_alsa_devices.isEmpty())) { 498 for (int n=0; n < mpv_alsa_devices.count(); n++) { 499 ao_combo->addItem( DeviceInfo::printableName("alsa", mpv_alsa_devices[n]), DeviceInfo::internalName("alsa", mpv_alsa_devices[n]) ); 500 } 501 } 502 #endif 503 #if USE_PULSEAUDIO_DEVICES 504 if ((ao == "pulse") && (!pa_devices.isEmpty())) { 505 for (int n=0; n < pa_devices.count(); n++) { 506 ao_combo->addItem( DeviceInfo::printableName("pulse", pa_devices[n]), DeviceInfo::internalName("pulse", pa_devices[n]) ); 462 507 } 463 508 } … … 466 511 if ((ao == "dsound") && (!dsound_devices.isEmpty())) { 467 512 for (int n=0; n < dsound_devices.count(); n++) { 468 ao_combo->addItem( "dsound (" + dsound_devices[n].ID().toString() + " - " + dsound_devices[n].desc() + ")", 469 "dsound:device=" + dsound_devices[n].ID().toString() ); 513 ao_combo->addItem( DeviceInfo::printableName("dsound", dsound_devices[n]), DeviceInfo::internalName("dsound", dsound_devices[n]) ); 470 514 } 471 515 } … … 522 566 523 567 QString PrefGeneral::screenshotDir() { 524 return screenshot_edit->text() ;568 return screenshot_edit->text().trimmed(); 525 569 } 526 570 … … 866 910 #endif 867 911 912 #ifdef ADD_BLACKBORDERS_FS 868 913 void PrefGeneral::setBlackbordersOnFullscreen(bool b) { 869 914 blackborders_on_fs_check->setChecked(b); … … 873 918 return blackborders_on_fs_check->isChecked(); 874 919 } 920 #endif 875 921 876 922 void PrefGeneral::setAutoq(int n) { … … 1061 1107 tr("<b>Note:</b> This option won't be used for TV channels.") ); 1062 1108 1109 #ifdef INITIAL_BLACKBORDERS 1110 setWhatsThis(blackborders_check, tr("Add black borders for subtitles by default"), 1111 tr("If this option is enabled, black borders will be added to the image " 1112 "by default on new opened files.")); 1113 #endif 1114 1063 1115 setWhatsThis(zoom_spin, tr("Default zoom"), 1064 1116 tr("This option sets the default zoom which will be used for " … … 1091 1143 "fullscreen mode.") ); 1092 1144 1145 #ifdef ADD_BLACKBORDERS_FS 1093 1146 setWhatsThis(blackborders_on_fs_check, tr("Add black borders on fullscreen"), 1094 1147 tr("If this option is enabled, black borders will be added to the " … … 1098 1151 "some video drivers (like gl) are already able to display the " 1099 1152 "subtitles automatically in the black borders.") */ ); 1153 #endif 1100 1154 1101 1155 #if defined(Q_OS_WIN) || defined(Q_OS_OS2)
Note:
See TracChangeset
for help on using the changeset viewer.