Separate tray_menu[] from tray in README.md example.
This commit is contained in:
committed by
Dmitry Mikushin
parent
185ec37d3e
commit
2bbb122d90
12
README.md
12
README.md
@@ -67,12 +67,16 @@ $> a [Enter]
|
||||
# Example
|
||||
|
||||
```c
|
||||
struct tray_menu menus[] = {
|
||||
{ "Toggle me", 0, 0, toggle_cb, NULL },
|
||||
{ "-" , 0, 0, NULL , NULL },
|
||||
{ "Quit" , 0, 0, quit_cb , NULL },
|
||||
{ NULL , 0, 0, NULL , NULL }
|
||||
};
|
||||
|
||||
struct tray tray = {
|
||||
.icon = "icon.png",
|
||||
.menu = (struct tray_menu[]){{"Toggle me", 0, 0, toggle_cb, NULL},
|
||||
{"-", 0, 0, NULL, NULL},
|
||||
{"Quit", 0, 0, quit_cb, NULL},
|
||||
{NULL, 0, 0, NULL, NULL}},
|
||||
.menu = menus,
|
||||
};
|
||||
|
||||
void toggle_cb(struct tray_menu *item) {
|
||||
|
||||
Reference in New Issue
Block a user