[Sugar-devel] [PATCH sugar-toolkit-gtk3] ObjectChooser: remove deprecated parameters

Gonzalo Odiard gonzalo at laptop.org
Wed Jan 18 14:39:08 EST 2012


I don't know why the title was deprecated, but...

Reviewed-by: Gonzalo Odiard <gonzalo at laptop.org>

On Wed, Jan 11, 2012 at 2:19 PM, Simon Schampijer <simon at schampijer.de>wrote:

> 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 at laptop.org>
> ---
>  src/sugar3/graphics/objectchooser.py |   11 +----------
>  1 files changed, 1 insertions(+), 10 deletions(-)
>
> diff --git a/src/sugar3/graphics/objectchooser.py
> b/src/sugar3/graphics/objectchooser.py
> index a904f25..47a04b3 100644
> --- a/src/sugar3/graphics/objectchooser.py
> +++ b/src/sugar3/graphics/objectchooser.py
> @@ -36,16 +36,7 @@ J_DBUS_PATH = '/org/laptop/Journal'
>
>  class ObjectChooser(object):
>
> -    def __init__(self, title=None, parent=None, flags=None, buttons=None,
> -                 what_filter=None):
> -        # For backwards compatibility:
> -        # - We ignore title, flags and buttons.
> -        # - 'parent' can be a xid or a Gtk.Window
> -
> -        if title is not None or flags is not None or buttons is not None:
> -            logging.warning('Invocation of ObjectChooser() has deprecated
> '
> -                            'parameters.')
> -
> +    def __init__(self, parent=None, what_filter=None):
>         if parent is None:
>             parent_xid = 0
>         elif hasattr(parent, 'get_window') and hasattr(parent.get_window(),
> --
> 1.7.7.5
>
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20120118/e543074c/attachment.html>


More information about the Sugar-devel mailing list