Class: Alexandria::UI::SmartLibraryPropertiesDialogBase

Inherits:
SimpleDelegator
  • Object
show all
Includes:
Logging, GetText
Defined in:
lib/alexandria/ui/smart_library_properties_dialog_base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Logging

included, #log

Constructor Details

#initialize(parent) ⇒ SmartLibraryPropertiesDialogBase

Returns a new instance of SmartLibraryPropertiesDialogBase.



30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# File 'lib/alexandria/ui/smart_library_properties_dialog_base.rb', line 30

def initialize(parent)
  @dialog = Gtk::Dialog.new(title: "",
                            parent: parent,
                            flags: :modal,
                            buttons: [[Gtk::Stock::HELP, :help]])
  super(@dialog)

  self.window_position = :center
  self.resizable = true
  self.border_width = 4
  child.border_width = 12

  main_box = Gtk::Box.new :vertical
  main_box.border_width = 4
  main_box.spacing = 8

  child << main_box

  @smart_library_rules = []

  @rules_header_box = Gtk::Box.new :horizontal
  @rules_header_box.spacing = 2

  @rules_box = Gtk::Box.new :vertical
  @rules_box.spacing = 8
  @rules_box.border_width = 8

  scrollview = Gtk::ScrolledWindow.new
  scrollview.hscrollbar_policy = :never
  scrollview.vscrollbar_policy = :automatic
  scrollview.set_size_request(-1, 125)
  scrollview.add_with_viewport(@rules_box)

  main_box.pack_start(@rules_header_box, expand: false, fill: false)
  main_box << scrollview
  setup_calendar_widgets
end

Instance Attribute Details

#predicate_operator_ruleObject (readonly)

Returns the value of attribute predicate_operator_rule.



28
29
30
# File 'lib/alexandria/ui/smart_library_properties_dialog_base.rb', line 28

def predicate_operator_rule
  @predicate_operator_rule
end