[Sugar-devel] [PATCH] Scale TA font proportional to Sugar font-settings. (SL#1858)

2010-09-25 Thread Ishan Bansal
This patch scales the font in TA by using function zoom set in
sugar.graphics.style (SL#1858)
---
 TurtleArt/tawindow.py |9 +
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/TurtleArt/tawindow.py b/TurtleArt/tawindow.py
index ac16d9c..696a1bd 100644
--- a/TurtleArt/tawindow.py
+++ b/TurtleArt/tawindow.py
@@ -35,6 +35,7 @@ try:
 from sugar.graphics.objectchooser import ObjectChooser
 from sugar.datastore import datastore
 from sugar import profile
+from sugar.graphics import style
 except ImportError:
 pass
 
@@ -127,17 +128,17 @@ class TurtleArtWindow():
 self.orientation = HORIZONTAL_PALETTE
 if olpc_xo_1():
 self.lead = 1.0
-self.scale = 0.67
+self.scale = 0.67 * style.zoom(1)
 self.color_mode = '565'
 if self.running_sugar and not self.activity.new_sugar_system:
 self.orientation = VERTICAL_PALETTE
 else:
 self.lead = 1.0
-self.scale = 1.0
+self.scale = 1.0 * style.zoom(1)
 self.color_mode = '888' # TODO: Read visual mode from gtk image
 
 self.block_scale = BLOCK_SCALE
-self.trash_scale = 0.5
+self.trash_scale = 0.5 * style.zoom(1)
 self.myblock = None
 self.nop = 'nop'
 self.loaded = 0
@@ -2156,7 +2157,7 @@ class TurtleArtWindow():
 blk.spr.set_label(blk.values[0].replace('\n', RETURN))
 elif btype == 'start': # block size is saved in start block
 if value is not None:
-self.block_scale = value
+self.block_scale = value * style.zoom(1)
 elif btype in EXPANDABLE or btype in EXPANDABLE_BLOCKS or \
  btype in EXPANDABLE_ARGS or btype == 'nop':
 if btype == 'vspace' or btype in EXPANDABLE_BLOCKS:
-- 
1.7.0.4

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


[Sugar-devel] Bug 2323

2010-09-25 Thread Kandarp Kaushik
Hello,
I was working on bug #2323 but do not have much knowledge on how to use the
clipboard.

Please provide some pointers on it.

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


[Sugar-devel] [PATCH v2 sugar] Shutdown and Logout menu items should activate the buzzy cursor (SL#2151)

2010-09-25 Thread Anurag Chowdhury
Shutdown (and Logout) menu items should activate the buzzy cursor (or provide 
some other visual feedback, perhaps dimming/locking the UI from use).
---
 src/jarabe/view/buddymenu.py |   42 ++
 1 files changed, 34 insertions(+), 8 deletions(-)

v1 was Reviewed-By: James Cameron 
v1->v2: Set the cursor in its appropriate window 

diff --git a/src/jarabe/view/buddymenu.py b/src/jarabe/view/buddymenu.py
index 0ba6cc1..7135d9e 100644
--- a/src/jarabe/view/buddymenu.py
+++ b/src/jarabe/view/buddymenu.py
@@ -21,6 +21,8 @@ from gettext import gettext as _
 import gtk
 import gconf
 import dbus
+import jarabe
+import glib
 
 from sugar.graphics.palette import Palette
 from sugar.graphics.menuitem import MenuItem
@@ -98,16 +100,40 @@ class BuddyMenu(Palette):
 item.show()
 
 def __logout_activate_cb(self, menu_item):
-session_manager = get_session_manager()
-session_manager.logout()
+def update_cur(window):
+window.get_window().set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))
+return False 
+def shut(self, menu_item):
+session_manager = get_session_manager()
+session_manager.logout()
+window = jarabe.desktop.homewindow.get_instance()
+glib.timeout_add(3, update_cur, window)  
+glib.idle_add(shut,self,menu_item)
+gtk.main()
 
 def __reboot_activate_cb(self, menu_item):
-session_manager = get_session_manager()
-session_manager.reboot()
-
-def __shutdown_activate_cb(self, menu_item):
-session_manager = get_session_manager()
-session_manager.shutdown()
+def update_cur(window):
+window.get_window().set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))
+return False 
+def shut(self, menu_item):
+session_manager = get_session_manager()
+session_manager.reboot()
+window = jarabe.desktop.homewindow.get_instance()
+glib.timeout_add(3, update_cur, window)  
+glib.idle_add(shut,self,menu_item)
+gtk.main()
+
+def __shutdown_activate_cb(self, menu_item):
+def update_cur(window):
+window.get_window().set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))
+return False 
+def shut(self, menu_item):
+session_manager = get_session_manager()
+session_manager.shutdown()
+window = jarabe.desktop.homewindow.get_instance()
+glib.timeout_add(3, update_cur, window)  
+glib.idle_add(shut,self,menu_item)
+gtk.main()
 
 def __controlpanel_activate_cb(self, menu_item):
 panel = ControlPanel()
-- 
1.7.2.2

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


[Sugar-devel] [PATCH v2 sugar] Work around for fullscreen bug (SL #2180)

2010-09-25 Thread Dipankar Patro
Previously some bottom part of sugar emulator window was pushed out
of viewing area at 800x600 system resolution.
Modified the code to include the resolution 800x600 for fullscreen 
execution, since we cannot predict the space of different OS task 
pannels/bars/ window title bars.
---
 src/jarabe/util/emulator.py |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

v1->v2: Rebased on current mainline/master

diff --git a/src/jarabe/util/emulator.py b/src/jarabe/util/emulator.py
index 6a43044..cc112c9 100644
--- a/src/jarabe/util/emulator.py
+++ b/src/jarabe/util/emulator.py
@@ -42,7 +42,7 @@ def _run_xephyr(display, dpi, dimensions, fullscreen):
 screen_size = (gtk.gdk.screen_width(), gtk.gdk.screen_height())
 
 if (not dimensions) and (fullscreen is None) and \
-   (screen_size < default_dimensions) :
+   (screen_size <= default_dimensions) :
 # no forced settings, screen too small => fit screen
 fullscreen = True
 elif (not dimensions) :
-- 
1.7.0.4

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


Re: [Sugar-devel] Priorities for testing

2010-09-25 Thread Tabitha Roder
>
> > Tried to click on the file on the usb that says it is the journal backup
> for
> > this laptop - it seems to open the restore activity but hard to tell as
> not
> > labelled as such in the frame
>
> Can you elaborate on this, please? I just tried on both Sugar 0.90 and
> 0.82 and it's labelled clearly in the Frame each time: "Journal backup
> of ..." on 0.82 and "Restore" + "Journal backup of ..." on 0.90.
> Did you see something else or did you expect some additional information
> in the Frame? If the former, the logs (both shell*.log and
> org.sugarlabs.Restore*.log) would be useful.
>
> Normally you get the name of the activity in the frame not the name of the
file, we are getting the name of the file. I was expecting to see "Restore"
in the frame and in the activity itself see some files I can choose from to
restore (so if I did a backup once a week to my USB stick I could choose the
newest backup file to restore or an older one if my last backup was bad).
Tabitha
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Priorities for testing

2010-09-25 Thread Sascha Silbe
Excerpts from Tabitha Roder's message of Sat Sep 25 10:49:42 +0200 2010:

> > In Auckland we did test Backup and Restore today.  We post our testing
> summaries to two mailing lists: test...@lists.laptop.org,
> olpc...@lists.laptop.org

Great, thanks!

> Basically they worked, though it was a bit confusing that you don't open
> restore and then choose the file on the USB.

OK, will add this to my to-do list. No idea when I'll get around to
implementing this as I expect similar problems as with interfacing with
sugar-datastore across all of 0.82-0.90 which took me several days
full-time to get working.

> We couldn't use another XOs backup file (which is good, right?).

Exactly the opposite of good, actually. What was the problem? Do you
have a copy of the log file and backup bundle?

> Some instructions for the user might be helpful

Yeah, that's already on my to-do list, though everyone is welcome to
help out on this one. There are also quite a few quirks in Sugar 0.82
that users should know about (resp. have a step-by-step instruction to
follow so they won't hit these quirks).

> Also, there was no obvious notification that the backup file creation was 
> completed.

This is especially true on the old OLPC builds (with Sugar 0.82) as the
GTK version shipped with them contains a bug that causes the labelling
of the progress bar to get overwritten by the bar. :(
A subtle hint is that the Backup button is active again, but I should
add a more obvious indication.

From your more detailed post on testing@:

> Tried to click on the file on the usb that says it is the journal backup for
> this laptop - it seems to open the restore activity but hard to tell as not
> labelled as such in the frame

Can you elaborate on this, please? I just tried on both Sugar 0.90 and
0.82 and it's labelled clearly in the Frame each time: "Journal backup
of ..." on 0.82 and "Restore" + "Journal backup of ..." on 0.90.
Did you see something else or did you expect some additional information
in the Frame? If the former, the logs (both shell*.log and
org.sugarlabs.Restore*.log) would be useful.

> Ran the restore and it seems to work but it on both XOs we
> get two copies of the .xmj journal backup file in the Journal.

Yes, that's a limitation of Sugar [1]. If you resume anything from
outside the Journal (e.g. a USB stick) it gets copied to the Journal
first. There's no way for an activity to opt-out from this.
In the case of Restore that's especially bad because you need to have
enough free space for all of the entries AND the backup bundle.
We might be able to get around this by accessing the external medium
directly like we do in Backup, but it requires a lot of work as we need
UI to choose the file.

Sascha

[1] https://bugs.sugarlabs.org/ticket/496
--
http://sascha.silbe.org/
http://www.infra-silbe.de/


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


Re: [Sugar-devel] Priorities for testing

2010-09-25 Thread Tabitha Roder
>
> That was a bit short notice. For the next test session, it would be nice
> if you could try Backup [1] and Restore [2].
>
> In Auckland we did test Backup and Restore today.  We post our testing
summaries to two mailing lists: test...@lists.laptop.org,
olpc...@lists.laptop.org
Basically they worked, though it was a bit confusing that you don't open
restore and then choose the file on the USB. We couldn't use another XOs
backup file (which is good, right?).
Some instructions for the user might be helpful - when you open the backup
activity would be good to click a question mark and see explanation of
activity, like what happens in the finance activity. Also, there was no
obvious notification that the backup file creation was completed.
Tabitha
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Priorities for testing

2010-09-25 Thread Sascha Silbe
Excerpts from Tim McNamara's message of Fri Sep 24 22:37:18 +0200 2010:

> The New Zealand testing groups will be operating in a few hours. If you have
> any requests for things to be explored, please respond within 5 hours.

That was a bit short notice. For the next test session, it would be nice
if you could try Backup [1] and Restore [2].

Sascha

[1] http://activities.sugarlabs.org/en-US/sugar/addon/4326
[2] http://activities.sugarlabs.org/en-US/sugar/addon/4327
--
http://sascha.silbe.org/
http://www.infra-silbe.de/


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