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 @@ ...@@ -162,6 +162,7 @@
"o_mu_videotrack" = id; "o_mu_videotrack" = id;
"o_mu_window" = id; "o_mu_window" = id;
"o_playlist" = id; "o_playlist" = id;
"o_prefs" = id;
"o_timefield" = id; "o_timefield" = id;
"o_timeslider" = id; "o_timeslider" = id;
"o_volumeslider" = id; "o_volumeslider" = id;
...@@ -311,7 +312,22 @@ ...@@ -311,7 +312,22 @@
}; };
SUPERCLASS = NSObject; 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; IBVersion = 1;
} }
\ No newline at end of file
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
<key>IBDocumentLocation</key> <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> <key>IBEditorPositions</key>
<dict> <dict>
<key>29</key> <key>29</key>
...@@ -23,8 +23,7 @@ ...@@ -23,8 +23,7 @@
</array> </array>
<key>IBOpenObjects</key> <key>IBOpenObjects</key>
<array> <array>
<integer>1411</integer> <integer>1530</integer>
<integer>29</integer>
</array> </array>
<key>IBSystem Version</key> <key>IBSystem Version</key>
<string>6L29</string> <string>6L29</string>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* intf.m: MacOS X interface plugin * intf.m: MacOS X interface plugin
***************************************************************************** *****************************************************************************
* Copyright (C) 2002-2003 VideoLAN * 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> * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr> * Christophe Massiot <massiot@via.ecp.fr>
...@@ -503,8 +503,6 @@ int PlaylistChanged( vlc_object_t *p_this, const char *psz_variable, ...@@ -503,8 +503,6 @@ int PlaylistChanged( vlc_object_t *p_this, const char *psz_variable,
- (void)manage:(playlist_t *)p_playlist - (void)manage:(playlist_t *)p_playlist
{ {
vlc_value_t val;
intf_thread_t * p_intf = [NSApp getIntf]; intf_thread_t * p_intf = [NSApp getIntf];
#define p_input p_playlist->p_input #define p_input p_playlist->p_input
...@@ -972,12 +970,6 @@ int PlaylistChanged( vlc_object_t *p_this, const char *psz_variable, ...@@ -972,12 +970,6 @@ int PlaylistChanged( vlc_object_t *p_this, const char *psz_variable,
o_msg_lock = nil; o_msg_lock = nil;
} }
if( o_prefs != nil )
{
[o_prefs release];
o_prefs = nil;
}
[NSApp stop: nil]; [NSApp stop: nil];
/* write cached user defaults to disk */ /* write cached user defaults to disk */
...@@ -1143,12 +1135,7 @@ int PlaylistChanged( vlc_object_t *p_this, const char *psz_variable, ...@@ -1143,12 +1135,7 @@ int PlaylistChanged( vlc_object_t *p_this, const char *psz_variable,
- (IBAction)viewPreferences:(id)sender - (IBAction)viewPreferences:(id)sender
{ {
if( o_prefs == nil ) [o_prefs showPrefs];
{
o_prefs = [[VLCPrefs alloc] init];
}
[o_prefs createPrefPanel: @"main"];
} }
- (IBAction)timesliderUpdate:(id)sender - (IBAction)timesliderUpdate:(id)sender
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* prefs.h: MacOS X plugin for vlc * prefs.h: MacOS X plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2002-2003 VideoLAN * 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> * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* *
...@@ -23,6 +23,23 @@ ...@@ -23,6 +23,23 @@
#define PREFS_WRAP 60 #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 * VLCPrefs interface
*****************************************************************************/ *****************************************************************************/
...@@ -30,27 +47,27 @@ ...@@ -30,27 +47,27 @@
{ {
intf_thread_t *p_intf; intf_thread_t *p_intf;
vlc_bool_t b_advanced; vlc_bool_t b_advanced;
VLCTreeItem *o_config_tree;
NSView *o_empty_view;
NSMutableDictionary *o_pref_panels; IBOutlet id o_prefs_window;
NSMutableDictionary *o_toolbars; IBOutlet id o_tree;
NSMutableDictionary *o_scroll_views; IBOutlet id o_prefs_view;
NSMutableDictionary *o_panel_views; IBOutlet id o_save_btn;
NSMutableDictionary *o_save_prefs; IBOutlet id o_cancel_btn;
IBOutlet id o_reset_btn;
IBOutlet id o_advanced_ckb;
} }
- (BOOL)hasPrefs:(NSString *)o_module_name; - (void)initStrings;
- (void)createPrefPanel:(NSString *)o_module_name; - (void)showPrefs;
- (void)destroyPrefPanel:(id)o_unknown; - (IBAction)savePrefs: (id)sender;
- (void)selectPrefView:(id)sender; - (IBAction)closePrefs: (id)sender;
- (IBAction)resetAll: (id)sender;
- (void)moduleSelected:(id)sender; - (IBAction)advancedToggle: (id)sender;
- (void)configureModule:(id)sender; - (void)showViewForID: (int) i_id andName:(NSString *)o_item_name;
- (void)selectModule:(id)sender;
- (void)configChanged:(id)o_unknown; - (void)configChanged:(id)o_unknown;
- (void)clickedApplyCancelOK:(id)sender;
@end @end
@interface VLCFlippedView : NSView @interface VLCFlippedView : NSView
...@@ -135,6 +152,7 @@ ...@@ -135,6 +152,7 @@
@end @end
INTF_CONTROL_CONFIG(Button); INTF_CONTROL_CONFIG(Button);
INTF_CONTROL_CONFIG(PopUpButton);
INTF_CONTROL_CONFIG(ComboBox); INTF_CONTROL_CONFIG(ComboBox);
INTF_CONTROL_CONFIG(TextField); 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