Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cip-displaymanager
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
CIP-Admins
cip-displaymanager
Commits
95fc462f
Commit
95fc462f
authored
9 years ago
by
dario
Browse files
Options
Downloads
Patches
Plain Diff
collect loaded sessions in vector
parent
ff7def5b
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main.rs
+7
-4
7 additions, 4 deletions
src/main.rs
with
7 additions
and
4 deletions
src/main.rs
+
7
−
4
View file @
95fc462f
...
@@ -26,14 +26,15 @@ pub fn main() {
...
@@ -26,14 +26,15 @@ pub fn main() {
// load Xsessions
// load Xsessions
let
sessions
=
vec!
[];
let
mut
sessions
=
vec!
[];
for
p
in
glob
::
glob
(
"/usr/share/xsessions/*.desktop"
)
.unwrap
()
{
for
p
in
glob
::
glob
(
"/usr/share/xsessions/*.desktop"
)
.unwrap
()
{
// glob gives you all the files, and those that don't match as Err(_)…
// glob gives you all the files, and those that don't match as Err(_)…
if
let
Ok
(
path
)
=
p
{
if
let
Ok
(
path
)
=
p
{
let
info
=
load_xsession_file
(
path
.to_str
()
.unwrap
())
;
if
let
Ok
(
info
)
=
load_xsession_file
(
path
.to_str
()
.unwrap
())
{
println!
(
"{:?}"
,
info
);
//
println!("{:?}", info);
sessions
.push
(
info
);
sessions
.push
(
info
);
}
}
}
}
}
...
@@ -56,6 +57,8 @@ pub fn main() {
...
@@ -56,6 +57,8 @@ pub fn main() {
.unwrap
();
.unwrap
();
let
event_iter
=
window
.events
()
.ups
(
60
)
.max_fps
(
60
);
let
event_iter
=
window
.events
()
.ups
(
60
)
.max_fps
(
60
);
let
mut
gl
=
GlGraphics
::
new
(
opengl
);
let
mut
gl
=
GlGraphics
::
new
(
opengl
);
// end conrod examples
// end conrod examples
...
...
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