[Python-apps-commits] r2685 - in packages/bleachbit/trunk/debian (3 files)
dktrkranz-guest at users.alioth.debian.org
dktrkranz-guest at users.alioth.debian.org
Mon Apr 6 10:07:59 UTC 2009
Date: Monday, April 6, 2009 @ 10:07:57
Author: dktrkranz-guest
Revision: 2685
Do not show intrusive pyGTK warnings if X is not available (Closes: #520107)
Added:
packages/bleachbit/trunk/debian/patches/no_X
Modified:
packages/bleachbit/trunk/debian/changelog
packages/bleachbit/trunk/debian/patches/series
Modified: packages/bleachbit/trunk/debian/changelog
===================================================================
--- packages/bleachbit/trunk/debian/changelog 2009-04-06 10:03:04 UTC (rev 2684)
+++ packages/bleachbit/trunk/debian/changelog 2009-04-06 10:07:57 UTC (rev 2685)
@@ -2,8 +2,11 @@
* debian/patches/LANG_env:
- Fix AttributeError if LANG is not set (Closes: #519027).
+ * debian/patches/no_X:
+ - Do not show intrusive pyGTK warnings if X is not available, only
+ display a message X is required to run BleachBit (Closes: #520107).
- -- Luca Falavigna <dktrkranz at ubuntu.com> Mon, 06 Apr 2009 12:01:22 +0200
+ -- Luca Falavigna <dktrkranz at ubuntu.com> Mon, 06 Apr 2009 12:03:55 +0200
bleachbit (0.4.0-1) unstable; urgency=low
Added: packages/bleachbit/trunk/debian/patches/no_X
===================================================================
--- packages/bleachbit/trunk/debian/patches/no_X (rev 0)
+++ packages/bleachbit/trunk/debian/patches/no_X 2009-04-06 10:07:57 UTC (rev 2685)
@@ -0,0 +1,36 @@
+Index: bleachbit-0.4.0/bleachbit/GUI.py
+===================================================================
+--- bleachbit-0.4.0.orig/bleachbit/GUI.py 2009-04-06 11:49:12.000000000 +0200
++++ bleachbit-0.4.0/bleachbit/GUI.py 2009-04-06 11:52:59.000000000 +0200
+@@ -20,14 +20,18 @@
+
+
+ from gettext import gettext as _
+-import pygtk
+-pygtk.require('2.0')
+-import gtk
+-import gobject
+ import os
+ import sys
+ import threading
+ import traceback
++import warnings
++
++warnings.simplefilter('error')
++import pygtk
++pygtk.require('2.0')
++import gtk
++import gobject
++warnings.simplefilter('default')
+
+ import FileUtilities
+ import Update
+@@ -695,6 +699,8 @@
+ gobject.idle_add(self.enable_online_update, update.get_update_info_url())
+
+ def __init__(self):
++ if None == os.getenv('DISPLAY'):
++ sys.exit(_('Bleachbit requires a graphical display'))
+ import RecognizeCleanerML
+ rcml = RecognizeCleanerML.RecognizeCleanerML()
+ import CleanerML
Modified: packages/bleachbit/trunk/debian/patches/series
===================================================================
--- packages/bleachbit/trunk/debian/patches/series 2009-04-06 10:03:04 UTC (rev 2684)
+++ packages/bleachbit/trunk/debian/patches/series 2009-04-06 10:07:57 UTC (rev 2685)
@@ -2,3 +2,4 @@
no_update
launcher
LANG_env
+debian/patches/no_X
More information about the Python-apps-commits
mailing list