Class: Groonga::DatabaseViewerGtk::Window
- Inherits:
-
Gtk::Window
- Object
- Gtk::Window
- Groonga::DatabaseViewerGtk::Window
- Defined in:
- lib/groonga/database-viewer-gtk/window.rb
Constant Summary collapse
- RAW_QUERY_MODE =
"--query"
Instance Method Summary collapse
-
#initialize(db_path, options = {}) ⇒ Window
constructor
A new instance of Window.
- #run ⇒ Object
Constructor Details
#initialize(db_path, options = {}) ⇒ Window
Returns a new instance of Window.
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/groonga/database-viewer-gtk/window.rb', line 28 def initialize(db_path, ={}) super() self.title = db_path set_default_size(640, 480) @grn_database = Database.open(db_path) signal_connect("destroy") do @grn_database.close unless @grn_database.closed? Gtk.main_quit end vbox = Gtk::VBox.new add(vbox) search_hbox = create_search_hbox vbox.pack_start(search_hbox, false, false, 4) @notebook = create_notebook() vbox.pack_start(@notebook, true, true, 0) label = Gtk::Label.new label.text = "Double Click or Press Return: Copy to Clipboard" vbox.pack_end(label, false, false, 0) end |
Instance Method Details
#run ⇒ Object
52 53 54 55 |
# File 'lib/groonga/database-viewer-gtk/window.rb', line 52 def run show_all Gtk.main end |