--- sysinfo-0.7.orig/Sysinfo/Main.cs +++ sysinfo-0.7/Sysinfo/Main.cs @@ -5,7 +5,7 @@ // Author: // Nil Gradisnik // -// Copyright (C) Nil Gradisnik 2006 +// Copyright (C) Nil Gradisnik 2006 and http://sourceforge.net/projects/gsysinfo // /* * Sysinfo is free software. @@ -145,8 +145,6 @@ //glade xml and autoconnect Glade.XML gxml = new Glade.XML (null, "gui.glade", "window1", null); gxml.Autoconnect (this); - Glade.XML gxml_aboutd = new Glade.XML (null, "gui.glade", "aboutdialog1", null); - gxml_aboutd.Autoconnect (this); Glade.XML gxml_preferencesd = new Glade.XML (null, "gui.glade", "preferences_dialog", null); gxml_preferencesd.Autoconnect (this); Glade.XML gxml_filechooserd = new Glade.XML (null, "gui.glade", "filechooserdialog1", null); @@ -1128,6 +1126,9 @@ //menu - about dialog public void on_about1_activate (object o, EventArgs e) { + + Glade.XML gxml_aboutd = new Glade.XML (null, "gui.glade", "aboutdialog1", null); + gxml_aboutd.Autoconnect (this); aboutdialog1.Version = sysinfo_version; aboutdialog1.Logo = logoPix; --- sysinfo-0.7.orig/Sysinfo/gui.glade +++ sysinfo-0.7/Sysinfo/gui.glade @@ -3666,8 +3666,8 @@ 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. False - http://sysinfo.r8.org - sysinfo.r8.org + http://sourceforge.net/projects/gsysinfo + sourceforge.net/projects/gsysinfo Nil Gradisnik <ghaefb@gmail.com> @@ -3681,7 +3681,7 @@ Eva Gostencnik <neivla@gmail.com> Tango icons <http://tango-project.org> -Fedora logo <htp://fedora.redhat.com> +Fedora logo <http://fedora.redhat.com> Ubuntu logo <http://www.ubuntu.com> (Ubuntu is a trademark of Canonical Limited) translator-credits --- sysinfo-0.7.orig/Sysinfo/NvidiaInfo.cs +++ sysinfo-0.7/Sysinfo/NvidiaInfo.cs @@ -107,8 +107,11 @@ temp = proc1.StandardOutput.ReadLine(); temp = proc1.StandardOutput.ReadLine(); - temp = temp.Remove(0, temp.LastIndexOf(":") + 2); - nvidia_videoram = ( Double.Parse(temp) / 1024 ).ToString() + " MB"; + + if (temp != null) { + temp = temp.Remove(0, temp.LastIndexOf(":") + 2); + nvidia_videoram = ( Double.Parse(temp) / 1024 ).ToString() + " MB"; + } proc1.Close(); @@ -124,8 +127,10 @@ temp = proc2.StandardOutput.ReadLine(); temp = proc2.StandardOutput.ReadLine(); - temp = temp.Remove(0, temp.LastIndexOf(":") + 2); - nvidia_busrate = temp.Remove(temp.LastIndexOf("."), 1) + "x"; + if (temp != null) { + temp = temp.Remove(0, temp.LastIndexOf(":") + 2); + nvidia_busrate = temp.Remove(temp.LastIndexOf("."), 1) + "x"; + } proc2.Close(); @@ -140,9 +145,11 @@ temp = proc3.StandardOutput.ReadLine(); temp = proc3.StandardOutput.ReadLine(); - - temp = temp.Remove(0, temp.LastIndexOf(":") + 2); - nvidia_gpu = temp.Remove(temp.LastIndexOf(","), 5) + " MHz"; + + if (temp != null) { + temp = temp.Remove(0, temp.LastIndexOf(":") + 2); + nvidia_gpu = temp.Remove(temp.LastIndexOf(","), 5) + " MHz"; + } proc3.Close(); } --- sysinfo-0.7.orig/Sysinfo/SaveToFile.cs +++ sysinfo-0.7/Sysinfo/SaveToFile.cs @@ -39,7 +39,7 @@ using (TextWriter textwrite = File.CreateText(filename)) { textwrite.WriteLine("System information report, generated by Sysinfo: " + DateTime.Now); - textwrite.WriteLine("http://sysinfo.r8.org\n"); + textwrite.WriteLine("http://sourceforge.net/projects/gsysinfo\n"); //system textwrite.WriteLine("SYSTEM INFORMATION"); --- sysinfo-0.7.orig/Sysinfo/SystemInfo.cs +++ sysinfo-0.7/Sysinfo/SystemInfo.cs @@ -30,6 +30,8 @@ //read release info public void Release() { + + String temp; try { @@ -64,7 +66,7 @@ system_release = textread.ReadLine(); } } - + if (File.Exists("/etc/debian_version")) { using (TextReader textread = File.OpenText("/etc/debian_version")) { @@ -125,6 +127,31 @@ } } + if (File.Exists("/etc/lsb-release")) { + using (TextReader textread = File.OpenText("/etc/lsb-release")) { + + while ( (temp = textread.ReadLine()) != null ) { + + // get distro + if ( temp.StartsWith("DISTRIB_ID=") ) { + distro = temp.Substring(11); + } + + // get release + if ( temp.StartsWith("DISTRIB_RELEASE=") ) { + system_release = temp.Substring(16); + } + + // get codename + if ( temp.StartsWith("DISTRIB_CODENAME=") ) { + system_release = String.Concat(system_release, " (", temp.Substring(17), ")"); + } + + } + system_release = String.Concat(distro, " ", system_release); + } + } + } catch (FileNotFoundException ex) { Console.WriteLine( ex ); } } @@ -291,7 +318,7 @@ proc2.WaitForExit(); system_gcc = system_gcc + " (" + proc2.StandardOutput.ReadToEnd(); - system_gcc = system_gcc.Remove(system_gcc.Length - 1, 1) + + ")"; + system_gcc = system_gcc.Remove(system_gcc.Length - 1, 1) + ")"; proc2.Close(); } --- sysinfo-0.7.orig/debian/control +++ sysinfo-0.7/debian/control @@ -0,0 +1,25 @@ +Source: sysinfo +Section: utils +Priority: optional +XSBC-Original-Maintainer: Szilveszter Farkas (Phanatic) +Maintainer: Ubuntu MOTU Developers +Build-Depends: dpatch, debhelper (>= 5) +Build-Depends-Indep: cli-common-dev (>= 0.4.0), automake1.9, autotools-dev, mono-devel, pkg-config, libmono-cairo2.0-cil, libgtk2.0-cil, libgnome2.0-cil, libgconf2.0-cil +Homepage: http://gsysinfo.sourceforge.net/ +Standards-Version: 3.7.3 + +Package: sysinfo +Architecture: all +Depends: ${cli:Depends} +Description: Simple GTK program that shows some UNIX/Linux system information + Sysinfo displays computer and system information. + . + 1. System: Linux distribution release, GNOME version, Kernel version, Gcc + version, Xorg version, hostname. + 2. CPU: Vendor identification, model name, frequency, level2 cache, bogomips, + model numbers, flags. + 3. Memory: Total system memory RAM, free memory, swap space total & free, + cached, active, inactive memory. + 4. Storage: IDE interface, all IDE devices(disks, cd/dvd roms), SCSI devices. + 5. Hardware: motherboard, graphic card, sound card, network devices. + 6. NVIDIA graphic card: only with NVIDIA display driver installed. --- sysinfo-0.7.orig/debian/changelog +++ sysinfo-0.7/debian/changelog @@ -0,0 +1,115 @@ +sysinfo (0.7-1ubuntu3) jaunty; urgency=low + + * Set MONO_CAIRO_LIBS=-r:Mono.Cairo to manually provide Mono.Cairo + build information (instead of using the 1.0-only pkg-config entry) + * Set MONO_CAIRO_CFLAGS to " " to fool configure into not asking + pkg-config for mono-cairo.pc + + -- Stefan Ebner Mon, 29 Dec 2008 15:17:07 +0100 + +sysinfo (0.7-1ubuntu2) jaunty; urgency=low + + * Reupload our old ubuntu version until I carefully + checked the remaining changes :( + + -- Stefan Ebner Mon, 29 Dec 2008 14:53:44 +0100 + +sysinfo (0.7-0ubuntu5) jaunty; urgency=low + + * Mono 2.0 transition. + - Use libmono-cairo2.0-cil instead of the 1.0 version. + - Build-Depend on mono-devel instead of mono-mcs so we can uses csc. + - Add MCS=/usr/bin/csc to debian/rules configure call so that csc is + the detected compiler... + - ...and then call make with ASSEMBLY_COMPILER_COMMAND=csc as that is + the variable that is actually used. + - Add MONO_CAIRO_LIBS=-r:/usr/lib/mono/2.0/Mono.Cairo.dll to configure + call to override what is detected from pkg-config. The 2.0 of + mono-cairo doesn't ship a pkg-congfig file, the 1.0 version + is picked up and it causes a build failure. Thanks to Jo Shields for + the help. + + -- James Westby Sun, 30 Nov 2008 19:21:57 +0000 + +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) + * debian/control: + - Bump Standards-Version to 3.7.3 + - b-d on debhelper (>= 5) and dpatch + * debian/patches/01_fix_desktop: to fix desktop file + * Fix minor lintian warnings (distclean) + + -- Pedro Fragoso Sun, 13 Jan 2008 20:27:43 +0000 + +sysinfo (0.7-0ubuntu2) hardy; urgency=low + + * References to website http://sysinfo.r8.org replaced by http://sourceforge.net/projects/gsysinfo (LP: #138801) + * About box could only be used once, secodn, etc times it just produced a small rectangle (LP: #174863) + * Crash when clicking on Nvidia icon (LP: #159974) + * Use of lsb-release version information (now shows ubuntu release in stead of debian release on ubuntu) (LP: #121068) + * SystemInfo.cs contained a double + which made the build of the source package fail + + -- Koen Beek Sat, 08 Dec 2007 21:13:41 +0100 + +sysinfo (0.7-0ubuntu1) feisty; urgency=low + + * New upstream release. + * Old C++ code dropped, using C# (Mono) instead. + + -- Szilveszter Farkas (Phanatic) Sun, 12 Nov 2006 17:31:00 +0100 + +sysinfo (0.6.1-0ubuntu5) edgy; urgency=low + + * debian/patches/other_info-more-buffer.patch: + - increase buffer size, so sysinfo won't hang when reading /proc/bus/input/devices (Close: Malone #47254) + * debian/patches/hardware_info-adjust-truncate.patch: + * debian/patches/usb_info-adjust-truncate.patch: + - truncate the lspci output properly (Close: Malone #47671) + + -- Szilveszter Farkas (Phanatic) Mon, 3 Jul 2006 10:52:00 +0200 + +sysinfo (0.6.1-0ubuntu4) dapper; urgency=low + + * debian/patches/cpu_info-more-buffer.patch: + * debian/patches/other_info-more-buffer.patch: + - more buffer for getline() (Close: Malone #32485) + + -- Szilveszter Farkas (Phanatic) Sun, 21 May 2006 22:33:00 +0200 + +sysinfo (0.6.1-0ubuntu3) dapper; urgency=low + + * debian/patches/check-gcc-executable.patch + - check if gcc executable exists (Close: Malone #45144) + + -- Szilveszter Farkas (Phanatic) Wed, 18 May 2006 18:07:23 +0200 + +sysinfo (0.6.1-0ubuntu2) dapper; urgency=low + + * Changed debian/patches/desktop.patch to correct the MultipleArgs entry. + (Close: Malone #33599) + + -- Raphaël Pinson Wed, 15 Mar 2006 17:15:00 +0100 + +sysinfo (0.6.1-0ubuntu1) dapper; urgency=low + + * Initial release. + * debian/patches/Makefile.patch + - don't install anything into /usr/doc + * debian/patches/desktop.patch + - include GenericName (to follow freedesktop.org standards) + + -- Szilveszter Farkas (Phanatic) Thu, 26 Jan 2006 14:58:20 +0100 --- sysinfo-0.7.orig/debian/watch +++ sysinfo-0.7/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://heanet.dl.sourceforge.net/sourceforge/gsysinfo/sysinfo-([\d\.]+)\.tar\.gz debian uupdate --- sysinfo-0.7.orig/debian/rules +++ sysinfo-0.7/debian/rules @@ -0,0 +1,90 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 +include /usr/share/dpatch/dpatch.make + +# These are used for cross-compiling and for saving the configure script +# from having to guess our platform (since we know it already) +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) + +export MONO_SHARED_DIR=$(CURDIR) + +CFLAGS = -Wall -g + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif + +config.status: patch-stamp configure + dh_testdir + # Add here commands to configure the package. + mkdir -p $(MONO_SHARED_DIR)/.wapi + CFLAGS="$(CFLAGS) -Wl,-z,defs" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info MCS=/usr/bin/csc MONO_CAIRO_LIBS=-r:Mono.Cairo MONO_CAIRO_CFLAGS=" " + +build: build-stamp + +build-stamp: config.status + dh_testdir + + # Add here commands to compile the package. + $(MAKE) ASSEMBLY_COMPILER_COMMAND=csc + #docbook-to-man debian/sysinfo.sgml > sysinfo.1 + + touch build-stamp + +clean: unpatch + dh_testdir + dh_testroot + rm -f build-stamp + rm -rf $(MONO_SHARED_DIR)/.wapi + + # Add here commands to clean up after the build process. + -[ ! -f Makefile ] || $(MAKE) distclean + + rm -f config.status + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/sysinfo. + $(MAKE) install DESTDIR=$(CURDIR)/debian/sysinfo + +# Build architecture-independent files here. +binary-indep: build install + dh_testdir + dh_testroot + dh_installchangelogs ChangeLog + dh_installdocs + dh_installexamples + dh_installman debian/sysinfo.1 + dh_link + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_clideps + dh_gencontrol + dh_md5sums + dh_builddeb + +# Build architecture-dependent files here. +binary-arch: build install +# We have nothing to do. + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install --- sysinfo-0.7.orig/debian/copyright +++ sysinfo-0.7/debian/copyright @@ -0,0 +1,28 @@ +This package was debianized by Szilveszter Farkas on +Thu, 26 Jan 2006 14:58:20 +0100. + +It was downloaded from http://gsysinfo.sourceforge.net/ + +Upstream Author: Nil Gradisnik + +Copyright (C) Nil Gradisnik 2005 + +License: + + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +On Debian systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. + --- sysinfo-0.7.orig/debian/compat +++ sysinfo-0.7/debian/compat @@ -0,0 +1 @@ +5 --- sysinfo-0.7.orig/debian/sysinfo.1 +++ sysinfo-0.7/debian/sysinfo.1 @@ -0,0 +1,23 @@ +.\" Hey, EMACS: -*- nroff -*- +.TH SYSINFO 1 "September 8, 2006" +.SH NAME +sysinfo \- Simple GTK program that shows some UNIX/Linux system information +.SH SYNOPSIS +.B sysinfo +.SH DESCRIPTION +.B sysinfo +is a GTK2 based program written in C# which can display the following computer/system information: + - System: Linux distribution release, GNOME version, Kernel version, Gcc version, Xorg version, hostname. + - CPU: Vendor identification, model name, frequency, level2 cache, bogomips, model numbers, flags. + - Memory: Total system memory RAM, free memory, swap space total & free, cached, active, inactive memory. + - Storage: IDE interface, all IDE devices(disks, cd/dvd roms), SCSI devices. + - Hardware: motherboard, graphic card, sound card, network devices + - NVIDIA graphic card: only with NVIDIA display driver installed +.SH OPTIONS +This program has no command line options. +.SH AUTHOR +.B sysinfo +was written by Nil Gradisnik . +.PP +This manual page was written by Szilveszter Farkas , +for the Ubuntu project (but may be used by others). --- sysinfo-0.7.orig/debian/docs +++ sysinfo-0.7/debian/docs @@ -0,0 +1,2 @@ +NEWS +README --- sysinfo-0.7.orig/debian/patches/01_fix_desktop.dpatch +++ sysinfo-0.7/debian/patches/01_fix_desktop.dpatch @@ -0,0 +1,23 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 01_fix_desktop.dpatch by Pedro Fragoso +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Fix Desktop file + +@DPATCH@ + +--- sysinfo-0.7/sysinfo.desktop 2006-11-04 13:15:29.000000000 +0000 ++++ sysinfo-0.7/sysinfo.desktop.new 2008-01-13 20:48:26.000000000 +0000 +@@ -1,10 +1,8 @@ + [Desktop Entry] +-Encoding=UTF-8 + Name=Sysinfo + Comment=Display detailed computer/system information + Exec=sysinfo +-Icon=computer.png ++Icon=computer + Terminal=false +-MultipleArgs=false + Type=Application +-Categories=Application;System; ++Categories=GNOME;Utility;System; --- 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 ++ ++ ++ ++ + + + --- 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 ) { --- sysinfo-0.7.orig/debian/patches/00list +++ sysinfo-0.7/debian/patches/00list @@ -0,0 +1,4 @@ +01_fix_desktop +02_fix_usb_pci_limit.dpatch +03_fix_about_close_button.dpatch +04_check_nvidia_settings.dpatch --- 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 ); }