[gparted/psusi/refactor] Fix dialog progress details view size



commit 60c028effec3bbe056b847abbb36b9a6e760f999
Author: Phillip Susi <psusi ubuntu com>
Date:   Wed Jan 30 16:23:48 2013 -0500

    Fix dialog progress details view size
    
    The details view refused to use additional space, even after the window was
    expanded, instead continuing to use the scrollbars.  Now resizing the
    window will be allowed regardless of the state of the details expander, and
    the details view will expand to use the extra space.  Also request enough
    initial width to not need a horizontal scrollbar.

 include/Dialog_Progress.h |    1 -
 src/Dialog_Progress.cc    |   13 +++----------
 2 files changed, 3 insertions(+), 11 deletions(-)
---
diff --git a/include/Dialog_Progress.h b/include/Dialog_Progress.h
index 96ad082..960979e 100644
--- a/include/Dialog_Progress.h
+++ b/include/Dialog_Progress.h
@@ -48,7 +48,6 @@ private:
 	void on_signal_update( const OperationDetail & operationdetail ) ;
 	void update_gui_elements() ;
 	void on_signal_show() ;
-	void on_expander_changed() ;
 	void on_cell_data_description( Gtk::CellRenderer * renderer, const Gtk::TreeModel::iterator & iter) ;
 	void on_cancel() ;
 	void on_save() ;
diff --git a/src/Dialog_Progress.cc b/src/Dialog_Progress.cc
index 76b070e..ff4998b 100644
--- a/src/Dialog_Progress.cc
+++ b/src/Dialog_Progress.cc
@@ -28,7 +28,6 @@ namespace GParted
 
 Dialog_Progress::Dialog_Progress( const std::vector<Operation *> & operations )
 {
-	this ->set_resizable( false ) ;
 	this ->set_has_separator( false ) ;
 	this ->set_title( _("Applying pending operations") ) ;
 	this ->operations = operations ;
@@ -42,7 +41,7 @@ Dialog_Progress::Dialog_Progress( const std::vector<Operation *> & operations )
 		Gtk::VBox* vbox(manage(new Gtk::VBox()));
 
 		vbox->set_border_width(10);
-		this->get_vbox()->pack_start(*vbox, Gtk::PACK_SHRINK);
+		this->get_vbox()->pack_start(*vbox, Gtk::PACK_EXPAND_WIDGET);
 
 		Glib::ustring str_temp(_("Depending on the number and type of operations this might take a long time."));
 		str_temp += "\n";
@@ -72,7 +71,7 @@ Dialog_Progress::Dialog_Progress( const std::vector<Operation *> & operations )
 		treeview_operations.set_model(treestore_operations);
 		treeview_operations.set_headers_visible(false);
 		treeview_operations.set_rules_hint(true);
-		treeview_operations.set_size_request(500, 250);
+		treeview_operations.set_size_request(700, 250);
 		treeview_operations.append_column("", treeview_operations_columns.operation_description);
 		treeview_operations.append_column("", treeview_operations_columns.elapsed_time);
 		treeview_operations.append_column("", treeview_operations_columns.status_icon);
@@ -95,12 +94,11 @@ Dialog_Progress::Dialog_Progress( const std::vector<Operation *> & operations )
 
 		scrolledwindow.set_shadow_type(Gtk::SHADOW_ETCHED_IN);
 		scrolledwindow.set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
+		scrolledwindow.set_size_request (700, 250);
 		scrolledwindow.add(treeview_operations);
 
 		expander_details.set_label("<b>" + Glib::ustring(_("Details")) + "</b>");
 		expander_details.set_use_markup(true);
-		expander_details.property_expanded().signal_changed().connect(
-   			sigc::mem_fun(*this, &Dialog_Progress::on_expander_changed) );
 		expander_details.add(scrolledwindow);
 
 		vbox ->pack_start(expander_details, Gtk::PACK_EXPAND_WIDGET);
@@ -282,11 +280,6 @@ void Dialog_Progress::on_signal_show()
 	} 
 }
 
-void Dialog_Progress::on_expander_changed() 
-{
-	this ->set_resizable( expander_details .get_expanded() ) ;
-}
-
 void Dialog_Progress::on_cell_data_description( Gtk::CellRenderer * renderer, const Gtk::TreeModel::iterator & iter )
 {
 	dynamic_cast<Gtk::CellRendererText *>( renderer ) ->property_markup() = 



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