[Galago-commits] r2780 - in trunk/notify-python: . src tests

galago-commits at freedesktop.org galago-commits at freedesktop.org
Wed Apr 26 01:11:50 PDT 2006


Author: chipx86
Date: 2006-04-26 01:11:48 -0700 (Wed, 26 Apr 2006)
New Revision: 2780

Modified:
   trunk/notify-python/ChangeLog
   trunk/notify-python/src/pynotifymodule.c
   trunk/notify-python/tests/test-replace.py
Log:
- Add EXPIRES_NEVER and EXPIRES_DEFAULT constants.
- Fix test-replace.py to set the second notification to have a default expiration.


Modified: trunk/notify-python/ChangeLog
===================================================================
--- trunk/notify-python/ChangeLog	2006-04-26 08:07:54 UTC (rev 2779)
+++ trunk/notify-python/ChangeLog	2006-04-26 08:11:48 UTC (rev 2780)
@@ -1,3 +1,11 @@
+Wed Apr 26 01:11:01 PDT 2006  Christian Hammond <chipx86 at chipx86.com>
+
+	* src/pynotifymodule.c:
+	* tests/test-replace.py:
+	  - Add EXPIRES_NEVER and EXPIRES_DEFAULT constants.
+	  - Fix test-replace.py to set the second notification to have a default
+	    expiration.
+
 Tue Apr 25 23:23:55 PDT 2006  Christian Hammond <chipx86 at chipx86.com>
 
 	* src/pynotify.override:

Modified: trunk/notify-python/src/pynotifymodule.c
===================================================================
--- trunk/notify-python/src/pynotifymodule.c	2006-04-26 08:07:54 UTC (rev 2779)
+++ trunk/notify-python/src/pynotifymodule.c	2006-04-26 08:11:48 UTC (rev 2780)
@@ -1,5 +1,6 @@
 #include <pygobject.h>
 #include <pygtk/pygtk.h>
+#include <libnotify/notify.h>
 
 void pynotify_register_classes(PyObject *d);
 extern PyMethodDef pypynotify_functions[];
@@ -17,6 +18,10 @@
 
 	pypynotify_register_classes(d);
 	pypynotify_add_constants(m, "NOTIFY_");
+	PyModule_AddObject(m, "EXPIRES_DEFAULT",
+					   PyInt_FromLong(NOTIFY_EXPIRES_DEFAULT));
+	PyModule_AddObject(m, "EXPIRES_NEVER",
+					   PyInt_FromLong(NOTIFY_EXPIRES_NEVER));
 
 	if (PyErr_Occurred()) {
 		Py_FatalError("can't initialize module pynotify");

Modified: trunk/notify-python/tests/test-replace.py
===================================================================
--- trunk/notify-python/tests/test-replace.py	2006-04-26 08:07:54 UTC (rev 2779)
+++ trunk/notify-python/tests/test-replace.py	2006-04-26 08:11:48 UTC (rev 2780)
@@ -20,6 +20,7 @@
     time.sleep(3)
 
     n.update("Second Summary", "First mesage was replaced")
+    n.set_timeout(pynotify.EXPIRES_DEFAULT)
 
     if not n.show():
         print "Failed to send notification"



More information about the galago-commits mailing list