Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Set the sugar theme name in gsettings according the scalereviewGonzalo Odiard2011-12-151-1/+6
| | | | | | | We need set the theme in gsettings according the scale in the SUGAR_SCLING environment variable. Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
* Fix the installation of languagesSimon Schampijer2011-12-151-1/+1
| | | | | The GETTEXT_PACKAGE name must match the repository name. Found when packaging for Fedora.
* tray: fixup Indententation errorSimon Schampijer2011-12-151-1/+1
|
* When the Invoker detaches the destroy method will be calledSimon Schampijer2011-12-151-0/+4
| | | | This has been removed accidentely
* Reimplement Palettes for GTK3Daniel Drake2011-12-157-416/+515
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* SugarExt: make SugarGrid introspectableDaniel Drake2011-12-151-0/+2
| | | | This will be used by a future GTK3 port of the shell.
* Trivial GTK3 porting fixesDaniel Drake2011-12-1514-40/+60
| | | | | | Fix some trivial issues missed earlier: various missing imports, some minor API changes to adapt to, do_size_request simple porting, etc.
* Add EventIcon/CursorInvoker similar to CanvasIcon/CanvasInvokerDaniel Drake2011-12-153-1/+133
| | | | | | | | | | | | | | | | CanvasIcon and CanvasInvoker were removed in a previous GTK3-porting commit as they were based on hippocanvas. However, this leaves the toolkit with some missing functionality: there is no longer a trivial way to show an icon which can receive mouse events and pop up a palette. Such functionality is used in various places throughout the shell and activities. Reimplement this functionality as EventIcon and CursorInvoker. Instead of reimplementing much of the Icon class (like CanvasIcon did), EventIcon opts for a more simplistic encapsulation of an Icon object. This means trivial API changes for CanvasIcon users who must now use the 'icon' property with the Icon API.
* SugarExt: drop pygobject2 initialisationDaniel Drake2011-12-151-2/+0
| | | | | Now that we avoid linking with pygtk2/pygobject2, we need to remove this initialisation call so that the module can be loaded at runtime.
* activity.py: Apply sugar GTK3 theme and icon themeDaniel Drake2011-12-131-0/+2
| | | | | | | | | | | | In GTK2, theme name and icon theme name properties could be set in the GTK2 RC file, at runtime, or by the X settings daemon. For GTK3, the RC file configuration route for these settings has been removed. As we do not currently have a settings daemon implementation, apply these important settings at runtime, early in the Activity class. Signed-off-by: Daniel Drake <dsd@laptop.org>
* Add MAINTAINERS fileDaniel Drake2011-12-131-0/+3
|
* SugarExt: fix compile without pygtkDaniel Drake2011-12-131-1/+1
| | | | | We no longer compile this against pygtk, so remove the include. Add the now-required Python.h include in its place.
* sugar-activity: import and make independent of sugar-toolkit GTK versionsDaniel Drake2011-12-136-36/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As we move to adding support for a second UI toolkit (GTK+ 3.x), the sugar-activity binary used by all activities must become backend-toolkit-independent. It would be wasteful to have two backend toolkits loaded in memory, and in the GTK2/GTK3 case, it is impossible (importing both results in an instant crash). To achieve this, we split the existing sugar-toolkit activity/main.py:main() functionality into two parts, moving it into the sugar-activity binary and the Activity class as follows: 1. All toolkit-specific stuff is moved into the Activity class (i.e. everything that interacts with GTK) 2. Everything that can be reasonably/easily moved into the Activity class is also moved. 3. What remains is the stuff that is inherently involved with the construction of the Activity object, not related to UI toolkits. This is moved into the sugar-activity binary. main.py is then removed from sugar-toolkit, and sugar-activity is moved from sugar to sugar-toolkit-gtk3 in order to keep toolkit-related code with the toolkit itself. With this work done, the one remaining question is how to invoke the main loop. An optional run_main_loop() method is added to the activity class, for GTK2 this will run the GTK2 main loop, for GTK3 the GTK3 main loop will be run, etc. Signed-off-by: Daniel Drake <dsd@laptop.org>
* Port key handling code to GTK3Raul Gutierrez Segales2011-12-133-19/+22
| | | | | | | | | | | GTK3 removed some previously-deprecated API that we still use. This includes GDK_DISPLAY(), gdk_x11_drawable_get_xdisplay(), and some key constants. Port our code to the new API. [split patch into several parts, added minimal description] Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
* Import sugar-base into sugar-toolkitDaniel Drake2011-12-1327-3/+5357
| | | | | | | | | | | 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>
* Add examples for Alert, Animator, ComboBox, IconEntry and NotebookSimon Schampijer2011-12-135-0/+158
| | | | | | Signed-off-by: Simon Schampijer <simon@schampijer.de> [squashed two patches into one] Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
* Use rsvg wrapper while rsvg gains introspection supportRaul Gutierrez Segales2011-12-131-9/+6
| | | | Signed-off-by: Raul Gutierrez Segales <rgs@collabora.co.uk>
* Add wrapper for rsvgRaul Gutierrez Segales2011-12-134-2/+233
| | | | | | Signed-off-by: Raul Gutierrez Segales <rgs@collabora.co.uk> [split patch into several parts] Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
* configure.ac: replace PyGTK dependency with GTK3 dependenciesRaul Gutierrez Segales2011-12-131-1/+1
| | | | | | Signed-off-by: Raul Gutierrez Segales <rgs@collabora.co.uk> [split patch into several parts, added description] Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
* Add GdkWrapper to access non-introspectable Gdk APIRaul Gutierrez Segales2011-12-134-3/+105
| | | | | | See https://bugzilla.gnome.org/show_bug.cgi?id=663261 Signed-off-by: Raul Gutierrez Segales <rgs@collabora.co.uk>
* _TimeoutIcon: use markup instead of Pango for bold textSimon Schampijer2011-12-131-5/+2
| | | | | | | | | | In Pango 'Pango.attr_weight_new' is not yet introspectable [1]. [1] https://bugzilla.gnome.org/show_bug.cgi?id=646788 Signed-off-by: Simon Schampijer <simon@schampijer.de> [changed description] Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
* Replace "expose-event" signal by a new "draw" signalSimon Schampijer2011-12-132-11/+10
| | | | | | | | | | | | | | | GtkWidget "expose-event" signal has been replaced by a new "draw" signal [1]. The context is already clipped [2], so do not base it on the values returned by get_allocation like before. [1] http://developer.gnome.org/gtk3/3.0/ch25s02.html#id1467092 [2] http://developer.gnome.org/gtk3/3.0/GtkWidget.html#GtkWidget-draw Signed-off-by: Simon Schampijer <simon@schampijer.de> [squashed with a patch by Benjamin Berg <benjamin@sipsolutions.net>; removed useless additions] Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
* Tray: replace deprecated get_child_requisition() invocationDaniel Drake2011-12-131-3/+3
| | | | | | | | | | | Widget.get_child_requisition() has been replaced by Widget.get_preferred_size() in GTK 3 [1]. [1] http://developer.gnome.org/gtk3/3.0/GtkWidget.html#gtk-widget-get-child-requisition Signed-off-by: Daniel Drake <dsd@laptop.org> [changed description] Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
* Replace deprecated gdk_set_sm_client_id() invocationRaul Gutierrez Segales2011-12-131-1/+1
| | | | | | | | | | | gdk_set_sm_client_id() has been replaced by gdk_x11_set_sm_client_id() [1] since GDK 2.24. [1] http://developer.gnome.org/gdk/stable/gdk-General.html#gdk-set-sm-client-id Signed-off-by: Raul Gutierrez Segales <rgs@collabora.co.uk> [changed description] Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
* Use GObject constructor for Gtk.AlignmentSimon Schampijer2011-12-135-6/+6
| | | | | | | | | | | | | | | With PyGTK, all parameters of the Alignment constructor had defaults [1]. With GTK3+pygi, when using the explicit constructor (Alignment.new() resp. gtk_alignment_new() [2]), all values would need to be passed. However when using the GObject constructor, named properties can be passed in instead and we only need to pass those that different from the default. [1] http://developer.gnome.org/pygtk/stable/class-gtkalignment.html#constructor-gtkalignment [2] http://developer.gnome.org/gtk/stable/GtkAlignment.html#gtk-alignment-new Signed-off-by: Simon Schampijer <simon@schampijer.de> [assembled from several patches; replaced description] Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
* Use accessor functions for data fieldsSascha Silbe2011-12-139-48/+60
| | | | | | | | | | | | | | | | | | The following data fields that were provided by PyGTK are not accessible directly in GTK3+pygi and need to be replaced by accessor calls: Adjustment.lower Adjustment.page_size Adjustment.upper Adjustment.value Bin.child Widget.parent Widget.style Widget.window Based on patches by Daniel Drake <dsd@laptop.org>. Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
* icon: fix set_source_pixbuf() invocationsDaniel Drake2011-12-131-3/+3
| | | | | | | | | | | The previous set_source_pixbuf() invocation (on a Cairo context) involves Gdk data types, so in the new introspection world we need to call a Gdk function rather than operating on the Cairo object (even if Cairo had already been converted to introspection). Signed-off-by: Daniel Drake <dsd@laptop.org> [added description; split out from another patch] Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
* Icon: port to new Height-for-width Geometry ManagementBenjamin Berg2011-12-131-18/+18
| | | | | | | | | | | | | | GTK3 has replaced [1] the GTK2 geometry management with Height-for-width Geometry Management [2]. This means we need to replace size_request() methods with get_preferred_{width,height}(). [1] http://developer.gnome.org/gtk3/3.0/ch25s02.html#id1525688 [2] http://developer.gnome.org/gtk3/3.0/GtkWidget.html#geometry-management Signed-off-by: Benjamin Berg <benjamin@sipsolutions.net> [assembled from several patches; fixed up left-over plus sign; added description] Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
* Adapt to Widget.get_child_requisition() API changesSascha Silbe2011-12-131-2/+2
| | | | | | | | | | | | In PyGTK Widget.get_child_requisition() returned a tuple [1]. In GTK3+pygi a Requisition object is returned instead. Based on a patch by Benjamin Berg <benjamin@sipsolutions.net>. [1] http://developer.gnome.org/pygtk/stable/class-gtkwidget.html#method-gtkwidget--get-child-requisition [2] http://developer.gnome.org/gtk/stable/GtkWidget.html#gtk-widget-get-child-requisition Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
* Adapt to Gtk.icon_size_lookup*() API changesSimon Schampijer2011-12-133-6/+7
| | | | | | | | | | | | | | | In PyGTK, icon_size_lookup*() returned just the icon size as a 2-tuple [1]. In GTK3+pygi, an additional boolean value indicating whether the passed-in value was valid is returned. [3,4] [1] http://developer.gnome.org/pygtk/stable/class-gtkiconsource.html#function-gtk--icon-size-lookup [2] http://developer.gnome.org/pygtk/stable/class-gtkiconsource.html#function-gtk--icon-size-lookup-for-settings [3] http://developer.gnome.org/gtk/stable/gtk-Themeable-Stock-Images.html#gtk-icon-size-lookup [4] http://developer.gnome.org/gtk/stable/gtk-Themeable-Stock-Images.html#gtk-icon-size-lookup-for-settings Signed-off-by: Simon Schampijer <simon@schampijer.de> [marked unused local variables, fixed overlong line] Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
* Adapt to changed Gtk.Window.set_geometry_hints() APISimon Schampijer2011-12-131-5/+13
| | | | | | | | | | | | Unlike PyGTK [1], GTK3+pygi [2] wants GDK Geometry and WindowHints objects, rather than individual values. [1] http://developer.gnome.org/pygtk/stable/class-gtkwindow.html#method-gtkwindow--set-geometry-hints [2] http://developer.gnome.org/gtk3/3.0/GtkWindow.html#gtk-window-set-geometry-hints Signed-off-by: Simon Schampijer <simon@schampijer.de> [replaced description, included fix-up commit] Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
* Switch sugarext to be an introspectable librarySimon Schampijer2011-12-1312-512/+73
| | | | | | | | | | | 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>
* Run pygi-convert.sh for automatic conversion from GTK2 to GTK3 + pygi.Sascha Silbe2011-12-1347-819/+819
| | | | | | | | | | | | | | | | | 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>
* Import GDK in preparation for GTK3 conversionSascha Silbe2011-12-135-0/+5
| | | | | | | Some parts of GTK moved to GDK, so we need to import the latter for things to work after the conversion script runs. Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
* Remove Canvas* widgets and other hippo-canvas using partsSimon Schampijer2011-12-137-699/+0
| | | | | | | | | | hippo-canvas isn't available in the GTK3 world, so we need to remove anything that depends on it. Activities that still use it will need replace hippo-canvas based widgets with native GTK ones before they can be ported to GTK3. [replaced description] Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
* Don't use hippo-canvas for rendering pixbufsSimon Schampijer2011-12-131-6/+3
| | | | | | | | hippo-canvas isn't available in the GTK3 world and we can do fine without it for rendering pixbufs. [split out from another patch; added description] Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
* Notebook: fix passing can-close-tabsSimon Schampijer2011-12-131-2/+1
| | | | | | | | Make sure can_close_tabs can be passed in as a keyword parameter (to be set by the GObject constructor). [split out from another patch] Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
* Pass all parameters to GtkTextBuffer.get_text()Simon Schampijer2011-12-131-2/+2
| | | | | | | | | | | With PyGTK the include_hidden_chars parameter to GtkTextBuffer.get_text() had a default value [1]. With GTK3+pygi the value must be explicitly passed [2]. [1] http://developer.gnome.org/pygtk/stable/class-gtktextbuffer.html#method-gtktextbuffer--get-text [2] http://developer.gnome.org/gtk3/3.0/GtkTextBuffer.html#gtk-text-buffer-get-text [changed description] Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
* Pass all parameters to ComboBox.set_row_separator_func()Simon Schampijer2011-12-131-2/+2
| | | | | | | | | | | With PyGTK, the func and data parameters to ComboBox.set_row_separator_func() had defaults [1]. With GTK3+pygi both values must be passed [2]. [1] http://developer.gnome.org/pygtk/stable/class-gtkcombobox.html#method-gtkcombobox--set-row-separator-func [2] http://developer.gnome.org/gtk/stable/GtkComboBox.html#gtk-combo-box-set-row-separator-func [replaced description] Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
* Pass all parameters to Box.pack_start() and ...pack_end()Daniel Drake2011-12-135-22/+20
| | | | | | | | | | | | | With PyGTK, several Box.pack_{start,end}() parameters had defaults [1,2]. With GTK3+pygi all values must be passed [3,4]. [1] http://developer.gnome.org/pygtk/stable/class-gtkbox.html#method-gtkbox--pack-start [2] http://developer.gnome.org/pygtk/stable/class-gtkbox.html#method-gtkbox--pack-end [3] http://developer.gnome.org/gtk/stable/GtkBox.html#gtk-box-pack-start [4] http://developer.gnome.org/gtk/stable/GtkBox.html#gtk-box-pack-end [assembled from several patches; replaced description] Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
* Fix broken importsSimon Schampijer2011-11-157-13/+13
| | | | | | | | 8f1a821d683193a1849ec9658b0a52408dfae304 only changed imports starting with "import", but not those using "from ... import ...". [replaced description] Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
* Rename imports from sugar to sugar3Simon Schampijer2011-11-1446-146/+146
| | | | | Signed-off-by: Simon Schampijer <simon@laptop.org> Acked-by: Sascha Silbe <silbe@activitycentral.com>
* Rename the module to sugar3Simon Schampijer2011-11-14103-25/+25
| | | | | | | | 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>
*