SVN commit 484773 by sedwards: * debian/rules updated to support displayconfig. * setup.py now installs displayconfig-restore. * displayconfig-restore.desktop files add. When installed in /usr/share/autostart, this sets the screen resolution during login. * displayconfig: fixed bug when generating unique names for xorg.conf screen sections. * displayconfig: fixed bug reading in xorg.conf screen and device sections of secondary heads.
M +1 -6 debian/rules A displayconfig/displayconfig-restore.desktop M +10 -4 displayconfig/displayconfigabstraction.py M +1 -1 displayconfig/xorgconfig.py M +5 -3 setup.py --- trunk/playground/base/guidance/debian/rules #484772:484773 @@ -60,6 +60,7 @@ # redo the link properly (cd debian/kde-guidance/usr/bin; ln -sf ../lib/python2.4/site-packages/displayconfig.py displayconfig) + (cd debian/kde-guidance/usr/bin; ln -sf ../lib/python2.4/site-packages/displayconfig-restore.py displayconfig-restore) (cd debian/kde-guidance/usr/bin; ln -sf ../lib/python2.4/site-packages/mountconfig.py mountconfig) (cd debian/kde-guidance/usr/bin; ln -sf ../lib/python2.4/site-packages/serviceconfig.py serviceconfig) (cd debian/kde-guidance/usr/bin; ln -sf ../lib/python2.4/site-packages/userconfig.py userconfig) @@ -80,12 +81,6 @@ chmod 0644 debian/kde-guidance/usr/lib/python2.4/site-packages/displayconfigwidgets.py chmod 0644 debian/kde-guidance/usr/lib/python2.4/site-packages/fuser_ui.py - # until displayconfig works on debian, we remove it - rm -f debian/kde-guidance/usr/bin/displayconfig - ##rm -f debian/kde-guidance/usr/share/applnk/Settings/System/displayconfig.desktop - rm -f debian/kde-guidance/usr/share/applications/kde/displayconfig.desktop - rm -f debian/kde-guidance/usr/share/apps/guidance/displayconfig* - # copy icons to right place mkdir debian/kde-guidance/usr/share/icons/crystalsvg/32x32/ mkdir debian/kde-guidance/usr/share/icons/crystalsvg/32x32/apps/ --- trunk/playground/base/guidance/displayconfig/displayconfigabstraction.py #484772:484773 @@ -166,17 +166,22 @@ # Compare the first two numbers that make up a PCI bus id (e.g. middle part of PCI:1:0:0) if gfx_card.getPCIBusID().split(":")[1:-1] == [str(pci_device.pci_bus),str(pci_device.pci_device)]: screens = gfx_card.getScreens() + if len(screens)<2: # Try to find a lose xorg.conf Screen section that also # references this gfx card. That is probably the config # for the second screen. - for screen_section in xorg_unused_screen_sections: if screen_section.device in xorg_device_name_dict: device_section = xorg_device_name_dict[screen_section.device] # Is this the second screen for the same PCI device aka gfxcard? - if device_section.screen=="1" and self._canonicalPCIBusID(device_section.busid): + + # Note: even though the second head shows up as a separate PCI ID, the screen + # section in xorg.conf still uses the primary PCI ID. + if str(device_section.screen)=="1" and \ + self._canonicalPCIBusID(device_section.busid)==gfx_card.getPCIBusID(): + # Look up the monitor section from the monitor name. monitor_section = None monitor_model = None @@ -184,6 +189,8 @@ monitor_section = xorg_monitor_name_dict[screen_section.monitor] monitor_model = self._matchMonitor(monitor_section) + gfx_card._addXDevice(device_section) + screen = Screen(x_config_screen=screen_section, gfx_card=gfx_card, \ x_config_monitor=monitor_section, monitor_model=monitor_model, \ x_config=self.xorg_config) @@ -196,8 +203,7 @@ gfx_card._addScreen(screen) # FIXME Handle lose gfx card devices. Check that all PCI gfxcards are accounted for. - - print self + return def _matchMonitor(self,monitor_section): --- trunk/playground/base/guidance/displayconfig/xorgconfig.py #484772:484773 @@ -564,7 +564,7 @@ """ # Build a list of used identifiers used_identifiers = [] - for name in ['monitor','videoadaptor','inputdevice','serverlayout','device']: + for name in ['monitor','videoadaptor','inputdevice','serverlayout','device','screen']: for section in self.getSections(name): if section.identifier is not None: used_identifiers.append(section.identifier) --- trunk/playground/base/guidance/setup.py #484772:484773 @@ -21,7 +21,7 @@ ########################################################################### def doit(): kdedistutils.setup(name="guidance", - version="0.5.0", + version="0.5.1", author="Simon Edwards", author_email="[EMAIL PROTECTED]", url="http://www.simonzone.com/software/guidance/", @@ -31,13 +31,15 @@ executable_links = [('serviceconfig','serviceconfig.py'), ('userconfig','userconfig.py'), ('mountconfig','mountconfig.py'), - ('displayconfig','displayconfig.py')], + ('displayconfig','displayconfig.py'), + ('displayconfig-restore','displayconfig-restore.py')], data_files = [# Icons for in KControl ('share/icons/crystalsvg/16x16/apps',['kde/serviceconfig/pics/16x16/daemons.png', 'kde/mountconfig/pics/16x16/disksfilesystems.png', 'kde/userconfig/pics/16x16/userconfig.png', - 'kde/displayconfig/pics/16x16/displayconfig.png'])], + 'kde/displayconfig/pics/16x16/displayconfig.png']), + ('share/autostart',['displayconfig/displayconfig-restore.desktop'])], i18n = ('po',['mountconfig','userconfig','serviceconfig','displayconfig']), -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]