Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
le5
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Linux Educacional 5
le5
Commits
58aa313f
Commit
58aa313f
authored
Mar 12, 2014
by
Diego Giovane Pasqualin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'bug-938' of /home/git/repositories/le5/unstable
parents
b835d77b
d20c4ae1
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
32 deletions
+23
-32
gtk_ui.py
...ight/package/usr/lib/ubiquity/ubiquity/frontend/gtk_ui.py
+3
-0
gtk_ui.py
...k-le/package/usr/lib/ubiquity/ubiquity/frontend/gtk_ui.py
+3
-0
ubi-partman.py
ubiquity-le/package/usr/lib/ubiquity/plugins/ubi-partman.py
+1
-3
gtkwidgets.py
ubiquity-le/package/usr/lib/ubiquity/ubiquity/gtkwidgets.py
+16
-29
No files found.
ubiquity-frontend-gtk-le-light/package/usr/lib/ubiquity/ubiquity/frontend/gtk_ui.py
View file @
58aa313f
...
...
@@ -253,6 +253,9 @@ class Wizard(BaseFrontend):
provider
.
load_from_data
(
'''GtkProgressBar {
-GtkProgressBar-min-horizontal-bar-height : 10
}
GtkPaned {
-GtkPaned-handle-size: 10;
}'''
)
Gtk
.
StyleContext
.
add_provider_for_screen
(
Gdk
.
Screen
.
get_default
(),
...
...
ubiquity-frontend-gtk-le/package/usr/lib/ubiquity/ubiquity/frontend/gtk_ui.py
View file @
58aa313f
...
...
@@ -253,6 +253,9 @@ class Wizard(BaseFrontend):
provider
.
load_from_data
(
'''GtkProgressBar {
-GtkProgressBar-min-horizontal-bar-height : 10
}
GtkPaned {
-GtkPaned-handle-size: 10;
}'''
)
Gtk
.
StyleContext
.
add_provider_for_screen
(
Gdk
.
Screen
.
get_default
(),
...
...
ubiquity-le/package/usr/lib/ubiquity/plugins/ubi-partman.py
View file @
58aa313f
...
...
@@ -413,10 +413,8 @@ class PageGtk(PageBase):
if
'windows'
in
title
.
lower
():
PATH
=
os
.
environ
.
get
(
'UBIQUITY_PATH'
,
False
)
or
'/usr/share/ubiquity'
icon
.
logo
.
set_from_file
(
os
.
path
.
join
(
PATH
,
'pixmaps'
,
'windows_square.png'
))
elif
'buntu'
in
title
.
lower
():
icon
.
set_property
(
'icon-name'
,
'distributor-logo'
)
else
:
icon
.
set_property
(
'icon-name'
,
'
block-device
'
)
icon
.
set_property
(
'icon-name'
,
'
drive-harddisk
'
)
# TODO See if we can get the filesystem label first in misc.py,
# caching lookups.
...
...
ubiquity-le/package/usr/lib/ubiquity/ubiquity/gtkwidgets.py
View file @
58aa313f
...
...
@@ -115,16 +115,30 @@ class ResizeWidget(Gtk.HPaned):
# The max size (b) that the existing partition can be resized to.
self
.
max_size
=
max_size
# Use test window to figure out highlight color
test_window
=
Gtk
.
Window
()
test_label
=
Gtk
.
Label
()
test_window
.
add
(
test_label
)
style
=
test_label
.
get_style_context
()
self
.
highlight_color
=
style
.
get_background_color
(
Gtk
.
StateFlags
.
SELECTED
)
self
.
highlight_color
.
alpha
=
0.5
# more recent python-gi has .to_color() override, copy it...
self
.
highlight_color_rgb
=
Gdk
.
Color
(
65535
,
65535
,
65535
)
# FIXME: Why do we still need these event boxes to get proper bounds
# for the linear gradient?
self
.
existing_part
=
existing_part
or
PartitionBox
()
eb
=
Gtk
.
EventBox
()
eb
.
modify_bg
(
Gtk
.
StateFlags
.
NORMAL
,
self
.
highlight_color_rgb
)
eb
.
add
(
self
.
existing_part
)
self
.
pack1
(
eb
,
resize
=
False
,
shrink
=
False
)
self
.
new_part
=
new_part
or
PartitionBox
()
eb
=
Gtk
.
EventBox
()
eb
.
modify_bg
(
Gtk
.
StateFlags
.
NORMAL
,
self
.
highlight_color_rgb
)
eb
.
add
(
self
.
new_part
)
self
.
pack2
(
eb
,
resize
=
False
,
shrink
=
False
)
self
.
show_all
()
# FIXME hideous, but do_realize fails inexplicably.
self
.
connect
(
'realize'
,
self
.
realize
)
...
...
@@ -191,7 +205,7 @@ class DiskBox(Gtk.Box):
GObject
.
type_register
(
DiskBox
)
class
PartitionBox
(
StylizedFrame
):
class
PartitionBox
(
Gtk
.
Alignment
):
\
__gtype_name__
=
'PartitionBox'
__gproperties__
=
{
'title'
:
(
GObject
.
TYPE_STRING
,
'Title'
,
None
,
'Title'
,
...
...
@@ -230,7 +244,7 @@ class PartitionBox(StylizedFrame):
# 4 px between the title and the extra heading
# 5 px between the extra heading and the size
# 12 px below the bottom-most element
StylizedFrame
.
__init__
(
self
)
Gtk
.
Alignment
.
__init__
(
self
)
vbox
=
Gtk
.
Box
()
vbox
.
set_orientation
(
Gtk
.
Orientation
.
VERTICAL
)
self
.
logo
=
Gtk
.
Image
.
new_from_icon_name
(
icon_name
,
...
...
@@ -271,33 +285,6 @@ class PartitionBox(StylizedFrame):
size
=
misc
.
format_size
(
size
)
self
.
size
.
set_markup
(
'<span size="x-large">
%
s</span>'
%
size
)
def
render_dots
(
self
):
# FIXME: Dots are rendered over the frame.
s
=
cairo
.
ImageSurface
(
cairo
.
FORMAT_ARGB32
,
2
,
2
)
cr
=
cairo
.
Context
(
s
)
cr
.
set_source_rgb
(
*
gtk_to_cairo_color
(
'#b6b0a9'
))
cr
.
rectangle
(
1
,
1
,
1
,
1
)
cr
.
fill
()
pattern
=
cairo
.
SurfacePattern
(
s
)
return
pattern
def
paint_background
(
self
,
c
):
StylizedFrame
.
paint_background
(
self
,
c
)
a
=
self
.
get_allocation
()
pattern
=
self
.
render_dots
()
pattern
.
set_extend
(
cairo
.
EXTEND_REPEAT
)
c
.
set_source
(
pattern
)
c
.
fill_preserve
()
g
=
cairo
.
RadialGradient
(
a
.
width
/
2
,
a
.
height
/
2
,
0
,
a
.
width
/
2
,
a
.
height
/
2
,
a
.
width
>
a
.
height
and
a
.
width
or
a
.
height
)
g
.
add_color_stop_rgba
(
0.00
,
1
,
1
,
1
,
1.00
)
g
.
add_color_stop_rgba
(
0.25
,
1
,
1
,
1
,
0.75
)
g
.
add_color_stop_rgba
(
0.40
,
1
,
1
,
1
,
0.00
)
c
.
set_source
(
g
)
c
.
fill_preserve
()
GObject
.
type_register
(
PartitionBox
)
class
StateBox
(
StylizedFrame
):
...
...
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