]> git.sesse.net Git - vlc/commitdiff
Now you can save preferences.
authorEric Petit <titer@videolan.org>
Tue, 14 Jan 2003 16:00:49 +0000 (16:00 +0000)
committerEric Petit <titer@videolan.org>
Tue, 14 Jan 2003 16:00:49 +0000 (16:00 +0000)
modules/gui/beos/PreferencesWindow.cpp
modules/gui/beos/PreferencesWindow.h

index 5868f693e5fa31c4d5f8ce5134d3d70926ff1fae..e7fa47958750d050122594279d2805ab6260e86e 100644 (file)
@@ -2,7 +2,7 @@
  * PreferencesWindow.cpp: beos interface
  *****************************************************************************
  * Copyright (C) 1999, 2000, 2001 VideoLAN
- * $Id: PreferencesWindow.cpp,v 1.5 2003/01/11 20:42:47 titer Exp $
+ * $Id: PreferencesWindow.cpp,v 1.6 2003/01/14 16:00:49 titer Exp $
  *
  * Authors: Eric Petit <titer@videolan.org>
  *
@@ -82,6 +82,7 @@ PreferencesWindow::PreferencesWindow( BRect frame, const char* name,
     fPpSlider->SetHashMarks(B_HASH_MARKS_BOTTOM);
     fPpSlider->SetHashMarkCount( 7 );
     fPpSlider->SetLimitLabels( "None", "Maximum" );
+    fPpSlider->SetValue( config_GetInt( p_intf, "ffmpeg-pp-q" ) );
     fFfmpegView->AddChild( fPpSlider );
     
     
@@ -138,6 +139,10 @@ PreferencesWindow::PreferencesWindow( BRect frame, const char* name,
     rect.left = rect.right - 80;
     button = new BButton( rect, NULL, "OK", new BMessage( PREFS_OK ) );
     fPrefsView->AddChild( button );
+
+    rect.OffsetBy( -90, 0 );
+    button = new BButton( rect, NULL, "Save", new BMessage( PREFS_SAVE ) );
+    fPrefsView->AddChild( button );
     
     rect.OffsetBy( -90, 0 );
     button = new BButton( rect, NULL, "Defaults", new BMessage( PREFS_DEFAULTS ) );
@@ -173,6 +178,13 @@ void PreferencesWindow::MessageReceived( BMessage * p_message )
             ApplyChanges();
                break;
            }
+           case PREFS_SAVE:
+           {
+               config_SaveConfigFile( p_intf, "main" );
+               config_SaveConfigFile( p_intf, "adjust" );
+               config_SaveConfigFile( p_intf, "ffmpeg" );
+               break;
+           }
            case PREFS_OK:
            {
             Hide();
index beb22a023f19d3e341f955d3f37edba41b7facfb..e39522967e4e0c53176d325507c323a2f0e4e36d 100644 (file)
@@ -2,7 +2,7 @@
  * PreferencesWindow.h
  *****************************************************************************
  * Copyright (C) 1999, 2000, 2001 VideoLAN
- * $Id: PreferencesWindow.h,v 1.3 2002/11/26 01:06:08 titer Exp $
+ * $Id: PreferencesWindow.h,v 1.4 2003/01/14 16:00:49 titer Exp $
  *
  * Authors: Eric Petit <titer@videolan.org>
  *
@@ -30,7 +30,7 @@
 #define PREFS_WINDOW_HEIGHT  280
 
 #define PREFS_OK       'prok'
-#define PREFS_CANCEL   'prca'
+#define PREFS_SAVE     'prsa'
 #define PREFS_DEFAULTS 'prde'
 #define SLIDER_UPDATE  'slup'