| 1 | /* -*- Mode: C; c-basic-offset: 4 -*- |
|---|
| 2 | * src/trayicon.override |
|---|
| 3 | * |
|---|
| 4 | * Copyright (C) 2004-2005 Yann Leboulanger <asterix AT lagaule.org> |
|---|
| 5 | * |
|---|
| 6 | * This file is part of Gajim. |
|---|
| 7 | * |
|---|
| 8 | * Gajim is free software; you can redistribute it and/or modify |
|---|
| 9 | * it under the terms of the GNU General Public License as published |
|---|
| 10 | * by the Free Software Foundation; version 3 only. |
|---|
| 11 | * |
|---|
| 12 | * Gajim is distributed in the hope that it will be useful, |
|---|
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 15 | * GNU General Public License for more details. |
|---|
| 16 | * |
|---|
| 17 | * You should have received a copy of the GNU General Public License |
|---|
| 18 | * along with Gajim. If not, see <http://www.gnu.org/licenses/>. |
|---|
| 19 | */ |
|---|
| 20 | %% |
|---|
| 21 | headers |
|---|
| 22 | #include <Python.h> |
|---|
| 23 | |
|---|
| 24 | #include "pygobject.h" |
|---|
| 25 | #include "eggtrayicon.h" |
|---|
| 26 | %% |
|---|
| 27 | modulename trayicon |
|---|
| 28 | %% |
|---|
| 29 | import gtk.Plug as PyGtkPlug_Type |
|---|
| 30 | import gtk.gdk.Screen as PyGdkScreen_Type |
|---|
| 31 | %% |
|---|
| 32 | ignore-glob |
|---|
| 33 | *_get_type |
|---|
| 34 | %% |
|---|
| 35 | override egg_tray_icon_send_message kwargs |
|---|
| 36 | static PyObject* |
|---|
| 37 | _wrap_egg_tray_icon_send_message(PyGObject *self, PyObject *args, PyObject *kwargs) |
|---|
| 38 | { |
|---|
| 39 | static char *kwlist[] = {"timeout", "message", NULL}; |
|---|
| 40 | int timeout, len, ret; |
|---|
| 41 | char *message; |
|---|
| 42 | |
|---|
| 43 | if (!PyArg_ParseTupleAndKeywords(args, kwargs, "is#:TrayIcon.send_message", kwlist, &timeout, &message, &len)) |
|---|
| 44 | return NULL; |
|---|
| 45 | ret = egg_tray_icon_send_message(EGG_TRAY_ICON(self->obj), timeout, message, len); |
|---|
| 46 | return PyInt_FromLong(ret); |
|---|
| 47 | } |
|---|