[Sugar-devel] [DESIGN] Frame, new behavior for revealing/hiding the Frame with the mouse

2012-08-28 Thread Simon Schampijer

Hi,

in 238338d4b5d6a065eb81bd118a8c0b7ca83717bf (will be in 0.97.2) we 
modified the Frame hide/show with a mouse behavior to some extent:


- 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


One item I was looking at is the resume option in the Palette in the 
activity tray in the Frame (patch attached). At current if I click on 
one of those icons in the upper Frame it will do the primary action and 
the Frame is hidden. Should then do the 'resume' option in the Activity 
Palette do the same, when clicked resume and hide the Frame (like in the 
patch)?


Regards,
  Simon
diff --git a/src/jarabe/frame/activitiestray.py b/src/jarabe/frame/activitiestray.py
index d386b3b..3275186 100644
--- a/src/jarabe/frame/activitiestray.py
+++ b/src/jarabe/frame/activitiestray.py
@@ -83,7 +83,8 @@ class ActivityButton(RadioToolButton):
 if self._home_activity.is_journal():
 palette = JournalPalette(self._home_activity)
 else:
-palette = CurrentActivityPalette(self._home_activity)
+frame = jarabe.frame.get_view()
+palette = CurrentActivityPalette(self._home_activity, frame)
 palette.set_group_id('frame')
 self.set_palette(palette)
 
diff --git a/src/jarabe/view/palettes.py b/src/jarabe/view/palettes.py
index 3195c0c..67a5ad5 100644
--- a/src/jarabe/view/palettes.py
+++ b/src/jarabe/view/palettes.py
@@ -68,9 +68,10 @@ class BasePalette(Palette):
 
 
 class CurrentActivityPalette(BasePalette):
-def __init__(self, home_activity):
+def __init__(self, home_activity, frame):
 self._home_activity = home_activity
 BasePalette.__init__(self, home_activity)
+self._frame = frame
 
 def setup_palette(self):
 activity_name = self._home_activity.get_activity_name()
@@ -106,6 +107,7 @@ class CurrentActivityPalette(BasePalette):
 
 def __resume_activate_cb(self, menu_item):
 self._home_activity.get_window().activate(gtk.get_current_event_time())
+self._frame.hide()
 
 def __view_source__cb(self, menu_item):
 setup_view_source(self._home_activity)
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


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

2012-08-28 Thread Gary Martin
Hi Simon,

On 28 Aug 2012, at 12:36, Simon Schampijer si...@schampijer.de wrote:

 Hi,
 
 in 238338d4b5d6a065eb81bd118a8c0b7ca83717bf (will be in 0.97.2) we modified 
 the Frame hide/show with a mouse behavior to some extent:
 
- 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
 
 
 One item I was looking at is the resume option in the Palette in the activity 
 tray in the Frame (patch attached). At current if I click on one of those 
 icons in the upper Frame it will do the primary action and the Frame is 
 hidden. Should then do the 'resume' option in the Activity Palette do the 
 same, when clicked resume and hide the Frame (like in the patch)?

+1 for resume menu item behaviour hiding the frame.

Regards,
--Gary

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

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