Re: [Sugar-devel] [PATCH sugar] Frame: new behavior for revealing/hiding the Frame with the mouse

2012-08-20 Thread Manuel Quiñones
2012/8/17 Simon Schampijer si...@schampijer.de:
 On 08/17/2012 12:48 AM, Manuel Quiñones wrote:

 I've tested an earlier patch for this and now I reviewed it.  This is
 a much more solid interaction with the frame, and less error prone.

 All looks good.  Please commit.


 Thanks Manuel for testing and the review. I have fixed the 'cycling through
 activities' in v2 of the patch.

 Something we have to look at as a follow-up would be the Frame 'animation'.
 When you switch between the Home View and the Neighborhood View for example
 you see the Frame disappear and then the toolbar is drawn. And in general
 the Frame animation should really be smoother...

Yes, and that makes me think, why not leave the frame open while
switching zoom views?  I think that would be better.

-- 
.. manuq ..
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH sugar] Frame: new behavior for revealing/hiding the Frame with the mouse

2012-08-20 Thread Manuel Quiñones
2012/8/17 Simon Schampijer si...@schampijer.de

 After discussing with Gary I prepared this patch to change the
 interaction with the Frame in the following manner:

 - you can reveal the Frame by going with the cursor in one of the
   hot corners

 - you can hide the Frame by going with the cursor in one of the
   hot corners (and the Frame is visible)

 - the Frame is not hidden on mouse out (leaving the Frame)

 - (as before) you can hide/reveal the Frame with the designated keys

 - the Frame is hidden when you switch between activities
   (todo: hide as well when resume in the Palette is clicked)

 - the Frame is hidden when a zoom level is selected

As I suggested, maybe leave the frame open whle switching zoom views?

 - (as before) you can use 'alt-tab' to cycle through the
   running activities

 - drag  drop is currently not working, SL #3811

 v2: fixed cycling through running activities

Tested, works as expected.

Another thing to think is the frame in relation with the Control
Panel.  I think the frame should be hidden when the control panel is
opened.

 Signed-off-by: Simon Schampijer si...@laptop.org

 ---
  src/jarabe/frame/activitiestray.py |  2 ++
  src/jarabe/frame/frame.py  | 53
 ++
  src/jarabe/frame/zoomtoolbar.py|  6 +
  src/jarabe/view/tabbinghandler.py  |  2 +-
  4 files changed, 22 insertions(+), 41 deletions(-)

 diff --git a/src/jarabe/frame/activitiestray.py
 b/src/jarabe/frame/activitiestray.py
 index 9590bce..d386b3b 100644
 --- a/src/jarabe/frame/activitiestray.py
 +++ b/src/jarabe/frame/activitiestray.py
 @@ -287,6 +287,8 @@ class ActivitiesTray(HTray):
  window = home_activity.get_window()
  if window:
  window.activate(gtk.get_current_event_time())
 +frame = jarabe.frame.get_view()
 +frame.hide()

  def __remove_invite_cb(self, icon, invite):
  self._invites.remove_invite(invite)
 diff --git a/src/jarabe/frame/frame.py b/src/jarabe/frame/frame.py
 index 7407e18..ee112a1 100644
 --- a/src/jarabe/frame/frame.py
 +++ b/src/jarabe/frame/frame.py
 @@ -57,29 +57,12 @@ class _Animation(animator.Animation):
  class _MouseListener(object):
  def __init__(self, frame):
  self._frame = frame
 -self._hide_sid = 0

  def mouse_enter(self):
 -self._show_frame()
 -
 -def mouse_leave(self):
 -if self._frame.mode == Frame.MODE_MOUSE:
 -self._hide_frame()
 -
 -def _show_frame(self):
 -if self._hide_sid != 0:
 -gobject.source_remove(self._hide_sid)
 -self._frame.show(Frame.MODE_MOUSE)
 -
 -def _hide_frame_timeout_cb(self):
 -self._frame.hide()
 -return False
 -
 -def _hide_frame(self):
 -if self._hide_sid != 0:
 -gobject.source_remove(self._hide_sid)
 -self._hide_sid = gobject.timeout_add(
 -  _FRAME_HIDING_DELAY, self._hide_frame_timeout_cb)
 +if self._frame.visible:
 +self._frame.hide()
 +else:
 +self._frame.show()


  class _KeyListener(object):
 @@ -88,23 +71,16 @@ class _KeyListener(object):

  def key_press(self):
  if self._frame.visible:
 -if self._frame.mode == Frame.MODE_KEYBOARD:
 -self._frame.hide()
 +self._frame.hide()
  else:
 -self._frame.show(Frame.MODE_KEYBOARD)
 +self._frame.show()


  class Frame(object):
 -MODE_MOUSE = 0
 -MODE_KEYBOARD = 1
 -MODE_NON_INTERACTIVE = 2
 -
  def __init__(self):
  logging.debug('STARTUP: Loading the frame')
 -self.mode = None

  self._palette_group = palettegroup.get_group('frame')
 -self._palette_group.connect('popdown',
 self._palette_group_popdown_cb)

  self._left_panel = None
  self._right_panel = None
 @@ -143,6 +119,9 @@ class Frame(object):
  visible = property(is_visible, None)

  def hide(self):
 +if not self.visible:
 +return
 +
  if self._animator:
  self._animator.stop()

 @@ -150,16 +129,12 @@ class Frame(object):
  self._animator.add(_Animation(self, 0.0))
  self._animator.start()

 -self.mode = None
 -
 -def show(self, mode):
 +def show(self):
  if self.visible:
  return
  if self._animator:
  self._animator.stop()

 -self.mode = mode
 -
  self._animator = animator.Animator(0.5)
  self._animator.add(_Animation(self, 1.0))
  self._animator.start()
 @@ -180,6 +155,7 @@ class Frame(object):
  zoom_toolbar = ZoomToolbar()
  panel.append(zoom_toolbar, expand=False)
  zoom_toolbar.show()
 +zoom_toolbar.connect('level-clicked', self._level_clicked_cb)

  activities_tray = ActivitiesTray()
  panel.append(activities_tray)
 @@ -208,7 +184,6 @@ class Frame(object):
   

Re: [Sugar-devel] [PATCH sugar] Frame: new behavior for revealing/hiding the Frame with the mouse

2012-08-20 Thread Simon Schampijer

On 08/20/2012 04:44 PM, Manuel Quiñones wrote:

2012/8/17 Simon Schampijer si...@schampijer.de:

On 08/17/2012 12:48 AM, Manuel Quiñones wrote:


I've tested an earlier patch for this and now I reviewed it.  This is
a much more solid interaction with the frame, and less error prone.

All looks good.  Please commit.



Thanks Manuel for testing and the review. I have fixed the 'cycling through
activities' in v2 of the patch.

Something we have to look at as a follow-up would be the Frame 'animation'.
When you switch between the Home View and the Neighborhood View for example
you see the Frame disappear and then the toolbar is drawn. And in general
the Frame animation should really be smoother...


Yes, and that makes me think, why not leave the frame open while
switching zoom views?  I think that would be better.



The idea is to have the upper Frame section (Views and Activities) 
behave the same. The primary action for those should be switching 
between them. But after I switched the Frame should be away so I can 
interact with the new Zoom level/Activity I am in.


Simon
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH sugar] Frame: new behavior for revealing/hiding the Frame with the mouse

2012-08-20 Thread Manuel Quiñones
2012/8/20 Simon Schampijer si...@schampijer.de:
 On 08/20/2012 04:44 PM, Manuel Quiñones wrote:

 2012/8/17 Simon Schampijer si...@schampijer.de:

 On 08/17/2012 12:48 AM, Manuel Quiñones wrote:


 I've tested an earlier patch for this and now I reviewed it.  This is
 a much more solid interaction with the frame, and less error prone.

 All looks good.  Please commit.



 Thanks Manuel for testing and the review. I have fixed the 'cycling
 through
 activities' in v2 of the patch.

 Something we have to look at as a follow-up would be the Frame
 'animation'.
 When you switch between the Home View and the Neighborhood View for
 example
 you see the Frame disappear and then the toolbar is drawn. And in general
 the Frame animation should really be smoother...


 Yes, and that makes me think, why not leave the frame open while
 switching zoom views?  I think that would be better.


 The idea is to have the upper Frame section (Views and Activities) behave
 the same. The primary action for those should be switching between them. But
 after I switched the Frame should be away so I can interact with the new
 Zoom level/Activity I am in.

I understand.  So yes, for consistency's sake is ok.  We should fix
the toolbar appearence then.


-- 
.. manuq ..
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH sugar] Frame: new behavior for revealing/hiding the Frame with the mouse

2012-08-20 Thread Simon Schampijer

On 08/20/2012 05:06 PM, Manuel Quiñones wrote:

2012/8/20 Simon Schampijer si...@schampijer.de:

On 08/20/2012 04:44 PM, Manuel Quiñones wrote:


2012/8/17 Simon Schampijer si...@schampijer.de:


On 08/17/2012 12:48 AM, Manuel Quiñones wrote:



I've tested an earlier patch for this and now I reviewed it.  This is
a much more solid interaction with the frame, and less error prone.

All looks good.  Please commit.




Thanks Manuel for testing and the review. I have fixed the 'cycling
through
activities' in v2 of the patch.

Something we have to look at as a follow-up would be the Frame
'animation'.
When you switch between the Home View and the Neighborhood View for
example
you see the Frame disappear and then the toolbar is drawn. And in general
the Frame animation should really be smoother...



Yes, and that makes me think, why not leave the frame open while
switching zoom views?  I think that would be better.



The idea is to have the upper Frame section (Views and Activities) behave
the same. The primary action for those should be switching between them. But
after I switched the Frame should be away so I can interact with the new
Zoom level/Activity I am in.


I understand.  So yes, for consistency's sake is ok.  We should fix
the toolbar appearence then.


Thanks for all the feedback on this one Manuel,
pushed this one as 238338d4b5d6a065eb81bd118a8c0b7ca83717bf

About the Frame behavior in regards to the CP, I remember we had some 
discussions on that already, maybe Gary can chime in.


Regards,
   Simon
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] [PATCH sugar] Frame: new behavior for revealing/hiding the Frame with the mouse

2012-08-17 Thread Simon Schampijer
After discussing with Gary I prepared this patch to change the
interaction with the Frame in the following manner:

- you can reveal the Frame by going with the cursor in one of the
  hot corners

- you can hide the Frame by going with the cursor in one of the
  hot corners (and the Frame is visible)

- the Frame is not hidden on mouse out (leaving the Frame)

- (as before) you can hide/reveal the Frame with the designated keys

- the Frame is hidden when you switch between activities
  (todo: hide as well when resume in the Palette is clicked)

- the Frame is hidden when a zoom level is selected

- (as before) you can use 'alt-tab' to cycle through the
  running activities

- drag  drop is currently not working, SL #3811

v2: fixed cycling through running activities

Signed-off-by: Simon Schampijer si...@laptop.org
---
 src/jarabe/frame/activitiestray.py |  2 ++
 src/jarabe/frame/frame.py  | 53 ++
 src/jarabe/frame/zoomtoolbar.py|  6 +
 src/jarabe/view/tabbinghandler.py  |  2 +-
 4 files changed, 22 insertions(+), 41 deletions(-)

diff --git a/src/jarabe/frame/activitiestray.py 
b/src/jarabe/frame/activitiestray.py
index 9590bce..d386b3b 100644
--- a/src/jarabe/frame/activitiestray.py
+++ b/src/jarabe/frame/activitiestray.py
@@ -287,6 +287,8 @@ class ActivitiesTray(HTray):
 window = home_activity.get_window()
 if window:
 window.activate(gtk.get_current_event_time())
+frame = jarabe.frame.get_view()
+frame.hide()
 
 def __remove_invite_cb(self, icon, invite):
 self._invites.remove_invite(invite)
diff --git a/src/jarabe/frame/frame.py b/src/jarabe/frame/frame.py
index 7407e18..ee112a1 100644
--- a/src/jarabe/frame/frame.py
+++ b/src/jarabe/frame/frame.py
@@ -57,29 +57,12 @@ class _Animation(animator.Animation):
 class _MouseListener(object):
 def __init__(self, frame):
 self._frame = frame
-self._hide_sid = 0
 
 def mouse_enter(self):
-self._show_frame()
-
-def mouse_leave(self):
-if self._frame.mode == Frame.MODE_MOUSE:
-self._hide_frame()
-
-def _show_frame(self):
-if self._hide_sid != 0:
-gobject.source_remove(self._hide_sid)
-self._frame.show(Frame.MODE_MOUSE)
-
-def _hide_frame_timeout_cb(self):
-self._frame.hide()
-return False
-
-def _hide_frame(self):
-if self._hide_sid != 0:
-gobject.source_remove(self._hide_sid)
-self._hide_sid = gobject.timeout_add(
-  _FRAME_HIDING_DELAY, self._hide_frame_timeout_cb)
+if self._frame.visible:
+self._frame.hide()
+else:
+self._frame.show()
 
 
 class _KeyListener(object):
@@ -88,23 +71,16 @@ class _KeyListener(object):
 
 def key_press(self):
 if self._frame.visible:
-if self._frame.mode == Frame.MODE_KEYBOARD:
-self._frame.hide()
+self._frame.hide()
 else:
-self._frame.show(Frame.MODE_KEYBOARD)
+self._frame.show()
 
 
 class Frame(object):
-MODE_MOUSE = 0
-MODE_KEYBOARD = 1
-MODE_NON_INTERACTIVE = 2
-
 def __init__(self):
 logging.debug('STARTUP: Loading the frame')
-self.mode = None
 
 self._palette_group = palettegroup.get_group('frame')
-self._palette_group.connect('popdown', self._palette_group_popdown_cb)
 
 self._left_panel = None
 self._right_panel = None
@@ -143,6 +119,9 @@ class Frame(object):
 visible = property(is_visible, None)
 
 def hide(self):
+if not self.visible:
+return
+
 if self._animator:
 self._animator.stop()
 
@@ -150,16 +129,12 @@ class Frame(object):
 self._animator.add(_Animation(self, 0.0))
 self._animator.start()
 
-self.mode = None
-
-def show(self, mode):
+def show(self):
 if self.visible:
 return
 if self._animator:
 self._animator.stop()
 
-self.mode = mode
-
 self._animator = animator.Animator(0.5)
 self._animator.add(_Animation(self, 1.0))
 self._animator.start()
@@ -180,6 +155,7 @@ class Frame(object):
 zoom_toolbar = ZoomToolbar()
 panel.append(zoom_toolbar, expand=False)
 zoom_toolbar.show()
+zoom_toolbar.connect('level-clicked', self._level_clicked_cb)
 
 activities_tray = ActivitiesTray()
 panel.append(activities_tray)
@@ -208,7 +184,6 @@ class Frame(object):
 def _create_left_panel(self):
 panel = ClipboardPanelWindow(self, gtk.POS_LEFT)
 
-self._connect_to_panel(panel)
 panel.connect('drag-motion', self._drag_motion_cb)
 panel.connect('drag-leave', self._drag_leave_cb)
 
@@ -216,7 +191,6 @@ class Frame(object):
 
 def _create_panel(self, orientation):
 panel = FrameWindow(orientation)
-

Re: [Sugar-devel] [PATCH sugar] Frame: new behavior for revealing/hiding the Frame with the mouse

2012-08-17 Thread Simon Schampijer

On 08/17/2012 12:48 AM, Manuel Quiñones wrote:

I've tested an earlier patch for this and now I reviewed it.  This is
a much more solid interaction with the frame, and less error prone.

All looks good.  Please commit.


Thanks Manuel for testing and the review. I have fixed the 'cycling 
through activities' in v2 of the patch.


Something we have to look at as a follow-up would be the Frame 
'animation'. When you switch between the Home View and the Neighborhood 
View for example you see the Frame disappear and then the toolbar is 
drawn. And in general the Frame animation should really be smoother...


Regards,
   Simon

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] [PATCH sugar] Frame: new behavior for revealing/hiding the Frame with the mouse

2012-08-16 Thread Simon Schampijer
After discussing with Gary I prepared this patch to change the
interaction with the Frame in the following manner:

- you can reveal the Frame by going with the cursor in one of the
  hot corners

- you can hide the Frame by going with the cursor in one of the
  hot corners (and the Frame is visible)

- the Frame is not hidden on mouse out (leaving the Frame)

- (as before) you can hide/reveal the Frame with the designated keys

- the Frame is hidden when you switch between activities
  (todo: hide as well when resume in the Palette is clicked)

- the Frame is hidden when a zoom level is selected

- drag  drop is currently not working, SL #3811

Signed-off-by: Simon Schampijer si...@laptop.org
---
 src/jarabe/frame/activitiestray.py |  2 ++
 src/jarabe/frame/frame.py  | 51 ++
 src/jarabe/frame/zoomtoolbar.py|  6 +
 3 files changed, 21 insertions(+), 38 deletions(-)

diff --git a/src/jarabe/frame/activitiestray.py 
b/src/jarabe/frame/activitiestray.py
index 9590bce..d386b3b 100644
--- a/src/jarabe/frame/activitiestray.py
+++ b/src/jarabe/frame/activitiestray.py
@@ -287,6 +287,8 @@ class ActivitiesTray(HTray):
 window = home_activity.get_window()
 if window:
 window.activate(gtk.get_current_event_time())
+frame = jarabe.frame.get_view()
+frame.hide()
 
 def __remove_invite_cb(self, icon, invite):
 self._invites.remove_invite(invite)
diff --git a/src/jarabe/frame/frame.py b/src/jarabe/frame/frame.py
index 7407e18..9c0129f 100644
--- a/src/jarabe/frame/frame.py
+++ b/src/jarabe/frame/frame.py
@@ -57,29 +57,12 @@ class _Animation(animator.Animation):
 class _MouseListener(object):
 def __init__(self, frame):
 self._frame = frame
-self._hide_sid = 0
 
 def mouse_enter(self):
-self._show_frame()
-
-def mouse_leave(self):
-if self._frame.mode == Frame.MODE_MOUSE:
-self._hide_frame()
-
-def _show_frame(self):
-if self._hide_sid != 0:
-gobject.source_remove(self._hide_sid)
-self._frame.show(Frame.MODE_MOUSE)
-
-def _hide_frame_timeout_cb(self):
-self._frame.hide()
-return False
-
-def _hide_frame(self):
-if self._hide_sid != 0:
-gobject.source_remove(self._hide_sid)
-self._hide_sid = gobject.timeout_add(
-  _FRAME_HIDING_DELAY, self._hide_frame_timeout_cb)
+if self._frame.visible:
+self._frame.hide()
+else:
+self._frame.show()
 
 
 class _KeyListener(object):
@@ -88,23 +71,16 @@ class _KeyListener(object):
 
 def key_press(self):
 if self._frame.visible:
-if self._frame.mode == Frame.MODE_KEYBOARD:
-self._frame.hide()
+self._frame.hide()
 else:
-self._frame.show(Frame.MODE_KEYBOARD)
+self._frame.show()
 
 
 class Frame(object):
-MODE_MOUSE = 0
-MODE_KEYBOARD = 1
-MODE_NON_INTERACTIVE = 2
-
 def __init__(self):
 logging.debug('STARTUP: Loading the frame')
-self.mode = None
 
 self._palette_group = palettegroup.get_group('frame')
-self._palette_group.connect('popdown', self._palette_group_popdown_cb)
 
 self._left_panel = None
 self._right_panel = None
@@ -143,6 +119,9 @@ class Frame(object):
 visible = property(is_visible, None)
 
 def hide(self):
+if not self.visible:
+return
+
 if self._animator:
 self._animator.stop()
 
@@ -152,14 +131,12 @@ class Frame(object):
 
 self.mode = None
 
-def show(self, mode):
+def show(self):
 if self.visible:
 return
 if self._animator:
 self._animator.stop()
 
-self.mode = mode
-
 self._animator = animator.Animator(0.5)
 self._animator.add(_Animation(self, 1.0))
 self._animator.start()
@@ -180,6 +157,7 @@ class Frame(object):
 zoom_toolbar = ZoomToolbar()
 panel.append(zoom_toolbar, expand=False)
 zoom_toolbar.show()
+zoom_toolbar.connect('level-clicked', self._level_clicked_cb)
 
 activities_tray = ActivitiesTray()
 panel.append(activities_tray)
@@ -208,7 +186,6 @@ class Frame(object):
 def _create_left_panel(self):
 panel = ClipboardPanelWindow(self, gtk.POS_LEFT)
 
-self._connect_to_panel(panel)
 panel.connect('drag-motion', self._drag_motion_cb)
 panel.connect('drag-leave', self._drag_leave_cb)
 
@@ -216,7 +193,6 @@ class Frame(object):
 
 def _create_panel(self, orientation):
 panel = FrameWindow(orientation)
-self._connect_to_panel(panel)
 
 return panel
 
@@ -230,9 +206,8 @@ class Frame(object):
 if not panel.props.visible:
 panel.show()
 
-def _connect_to_panel(self, panel):
-panel.connect('enter-notify-event', 

Re: [Sugar-devel] [PATCH sugar] Frame: new behavior for revealing/hiding the Frame with the mouse

2012-08-16 Thread Manuel Quiñones
I've tested an earlier patch for this and now I reviewed it.  This is
a much more solid interaction with the frame, and less error prone.

All looks good.  Please commit.

2012/8/16 Simon Schampijer si...@schampijer.de:
 After discussing with Gary I prepared this patch to change the
 interaction with the Frame in the following manner:

 - you can reveal the Frame by going with the cursor in one of the
   hot corners

 - you can hide the Frame by going with the cursor in one of the
   hot corners (and the Frame is visible)

 - the Frame is not hidden on mouse out (leaving the Frame)

 - (as before) you can hide/reveal the Frame with the designated keys

 - the Frame is hidden when you switch between activities
   (todo: hide as well when resume in the Palette is clicked)

 - the Frame is hidden when a zoom level is selected

 - drag  drop is currently not working, SL #3811

 Signed-off-by: Simon Schampijer si...@laptop.org

Acked-by: Manuel Quiñones ma...@laptop.org

 ---
  src/jarabe/frame/activitiestray.py |  2 ++
  src/jarabe/frame/frame.py  | 51 
 ++
  src/jarabe/frame/zoomtoolbar.py|  6 +
  3 files changed, 21 insertions(+), 38 deletions(-)

 diff --git a/src/jarabe/frame/activitiestray.py 
 b/src/jarabe/frame/activitiestray.py
 index 9590bce..d386b3b 100644
 --- a/src/jarabe/frame/activitiestray.py
 +++ b/src/jarabe/frame/activitiestray.py
 @@ -287,6 +287,8 @@ class ActivitiesTray(HTray):
  window = home_activity.get_window()
  if window:
  window.activate(gtk.get_current_event_time())
 +frame = jarabe.frame.get_view()
 +frame.hide()

  def __remove_invite_cb(self, icon, invite):
  self._invites.remove_invite(invite)
 diff --git a/src/jarabe/frame/frame.py b/src/jarabe/frame/frame.py
 index 7407e18..9c0129f 100644
 --- a/src/jarabe/frame/frame.py
 +++ b/src/jarabe/frame/frame.py
 @@ -57,29 +57,12 @@ class _Animation(animator.Animation):
  class _MouseListener(object):
  def __init__(self, frame):
  self._frame = frame
 -self._hide_sid = 0

  def mouse_enter(self):
 -self._show_frame()
 -
 -def mouse_leave(self):
 -if self._frame.mode == Frame.MODE_MOUSE:
 -self._hide_frame()
 -
 -def _show_frame(self):
 -if self._hide_sid != 0:
 -gobject.source_remove(self._hide_sid)
 -self._frame.show(Frame.MODE_MOUSE)
 -
 -def _hide_frame_timeout_cb(self):
 -self._frame.hide()
 -return False
 -
 -def _hide_frame(self):
 -if self._hide_sid != 0:
 -gobject.source_remove(self._hide_sid)
 -self._hide_sid = gobject.timeout_add(
 -  _FRAME_HIDING_DELAY, self._hide_frame_timeout_cb)
 +if self._frame.visible:
 +self._frame.hide()
 +else:
 +self._frame.show()


  class _KeyListener(object):
 @@ -88,23 +71,16 @@ class _KeyListener(object):

  def key_press(self):
  if self._frame.visible:
 -if self._frame.mode == Frame.MODE_KEYBOARD:
 -self._frame.hide()
 +self._frame.hide()
  else:
 -self._frame.show(Frame.MODE_KEYBOARD)
 +self._frame.show()


  class Frame(object):
 -MODE_MOUSE = 0
 -MODE_KEYBOARD = 1
 -MODE_NON_INTERACTIVE = 2
 -
  def __init__(self):
  logging.debug('STARTUP: Loading the frame')
 -self.mode = None

  self._palette_group = palettegroup.get_group('frame')
 -self._palette_group.connect('popdown', 
 self._palette_group_popdown_cb)

  self._left_panel = None
  self._right_panel = None
 @@ -143,6 +119,9 @@ class Frame(object):
  visible = property(is_visible, None)

  def hide(self):
 +if not self.visible:
 +return
 +
  if self._animator:
  self._animator.stop()

 @@ -152,14 +131,12 @@ class Frame(object):

  self.mode = None

 -def show(self, mode):
 +def show(self):
  if self.visible:
  return
  if self._animator:
  self._animator.stop()

 -self.mode = mode
 -
  self._animator = animator.Animator(0.5)
  self._animator.add(_Animation(self, 1.0))
  self._animator.start()
 @@ -180,6 +157,7 @@ class Frame(object):
  zoom_toolbar = ZoomToolbar()
  panel.append(zoom_toolbar, expand=False)
  zoom_toolbar.show()
 +zoom_toolbar.connect('level-clicked', self._level_clicked_cb)

  activities_tray = ActivitiesTray()
  panel.append(activities_tray)
 @@ -208,7 +186,6 @@ class Frame(object):
  def _create_left_panel(self):
  panel = ClipboardPanelWindow(self, gtk.POS_LEFT)

 -self._connect_to_panel(panel)
  panel.connect('drag-motion', self._drag_motion_cb)
  panel.connect('drag-leave', self._drag_leave_cb)

 @@ -216,7 +193,6 @@ class