Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gnome-panel
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
GNOME
gnome-panel
Commits
13a71fd7
Commit
13a71fd7
authored
Aug 12, 2009
by
Vincent Untz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[clock] Improve previous commit, to not uselessly redisplay the map
parent
d81098b8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
applets/clock/clock-map.c
applets/clock/clock-map.c
+12
-5
No files found.
applets/clock/clock-map.c
View file @
13a71fd7
...
...
@@ -406,7 +406,10 @@ clock_map_mark (ClockMap *this, gfloat latitude, gfloat longitude, gint mark)
}
}
static
void
/**
* Return value: %TRUE if @loc can be placed on the map, %FALSE otherwise.
**/
static
gboolean
clock_map_place_location
(
ClockMap
*
this
,
ClockLocation
*
loc
,
gboolean
hilight
)
{
gfloat
latitude
,
longitude
;
...
...
@@ -415,7 +418,7 @@ clock_map_place_location (ClockMap *this, ClockLocation *loc, gboolean hilight)
clock_location_get_coords
(
loc
,
&
latitude
,
&
longitude
);
/* 0/0 means unset, basically */
if
(
latitude
==
0
&&
longitude
==
0
)
return
;
return
FALSE
;
if
(
hilight
)
marker
=
MARKER_HILIGHT
;
...
...
@@ -425,6 +428,8 @@ clock_map_place_location (ClockMap *this, ClockLocation *loc, gboolean hilight)
marker
=
MARKER_NORMAL
;
clock_map_mark
(
this
,
latitude
,
longitude
,
marker
);
return
TRUE
;
}
static
void
...
...
@@ -607,9 +612,11 @@ highlight (gpointer user_data)
if
(
data
->
count
==
6
)
return
FALSE
;
if
(
data
->
count
%
2
==
0
)
clock_map_place_location
(
data
->
map
,
data
->
location
,
TRUE
);
else
if
(
data
->
count
%
2
==
0
)
{
if
(
!
clock_map_place_location
(
data
->
map
,
data
->
location
,
TRUE
))
return
FALSE
;
}
else
clock_map_place_locations
(
data
->
map
);
clock_map_display
(
data
->
map
);
...
...
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