To add the accelerator to the ToolButton the activity must have set
the 'sugar-accel-group' before. The patch does make the ToolbarButton
listen to the 'hierarchy-changed' signal and repack itself accordingly.
Since the ToolButtons of the subtoolbar do listen to 'hierarchy-changed'
as well to set the accelerator they will set it accordingly.
This fixes the accelerators for new-style-toolbar activities
like Terminal, TurtleArt and Paint, more info in #10930.
Signed-by-off: Gonzalo Odiard <gonzalo@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
In Python 2.7, shutdown_request was added to the BaseServer class and
TCPServer was adopted to use it instead of close_request in the
_handle_request_noblock() path.
GlibTCPServer must be adapted to account for this, so that
shutdown_request is not allowed to prematurely allowed to close the socket,
in the same way that close_request is ignored.
Fixes collaboration in activities that rely on this mechanism for
sharing (including ImageViewer and Read)
Signed-off-by: Daniel Drake <daniel@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
Tested-by: Gonzalo Odiard <gonzalo@laptop.org>
Tested-by: Simon Schampijer <simon@laptop.org>
The generic path does not work for the telepathy logs. As we
have removed the support for different profiles it is ok
to just use the default path.
Signed-off-by: Simon Schampijer <simon@laptop.org>
Reviewed-By: Marco Pesenti Gritti <marco@marcopg.org>
To determine if the title has changed we use the 'focus-out'
event now instead of the 'changed' signal of the gtk.Entry. This
removes races we had before.
Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-By: Simon Schampijer <simon@laptop.org>
Acked-By: Sascha Silbe <silbe@activitycentral.com>
When we join a shared activity we use the name of the shared activity
as the title of the activity. As we set the activity metadata
accordingly this will be visible in the activity toolbar, the Journal
and the activity frame.
Signed-off-by: Simon Schampijer <simon@laptop.org>
Acked-By: Sascha Silbe <silbe@activitycentral.com>
This differentiates between sugar and non sugar invitations using the
handle type. For non-sugar invitations we use the activity id to
determine which activity to join.
Signed-off-by: Simon Schampijer <simon@laptop.org>
Acked-By: Sascha Silbe <silbe@activitycentral.com>
This is a follow-up patch to 95b4eeec758ffa729d0dbb219b21d428115fcc74
Signed-off-by: Simon Schampijer <simon@laptop.org>
Acked-By: Sascha Silbe <silbe@activitycentral.com>
This fixes a copy and paste error. A good test case is the Memorize
activity since we listen for the 'buddy-left' signal there to
update the members list inside the activity.
Signed-off-by: Simon Schampijer <simon@laptop.org>
Acked-By: Sascha Silbe <silbe@activitycentral.com>
As a side effect, activity start-up is now subjectively faster, maybe even
objectively (due to avoiding a resize).
Tested on XO-1 running Debian Squeeze.
Acked-By: Simon Schampijer <simon@laptop.org>
Before only the buddies that were present when closing the activity
were logged in the Journal. This patch does add another dictionary
'_joined_buddies' to keep track of the users that did join. The
'_buddies' dictionary keeps on tracking the users currently in the
activity.
Signed-off-by: Simon Schampijer <simon@laptop.org>
Acked-by: Sascha Silbe <silbe@activitycentral.com>
GTK pops down the palette before it invokes the actions on the
menu item. We need to postpone destruction of the palette until
after all signals have propagated from the menu item to the
palette owner.
Symptoms included the "View Details" palette menu item in the Journal list
view not working.
Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
Acked-by: Simon Schampijer <simon@laptop.org>
Remove the path parameter as it is not used anyhow. The patch
for the sugar module does make sure the method is called
correctly.
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
Acked-By: Simon Schampijer <simon@laptop.org>
Reviewed-By: Sascha Silbe<silbe@activitycentral.com>
Allow the toolbar_box to be removed by setting it to None, like is supported
for canvas.
Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
Acked-by: Simon Schampijer <simon@laptop.org>
Python 2 will never have pgettext() [1], so we need to ship our own version.
sugar.activity.i18n is the best place for that.
[1] http://bugs.python.org/issue2504#msg122482
Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
Acked-by: Simon Schampijer <simon@laptop.org>
sugar.bundle.bundle.Bundle users (e.g.
jarabe.model.bundleregistry.BundleRegistry._add_bundle) only expect
MalformedBundleException to be thrown, not exceptions of zipfile.
This patch solves the most severe issue in #1876: filling up the
filesystem with temporary files that won't be deleted afterwards.
Before we can consider this bug completely fixed, we still need
to do something for the remaining issues:
1) Unpacking shouldn't be attempted if there isn't a safety margin
2) System becomes unresponsive during unpacking
3) No progress indication for the operation, so users are tempted
to click multiple times
4) No error messages displayed for unpacking errors, which is a
common Sugar nuisance.
http://bugs.sugarlabs.org/ticket/1876#comment:5 offers possible
strategies for (1) and (2).
Signed-off-by: Martin Dengler <martin@martindengler.com>
Signed-off-by: Bernie Innocenti <bernie@codewiz.org>
[style fixes, adjusted description]
Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
Reviewed-by: Aleksey Lim <alsroot@activitycentral.org>
Color data is stored in the Journal as a JSON dump, so we can get back
arbitrary types. XoColor already checks the color string for validity and
handles invalid strings gracefully, so it makes sense to enhance this to
invalid types as well.
Acked-by: Simon Schampijer <simon@schampijer.de>
As we do create the ActivityBundle in the config of the bundlebuilder
we can use the code from the activitybundle as well to install
the mime type.
Reviewed-By: Sascha Silbe <sascha-pgp@silbe.org>
pylint isn't smart enough to figure out the return type of Popen.communicate(),
so squelch the warning.
Reviewed-by: James Cameron <quozl@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
CC: Aleksey Lim <alsroot@member.fsf.org>
"format" is the name of a parameter of the function we are wrapping, so we
shouldn't change it.
Reviewed-by: James Cameron <quozl@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
CC: Aleksey Lim <alsroot@member.fsf.org>
We know that our code is correct and column should always be assigned, but it
never hurts to act defensively and guard against bugs in other pieces of the
code (or other components like GTK).
Reviewed-by: James Cameron <quozl@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
CC: Aleksey Lim <alsroot@member.fsf.org>
Caught by pylint. I wonder if we need this piece of code as nobody every
triggered it.
Reviewed-by: James Cameron <quozl@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
CC: Aleksey Lim <alsroot@member.fsf.org>
This avoids the overhead from the string formatting on production systems.
Reviewed-by: James Cameron <quozl@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
CC: Aleksey Lim <alsroot@member.fsf.org>
logging.exception() handles exceptions nicely for us, no need to explicitly
use traceback.
Reviewed-by: James Cameron <quozl@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
CC: Aleksey Lim <alsroot@member.fsf.org>
Adapt to upstream format change.
Reviewed-by: James Cameron <quozl@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
CC: Aleksey Lim <alsroot@member.fsf.org>
Tomeu prefers ' for strings, so let's use it wherever we don't have a good
reason to use ".
Reviewed-by: James Cameron <quozl@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
CC: Aleksey Lim <alsroot@member.fsf.org>
Most of the code uses """, so adjust the few deviations.
Reviewed-by: James Cameron <quozl@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
CC: Aleksey Lim <alsroot@member.fsf.org>
pep8 wants inline comments to be prefixed by at least two spaces. Let's just
move them to a separate line as that's easier to read anyway.
Acked-by: Simon Schampijer <simon@laptop.org>
CC: Aleksey Lim <alsroot@member.fsf.org>