123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148 |
- diff -Nuar pardus-python-0.4.8.orig/pardus/__init__.py pardus-python-0.4.8/pardus/__init__.py
- --- pardus-python-0.4.8.orig/pardus/__init__.py 2010-12-09 14:47:32.000000000 +0200
- +++ pardus-python-0.4.8/pardus/__init__.py 2015-03-06 17:46:44.000000000 +0200
- @@ -24,8 +24,7 @@
- "netfilterutils",
- "shellutils",
- "strutils",
- - "sysutils",
- - "xorg"]
- + "sysutils"]
-
-
- def versionString():
- diff -Nuar pardus-python-0.4.8.orig/pardus/xorg/capslock.c pardus-python-0.4.8/pardus/xorg/capslock.c
- --- pardus-python-0.4.8.orig/pardus/xorg/capslock.c 2010-12-09 14:47:32.000000000 +0200
- +++ pardus-python-0.4.8/pardus/xorg/capslock.c 1970-01-01 02:00:00.000000000 +0200
- @@ -1,59 +0,0 @@
- -/*
- -* Copyright (c) 2005, TUBITAK/UEKAE
- -*
- -* This program is free software; you can redistribute it and/or modify it
- -* under the terms of the GNU General Public License as published by the
- -* Free Software Foundation; either version 2 of the License, or (at your
- -* option) any later version. Please read the COPYING file.
- -*/
- -
- -#include <Python.h>
- -#include <X11/Xlib.h>
- -
- -
- -PyDoc_STRVAR(isOn__doc__,
- -"isOn()\n"
- -"\n"
- -"method checked if CapsLock is on\n");
- -
- -PyObject*
- -capslock_isOn(PyObject *self, PyObject *args)
- -{
- - int capsLocked;
- - unsigned int lmask;
- - Window dummy1, dummy2;
- - int dummy3, dummy4, dummy5, dummy6;
- - Display *display;
- -
- - display = XOpenDisplay(0);
- - XQueryPointer(display, DefaultRootWindow(display),
- - &dummy1, &dummy2, &dummy3, &dummy4, &dummy5, &dummy6,
- - &lmask);
- - capsLocked = lmask & LockMask;
- - XCloseDisplay(display);
- -
- - if (capsLocked)
- - {
- - Py_INCREF(Py_True);
- - return Py_True;
- - }
- -
- - Py_INCREF(Py_False);
- - return Py_False;
- -}
- -
- -static PyMethodDef capslock_methods[] = {
- - {"isOn", (PyCFunction)capslock_isOn, METH_NOARGS, isOn__doc__},
- - {NULL, NULL}
- -};
- -
- -PyMODINIT_FUNC
- -initcapslock(void)
- -{
- - PyObject *m;
- -
- - m = Py_InitModule("capslock", capslock_methods);
- -
- - return;
- -}
- -
- diff -Nuar pardus-python-0.4.8.orig/pardus/xorg/__init__.py pardus-python-0.4.8/pardus/xorg/__init__.py
- --- pardus-python-0.4.8.orig/pardus/xorg/__init__.py 2010-12-09 14:47:32.000000000 +0200
- +++ pardus-python-0.4.8/pardus/xorg/__init__.py 1970-01-01 02:00:00.000000000 +0200
- @@ -1,6 +0,0 @@
- -# -*- coding: utf-8 -*-
- -
- -import capslock
- -import xterm
- -
- -__all__ = ["capslock", "xterm"]
- diff -Nuar pardus-python-0.4.8.orig/pardus/xorg/xterm.py pardus-python-0.4.8/pardus/xorg/xterm.py
- --- pardus-python-0.4.8.orig/pardus/xorg/xterm.py 2010-12-09 14:47:32.000000000 +0200
- +++ pardus-python-0.4.8/pardus/xorg/xterm.py 1970-01-01 02:00:00.000000000 +0200
- @@ -1,31 +0,0 @@
- -# -*- coding: utf-8 -*-
- -#
- -# Copyright (C) 2006, TUBITAK/UEKAE
- -#
- -# This program is free software; you can redistribute it and/or modify it under
- -# the terms of the GNU General Public License as published by the Free
- -# Software Foundation; either version 2 of the License, or (at your option)
- -# any later version.
- -#
- -# Please read the COPYING file.
- -#
- -
- -import sys
- -import os
- -
- -
- -def set_title(message):
- - """Set message as console window title."""
- - if os.environ.has_key("TERM") and sys.stderr.isatty():
- - terminalType = os.environ["TERM"]
- - for term in ["xterm", "Eterm", "aterm", "rxvt", "screen", "kterm", "rxvt-unicode"]:
- - if terminalType.startswith(term):
- - sys.stderr.write("\x1b]2;"+str(message)+"\x07")
- - sys.stderr.flush()
- - break
- -
- -
- -def reset_title():
- - """Reset console window title."""
- - if os.environ.has_key("TERM"):
- - set_title("")
- diff -Nuar pardus-python-0.4.8.orig/setup.py pardus-python-0.4.8/setup.py
- --- pardus-python-0.4.8.orig/setup.py 2010-12-09 14:47:32.000000000 +0200
- +++ pardus-python-0.4.8/setup.py 2015-03-06 17:50:11.000000000 +0200
- @@ -15,8 +15,6 @@
- setup.py
- pardus/*.py
- pardus/*.c
- - pardus/xorg/*.py
- - pardus/xorg/*.c
- po/*.po
- po/*.pot
- tools/*.py
- @@ -82,11 +80,8 @@
- author="Pardus Developers",
- author_email="info@pardus.org.tr",
- url="http://www.pardus.org.tr/",
- - packages = ['pardus', 'pardus.xorg'],
- - ext_modules = [Extension('pardus.xorg.capslock',
- - sources=['pardus/xorg/capslock.c'],
- - libraries=['X11']),
- - Extension('pardus.csapi',
- + packages = ['pardus'],
- + ext_modules = [Extension('pardus.csapi',
- sources=['pardus/csapi.c'],
- libraries=[]),
- ],
|