system-config-printer/system-config-printer-DISPLAY.patch

57 lines
2.3 KiB
Diff
Raw Normal View History

diff -up system-config-printer-1.4.0/applet.py.DISPLAY system-config-printer-1.4.0/applet.py
--- system-config-printer-1.4.0/applet.py.DISPLAY 2013-03-27 12:19:07.000000000 +0000
+++ system-config-printer-1.4.0/applet.py 2013-04-11 15:33:03.102010436 +0100
@@ -1,6 +1,6 @@
#!/usr/bin/python
-## Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012 Red Hat, Inc.
+## Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
## Author: Tim Waugh <twaugh@redhat.com>
## This program is free software; you can redistribute it and/or modify
@@ -41,12 +41,7 @@ except locale.Error, e:
os.environ['LC_ALL'] = 'C'
locale.setlocale (locale.LC_ALL, "")
-try:
- from gi.repository import Notify
-except RuntimeError, e:
- print "%s:" % DOMAIN, e
- print "This is a graphical application and requires DISPLAY to be set."
- sys.exit (1)
+from gi.repository import Notify
APPDIR="/usr/share/system-config-printer"
ICON="printer"
diff -up system-config-printer-1.4.0/scp-dbus-service.py.DISPLAY system-config-printer-1.4.0/scp-dbus-service.py
--- system-config-printer-1.4.0/scp-dbus-service.py.DISPLAY 2013-03-27 12:19:08.000000000 +0000
+++ system-config-printer-1.4.0/scp-dbus-service.py 2013-04-11 15:33:03.102010436 +0100
@@ -2,7 +2,7 @@
## system-config-printer
-## Copyright (C) 2010, 2011, 2012 Red Hat, Inc.
+## Copyright (C) 2010, 2011, 2012, 2013 Red Hat, Inc.
## Authors:
## Tim Waugh <twaugh@redhat.com>
@@ -531,6 +531,7 @@ if __name__ == '__main__':
_client_demo ()
sys.exit (0)
+ Gtk.init (sys.argv)
debugprint ("Service running...")
loop = GObject.MainLoop ()
g_killtimer = KillTimer (killfunc=loop.quit)
diff -up system-config-printer-1.4.0/system-config-printer.py.DISPLAY system-config-printer-1.4.0/system-config-printer.py
--- system-config-printer-1.4.0/system-config-printer.py.DISPLAY 2013-03-27 12:19:08.000000000 +0000
+++ system-config-printer-1.4.0/system-config-printer.py 2013-04-11 15:33:03.103010439 +0100
@@ -31,6 +31,7 @@ from gi.repository import GdkPixbuf
try:
from gi.repository import Gdk
from gi.repository import Gtk
+ Gtk.init (sys.argv)
except RuntimeError, e:
print "system-config-printer:", e
print "This is a graphical application and requires DISPLAY to be set."