From 8d412f95bd2a5f33c84cd1d8ae79d5c7646878de Mon Sep 17 00:00:00 2001 From: Bart Hakvoort Date: Sat, 18 Dec 2004 15:51:48 +0000 Subject: [PATCH] Replaced treestore with liststore. I decided i didn't need a treeview * include/Dialog_Filesystems.h, src/Dialog_Filesystems.cc: Replaced treestore with liststore. I decided i didn't need a treeview after all... * src/Dialog_About.cc: Replaced "Gnome Partition Editor based on libparted" with "Gnome Partition Editor" * src/xfs.cc: fixed small error with creation of xfs filesystems (adrighem) --- ChangeLog | 7 +++++++ include/Dialog_Filesystems.h | 4 ++-- src/Dialog_About.cc | 4 ++-- src/Dialog_Filesystems.cc | 9 +++++---- src/xfs.cc | 2 +- 5 files changed, 17 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index ebcfc39d..ef85d4ec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2004-12-18 Bart Hakvoort + + * include/Dialog_Filesystems.h, + src/Dialog_Filesystems.cc: Replaced treestore with liststore. I decided i didn't need a treeview after all... + * src/Dialog_About.cc: Replaced "Gnome Partition Editor based on libparted" with "Gnome Partition Editor" + * src/xfs.cc: fixed small error with creation of xfs filesystems (adrighem) + 2004-12-17 Bart Hakvoort * include/GParted_Core.h, diff --git a/include/Dialog_Filesystems.h b/include/Dialog_Filesystems.h index fbbc24e2..e2d89b8f 100644 --- a/include/Dialog_Filesystems.h +++ b/include/Dialog_Filesystems.h @@ -24,7 +24,7 @@ #include #include #include -#include +#include namespace GParted { @@ -42,7 +42,7 @@ private: Gtk::TreeView treeview_filesystems; Gtk::TreeRow treerow; - Glib::RefPtr treestore_filesystems; + Glib::RefPtr liststore_filesystems; struct treeview_filesystems_Columns : public Gtk::TreeModelColumnRecord { diff --git a/src/Dialog_About.cc b/src/Dialog_About.cc index 54da34f3..bdd4907b 100644 --- a/src/Dialog_About.cc +++ b/src/Dialog_About.cc @@ -24,13 +24,13 @@ Dialog_About::Dialog_About() { /*TO TRANSLATORS: this is the dialog title */ this ->set_title( _( "About GParted" ) ); - this ->set_size_request( -1, 220 ) ; + this ->set_size_request( 250, 220 ) ; this ->set_resizable( false ); this ->set_has_separator( false ) ; this ->get_vbox() ->pack_start( * mk_label( "\nlogo here ;)\n", true, false ), Gtk::PACK_SHRINK ); this ->get_vbox() ->pack_start( * mk_label( "" + (Glib::ustring) _( "GParted" ) + " " + VERSION + "", true, false ) ,Gtk::PACK_SHRINK ); - this ->get_vbox() ->pack_start( * mk_label( "\n" + (Glib::ustring) _( "Gnome Partition Editor based on libparted" ) + "\n", false, false ) ,Gtk::PACK_SHRINK ); + this ->get_vbox() ->pack_start( * mk_label( "\n" + (Glib::ustring) _( "Gnome Partition Editor" ) + "\n", false, false ) ,Gtk::PACK_SHRINK ); this ->get_vbox() ->pack_start( * mk_label( "Copyright © 2004 Bart Hakvoort", true, false ), Gtk::PACK_SHRINK ); this ->get_vbox() ->pack_start( * mk_label( "http://gparted.sourceforge.net", true, false ), Gtk::PACK_SHRINK ); diff --git a/src/Dialog_Filesystems.cc b/src/Dialog_Filesystems.cc index b0edcfd9..01d77d42 100644 --- a/src/Dialog_Filesystems.cc +++ b/src/Dialog_Filesystems.cc @@ -26,8 +26,8 @@ Dialog_Filesystems::Dialog_Filesystems( ) this ->set_has_separator( false ) ; this ->set_resizable( false ) ; - treestore_filesystems = Gtk::TreeStore::create( treeview_filesystems_columns ); - treeview_filesystems .set_model( treestore_filesystems ); + 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( _("Create"), treeview_filesystems_columns .create ); treeview_filesystems .append_column( _("Grow"), treeview_filesystems_columns .grow ); @@ -35,6 +35,7 @@ Dialog_Filesystems::Dialog_Filesystems( ) treeview_filesystems .append_column( _("Move"), treeview_filesystems_columns .move ); treeview_filesystems .append_column( _("Copy"), treeview_filesystems_columns .copy ); + treeview_filesystems .get_selection( ) ->set_mode( Gtk::SELECTION_NONE ); this ->get_vbox( ) ->pack_start( treeview_filesystems ) ; this ->add_button( Gtk::Stock::REFRESH, Gtk::RESPONSE_OK ); @@ -44,7 +45,7 @@ Dialog_Filesystems::Dialog_Filesystems( ) void Dialog_Filesystems::Load_Filesystems( const std::vector< FS > & FILESYSTEMS ) { - treestore_filesystems ->clear( ) ; + liststore_filesystems ->clear( ) ; for ( unsigned short t = 0; t < FILESYSTEMS .size( ) -1 ; t++ ) Show_Filesystem( FILESYSTEMS[ t ] ) ; @@ -52,7 +53,7 @@ void Dialog_Filesystems::Load_Filesystems( const std::vector< FS > & FILESYSTEMS void Dialog_Filesystems::Show_Filesystem( const FS & fs ) { - treerow = *( treestore_filesystems ->append( ) ); + treerow = *( liststore_filesystems ->append( ) ); treerow[ treeview_filesystems_columns .filesystem ] = fs .filesystem ; treerow[ treeview_filesystems_columns .create ] = render_icon( fs .create ? Gtk::Stock::APPLY : Gtk::Stock::CANCEL, Gtk::ICON_SIZE_MENU ); treerow[ treeview_filesystems_columns .grow ] = render_icon( fs .grow ? Gtk::Stock::APPLY : Gtk::Stock::CANCEL, Gtk::ICON_SIZE_MENU ); diff --git a/src/xfs.cc b/src/xfs.cc index 5877b87a..9bd38a56 100644 --- a/src/xfs.cc +++ b/src/xfs.cc @@ -90,7 +90,7 @@ void xfs::Set_Used_Sectors( Partition & partition ) bool xfs::Create( const Glib::ustring device_path, const Partition & new_partition ) { - return ! Execute_Command( "mkfs.xfs " + new_partition .partition ) ; + return ! Execute_Command( "mkfs.xfs -f " + new_partition .partition ) ; } bool xfs::Resize( const Partition & partition_new, bool fill_partition )