Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CIP-Admins
cip-displaymanager
Commits
95fc462f
Commit
95fc462f
authored
Oct 08, 2015
by
dario
Browse files
collect loaded sessions in vector
parent
ff7def5b
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main.rs
View file @
95fc462f
...
...
@@ -26,13 +26,14 @@ pub fn main() {
// load Xsessions
let
sessions
=
vec!
[];
let
mut
sessions
=
vec!
[];
for
p
in
glob
::
glob
(
"/usr/share/xsessions/*.desktop"
)
.unwrap
()
{
// glob gives you all the files, and those that don't match as Err(_)…
if
let
Ok
(
path
)
=
p
{
let
info
=
load_xsession_file
(
path
.to_str
()
.unwrap
());
println!
(
"{:?}"
,
info
);
sessions
.push
(
info
);
if
let
Ok
(
info
)
=
load_xsession_file
(
path
.to_str
()
.unwrap
())
{
//println!("{:?}", info);
sessions
.push
(
info
);
}
}
}
...
...
@@ -56,6 +57,8 @@ pub fn main() {
.unwrap
();
let
event_iter
=
window
.events
()
.ups
(
60
)
.max_fps
(
60
);
let
mut
gl
=
GlGraphics
::
new
(
opengl
);
// end conrod examples
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment