Commit 8cc36e70 authored by Eric Petit's avatar Eric Petit

Now you can save preferences.

parent 2fc25077
......@@ -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();
......
......@@ -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'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment