Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
xfce4-weather-plugin
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
25
Issues
25
List
Boards
Labels
Service Desk
Milestones
Custom Issue Tracker
Custom Issue Tracker
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Panel Plugins
xfce4-weather-plugin
Commits
b862d548
Commit
b862d548
authored
Jul 31, 2012
by
Harald Judt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Astrological data: Show data in summary window details tab.
parent
a9cb0d05
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
55 additions
and
1 deletion
+55
-1
panel-plugin/weather-summary.c
panel-plugin/weather-summary.c
+55
-1
No files found.
panel-plugin/weather-summary.c
View file @
b862d548
...
...
@@ -277,8 +277,10 @@ create_summary_tab(xfceweather_data *data)
xml_time
*
conditions
;
const
gchar
*
unit
;
struct
tm
*
start_tm
,
*
end_tm
,
*
point_tm
;
struct
tm
*
sunrise_tm
,
*
sunset_tm
,
*
moonrise_tm
,
*
moonset_tm
;
gchar
*
value
,
*
wind
,
*
sun_val
,
*
vis
,
*
rawvalue
;
char
interval_start
[
80
],
interval_end
[
80
],
point
[
80
];
gchar
interval_start
[
80
],
interval_end
[
80
],
point
[
80
];
gchar
sunrise
[
80
],
sunset
[
80
],
moonrise
[
80
],
moonset
[
80
];
view
=
gtk_text_view_new
();
gtk_text_view_set_editable
(
GTK_TEXT_VIEW
(
view
),
FALSE
);
...
...
@@ -336,6 +338,58 @@ create_summary_tab(xfceweather_data *data)
interval_end
);
APPEND_TEXT_ITEM_REAL
(
value
);
/* sun and moon */
APPEND_BTEXT
(
_
(
"
\n
Astrological Data
\n
"
));
if
(
data
->
astrodata
)
{
if
(
data
->
astrodata
->
sun_never_rises
)
{
value
=
g_strdup
(
_
(
"
\t
Sunrise:
\t\t
The sun never rises today.
\n
"
));
APPEND_TEXT_ITEM_REAL
(
value
);
}
else
if
(
data
->
astrodata
->
sun_never_sets
)
{
value
=
g_strdup
(
_
(
"
\t
Sunset:
\t\t
The sun never sets today.
\n
"
));
APPEND_TEXT_ITEM_REAL
(
value
);
}
else
{
sunrise_tm
=
localtime
(
&
data
->
astrodata
->
sunrise
);
strftime
(
sunrise
,
80
,
"%c"
,
sunrise_tm
);
value
=
g_strdup_printf
(
_
(
"
\t
Sunrise:
\t\t
%s
\n
"
),
sunrise
);
APPEND_TEXT_ITEM_REAL
(
value
);
sunset_tm
=
localtime
(
&
data
->
astrodata
->
sunset
);
strftime
(
sunset
,
80
,
"%c"
,
sunset_tm
);
value
=
g_strdup_printf
(
_
(
"
\t
Sunset:
\t\t
%s
\n\n
"
),
sunset
);
APPEND_TEXT_ITEM_REAL
(
value
);
}
if
(
data
->
astrodata
->
moon_phase
)
value
=
g_strdup_printf
(
_
(
"
\t
Moon phase:
\t
%s
\n
"
),
translate_moon_phase
(
data
->
astrodata
->
moon_phase
));
else
value
=
g_strdup
(
_
(
"
\t
Moon phase:
\t
Unknown
\n
"
));
APPEND_TEXT_ITEM_REAL
(
value
);
if
(
data
->
astrodata
->
moon_never_rises
)
{
value
=
g_strdup
(
_
(
"
\t
Moonrise:
\t
The moon never rises today.
\n
"
));
APPEND_TEXT_ITEM_REAL
(
value
);
}
else
if
(
data
->
astrodata
->
moon_never_sets
)
{
value
=
g_strdup
(
_
(
"
\t
Moonset:
\t
The moon never sets today.
\n
"
));
APPEND_TEXT_ITEM_REAL
(
value
);
}
else
{
moonrise_tm
=
localtime
(
&
data
->
astrodata
->
moonrise
);
strftime
(
moonrise
,
80
,
"%c"
,
moonrise_tm
);
value
=
g_strdup_printf
(
_
(
"
\t
Moonrise:
\t
%s
\n
"
),
moonrise
);
APPEND_TEXT_ITEM_REAL
(
value
);
moonset_tm
=
localtime
(
&
data
->
astrodata
->
moonset
);
strftime
(
moonset
,
80
,
"%c"
,
moonset_tm
);
value
=
g_strdup_printf
(
_
(
"
\t
Moonset:
\t
%s
\n
"
),
moonset
);
APPEND_TEXT_ITEM_REAL
(
value
);
}
}
else
{
value
=
g_strdup
(
_
(
"
\t
Data not available, will use sane "
"default values for night and day.
\n
"
));
APPEND_TEXT_ITEM_REAL
(
value
);
}
/* temperature */
APPEND_BTEXT
(
_
(
"
\n
Temperature
\n
"
));
APPEND_TEXT_ITEM
(
_
(
"Temperature"
),
TEMPERATURE
);
...
...
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