equal
deleted
inserted
replaced
47 def load() { selected = stored } |
47 def load() { selected = stored } |
48 load() |
48 load() |
49 } |
49 } |
50 } |
50 } |
51 |
51 |
52 class JEdit_Options extends Options_Variable |
52 class JEdit_Options(init_options: Options) extends Options_Variable(init_options) |
53 { |
53 { |
54 def color_value(s: String): Color = Color_Value(string(s)) |
54 def color_value(s: String): Color = Color_Value(string(s)) |
55 |
55 |
56 def make_color_component(opt: Options.Opt): Option_Component = |
56 def make_color_component(opt: Options.Opt): Option_Component = |
57 { |
57 { |
94 if (default_font != null) font = default_font |
94 if (default_font != null) font = default_font |
95 name = opt_name |
95 name = opt_name |
96 val title = opt_title |
96 val title = opt_title |
97 def load = text = value.check_name(opt_name).value |
97 def load = text = value.check_name(opt_name).value |
98 def save = |
98 def save = |
99 try { store(value + (opt_name, text)) } |
99 try { JEdit_Options.this += (opt_name, text) } |
100 catch { |
100 catch { |
101 case ERROR(msg) => |
101 case ERROR(msg) => |
102 GUI.error_dialog(this.peer, "Failed to update options", |
102 GUI.error_dialog(this.peer, "Failed to update options", |
103 GUI.scrollable_text(msg)) |
103 GUI.scrollable_text(msg)) |
104 } |
104 } |