diff options
| author | fffw | 2015-02-04 12:02:53 +0000 |
|---|---|---|
| committer | fffw | 2015-02-04 12:02:53 +0000 |
| commit | 1129da136541cb4e5ab87537c4b19f4a0bd0df6d (patch) | |
| tree | 74478080e8279e715f0a377c14e911250412814c | |
| parent | bccfe2a1d16aa214c174932c392712904272842b (diff) | |
| download | systray-1129da136541cb4e5ab87537c4b19f4a0bd0df6d.tar.bz2 | |
able to disable menu item on linux
| -rw-r--r-- | systray_linux.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/systray_linux.c b/systray_linux.c index 4a3be9b..6d817a6 100644 --- a/systray_linux.c +++ b/systray_linux.c @@ -48,7 +48,7 @@ void setTooltip(char* ctooltip) { free(ctooltip); } -void add_or_update_menu_item(char* menuId, char* title, char* tooltip) { +void add_or_update_menu_item(char* menuId, char* title, char* tooltip, short disabled, short checked) { gdk_threads_enter(); GList* it; for(it = global_menu_items; it != NULL; it = it->next) { @@ -76,7 +76,9 @@ void add_or_update_menu_item(char* menuId, char* title, char* tooltip) { global_menu_items->prev = new_node; } global_menu_items = new_node; + it = new_node; } + gtk_widget_set_sensitive(((MenuItemNode*)(it->data))->menu_item, disabled == 1 ? FALSE : TRUE); gtk_widget_show_all(global_tray_menu); gdk_threads_leave(); |
