Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tray
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vladislav
tray
Commits
7911e64b
Commit
7911e64b
authored
Jan 09, 2017
by
Serge A. Zaitsev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trying to make macos implementation for checked/disabled
parent
75955856
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
tray.h
tray.h
+4
-2
No files found.
tray.h
View file @
7911e64b
...
...
@@ -125,7 +125,8 @@ static int tray_loop(int blocking) {
}
static
void
tray_update
(
struct
tray
*
tray
)
{
[
statusBarButton
setImage
:[
NSImage
imageNamed
:
@"icon.png"
]];
[
statusBarButton
setImage
:[
NSImage
imageNamed
:[
NSString
stringWithUTF8String
:
tray
->
icon
]]];
NSMenu
*
menu
=
[
NSMenu
new
];
[
menu
autorelease
];
...
...
@@ -139,7 +140,8 @@ static void tray_update(struct tray *tray) {
[
menuItem
initWithTitle
:[
NSString
stringWithUTF8String
:
m
->
text
]
action
:
@selector
(
menuCallback
:
)
keyEquivalent
:
@""
];
[
menuItem
setEnabled
:
YES
];
[
menuItem
setEnabled
:(
m
->
disabled
?
NO
:
YES
)];
[
menuItem
setState
:(
m
->
checked
?
NSOnState
:
NSOffState
)];
[
menuItem
setRepresentedObject
:[
NSValue
valueWithPointer
:
m
]];
[
menu
addItem
:
menuItem
];
...
...
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