src/Tools/jEdit/src/info_dockable.scala
changeset 56715 52125652e82a
parent 56662 f373fb77e0a4
child 56883 38c6b70e5e53
     1.1 --- a/src/Tools/jEdit/src/info_dockable.scala	Fri Apr 25 12:27:18 2014 +0200
     1.2 +++ b/src/Tools/jEdit/src/info_dockable.scala	Fri Apr 25 12:51:08 2014 +0200
     1.3 @@ -9,8 +9,6 @@
     1.4  
     1.5  import isabelle._
     1.6  
     1.7 -import scala.actors.Actor._
     1.8 -
     1.9  import scala.swing.Button
    1.10  import scala.swing.event.ButtonClicked
    1.11  
    1.12 @@ -97,30 +95,24 @@
    1.13    add(controls.peer, BorderLayout.NORTH)
    1.14  
    1.15  
    1.16 -  /* main actor */
    1.17 +  /* main */
    1.18  
    1.19 -  private val main_actor = actor {
    1.20 -    loop {
    1.21 -      react {
    1.22 -        case _: Session.Global_Options =>
    1.23 -          Swing_Thread.later { handle_resize() }
    1.24 -
    1.25 -        case bad => System.err.println("Info_Dockable: ignoring bad message " + bad)
    1.26 -      }
    1.27 +  private val main =
    1.28 +    Session.Consumer[Session.Global_Options](getClass.getName) {
    1.29 +      case _: Session.Global_Options => Swing_Thread.later { handle_resize() }
    1.30      }
    1.31 -  }
    1.32  
    1.33    override def init()
    1.34    {
    1.35      GUI.parent_window(this).map(_.addWindowFocusListener(window_focus_listener))
    1.36 -    PIDE.session.global_options += main_actor
    1.37 +    PIDE.session.global_options += main
    1.38      handle_resize()
    1.39    }
    1.40  
    1.41    override def exit()
    1.42    {
    1.43      GUI.parent_window(this).map(_.removeWindowFocusListener(window_focus_listener))
    1.44 -    PIDE.session.global_options -= main_actor
    1.45 +    PIDE.session.global_options -= main
    1.46      delay_resize.revoke()
    1.47    }
    1.48  }