remove the concept of a main context
app closes when all contexts close now
This commit is contained in:
parent
ebc98715be
commit
7fcf926426
|
@ -28,17 +28,15 @@ module Funfriend
|
|||
LOG = ::Log.for("")
|
||||
|
||||
@@contexts = [] of WindowContext
|
||||
@@main_context : WindowContext?
|
||||
|
||||
def self.should_close?
|
||||
@@main_context && @@main_context.not_nil!.window.should_close?
|
||||
@@contexts.size == 0
|
||||
end
|
||||
|
||||
def self.init_contexts
|
||||
ConfigMan.config["buddies"]["types"].as(String).split(",").each do |buddy_name|
|
||||
add_context(BuddyContext.new(make_buddy(buddy_name)))
|
||||
end
|
||||
@@main_context = @@contexts[0]
|
||||
at_exit { contexts.each &.destroy }
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue