[gparted] Add support for custom text strings depending on the filesystem



commit 8735227dd7def467dad315097cb783f99bef2056
Author: Rogier Goossens <goossens rogier gmail com>
Date:   Fri Jan 27 11:14:53 2012 -0700

    Add support for custom text strings depending on the filesystem
    
    Part 2 of 4 to provide new UUID support for NTFS.
    
    See Bug #667278 - Add support for setting UUID

 include/FileSystem.h |    3 +++
 include/Utils.h      |    5 +++++
 src/FileSystem.cc    |   10 ++++++++++
 3 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/include/FileSystem.h b/include/FileSystem.h
index b681c35..2202402 100644
--- a/include/FileSystem.h
+++ b/include/FileSystem.h
@@ -34,6 +34,9 @@ public:
 	FileSystem() ;
 	virtual ~FileSystem() {}
 
+	virtual const Glib::ustring get_custom_text( CUSTOM_TEXT ttype, int index = 0 ) ;
+	static const Glib::ustring get_generic_text( CUSTOM_TEXT ttype, int index = 0 ) ;
+
 	virtual FS get_filesystem_support() = 0 ;
 	virtual void set_used_sectors( Partition & partition ) = 0 ;
 	virtual void read_label( Partition & partition ) = 0 ;
diff --git a/include/Utils.h b/include/Utils.h
index 0f5e63c..ef54777 100644
--- a/include/Utils.h
+++ b/include/Utils.h
@@ -91,6 +91,11 @@ enum SIZE_UNIT
 	UNIT_TIB	= 5
 } ;
 
+enum CUSTOM_TEXT
+{
+	CTEXT_NONE,
+} ;
+
 //struct to store file system information
 struct FS
 {
diff --git a/src/FileSystem.cc b/src/FileSystem.cc
index fe5ea5a..d196155 100644
--- a/src/FileSystem.cc
+++ b/src/FileSystem.cc
@@ -27,6 +27,16 @@ FileSystem::FileSystem()
 {
 }
 
+const Glib::ustring FileSystem::get_custom_text( CUSTOM_TEXT ttype, int index )
+{
+	return get_generic_text( ttype, index ) ;
+}
+
+const Glib::ustring FileSystem::get_generic_text( CUSTOM_TEXT ttype, int index )
+{
+	return "" ;
+}
+
 int FileSystem::execute_command( const Glib::ustring & command, OperationDetail & operationdetail ) 
 {
 	operationdetail .add_child( OperationDetail( command, STATUS_NONE, FONT_BOLD_ITALIC ) ) ;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]