Commit d57320b4 authored by Felix Paul Kühne's avatar Felix Paul Kühne

* removed the old panel which used to show msg_err completely (hopefully) and...

* removed the old panel which used to show msg_err completely (hopefully) and added a new menu entry to show the collective errors/warnings panel by hand. Additionally, this panel got a details button now. (thanks to thedj for the idea)
parent df35f57f
......@@ -2,10 +2,15 @@
IBClasses = (
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
{
ACTIONS = {cleanupTable = id; };
ACTIONS = {cleanupTable = id; showMessages = id; };
CLASS = VLCErrorInteractionPanel;
LANGUAGE = ObjC;
OUTLETS = {"o_cleanup_button" = id; "o_error_table" = id; "o_window" = id; };
OUTLETS = {
"o_cleanup_button" = id;
"o_error_table" = id;
"o_messages_btn" = id;
"o_window" = id;
};
SUPERCLASS = NSObject;
}
);
......
......@@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>IBDocumentLocation</key>
<string>69 66 356 240 0 0 1440 878 </string>
<string>46 162 356 240 0 0 1440 878 </string>
<key>IBFramework Version</key>
<string>446.1</string>
<key>IBOpenObjects</key>
......
......@@ -178,7 +178,6 @@
ACTIONS = {
checkForUpdate = id;
clearRecentItems = id;
closeError = id;
intfOpenDisc = id;
intfOpenFile = id;
intfOpenFileGeneric = id;
......@@ -194,11 +193,13 @@
reportABug = id;
showBookmarks = id;
showExtended = id;
showMessagesPanel = id;
showSFilters = id;
showWizard = id;
timesliderUpdate = id;
togglePlaylist = id;
viewAbout = id;
viewErrorsAndWarnings = id;
viewPreferences = id;
};
CLASS = VLCMain;
......@@ -218,13 +219,6 @@
"o_dmi_previous" = id;
"o_dmi_stop" = id;
"o_embedded_window" = id;
"o_err_btn_dismiss" = id;
"o_err_btn_msgs" = id;
"o_err_bug_lbl" = id;
"o_err_ckbk_surpress" = id;
"o_err_lbl" = id;
"o_err_msg" = id;
"o_error" = id;
"o_info" = id;
"o_main_pgbar" = id;
"o_messages" = id;
......@@ -250,6 +244,7 @@
"o_mi_donation" = id;
"o_mi_double_window" = id;
"o_mi_equalizer" = id;
"o_mi_errorsAndWarnings" = id;
"o_mi_extended" = id;
"o_mi_faster" = id;
"o_mi_ffmpeg_pp" = id;
......
......@@ -26,6 +26,7 @@
<key>IBOpenObjects</key>
<array>
<integer>2416</integer>
<integer>29</integer>
<integer>21</integer>
</array>
<key>IBSystem Version</key>
......
......@@ -81,6 +81,7 @@
IBOutlet id o_window;
IBOutlet id o_cleanup_button;
IBOutlet id o_error_table;
IBOutlet id o_messages_btn;
NSMutableArray * o_errors;
NSMutableArray * o_icons;
......
......@@ -381,9 +381,16 @@
-(id)init
{
[super init];
/* load the nib */
nib_interact_errpanel_loaded = [NSBundle loadNibNamed:@"InteractionErrorPanel" owner:self];
/* init strings */
[o_window setTitle: _NS("Errors and Warnings")];
[o_cleanup_button setTitle: _NS("Clean up")];
[o_messages_btn setTitle: _NS("Show Details")];
/* init data sources */
o_errors = [[NSMutableArray alloc] init];
o_icons = [[NSMutableArray alloc] init];
......@@ -490,6 +497,11 @@
[o_error_table reloadData];
}
-(IBAction)showMessages:(id)sender
{
[[VLCMain sharedInstance] showMessagesPanel: sender];
}
/*----------------------------------------------------------------------------
* data source methods
*---------------------------------------------------------------------------*/
......
......@@ -145,14 +145,6 @@ struct intf_sys_t
NSLock * o_msg_lock; /* messages lock */
IBOutlet id o_msgs_btn_crashlog; /* messages open crashlog */
IBOutlet id o_error; /* error panel */
IBOutlet id o_err_msg; /* NSTextView */
IBOutlet id o_err_lbl;
IBOutlet id o_err_bug_lbl;
IBOutlet id o_err_btn_msgs; /* Open Messages */
IBOutlet id o_err_btn_dismiss;
IBOutlet id o_err_ckbk_surpress;
IBOutlet id o_info_window; /* Info panel */
/* main menu */
......@@ -263,6 +255,7 @@ struct intf_sys_t
IBOutlet id o_mi_license;
IBOutlet id o_mi_donation;
IBOutlet id o_mi_forum;
IBOutlet id o_mi_errorsAndWarnings;
/* dock menu */
IBOutlet id o_dmi_play;
......@@ -345,7 +338,6 @@ struct intf_sys_t
- (IBAction)viewAbout:(id)sender;
- (IBAction)viewPreferences:(id)sender;
- (IBAction)checkForUpdate:(id)sender;
- (IBAction)closeError:(id)sender;
- (IBAction)openReadMe:(id)sender;
- (IBAction)openDocumentation:(id)sender;
- (IBAction)reportABug:(id)sender;
......@@ -354,6 +346,8 @@ struct intf_sys_t
- (IBAction)openForum:(id)sender;
- (IBAction)openDonate:(id)sender;
- (IBAction)openCrashLog:(id)sender;
- (IBAction)viewErrorsAndWarnings:(id)sender;
- (IBAction)showMessagesPanel:(id)sender;
- (IBAction)togglePlaylist:(id)sender;
- (void)updateTogglePlaylistState;
......
......@@ -598,6 +598,7 @@ static VLCMain *_o_sharedMainInstance = nil;
[o_mi_playlist setTitle: _NS("Playlist")];
[o_mi_info setTitle: _NS("Information")];
[o_mi_messages setTitle: _NS("Messages")];
[o_mi_errorsAndWarnings setTitle: _NS("Errors and Warnings")];
[o_mi_bring_atf setTitle: _NS("Bring All to Front")];
......@@ -628,16 +629,6 @@ static VLCMain *_o_sharedMainInstance = nil;
[o_vmi_fullscreen setTitle: _NS("Fullscreen")];
[o_vmi_snapshot setTitle: _NS("Snapshot")];
/* error panel */
[o_error setTitle: _NS("Error")];
[o_err_lbl setStringValue: _NS("An error has occurred which probably " \
"prevented the proper execution of the program:")];
[o_err_bug_lbl setStringValue: _NS("If you believe that it is a bug, " \
"please follow the instructions at:")];
[o_err_btn_msgs setTitle: _NS("Open Messages Window")];
[o_err_btn_dismiss setTitle: _NS("Dismiss")];
[o_err_ckbk_surpress setTitle: _NS("Do not display further errors")];
[o_info_window setTitle: _NS("Information")];
}
......@@ -1374,26 +1365,6 @@ static VLCMain *_o_sharedMainInstance = nil;
[o_msg_lock unlock];
var_Get( p_intf->p_vlc, "verbose", &quiet );
/* disable the display of msg_err for now
* the interaction system will take care of the error messages now
*/
#if 0
if( i_type == 1 && quiet.i_int > -1 )
{
NSString *o_my_msg = [NSString stringWithFormat: @"%s: %s\n",
p_intf->p_sys->p_sub->p_msg[i_start].psz_module,
p_intf->p_sys->p_sub->p_msg[i_start].psz_msg];
NSRange s_r = NSMakeRange( [[o_err_msg string] length], 0 );
[o_err_msg setEditable: YES];
[o_err_msg setSelectedRange: s_r];
[o_err_msg insertText: o_my_msg];
[o_error makeKeyAndOrderFront: self];
[o_err_msg setEditable: NO];
}
#endif
}
vlc_mutex_lock( p_intf->p_sys->p_sub->p_lock );
......@@ -1758,19 +1729,6 @@ static VLCMain *_o_sharedMainInstance = nil;
}
}
- (IBAction)closeError:(id)sender
{
vlc_value_t val;
if( [o_err_ckbk_surpress state] == NSOnState )
{
val.i_int = -1;
var_Set( p_intf->p_vlc, "verbose", val );
}
[o_err_msg setString: @""];
[o_error performClose: self];
}
- (IBAction)openReadMe:(id)sender
{
NSString * o_path = [[NSBundle mainBundle]
......@@ -1844,6 +1802,16 @@ static VLCMain *_o_sharedMainInstance = nil;
}
}
- (IBAction)viewErrorsAndWarnings:(id)sender
{
[[[self getInteractionList] getErrorPanel] showPanel];
}
- (IBAction)showMessagesPanel:(id)sender
{
[o_msgs_panel makeKeyAndOrderFront: sender];
}
- (void)windowDidBecomeKey:(NSNotification *)o_notification
{
if( [o_notification object] == o_msgs_panel )
......
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