Commit 75e0ab4d authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

* Added a Reset prefs option

* New prefs dialog much like the wxWindows and BeOS one.
  - translated instances might be broken.
  - still need sliders for min/max values
  - improved sizing should be done.
parent 765454f1
......@@ -162,6 +162,7 @@
"o_mu_videotrack" = id;
"o_mu_window" = id;
"o_playlist" = id;
"o_prefs" = id;
"o_timefield" = id;
"o_timeslider" = id;
"o_volumeslider" = id;
......@@ -311,7 +312,22 @@
};
SUPERCLASS = NSObject;
},
{CLASS = VLCPlaylistView; LANGUAGE = ObjC; SUPERCLASS = NSTableView; }
{CLASS = VLCPlaylistView; LANGUAGE = ObjC; SUPERCLASS = NSTableView; },
{
ACTIONS = {advancedToggle = id; closePrefs = id; resetAll = id; savePrefs = id; };
CLASS = VLCPrefs;
LANGUAGE = ObjC;
OUTLETS = {
"o_advanced_ckb" = id;
"o_cancel_btn" = id;
"o_prefs_view" = id;
"o_prefs_window" = id;
"o_reset_btn" = id;
"o_save_btn" = id;
"o_tree" = id;
};
SUPERCLASS = NSObject;
}
);
IBVersion = 1;
}
\ No newline at end of file
......@@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>IBDocumentLocation</key>
<string>36 88 365 441 0 0 1280 1002 </string>
<string>32 550 365 441 0 0 1280 1002 </string>
<key>IBEditorPositions</key>
<dict>
<key>29</key>
......@@ -23,8 +23,7 @@
</array>
<key>IBOpenObjects</key>
<array>
<integer>1411</integer>
<integer>29</integer>
<integer>1530</integer>
</array>
<key>IBSystem Version</key>
<string>6L29</string>
......
......@@ -2,7 +2,7 @@
* intf.m: MacOS X interface plugin
*****************************************************************************
* Copyright (C) 2002-2003 VideoLAN
* $Id: intf.m,v 1.83 2003/05/15 01:23:05 hartman Exp $
* $Id: intf.m,v 1.84 2003/05/20 15:23:25 hartman Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr>
......@@ -503,8 +503,6 @@ int PlaylistChanged( vlc_object_t *p_this, const char *psz_variable,
- (void)manage:(playlist_t *)p_playlist
{
vlc_value_t val;
intf_thread_t * p_intf = [NSApp getIntf];
#define p_input p_playlist->p_input
......@@ -972,12 +970,6 @@ int PlaylistChanged( vlc_object_t *p_this, const char *psz_variable,
o_msg_lock = nil;
}
if( o_prefs != nil )
{
[o_prefs release];
o_prefs = nil;
}
[NSApp stop: nil];
/* write cached user defaults to disk */
......@@ -1143,12 +1135,7 @@ int PlaylistChanged( vlc_object_t *p_this, const char *psz_variable,
- (IBAction)viewPreferences:(id)sender
{
if( o_prefs == nil )
{
o_prefs = [[VLCPrefs alloc] init];
}
[o_prefs createPrefPanel: @"main"];
[o_prefs showPrefs];
}
- (IBAction)timesliderUpdate:(id)sender
......
......@@ -2,7 +2,7 @@
* prefs.h: MacOS X plugin for vlc
*****************************************************************************
* Copyright (C) 2002-2003 VideoLAN
* $Id: prefs.h,v 1.5 2003/05/09 00:41:11 hartman Exp $
* $Id: prefs.h,v 1.6 2003/05/20 15:23:25 hartman Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
*
......@@ -23,6 +23,23 @@
#define PREFS_WRAP 60
@interface VLCTreeItem : NSObject
{
NSString *o_name;
int i_object_id;
VLCTreeItem *o_parent;
NSMutableArray *o_children;
}
+ (VLCTreeItem *)rootItem;
- (int)numberOfChildren;
- (VLCTreeItem *)childAtIndex:(int)i_index;
- (int)getObjectID;
- (NSString *)getName;
- (BOOL)hasPrefs:(NSString *)o_module_name;
@end
/*****************************************************************************
* VLCPrefs interface
*****************************************************************************/
......@@ -30,27 +47,27 @@
{
intf_thread_t *p_intf;
vlc_bool_t b_advanced;
VLCTreeItem *o_config_tree;
NSView *o_empty_view;
NSMutableDictionary *o_pref_panels;
NSMutableDictionary *o_toolbars;
NSMutableDictionary *o_scroll_views;
NSMutableDictionary *o_panel_views;
NSMutableDictionary *o_save_prefs;
IBOutlet id o_prefs_window;
IBOutlet id o_tree;
IBOutlet id o_prefs_view;
IBOutlet id o_save_btn;
IBOutlet id o_cancel_btn;
IBOutlet id o_reset_btn;
IBOutlet id o_advanced_ckb;
}
- (BOOL)hasPrefs:(NSString *)o_module_name;
- (void)createPrefPanel:(NSString *)o_module_name;
- (void)destroyPrefPanel:(id)o_unknown;
- (void)selectPrefView:(id)sender;
- (void)moduleSelected:(id)sender;
- (void)configureModule:(id)sender;
- (void)selectModule:(id)sender;
- (void)initStrings;
- (void)showPrefs;
- (IBAction)savePrefs: (id)sender;
- (IBAction)closePrefs: (id)sender;
- (IBAction)resetAll: (id)sender;
- (IBAction)advancedToggle: (id)sender;
- (void)showViewForID: (int) i_id andName:(NSString *)o_item_name;
- (void)configChanged:(id)o_unknown;
- (void)clickedApplyCancelOK:(id)sender;
@end
@interface VLCFlippedView : NSView
......@@ -135,6 +152,7 @@
@end
INTF_CONTROL_CONFIG(Button);
INTF_CONTROL_CONFIG(PopUpButton);
INTF_CONTROL_CONFIG(ComboBox);
INTF_CONTROL_CONFIG(TextField);
......
This diff is collapsed.
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