[gparted] Call any FS specific progress trackers for stderr updates too (#760709)
- From: Curtis Gedak <gedakc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gparted] Call any FS specific progress trackers for stderr updates too (#760709)
- Date: Sat, 13 Feb 2016 17:12:16 +0000 (UTC)
commit 965d88d197c4c932bcd5cf4654e4cd44ca997377
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date: Sat Jan 16 16:15:05 2016 +0000
Call any FS specific progress trackers for stderr updates too (#760709)
So far the signal_progress callback slot was only emitted when standard
output from the file system specific command was updated. This was okay
as all the commands until now wrote their progress information to
stdout. However e2image writes its progress information to stderr,
therefore also emit signal_progress when stderr is updated too.
This does mean that the file system specific *_progress() tracking
callbacks will be called when either of the OperationDetail objects
containing stdout or stderr are updated. Therefore the trackers may be
called when there is no update to the stream from which it is parsing
the progress information. This is not a problem as the tracker will
just update the progress bar with the same information it already has.
Also it won't happen much as only e2image is known to write to both
streams, and then only one line to stdout and the updated progress
information to stderr. This is just an observation and not an issue
which needs coding around.
Bug 760709 - Add progress bars to XFS and EXT2/3/4 file system specific
copy methods
src/FileSystem.cc | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/FileSystem.cc b/src/FileSystem.cc
index fe7eb3f..0b4b9e1 100644
--- a/src/FileSystem.cc
+++ b/src/FileSystem.cc
@@ -122,11 +122,13 @@ int FileSystem::execute_command( const Glib::ustring & command, OperationDetail
outputcapture.signal_update.connect( sigc::bind( sigc::ptr_fun( update_command_output ),
children[children.size() - 2],
&output ) );
+ outputcapture.signal_update.connect( sigc::bind( sigc::mem_fun( *this,
&FileSystem::update_command_progress ),
+ &operationdetail ) );
errorcapture.signal_update.connect( sigc::bind( sigc::ptr_fun( update_command_output ),
children[children.size() - 1],
&error ) );
- outputcapture.signal_update.connect( sigc::bind( sigc::mem_fun( *this,
&FileSystem::update_command_progress ),
- &operationdetail ) );
+ errorcapture.signal_update.connect( sigc::bind( sigc::mem_fun( *this,
&FileSystem::update_command_progress ),
+ &operationdetail ) );
outputcapture.connect_signal();
errorcapture.connect_signal();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]