view finch/libgnt/pygnt/gntwidget.override @ 19678:7e078c970fdd

Change the way we handle file names when dealing with AIM file transfers. We're no longer incorrectly sending a 65 byte string for file names shorter than 64 bytes. Thanks to Kyryll A Mirnenko aka Mirya for basically tracking this down and being persistent and filing a nice bug report. Fixes #2974
author Mark Doliner <mark@kingant.net>
date Fri, 07 Sep 2007 06:20:05 +0000
parents bfa12b00f54b
children 44b4e8bd759b
line wrap: on
line source

/**
 * pygnt- Python bindings for the GNT toolkit.
 * Copyright (C) 2007 Sadrul Habib Chowdhury <sadrul@pidgin.im>
 *
 *   gntwidget.override: overrides for generic widgets.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 * USA
 */
%%
override gnt_widget_get_size args
static PyObject *
_wrap_gnt_widget_get_size(PyGObject *self)
{
    PyObject *list = PyList_New(0);
    int x = 0, y = 0;

    gnt_widget_get_size(GNT_WIDGET(self->obj), &x, &y);
    PyList_Append(list, PyInt_FromLong((long)x));
    PyList_Append(list, PyInt_FromLong((long)y));

    return list;
}