]> git.sesse.net Git - vlc/blobdiff - modules/gui/macosx/sfilters.m
Removes trailing spaces. Removes tabs.
[vlc] / modules / gui / macosx / sfilters.m
index e4b15a4ac7d40b41317880103288bd4c3ca6a0ba..fbeb961c5ddcef9a1bb50561fef339684b42fcff 100644 (file)
@@ -2,7 +2,7 @@
  * sfilter.m: MacOS X Subpicture filters dialogue
  *****************************************************************************
  * Copyright (C) 2005-2006 the VideoLAN team
- * $Id:$
+ * $Id$
  *
  * Authors: Felix Kühne <fkuehne@users.sf.net>
  *
 
 
 /*****************************************************************************
- * Note: 
- * the code used to bind with VLC's core is partially based upon the 
- * RC-interface, written by Antoine Cellerier and Mark F. Moriarty  
- * (members of the VideoLAN team) 
+ * Note:
+ * the code used to bind with VLC's core is partially based upon the
+ * RC-interface, written by Antoine Cellerier and Mark F. Moriarty
+ * (members of the VideoLAN team)
  *****************************************************************************/
 
 #import "sfilters.h"
 #import "intf.h"
-#import <vlc/vout.h>
+#import <vlc_vout.h>
 
 /* TODO:
     - check for memory leaks
@@ -74,45 +74,31 @@ static VLCsFilters *_o_sharedInstance = nil;
     [o_sfilter_saveSettings_ckb setTitle: _NS("Save settings")];
     [o_logo_image_btn setTitle: _NS("Browse...")];
     [o_logo_enabled_ckb setTitle: _NS("Enabled")];
-    [o_logo_image_lbl setStringValue: [_NS("Image") \
-        stringByAppendingString: @":"]];
-    [o_logo_pos_lbl setStringValue: [_NS("Position") \
-        stringByAppendingString: @":"]];
-    [o_logo_opaque_lbl setStringValue: [_NS("Opaqueness") \
-        stringByAppendingString: @":"]];
+    [o_logo_image_lbl setStringValue: _NS("Image:")];
+    [o_logo_pos_lbl setStringValue: _NS("Position:")];
+    [o_logo_opaque_lbl setStringValue: _NS("Opaqueness")];
     [o_time_enabled_ckb setTitle: _NS("Enabled")];
-    [o_time_stamp_lbl setStringValue: [_NS("Timestamp") \
-        stringByAppendingString: @":"]];
-    [o_time_size_lbl setStringValue: [_NS("Size") \
-        stringByAppendingString: @":"]];
-    [o_time_color_lbl setStringValue: [_NS("Color") \
-        stringByAppendingString: @":"]];
-    [o_time_opaque_lbl setStringValue: [_NS("Opaqueness") \
-        stringByAppendingString: @":"]];
-    [o_time_pos_lbl setStringValue: [_NS("Position") \
-        stringByAppendingString: @":"]];
+    [o_time_stamp_lbl setStringValue: _NS("Timestamp:")];
+    [o_time_size_lbl setStringValue: _NS("Size:")];
+    [o_time_color_lbl setStringValue: _NS("Color:")];
+    [o_time_opaque_lbl setStringValue: _NS("Opaqueness:")];
+    [o_time_pos_lbl setStringValue: _NS("Position:")];
     [o_time_size_inPx_lbl setStringValue: _NS("(in pixels)")];
     [o_marq_enabled_ckb setTitle: _NS("Enabled")];
-    [o_marq_color_lbl setStringValue: [_NS("Color") \
-        stringByAppendingString: @":"]];
-    [o_marq_marq_lbl setStringValue: [_NS("Marquee") \
-        stringByAppendingString: @":"]];
-    [o_marq_opaque_lbl setStringValue: [_NS("Opaqueness") \
-        stringByAppendingString: @":"]];
-    [o_marq_tmOut_lbl setStringValue: [_NS("Timeout") \
-        stringByAppendingString: @":"]];
+    [o_marq_color_lbl setStringValue: _NS("Color:")];
+    [o_marq_marq_lbl setStringValue: _NS("Marquee:")];
+    [o_marq_opaque_lbl setStringValue: _NS("Opaqueness")];
+    [o_marq_tmOut_lbl setStringValue: _NS("Timeout:")];
     [o_marq_tmOut_ms_lbl setStringValue: _NS("ms")];
-    [o_marq_pos_lbl setStringValue: [_NS("Position") \
-        stringByAppendingString: @":"]];
-    [o_marq_size_lbl setStringValue: [_NS("Size") \
-        stringByAppendingString: @":"]];
+    [o_marq_pos_lbl setStringValue: _NS("Position:")];
+    [o_marq_size_lbl setStringValue: _NS("Size:")];
     [o_time_color_lbl setStringValue: _NS("(in pixels)")];
 }
 
 - (void)awakeFromNib
 {
     /* colors as implemented at the beginning of marq.c and time.c
-     * feel free to add more colors, but remember to add them to these files 
+     * feel free to add more colors, but remember to add them to these files
      * as well to keep a certain level of consistency across the interfaces */
     NSArray * o_default;
     NSArray * o_black;
@@ -148,86 +134,35 @@ static VLCsFilters *_o_sharedInstance = nil;
     o_navy = [NSArray arrayWithObjects: _NS("Navy"), @"0x000080", nil];
     o_blue = [NSArray arrayWithObjects: _NS("Blue"), @"0x0000FF", nil];
     o_aqua = [NSArray arrayWithObjects: _NS("Aqua"), @"0x00FFFF", nil];
-    o_colors = [[NSArray alloc] initWithObjects: o_default, o_black, o_gray, \
-        o_silver, o_white, o_maroon, o_red, o_fuchsia, o_yellow, o_olive, \
+    o_colors = [[NSArray alloc] initWithObjects: o_default, o_black, o_gray,
+        o_silver, o_white, o_maroon, o_red, o_fuchsia, o_yellow, o_olive,
         o_green, o_teal, o_lime, o_purple, o_navy, o_blue, o_aqua, nil];
 
     unsigned int x = 0;
     [o_marq_color_pop removeAllItems];
     [o_time_color_pop removeAllItems];
-    
-    /* we are adding tags to the items, so we can easily identify them even if 
+    /* we are adding tags to the items, so we can easily identify them even if
      * the menu was sorted */
     while (x != [o_colors count])
     {
-        [o_marq_color_pop addItemWithTitle: [[o_colors objectAtIndex:x] \
+        [o_marq_color_pop addItemWithTitle: [[o_colors objectAtIndex:x]
             objectAtIndex:0]];
         [[o_marq_color_pop lastItem] setTag: x];
-        
-        [o_time_color_pop addItemWithTitle: [[o_colors objectAtIndex:x] \
+        [o_time_color_pop addItemWithTitle: [[o_colors objectAtIndex:x]
             objectAtIndex:0]];
         [[o_time_color_pop lastItem] setTag: x];
-        
         x = (x + 1);
     }
 
     [o_marq_color_pop selectItemAtIndex:0];
     [o_time_color_pop selectItemAtIndex:0];
 
-    /* define the relative positions and copy them to the menues
-     * we can destroy the array afterwards, because we are saving the ints 
-     * as tags to the menu-items */
-    NSArray * o_cnt_cnt;
-    NSArray * o_lft_cnt;
-    NSArray * o_rht_cnt;
-    NSArray * o_cnt_top;
-    NSArray * o_lft_top;
-    NSArray * o_rht_top;
-    NSArray * o_cnt_btm;
-    NSArray * o_lft_btm;
-    NSArray * o_rht_btm;
-    NSArray * o_positions;
-    o_cnt_cnt = [NSArray arrayWithObjects: _NS("Center-Center"), @"0", nil];
-    o_lft_cnt = [NSArray arrayWithObjects: _NS("Left-Center"), @"1", nil];
-    o_rht_cnt = [NSArray arrayWithObjects: _NS("Right-Center"), @"2", nil];
-    o_cnt_top = [NSArray arrayWithObjects: _NS("Center-Top"), @"4", nil];
-    o_lft_top = [NSArray arrayWithObjects: _NS("Left-Top"), @"5", nil];
-    o_rht_top = [NSArray arrayWithObjects: _NS("Right-Top"), @"6", nil];
-    o_cnt_btm = [NSArray arrayWithObjects: _NS("Center-Bottom"), @"8", nil];
-    o_lft_btm = [NSArray arrayWithObjects: _NS("Left-Bottom"), @"9", nil];
-    o_rht_btm = [NSArray arrayWithObjects: _NS("Right-Bottom"), @"10", nil];
-    o_positions = [[NSArray alloc] initWithObjects: o_cnt_cnt, o_lft_cnt, \
-        o_rht_cnt, o_cnt_top, o_lft_top, o_rht_top, o_cnt_btm, o_lft_btm, \
-        o_rht_btm, nil];
-        
-    x = 0;
-    [o_time_pos_rel_pop removeAllItems];
-    [o_marq_pos_rel_pop removeAllItems];
-    [o_logo_pos_rel_pop removeAllItems];
-    
-    /* we are adding a tag here, so we can easily select an item later on */
-    while ( x != [o_positions count] )
-    {
-        [o_time_pos_rel_pop addItemWithTitle: [[o_positions objectAtIndex:x] \
-            objectAtIndex:0]];
-        [[o_time_pos_rel_pop lastItem] setTag: [[[o_positions objectAtIndex:x] \
-            objectAtIndex:1] intValue]];
-        [o_marq_pos_rel_pop addItemWithTitle: [[o_positions objectAtIndex:x] \
-            objectAtIndex:0]];
-        [[o_marq_pos_rel_pop lastItem] setTag: [[[o_positions objectAtIndex:x] \
-            objectAtIndex:1] intValue]];
-        [o_logo_pos_rel_pop addItemWithTitle: [[o_positions objectAtIndex:x] \
-            objectAtIndex:0]];
-        [[o_logo_pos_rel_pop lastItem] setTag: [[[o_positions objectAtIndex:x] \
-            objectAtIndex:1] intValue]];
-
-        x = (x + 1);
-    }
-    [o_positions release];
-
     NSArray * o_sizes;
     o_sizes = [[NSArray alloc] initWithObjects: @"6", @"8", @"10", @"11", @"12",\
-        @"14", @"13", @"16", @"18", @"24", @"36", @"48", @"64", @"72", @"96", \
+        @"13", @"14", @"16", @"18", @"24", @"36", @"48", @"64", @"72", @"96",
         @"144", @"288", nil];
     [o_marq_size_pop removeAllItems];
     [o_marq_size_pop addItemsWithTitles: o_sizes];
@@ -238,28 +173,22 @@ static VLCsFilters *_o_sharedInstance = nil;
 
 - (void)showAsPanel
 {
+    char * psz_temp;
+
     /* called from intf.m */
     [o_sfilter_win displayIfNeeded];
     [o_sfilter_win makeKeyAndOrderFront:nil];
 
-    /* show a warning until the panel is removed for 0.8.5
-     * This isn't to be localised */
-    NSBeginCriticalAlertSheet( @"Implementation incomplete", @"OK", \
-        @"", @"", o_sfilter_win, nil, nil, nil, nil, @"The panel " \
-        "you just opened is not implemented completely and contains " \
-        "various limitations and certain bugs. Be warned.\n\nIt isn't going " \
-        "to be included within the final build of VLC 0.8.5." );
-
     intf_thread_t * p_intf = VLCIntf;
 
     /* retrieve the marquee settings */
     int x = 0;
     int tempInt = config_GetInt( p_intf, "marq-color" );
-    while( strtol([[[o_colors objectAtIndex:x] objectAtIndex:1] UTF8String], \
+    while( strtol([[[o_colors objectAtIndex:x] objectAtIndex:1] UTF8String],
         NULL, 0) != tempInt )
     {
         x = (x + 1);
-        
         if( x >= [o_marq_color_pop numberOfItems] )
         {
             x = 0;
@@ -267,44 +196,30 @@ static VLCsFilters *_o_sharedInstance = nil;
         }
     }
     [o_marq_color_pop selectItemAtIndex: x];
-    [o_marq_marq_fld setStringValue: [NSString stringWithUTF8String: \
-        config_GetPsz( p_intf, "marq-marquee" )]];
+    if( psz_temp = config_GetPsz( p_intf, "time-format" ) )
+        [o_marq_marq_fld setStringValue: [NSString stringWithUTF8String: psz_temp]];
+    else
+        [o_marq_marq_fld setStringValue: _NS("Not Available")];
     [o_marq_opaque_sld setIntValue: config_GetInt( p_intf, "marq-opacity")];
-    x = 0;
-    tempInt = config_GetInt( p_intf, "marq-position" );
-    while( tempInt != [[o_marq_pos_rel_pop itemAtIndex:x] tag] )
-    {
-        x = (x + 1);
-        
-        if( x >= [o_marq_pos_rel_pop numberOfItems] )
-        {
-            x = 0;
-            return;
-        }
-    }
-    [o_marq_pos_rel_pop selectItemAtIndex:x];
-    x = 0;
-    tempInt = config_GetInt( p_intf, "marq-size" );
-    while( [[[o_marq_size_pop itemAtIndex: x] title] intValue] != tempInt )
-        x = (x + 1);
-        
-        if( x >= [o_marq_size_pop numberOfItems] )
-        {
-            x = 0;
-            return;
-        }
+    [o_marq_pos_radio selectCellWithTag: config_GetInt( p_intf, "marq-position" )];
+    /* FIXME: the following line doesn't work with "-1", which is the default
+     * value */
+    [o_marq_size_pop selectItemWithTitle:
+        [[NSNumber numberWithInt: config_GetInt( p_intf, "marq-size" )]
+            stringValue]];
     [o_marq_size_pop selectItemAtIndex: x];
-    [o_marq_tmOut_fld setStringValue: [[NSNumber numberWithInt: \
+    [o_marq_tmOut_fld setStringValue: [[NSNumber numberWithInt:
         config_GetInt( p_intf, "marq-timeout" )] stringValue]];
-    
     /* retrieve the time settings */
     x = 0;
     tempInt = config_GetInt( p_intf, "time-color" );
-    while( strtol([[[o_colors objectAtIndex:x] objectAtIndex:1] UTF8String], \
+    while( strtol([[[o_colors objectAtIndex:x] objectAtIndex:1] UTF8String],
         NULL, 0) != tempInt )
     {
         x = (x + 1);
-        
         if( x >= [o_time_color_pop numberOfItems] )
         {
             x = 0;
@@ -312,96 +227,77 @@ static VLCsFilters *_o_sharedInstance = nil;
         }
     }
     [o_time_color_pop selectItemAtIndex: x];
-    [o_time_stamp_fld setStringValue: [NSString stringWithUTF8String: \
-        config_GetPsz( p_intf, "time-format" )]];
+    if( psz_temp = config_GetPsz( p_intf, "time-format" ) )
+        [o_time_stamp_fld setStringValue: [NSString stringWithUTF8String: psz_temp]];
+    else
+        [o_time_stamp_fld setStringValue: _NS("Not Available")];
+
     [o_time_opaque_sld setIntValue: config_GetInt( p_intf, "time-opacity")];
-    x = 0;
-    tempInt = config_GetInt( p_intf, "time-size" );
-    while( [[[o_time_size_pop itemAtIndex: x] title] intValue] != tempInt )
-        x = (x + 1);
-        
-        if( x >= [o_time_size_pop numberOfItems] )
-        {
-            x = 0;
-            return;
-        }
-    [o_time_size_pop selectItemAtIndex: x];
-    x = 0;
-    tempInt = config_GetInt( p_intf, "time-position" );
-    while( tempInt != [[o_time_pos_rel_pop itemAtIndex:x] tag] )
-    {
-        x = (x + 1);
-        
-        if( x >= [o_time_pos_rel_pop numberOfItems] )
-        {
-            x = 0;
-            return;
-        }
-    }
-    
+    /* FIXME: the following line doesn't work with "-1", which is the default
+     * value */
+    [o_time_size_pop selectItemWithTitle:
+        [[NSNumber numberWithInt: config_GetInt( p_intf, "time-size" )]
+            stringValue]];
+    [o_time_pos_radio selectCellWithTag: config_GetInt( p_intf, "time-position" )];
+
     /* retrieve the logo settings */
     [o_logo_opaque_sld setIntValue: config_GetInt( p_intf, "logo-transparency")];
     /* in case that no path has been saved yet */
-    NSString * tempString = [[NSString alloc] initWithUTF8String: \
-        config_GetPsz( p_intf, "logo-file" )];
-    if( [tempString length] == 0 )
-    {
-        [o_logo_image_fld setStringValue: @""];
-    }
+    if( psz_temp = config_GetPsz( p_intf, "logo-file" ) )
+        [o_logo_image_fld setStringValue: [NSString stringWithUTF8String: psz_temp]];
     else
-    {
-        [o_logo_image_fld setStringValue: tempString ];
-    }
-    [tempString release];
-    x = 0;
-    tempInt = config_GetInt( p_intf, "logo-position" );
-    while( tempInt != [[o_logo_pos_rel_pop itemAtIndex:x] tag] )
-    {
-        x = (x + 1);
-        
-        if( x >= [o_logo_pos_rel_pop numberOfItems] )
-        {
-            x = 0;
-            return;
-        }
-    }
-    
-    /* enable the wanted filters */
+        [o_logo_image_fld setStringValue: @""];
+    [o_logo_pos_radio selectCellWithTag: config_GetInt( p_intf, "logo-position" )];
+    /* enable the requested filters */
     char * psz_subfilters;
     psz_subfilters = config_GetPsz( p_intf, "sub-filter" );
     if( psz_subfilters )
     {
-        [o_marq_enabled_ckb setState: (int)strstr( psz_subfilters, "marq")];
-        [o_logo_enabled_ckb setState: (int)strstr( psz_subfilters, "logo")];
-        [o_time_enabled_ckb setState: (int)strstr( psz_subfilters, "time")];
-        [self enableMarq];
-        [self enableLogo];
-        [self enableTime];
+        if( strstr( psz_subfilters, "marq") )
+            [o_marq_enabled_ckb setState: YES];
+        else
+            [o_marq_enabled_ckb setState: NO];
+        if( strstr( psz_subfilters, "logo") )
+            [o_logo_enabled_ckb setState: YES];
+        else
+            [o_logo_enabled_ckb setState: NO];
+        if( strstr( psz_subfilters, "time") )
+            [o_time_enabled_ckb setState: YES];
+        else
+            [o_time_enabled_ckb setState: NO];
     }
+    [self enableMarq];
+    [self enableLogo];
+    [self enableTime];
 }
 
 - (IBAction)logo_selectFile:(id)sender
 {
     NSOpenPanel * openPanel = [NSOpenPanel openPanel];
     SEL sel = @selector(logo_getFile:returnCode:contextInfo:);
-    [openPanel beginSheetForDirectory:nil file:nil types: [NSArray \
-        arrayWithObjects: @"png", @"PNG", @"'PNGf'", nil] modalForWindow: \
+    [openPanel beginSheetForDirectory:nil file:nil types: [NSArray
+        arrayWithObjects: @"png", @"PNG", @"'PNGf'", nil] modalForWindow:
         o_sfilter_win modalDelegate:self didEndSelector:sel contextInfo:nil];
 }
 
-- (void)logo_getFile: (NSOpenPanel *)sheet returnCode: \
+- (void)logo_getFile: (NSOpenPanel *)sheet returnCode:
     (int)returnCode contextInfo: (void *)contextInfo
 {
     if (returnCode == NSOKButton)
     {
         [o_logo_image_fld setStringValue: [sheet filename]];
+        /* Make sure we notice that */
+        [self propertyChanged: o_logo_image_fld];
     }
 }
 
 - (IBAction)propertyChanged:(id)sender
 {
     intf_thread_t * p_intf = VLCIntf;
-    input_thread_t * p_input = (input_thread_t *)vlc_object_find( p_intf, \
+    input_thread_t * p_input = (input_thread_t *)vlc_object_find( p_intf,
         VLC_OBJECT_INPUT, FIND_ANYWHERE );
 
     vlc_value_t val;
@@ -409,7 +305,7 @@ static VLCsFilters *_o_sharedInstance = nil;
     /* general properties */
     if( sender == o_sfilter_saveSettings_ckb)
     {
-        o_save_settings = [o_sfilter_saveSettings_ckb state]; 
+        o_save_settings = [o_sfilter_saveSettings_ckb state];
     }
 
     /* marquee */
@@ -417,7 +313,7 @@ static VLCsFilters *_o_sharedInstance = nil;
     {
         if( [[o_marq_marq_fld stringValue] length] == 0 )
         {
-            val.psz_string = "";
+            val.psz_string = (char *)"";
         }
         else
         {
@@ -429,20 +325,20 @@ static VLCsFilters *_o_sharedInstance = nil;
 
         config_PutPsz( p_intf, "marq-marquee", val.psz_string );
     }
-    
-    else if( sender == o_marq_pos_rel_pop )
+
+    else if( sender == o_marq_pos_radio )
     {
-        val.i_int = [[o_marq_pos_rel_pop selectedItem] tag];
+        val.i_int = [[o_marq_pos_radio selectedCell] tag];
 
         if( p_input )
             var_Set( p_input->p_libvlc, "marq-position", val );
 
         config_PutInt( p_intf, "marq-position", val.i_int );
     }
-    
+
     else if( sender == o_marq_color_pop )
     {
-        val.i_int = strtol( [[[o_colors objectAtIndex: [o_marq_color_pop \
+        val.i_int = strtol( [[[o_colors objectAtIndex: [o_marq_color_pop
             indexOfSelectedItem]] objectAtIndex: 1] UTF8String], NULL, 0 );
 
         if( p_input )
@@ -450,7 +346,7 @@ static VLCsFilters *_o_sharedInstance = nil;
 
         config_PutInt( p_intf, "marq-color", val.i_int );
     }
-    
+
     else if( sender == o_marq_opaque_sld )
     {
         val.i_int = [o_marq_opaque_sld intValue];
@@ -460,7 +356,7 @@ static VLCsFilters *_o_sharedInstance = nil;
 
         config_PutInt( p_intf, "marq-opacity", val.i_int );
     }
-    
+
     else if( sender == o_marq_size_pop )
     {
         val.i_int = [[o_marq_size_pop titleOfSelectedItem] intValue];
@@ -470,7 +366,7 @@ static VLCsFilters *_o_sharedInstance = nil;
 
         config_PutInt( p_intf, "marq-size", val.i_int );
     }
-    
+
     else if( sender == o_marq_tmOut_fld && [[sender stringValue] length] > 0 )
     {
         val.i_int = [o_marq_tmOut_fld intValue];
@@ -480,14 +376,14 @@ static VLCsFilters *_o_sharedInstance = nil;
 
         config_PutInt( p_intf, "marq-timeout", val.i_int );
     }
-    
     /* time */
-    
     else if( sender == o_time_stamp_fld )
     {
         if( [[o_time_stamp_fld stringValue] length] == 0 )
         {
-            val.psz_string = "";
+            val.psz_string = (char *)"";
         }
         else
         {
@@ -500,19 +396,19 @@ static VLCsFilters *_o_sharedInstance = nil;
         config_PutPsz( p_intf, "time-format", val.psz_string );
     }
 
-    else if( sender == o_time_pos_rel_pop )
+    else if( sender == o_time_pos_radio )
     {
-        val.i_int = [[o_time_pos_rel_pop selectedItem] tag];
+        val.i_int = [[o_time_pos_radio selectedCell] tag];
 
         if( p_input )
             var_Set( p_input->p_libvlc, "time-position", val );
 
         config_PutInt( p_intf, "time-position", val.i_int );
     }
-    
+
     else if( sender == o_time_color_pop )
     {
-        val.i_int = strtol( [[[o_colors objectAtIndex: [o_time_color_pop \
+        val.i_int = strtol( [[[o_colors objectAtIndex: [o_time_color_pop
             indexOfSelectedItem]] objectAtIndex: 1] UTF8String], NULL, 0 );
 
         if( p_input )
@@ -520,7 +416,7 @@ static VLCsFilters *_o_sharedInstance = nil;
 
         config_PutInt( p_intf, "time-color", val.i_int );
     }
-    
+
     else if( sender == o_time_opaque_sld )
     {
         val.i_int = [o_time_opaque_sld intValue];
@@ -530,7 +426,7 @@ static VLCsFilters *_o_sharedInstance = nil;
 
         config_PutInt( p_intf, "time-opacity", val.i_int );
     }
-    
+
     else if( sender == o_time_size_pop )
     {
         val.i_int = [[o_time_size_pop titleOfSelectedItem] intValue];
@@ -551,16 +447,30 @@ static VLCsFilters *_o_sharedInstance = nil;
 
         config_PutInt( p_intf, "logo-transparency", val.i_int );
     }
-    
-    else if( sender == o_logo_pos_rel_pop )
+
+    else if( sender == o_logo_pos_radio )
     {
-        val.i_int = [[o_logo_pos_rel_pop selectedItem] tag];
+        val.i_int = [[o_logo_pos_radio selectedCell] tag];
 
         if( p_input )
             var_Set( p_input->p_libvlc, "logo-position", val );
 
         config_PutInt( p_intf, "logo-position", val.i_int );
     }
+    else if ( sender == o_logo_image_fld )
+    {
+        val.psz_string = (char *)[[o_logo_image_fld stringValue] UTF8String];
+
+        if( p_input )
+            var_Set( p_input->p_libvlc, "logo-file", val );
+
+        config_PutPsz( p_intf, "logo-file", val.psz_string );
+    }
+    else
+    {
+        /* just in case */
+        msg_Err( p_intf, "couldn't find any action for sender" );
+    }
 
     /* clean up */
     if ( p_input )
@@ -576,11 +486,11 @@ static VLCsFilters *_o_sharedInstance = nil;
     {
         if( [o_marq_enabled_ckb state] == NSOnState )
         {
-            [self changeFiltersString:"marq" onOrOff:VLC_TRUE];
+            [self changeFiltersString:(char *)"marq" onOrOff:VLC_TRUE];
         }
         else
         {
-            [self changeFiltersString:"marq" onOrOff:VLC_FALSE];
+            [self changeFiltersString:(char *)"marq" onOrOff:VLC_FALSE];
         }
         [self enableMarq];
     }
@@ -588,11 +498,11 @@ static VLCsFilters *_o_sharedInstance = nil;
     {
         if( [o_logo_enabled_ckb state] == NSOnState )
         {
-            [self changeFiltersString:"logo" onOrOff:VLC_TRUE];
+            [self changeFiltersString:(char *)"logo" onOrOff:VLC_TRUE];
         }
         else
         {
-            [self changeFiltersString:"logo" onOrOff:VLC_FALSE];
+            [self changeFiltersString:(char *)"logo" onOrOff:VLC_FALSE];
         }
         [self enableLogo];
     }
@@ -600,14 +510,14 @@ static VLCsFilters *_o_sharedInstance = nil;
     {
         if( [o_time_enabled_ckb state] == NSOnState )
         {
-            [self changeFiltersString:"time" onOrOff:VLC_TRUE];
+            [self changeFiltersString:(char *)"time" onOrOff:VLC_TRUE];
         }
         else
         {
-            [self changeFiltersString:"time" onOrOff:VLC_FALSE];
+            [self changeFiltersString:(char *)"time" onOrOff:VLC_FALSE];
         }
         [self enableTime];
-    }    
+    }
 }
 
 - (void)enableMarq
@@ -617,7 +527,7 @@ static VLCsFilters *_o_sharedInstance = nil;
     [o_marq_opaque_sld setEnabled: [o_marq_enabled_ckb state]];
     [o_marq_size_pop setEnabled: [o_marq_enabled_ckb state]];
     [o_marq_tmOut_fld setEnabled: [o_marq_enabled_ckb state]];
-    [o_marq_pos_rel_pop setEnabled: [o_marq_enabled_ckb state]];
+    [o_marq_pos_radio setEnabled: [o_marq_enabled_ckb state]];
 }
 
 - (void)enableTime
@@ -626,7 +536,7 @@ static VLCsFilters *_o_sharedInstance = nil;
     [o_time_stamp_fld setEnabled: [o_time_enabled_ckb state]];
     [o_time_opaque_sld setEnabled: [o_time_enabled_ckb state]];
     [o_time_size_pop setEnabled: [o_time_enabled_ckb state]];
-    [o_time_pos_rel_pop setEnabled: [o_time_enabled_ckb state]];
+    [o_time_pos_radio setEnabled: [o_time_enabled_ckb state]];
 }
 
 - (void)enableLogo
@@ -634,7 +544,7 @@ static VLCsFilters *_o_sharedInstance = nil;
     [o_logo_image_btn setEnabled: [o_logo_enabled_ckb state]];
     [o_logo_image_fld setEnabled: [o_logo_enabled_ckb state]];
     [o_logo_opaque_sld setEnabled: [o_logo_enabled_ckb state]];
-    [o_logo_pos_rel_pop setEnabled: [o_logo_enabled_ckb state]];
+    [o_logo_pos_radio setEnabled: [o_logo_enabled_ckb state]];
 }
 
 - (void)changeFiltersString:(char *)psz_name onOrOff:(vlc_bool_t )b_add
@@ -644,10 +554,10 @@ static VLCsFilters *_o_sharedInstance = nil;
      * and slightly modified to suit our needs */
 
     intf_thread_t * p_intf = VLCIntf;
-    
     char *psz_parser, *psz_string;
     psz_string = config_GetPsz( p_intf, "sub-filter" );
-    
     if( !psz_string ) psz_string = strdup("");
 
     psz_parser = strstr( psz_string, psz_name );
@@ -686,12 +596,12 @@ static VLCsFilters *_o_sharedInstance = nil;
              return;
          }
     }
-    
     config_PutPsz( p_intf, "sub-filter", psz_string );
-    
     /* Try to set on the fly */
     /* FIXME: enable this once we support on-the-fly addition of this kind of
-     * filters...
+     * filters... */
     vout_thread_t *p_vout;
     p_vout = (vout_thread_t *)vlc_object_find( p_intf, VLC_OBJECT_VOUT,
                                               FIND_ANYWHERE );
@@ -699,12 +609,10 @@ static VLCsFilters *_o_sharedInstance = nil;
     {
         var_SetString( p_vout, "sub-filter", psz_string );
         vlc_object_release( p_vout );
-    }*/
+    }
 
     free( psz_string );
 
-    vlc_object_release( p_intf );
-
     o_config_changed = YES;
 }
 @end