瀏覽代碼

qt: preferences: Always use a combobox for resume playback

Using a checkbox would force the value back to 0/1 when saving the
simple preferences, while it can be set to 2 from advanced preferences.
This also moves this setting out of the Privacy/Network interactions
category, as it doesn't belong there

Fix #17061
Hugo Beauzée-Luyssen 8 年之前
父節點
當前提交
7d5370679e
共有 2 個文件被更改,包括 15 次插入8 次删除
  1. 1 1
      modules/gui/qt/components/simple_preferences.cpp
  2. 14 7
      modules/gui/qt/ui/sprefs_interface.ui

+ 1 - 1
modules/gui/qt/components/simple_preferences.cpp

@@ -849,7 +849,7 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
                      ui.recentlyPlayedFilters, setEnabled( bool ) );
             ui.recentlyPlayedFilters->setEnabled( false );
             CONFIG_BOOL( "qt-recentplay", saveRecentlyPlayed );
-            CONFIG_BOOL( "qt-continue", continueBox );
+            CONFIG_GENERIC( "qt-continue", IntegerList, ui.continuePlaybackLabel, continuePlaybackComboBox );
             CONFIG_GENERIC( "qt-recentplay-filter", String, ui.filterLabel,
                     recentlyPlayedFilters );
 

+ 14 - 7
modules/gui/qt/ui/sprefs_interface.ui

@@ -271,6 +271,20 @@
                </property>
               </widget>
              </item>
+             <item row="10" column="0">
+              <widget class="QLabel" name="continuePlaybackLabel">
+               <property name="text">
+                <string>Continue playback?</string>
+               </property>
+              </widget>
+             </item>
+             <item row="10" column="2" colspan="2">
+              <widget class="QComboBox" name="continuePlaybackComboBox">
+               <property name="enabled">
+                <bool>true</bool>
+               </property>
+              </widget>
+             </item>
             </layout>
            </widget>
           </item>
@@ -560,13 +574,6 @@
         </property>
        </widget>
       </item>
-      <item row="3" column="0" colspan="4">
-       <widget class="QCheckBox" name="continueBox">
-        <property name="text">
-         <string>Continue playback?</string>
-        </property>
-       </widget>
-      </item>
      </layout>
     </widget>
    </item>