diff -u sysinfo-0.7/debian/changelog sysinfo-0.7/debian/changelog --- sysinfo-0.7/debian/changelog +++ sysinfo-0.7/debian/changelog @@ -1,3 +1,16 @@ +sysinfo (0.7-0ubuntu4) intrepid; urgency=low + + * three bugfixes : + * sysinfo fails to show all hardware when there are a lot of usb or pci + controllers + * debian/patches/02_fix_usb_pci_limit.dpatch (LP: #211347) + * the close button of the about dialog does not work + * debian/patches/03_fix_about_close_button.dpatch (LP: #174863) + * sysinfo should check whether nvidia-settings is installed + * debian/patches/04_check_nvidia_settings.dpatch (LP: #213507) + + -- Koen Beek Sun, 24 Aug 2008 01:52:37 +0200 + sysinfo (0.7-0ubuntu3) hardy; urgency=low * debian/watch: Added watch file (LP: #182700) diff -u sysinfo-0.7/debian/patches/00list sysinfo-0.7/debian/patches/00list --- sysinfo-0.7/debian/patches/00list +++ sysinfo-0.7/debian/patches/00list @@ -1,0 +2,3 @@ +02_fix_usb_pci_limit.dpatch +03_fix_about_close_button.dpatch +04_check_nvidia_settings.dpatch only in patch2: unchanged: --- sysinfo-0.7.orig/debian/patches/02_fix_usb_pci_limit.dpatch +++ sysinfo-0.7/debian/patches/02_fix_usb_pci_limit.dpatch @@ -0,0 +1,128 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 02_fix_usb_pci_limit.dpatch by Koen Beek +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Remove the limit of the number of the usb and pci controllers that can be shown by sysinfo + +@DPATCH@ +diff -urNad sysinfo-0.7~/Sysinfo/HardwareInfo.cs sysinfo-0.7/Sysinfo/HardwareInfo.cs +--- sysinfo-0.7~/Sysinfo/HardwareInfo.cs 2008-10-06 22:32:18.000000000 +0200 ++++ sysinfo-0.7/Sysinfo/HardwareInfo.cs 2008-10-06 22:32:19.000000000 +0200 +@@ -4,14 +4,15 @@ + using System; + using System.IO; + using System.Diagnostics; ++using System.Collections; + + namespace Sysinfo { + + public class HardwareInfo { + + public String [] host_bridge = {null, null}; +- public String [] pci_bridge = {null, null, null, null, null}; +- public String [] usb_controller = {null, null, null, null, null}; ++ public ArrayList pci_bridge = new ArrayList(); ++ public ArrayList usb_controller = new ArrayList(); + public String [] isa_bridge = {null, null}; + public String [] ide_interface = {null, null}; + +@@ -85,16 +86,16 @@ + } + + //pci bridge +- if ( temp.Remove(0, temp.IndexOf(" ") + 1).StartsWith("PCI bridge") ) { ++ if (temp.Remove(0, temp.IndexOf(" ") + 1).StartsWith("PCI bridge")) { + +- pci_bridge [pci_bridgeI] = temp.Remove(0, temp.IndexOf(" ") + 13); ++ pci_bridge.Add(temp.Remove(0, temp.IndexOf(" ") + 13)); + pci_bridgeI++; + } + + //usb controller +- if ( temp.Remove(0, temp.IndexOf(" ") + 1).StartsWith("USB Controller") ) { ++ if (temp.Remove(0, temp.IndexOf(" ") + 1).StartsWith("USB Controller")) { + +- usb_controller [usb_controllerI] = temp.Remove(0, temp.IndexOf(" ") + 17); ++ usb_controller.Add(temp.Remove(0, temp.IndexOf(" ") + 17)); + usb_controllerI++; + } + +diff -urNad sysinfo-0.7~/Sysinfo/Main.cs sysinfo-0.7/Sysinfo/Main.cs +--- sysinfo-0.7~/Sysinfo/Main.cs 2008-10-06 22:32:18.000000000 +0200 ++++ sysinfo-0.7/Sysinfo/Main.cs 2008-10-06 22:32:19.000000000 +0200 +@@ -1,4 +1,3 @@ +-// project created on 10/18/2005 at 2:06 PM - continued 01/27/2006 + // + // Main.cs: Main source file of Sysinfo. + // +@@ -764,25 +763,21 @@ + motherboard_treestore.AppendValues (motherboard_iter, "Subsystem: " + hardware_info.host_bridge[1]); + } + //pci brige info - populate treestore +- if ( hardware_info.pci_bridge[0] != null ) { ++ if ( hardware_info.pci_bridge.Count > 0 ) { + + motherboard_iter = motherboard_treestore.AppendValues ("PCI bridge(s)"); + +- for ( int i = 0; i < 5; i++) { +- +- if ( hardware_info.pci_bridge[i] != null ) +- motherboard_treestore.AppendValues (motherboard_iter, hardware_info.pci_bridge[i]); ++ foreach (object pci_brdg in hardware_info.pci_bridge) { ++ motherboard_treestore.AppendValues (motherboard_iter, pci_brdg); + } + } + //usb controller info - populate treestore +- if ( hardware_info.usb_controller[0] != null ) { ++ if ( hardware_info.usb_controller.Count > 0 ) { + + motherboard_iter = motherboard_treestore.AppendValues ("USB controller(s)"); + +- for ( int i = 0; i < 5; i++) { +- +- if ( hardware_info.usb_controller[i] != null ) +- motherboard_treestore.AppendValues (motherboard_iter, hardware_info.usb_controller[i]); ++ foreach(object usb_ctrlr in hardware_info.usb_controller) { ++ motherboard_treestore.AppendValues (motherboard_iter, usb_ctrlr); + } + } + //isa brige info - populate treestore +@@ -1060,7 +1055,7 @@ + //launch nvidia-settings button + public void on_nvidia_button_clicked (object o, EventArgs e) { + +- Process proc1 = new Process(); ++ System.Diagnostics.Process proc1 = new System.Diagnostics.Process(); + proc1.StartInfo.FileName = "nvidia-settings"; + //proc1.StartInfo.Arguments = "&"; + //proc1.StartInfo.UseShellExecute = false; +diff -urNad sysinfo-0.7~/Sysinfo/SaveToFile.cs sysinfo-0.7/Sysinfo/SaveToFile.cs +--- sysinfo-0.7~/Sysinfo/SaveToFile.cs 2008-10-06 22:32:18.000000000 +0200 ++++ sysinfo-0.7/Sysinfo/SaveToFile.cs 2008-10-06 22:32:19.000000000 +0200 +@@ -138,20 +138,17 @@ + if ( hardware_info.host_bridge[1] != null ) + textwrite.WriteLine("\t\tSubsystem: " + hardware_info.host_bridge[1]); + } +- if ( hardware_info.pci_bridge[0] != null ) { ++ if ( hardware_info.pci_bridge.Count > 0 ) { + + textwrite.WriteLine("\tPCI bridge(s)"); +- for ( int i = 0; i < 5; i++) { +- if ( hardware_info.pci_bridge[i] != null ) +- textwrite.WriteLine("\t\t" + hardware_info.pci_bridge[i]); ++ foreach (object pci_brdg in hardware_info.pci_bridge) { ++ textwrite.WriteLine("\t\t" + pci_brdg); + } + } +- if ( hardware_info.usb_controller[0] != null ) { +- ++ if ( hardware_info.usb_controller.Count > 0 ) { + textwrite.WriteLine("\tUSB controller(s)"); +- for ( int i = 0; i < 5; i++) { +- if ( hardware_info.usb_controller[i] != null ) +- textwrite.WriteLine("\t\t" + hardware_info.usb_controller[i]); ++ foreach (object usb_ctrlr in hardware_info.usb_controller) { ++ textwrite.WriteLine("\t\t" + usb_ctrlr); + } + } + if ( hardware_info.isa_bridge[0] != null ) { only in patch2: unchanged: --- sysinfo-0.7.orig/debian/patches/03_fix_about_close_button.dpatch +++ sysinfo-0.7/debian/patches/03_fix_about_close_button.dpatch @@ -0,0 +1,44 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 03_fix_about_close_button.dpatch by Koen Beek +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: close button of about dialog box did not work + +@DPATCH@ +diff -urNad sysinfo-0.7~/Sysinfo/Main.cs sysinfo-0.7/Sysinfo/Main.cs +--- sysinfo-0.7~/Sysinfo/Main.cs 2008-08-24 01:44:50.000000000 +0200 ++++ sysinfo-0.7/Sysinfo/Main.cs 2008-08-24 01:45:51.000000000 +0200 +@@ -1135,6 +1135,10 @@ + + aboutdialog1.Show(); + } ++ ++ public void on_aboutdialog1_response (object o, ResponseArgs r) { ++ aboutdialog1.Hide(); ++ } + + //menu - preferences dialog + public void on_preferences1_activate (object o, EventArgs e) { +diff -urNad sysinfo-0.7~/Sysinfo/gui.glade sysinfo-0.7/Sysinfo/gui.glade +--- sysinfo-0.7~/Sysinfo/gui.glade 2008-08-24 01:34:06.000000000 +0200 ++++ sysinfo-0.7/Sysinfo/gui.glade 2008-08-24 01:46:25.000000000 +0200 +@@ -3684,6 +3684,19 @@ + Fedora logo <http://fedora.redhat.com> + Ubuntu logo <http://www.ubuntu.com> (Ubuntu is a trademark of Canonical Limited) + translator-credits ++ ++ ++ ++ ++ ++ ++ ++ False ++ GTK_PACK_END ++ ++ ++ ++ + + + only in patch2: unchanged: --- sysinfo-0.7.orig/debian/patches/04_check_nvidia_settings.dpatch +++ sysinfo-0.7/debian/patches/04_check_nvidia_settings.dpatch @@ -0,0 +1,113 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 04_check_nvidia_settings.dpatch by Koen Beek +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: don't show link to nvidia-settings if it is not installed + +@DPATCH@ + +diff -Nru sysinfo-0.7.orig/Sysinfo/gui.glade sysinfo-0.7/Sysinfo/gui.glade +--- sysinfo-0.7.orig/Sysinfo/gui.glade 2008-08-24 00:52:12.000000000 +0200 ++++ sysinfo-0.7/Sysinfo/gui.glade 2008-08-24 01:10:50.000000000 +0200 +@@ -2753,7 +2753,24 @@ + + + +- ++ ++ ++ True ++ True ++ "nvidia-settings" is not installed - install it with a package manager ++ False ++ False ++ ++ 2 ++ ++ ++ 1 ++ 2 ++ 4 ++ 5 ++ ++ ++ + + + True +diff -Nru sysinfo-0.7.orig/Sysinfo/Main.cs sysinfo-0.7/Sysinfo/Main.cs +--- sysinfo-0.7.orig/Sysinfo/Main.cs 2008-08-24 00:49:48.000000000 +0200 ++++ sysinfo-0.7/Sysinfo/Main.cs 2008-08-24 01:05:44.000000000 +0200 +@@ -94,7 +94,8 @@ + //nvidia + [Widget] DrawingArea nvidia_top_drawingarea; + [Widget] Image nvidia_image; +- [Widget] Entry nvidia_model_entry, nvidia_ctype_entry, nvidia_version_entry, nvidia_videoram_entry, nvidia_gpu_entry; ++ [Widget] Button nvidia_button; ++ [Widget] Entry nvidia_model_entry, nvidia_ctype_entry, nvidia_settings_not_installed, nvidia_version_entry, nvidia_videoram_entry, nvidia_gpu_entry; + + //base directory - not needed now + //String base_directory = System.AppDomain.CurrentDomain.BaseDirectory; +@@ -890,6 +891,18 @@ + nvidia_gpu_entry.Text = nvidia_info.nvidia_gpu; + + nvidia_version_entry.Text = nvidia_info.nvidia_version; ++ ++ if ( ! nvidia_info.nvidiaSettings ) { ++ nvidia_settings_not_installed.Text = "Please install nvidia-settings for more information"; ++ nvidia_settings_not_installed.Visible = true; ++ nvidia_button.Sensitive = false; ++ nvidia_button.Visible = false; ++ } else { ++ nvidia_settings_not_installed.Text = ""; ++ nvidia_settings_not_installed.Visible = false; ++ nvidia_button.Sensitive = true; ++ nvidia_button.Visible = true; ++ } + + nvidiaA = false; + } +diff -Nru sysinfo-0.7.orig/Sysinfo/NvidiaInfo.cs sysinfo-0.7/Sysinfo/NvidiaInfo.cs +--- sysinfo-0.7.orig/Sysinfo/NvidiaInfo.cs 2008-08-24 00:46:11.000000000 +0200 ++++ sysinfo-0.7/Sysinfo/NvidiaInfo.cs 2008-08-24 01:02:53.000000000 +0200 +@@ -10,6 +10,7 @@ + public class NvidiaInfo { + + public Boolean nvidiaB = false; ++ public Boolean nvidiaSettings = false; + + public String nvidia_model = "unknown"; + public String nvidia_ctype = "unknown"; +@@ -26,6 +27,13 @@ + if ( Directory.Exists("/proc/driver/nvidia/") ) + nvidiaB = true; + } ++ ++ //check nvidia-settings is installed ++ public void NvidiaSettingsInstalled() { ++ ++ if ( System.IO.File.Exists("/usr/bin/nvidia-settings") ) ++ nvidiaSettings = true; ++ } + + //read some basic info + public void MainInfo(){ +@@ -93,6 +101,9 @@ + String temp; + + try { ++ NvidiaSettingsInstalled(); ++ ++ if (nvidiaSettings) { + + //run command and read output: nvidia-settings --query + //video ram +@@ -152,6 +163,8 @@ + } + + proc3.Close(); ++ ++ } // end of nvidiaSettings test + } + catch (System.ComponentModel.Win32Exception ex) { Console.WriteLine( ex ); } + catch (ArgumentOutOfRangeException ex) { Console.WriteLine( ex ); }