Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
orbutils
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nick Thomas
orbutils
Commits
7d524f1a
Commit
7d524f1a
authored
8 years ago
by
Jeremy Soller
Browse files
Options
Downloads
Patches
Plain Diff
Update ui submodule, fix launcher on linux
parent
ba6eb065
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
src/launcher/main.rs
+10
-4
10 additions, 4 deletions
src/launcher/main.rs
ui
+1
-1
1 addition, 1 deletion
ui
with
11 additions
and
5 deletions
src/launcher/main.rs
+
10
−
4
View file @
7d524f1a
...
@@ -5,6 +5,12 @@ extern crate orbclient;
...
@@ -5,6 +5,12 @@ extern crate orbclient;
extern
crate
orbimage
;
extern
crate
orbimage
;
extern
crate
orbfont
;
extern
crate
orbfont
;
#[cfg(target_os
=
"redox"
)]
static
UI_PATH
:
&
'static
str
=
"/ui"
;
#[cfg(not(target_os
=
"redox"
))]
static
UI_PATH
:
&
'static
str
=
"ui"
;
#[cfg(not(target_os
=
"redox"
))]
#[cfg(not(target_os
=
"redox"
))]
fn
wait
(
status
:
&
mut
i32
)
->
usize
{
fn
wait
(
status
:
&
mut
i32
)
->
usize
{
extern
crate
libc
;
extern
crate
libc
;
...
@@ -44,7 +50,7 @@ const TEXT_COLOR: Color = Color::rgb(204, 210, 224);
...
@@ -44,7 +50,7 @@ const TEXT_COLOR: Color = Color::rgb(204, 210, 224);
const
TEXT_HIGHLIGHT_COLOR
:
Color
=
Color
::
rgb
(
235
,
241
,
255
);
const
TEXT_HIGHLIGHT_COLOR
:
Color
=
Color
::
rgb
(
235
,
241
,
255
);
fn
get_packages
()
->
Vec
<
Package
>
{
fn
get_packages
()
->
Vec
<
Package
>
{
let
read_dir
=
Path
::
new
(
"/ui/apps/"
)
.read_dir
()
.expect
(
"failed to read
_dir on /ui/apps/
"
);
let
read_dir
=
Path
::
new
(
&
format!
(
"{}/apps/"
,
UI_PATH
)
)
.read_dir
()
.expect
(
"failed to read
apps directory
"
);
let
mut
entries
=
vec!
[];
let
mut
entries
=
vec!
[];
for
dir
in
read_dir
{
for
dir
in
read_dir
{
...
@@ -62,7 +68,7 @@ fn get_packages() -> Vec<Package> {
...
@@ -62,7 +68,7 @@ fn get_packages() -> Vec<Package> {
let
mut
packages
:
Vec
<
Package
>
=
Vec
::
new
();
let
mut
packages
:
Vec
<
Package
>
=
Vec
::
new
();
for
entry
in
entries
.iter
()
{
for
entry
in
entries
.iter
()
{
packages
.push
(
Package
::
from_path
(
&
format!
(
"
/ui
/apps/{}"
,
entry
)));
packages
.push
(
Package
::
from_path
(
&
format!
(
"
{}
/apps/{}"
,
UI_PATH
,
entry
)));
}
}
packages
packages
...
@@ -152,9 +158,9 @@ fn bar_main() {
...
@@ -152,9 +158,9 @@ fn bar_main() {
let
packages
=
get_packages
();
let
packages
=
get_packages
();
let
start
=
Image
::
from_path
(
"/ui
/icons/start.png"
)
.unwrap_or
(
Image
::
default
());
let
start
=
Image
::
from_path
(
format!
(
"{}
/icons/start.png"
,
UI_PATH
)
)
.unwrap_or
(
Image
::
default
());
let
shutdown
=
Image
::
from_path
(
"/ui
/icons/actions/system-log-out.png"
)
.unwrap_or
(
Image
::
default
());
let
shutdown
=
Image
::
from_path
(
format!
(
"{}
/icons/actions/system-log-out.png"
,
UI_PATH
)
)
.unwrap_or
(
Image
::
default
());
let
(
width
,
height
)
=
orbclient
::
get_display_size
()
.expect
(
"launcher: failed to get display size"
);
let
(
width
,
height
)
=
orbclient
::
get_display_size
()
.expect
(
"launcher: failed to get display size"
);
let
mut
window
=
Window
::
new
(
0
,
height
as
i32
-
32
,
width
,
32
,
""
)
.expect
(
"launcher: failed to open window"
);
let
mut
window
=
Window
::
new
(
0
,
height
as
i32
-
32
,
width
,
32
,
""
)
.expect
(
"launcher: failed to open window"
);
...
...
This diff is collapsed.
Click to expand it.
ui
@
4a1f87b2
Compare
01922620
...
4a1f87b2
Subproject commit
0192262071d97ff8eb0c61824560797e7a5f3e5e
Subproject commit
4a1f87b219b3db104f3e9ff21d974118357ff2e1
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