summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Sapp <nixphoeni@gentoo.org>2005-04-19 03:08:05 +0000
committerJoe Sapp <nixphoeni@gentoo.org>2005-04-19 03:08:05 +0000
commitf322fb77dfca93e940dd9694ce6d7ec00afa79a4 (patch)
tree20239c206db5e9d306399d8ac39e40d2df9d40f3 /gnome-extra
parentMajor new version (despite the version numbers) (diff)
downloadgentoo-2-f322fb77dfca93e940dd9694ce6d7ec00afa79a4.tar.gz
gentoo-2-f322fb77dfca93e940dd9694ce6d7ec00afa79a4.tar.bz2
gentoo-2-f322fb77dfca93e940dd9694ce6d7ec00afa79a4.zip
Adding script and DST patch
(Portage version: 2.0.51.19)
Diffstat (limited to 'gnome-extra')
-rw-r--r--gnome-extra/gdesklets-core/files/dst-fix-0.34.3.patch48
-rwxr-xr-xgnome-extra/gdesklets-core/files/gdesklets-control-getid37
2 files changed, 85 insertions, 0 deletions
diff --git a/gnome-extra/gdesklets-core/files/dst-fix-0.34.3.patch b/gnome-extra/gdesklets-core/files/dst-fix-0.34.3.patch
new file mode 100644
index 000000000000..78cfeab2c383
--- /dev/null
+++ b/gnome-extra/gdesklets-core/files/dst-fix-0.34.3.patch
@@ -0,0 +1,48 @@
+--- Controls/Time/__init__.py.orig 2005-04-05 16:49:18.000000000 -0500
++++ Controls/Time/__init__.py 2005-04-05 17:40:35.000000000 -0500
+@@ -44,31 +44,28 @@
+ def __set_timezone(self, tz):
+
+ self.__timezone = tz
+- have_tz = "TZ" in os.environ
++ self._update("timezone")
++
++
++ def __get_timezone(self): return self.__timezone
++
+
+- old_tz = os.environ.get("TZ", "")
++ def __get_time_and_date(self):
++
+ if (self.__timezone):
++ have_tz = "TZ" in os.environ
++ old_tz = os.environ.get("TZ", "")
++
+ os.environ["TZ"] = self.__timezone
+ time.tzset()
+
+- self.__timezone_offset = time.timezone
+-
+- if (self.__timezone):
++ tme = time.localtime()
+ if (not have_tz): del os.environ["TZ"]
+ else: os.environ["TZ"] = old_tz
+ time.tzset()
+-
+- self.__try_tick_date()
+- self._update("timezone")
+- self._update("date")
+-
+-
+- def __get_timezone(self): return self.__timezone
+-
+-
+- def __get_time_and_date(self):
+-
+- tme = time.gmtime(time.time() - self.__timezone_offset)
++ else:
++ tme = time.localtime()
++
+ return tme
+
+
diff --git a/gnome-extra/gdesklets-core/files/gdesklets-control-getid b/gnome-extra/gdesklets-core/files/gdesklets-control-getid
new file mode 100755
index 000000000000..db9f6820a84d
--- /dev/null
+++ b/gnome-extra/gdesklets-core/files/gdesklets-control-getid
@@ -0,0 +1,37 @@
+#! /usr/bin/env python
+# A simple script to get the name and id from a Control.
+# Pretty much copied from test-control.py
+
+from plugin.Interface import Interface
+from main import HOME
+from plugin import Permission
+
+
+import sys
+import os
+import code
+import __builtin__
+
+if "." not in sys.path: sys.path.append(".")
+if HOME not in sys.path: sys.path.append(HOME)
+
+
+try:
+ path = os.path.abspath(sys.argv[1])
+ folder, base = os.path.split(path)
+except:
+ sys.exit("Usage: gdesklets-control-getid <control-directory>")
+
+
+cwd = os.getcwd()
+os.chdir(folder)
+try:
+ module = __import__(base)
+ os.chdir(base)
+ clss = module.get_class()
+ ctrl = clss()
+
+except IOError:
+ sys.exit("Could not load control %s." % (path))
+
+print Interface.get_id(Interface.get_interfaces(clss)[0]).replace(":", "_")