Commit Graph
31 Commits
Author SHA1 Message Date
Gonzalo Odiard 7678540056 Remove c implementation of mime methods
Signed-off-by: Gonzalo Odiard <[email protected]>
2014-03-08 15:34:23 +01:00
Gonzalo Odiard b02ade879a Implement mime.get_mime_parents using python
This is the only method pending implemented in c,
then we can remove seven files previously used.

Add a test for a corner case untested previously

Signed-off-by: Gonzalo Odiard <[email protected]>
2014-03-08 15:34:23 +01:00
Gonzalo Odiard faa0d42084 Use Gio.content_type_guess to identify mime type - Fixes #4715
Replace the use of a custom implentation in SugarExt

Signed-off-by: Gonzalo Odiard <[email protected]>
2014-03-08 15:34:23 +01:00
Gonzalo Odiard e762fa938c Add accelerator to PaletteMenuItem - Fixes #4716
With the port to Gtk3, we lost the display of the keybord shortcut
available in MenuItem.

Signed-off-by: Gonzalo Odiard <[email protected]>
2014-01-31 18:56:42 -03:00
Gonzalo Odiard 53a148f88c Restore suspend catch the wrong exception
Signed-off-by: Gonzalo Odiard <[email protected]>
2014-01-31 12:30:43 -03:00
Gonzalo Odiard 62b60fa1e1 Inhibit suspend while a activity is shared
In some network environments, suspend/reume can make loose
messages and break collaboration. This patch inhibit suspend
when collaboration start. The implementation can be used by activities
or Sugar to inhibit suspend/resume when needed.

More information in http://dev.laptop.org/ticket/10363

Signed-off-by: Gonzalo Odiard <[email protected]>
2014-01-31 11:08:41 -03:00
Gonzalo Odiard cf7a5905fd Remove unused code
Fixes pyflakes error

Signed-off-by: Gonzalo Odiard <[email protected]>
2014-01-31 01:48:32 +01:00
Gonzalo Odiard 30b67cc3d1 Webkit1 compatibility: send 404 error if the file don't exists
Signed-off-by: Gonzalo Odiard <[email protected]>
2014-01-30 12:08:55 -03:00
Gonzalo Odiard 353e05a086 Keep updated CellRendererInvoker self.path updated - Fixes #4717
Since CellRendererInvoker can set the path at None if a mouse event
is out of the area of the renderer, can break the use of touch,
if happen after the mouse movement. This patch set the path,
in the point_in_cell_renderer test, for the positive case,
solving the issue.

Signed-off-by: Gonzalo Odiard <[email protected]>
2014-01-17 17:41:46 -03:00
Gonzalo Odiard 93437ddedf Add get_show_launcher() in bundles other than activitybundle
This is needed now by Sugar, after (sugar commit)
f4638b5f481478e96195d55aa38c90fd33db9aee

Signed-off-by: Gonzalo Odiard <[email protected]>
2013-12-26 15:59:19 -03:00
Gonzalo Odiard dee29c0e75 Be able to click in a tooltip - Fixes #991
This issue was reported many times, when new users see a tooltip
try to click, and are confused when there are no action.

Signed-off-by: Gonzalo Odiard <[email protected]>
2013-12-18 22:49:21 +01:00
Gonzalo Odiard f52b4e1a96 Make webactivity compatible with webkit1
If a env variable SUGAR_USE_WEBKIT1 exists,
uses a different module to start the activity using a local webserver,
borrowed from wikipedia activity.
When use webkit1 the web inspector is not enabled, because do not work.

Signed-off-by: Manuel Quiñones <[email protected]>
Signed-off-by: Gonzalo Odiard <[email protected]>
2013-12-13 10:56:21 -03:00
Gonzalo Odiard c47b842fb9 Fix mistake in the last commit
Error detected by the tests.

Signed-off-by: Gonzalo Odiard <[email protected]>
2013-12-02 17:46:18 -03:00
Gonzalo Odiard b8074549f6 Fix cloning activity in sugar - SL #4608
Probably this code was not included in the initial port from gtk2 to
gtk3, because is only used by Sugar, but now we need it.

I changed the way the parameter dist_name is used,
then a complementary patch in sugar is needed

Fixes #4608

Signed-off-by: Gonzalo Odiard <[email protected]>
2013-11-29 16:14:07 -03:00
Gonzalo Odiard 32f97b48c3 Workaround to enable start of activities still using service_name
While we deprecated service_name a long time ago, still there are activities
using it, and is a source of frequent problems.

Signed-off-by: Gonzalo Odiard <[email protected]>
2013-10-30 23:02:11 -03:00
Gonzalo Odiard 3e6507af6e Add a option to the objectchooser to show the object preview
Signed-off-by: Gonzalo Odiard <[email protected]>
2013-07-08 15:52:18 -03:00
Gonzalo Odiard 8e975bd5c9 Add a method to create a Pixbuf with the preview in the metadata
This code was moved from sugar expandedentry.py to be available to use
in other places. Some activities like Portfolio or JournalShare
have this code copied.

Signed-off-by: Gonzalo Odiard <[email protected]>
2013-07-08 15:51:27 -03:00
Gonzalo Odiard ad3c163023 Fix ObjectChooser backwards compatibility
The last change brak compatibility with the use in activities
without set the filter_type parameter, because None is not
a allowed value in the dbus call.

Signed-off-by: Gonzalo Odiard <[email protected]>
2013-06-24 02:14:57 -03:00
Gonzalo Odiard da3786d2fb Add filter_type optative parameter to objectchooser
Constants are defined to select the different filter_type
values. A comment was added to document the use.

Signed-off-by: Gonzalo Odiard <[email protected]>
2013-06-20 17:42:19 -03:00
godiard b3e4a7ea8d Merge pull request #6 from dnarvaez/printui
Log the UI tree on error
2013-06-19 10:26:47 -07:00
Gonzalo Odiard 58bab9cf6a Do not use the translated summary to get the value from gettext in the bundle builder
This patch is a rebased push from pull request #31

Signed-off-by: Gonzalo Odiard <[email protected]>
2013-06-10 15:46:54 +02:00
Gonzalo Odiard 2a15fbc0f2 Add in the metadata info about every startup time
Signed-off-by: Walter Bender <[email protected]>
Tested-by: Gonzalo Odiard <[email protected]>
Acked-by: Simon Schampijer <[email protected]>
2012-10-05 09:17:04 -03:00
Gonzalo Odiard 5fdad9481b Set default python encoding to utf-8
As spoted by Daniel Narvaez in [1], pygi does not set the default encoding
anymore as the old GTK+ did. This change does break activities ported
to GTK+3.

The change in GTK+ has been discussed upstream here [2].

A better solution will be implemented when we port to Python 3,
when we will be able to use real unicode strings.

Signed-off-by: Gonzalo Odiard <[email protected]>
Acked-by: Simon Schampijer <[email protected]>

[1] http://lists.sugarlabs.org/archive/sugar-devel/2012-August/038993.html
[2] https://bugzilla.gnome.org/show_bug.cgi?id=681915
2012-09-26 13:29:07 +02:00
Gonzalo Odiard 3a30d3f84e Add management of summary property to the activity.info file
This summary is translatable as the Activity name and will be displayed
in the Activity list in the Home View.

Signed-off-by: Gonzalo Odiard <[email protected]>
Acked-by: Simon Schampijer <[email protected]>
2012-09-25 15:01:37 +02:00
Gonzalo Odiard 7eec45f031 Fix radiopalette due to api change in toolbotton
Signed-off-by: Gonzalo Odiard <[email protected]>
Acked-by: Simon Schampijer <[email protected]>
2012-09-21 10:04:39 -03:00
Gonzalo Odiard fe11a3aa23 Make icon_name api consistent between the different toolbuttons
As discused in the mailing list [1] the api to set the icon in sugar
ToolButton, RadioToolButton and ToggleToolButton is inconsistent,
and with the port to GTK+ 3 the differences are visible (SL #3849).

This patch changes the API of ToolButton, RadioToolButton and
ToggleToolButton to override the icon-name property and add an
Icon instance with the set_icon_widget method.

Signed-off-by: Gonzalo Odiard <[email protected]>
Acked-by: Simon Schampijer <[email protected]>

[1] http://lists.sugarlabs.org/archive/sugar-devel/2012-September/039624.html
2012-09-20 09:07:25 +02:00
Gonzalo Odiard 40a3b2ece1 Take list of supported image formats mime types from GdkPixbuf - SL #3845
Signed-off-by: Gonzalo Odiard <[email protected]>
Acked-by: Simon Schampijer <[email protected]>
2012-09-03 08:45:37 -03:00
Gonzalo Odiard 6532b2d4dd Replace signal used in UnfullscreenButton to enable use with touch - SL #3798
Use clicked instead of button-pressed-event, because button-pressed-event
and the button-release-event are not emitted on a touchscreen device by
a touch in GTK+ 3.

Signed-off-by: Gonzalo Odiard <[email protected]>
Acked-by: Manuel Quiñones <[email protected]>
Acked-by: Simon Schampijer <[email protected]>
2012-08-15 13:14:15 +02:00
Gonzalo Odiard e04043dc0b Mimic the behaviour and style of the sugar GTK+ 2 sub-toolbars in GTK+ 3
This draws the grey line around the toolbutton icon with a gap at the
bottom and a grey line at the top of the subtoolbar. Furthermore it
gets the highlightning of the button correct, in the pressed and hover
state. This patch depends on the sugar-artwork patch with the id
7464b808eb12b1df650952e3c8214acff1d1360f.

Signed-off-by: Gonzalo Odiard <[email protected]>
Signed-off-by: Manuel Quiñones <[email protected]>
Acked-by: Simon Schampijer <[email protected]>
2012-03-15 17:46:02 +01:00
Gonzalo Odiard 507dfecc09 Add alpha and scale functionality to the icon, can be used in the launcher to do the animation - v2
Signed-off-by: Gonzalo Odiard <[email protected]>
        Acked-By: Simon Schampijer <[email protected]>
2011-08-17 12:13:10 -03:00
Gonzalo Odiard 880e60bdda Sugar-toolkit: Pack page in ToolbarButton when is connected to the window - OLPC #10930
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 <[email protected]>
Acked-by: Simon Schampijer <[email protected]>
2011-07-15 18:54:29 +02:00