rpms/system-config-display/devel scd-1.0.51-unkudzify.patch, NONE, 1.1 system-config-display.spec, 1.56, 1.57

Adam Jackson (ajax) fedora-extras-commits at redhat.com
Mon Feb 25 18:35:11 UTC 2008


Author: ajax

Update of /cvs/pkgs/rpms/system-config-display/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv26320

Modified Files:
	system-config-display.spec 
Added Files:
	scd-1.0.51-unkudzify.patch 
Log Message:
* Mon Feb 25 2008 Adam Jackson <ajax at redhat.com> 1.0.51-7
- scd-1.0.51-unkudzify.patch: Replace kudzu dependency with dbus dependency.
- Fix the chmod fix from -6 to, you know, work.


scd-1.0.51-unkudzify.patch:

--- NEW FILE scd-1.0.51-unkudzify.patch ---
diff --git a/src/xConfigDialog.py b/src/xConfigDialog.py
index a045cc6..289c1a4 100644
--- a/src/xConfigDialog.py
+++ b/src/xConfigDialog.py
@@ -23,7 +23,7 @@ import gtk.glade
 import monitorDialog
 import screenSizePreview
 import videocardDialog
-import kudzu
+import dbus
 import rhpxl.videocard
 from rhpl.translate import _, N_,textdomain
 from rhpxl.xhwstate import *
@@ -484,6 +484,13 @@ class XConfigDialog:
             elif ord(edid[x]) == 0xfd:
                 state.set_vsync("%d-%d" % (ord(edid[x+2]), ord(edid[x+3])))
                 state.set_hsync("%d-%d" % (ord(edid[x+4]), ord(edid[x+5])))
+    
+    def hal_pci_video_card_list(self):
+	bus = dbus.SystemBus()
+	hal = dbus.Interface(bus.get_object("org.freedesktop.Hal", "/org/freedesktop/Hal/Manager"), "org.freedesktop.Hal.Manager")
+	devstrings = hal.FindDeviceStringMatch("info.bus", "pci")
+	devs = map(lambda x: dbus.Interface(bus.get_object("org.freedesktop.Hal", x), "org.freedesktop.Hal.Device"), devstrings)
+	return filter(lambda x: x.GetProperty("pci.device_class") == 3, devs)
 
     def __init__(self, hardware_state, xconfig, vc):
         self.vc = vc
@@ -595,7 +602,7 @@ class XConfigDialog:
         self.secondResolutionOptionMenu.set_history(current)
         self.secondResolutionOptionMenu.show_all()
 
-        self.kudzu_videocard_list = kudzu.probe(kudzu.CLASS_VIDEO, kudzu.BUS_PCI, kudzu.PROBE_ALL)
+        self.hal_videocard_list = self.hal_pci_video_card_list()
 
         if self.state.get_xconfig():
             #If the XF86Config file already exists
@@ -609,9 +616,10 @@ class XConfigDialog:
 
         videocard_menu = gtk.Menu()
 
-        for card in self.kudzu_videocard_list:
-            item = gtk.MenuItem(card.desc)
-            item.set_data("NAME", card.desc)
+        for card in self.hal_videocard_list:
+	    desc = card.GetProperty("info.vendor") + " " + card.GetProperty("info.product")
+            item = gtk.MenuItem(desc)
+            item.set_data("NAME", desc)
             videocard_menu.append(item)
 
         self.secondVideocardOptionMenu = xml.get_widget("secondVideocardOptionMenu")


Index: system-config-display.spec
===================================================================
RCS file: /cvs/pkgs/rpms/system-config-display/devel/system-config-display.spec,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -r1.56 -r1.57
--- system-config-display.spec	12 Feb 2008 19:48:46 -0000	1.56
+++ system-config-display.spec	25 Feb 2008 18:34:35 -0000	1.57
@@ -1,7 +1,7 @@
 Summary: A graphical interface for configuring the X Window System display
 Name: system-config-display
 Version: 1.0.51
-Release: 6%{?dist}
+Release: 7%{?dist}
 URL: http://fedoraproject.org/wiki/SystemConfig/Tools
 License: GPL
 ExclusiveOS: Linux
@@ -15,6 +15,7 @@
 Source0: %{name}-%{version}.tar.bz2
 
 Patch0: scd-1.0.51-config-util.patch
+Patch1: scd-1.0.51-unkudzify.patch
 
 ExcludeArch: s390 s390x
 BuildRequires: desktop-file-utils
@@ -24,7 +25,7 @@
 Requires: python2
 Requires: usermode >= 1.36
 Requires: hwdata >= 0.169
-Requires: kudzu >= 1.2.0
+Requires: dbus-python
 Requires: pyxf86config >= 0.3.16
 Requires: rhpl >= 0.170-1
 Requires: rhpxl >= 0.34-1
@@ -40,6 +41,7 @@
 %prep
 %setup -q
 %patch0 -p1 -b .config-util
+%patch1 -p1 -b .unkudzify
 
 %build
 make
@@ -53,7 +55,7 @@
   --remove-category SystemSetup 			\
   --add-category Settings 				\
   $RPM_BUILD_ROOT%{_datadir}/applications/system-config-display.desktop
-chmod a-x $RPM_BUILD_ROOT%{_datadir}/applications/system-config-display/pixmaps/*
+chmod a-x $RPM_BUILD_ROOT%{_datadir}/system-config-display/pixmaps/*
 
 %find_lang %name
 
@@ -83,6 +85,10 @@
 %attr(0644,root,root) %{_datadir}/icons/hicolor/48x48/apps/system-config-display.png
 
 %changelog
+* Mon Feb 25 2008 Adam Jackson <ajax at redhat.com> 1.0.51-7
+- scd-1.0.51-unkudzify.patch: Replace kudzu dependency with dbus dependency.
+- Fix the chmod fix from -6 to, you know, work.
+
 * Tue Feb 12 2008 Adam Jackson <ajax at redhat.com> 1.0.51-6
 - Clear executable bit from the icons. (#429875)
 




More information about the fedora-extras-commits mailing list