[gparted] Add padding to progress dialog window
- From: Curtis Gedak <gedakc src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gparted] Add padding to progress dialog window
- Date: Thu, 22 Oct 2009 16:30:56 +0000 (UTC)
commit 0af42af3d0b2515f09895149ce3e689799db8693
Author: Curtis Gedak <gedakc gmail com>
Date: Thu Oct 22 10:19:47 2009 -0600
Add padding to progress dialog window
include/Dialog_Progress.h | 1 +
src/Dialog_Progress.cc | 27 +++++++++++++++------------
2 files changed, 16 insertions(+), 12 deletions(-)
---
diff --git a/include/Dialog_Progress.h b/include/Dialog_Progress.h
index 361b31c..fda6a6b 100644
--- a/include/Dialog_Progress.h
+++ b/include/Dialog_Progress.h
@@ -57,6 +57,7 @@ private:
void on_response( int response_id ) ;
bool on_delete_event( GdkEventAny * event ) ;
+ Gtk::VBox *vbox ;
Gtk::Label label_current ;
Gtk::Label label_current_sub ;
Gtk::ProgressBar progressbar_all, progressbar_current ;
diff --git a/src/Dialog_Progress.cc b/src/Dialog_Progress.cc
index 5b6ca1a..d09a3ca 100644
--- a/src/Dialog_Progress.cc
+++ b/src/Dialog_Progress.cc
@@ -39,24 +39,27 @@ Dialog_Progress::Dialog_Progress( const std::vector<Operation *> & operations )
dispatcher_update_gui_elements .connect(
sigc::mem_fun( this, &Dialog_Progress::dispatcher_on_update_gui_elements ) ) ;
-
- Glib::ustring str_temp = "\n";
- str_temp += _("Depending on the amount and type of operations this might take a long time.") ;
+
+ vbox = manage( new Gtk::VBox() ) ;
+ vbox ->set_border_width( 10 ) ;
+ this ->get_vbox() ->pack_start( *vbox, Gtk::PACK_SHRINK ) ;
+
+ Glib::ustring str_temp = _("Depending on the amount and type of operations this might take a long time.") ;
str_temp += "\n";
- this ->get_vbox() ->pack_start( * Utils::mk_label( str_temp ), Gtk::PACK_SHRINK );
-
+ vbox ->pack_start( * Utils::mk_label( str_temp ), Gtk::PACK_SHRINK );
+
label_current .set_alignment( Gtk::ALIGN_LEFT );
- this ->get_vbox() ->pack_start( label_current, Gtk::PACK_SHRINK ) ;
+ vbox ->pack_start( label_current, Gtk::PACK_SHRINK ) ;
progressbar_current .set_pulse_step( 0.01 ) ;
- this->get_vbox() ->pack_start( progressbar_current, Gtk::PACK_SHRINK );
+ vbox ->pack_start( progressbar_current, Gtk::PACK_SHRINK );
label_current_sub .set_alignment( Gtk::ALIGN_LEFT );
- this ->get_vbox() ->pack_start( label_current_sub, Gtk::PACK_SHRINK );
+ vbox ->pack_start( label_current_sub, Gtk::PACK_SHRINK );
- this ->get_vbox() ->pack_start( * Utils::mk_label( "<b>" + Glib::ustring( _("Completed Operations:") ) + "</b>" ),
+ vbox ->pack_start( * Utils::mk_label( "<b>" + Glib::ustring( _("Completed Operations:") ) + "</b>" ),
Gtk::PACK_SHRINK );
- this ->get_vbox() ->pack_start( progressbar_all, Gtk::PACK_SHRINK );
+ vbox ->pack_start( progressbar_all, Gtk::PACK_SHRINK );
//create some icons here, instead of recreating them every time
icon_execute = render_icon( Gtk::Stock::EXECUTE, Gtk::ICON_SIZE_LARGE_TOOLBAR ) ;
@@ -100,8 +103,8 @@ Dialog_Progress::Dialog_Progress( const std::vector<Operation *> & operations )
sigc::mem_fun(*this, &Dialog_Progress::on_expander_changed) );
expander_details .add( scrolledwindow ) ;
- this ->get_vbox() ->pack_start( expander_details, Gtk::PACK_EXPAND_WIDGET ) ;
- this ->get_vbox() ->set_spacing( 5 ) ;
+ vbox ->pack_start( expander_details, Gtk::PACK_EXPAND_WIDGET ) ;
+ vbox ->set_spacing( 5 ) ;
this ->add_button( Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL ) ;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]