~ubuntu-branches/ubuntu/utopic/vlc/utopic

« back to all changes in this revision

Viewing changes to modules/gui/macosx/simple_prefs.m

  • Committer: Package Import Robot
  • Author(s): Benjamin Drung
  • Date: 2012-07-21 17:52:21 UTC
  • mfrom: (1.1.48) (3.5.44 sid)
  • Revision ID: package-import@ubuntu.com-20120721175221-53m5pclzo992kawy
Tags: 2.0.3-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
* simple_prefs.m: Simple Preferences for Mac OS X
3
3
*****************************************************************************
4
4
* Copyright (C) 2008-2012 VLC authors and VideoLAN
5
 
* $Id: c5dfa69986e951be1d9b873a4803c6890c09902c $
 
5
* $Id: 56c941e5ee674ece81042cb85284988c9c346b25 $
6
6
*
7
7
* Authors: Felix Paul Kühne <fkuehne at videolan dot org>
8
8
*
1206
1206
- (IBAction)showFontPicker:(id)sender
1207
1207
{
1208
1208
    char * font = config_GetPsz( p_intf, "freetype-font" );
1209
 
    NSString * fontFamilyName = font ? [NSString stringWithUTF8String: font] : nil;
 
1209
    NSString * fontName = font ? [NSString stringWithUTF8String: font] : nil;
1210
1210
    free(font);
1211
 
    if( fontFamilyName )
 
1211
    if( fontName )
1212
1212
    {
1213
 
        NSFontDescriptor * fd = [NSFontDescriptor fontDescriptorWithFontAttributes:nil];
1214
 
        NSFont * font = [NSFont fontWithDescriptor:[fd fontDescriptorWithFamily:fontFamilyName] textTransform:nil];
 
1213
        NSFont * font = [NSFont fontWithName:fontName size:0.0];
1215
1214
        [[NSFontManager sharedFontManager] setSelectedFont:font isMultiple:NO];
1216
1215
    }
1217
1216
    [[NSFontManager sharedFontManager] setTarget: self];