Class: Kelp::ProgressDialog
Instance Method Summary collapse
- #fraction ⇒ Object
- #fraction=(frac) ⇒ Object
-
#initialize(title) ⇒ ProgressDialog
constructor
A new instance of ProgressDialog.
- #message ⇒ Object
- #message=(msg) ⇒ Object
- #pulse ⇒ Object
Constructor Details
#initialize(title) ⇒ ProgressDialog
Returns a new instance of ProgressDialog.
83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/sh_util.rb', line 83 def initialize(title) super(title, nil, Dialog::MODAL, [Stock::CANCEL, Dialog::RESPONSE_NONE]) @lbl_message = Label.new("Please wait") @lbl_message.ellipsize = Pango::Layout::ELLIPSIZE_START vbox.pack_start @lbl_message, false, false, 8 @progress = ProgressBar.new vbox.pack_start @progress, false, false, 8 self.width_request = 300 vbox.show_all end |
Instance Method Details
#fraction ⇒ Object
109 110 111 |
# File 'lib/sh_util.rb', line 109 def fraction @progress.fraction end |
#fraction=(frac) ⇒ Object
105 106 107 |
# File 'lib/sh_util.rb', line 105 def fraction=(frac) @progress.fraction = frac end |
#message ⇒ Object
101 102 103 |
# File 'lib/sh_util.rb', line 101 def @lbl_message.text end |
#message=(msg) ⇒ Object
97 98 99 |
# File 'lib/sh_util.rb', line 97 def (msg) @lbl_message.text = msg end |
#pulse ⇒ Object
113 114 115 |
# File 'lib/sh_util.rb', line 113 def pulse @progress.pulse end |