Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* EventIcon: Make the child window of the event box invisibleSimon Schampijer2012-06-211-0/+2
| | | | | | | | | | | | | We do use the EventBox only to receive events, hence the window that the even box creates should be a GDK_INPUT_ONLY window, which means that it is invisible and only serves to receive events [1]. [1] http://developer.gnome.org/gtk3/3.4/GtkEventBox.html#gtk-event-box-set-visible-window Signed-off-by: Simon Schampijer <simon@laptop.org> Reviewed-by: Benjamin Berg <benzea@sugarlabs.org> Acked-by: Manuel Quiñones <manuq@laptop.org>
* Make sure we have a widget before attaching an invoker, SL #3460Simon Schampijer2012-06-061-1/+2
| | | | | | | | | | | | | | The _ToolbarPalette does get passed the invoker on initialisation. But we do create the PaletteWindowWidget later. We do attach the invoker to the widget when calling _setup_widget that is why it was still working without that patch. This patch prevents the traceback that we had because of not having a widget at this point. Signed-off-by: Simon Schampijer <simon@laptop.org> Tested-by: Manuel Quiñones <manuq@laptop.org>
* Replacing set_data/get_data with a python attributeSimon Schampijer2012-06-064-9/+8
| | | | | | | | | | | | | set_data/get_data not available anymore is not available anymore [1]. The recommended approach is using a python attribute, which we do. Changing to use the attribute in the activity class slipped by mistake into 6330204e919a047c0b0f3579da36197630e8e400. [1] https://bugzilla.gnome.org/show_bug.cgi?id=641944 Signed-off-by: Simon Schampijer <simon@laptop.org> Tested-by: Manuel Quiñones <manuq@laptop.org>
* Move the translation initialisation to an earlier stage, SL #3654Simon Schampijer2012-06-052-16/+1
| | | | | | | Must be done early, some activities set translations globally. Remove the support for the langpackdir. Signed-off-by: Simon Schampijer <simon@laptop.org>
* Activity Toolbar Description input field wrap text, SL #3586Simon Schampijer2012-06-011-0/+1
| | | | | Signed-off-by: Gary C. Martin <garycmartin@googlemail.com Acked-by: Simon Schampijer <simon@laptop.org>
* ToolButton: add 'icon_name' as a GObject property SL #3658Manuel Quiñones2012-06-011-0/+2
| | | | | | | | | | Sugar ToolButton inherits from Gtk.ToolButton but is not overwriting 'icon_name' property. So 'icon_name' can be passed to the constructor of Sugar ToolButton but the result is different than setting it via ToolButton.props.icon_name. Signed-off-by: Manuel Quiñones <manuq@laptop.org> Acked-by: Simon Schampijer <simon@laptop.org>
* Display spinner cursor when saving after closing the activity, OLPC #11691Simon Schampijer2012-05-301-0/+1
| | | | | | Signed-off-by: Simon Schampijer <simon@laptop.org> Reviewed-by: Daniel Drake <dsd@laptop.org> Tested-by: Manuel Quiñones <manuq@laptop.org>
* Object Chooser: update for GDK3 get_xid()Daniel Drake2012-05-221-2/+2
| | | | | | | | | | In GDK3 the 'xid' attribute is gone and is replaced with gdk_x11_window_get_xid(), or the get_xid() method in Python. Needed to be able to open the object chooser from Browse without hassle. Signed-off-by: Daniel Drake <dsd@laptop.org> Acked-by: Simon Schampijer <simon@laptop.org>
* Tray: set a minimum size in the viewport so that it allows scrollingCarlos Garnacho2012-05-041-2/+4
| | | | | | | | | | | | | | | The minimum height/width requested by the GtkViewport still tries to cater for all contained children, which makes the [VH]Tray widgets to grow as new items are added. Instead, request a minimum width/height of 0 to avoid the Tray from growing, and having scrolling kick in instead. Also, fixed what seemed to be a typo in do_get_preferred_height(), where the viewport width was requested instead. http://bugs.sugarlabs.org/ticket/3522 Signed-off-by: Carlos Garnacho <carlos@lanedo.com> Acked-by: Simon Schampijer <simon@laptop.org>
* Draw accelerator in Palette SL #3459Simon Schampijer2012-04-192-16/+13
| | | | | | | | | | | | | | | | The accelerator in the primary information in the Palette has not been drawn because there was not enough space reserved for it. The preferred size we get back for the Palette window does not include the accelerator of the Gtk.AccelLabel. We need to include that in our calculation for the Palette size. In order to make that information available which is part of the Palette class we need to pass the instance to the PaletteWindowWidget instance. Signed-off-by: Simon Schampijer <simon@laptop.org> Acked-by: Daniel Drake <dsd@laptop.org>
* Draw border for palette all the time SL #3383Simon Schampijer2012-04-191-2/+2
| | | | | | | | | | | | | | | | | gtk_render_frame_gap [1] does expect an initial and an end coordinate for the gap. paint_box_gap [2] which we used before expected a starting position of the gap and the width of the gap as parameter. The patch does calculate the end coordinate parameter for the gap from the initial coordinate and the width of the gap. Signed-off-by: Simon Schampijer <simon@laptop.org> Acked-by: Daniel Drake <dsd@laptop.org> [1] http://developer.gnome.org/gtk3/3.0/GtkStyleContext.html#gtk-render-frame-gap [2] http://developer.gnome.org/gtk/2.24/GtkStyle.html#gtk-paint-box-gap
* Use json as included in Python SL #3142Simon Schampijer2012-03-221-3/+3
| | | | | | | We use json as included in Python. This will make Sugar dependent on Python 2.6 and Python 2.7 to have the highest JSON performance. Signed-off-by: Simon Schampijer <simon@laptop.org>
* Remove the workaround for missing gobject-introspection bindings of RsvgSimon Schampijer2012-03-224-237/+5
| | | | | | | | | | | | | | | | | | | | 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
* Mimic the behaviour and style of the Sugar GTK+ 2 toolbutton palettes in GTK+ 3Simon Schampijer2012-03-153-60/+87
| | | | | | | | | | | | | | | | | | | First we needed to port the Palette code to use a minimum size. The default size is two times the GRID_CELL_SIZE. Since the request-phase of the traditional GTK+ geometry management has been replaced by a height-for-width system [1] we have to compensate for that. Furthermore we need to pass the invoker from the PaletteWindow to the _PaletteWindowWidget for the gap calculation code for drawing the border around the Palette. We do the drawing of the border for the toolbutton in the base class, moved this from the ToolbarButton and made sure we are drawing in the right order. In the ToolButton we draw as well a black background for the ToolButton when the Palette is up. While the mouse is over the button we can do that in the theme, but not when the mouse moves over the Palette. [1] http://developer.gnome.org/gtk3/3.0/ch25s02.html#id1525688 Signed-off-by: Simon Schampijer <simon@laptop.org>
* Mimic the behaviour and style of the sugar GTK+ 2 sub-toolbars in GTK+ 3Gonzalo Odiard2012-03-151-30/+36
| | | | | | | | | | | | 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 <gonzalo@laptop.org> Signed-off-by: Manuel Quiñones <manuq@laptop.org> Acked-by: Simon Schampijer <simon@laptop.org>
* Port get_preview method to cairoSimon Schampijer2012-03-141-19/+48
| | | | | | | | | | | | | | | | Previously we were using a GdkPixmap [1] created with the get_snapshot [2] method of the Gtk.Widget. GTK 3 encourages to use cairo surfaces now instead. The ported mothod does create a cairo surface similar to that of the canvas' window and draws on that. Then we create a cairo image surface with the desired preview size and scale the canvas surface on that. Several people have been involved in this work: Gonzalo Odiard, Manuel Quiñones and Benjamin Berg. [1] http://developer.gnome.org/gdk/stable/gdk-Bitmaps-and-Pixmaps.html#GdkPixmap [2] http://developer.gnome.org/gtk/stable/GtkWidget.html#gtk-widget-get-snapshot
* s/Descriptions/Description fixup of d9e1a72fcd8657bb2e5d18cc6777c6756e0cd967Simon Schampijer2012-02-091-1/+1
| | | | | Spotted by Chris Leonard: we use Description in all the other places.
* Window: fixup of wrong conversion introduced by pygi-convert.shSimon Schampijer2012-02-021-1/+1
| | | | | | | | | | | With 820efa56b9876bb418bc51d30de959775930e35c gtk.gdk.x11_get_server_time(window) wasn't correctly converted to GdkX11.x11_get_server_time(window). Found when tesing collaboration. Opened 669264 for the upstream fix of pygi-convert.sh. Signed-off-by: Simon Schampijer <simon@laptop.org> Acked-by: Daniel Drake <dsd@laptop.org>
* Remove the Naming AlertSimon Schampijer2012-02-023-319/+5
| | | | | | | | | | | | With the new 'Write to Journal anytime' feature it is possible to write a description within an activity. Hopefully this leads to more usage of the Journal for reflection by the learner. The hinting nature ('you have not named your session yet') of the Naming Alert has not been replaced, though. Signed-off-by: Simon Schampijer <simon@laptop.org> Reviewed-by: Gonzalo Odiard <gonzalo@laptop.org> Reviewed-by: Manuel Quiñones <manuq@laptop.org>
* Add DescriptionEntry to the activity sub-toolbarSimon Schampijer2012-02-021-0/+73
| | | | | | | | | | | | | | | | | This is the implementation of the 'Write to Journal anytime' feature [1]. The patch itself adds a DescriptionItem to the activity sub-toolbar to make editing a Journal entry description from within the activity possible. The code has the same error handling as the TitleEntry. Signed-off-by: Simon Schampijer <simon@laptop.org> Signed-off-by: Walter Bender <walter.bender@gmail.com> Reviewed-by: Gonzalo Odiard <gonzalo@laptop.org> Reviewed-by: Manuel Quiñones <manuq@laptop.org> [1] http://wiki.sugarlabs.org/go/Features/Write_to_journal_anytime
* Remove support for the old deprecated toolbarSimon Schampijer2012-01-243-57/+1
| | | | | | | | | | | | - removed deprecated imports from the activity module, use the widgets module instead - removed the ActivityToolbox class - removed the Stop button from the ActivityToolbar - removed set_toolbar/get_toolbar API from the window module Signed-off-by: Simon Schampijer <simon@laptop.org> Reviewed-by: Gonzalo Odiard <gonzalo@laptop.org> Acked-by: Daniel Drake <dsd@laptop.org>
* Datastore: remove deprecated APISimon Schampijer2012-01-241-41/+0
| | | | | | | | | This API is not in use anywhere in the shell and has been deprecated for quite some time. Signed-off-by: Simon Schampijer <simon@laptop.org> Reviewed-by: Gonzalo Odiard <gonzalo@laptop.org> Acked-by: Daniel Drake <dsd@laptop.org>
* ObjectChooser: remove deprecated parametersSimon Schampijer2012-01-241-10/+1
| | | | | | | | | | The objectchooser had the 'title', 'flags' and 'buttons' parameters deprecated for a long time, remove them now completely. The only parameters allowed are now the 'parent' and the 'what_filter'. Signed-off-by: Simon Schampijer <simon@laptop.org> Reviewed-by: Gonzalo Odiard <gonzalo@laptop.org> Acked-by: Daniel Drake <dsd@laptop.org>
* Bundlebuilder: remove deprecated bundle_name argumentSimon Schampijer2012-01-241-4/+1
| | | | | | Signed-off-by: Simon Schampijer <simon@laptop.org> Reviewed-by: Gonzalo Odiard <gonzalo@laptop.org> Acked-by: Daniel Drake <dsd@laptop.org>
* Activity: remove deprecated _shared_activity memberSimon Schampijer2012-01-241-4/+1
| | | | | | | | Use the get_shared_activity method instead Signed-off-by: Simon Schampijer <simon@laptop.org> Reviewed-by: Gonzalo Odiard <gonzalo@laptop.org> Acked-by: Daniel Drake <dsd@laptop.org>
* ActivityBundle: clean from deprecated codeSimon Schampijer2012-01-241-12/+1
| | | | | | | | | | - removed deprecated mime type 'application/vnd.olpc-x-sugar' - activity.info file: removed deprecated field 'service_name' use 'bundle_id' instead - activity.info file: removed deprecated field 'class' use 'exec' instead Signed-off-by: Simon Schampijer <simon@laptop.org> Reviewed-by: Gonzalo Odiard <gonzalo@laptop.org> Acked-by: Daniel Drake <dsd@laptop.org>
* Finally remove the keep button completelySimon Schampijer2012-01-241-25/+0
| | | | | | | | | | | | see 0082e10f8ebc201d0837dc67ba739d9079903e45 for the complete reasoning. e022aa8e4acf1467454102664681880eb48e45ab already made the button invisible, keeping it only for backwards compatibility. Signed-off-by: Simon Schampijer <simon@laptop.org> Reviewed-By: Sascha Silbe <silbe@activitycentral.com> Acked-by: Daniel Drake <dsd@laptop.org>
* Set the sugar theme name in gsettings according the scaleGonzalo Odiard2011-12-201-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> Acked-by: Simon Schampijer <simon@laptop.org>
* Reimplement Palettes for GTK3Daniel Drake2011-12-207-416/+508
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-201-0/+2
| | | | | | | 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>
* Trivial GTK3 porting fixesDaniel Drake2011-12-2014-39/+59
| | | | | | | | | Fix some trivial issues missed earlier: various missing imports, some minor API changes to adapt to, do_size_request simple porting, etc. Signed-off-by: Daniel Drake <dsd@laptop.org> Acked-by: Simon Schampijer <simon@laptop.org>
* Add EventIcon/CursorInvoker similar to CanvasIcon/CanvasInvokerDaniel Drake2011-12-203-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. Signed-off-by: Daniel Drake <dsd@laptop.org> Acked-by: Simon Schampijer <simon@laptop.org>
* SugarExt: drop pygobject2 initialisationDaniel Drake2011-12-201-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. Signed-off-by: Daniel Drake <dsd@laptop.org> Acked-by: Simon Schampijer <simon@laptop.org>
* 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>
* 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-133-161/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1326-3/+5356
| | | | | | | | | | | 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>
* 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-133-1/+232
| | | | | | Signed-off-by: Raul Gutierrez Segales <rgs@collabora.co.uk> [split patch into several parts] 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>