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
1995b300
Commit
1995b300
authored
Aug 19, 2012
by
David Fuhrmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: use same translation dict for menu and column names
parent
f956a68e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
23 deletions
+7
-23
modules/gui/macosx/MainMenu.m
modules/gui/macosx/MainMenu.m
+3
-2
modules/gui/macosx/playlist.h
modules/gui/macosx/playlist.h
+1
-1
modules/gui/macosx/playlist.m
modules/gui/macosx/playlist.m
+3
-20
No files found.
modules/gui/macosx/MainMenu.m
View file @
1995b300
...
...
@@ -69,7 +69,7 @@ static VLCMainMenu *_o_sharedInstance = nil;
o_ptc_translation_dict
=
[
NSDictionary
dictionaryWithObjectsAndKeys
:
_NS
(
"Track Number"
),
TRACKNUM_COLUMN
,
_NS
(
"Title"
),
TITLE_COLUMN
,
_NS
(
"A
rtist
"
),
ARTIST_COLUMN
,
_NS
(
"A
uthor
"
),
ARTIST_COLUMN
,
_NS
(
"Duration"
),
DURATION_COLUMN
,
_NS
(
"Genre"
),
GENRE_COLUMN
,
_NS
(
"Album"
),
ALBUM_COLUMN
,
...
...
@@ -676,7 +676,7 @@ static VLCMainMenu *_o_sharedInstance = nil;
[[
o_mu_playlistTableColumnsContextMenu
itemWithTag
:
i_tag
]
setState
:
i_new_state
];
NSString
*
o_column
=
[
o_ptc_menuorder
objectAtIndex
:
i_tag
];
[[[
VLCMain
sharedInstance
]
playlist
]
setColumn
:
o_column
state
:
i_new_state
];
[[[
VLCMain
sharedInstance
]
playlist
]
setColumn
:
o_column
state
:
i_new_state
translationDict
:
o_ptc_translation_dict
];
}
-
(
void
)
setPlaylistColumnTableState
:(
NSInteger
)
i_state
forColumn
:(
NSString
*
)
o_column
...
...
@@ -684,6 +684,7 @@ static VLCMainMenu *_o_sharedInstance = nil;
NSInteger
i_tag
=
[
o_ptc_menuorder
indexOfObject
:
o_column
];
[[
o_mu_playlistTableColumns
itemWithTag
:
i_tag
]
setState
:
i_state
];
[[
o_mu_playlistTableColumnsContextMenu
itemWithTag
:
i_tag
]
setState
:
i_state
];
[[[
VLCMain
sharedInstance
]
playlist
]
setColumn
:
o_column
state
:
i_state
translationDict
:
o_ptc_translation_dict
];
}
#pragma mark -
...
...
modules/gui/macosx/playlist.h
View file @
1995b300
...
...
@@ -152,5 +152,5 @@
-
(
void
)
appendArray
:(
NSArray
*
)
o_array
atPos
:(
int
)
i_position
enqueue
:(
BOOL
)
b_enqueue
;
-
(
void
)
appendNodeArray
:(
NSArray
*
)
o_array
inNode
:(
playlist_item_t
*
)
p_node
atPos
:(
int
)
i_position
enqueue
:(
BOOL
)
b_enqueue
;
-
(
void
)
setColumn
:
(
NSString
*
)
o_column
state
:
(
NSInteger
)
i_state
;
-
(
void
)
setColumn
:
(
NSString
*
)
o_column
state
:
(
NSInteger
)
i_state
translationDict
:(
NSDictionary
*
)
o_dict
;
@end
modules/gui/macosx/playlist.m
View file @
1995b300
...
...
@@ -522,7 +522,6 @@
if
([
o_column
isEqualToString
:
@"status"
])
continue
;
[
self
setColumn
:
o_column
state
:
NSOnState
];
[
o_menu
setPlaylistColumnTableState
:
NSOnState
forColumn
:
o_column
];
[[
o_outline_view
tableColumnWithIdentifier
:
o_column
]
setWidth
:
[[[
o_columnArray
objectAtIndex
:
i
]
objectAtIndex
:
1
]
floatValue
]];
}
...
...
@@ -1487,7 +1486,7 @@
return
[[
o_nodes_array
arrayByAddingObjectsFromArray
:
o_items_array
]
retain
];
}
-
(
void
)
setColumn
:
(
NSString
*
)
o_column
state
:
(
NSInteger
)
i_state
-
(
void
)
setColumn
:
(
NSString
*
)
o_column
state
:
(
NSInteger
)
i_state
translationDict
:(
NSDictionary
*
)
o_dict
{
NSTableColumn
*
o_work_tc
;
...
...
@@ -1497,7 +1496,8 @@
[
o_work_tc
setEditable
:
NO
];
[[
o_work_tc
dataCell
]
setFont
:
[
NSFont
controlContentFontOfSize
:
11
.]];
/* we cannot use a makro here, because gettext isn't clever enough for that */
[[
o_work_tc
headerCell
]
setStringValue
:
[
o_dict
objectForKey
:
o_column
]];
if
([
o_column
isEqualToString
:
TRACKNUM_COLUMN
])
{
[
o_work_tc
setMaxWidth
:
20
.];
...
...
@@ -1505,25 +1505,8 @@
}
else
if
([
o_column
isEqualToString
:
TITLE_COLUMN
])
{
[[
o_work_tc
headerCell
]
setStringValue
:
_NS
(
"Name"
)];
[
o_work_tc
setResizingMask
:
NSTableColumnAutoresizingMask
|
NSTableColumnUserResizingMask
];
}
else
if
([
o_column
isEqualToString
:
ARTIST_COLUMN
])
[[
o_work_tc
headerCell
]
setStringValue
:
_NS
(
"Author"
)];
else
if
([
o_column
isEqualToString
:
DURATION_COLUMN
])
[[
o_work_tc
headerCell
]
setStringValue
:
_NS
(
"Duration"
)];
else
if
([
o_column
isEqualToString
:
GENRE_COLUMN
])
[[
o_work_tc
headerCell
]
setStringValue
:
_NS
(
"Genre"
)];
else
if
([
o_column
isEqualToString
:
ALBUM_COLUMN
])
[[
o_work_tc
headerCell
]
setStringValue
:
_NS
(
"Album"
)];
else
if
([
o_column
isEqualToString
:
DESCRIPTION_COLUMN
])
[[
o_work_tc
headerCell
]
setStringValue
:
_NS
(
"Description"
)];
else
if
([
o_column
isEqualToString
:
DATE_COLUMN
])
[[
o_work_tc
headerCell
]
setStringValue
:
_NS
(
"Date"
)];
else
if
([
o_column
isEqualToString
:
LANGUAGE_COLUMN
])
[[
o_work_tc
headerCell
]
setStringValue
:
_NS
(
"Language"
)];
else
if
([
o_column
isEqualToString
:
URI_COLUMN
])
[[
o_work_tc
headerCell
]
setStringValue
:
_NS
(
"URI"
)];
[
o_outline_view
addTableColumn
:
o_work_tc
];
[
o_work_tc
release
];
...
...
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