[gparted] Rename OperationDetailStatus STATUS_N_A to STATUS_WARNING
- From: Curtis Gedak <gedakc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gparted] Rename OperationDetailStatus STATUS_N_A to STATUS_WARNING
- Date: Mon, 27 Nov 2017 17:42:59 +0000 (UTC)
commit 8c5c13d613474d3853d6071c5be8055d49bef5aa
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date: Sat Nov 25 16:55:28 2017 +0000
Rename OperationDetailStatus STATUS_N_A to STATUS_WARNING
Make the enumeration name match it's use as indicating a warning. Also
spell SUCCESS correctly. Follow on to icon variable names too.
include/Dialog_Progress.h | 4 ++--
include/OperationDetail.h | 12 ++++++------
src/Dialog_Progress.cc | 26 ++++++++++++++------------
src/FileSystem.cc | 2 +-
src/GParted_Core.cc | 10 ++++------
src/OperationDetail.cc | 6 +++---
6 files changed, 30 insertions(+), 30 deletions(-)
---
diff --git a/include/Dialog_Progress.h b/include/Dialog_Progress.h
index f2fd2c3..1d272be 100644
--- a/include/Dialog_Progress.h
+++ b/include/Dialog_Progress.h
@@ -66,10 +66,10 @@ private:
Gtk::Button *cancelbutton;
Glib::RefPtr<Gdk::Pixbuf> icon_execute ;
- Glib::RefPtr<Gdk::Pixbuf> icon_succes ;
+ Glib::RefPtr<Gdk::Pixbuf> icon_success;
Glib::RefPtr<Gdk::Pixbuf> icon_error ;
Glib::RefPtr<Gdk::Pixbuf> icon_info ;
- Glib::RefPtr<Gdk::Pixbuf> icon_n_a ;
+ Glib::RefPtr<Gdk::Pixbuf> icon_warning;
Glib::RefPtr<Gtk::TreeStore> treestore_operations;
diff --git a/include/OperationDetail.h b/include/OperationDetail.h
index 564268a..4cdda71 100644
--- a/include/OperationDetail.h
+++ b/include/OperationDetail.h
@@ -30,12 +30,12 @@ namespace GParted
{
enum OperationDetailStatus {
- STATUS_NONE = 0,
- STATUS_EXECUTE = 1,
- STATUS_SUCCES = 2,
- STATUS_ERROR = 3,
- STATUS_INFO = 4,
- STATUS_N_A = 5
+ STATUS_NONE = 0,
+ STATUS_EXECUTE = 1,
+ STATUS_SUCCESS = 2,
+ STATUS_ERROR = 3,
+ STATUS_INFO = 4,
+ STATUS_WARNING = 5
};
enum Font {
diff --git a/src/Dialog_Progress.cc b/src/Dialog_Progress.cc
index 87d5bca..ca49a2c 100644
--- a/src/Dialog_Progress.cc
+++ b/src/Dialog_Progress.cc
@@ -64,10 +64,10 @@ Dialog_Progress::Dialog_Progress( const std::vector<Operation *> & operations )
//create some icons here, instead of recreating them every time
icon_execute = render_icon(Gtk::Stock::EXECUTE, Gtk::ICON_SIZE_LARGE_TOOLBAR);
- icon_succes = render_icon(Gtk::Stock::APPLY, Gtk::ICON_SIZE_LARGE_TOOLBAR);
+ icon_success = render_icon(Gtk::Stock::APPLY, Gtk::ICON_SIZE_LARGE_TOOLBAR);
icon_error = render_icon(Gtk::Stock::DIALOG_ERROR, Gtk::ICON_SIZE_LARGE_TOOLBAR);
icon_info = render_icon(Gtk::Stock::INFO, Gtk::ICON_SIZE_LARGE_TOOLBAR);
- icon_n_a = render_icon(Gtk::Stock::DIALOG_WARNING, Gtk::ICON_SIZE_LARGE_TOOLBAR);
+ icon_warning = render_icon(Gtk::Stock::DIALOG_WARNING, Gtk::ICON_SIZE_LARGE_TOOLBAR);
treestore_operations = Gtk::TreeStore::create( treeview_operations_columns);
treeview_operations.set_model(treestore_operations);
@@ -130,8 +130,8 @@ void Dialog_Progress::on_signal_update( const OperationDetail & operationdetail
case STATUS_EXECUTE:
treerow[ treeview_operations_columns .status_icon ] = icon_execute ;
break ;
- case STATUS_SUCCES:
- treerow[ treeview_operations_columns .status_icon ] = icon_succes ;
+ case STATUS_SUCCESS:
+ treerow[treeview_operations_columns.status_icon] = icon_success;
break ;
case STATUS_ERROR:
treerow[ treeview_operations_columns .status_icon ] = icon_error ;
@@ -139,8 +139,8 @@ void Dialog_Progress::on_signal_update( const OperationDetail & operationdetail
case STATUS_INFO:
treerow[ treeview_operations_columns .status_icon ] = icon_info ;
break ;
- case STATUS_N_A:
- treerow[ treeview_operations_columns .status_icon ] = icon_n_a ;
+ case STATUS_WARNING:
+ treerow[treeview_operations_columns.status_icon] = icon_warning;
warnings++ ;
break ;
case STATUS_NONE:
@@ -421,7 +421,7 @@ void Dialog_Progress::echo_operation_details( const OperationDetail & operationd
*/
_("EXECUTING") << " )" ;
break ;
- case STATUS_SUCCES:
+ case STATUS_SUCCESS:
out << "( " <<
/* TO" TRANSLATORS: SUCCESS
* means that the status for this operation is
@@ -446,14 +446,16 @@ void Dialog_Progress::echo_operation_details( const OperationDetail & operationd
*/
_("INFO") << " )" ;
break ;
- case STATUS_N_A:
+ case STATUS_WARNING:
out << "( " <<
- /* TO TRANSLATORS: N/A
+ /* TO TRANSLATORS: WARNING
* means that the status for this operation is
- * not applicable because the operation is not
- * supported on the file system in the partition.
+ * completed with warnings. Either the operation
+ * is not supported on the file system in the
+ * partition, or the operation failed but it does
+ * not matter that it failed.
*/
- _("N/A") << " )" ;
+ _("WARNING") << " )" ;
break ;
default:
diff --git a/src/FileSystem.cc b/src/FileSystem.cc
index 19e8277..0469641 100644
--- a/src/FileSystem.cc
+++ b/src/FileSystem.cc
@@ -242,7 +242,7 @@ void FileSystem::rm_temp_dir( const Glib::ustring dir_name, OperationDetail & op
int e = errno ;
operationdetail .get_last_child() .add_child( OperationDetail(
String::ucompose( "rmdir(%1): ", dir_name ) + Glib::strerror( e ),
STATUS_NONE ) ) ;
- operationdetail.get_last_child().set_status( STATUS_N_A );
+ operationdetail.get_last_child().set_status( STATUS_WARNING );
}
else
{
diff --git a/src/GParted_Core.cc b/src/GParted_Core.cc
index 6e041a5..47358f6 100644
--- a/src/GParted_Core.cc
+++ b/src/GParted_Core.cc
@@ -2877,7 +2877,7 @@ bool GParted_Core::maximize_encryption( const Partition & partition, OperationDe
operationdetail.get_last_child().add_child( OperationDetail(
_("growing is not available for this encryption volume"),
STATUS_NONE, FONT_ITALIC ) );
- operationdetail.get_last_child().set_status( STATUS_N_A );
+ operationdetail.get_last_child().set_status( STATUS_WARNING );
return true;
}
@@ -2940,8 +2940,7 @@ bool GParted_Core::maximize_filesystem( const Partition & partition, OperationDe
OperationDetail( _("growing is not available for this file system"),
STATUS_NONE,
FONT_ITALIC ) ) ;
-
- operationdetail .get_last_child() .set_status( STATUS_N_A ) ;
+ operationdetail.get_last_child().set_status( STATUS_WARNING );
return true ;
}
else if ( filesystem_resize_disallowed( partition ) )
@@ -2955,7 +2954,7 @@ bool GParted_Core::maximize_filesystem( const Partition & partition, OperationDe
msg += custom_msg ;
}
operationdetail .get_last_child() .add_child( OperationDetail( msg, STATUS_NONE, FONT_ITALIC
) ) ;
- operationdetail .get_last_child() .set_status( STATUS_N_A ) ;
+ operationdetail.get_last_child().set_status( STATUS_WARNING );
return true ;
}
@@ -3365,8 +3364,7 @@ bool GParted_Core::check_repair_filesystem( const Partition & partition, Operati
OperationDetail( _("checking is not available for this file system"),
STATUS_NONE,
FONT_ITALIC ) ) ;
-
- operationdetail .get_last_child() .set_status( STATUS_N_A ) ;
+ operationdetail.get_last_child().set_status( STATUS_WARNING );
return true ;
break ;
diff --git a/src/OperationDetail.cc b/src/OperationDetail.cc
index 7bd8067..323a25a 100644
--- a/src/OperationDetail.cc
+++ b/src/OperationDetail.cc
@@ -91,8 +91,8 @@ void OperationDetail::set_status( OperationDetailStatus status )
time_start = std::time( NULL ) ;
break ;
case STATUS_ERROR:
- case STATUS_N_A:
- case STATUS_SUCCES:
+ case STATUS_WARNING:
+ case STATUS_SUCCESS:
if( time_start != -1 )
time_elapsed = std::time( NULL ) - time_start ;
break ;
@@ -108,7 +108,7 @@ void OperationDetail::set_status( OperationDetailStatus status )
void OperationDetail::set_success_and_capture_errors( bool success )
{
- set_status( success ? STATUS_SUCCES : STATUS_ERROR );
+ set_status( success ? STATUS_SUCCESS : STATUS_ERROR );
signal_capture_errors.emit( *this, success );
no_more_children = true;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]