+-(void)showPanel
+{
+ [o_window makeKeyAndOrderFront: self];
+}
+
+-(void)addError: (NSString *)o_error withMsg:(NSString *)o_msg
+{
+ /* format our string as desired */
+ NSMutableAttributedString * ourError;
+ ourError = [[NSMutableAttributedString alloc] initWithString:
+ [NSString stringWithFormat:@"%@\n%@", o_error, o_msg]
+ attributes:
+ [NSDictionary dictionaryWithObject: [NSFont systemFontOfSize:11] forKey: NSFontAttributeName]];
+ [ourError
+ addAttribute: NSFontAttributeName
+ value: [NSFont boldSystemFontOfSize:11]
+ range: NSMakeRange( 0, [o_error length])];
+ [o_errors addObject: ourError];
+ [ourError release];
+
+ [o_icons addObject: [NSImage imageWithErrorIcon]];
+
+ [o_error_table reloadData];
+}
+
+-(void)addWarning: (NSString *)o_warning withMsg:(NSString *)o_msg
+{
+ /* format our string as desired */
+ NSMutableAttributedString * ourWarning;
+ ourWarning = [[NSMutableAttributedString alloc] initWithString:
+ [NSString stringWithFormat:@"%@\n%@", o_warning, o_msg]
+ attributes:
+ [NSDictionary dictionaryWithObject: [NSFont systemFontOfSize:11] forKey: NSFontAttributeName]];
+ [ourWarning
+ addAttribute: NSFontAttributeName
+ value: [NSFont boldSystemFontOfSize:11]
+ range: NSMakeRange( 0, [o_warning length])];
+ [o_errors addObject: ourWarning];
+ [ourWarning release];
+
+ [o_icons addObject: [NSImage imageWithWarningIcon]];
+
+ [o_error_table reloadData];
+}
+
+-(IBAction)cleanupTable:(id)sender
+{
+ [o_errors removeAllObjects];
+ [o_icons removeAllObjects];
+ [o_error_table reloadData];
+}
+
+-(IBAction)showMessages:(id)sender
+{
+ [[VLCMain sharedInstance] showMessagesPanel: sender];
+}
+
+/*----------------------------------------------------------------------------
+ * data source methods
+ *---------------------------------------------------------------------------*/
+- (int)numberOfRowsInTableView:(NSTableView *)theDataTable
+{
+ return [o_errors count];
+}
+
+- (id)tableView:(NSTableView *)theDataTable objectValueForTableColumn:
+ (NSTableColumn *)theTableColumn row: (int)row
+{
+ if( [[theTableColumn identifier] isEqualToString: @"error_msg"] )
+ return [o_errors objectAtIndex: row];
+
+ if( [[theTableColumn identifier] isEqualToString: @"icon"] )
+ return [o_icons objectAtIndex: row];
+
+ return @"unknown identifier";
+}
+
+@end