Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
agkyra
Commits
0130e362
Commit
0130e362
authored
Jul 09, 2015
by
Stavros Sachtouris
Committed by
Giorgos Korfiatis
Oct 19, 2015
Browse files
Gray out tray icon when agkyra is inactive
parent
9771ef9d
Changes
1
Hide whitespace changes
Inline
Side-by-side
agkyra/nwgui/menu.html
View file @
0130e362
...
...
@@ -38,9 +38,12 @@ function closeWindows() {
}
// GUI components
var
tray_icon
=
{
on
:
'
static/images/tray.png
'
,
off
:
'
static/images/tray_off.png
'
}
var
tray
=
new
gui
.
Tray
({
tooltip
:
COMMON
.
MENU
.
TITLE
,
icon
:
'
static/images/tray.png
'
,
icon
:
tray_icon
.
off
,
iconsAreTemplates
:
false
});
...
...
@@ -217,6 +220,7 @@ window.setInterval(function() {
check_menu_lang
();
var
new_progress
=
COMMON
.
NOTIFICATION
[
globals
.
status
.
code
];
var
new_pause
=
''
;
var
tray_icon_off
=
false
;
switch
(
globals
.
status
.
code
)
{
case
STATUS
[
'
UNINITIALIZED
'
]:
case
STATUS
[
'
INITIALIZING
'
]:
...
...
@@ -224,6 +228,7 @@ window.setInterval(function() {
notify
(
'
info
'
);
deactivate_menu
();
new_pause
=
COMMON
.
MENU
.
INACTIVE
;
tray_icon_off
=
true
;
break
;
case
STATUS
[
'
SYNCING
'
]:
notify
(
'
info
'
);
...
...
@@ -273,6 +278,10 @@ window.setInterval(function() {
pause_item
.
label
=
new_pause
;
tray
.
menu
=
menu
;
}
if
(
tray_icon_off
&&
tray
.
icon
!==
tray_icon
.
off
)
tray
.
icon
=
tray_icon
.
off
;
else
if
(
!
(
tray_icon_off
||
tray
.
icon
===
tray_icon
.
on
))
tray
.
icon
=
tray_icon
.
on
;
get_status
(
socket
);
},
1500
);
...
...
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