Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

message dialog

  • Loading branch information...
commit 2a0558cfa6c24d59c60f2c63eacac5c45e791111 1 parent 0702302
andrea@VEGETA authored
2  Rakefile
View
@@ -9,7 +9,7 @@ require 'rake/testtask'
spec = Gem::Specification.new do |s|
s.name = 'freightrain'
- s.version = '0.5.10'
+ s.version = '0.5.11'
s.add_dependency('require_all', '>= 1.1.0')
s.add_dependency('needle', '>= 1.3.0')
s.has_rdoc = false
19 lib/extensions/gtk/dialog_helper.rb
View
@@ -43,6 +43,25 @@ def yes_no_dialog(description, title = "Warning!", secondary_text = "It will not
end
+ def message_dialog(description, secondary_text = "", title = "Information")
+ raise "toplevel not implemented. If you want to use " +
+ "DialogHelper inside your class you should provide " +
+ "a toplevel widget via the toplevel method" unless respond_to? :toplevel
+ result = false
+ dialog = Gtk::MessageDialog.new(
+ toplevel,
+ Gtk::Dialog::MODAL,
+ Gtk::MessageDialog::INFO,
+ Gtk::MessageDialog::BUTTONS_OK,
+ description)
+ dialog.title = title
+ dialog.secondary_text = secondary_text
+ dialog.run
+ dialog.destroy
+ return result
+
+ end
+
end #DialogHelper
end #Toolkit
1  lib/extensions/gtk/widgets/gtk_treeview.rb
View
@@ -16,6 +16,7 @@ def create_column(column_definition)
def bind(options)
if options[:property].to_sym == :elements
+ options[:force] = true
columns = normalize_column_bindings(options[:columns])
@paths = get_paths(columns)
columns.each do |column|
6 lib/freightrain/binding/freight_binding.rb
View
@@ -28,9 +28,9 @@ def update()
@cache = value
end
rescue Exception => ex
-# p "#{@widget.name} - update"
-# p ex.message
-# p @path
+ p "#{@widget.name} - update"
+ p ex.message
+ p @path
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.