CHANNEL_TYPE_TUBES was deprecated since telepathy-gabble 0.17.25 and
is no longer present on modern distributions. This breaks collaboration
for _all_ activities, regardless if they use tubes or not.
Therefore, check if the channel creation failed due to support and allow
channel creation process to continue.
This patch fixes collaboration for the activities that do not use tubes
channel in modern distributions, but also allow to use tubes when running
on older distributions.
Signed-off-by: Martin Abente Lahaye <tch@sugarlabs.org>
In Gtk+ 3.20, you need to use the css name to select elements,
rather than the gtype name. Therefore, these must be added.
The css name must be set before the class instances are created, as
it effects the class rather than the instance. This is why it must
be places after the class definition.
A rework of the TreeViewInvoker used by the journal and activity list.
Fixes a persistent journal entry palette that reappears in journal or
home view. https://bugs.sugarlabs.org/ticket/4918
Also fixes an over-sensitive journal icon; with the journal mostly
empty, rapidly move the mouse from the bottom of the screen into the
lowest icon and then out again. Before this patch, the palette was
shown. After this patch, the mouse must rest in the icon.
Changes made:
- override _ensure_palette_exists in parent class Invoker,
- remove reference to MouseSpeedDetector, it is no longer required,
- remove enter and leave events; they are for the TreeView as a whole,
and are not required,
- properly detect that None is returned by get_path_at_pos, when the
coordinates are outside the TreeView cells.
Not fixed:
- moving the mouse out of the journal icon invoker does not popdown the
palette, but it does when moving the mouse out of the activity icon in
the activity list; so this is a problem beyond the invoker,
Tested on Fedora 18 and Ubuntu 15.10.
Test cases:
- check a click will activate item,
- check a right-click will show palette,
- check a mouse hover will show palette,
- check a brief mouse passing will not show palette,
- check if mouse leaving palette will popdown.
Instead of getting the position of the mouse later in the code,
this commit uses the coords given to sugar by Gtk that say where
the event happened. This means that if the system is busy, or
the user is fast with the mouse, the palette will pop up where
they originally clicked.
When disk is full, Sugar will not start, because the backup log
directory cannot be created.
X session logs in tmpfs show this exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/usr/lib/python2.7/site-packages/jarabe/main.py", line 20, in <module>
logger.cleanup()
File "/usr/lib/python2.7/site-packages/sugar3/logger.py", line 113, in cleanup
os.mkdir(backup_dir)
OSError: [Errno 28] No space left on device: '/home/user/.sugar/default/logs/1448258018'
Fix is to ignore the exception.
We've been here before! Was previously fixed in 2010:
https://github.com/sugarlabs/sugar/commit/4cde481https://bugs.sugarlabs.org/ticket/1720http://dev.laptop.org/ticket/9623
But new regression introduced in 2012 during reorganisation of
code by Daniel Narvaez; the exception was no longer handled:
https://github.com/sugarlabs/sugar/commit/0e45f9dhttps://github.com/sugarlabs/sugar/commit/19db9c5
Reported-by: Nathan Riddle <nathanr333@charter.net>
Tested-by: James Cameron <quozl@laptop.org>
Create a private class for the button, timeout and response. Use the
private class as parent for both NotifyAlert and TimeoutAlert.
Extends the spurious response fix (cfeabdc) to NotifyAlert.
Also use g_timeout_add in preference to g_timeout_add_seconds, because
the latter is less precise in implementation.
Tested by changing the Register alert temporarily.
For an object of class TimeoutAlert, an OK response occurs on timeout,
even if user has clicked a button.
Remove the timeout when the user clicks a button.
A new method _response is added which overrides the parent method.
Gtk 3.8 introduces the tick callback [1]. This allows widgets to be
signaled before each frame, simmilar to requestAnimationFrame in the
browser.
This patch adds an optional widget argument to the Animator class so
tick based animation can be used. This is much more efficent than
using timeouts, as we get a more appropriate frame rate for the user.
[1] https://developer.gnome.org/gtk3/stable/GtkWidget.html#gtk-widget-add-tick-callback
As the ticket describe, create a object in the Journal
is no longer optional. The change do not break activities,
because the optional parameter is not removed, just ignored.
Right now is not possible do "from sugar3.datastore import datastore"
outside of GLib loop, because the import try to connect to a DBus signal,
and throw a exception.
That was not a problem in Sugar, because we always have a Glib loop
on all our activities, but is a problem when we want import the classes
to generate docs with pydoc. Many other classes import datastore,
then this is a blocker.
This patch removes the initialization when imported,
will be done when needed.