annotate finch/libgnt/pygnt/gnt.override @ 18721:7389b597a812

This gets rid of more weird crashes.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sun, 29 Jul 2007 18:59:46 +0000
parents 1ad1a4e8dfea
children bfa12b00f54b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15929
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
1 %%
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
2 headers
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
3 #include <Python.h>
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
4 #include "pygobject.h"
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
5 #include "gnt.h"
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
6 #include "gntbindable.h"
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
7 #include "gntwidget.h"
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
8 #include "gntbox.h"
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
9 #include "gntbutton.h"
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
10 #include "gntcheckbox.h"
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
11 #include "gntcolors.h"
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
12 #include "gntcombobox.h"
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
13 #include "gntentry.h"
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
14 #include "gntfilesel.h"
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
15 #include "gntkeys.h"
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
16 #include "gntlabel.h"
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
17 #include "gntline.h"
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
18 #include "gntmenu.h"
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
19 #include "gntmenuitem.h"
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
20 #include "gntmenuitemcheck.h"
18556
5e1412f4e67a Do some work to make pygnt more useful. The dbus-gnt script works fairly
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15929
diff changeset
21 #include "gntslider.h"
15929
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
22 #include "gntstyle.h"
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
23 #include "gnttextview.h"
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
24 #include "gnttree.h"
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
25 #include "gntutils.h"
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
26 #include "gntwindow.h"
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
27 #include "gntwm.h"
18556
5e1412f4e67a Do some work to make pygnt more useful. The dbus-gnt script works fairly
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15929
diff changeset
28 #include "gntws.h"
5e1412f4e67a Do some work to make pygnt more useful. The dbus-gnt script works fairly
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15929
diff changeset
29 #include "common.h"
5e1412f4e67a Do some work to make pygnt more useful. The dbus-gnt script works fairly
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15929
diff changeset
30 %%
5e1412f4e67a Do some work to make pygnt more useful. The dbus-gnt script works fairly
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15929
diff changeset
31 include
18721
7389b597a812 This gets rid of more weird crashes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18718
diff changeset
32 gntbox.override
18556
5e1412f4e67a Do some work to make pygnt more useful. The dbus-gnt script works fairly
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15929
diff changeset
33 gntfilesel.override
5e1412f4e67a Do some work to make pygnt more useful. The dbus-gnt script works fairly
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15929
diff changeset
34 gnttree.override
15929
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
35 %%
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
36 modulename gnt
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
37 %%
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
38 import gobject.GObject as PyGObject_Type
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
39 %%
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
40 ignore-glob
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
41 *_get_gtype
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
42 %%
18717
d3542cffbb42 Allow un/setting flags for widgets.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18556
diff changeset
43 define set_flag
d3542cffbb42 Allow un/setting flags for widgets.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18556
diff changeset
44 static PyObject *
d3542cffbb42 Allow un/setting flags for widgets.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18556
diff changeset
45 _wrap_set_flag(PyGObject *self, PyObject *args, PyObject *kwargs)
d3542cffbb42 Allow un/setting flags for widgets.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18556
diff changeset
46 {
d3542cffbb42 Allow un/setting flags for widgets.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18556
diff changeset
47 static char *kwlist[] = {"flags", NULL};
d3542cffbb42 Allow un/setting flags for widgets.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18556
diff changeset
48 PyGObject *widget;
d3542cffbb42 Allow un/setting flags for widgets.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18556
diff changeset
49 int flags;
d3542cffbb42 Allow un/setting flags for widgets.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18556
diff changeset
50
d3542cffbb42 Allow un/setting flags for widgets.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18556
diff changeset
51 if (!PyArg_ParseTuple(args, "O!i:gnt.set_flag", &PyGntWidget_Type, &widget,
d3542cffbb42 Allow un/setting flags for widgets.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18556
diff changeset
52 &flags)) {
d3542cffbb42 Allow un/setting flags for widgets.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18556
diff changeset
53 return NULL;
d3542cffbb42 Allow un/setting flags for widgets.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18556
diff changeset
54 }
d3542cffbb42 Allow un/setting flags for widgets.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18556
diff changeset
55
d3542cffbb42 Allow un/setting flags for widgets.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18556
diff changeset
56 GNT_WIDGET_SET_FLAGS(widget->obj, flags);
d3542cffbb42 Allow un/setting flags for widgets.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18556
diff changeset
57
d3542cffbb42 Allow un/setting flags for widgets.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18556
diff changeset
58 Py_INCREF(Py_None);
d3542cffbb42 Allow un/setting flags for widgets.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18556
diff changeset
59 return Py_None;
d3542cffbb42 Allow un/setting flags for widgets.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18556
diff changeset
60 }
d3542cffbb42 Allow un/setting flags for widgets.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18556
diff changeset
61 %%
d3542cffbb42 Allow un/setting flags for widgets.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18556
diff changeset
62 define unset_flag
d3542cffbb42 Allow un/setting flags for widgets.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18556
diff changeset
63 static PyObject *
d3542cffbb42 Allow un/setting flags for widgets.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18556
diff changeset
64 _wrap_unset_flag(PyGObject *self, PyObject *args, PyObject *kwargs)
d3542cffbb42 Allow un/setting flags for widgets.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18556
diff changeset
65 {
d3542cffbb42 Allow un/setting flags for widgets.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18556
diff changeset
66 static char *kwlist[] = {"flags", NULL};
d3542cffbb42 Allow un/setting flags for widgets.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18556
diff changeset
67 PyGObject *widget;
d3542cffbb42 Allow un/setting flags for widgets.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18556
diff changeset
68 int flags;
d3542cffbb42 Allow un/setting flags for widgets.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18556
diff changeset
69
d3542cffbb42 Allow un/setting flags for widgets.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18556
diff changeset
70 if (!PyArg_ParseTuple(args, "O!i:gnt.unset_flag", &PyGntWidget_Type, &widget,
d3542cffbb42 Allow un/setting flags for widgets.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18556
diff changeset
71 &flags)) {
d3542cffbb42 Allow un/setting flags for widgets.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18556
diff changeset
72 return NULL;
d3542cffbb42 Allow un/setting flags for widgets.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18556
diff changeset
73 }
d3542cffbb42 Allow un/setting flags for widgets.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18556
diff changeset
74
d3542cffbb42 Allow un/setting flags for widgets.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18556
diff changeset
75 GNT_WIDGET_UNSET_FLAGS(widget->obj, flags);
d3542cffbb42 Allow un/setting flags for widgets.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18556
diff changeset
76
d3542cffbb42 Allow un/setting flags for widgets.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18556
diff changeset
77 Py_INCREF(Py_None);
d3542cffbb42 Allow un/setting flags for widgets.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18556
diff changeset
78 return Py_None;
d3542cffbb42 Allow un/setting flags for widgets.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18556
diff changeset
79 }
18718
1ad1a4e8dfea Add function to get the screen size.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18717
diff changeset
80 %%
1ad1a4e8dfea Add function to get the screen size.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18717
diff changeset
81 define screen_size noargs
1ad1a4e8dfea Add function to get the screen size.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18717
diff changeset
82 static PyObject *
1ad1a4e8dfea Add function to get the screen size.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18717
diff changeset
83 _wrap_screen_size(PyObject *self)
1ad1a4e8dfea Add function to get the screen size.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18717
diff changeset
84 {
1ad1a4e8dfea Add function to get the screen size.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18717
diff changeset
85 PyObject *list = PyList_New(0);
18717
d3542cffbb42 Allow un/setting flags for widgets.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18556
diff changeset
86
18718
1ad1a4e8dfea Add function to get the screen size.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18717
diff changeset
87 if (list == NULL)
1ad1a4e8dfea Add function to get the screen size.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18717
diff changeset
88 return NULL;
18717
d3542cffbb42 Allow un/setting flags for widgets.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18556
diff changeset
89
18718
1ad1a4e8dfea Add function to get the screen size.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18717
diff changeset
90 PyList_Append(list, PyInt_FromLong((long)getmaxx(stdscr)));
1ad1a4e8dfea Add function to get the screen size.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18717
diff changeset
91 PyList_Append(list, PyInt_FromLong((long)getmaxy(stdscr)));
1ad1a4e8dfea Add function to get the screen size.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18717
diff changeset
92
1ad1a4e8dfea Add function to get the screen size.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18717
diff changeset
93 return list;
1ad1a4e8dfea Add function to get the screen size.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18717
diff changeset
94 }
1ad1a4e8dfea Add function to get the screen size.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18717
diff changeset
95