[MPlayer-cvslog] r38588 - trunk/gui/dialog/preferences.c

ib subversion at mplayerhq.hu
Thu Jun 20 12:17:24 EEST 2024


Author: ib
Date: Thu Jun 20 12:17:23 2024
New Revision: 38588

Log:
Do not keep opening the preferences dialog on page 2.

Keep track of the most recently used page and open that page.

This makes the dialog more comfortable to use.

Modified:
   trunk/gui/dialog/preferences.c

Modified: trunk/gui/dialog/preferences.c
==============================================================================
--- trunk/gui/dialog/preferences.c	Sun Jun 16 14:58:02 2024	(r38587)
+++ trunk/gui/dialog/preferences.c	Thu Jun 20 12:17:23 2024	(r38588)
@@ -65,6 +65,8 @@
 #endif
 
        GtkWidget * Preferences = NULL;
+static GtkWidget *notebook1;
+static guint prNotebookPage = 2;
 static GtkWidget * AConfig;
 static GtkWidget * VConfig;
 //static GtkWidget * BLoadSubtitle;
@@ -407,6 +409,8 @@ static void prButton( GtkButton * button
           gtkMessageBox( MSGBOX_INFORMATION,_(MSGTR_GUI_MSG_PlaybackNeedsRestart) );
           inform = False;
          }
+
+        prNotebookPage = gtk_notebook_get_current_page(GTK_NOTEBOOK(notebook1));
          // fall through
 
    case bCancel:
@@ -587,7 +591,6 @@ static GtkWidget * CreatePreferences( vo
   GtkWidget * frame;
 
   GtkWidget * vbox1;
-  GtkWidget * notebook1;
   GtkWidget * hbox1;
   GtkWidget * vbox2;
   GtkWidget * scrolledwindow3;
@@ -1203,7 +1206,7 @@ static GtkWidget * CreatePreferences( vo
   g_signal_connect( G_OBJECT( HSPPQuality ),"motion-notify-event",G_CALLBACK( on_HSPPQuality_motion_notify_event ),NULL );
 #endif
 
-  gtk_notebook_set_current_page( GTK_NOTEBOOK( notebook1 ),2 );
+  gtk_notebook_set_current_page(GTK_NOTEBOOK(notebook1), prNotebookPage);
 
   gtk_window_add_accel_group( GTK_WINDOW( Preferences ),accel_group );
 


More information about the MPlayer-cvslog mailing list