~indicator-applet-developers/notify-osd/trunk

« back to all changes in this revision

Viewing changes to src/stack-display.c

  • Committer: Mirco Müller
  • Date: 2008-11-26 09:49:53 UTC
  • mfrom: (9.1.1 alsdorf)
  • Revision ID: mirco.mueller@ubuntu.com-20081126094953-f62d8gin34gp28oo
tried so solve conflicts between David's and my branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
*******************************************************************************/
18
18
 
19
19
#include <gtk/gtk.h>
 
20
#include "Python.h"
20
21
 
21
22
#include "bubble.h"
22
23
 
29
30
        window = bubble_new (30, 30, 300, 100);
30
31
        gtk_widget_show_all (window);
31
32
}
 
33
 
 
34
static PyObject *
 
35
stack_push_notification_py (PyObject *self,
 
36
                            PyObject *args)
 
37
{
 
38
        char *title = NULL;
 
39
        char *message = NULL;
 
40
 
 
41
        if (!PyArg_ParseTuple(args, "ss", &title, &message))
 
42
                return NULL;
 
43
        stack_push_notification(title, message);
 
44
 
 
45
        return Py_BuildValue("");
 
46
}
 
47
 
 
48
 
 
49
static PyMethodDef notification_methods[] = {
 
50
        {"push", stack_push_notification_py, METH_VARARGS, "Insert a new message in the notification stack"},
 
51
        {NULL,          NULL}           /* sentinel */
 
52
};
 
53
 
 
54
void
 
55
stack_init_python_interface (void)
 
56
{
 
57
        PyImport_AddModule("notifications");
 
58
        Py_InitModule("notifications", notification_methods);
 
59
}