diff --git a/ChangeLog b/ChangeLog index 87827f59..05478e61 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2008-11-14 Curtis Gedak + * include/DialogFeatures.h, + src/DialogFeatures.cc: Improved dialog readability. + - Changed title Features to File System Support. + - Renamed button Refresh to Rescan Support. + - Created expander for legend and added narrative. + - Removed columns detect and read. + - Closes GParted bugs #342682, and #353104 + * include/Utils.h, src/Utils.cc: Created method get_filesystem_software(). diff --git a/include/DialogFeatures.h b/include/DialogFeatures.h index 4a851a03..b4c096b3 100644 --- a/include/DialogFeatures.h +++ b/include/DialogFeatures.h @@ -21,6 +21,7 @@ #include "../include/Utils.h" #include +#include #include #include #include @@ -40,16 +41,18 @@ private: void show_filesystem( const FS & fs ) ; Gtk::HBox *hbox ; + Gtk::HBox *hbox2 ; + Gtk::VBox *vbox ; Gtk::Image *image ; + Gtk::Expander expander_legend ; Gtk::TreeView treeview_filesystems; Gtk::TreeRow treerow; Glib::RefPtr liststore_filesystems; + Glib::ustring str_temp ; struct treeview_filesystems_Columns : public Gtk::TreeModelColumnRecord { Gtk::TreeModelColumn filesystem; - Gtk::TreeModelColumn< Glib::RefPtr > detect ; - Gtk::TreeModelColumn< Glib::RefPtr > read ; Gtk::TreeModelColumn< Glib::RefPtr > create ; Gtk::TreeModelColumn< Glib::RefPtr > grow ; Gtk::TreeModelColumn< Glib::RefPtr > shrink ; @@ -57,12 +60,11 @@ private: Gtk::TreeModelColumn< Glib::RefPtr > copy ; Gtk::TreeModelColumn< Glib::RefPtr > check ; Gtk::TreeModelColumn< Glib::RefPtr > label ; + Gtk::TreeModelColumn software ; treeview_filesystems_Columns() { add( filesystem ); - add( detect ) ; - add( read ) ; add( create ) ; add( grow ) ; add( shrink ) ; @@ -70,6 +72,7 @@ private: add( copy ) ; add( check ) ; add( label ) ; + add( software ) ; } }; diff --git a/src/DialogFeatures.cc b/src/DialogFeatures.cc index 09e66b3d..56ddd3d8 100644 --- a/src/DialogFeatures.cc +++ b/src/DialogFeatures.cc @@ -24,15 +24,14 @@ namespace GParted DialogFeatures::DialogFeatures() { - set_title( _("Features") ) ; + set_title( _("File System Support") ) ; set_has_separator( false ) ; set_resizable( false ) ; + //treeview liststore_filesystems = Gtk::ListStore::create( treeview_filesystems_columns ); treeview_filesystems .set_model( liststore_filesystems ); - treeview_filesystems .append_column( _("Filesystem"), treeview_filesystems_columns .filesystem ); - treeview_filesystems .append_column( _("Detect"), treeview_filesystems_columns .detect ); - treeview_filesystems .append_column( _("Read"), treeview_filesystems_columns .read ); + treeview_filesystems .append_column( _("File System"), treeview_filesystems_columns .filesystem ); treeview_filesystems .append_column( _("Create"), treeview_filesystems_columns .create ); treeview_filesystems .append_column( _("Grow"), treeview_filesystems_columns .grow ); treeview_filesystems .append_column( _("Shrink"), treeview_filesystems_columns .shrink ); @@ -40,8 +39,7 @@ DialogFeatures::DialogFeatures() treeview_filesystems .append_column( _("Copy"), treeview_filesystems_columns .copy ); treeview_filesystems .append_column( _("Check"), treeview_filesystems_columns .check ); treeview_filesystems .append_column( _("Label"), treeview_filesystems_columns .label ); - //FIXME: add info about the relevant project (e.g an url to the projectpage) - //of course this url has to be selectable and (if possible) clickable + treeview_filesystems .append_column( _("Required Software"), treeview_filesystems_columns .software ); treeview_filesystems .get_selection() ->set_mode( Gtk::SELECTION_NONE ); treeview_filesystems .set_rules_hint( true ) ; @@ -49,25 +47,51 @@ DialogFeatures::DialogFeatures() hbox ->set_border_width( 6 ) ; hbox ->pack_start( treeview_filesystems ) ; get_vbox() ->pack_start( *hbox ) ; + + //file system support legend + hbox2 = manage( new Gtk::HBox( false, 6 ) ) ; + hbox2 ->set_border_width( 6 ) ; - //legend.. + hbox = manage( new Gtk::HBox() ) ; + str_temp = _("This chart shows the actions supported on file systems.") ; + str_temp += "\n" ; + str_temp += _("Not all actions are available on all file systems, in part due to the nature of file systems and limitations in the required software.") ; + hbox ->pack_start( * Utils::mk_label( str_temp, true, Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, true ), + Gtk::PACK_SHRINK ); + hbox2 -> pack_start( *hbox ) ; + + //icon legend + vbox = manage( new Gtk::VBox() ) ; hbox = manage( new Gtk::HBox() ) ; image = manage( new Gtk::Image( Gtk::Stock::APPLY, Gtk::ICON_SIZE_LARGE_TOOLBAR ) ); hbox ->pack_start( *image, Gtk::PACK_SHRINK ) ; hbox ->pack_start( * Utils::mk_label( _("Available") ), Gtk::PACK_EXPAND_WIDGET ) ; - get_vbox() ->pack_start( *hbox ) ; + vbox ->pack_start( *hbox ) ; hbox = manage( new Gtk::HBox() ) ; image = manage( new Gtk::Image( Gtk::Stock::CANCEL, Gtk::ICON_SIZE_LARGE_TOOLBAR ) ); hbox ->pack_start( *image, Gtk::PACK_SHRINK ) ; hbox ->pack_start( * Utils::mk_label( _("Not Available") ), Gtk::PACK_EXPAND_WIDGET ) ; - get_vbox() ->pack_start( *hbox ) ; + vbox ->pack_start( *hbox ) ; + hbox2 ->pack_start( *vbox ) ; + + //legend + hbox = manage( new Gtk::HBox( false, 6 ) ) ; + hbox ->set_border_width( 6 ) ; + str_temp = "" ; + str_temp += _("Legend") ; + str_temp += "" ; + expander_legend .set_label( str_temp ) ; + expander_legend .set_use_markup( true ) ; + + get_vbox() ->pack_start( expander_legend, Gtk::PACK_SHRINK ) ; + expander_legend .add( *hbox2 ) ; //initialize icons icon_yes = render_icon( Gtk::Stock::APPLY, Gtk::ICON_SIZE_LARGE_TOOLBAR ) ; icon_no = render_icon( Gtk::Stock::CANCEL, Gtk::ICON_SIZE_LARGE_TOOLBAR ) ; - add_button( Gtk::Stock::REFRESH, Gtk::RESPONSE_OK ) ; + add_button( _("Rescan Support"), Gtk::RESPONSE_OK ); add_button( Gtk::Stock::CLOSE, Gtk::RESPONSE_CLOSE ) ->grab_focus() ; show_all_children() ; } @@ -84,9 +108,7 @@ void DialogFeatures::show_filesystem( const FS & fs ) { treerow = *( liststore_filesystems ->append() ); treerow[ treeview_filesystems_columns .filesystem ] = Utils::get_filesystem_string( fs .filesystem ) ; - - treerow[ treeview_filesystems_columns .detect ] = icon_yes ; - treerow[ treeview_filesystems_columns .read ] = fs .read ? icon_yes : icon_no ; + treerow[ treeview_filesystems_columns .create ] = fs .create ? icon_yes : icon_no ; treerow[ treeview_filesystems_columns .grow ] = fs .grow ? icon_yes : icon_no ; treerow[ treeview_filesystems_columns .shrink ] = fs .shrink ? icon_yes : icon_no ; @@ -94,6 +116,8 @@ void DialogFeatures::show_filesystem( const FS & fs ) treerow[ treeview_filesystems_columns .copy ] = fs .copy ? icon_yes : icon_no ; treerow[ treeview_filesystems_columns .check ] = fs .check ? icon_yes : icon_no ; treerow[ treeview_filesystems_columns .label ] = fs .write_label ? icon_yes : icon_no ; + + treerow[ treeview_filesystems_columns .software ] = Utils::get_filesystem_software( fs .filesystem ) ; } DialogFeatures::~DialogFeatures()