* MessagesWindow.cpp: beos interface
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
- * $Id: MessagesWindow.cpp,v 1.7 2003/02/10 15:23:46 titer Exp $
+ * $Id: MessagesWindow.cpp,v 1.8 2003/05/07 17:27:30 titer Exp $
*
* Authors: Eric Petit <titer@videolan.org>
*
B_NOT_ZOOMABLE )
{
this->p_intf = p_intf;
+
+ SetSizeLimits( 200, 2000, 200, 2000 );
BRect rect, textRect;
-
+
rect = Bounds();
rect.right -= B_V_SCROLL_BAR_WIDTH;
textRect = rect;
fMessagesView = new BTextView( rect, "messages", textRect,
B_FOLLOW_ALL, B_WILL_DRAW );
fMessagesView->MakeEditable( false );
+ fMessagesView->MakeSelectable( false );
fMessagesView->SetStylable( true );
fScrollView = new BScrollView( "scrollview", fMessagesView, B_WILL_DRAW,
B_FOLLOW_ALL, false, true );
}
/* Scroll at the end */
+
if( scrollBar->LockLooper() )
{
float min, max;
* PreferencesWindow.cpp: beos interface
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
- * $Id: PreferencesWindow.cpp,v 1.17 2003/05/07 16:47:10 titer Exp $
+ * $Id: PreferencesWindow.cpp,v 1.18 2003/05/07 17:27:30 titer Exp $
*
* Authors: Eric Petit <titer@videolan.org>
*
fConfigScroll( NULL ),
p_intf( p_interface )
{
+ SetSizeLimits( PREFS_WINDOW_WIDTH, PREFS_WINDOW_WIDTH,
+ 200, 2000 );
+
BRect rect;
/* The "background" view */
rect.InsetBy( 10, 10 );
rect.left = rect.right - 80;
rect.top = rect.bottom - 25;
- button = new BButton( rect, "", _("OK"), new BMessage( PREFS_OK ),
+ button = new BButton( rect, "", _("Close"), new BMessage( PREFS_CLOSE ),
B_FOLLOW_RIGHT | B_FOLLOW_BOTTOM );
+ button->MakeDefault( true );
fPrefsView->AddChild( button );
rect.OffsetBy( -90, 0 );
- button = new BButton( rect, "", _("Revert"), new BMessage( PREFS_REVERT ),
+ button = new BButton( rect, "", _("Apply"), new BMessage( PREFS_APPLY ),
B_FOLLOW_RIGHT | B_FOLLOW_BOTTOM );
fPrefsView->AddChild( button );
rect.OffsetBy( -90, 0 );
- button = new BButton( rect, "", _("Apply"), new BMessage( PREFS_APPLY ),
+ button = new BButton( rect, "", _("Save"), new BMessage( PREFS_SAVE ),
+ B_FOLLOW_RIGHT | B_FOLLOW_BOTTOM );
+ fPrefsView->AddChild( button );
+ rect.OffsetBy( -90, 0 );
+ button = new BButton( rect, "", _("Revert"), new BMessage( PREFS_REVERT ),
B_FOLLOW_RIGHT | B_FOLLOW_BOTTOM );
fPrefsView->AddChild( button );
Update();
break;
- case PREFS_OK:
- ApplyChanges( true );
+ case PREFS_CLOSE:
PostMessage( B_QUIT_REQUESTED );
break;
case PREFS_APPLY:
ApplyChanges( true );
break;
+
+ case PREFS_SAVE:
+ SaveChanges();
+ break;
default:
BWindow::MessageReceived( message );
}
}
+/*****************************************************************************
+ * PreferencesWindow::SaveChanges
+ *****************************************************************************/
+void PreferencesWindow::SaveChanges()
+{
+ ApplyChanges( true );
+ config_SaveConfigFile( p_intf, NULL );
+}
+
/*****************************************************************************
* PreferencesWindow::ReallyQuit
*****************************************************************************/
* PreferencesWindow.h
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
- * $Id: PreferencesWindow.h,v 1.11 2003/05/05 13:06:02 titer Exp $
+ * $Id: PreferencesWindow.h,v 1.12 2003/05/07 17:27:30 titer Exp $
*
* Authors: Eric Petit <titer@videolan.org>
*
#define PREFS_WINDOW_WIDTH 600
#define PREFS_WINDOW_HEIGHT 400
#define PREFS_ITEM_SELECTED 'pris'
-#define PREFS_OK 'prok'
+#define PREFS_CLOSE 'prcl'
#define PREFS_REVERT 'prre'
#define PREFS_APPLY 'prap'
+#define PREFS_SAVE 'prsa'
#define TEXT_HEIGHT 16
class ConfigView : public BView
void Update();
void UpdateScrollBar();
void ApplyChanges( bool doIt );
+ void SaveChanges();
void ReallyQuit();