9 Commits (4cc6967c8ddf66d8cfe3ea849dae068241d1b95b)

Author SHA1 Message Date
Daniel Narvaez 4cc6967c8d Reimplement the wm module in C
The wm module in sugar-toolkit-gtk3 has been reimplemented
in C and made available through introspection. The same was
hard to achieve directly using the Gdk API.

We can drop wm.py and the wrapper around gdk_property_change.

Signed-off-by: Daniel Narvaez <dwnarvaez@gmail.com>
Acked-by: Simon Schampijer <simon@laptop.org>
12 years ago
Simon Schampijer 425e9becfc Remove the workaround for missing gobject-introspection bindings of Rsvg
gobject introspection bindings for librsvg have been pushed to librsvg
master [1] in 2.35.0, which solved [2]. We only have slight adopts to
make in our usage, for example we can not pass the data property
to the default constructor anymore and get_width and get_height is not
available anymore for the handle, but we can use the properties
instead.

The sugar-toolkit-gtk3 and therefore Activities that have been ported
to it do need a version of librsvg >= 2.35.0 to be able to work,
which ships for example with Fedora 17.

Signed-off-by: Simon Schampijer <simon@laptop.org>
Acked-by: Daniel Drake <dsd@laptop.org>

[1] http://git.gnome.org/browse/librsvg/
[2] https://bugzilla.gnome.org/show_bug.cgi?id=663049
[3] http://developer.gnome.org/rsvg/stable/RsvgHandle.html
12 years ago
Daniel Drake 48ad255a78 Reimplement Palettes for GTK3
Moving from GTK2 to GTK3 has presented various challenges regarding
palettes.

In GTK2, we were able to access some internal API of the GtkMenu class
and use it to embed a GtkMenu in a regular window. As of GTK3, that API
has become private and we can no longer access it.

We still want to use GtkMenu for the advanced functionality it provides
(multiple-level menus, keyboard navigation, etc), but we are now limited
to popping it up with its own (internal) window, rather than being able
to pack it into one of our own.

Our palettes can historically be used either as a menu, or as a general
area where widgets can be added, or both. The new restrictions upon
GtkMenu force some changes here, but we work hard to stick to the old
API as far as possible.

A Palette instance now acts as a controller of either a "window widget"
(where any type of widget can be displayed as usual) or a "menu widget"
which just pops up a GtkMenu. A Palette defaults to the window mode, but
dynamically switches to menu mode if/when the user attempts to access
the menu element.

As a result of this, palettes can now pack either a user-defined collection
of widgets, or a menu, but types can no longer be mixed. This should
only affect a handful of palettes which will need to pick a single
approach and convert to it.

Some further challenges are presented by the fact that GtkMenu performs a
grab on the whole screen, meaning that all input events are delivered to
the GtkMenu widget. Through some careful event filtering and examination
of the mouse cursor position we are still able to determine when the mouse
has entered or left the invoker or menu areas.

This work is authored by Benjamin Berg, Marco Pesenti Gritti, Simon
Schampijer and Daniel Drake.
13 years ago
Daniel Drake 8126575461 SugarExt: make SugarGrid introspectable
This will be used by a future GTK3 port of the shell.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
13 years ago
Daniel Drake e2c07af748 Import sugar-base into sugar-toolkit
Probably needs cleaning up a bit. And we use pygtk-codegen, ugh...

This is the commit id when we imported sugar-base:
b9406e5c9c9df5404c5b0d995178b5edb4d93628

Signed-off-by: Daniel Drake <dsd@laptop.org>
[squashed two patches into one]
Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
13 years ago
Raul Gutierrez Segales 3372317922 Add wrapper for rsvg
Signed-off-by: Raul Gutierrez Segales <rgs@collabora.co.uk>
[split patch into several parts]
Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
13 years ago
Raul Gutierrez Segales 1005c67ad2 Add GdkWrapper to access non-introspectable Gdk API
See https://bugzilla.gnome.org/show_bug.cgi?id=663261

Signed-off-by: Raul Gutierrez Segales <rgs@collabora.co.uk>
13 years ago
Simon Schampijer 10d7f7d3f9 Switch sugarext to be an introspectable library
This makes sugarext accessible through introspection. It is used
from the shell (key grabber, sound volume management) and the
shell session management.

Making the sugarext introspectable was done following the
descriptions at: http://live.gnome.org/GObjectIntrospection#Using_GI

Signed-off-by: Simon Schampijer <simon@schampijer.de>
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