~ubuntu-branches/ubuntu/hardy/pidgin/hardy

« back to all changes in this revision

Viewing changes to finch/libgnt/pygnt/gntmodule.c

  • Committer: Bazaar Package Importer
  • Author(s): Pedro Fragoso
  • Date: 2007-12-21 02:48:06 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20071221024806-pd44a5k9tiyh12mp
Tags: 1:2.3.1-2ubuntu1
* Sync with Debian, remaining Ubuntu changes; (LP: #177811)
  - Set Maintainer to Ubuntu Core Developers.
  - Add build-deps on liblaunchpad-integration-dev, intltool,
    libnm-glib-dev (for --enable-nm) (Ubuntu #112720).
  - Drop build-deps on libsilc-1.1-2-dev | libsilc-dev (>= 1.1.1) as 
    this library is in universe.
  - Drop the libpurple0 recommends on libpurple-bin.
  - Add a gaim transitionnal package for upgrades.
  - Ship compatibility symlinks via debian/gaim.links.
  - Pass --enable-nm to configure to enable NetworkManager support.
  - Pass --disable-silc to configure to disable silc support even if 
    it's installed in the build environment.
  - Add X-Ubuntu-Gettext-Domain to the desktop file and update the
    translation templates in common-install-impl::.
   - Update debian/prefs.xml to set the notify plugin prefs
    /plugins/gtk/X11/notify/* and set /pidgin/plugins/loaded to load 
    the notify plugin; Ubuntu: #13389.
  - Add LPI integration patch, 02_lpi.
  - Add patch 04_let_crasher_for_apport to stop catching the SIGSEGV signal
    and let apport handle it.
  - Add patch 05_default_to_irc_ubuntu_com to set the default IRC 
    server to irc.ubuntu.com.
  - Add autoconf patch, 70_autoconf.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#include <pygobject.h>
 
2
#include "gnt.h"
2
3
 
3
4
void gnt_register_classes (PyObject *d); 
4
5
extern PyMethodDef gnt_functions[];
 
6
 
 
7
static void
 
8
gnt_add_string_constants(PyObject *module)
 
9
{
 
10
#define define_key(x) if (GNT_KEY_##x && *(GNT_KEY_##x))  PyModule_AddStringConstant(module, "KEY_" #x, GNT_KEY_##x)
 
11
 
 
12
        define_key(POPUP);
 
13
 
 
14
        define_key(LEFT);
 
15
        define_key(RIGHT);
 
16
        define_key(UP);
 
17
        define_key(DOWN);
 
18
 
 
19
        define_key(CTRL_UP);
 
20
        define_key(CTRL_DOWN);
 
21
        define_key(CTRL_RIGHT);
 
22
        define_key(CTRL_LEFT);
 
23
 
 
24
        define_key(PGUP);
 
25
        define_key(PGDOWN);
 
26
        define_key(HOME);
 
27
        define_key(END);
 
28
 
 
29
        define_key(ENTER);
 
30
 
 
31
        define_key(BACKSPACE);
 
32
        define_key(DEL);
 
33
        define_key(INS);
 
34
        define_key(BACK_TAB);
 
35
 
 
36
        define_key(CTRL_A);
 
37
        define_key(CTRL_B);
 
38
        define_key(CTRL_D);
 
39
        define_key(CTRL_E);
 
40
        define_key(CTRL_F);
 
41
        define_key(CTRL_G);
 
42
        define_key(CTRL_H);
 
43
        define_key(CTRL_I);
 
44
        define_key(CTRL_J);
 
45
        define_key(CTRL_K);
 
46
        define_key(CTRL_L);
 
47
        define_key(CTRL_M);
 
48
        define_key(CTRL_N);
 
49
        define_key(CTRL_O);
 
50
        define_key(CTRL_P);
 
51
        define_key(CTRL_R);
 
52
        define_key(CTRL_T);
 
53
        define_key(CTRL_U);
 
54
        define_key(CTRL_V);
 
55
        define_key(CTRL_W);
 
56
        define_key(CTRL_X);
 
57
        define_key(CTRL_Y);
 
58
 
 
59
        define_key(F1);
 
60
        define_key(F2);
 
61
        define_key(F3);
 
62
        define_key(F4);
 
63
        define_key(F5);
 
64
        define_key(F6);
 
65
        define_key(F7);
 
66
        define_key(F8);
 
67
        define_key(F9);
 
68
        define_key(F10);
 
69
        define_key(F11);
 
70
        define_key(F12);
 
71
}
5
72
 
6
73
DL_EXPORT(void)
7
74
initgnt(void)
19
86
    if (PyErr_Occurred ()) {
20
87
        Py_FatalError ("can't initialise module sad");
21
88
    }
 
89
 
 
90
        gnt_init();
 
91
        gnt_add_string_constants(m);
22
92
}
23
93