Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
XDG Integration
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
JennaHuntsman
XDG Integration
Commits
aae592ad
Commit
aae592ad
authored
1 year ago
by
Rye Mutt
Committed by
RobotRoss
11 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix seconds not hiding on clock correctly
parent
9741d637
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
indra/newview/llstatusbar.cpp
+26
-18
26 additions, 18 deletions
indra/newview/llstatusbar.cpp
indra/newview/llstatusbar.h
+2
-0
2 additions, 0 deletions
indra/newview/llstatusbar.h
with
28 additions
and
18 deletions
indra/newview/llstatusbar.cpp
+
26
−
18
View file @
aae592ad
...
...
@@ -257,6 +257,8 @@ BOOL LLStatusBar::postBuild()
mFilterEdit
->
setCommitCallback
(
boost
::
bind
(
&
LLStatusBar
::
onUpdateFilterTerm
,
this
));
collectSearchableItems
();
gSavedSettings
.
getControl
(
"MenuSearch"
)
->
getCommitSignal
()
->
connect
(
boost
::
bind
(
&
LLStatusBar
::
updateMenuSearchVisibility
,
this
,
_2
));
gSavedSettings
.
getControl
(
"ShowStatusBarTime"
)
->
getCommitSignal
()
->
connect
(
boost
::
bind
(
&
LLStatusBar
::
updateClock
,
this
));
gSavedSettings
.
getControl
(
"ShowStatusBarSeconds"
)
->
getCommitSignal
()
->
connect
(
boost
::
bind
(
&
LLStatusBar
::
updateClock
,
this
));
if
(
search_panel_visible
)
{
...
...
@@ -280,24 +282,7 @@ void LLStatusBar::refresh()
{
mClockUpdateTimer
.
reset
();
// Get current UTC time, adjusted for the user's clock
// being off.
time_t
utc_time
;
utc_time
=
time_corrected
();
static
const
std
::
string
timeStrTemplate
=
getString
(
"time"
);
static
const
std
::
string
timeStrSecondsTemplate
=
getString
(
"timeSeconds"
);
std
::
string
timeStr
=
show_clock_seconds
?
timeStrSecondsTemplate
:
timeStrTemplate
;
LLSD
substitution
;
substitution
[
"datetime"
]
=
(
S32
)
utc_time
;
LLStringUtil
::
format
(
timeStr
,
substitution
);
mTextTime
->
setText
(
timeStr
);
// set the tooltip to have the date
static
const
std
::
string
dtStrTemplate
=
getString
(
"timeTooltip"
);
std
::
string
dtStr
=
dtStrTemplate
;
LLStringUtil
::
format
(
dtStr
,
substitution
);
mTextTime
->
setToolTip
(
dtStr
);
updateClock
();
}
LLRect
r
;
...
...
@@ -789,6 +774,29 @@ void LLStatusBar::updateBalancePanelPosition()
mBalanceBG
->
setShape
(
balance_bg_rect
);
}
void
LLStatusBar
::
updateClock
()
{
static
LLCachedControl
<
bool
>
show_clock_seconds
(
gSavedSettings
,
"ShowStatusBarSeconds"
,
false
);
// Get current UTC time, adjusted for the user's clock
// being off.
time_t
utc_time
;
utc_time
=
time_corrected
();
static
const
std
::
string
timeStrTemplate
=
getString
(
"time"
);
static
const
std
::
string
timeStrSecondsTemplate
=
getString
(
"timeSeconds"
);
std
::
string
timeStr
=
show_clock_seconds
?
timeStrSecondsTemplate
:
timeStrTemplate
;
LLSD
substitution
;
substitution
[
"datetime"
]
=
(
S32
)
utc_time
;
LLStringUtil
::
format
(
timeStr
,
substitution
);
mTextTime
->
setText
(
timeStr
);
// set the tooltip to have the date
static
const
std
::
string
dtStrTemplate
=
getString
(
"timeTooltip"
);
std
::
string
dtStr
=
dtStrTemplate
;
LLStringUtil
::
format
(
dtStr
,
substitution
);
mTextTime
->
setToolTip
(
dtStr
);
}
// Implements secondlife:///app/balance/request to request a L$ balance
// update via UDP message system. JC
...
...
This diff is collapsed.
Click to expand it.
indra/newview/llstatusbar.h
+
2
−
0
View file @
aae592ad
...
...
@@ -126,6 +126,8 @@ class LLStatusBar final
void
updateMenuSearchPosition
();
// depends onto balance position
void
updateBalancePanelPosition
();
void
updateClock
();
void
onAOStateChanged
();
LLTextBox
*
mTextTime
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment