[MPlayer-cvslog] r38603 - trunk/gui/dialog/preferences.c
ib
subversion at mplayerhq.hu
Mon Jun 24 21:02:08 EEST 2024
Author: ib
Date: Mon Jun 24 21:02:08 2024
New Revision: 38603
Log:
Do not (re)set preferences to defaults while the dialog is still open.
Do it only for HSPPQuality, which depends on the video being played.
Modified:
trunk/gui/dialog/preferences.c
Modified: trunk/gui/dialog/preferences.c
==============================================================================
--- trunk/gui/dialog/preferences.c Mon Jun 24 21:00:55 2024 (r38602)
+++ trunk/gui/dialog/preferences.c Mon Jun 24 21:02:08 2024 (r38603)
@@ -1238,11 +1238,28 @@ static GtkWidget * CreatePreferences( vo
void ShowPreferences( void )
{
+ gboolean preferences;
GSList *list;
gdouble upper = 0, value = 0;
- if ( Preferences ) gtkRaise( Preferences );
- else Preferences=CreatePreferences();
+ preferences = (Preferences != NULL);
+
+ if (!preferences) Preferences = CreatePreferences();
+
+ if (guiInfo.sh_video && guiInfo.Playing)
+ {
+ upper = get_video_quality_max(guiInfo.sh_video);
+ value = auto_quality;
+ }
+ gtk_adjustment_set_upper(HSPPQualityadj, upper);
+ gtk_adjustment_set_value(HSPPQualityadj, value);
+ gtk_adjustment_value_changed(HSPPQualityadj);
+
+ if (preferences)
+ {
+ gtkRaise(Preferences);
+ return;
+ }
/* 1st page */
gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBAudioEqualizer ),gtkEnableAudioEqualizer );
@@ -1483,15 +1500,6 @@ void ShowPreferences( void )
gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBShowVideoWindow ),!gtkShowVideoWindow );
gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBStopXScreenSaver ),stop_xscreensaver );
- if (guiInfo.sh_video && guiInfo.Playing)
- {
- upper = get_video_quality_max(guiInfo.sh_video);
- value = auto_quality;
- }
- gtk_adjustment_set_upper(HSPPQualityadj, upper);
- gtk_adjustment_set_value(HSPPQualityadj, value);
- gtk_adjustment_value_changed(HSPPQualityadj);
-
gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBPlayBar ),gtkEnablePlayBar );
if ( !guiApp.playbarIsPresent )
{
More information about the MPlayer-cvslog
mailing list