Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
bc3883a5
Commit
bc3883a5
authored
May 28, 2009
by
Derk-Jan Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
memleaks: Several Mac OS X interface related memleaks.
parent
02b581e1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
20 deletions
+28
-20
modules/gui/macosx/controls.m
modules/gui/macosx/controls.m
+2
-2
modules/gui/macosx/playlist.m
modules/gui/macosx/playlist.m
+1
-0
modules/gui/macosx/simple_prefs.m
modules/gui/macosx/simple_prefs.m
+22
-17
modules/misc/quartztext.c
modules/misc/quartztext.c
+3
-1
No files found.
modules/gui/macosx/controls.m
View file @
bc3883a5
...
...
@@ -846,7 +846,7 @@
text_list
.
p_list
->
p_values
[
i
].
psz_string
:
val_list
.
p_list
->
p_values
[
i
].
psz_string
];
o_lmi
=
[
o_menu
addItemWithTitle
:
o_title
action
:
pf_callback
keyEquivalent
:
@""
];
o_data
=
[[
VLCAutoGeneratedMenuContent
alloc
]
initWithVariableName
:
strdup
(
psz_variable
)
ofObject
:
p_object
o_data
=
[[
VLCAutoGeneratedMenuContent
alloc
]
initWithVariableName
:
psz_variable
ofObject
:
p_object
andValue:
another_val
ofType
:
i_type
];
[
o_lmi
setRepresentedObject
:
[
o_data
autorelease
]];
[
o_lmi
setTarget
:
self
];
...
...
@@ -864,7 +864,7 @@
val_list
.
p_list
->
p_values
[
i
].
i_int
];
o_lmi
=
[
o_menu
addItemWithTitle
:
o_title
action
:
pf_callback
keyEquivalent
:
@""
];
o_data
=
[[
VLCAutoGeneratedMenuContent
alloc
]
initWithVariableName
:
strdup
(
psz_variable
)
ofObject
:
p_object
o_data
=
[[
VLCAutoGeneratedMenuContent
alloc
]
initWithVariableName
:
psz_variable
ofObject
:
p_object
andValue:
val_list
.
p_list
->
p_values
[
i
]
ofType
:
i_type
];
[
o_lmi
setRepresentedObject
:
[
o_data
autorelease
]];
[
o_lmi
setTarget
:
self
];
...
...
modules/gui/macosx/playlist.m
View file @
bc3883a5
...
...
@@ -542,6 +542,7 @@
[
o_mi_revealInFinder
setEnabled
:
YES
];
[
o_mm_mi_revealInFinder
setEnabled
:
YES
];
}
free
(
psz_uri
);
}
if
(
[[
VLCMain
sharedInstance
]
isPlaylistCollapsed
]
==
NO
)
...
...
modules/gui/macosx/simple_prefs.m
View file @
bc3883a5
...
...
@@ -389,6 +389,13 @@ create_toolbar_item( NSString * o_itemIdent, NSString * o_name, NSString * o_des
[
object
setToolTip
:
_NS
(
p_item
->
psz_longtext
)];
}
-
(
void
)
setupField
:(
NSTextField
*
)
o_object
forOption
:(
const
char
*
)
psz_option
{
char
*
psz_tmp
=
config_GetPsz
(
p_intf
,
psz_option
);
[
o_object
setStringValue
:
[
NSString
stringWithUTF8String
:
psz_tmp
?:
""
]];
free
(
psz_tmp
);
}
-
(
void
)
resetControls
{
module_config_t
*
p_item
;
...
...
@@ -417,8 +424,7 @@ create_toolbar_item( NSString * o_itemIdent, NSString * o_name, NSString * o_des
[
o_audio_spdif_ckb
setState
:
config_GetInt
(
p_intf
,
"spdif"
)];
[
self
setupButton
:
o_audio_dolby_pop
forIntList
:
"force-dolby-surround"
];
[
o_audio_lang_fld
setStringValue
:
[
NSString
stringWithUTF8String
:
config_GetPsz
(
p_intf
,
"audio-language"
)
?:
""
]];
[
self
setupField
:
o_audio_lang_fld
forOption
:
"audio-language"
];
[
o_audio_headphone_ckb
setState
:
config_GetInt
(
p_intf
,
"headphone-dolby"
)];
...
...
@@ -428,6 +434,7 @@ create_toolbar_item( NSString * o_itemIdent, NSString * o_name, NSString * o_des
[
o_audio_norm_ckb
setState
:
(
NSInteger
)
strstr
(
psz_tmp
,
"volnorm"
)];
[
o_audio_norm_fld
setEnabled
:
[
o_audio_norm_ckb
state
]];
[
o_audio_norm_stepper
setEnabled
:
[
o_audio_norm_ckb
state
]];
free
(
psz_tmp
);
}
[
o_audio_norm_fld
setFloatValue
:
config_GetFloat
(
p_intf
,
"norm-max-level"
)];
...
...
@@ -436,8 +443,8 @@ create_toolbar_item( NSString * o_itemIdent, NSString * o_name, NSString * o_des
/* Last.FM is optional */
if
(
module_exists
(
"audioscrobbler"
)
)
{
[
o_audio_lastuser_fld
setStringValue
:
[
NSString
stringWithUTF8String
:
config_GetPsz
(
p_intf
,
"lastfm-username"
)
?:
""
]
];
[
o_audio_lastpwd_sfld
setStringValue
:
[
NSString
stringWithUTF8String
:
config_GetPsz
(
p_intf
,
"lastfm-password"
)
?:
""
]
];
[
self
setupField
:
o_audio_lastuser_fld
forOption
:
"lastfm-username"
];
[
self
setupField
:
o_audio_lastpwd_sfld
forOption
:
"lastfm-password"
];
if
(
config_ExistIntf
(
VLC_OBJECT
(
p_intf
),
"audioscrobbler"
)
)
{
...
...
@@ -483,8 +490,8 @@ create_toolbar_item( NSString * o_itemIdent, NSString * o_name, NSString * o_des
[
o_video_device_pop
selectItemAtIndex
:
0
];
[
o_video_device_pop
selectItemWithTag
:
config_GetInt
(
p_intf
,
"macosx-vdev"
)];
[
o_video_snap_folder_fld
setStringValue
:
[
NSString
stringWithUTF8String
:
config_GetPsz
(
p_intf
,
"snapshot-path"
)
?:
""
]
];
[
o_video_snap_prefix_fld
setStringValue
:
[
NSString
stringWithUTF8String
:
config_GetPsz
(
p_intf
,
"snapshot-prefix"
)
?:
""
]
];
[
self
setupField
:
o_video_snap_folder_fld
forOption
:
"snapshot-path"
];
[
self
setupField
:
o_video_snap_prefix_fld
forOption
:
"snapshot-prefix"
];
[
o_video_snap_seqnum_ckb
setState
:
config_GetInt
(
p_intf
,
"snapshot-sequential"
)];
[
self
setupButton
:
o_video_snap_format_pop
forStringList
:
"snapshot-format"
];
...
...
@@ -492,10 +499,8 @@ create_toolbar_item( NSString * o_itemIdent, NSString * o_name, NSString * o_des
* input & codecs settings *
***************************/
[
o_input_serverport_fld
setIntValue
:
config_GetInt
(
p_intf
,
"server-port"
)];
if
(
config_GetPsz
(
p_intf
,
"http-proxy"
)
!=
NULL
)
[
o_input_httpproxy_fld
setStringValue
:
[
NSString
stringWithUTF8String
:
config_GetPsz
(
p_intf
,
"http-proxy"
)
?:
""
]];
if
(
config_GetPsz
(
p_intf
,
"http-proxy"
)
!=
NULL
)
[
o_input_httpproxypwd_sfld
setStringValue
:
[
NSString
stringWithUTF8String
:
config_GetPsz
(
p_intf
,
"http-proxy-pwd"
)
?:
""
]];
[
self
setupField
:
o_input_httpproxy_fld
forOption
:
"http-proxy"
];
[
self
setupField
:
o_input_httpproxypwd_sfld
forOption
:
"http-proxy-pwd"
];
[
o_input_postproc_fld
setIntValue
:
config_GetInt
(
p_intf
,
"postproc-q"
)];
[
self
setupButton
:
o_input_avi_pop
forIntList
:
"avi-index"
];
...
...
@@ -559,10 +564,8 @@ create_toolbar_item( NSString * o_itemIdent, NSString * o_name, NSString * o_des
[
o_osd_osd_ckb
setState
:
config_GetInt
(
p_intf
,
"osd"
)];
[
self
setupButton
:
o_osd_encoding_pop
forStringList
:
"subsdec-encoding"
];
[
o_osd_lang_fld
setStringValue
:
[
NSString
stringWithUTF8String
:
config_GetPsz
(
p_intf
,
"sub-language"
)
?:
""
]];
if
(
config_GetPsz
(
p_intf
,
"quartztext-font"
)
!=
NULL
)
[
o_osd_font_fld
setStringValue
:
[
NSString
stringWithUTF8String
:
config_GetPsz
(
p_intf
,
"quartztext-font"
)
?:
""
]];
[
self
setupField
:
o_osd_lang_fld
forOption
:
"sub-language"
];
[
self
setupField
:
o_osd_font_fld
forOption
:
"quartztext-font"
];
[
self
setupButton
:
o_osd_font_color_pop
forIntList
:
"quartztext-color"
];
[
self
setupButton
:
o_osd_font_size_pop
forIntList
:
"quartztext-rel-fontsize"
];
...
...
@@ -755,6 +758,7 @@ static inline void save_module_list( intf_thread_t * p_intf, id object, const ch
/* work-around a GCC 4.0.1 bug */
psz_tmp
=
(
char
*
)[[
NSString
stringWithFormat
:
@"%s:volnorm"
,
psz_tmp
]
UTF8String
];
config_PutPsz
(
p_intf
,
"audio-filter"
,
psz_tmp
);
free
(
psz_tmp
);
}
}
else
...
...
@@ -762,10 +766,11 @@ static inline void save_module_list( intf_thread_t * p_intf, id object, const ch
psz_tmp
=
config_GetPsz
(
p_intf
,
"audio-filter"
);
if
(
psz_tmp
)
{
psz_tmp
=
(
char
*
)[[[
NSString
stringWithUTF8String
:
psz_tmp
]
stringByTrimmingCharactersInSet
:
[
NSCharacterSet
characterSetWithCharactersInString
:
@":volnorm"
]]
UTF8String
];
psz_tmp
=
(
char
*
)[[[
NSString
stringWithUTF8String
:
psz_tmp
]
stringByTrimmingCharactersInSet
:
[
NSCharacterSet
characterSetWithCharactersInString
:
@"volnorm:"
]]
UTF8String
];
psz_tmp
=
(
char
*
)[[[
NSString
stringWithUTF8String
:
psz_tmp
]
stringByTrimmingCharactersInSet
:
[
NSCharacterSet
characterSetWithCharactersInString
:
@"volnorm"
]]
UTF8String
];
char
*
psz_tmp2
=
(
char
*
)[[[
NSString
stringWithUTF8String
:
psz_tmp
]
stringByTrimmingCharactersInSet
:
[
NSCharacterSet
characterSetWithCharactersInString
:
@":volnorm"
]]
UTF8String
];
psz_tmp
2
=
(
char
*
)[[[
NSString
stringWithUTF8String
:
psz_tmp2
]
stringByTrimmingCharactersInSet
:
[
NSCharacterSet
characterSetWithCharactersInString
:
@"volnorm:"
]]
UTF8String
];
psz_tmp
2
=
(
char
*
)[[[
NSString
stringWithUTF8String
:
psz_tmp2
]
stringByTrimmingCharactersInSet
:
[
NSCharacterSet
characterSetWithCharactersInString
:
@"volnorm"
]]
UTF8String
];
config_PutPsz
(
p_intf
,
"audio-filter"
,
psz_tmp
);
free
(
psz_tmp
);
}
}
config_PutFloat
(
p_intf
,
"norm-max-level"
,
[
o_audio_norm_fld
floatValue
]
);
...
...
modules/misc/quartztext.c
View file @
bc3883a5
...
...
@@ -749,7 +749,9 @@ static offscreen_bitmap_t *Compose( int i_text_align, UniChar *psz_utf16_str, ui
CGContextSetTextDrawingMode
(
p_context
,
kCGTextFillStroke
);
CGContextSetShadow
(
p_context
,
CGSizeMake
(
0
,
0
),
5
);
float
black_components
[
4
]
=
{
0
,
0
,
0
,
1
};
CGContextSetShadowWithColor
(
p_context
,
CGSizeMake
(
0
,
0
),
5
,
CGColorCreate
(
CGColorSpaceCreateWithName
(
kCGColorSpaceGenericRGB
),
black_components
));
CGColorRef
outlinecolor
=
CGColorCreate
(
CGColorSpaceCreateWithName
(
kCGColorSpaceGenericRGB
),
black_components
);
CGContextSetShadowWithColor
(
p_context
,
CGSizeMake
(
0
,
0
),
5
,
outlinecolor
);
CGColorRelease
(
outlinecolor
);
do
{
// ATSUBreakLine will automatically pick up any manual '\n's also
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment