Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Tractor
carburetor
Commits
229ae055
Commit
229ae055
authored
Nov 08, 2019
by
Danial Behzadi
Browse files
fix progressbar
parent
b264b372
Changes
2
Show whitespace changes
Inline
Side-by-side
carburetor
View file @
229ae055
...
...
@@ -96,9 +96,10 @@ class StartButton(ToolButton):
def
set_progress
(
self
,
stdout
,
condition
):
line
=
stdout
.
readline
().
decode
(
"utf-8"
)
if
'%'
in
line
:
percentage
=
line
.
split
()[
5
][:
-
1
]
header_bar
=
self
.
get_parent
()
progress_button
=
header_bar
.
get_children
()[
-
1
]
progress_button
.
set_progress
(
line
.
split
()[
5
][:
-
2
]
)
progress_button
.
set_progress
(
percentage
)
return
True
def
on_start_clicked
(
self
,
button
):
...
...
@@ -146,9 +147,11 @@ class ProgressBar(Gtk.ProgressBar):
Gtk
.
ProgressBar
.
__init__
(
self
)
def
set_progress
(
self
,
percentage
):
if
isinstance
(
percentage
,
int
)
:
try
:
fraction
=
float
(
percentage
)
/
100
self
.
set_fraction
(
fraction
)
except
:
pass
class
StopButton
(
Gtk
.
Button
):
def
__init__
(
self
):
...
...
debian/changelog
View file @
229ae055
carburetor (2.9-1) bionic; urgency=medium
* fix the bug in setting progress button (This time for real)
-- Danial Behzadi <dani.behzi@ubuntu.com> Fri, 08 Nov 2019 16:30:00 +0330
carburetor (2.8-1) bionic; urgency=medium
* use internal gi notification
...
...
Write
Preview
Supports
Markdown
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