Class: TopinambourPreferences
- Inherits:
-
Gtk::Window
- Object
- Gtk::Window
- TopinambourPreferences
- Defined in:
- lib/preferences.rb
Overview
Copyright 2016-2018 Cedric LE MOIGNE, [email protected] This file is part of Topinambour.
Topinambour is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.
Topinambour is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with Topinambour. If not, see <www.gnu.org/licenses/>.
Instance Attribute Summary collapse
-
#settings ⇒ Object
readonly
Returns the value of attribute settings.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(parent) ⇒ TopinambourPreferences
constructor
A new instance of TopinambourPreferences.
Constructor Details
#initialize(parent) ⇒ TopinambourPreferences
Returns a new instance of TopinambourPreferences.
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
# File 'lib/preferences.rb', line 99 def initialize(parent) super(:type => :toplevel) set_transient_for(parent) @parent = parent signal_connect "delete-event" do || .destroy @parent.terminal.grab_focus end @settings = @parent.application.settings end |
Instance Attribute Details
#settings ⇒ Object (readonly)
Returns the value of attribute settings.
98 99 100 |
# File 'lib/preferences.rb', line 98 def settings @settings end |
Class Method Details
.init ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/preferences.rb', line 20 def init resource_file = "/com/github/cedlemo/topinambour/prefs-dialog.ui" set_template(:resource => resource_file) %w(width_spin height_spin shell_entry audible_bell_switch allow_bold_switch scroll_on_output_switch scroll_on_keystroke_switch rewrap_on_resize_switch mouse_autohide_switch cursor_shape_sel cursor_blink_mode_sel backspace_binding_sel delete_binding_sel css_chooser_button use_custom_css_switch).each do || bind_template_child() end set_connect_func { |name| method(name) } end |