Commit 6a46b2e3 authored by Eric Petit's avatar Eric Petit

beos/*: first pass at fixing the BeOS prefs

parent 41c5188d
...@@ -50,6 +50,7 @@ vlc_module_begin(); ...@@ -50,6 +50,7 @@ vlc_module_begin();
set_category( CAT_INTERFACE ); set_category( CAT_INTERFACE );
set_subcategory( SUBCAT_INTERFACE_GENERAL ); set_subcategory( SUBCAT_INTERFACE_GENERAL );
add_bool( "beos-dvdmenus", 0, NULL, _("Use DVD Menus"), "", VLC_TRUE ); add_bool( "beos-dvdmenus", 0, NULL, _("Use DVD Menus"), "", VLC_TRUE );
set_shortname( "BeOS" );
set_description( _("BeOS standard API interface") ); set_description( _("BeOS standard API interface") );
set_capability( "interface", 100 ); set_capability( "interface", 100 );
set_callbacks( E_(OpenIntf), E_(CloseIntf) ); set_callbacks( E_(OpenIntf), E_(CloseIntf) );
......
This diff is collapsed.
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* Copyright (C) 1999, 2000, 2001 VideoLAN * Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id$ * $Id$
* *
* Authors: Eric Petit <titer@videolan.org> * Authors: Eric Petit <titer@m0k.org>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
...@@ -27,101 +27,67 @@ ...@@ -27,101 +27,67 @@
#include <InterfaceKit.h> #include <InterfaceKit.h>
#define PREFS_WINDOW_WIDTH 700 #define PREFS_WINDOW_WIDTH 700
#define PREFS_WINDOW_HEIGHT 400 #define PREFS_WINDOW_HEIGHT 600
#define PREFS_ITEM_SELECTED 'pris' #define PREFS_ITEM_SELECTED 'pris'
#define PREFS_DEFAULTS 'prde' #define PREFS_DEFAULTS 'prde'
#define PREFS_APPLY 'prap' #define PREFS_APPLY 'prap'
#define PREFS_SAVE 'prsa' #define PREFS_SAVE 'prsa'
class StringItemWithView : public BStringItem class VTextView : public BTextView
{ {
public: public:
StringItemWithView( const char * text ) VTextView( BRect frame, const char *name,
: BStringItem( text ) uint32 resizingMode, uint32 flags );
{ void FrameResized( float width, float height );
fConfigBox = NULL;
fConfigScroll = NULL;
fConfigView = NULL;
fText = strdup( text );
}
/* Here we store the config BBox associated to this module */
BBox * fConfigBox;
BScrollView * fConfigScroll;
BView * fConfigView;
char * fText;
}; };
class ConfigWidget : public BView class ConfigWidget : public BView
{ {
public: public:
ConfigWidget( BRect rect, int type, char * configName ); ConfigWidget( intf_thread_t * p_intf, BRect rect,
virtual void Apply( intf_thread_t * p_intf, bool doIt ) = 0; module_config_t * p_item );
void Apply( bool doIt );
protected:
int fConfigType;
char * fConfigName;
};
class ConfigTextControl : public ConfigWidget
{
public:
ConfigTextControl( BRect rect, int type, char * label,
char * configName );
void Apply( intf_thread_t * p_intf, bool doIt );
private: private:
BTextControl * fTextControl; intf_thread_t * p_intf;
};
class ConfigCheckBox : public ConfigWidget int fType;
{
public:
ConfigCheckBox( BRect rect, int type, char * label,
char * configName );
void Apply( intf_thread_t * p_intf, bool doIt );
private: BTextControl * fTextControl;
BCheckBox * fCheckBox; BCheckBox * fCheckBox;
};
class ConfigMenuField : public ConfigWidget
{
public:
ConfigMenuField( BRect rect, int type, char * label,
char * configName, char ** list );
void Apply( intf_thread_t * p_intf, bool doIt );
private:
BPopUpMenu * fPopUpMenu; BPopUpMenu * fPopUpMenu;
BMenuField * fMenuField; BMenuField * fMenuField;
BSlider * fSlider;
BStringView * fStringView;
BCheckBox * fAltCheck;
BCheckBox * fCtrlCheck;
BCheckBox * fShiftCheck;
}; };
class ConfigSlider : public ConfigWidget class ConfigItem : public BStringItem
{ {
public: public:
ConfigSlider( BRect rect, int type, char * label, ConfigItem( intf_thread_t * p_intf,
char * configName, int min, int max ); char * name, bool subModule,
void Apply( intf_thread_t * p_intf, bool doIt ); int objectId, int type, char * help );
~ConfigItem();
int ObjectId() { return fObjectId; }
BBox * Box() { return fBox; }
void Apply( bool doIt );
void Pulse();
private: private:
BSlider * fSlider; intf_thread_t * p_intf;
};
class ConfigKey : public ConfigWidget bool fSubModule;
{ int fObjectId;
public: int fType;
ConfigKey( BRect rect, int type, char * label, char * fHelp;
char * configName );
void Apply( intf_thread_t * p_intf, bool doIt );
private: BBox * fBox;
BStringView * fStringView; BScrollView * fScroll;
BCheckBox * fAltCheck; BView * fView;
BCheckBox * fCtrlCheck; VTextView * fTextView;
BCheckBox * fShiftCheck;
BPopUpMenu * fPopUpMenu;
BMenuField * fMenuField;
}; };
class PreferencesWindow : public BWindow class PreferencesWindow : public BWindow
...@@ -144,7 +110,7 @@ class PreferencesWindow : public BWindow ...@@ -144,7 +110,7 @@ class PreferencesWindow : public BWindow
void ReallyQuit(); void ReallyQuit();
private: private:
void BuildConfigView( StringItemWithView * stringItem, void BuildConfigView( ConfigItem * stringItem,
module_config_t ** pp_item, module_config_t ** pp_item,
bool stop_after_category ); bool stop_after_category );
...@@ -152,7 +118,7 @@ class PreferencesWindow : public BWindow ...@@ -152,7 +118,7 @@ class PreferencesWindow : public BWindow
BOutlineListView * fOutline; BOutlineListView * fOutline;
BView * fDummyView; BView * fDummyView;
BScrollView * fConfigScroll; BScrollView * fConfigScroll;
StringItemWithView * fCurrent; ConfigItem * fCurrent;
intf_thread_t * p_intf; intf_thread_t * p_intf;
}; };
......
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