18 Commits (master)

Author SHA1 Message Date
Aniket Mathur 88ea8e1f4f Port to TelepathyGLib
Co-authored-by: tonadev <tonadevv@gmail.com> [initial port]
Co-authored-by: Aniket21mathur <aniketmathur320@gmail.com> [further work]
Co-authored-by: James Cameron <quozl@laptop.org> [minimising changes]
5 years ago
James Cameron 481e0bac80 Fix collaboration call_async
Port to Python 3 via Six aa8a5e7 did introduce a regression during
activity collaboration on both sharing and joining.

Fixes https://github.com/sugarlabs/sugar-toolkit-gtk3/issues/406
5 years ago
Pro-Panda aa8a5e70c4 Port from Python 2 to six
Signed-off-by: James Cameron <quozl@laptop.org>
5 years ago
James Cameron 85fc4680e9 Fedora 18 backport - GObject.ParamFlags does not have READWRITE 5 years ago
Rahul Bothra 13a2282e5e Port from GObject to GLib 6 years ago
Sam Parkinson 64f58d3992
Don't assume all connection managers support Sugar
If the user has a "random" telepathy connection manager
installed and running on the system (eg. telepathy idle being
active if they are chatting on irc with GNOME's Polari), activities
will crash on startup.

Steps to reproduce the crash:
1. Run Polari (eg. via the Terminal activity)
2. Join an irc channel in Polari (eg. #sugar on freenode)
3. Try to open an activity from the home view
    - notice that opening any sugar3 activity will crash
8 years ago
Sebastian Silva 2f2b2d20d8 Allow to run activities without Sugar shell.
- Handle lack of GSettings gracefully.
- Still requires sugar-datastore.
- Supports avoiding X11 docks/panels.
- Provides icons for Activity windows.

Try it outside Sugar. Go to an Activity directory and run 'sugar-activity'.
Tested it with Terminal, Finance, Write, Browse, Memorize under XFCE4.
Tested in Gnome under OLPC-OS.
Also works from Sugar Terminal Activity.
Does not affect regular Sugar operation.

This is patch v.2 -
    Addresses most concerns:
    - Removed commented code, sorry.
    - Changed code to use profile.get_nickname and get_color where possible.

    Couldn't the launcher just pass this info?
    Maybe the launcher could set the activity root as well?
        - It is intended to be usable from the command line also.
    Should put sugar version in the environment
        - It is intended to work even without Sugar Shell installed.
    Why don't we always set the icon?
        - On XO it might use some memory. I was concerned to degrade
        performance.
    Also, imports should be at the top of the file?
        - Also a concern about performance on XO.
        This way it is only loaded in this use case.
        Maybe it is insignificant -moved as requested.
    It would be nice if the changes to the POT for sugar-toolkit-gtk3
    could be incorporated in this pull request, please.
        - There were no changes to POT files as part of this patch. Maybe
        it is worth translating low level command line tools, not sure.
    Suggest packaged activities might also provide .desktop files.
        - Intriguing but not sure within scope of this patch. You mean generate
        a .desktop file automatically as an option? Sounds nice!
    Suggest sugar-activity might also accept path to unpacked bundle.
        - Implemented!
8 years ago
Martin Abente Lahaye 0494f704fb collaboration: handle tubes channel failure gracefully
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>
8 years ago
Daniel Narvaez 01ed63ee4b Fixes for pep8 1.5 10 years ago
Emil Dudev db2ba3e579 GConf to GSettings port 11 years ago
akskumarnot 81b388c554 Use proper formatting syntax, fixes #2170 11 years ago
Daniel Drake e01837f8be Drop use of deprecated dbus.glib
When writing Python apps that will use asynchronous DBus calls and
signals, python-dbus must be initialised with the appropriate main
loop.

sugar currently does this by importing the datastore module from
sugar-toolkit-gtk3, and the datastore module uses the deprecated
and confusing dbus.glib module (which automatically and non-obviously
sets the default GLib main context as the DBus mainloop).

Eliminate the dbus.glib usage from sugar-toolkit-gtk3 as part
of the effort to make sugar initialised the DBus mainloop in a
more explicit and non-deprecated fashion.
11 years ago
Daniel Narvaez 6d2b97daec Fix pep8 errors
pep8 1.6.4 detects more issues
11 years ago
William Orr 69a7aa8f68 pep8'd sugar3.presence 11 years ago
Daniel Drake 3bbc4ef1c6 presence: use RoomConfig1 to configure channel properties (#3629)
This code was still using regular Telepathy properties to
set important configuration such as Anonymous=False.

However, as of Telepathy specification 0.24.0, these properties have
gone away.

    http://telepathy.freedesktop.org/spec/Channel_Type_Text.html
    Changed in 0.24.0. This interface used to have a bunch of clunky
    Telepathy.Properties. They have been removed in favour of D-Bus
    properties on the Room2, Subject2 and RoomConfig1 interfaces.

Switch to using RoomConfig1 (where available) to set this
configuration. The invite-restricted flag is no longer available and
actually seems to have been removed a long while back.

Fixes sharing of activities over gabble on new platforms such
as Fedora 17.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Sascha Silbe <silbe@activitycentral.com>
12 years ago
Sascha Silbe 820efa56b9 Run pygi-convert.sh for automatic conversion from GTK2 to GTK3 + pygi.
This is only on a best-effort basis; the code will be in a broken state after
this patch and need to be fixed manually.

The purpose of committing the intermediate, non-working output is to make it
reproducible. It's impractical to manually review the changes.

The exact version used was 4f637212f13b197a95c824967a58496b9e3b877c from the
main pygobject repository [1] plus a custom patch [2] that hasn't been sent
upstream yet.

[1] git://git.gnome.org/pygobject
[2] https://sascha.silbe.org/patches/pygobject-convert-sugar-20111122.patch

Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
13 years ago
Simon Schampijer 8f1a821d68 Rename imports from sugar to sugar3
Signed-off-by: Simon Schampijer <simon@laptop.org>
Acked-by: Sascha Silbe <silbe@activitycentral.com>
13 years ago
Simon Schampijer 000ed75cbe Rename the module to sugar3
The old gtk-2 based module will be present in
the 0.94 branch in the sugar-toolkit.

Signed-off-by: Simon Schampijer <simon@laptop.org>
Acked-by: Sascha Silbe <silbe@activitycentral.com>
13 years ago