From: Jean-Philippe Orsini Date: Fri, 20 Sep 2013 23:39:45 +0000 (-0400) Subject: Imported Debian patch 0.8.0.4-1 X-Git-Tag: debian/0.8.0.4-1^0 X-Git-Url: http://wpitchoune.net/gitweb/?p=psensor-pkg-debian.git;a=commitdiff_plain;h=ba85e3eadb75ad8bd62d9f46f5f13c33b42cb864;hp=d7808c8cc22fe853a0999e4ffff621ff775917d0 Imported Debian patch 0.8.0.4-1 --- diff --git a/INSTALL b/INSTALL index 7d1c323..a1e89e1 100644 --- a/INSTALL +++ b/INSTALL @@ -1,8 +1,8 @@ Installation Instructions ************************* -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, -2006, 2007, 2008, 2009 Free Software Foundation, Inc. +Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, +Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright @@ -226,6 +226,11 @@ order to use an ANSI C compiler: and if that doesn't work, install pre-built binaries of GCC for HP-UX. + HP-UX `make' updates targets which have the same time stamps as +their prerequisites, which makes it generally unusable when shipped +generated files such as `configure' are involved. Use GNU `make' +instead. + On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its `' header file. The option `-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended diff --git a/Makefile.am b/Makefile.am index f0dbb6a..40db776 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,20 +1,26 @@ -SUBDIRS = po\ - src\ - icons/hicolor/scalable\ - icons/hicolor/14x14\ - icons/hicolor/16x16\ - icons/hicolor/22x22\ - icons/hicolor/24x24\ - icons/hicolor/32x32\ - icons/hicolor/48x48\ - icons/hicolor/64x64\ - icons/ubuntu-mono-dark/status/22\ - icons/ubuntu-mono-light/status/22\ - icons/ubuntu-mono-dark/apps/22\ - www\ - tests +SUBDIRS = doc \ + po \ + src \ + icons/hicolor/scalable \ + icons/hicolor/14x14 \ + icons/hicolor/16x16 \ + icons/hicolor/22x22 \ + icons/hicolor/24x24 \ + icons/hicolor/32x32 \ + icons/hicolor/48x48 \ + icons/hicolor/64x64 \ + icons/ubuntu-mono-dark/status/22 \ + icons/ubuntu-mono-light/status/22 \ + icons/ubuntu-mono-dark/apps/22 \ + www \ + tests -dist_doc_DATA = README COPYING NEWS AUTHORS INSTALL +dist_doc_DATA = AUTHORS \ + COPYING \ + INSTALL \ + NEWS \ + README \ + README.html autostartdir = $(sysconfdir)/xdg/autostart autostart_DATA = psensor.desktop @@ -24,4 +30,5 @@ desktop_DATA = psensor.desktop EXTRA_DIST = $(desktop_DATA) $(autostart_DATA) - +README.html: README www/style.css + asciidoc --theme style -a themedir=`pwd`/www -n -a toc README diff --git a/Makefile.in b/Makefile.in index f824f28..7d43679 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +16,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -38,8 +55,9 @@ subdir = . DIST_COMMON = README $(am__configure_deps) $(dist_doc_DATA) \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/config.h.in $(top_srcdir)/configure ABOUT-NLS \ - AUTHORS COPYING ChangeLog INSTALL NEWS compile config.guess \ - config.rpath config.sub depcomp install-sh missing + AUTHORS COPYING ChangeLog INSTALL NEWS ar-lib compile \ + config.guess config.rpath config.sub depcomp install-sh \ + missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -59,6 +77,11 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -80,6 +103,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(autostartdir)" \ "$(DESTDIR)$(desktopdir)" "$(DESTDIR)$(docdir)" DATA = $(autostart_DATA) $(desktop_DATA) $(dist_doc_DATA) @@ -95,9 +124,11 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ - { test ! -d "$(distdir)" \ - || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr "$(distdir)"; }; } + if test -d "$(distdir)"; then \ + find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -rf "$(distdir)" \ + || { sleep 5 && rm -rf "$(distdir)"; }; \ + else :; fi am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ @@ -126,11 +157,16 @@ am__relativize = \ DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print +am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ + | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ APPINDICATOR_CFLAGS = @APPINDICATOR_CFLAGS@ APPINDICATOR_LIBS = @APPINDICATOR_LIBS@ +AR = @AR@ +ATASMART_CFLAGS = @ATASMART_CFLAGS@ +ATASMART_LIBS = @ATASMART_LIBS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -150,8 +186,11 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +GCONFTOOL = @GCONFTOOL@ GCONF_CFLAGS = @GCONF_CFLAGS@ GCONF_LIBS = @GCONF_LIBS@ +GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ +GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ @@ -160,6 +199,7 @@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ GTOP_CFLAGS = @GTOP_CFLAGS@ GTOP_LIBS = @GTOP_LIBS@ +HAVE_CPPCHECK = @HAVE_CPPCHECK@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -204,6 +244,7 @@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ +PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SENSORS_LIBS = @SENSORS_LIBS@ SET_MAKE = @SET_MAKE@ @@ -225,6 +266,7 @@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ @@ -271,23 +313,30 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -SUBDIRS = po\ - src\ - icons/hicolor/scalable\ - icons/hicolor/14x14\ - icons/hicolor/16x16\ - icons/hicolor/22x22\ - icons/hicolor/24x24\ - icons/hicolor/32x32\ - icons/hicolor/48x48\ - icons/hicolor/64x64\ - icons/ubuntu-mono-dark/status/22\ - icons/ubuntu-mono-light/status/22\ - icons/ubuntu-mono-dark/apps/22\ - www\ - tests - -dist_doc_DATA = README COPYING NEWS AUTHORS INSTALL +SUBDIRS = doc \ + po \ + src \ + icons/hicolor/scalable \ + icons/hicolor/14x14 \ + icons/hicolor/16x16 \ + icons/hicolor/22x22 \ + icons/hicolor/24x24 \ + icons/hicolor/32x32 \ + icons/hicolor/48x48 \ + icons/hicolor/64x64 \ + icons/ubuntu-mono-dark/status/22 \ + icons/ubuntu-mono-light/status/22 \ + icons/ubuntu-mono-dark/apps/22 \ + www \ + tests + +dist_doc_DATA = AUTHORS \ + COPYING \ + INSTALL \ + NEWS \ + README \ + README.html + autostartdir = $(sysconfdir)/xdg/autostart autostart_DATA = psensor.desktop desktopdir = $(datadir)/applications @@ -297,7 +346,7 @@ all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: -am--refresh: +am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ @@ -333,10 +382,8 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): config.h: stamp-h1 - @if test ! -f $@; then \ - rm -f stamp-h1; \ - $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ - else :; fi + @if test ! -f $@; then rm -f stamp-h1; else :; fi + @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 @@ -350,8 +397,11 @@ distclean-hdr: -rm -f config.h stamp-h1 install-autostartDATA: $(autostart_DATA) @$(NORMAL_INSTALL) - test -z "$(autostartdir)" || $(MKDIR_P) "$(DESTDIR)$(autostartdir)" @list='$(autostart_DATA)'; test -n "$(autostartdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(autostartdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(autostartdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -365,13 +415,14 @@ uninstall-autostartDATA: @$(NORMAL_UNINSTALL) @list='$(autostart_DATA)'; test -n "$(autostartdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(autostartdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(autostartdir)" && rm -f $$files + dir='$(DESTDIR)$(autostartdir)'; $(am__uninstall_files_from_dir) install-desktopDATA: $(desktop_DATA) @$(NORMAL_INSTALL) - test -z "$(desktopdir)" || $(MKDIR_P) "$(DESTDIR)$(desktopdir)" @list='$(desktop_DATA)'; test -n "$(desktopdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(desktopdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(desktopdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -385,13 +436,14 @@ uninstall-desktopDATA: @$(NORMAL_UNINSTALL) @list='$(desktop_DATA)'; test -n "$(desktopdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(desktopdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(desktopdir)" && rm -f $$files + dir='$(DESTDIR)$(desktopdir)'; $(am__uninstall_files_from_dir) install-dist_docDATA: $(dist_doc_DATA) @$(NORMAL_INSTALL) - test -z "$(docdir)" || $(MKDIR_P) "$(DESTDIR)$(docdir)" @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -405,9 +457,7 @@ uninstall-dist_docDATA: @$(NORMAL_UNINSTALL) @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(docdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(docdir)" && rm -f $$files + dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. @@ -578,13 +628,10 @@ distdir: $(DISTFILES) done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ @@ -616,7 +663,11 @@ dist-gzip: distdir $(am__remove_distdir) dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-lzip: distdir + tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__remove_distdir) dist-lzma: distdir @@ -624,7 +675,7 @@ dist-lzma: distdir $(am__remove_distdir) dist-xz: distdir - tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz + tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__remove_distdir) dist-tarZ: distdir @@ -655,6 +706,8 @@ distcheck: dist bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ + *.tar.lz*) \ + lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ @@ -664,7 +717,7 @@ distcheck: dist *.zip*) \ unzip $(distdir).zip ;;\ esac - chmod -R a-w $(distdir); chmod a+w $(distdir) + chmod -R a-w $(distdir); chmod u+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) @@ -674,6 +727,7 @@ distcheck: dist && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ @@ -702,8 +756,16 @@ distcheck: dist list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: - @$(am__cd) '$(distuninstallcheck_dir)' \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + @test -n '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: trying to run $@ with an empty' \ + '$$(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + $(am__cd) '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ @@ -737,10 +799,15 @@ install-am: all-am installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -829,21 +896,24 @@ uninstall-am: uninstall-autostartDATA uninstall-desktopDATA \ .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ - dist-lzma dist-shar dist-tarZ dist-xz dist-zip distcheck \ - distclean distclean-generic distclean-hdr distclean-tags \ - distcleancheck distdir distuninstallcheck dvi dvi-am html \ - html-am info info-am install install-am install-autostartDATA \ - install-data install-data-am install-desktopDATA \ - install-dist_docDATA install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ - pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ - uninstall-autostartDATA uninstall-desktopDATA \ - uninstall-dist_docDATA - + dist-lzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \ + distcheck distclean distclean-generic distclean-hdr \ + distclean-tags distcleancheck distdir distuninstallcheck dvi \ + dvi-am html html-am info info-am install install-am \ + install-autostartDATA install-data install-data-am \ + install-desktopDATA install-dist_docDATA install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \ + tags-recursive uninstall uninstall-am uninstall-autostartDATA \ + uninstall-desktopDATA uninstall-dist_docDATA + + +README.html: README www/style.css + asciidoc --theme style -a themedir=`pwd`/www -n -a toc README # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/NEWS b/NEWS index 5b03013..a77ea41 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,168 @@ +* v0.8.0.4 + +** Added calling script when an alarm is raised. +** Reordering of the list of sensors. +** Added keywords in .desktop file. +** Added LFS support. +** Fixed compilation issue for x32 architecture on 64bits systems. +** Merged German translation from LP (Dennis Baudys). +** Merged Spanish translation from LP (Javier). +** Merged French translation from LP (londumas). +** Merged Brazilian translation from LP (Celio Alves). + +* v0.8.0.3 + +** Switched to GtkColorChooserDialog instead of the + deprecated widget GtkColorSelectionDialog. (LP: #1184442) +** psensor-server: fixed compilation without gtop2 lib. + +* v0.8.0.2 + +** GConf2/GTK/XEXT/X11 lib optional to allow psensor-server + compilation without them. +** Added support of libjson-c. +** merged German translation from LP (Dennis Baudys). +** merged Latvian translation from LP (tuxmaniack). + +* v0.8.0.1 + +** added AMD GPU usage sensor (Contribution from MestreLion). +** added support of sensors log interval. +** psensor-server: protocole changes, API version incremented. +** fixed cpu load when fahrenheit is enabled. +** list of sensors can be reordered using the sensor preferences + dialog. +** merged Spanish translation from LP (Javier) and Tomeu R. . +** merged French translation from LP (Hélion du Mas des Bourboux). +** merged Italian translation from LP (Diego Pierotto). +** merged Brazillian Portugues translation from LP (MestreLion). +** fixed the quit menu of the application indicator which was + not translatable. + +* v07.0.5 + +** fixed cpu load when fahrenheit is enabled. + +* v0.7.0.4 + +** added Spanish translation from LP (Javier and Eduardo Alberto + Calvo). +** merged German translation from LP (Dennis Baudys). +** merged French translation from LP (Alain-OIivier Breysse). +** merged Hungarian from translation LP (Bence Lukács). +** merged Latvian translation from LP (tuxmaniack). +** merged Portuguese translation from LP (Daniel Serafim). +** merged Russian translation from LP (Ilya Volchanetskiy). +** merged Ukrainian translation from LP (Ilya Volchanetskiy). +** merged Chinese translation from LP (Wang Dianjin). +** psensor: fixed 'appindicator enabled' option not working correctly + for cpu usage. The option was inversed each time it is displayed in + the preference dialog. +** psensor: added an option to enable logging of sensors + ($HOME/.psensor/sensors.log). +** psensor-server: added sensors logging (--sensor-log-file). +** psensor: display the name of chip in sensor preferences. +** psensor: moved the sensor id into a expendable frame of the sensor + preferences. +** test target is now running cppcheck if available. +** fixed cppcheck reported errors (realloc and not freed var). +** fixed cppcheck (old values not used). +** added faq (requires asciidoc to build the html version). +** check target is now running cppcheck if installed. +** display a message if no graphs are enabled (Closes #689355). +** psensor: when 'hide window on startup' is set, it will + hide the window only if psensor can register to application + indicator or systray. Waiting 30s before trying to do it + in order to have better chance that systray is running during + session startup. +** fixed displaying of the fahrenheit temperature in the main + window. +** fixed compilation error in amd.c (hdll not used). + +* v0.7.0.3 + +** psensor: removed gettext_domain in psensor.schemas causing + warnings. +** merged italian and russian translation from LP. + +* v0.7.0.2 + +** psensor: added latvian translation file. +** psensor: added gconf schema. (LP: #1026807) +** psensor: hide sensors in the application indicator. +** psensor: removed hicolor/48x48/psensor_hot.png. (LP: #1029065) +** merge chinese translation from LP. + +* v0.7.0.1 + +** psensor: minimum GTK version is now 3.0, GTK v2.x is no more + supported. +** psensor: fixed sensor type displayed in sensor preferences + dialog. (Closes LP: #968912) +** psensor: not calling g_thread_init when compiled with glib >= 2.31. +** psensor: added basic instruction in the README for compiling psensor + with the ATI/AMD GPU support. +** psensor: fixed compilation error on 64bits with ATI/AMD GPU support. +** psensor: added capability to use libatasmart for sata disk monitoring. +** psensor: added option --use-libatasmart. +** changed copyright dates to 2012. +** psensor: fixed systray and application indicator visible at the + same time. (Closes LP: #971098) +** psensor: fixed wrong background color, get the background color of + the window and not the canvas widget. (Closes LP: #973122) +** psensor: used the foreground color defined by the theme for the + font of the graph legend. +** psensor: used tab layout for psensor preferences. +** psensor: temperature unit choice (celcius/fahrenheit). +** psensor-server: fixed --wdir option. +** psensor-server: added log level to -d option. +** psensor-server: added --log-file option. +** psensor-server: logged measures when log level is 3. +** psensor: fixed many memory leaks in cfg.c (gconf2 keys). +** psensor: fixed memory leak (sensor name when specified by the + configuration). +** psensor: implemented the psensor uniquess, non-primary psensor + instances show the window of the primary psensor instance and + exits. +** many code quality improvements. +** psensor: added --new-instance option to allow the creation of + multiple instances of Psensor. +** psensor: added the degree sign before the temperature symbols + (Closes LP: #1021900). +** psensor: alarm limit edition using the temperature unit set in the + global pref. +** psensor: improved notification (added psensor icon and value of the + sensor). +** full french and hungarian translation. +** merged some chinese translation provided by LP. +** added translation files for Brazilian Portuguese, and Italian. +** partial translations for Russian, Serbian, Ukrainian, Slovenian and + German. +** psensor: fixed i18n support for the application indicator menu. +** psensor: fixed i18n support for the application menu. +** psensor: added low thresold support for alerts. +** psensor: added fan alert support. +** psensor: fixed hide window on startup for gnome-shell (Closes: + #676361). + +* v0.6.2.19 + +** psensor: fixed size of the icon hicolor/48x48/psensor_hot.png. + (LP: #1029065) + +* v0.6.2.18 + +** added degree sign for celcius (Closes LP: #1021900). +** added russian, brazilian, hungarian, serbian, slovenian, + italian, ukrainian and german translation files. +** merged translations from LP. +** psensor: fixed hide window on startup for gnome-shell (Closes: + #676361). + * v0.6.2.17 -** psensor: fixed sensor type displayed in sensor preferences dialog. +** psensor: fixed sensor type displayed in sensor preferences + dialog. (Closes LP: #968912) ** psensor: fixed compilation error on 64bits with ATI/AMD GPU support. ** psensor: not calling g_thread_init when compiled with glib >= 2.31. ** changed copyright dates to 2012. diff --git a/README b/README index 8daf7f0..43123c8 100644 --- a/README +++ b/README @@ -1,156 +1,196 @@ -Psensor - Temperature Monitoring For Linux ------------------------------------------- +Psensor README +============== -Psensor is a graphical temperature monitor for Linux. +Introduction +------------ + +Psensor is a graphical hardware monitoring application for Linux. -It can monitor: +It draws realtime charts and raises alerts about: * the temperature of the motherboard and CPU sensors (using lm-sensors). * the temperature of the NVidia GPUs (using XNVCtrl). - * the temperature of the Hard Disk Drives (using hddtemp). + * the temperature of the Hard Disk Drives (using hddtemp or libatasmart). * the rotation speed of the fans (using lm-sensors). * the temperature of a remote computer. * the cpu load. -Alarms using Desktop Notification can be set to each sensor to notify -high temperatures. +Alerts are using Desktop Notification and a specific GTK+ status icon. -For Ubuntu users, Psensor is providing an Application Indicator to -alert users when a temperature is too high. +For Ubuntu users, Psensor is providing an Application Indicator which turns +red under alert and a menu for quickly check all sensors. -To monitor the temperature of a remote computer: +It is possible to monitor remotely a computer: - * start psensor-server on the remote computer. The default port is - 3131 and can be changed by using the '--port=PORT' command line - option. + * start +psensor-server+ on the remote computer. - * start psensor with the '--url' option: psensor - --url=http://hostname:3131 + * start +psensor+ using: +psensor --url=http://hostname:3131+. -WARNING: -psensor-server does not provide any way to restrict the connection to -the HTTP server, worst, no effort has been made against malicious HTTP -attacks. You should make the psensor-server port available only to a -network or computer you trust by using the usual network security -tools of the system (for example, iptables). ++psensor-server+ is a minimal Web server, a Web browser can be used to +monitor the remote computer by opening the URL: ++http://hostname:3131+. +[WARNING] ++psensor-server+ does not provide any way to restrict the connection +to the HTTP server, worst, no effort has been made against malicious +HTTP attacks. You should make the +psensor-server+ port available +only to a network or computer you trust by using the usual network +security tools of the system (for example: +http://www.netfilter.org/projects/iptables/index.html[iptables]). -Installation ------------- - -Psensor can be compiled and installed on any modern linux -distribution. +Installation Using Distribution Packages +---------------------------------------- Debian ------- +~~~~~~ -For Debian, the binary and source packages are available in the wheezy -(testing) and sid (unstable) repositories. +For Debian, the binary and source packages are available in the +Wheezy, unstable and testing repositories. -Debian package information are available at: -http://packages.qa.debian.org/p/psensor.html +Debian package information is available at: +http://packages.qa.debian.org/p/psensor.html. -Compilation requires the following packages: - -gettext libgtk-3-dev libgconf2-dev libnotify-dev libsensors4-dev -help2man libcurl4-openssl-dev libjson0-dev libmicrohttpd-dev -libgtop2-dev - -Debian kfreebsd ---------------- - -Compilation requires the following packages: -gcc libgtk2.0-dev libsensors4-dev libgconf2-dev help2man -libcurl4-openssl-dev libjson0-dev libmicrohttpd-dev libgtop2-dev +To do the installation: +-------------------------------------------- +sudo apt-get install psensor psensor-server +-------------------------------------------- Ubuntu ------- - -Notes about installation on Ubuntu is available at: -http://wpitchoune.net/blog/psensor/ubuntu-integration +~~~~~~ Since Ubuntu Oneiric (11.10), psensor is available in the universe repository of Ubuntu. -For other Ubuntu releases, the easy way to install Psensor and -Psensor-server is to use the dedicated PPA. +To install +psensor+ or +psensor-server+: +------------------------------------ +sudo apt-get install psensor +sudo apt-get install psensor-server +------------------------------------ + +Or search them in the Ubuntu Software Center. -For the last stable version: +For other Ubuntu releases or user the more recent release, the easiest +way is to use the dedicated PPA. + +Last stable version: +------------------------------------------------- sudo apt-get apt-add-repository ppa:/jfi/psensor sudo apt-get update sudo apt-get install psensor +sudo apt-get install psensor-server +------------------------------------------------- -For the last development version: +Last development version which should not contain major bugs: +---------------------------------------------------------- sudo apt-get apt-add-repository ppa:/jfi/psensor-unstable sudo apt-get update sudo apt-get install psensor sudo apt-get install psensor-server +---------------------------------------------------------- -Alternatively, you can download Ubuntu binary packages from: -http://wpitchoune.net/psensor/files/ubuntu/ -The manual installation of the psensor and psensor-server packages -requires also the installation of psensor-common which contains -the multiple languages support. - -Centos 6 --------- +Daily trunk build which may contain major bugs and partialy +implemented features: +------------------------------------------------------------- +sudo apt-get apt-add-repository ppa:/jfi/psensor-daily-trunk +sudo apt-get update +sudo apt-get install psensor +sudo apt-get install psensor-server +------------------------------------------------------------- -psensor can be compiled on Centos 6.0, by installing the following -packages: -gcc gtk2-devel GConf2-devel help2man gettext-devel libnotify-deval -lm_sensors-devel libgtop2-devel +Installation From Source Archive +-------------------------------- -As microhttpd and json-c libraries are not available in the standard centos -repository, psensor-server cannot be compiled and the remote -monitoring feature of psensor will not be available. ++psensor+ and +psensor-server+ can be compiled and installed on any +modern GNU/Linux distribution. -Installation from source archive --------------------------------- +Compilation Prerequisites +~~~~~~~~~~~~~~~~~~~~~~~~~ -Psensor compilation requires: +The compilation of +psensor+ requires: - * make/gcc + * make + * gcc (or llvm) * lm-sensors * library sensors4 - * library gtk2 (>= 2.18) + * library gtk3 >=3.4 * library gconf2 * help2man + * asciidoc (optional, required to produce the html version of the + faq) + * cppcheck (optional, static source checker) * library libnotify (optional) * library libappindicator (optional) * library libXNVCtrl (optional) * library json0 and curl (optional, required for remote monitoring) * library unity (>=v3.4.2, optional) * library gtop2 (optional, required for CPU usage) + * library atasmart (optional, for disk monitoring) + +The specific requirements for +psensor-server+: -Psensor-server compilation requires: - * make/gcc - * lm-sensors - * library sensors4 - * help2man * library libmicrohttpd * library json0 - * library gtop2 (optional, required for CPU usage) + +For Debian 7.0: +----------------------------------------------------------------- +sudo apt-get install asciidoc cppcheck gcc gettext libgtk-3-dev +libgconf2-dev libnotify-dev libsensors4-dev help2man +libcurl4-openssl-dev libjson0-dev libmicrohttpd-dev libgtop2-dev +libatasmart-dev make +----------------------------------------------------------------- + +For Fedora 17: +----------------------------------------------------------------------- +sudo yum install gcc gtk3-devel GConf2-devel lm_sensors-devel cppcheck +libatasmart-devel libcurl-devel json-c-devel libmicrohttpd-devel +help2man libnotify-devel libgtop2-devel make +----------------------------------------------------------------------- + +For Ubuntu 12.10: +------------------------------------------------------------------------- +sudo apt-get install asciidoc autoconf automake autopoint +debhelper (>= 9) cppcheck gettext help2man libappindicator3-dev +libatasmart-dev libcurl4-gnutls-dev libgconf2-dev libgtk-3-dev +libgtop2-dev libjson0-dev libmicrohttpd-dev libnotify-dev +libsensors4-dev libunity-dev nvidia-settings perl + +------------------------------------------------------------------------- Compilation and Installation Steps ----------------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +1. download the source archive from: http://wpitchoune.net/psensor/files +2. Extract files from the source archive +3. Compilation: +./configure;make clean all+ +4. Installation: +make install+ (require to have root permission) +5. Start the sensor detection script: +sensors-detect+ and follows the +instructions. Reboot or activate the kernel modules which have +been found. +6. To monitor HDDs, the +hddtemp+ daemon must be installed and running. +7. Run: +psensor+ - * Extract files from the source archive - * Compilation: - ./configure - make clean all - - * Installation: - make install +ATI/AMD GPU Support +~~~~~~~~~~~~~~~~~~~ - * Start the sensor detection script: 'sensors-detect' and follows the - instructions +When the OpenSource ATI driver is used, the monitoring +information is available throw lm-sensors and does not require the +following instructions. - * Verify the sensor detection by running: 'sensors' +When the proprietary ATI driver(Catalyst) is used, the build is +requiring an additional library. - * Run 'psensor' +Download the +http://developer.amd.com/sdks/ADLSDK/Pages/default.aspx[ATI ADL SDK] +and extracts the files of the archive into a directory [dir]. + +Replace the step 3. of the above section by +./configure +--with-libatiadl=[dir]+ where +[dir]+ must be the directory where you +have extracted the ATI ADL SDK. Other steps are indentical. Contact ------- -Bugs and comments can be sent to jeanfi@gmail.com + +Bugs and comments can be sent to jeanfi@gmail.com. + Home page: http://wpitchoune.net/psensor \ No newline at end of file diff --git a/README.html b/README.html new file mode 100644 index 0000000..ef7fb23 --- /dev/null +++ b/README.html @@ -0,0 +1,677 @@ + + + + + +Psensor README + + + + + +
+
+

1. Introduction

+
+

Psensor is a graphical hardware monitoring application for Linux.

+

It draws realtime charts and raises alerts about:

+
    +
  • +

    +the temperature of the motherboard and CPU sensors (using + lm-sensors). +

    +
  • +
  • +

    +the temperature of the NVidia GPUs (using XNVCtrl). +

    +
  • +
  • +

    +the temperature of the Hard Disk Drives (using hddtemp or libatasmart). +

    +
  • +
  • +

    +the rotation speed of the fans (using lm-sensors). +

    +
  • +
  • +

    +the temperature of a remote computer. +

    +
  • +
  • +

    +the cpu load. +

    +
  • +
+

Alerts are using Desktop Notification and a specific GTK+ status icon.

+

For Ubuntu users, Psensor is providing an Application Indicator which turns +red under alert and a menu for quickly check all sensors.

+

It is possible to monitor remotely a computer:

+
    +
  • +

    +start psensor-server on the remote computer. +

    +
  • +
  • +

    +start psensor using: psensor --url=http://hostname:3131. +

    +
  • +
+

psensor-server is a minimal Web server, a Web browser can be used to +monitor the remote computer by opening the URL: +http://hostname:3131.

+
+ + + +
+
Warning
+
psensor-server does not provide any way to restrict the connection +to the HTTP server, worst, no effort has been made against malicious +HTTP attacks. You should make the psensor-server port available +only to a network or computer you trust by using the usual network +security tools of the system (for example: +iptables).
+
+
+
+
+

2. Installation Using Distribution Packages

+
+
+

2.1. Debian

+

For Debian, the binary and source packages are available in the +Wheezy, unstable and testing repositories.

+

Debian package information is available at: +http://packages.qa.debian.org/p/psensor.html.

+

To do the installation:

+
+
+
sudo apt-get install psensor psensor-server
+
+
+
+

2.2. Ubuntu

+

Since Ubuntu Oneiric (11.10), psensor is available in the universe +repository of Ubuntu.

+

To install psensor or psensor-server:

+
+
+
sudo apt-get install psensor
+sudo apt-get install psensor-server
+
+

Or search them in the Ubuntu Software Center.

+

For other Ubuntu releases or user the more recent release, the easiest +way is to use the dedicated PPA.

+

Last stable version:

+
+
+
sudo apt-get apt-add-repository ppa:/jfi/psensor
+sudo apt-get update
+sudo apt-get install psensor
+sudo apt-get install psensor-server
+
+

Last development version which should not contain major bugs:

+
+
+
sudo apt-get apt-add-repository ppa:/jfi/psensor-unstable
+sudo apt-get update
+sudo apt-get install psensor
+sudo apt-get install psensor-server
+
+

Daily trunk build which may contain major bugs and partialy +implemented features:

+
+
+
sudo apt-get apt-add-repository ppa:/jfi/psensor-daily-trunk
+sudo apt-get update
+sudo apt-get install psensor
+sudo apt-get install psensor-server
+
+
+
+
+
+

3. Installation From Source Archive

+
+

psensor and psensor-server can be compiled and installed on any +modern GNU/Linux distribution.

+
+

3.1. Compilation Prerequisites

+

The compilation of psensor requires:

+
    +
  • +

    +make +

    +
  • +
  • +

    +gcc (or llvm) +

    +
  • +
  • +

    +lm-sensors +

    +
  • +
  • +

    +library sensors4 +

    +
  • +
  • +

    +library gtk3 >=3.4 +

    +
  • +
  • +

    +library gconf2 +

    +
  • +
  • +

    +help2man +

    +
  • +
  • +

    +asciidoc (optional, required to produce the html version of the + faq) +

    +
  • +
  • +

    +cppcheck (optional, static source checker) +

    +
  • +
  • +

    +library libnotify (optional) +

    +
  • +
  • +

    +library libappindicator (optional) +

    +
  • +
  • +

    +library libXNVCtrl (optional) +

    +
  • +
  • +

    +library json0 and curl (optional, required for remote monitoring) +

    +
  • +
  • +

    +library unity (>=v3.4.2, optional) +

    +
  • +
  • +

    +library gtop2 (optional, required for CPU usage) +

    +
  • +
  • +

    +library atasmart (optional, for disk monitoring) +

    +
  • +
+

The specific requirements for psensor-server:

+
    +
  • +

    +library libmicrohttpd +

    +
  • +
  • +

    +library json0 +

    +
  • +
+

For Debian 7.0:

+
+
+
sudo apt-get install asciidoc cppcheck gcc gettext libgtk-3-dev
+libgconf2-dev libnotify-dev libsensors4-dev help2man
+libcurl4-openssl-dev libjson0-dev libmicrohttpd-dev libgtop2-dev
+libatasmart-dev make
+
+

For Fedora 17:

+
+
+
sudo yum install gcc gtk3-devel GConf2-devel lm_sensors-devel cppcheck
+libatasmart-devel libcurl-devel json-c-devel libmicrohttpd-devel
+help2man libnotify-devel libgtop2-devel make
+
+

For Ubuntu 12.10:

+
+
+
sudo apt-get install asciidoc autoconf automake autopoint
+debhelper (>= 9) cppcheck gettext help2man libappindicator3-dev
+libatasmart-dev libcurl4-gnutls-dev libgconf2-dev libgtk-3-dev
+libgtop2-dev libjson0-dev libmicrohttpd-dev libnotify-dev
+libsensors4-dev libunity-dev nvidia-settings perl
+
+
+
+

3.2. Compilation and Installation Steps

+
    +
  1. +

    +download the source archive from: http://wpitchoune.net/psensor/files +

    +
  2. +
  3. +

    +Extract files from the source archive +

    +
  4. +
  5. +

    +Compilation: ./configure;make clean all +

    +
  6. +
  7. +

    +Installation: make install (require to have root permission) +

    +
  8. +
  9. +

    +Start the sensor detection script: sensors-detect and follows the +instructions. Reboot or activate the kernel modules which have +been found. +

    +
  10. +
  11. +

    +To monitor HDDs, the hddtemp daemon must be installed and running. +

    +
  12. +
  13. +

    +Run: psensor +

    +
  14. +
+
+
+

3.3. ATI/AMD GPU Support

+

When the OpenSource ATI driver is used, the monitoring +information is available throw lm-sensors and does not require the +following instructions.

+

When the proprietary ATI driver(Catalyst) is used, the build is +requiring an additional library.

+

Download the +ATI ADL SDK +and extracts the files of the archive into a directory [dir].

+

Replace the step 3. of the above section by ./configure +--with-libatiadl=[dir] where [dir] must be the directory where you +have extracted the ATI ADL SDK. Other steps are indentical.

+
+
+
+
+

4. Contact

+
+

Bugs and comments can be sent to jeanfi@gmail.com.

+ +
+
+
+

+ + + diff --git a/aclocal.m4 b/aclocal.m4 index 1be3e8d..bc03ac0 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,7 +1,8 @@ -# generated automatically by aclocal 1.11.1 -*- Autoconf -*- +# generated automatically by aclocal 1.11.6 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. +# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, +# Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -13,12 +14,57 @@ m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, -[m4_warning([this file was generated for autoconf 2.68. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, +[m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) +dnl AM_GCONF_SOURCE_2 +dnl Defines GCONF_SCHEMA_CONFIG_SOURCE which is where you should install schemas +dnl (i.e. pass to gconftool-2 +dnl Defines GCONF_SCHEMA_FILE_DIR which is a filesystem directory where +dnl you should install foo.schemas files +dnl + +AC_DEFUN([AM_GCONF_SOURCE_2], +[ + if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then + GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source` + else + GCONF_SCHEMA_CONFIG_SOURCE=$GCONF_SCHEMA_INSTALL_SOURCE + fi + + AC_ARG_WITH([gconf-source], + AC_HELP_STRING([--with-gconf-source=sourceaddress], + [Config database for installing schema files.]), + [GCONF_SCHEMA_CONFIG_SOURCE="$withval"],) + + AC_SUBST(GCONF_SCHEMA_CONFIG_SOURCE) + AC_MSG_RESULT([Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation]) + + if test "x$GCONF_SCHEMA_FILE_DIR" = "x"; then + GCONF_SCHEMA_FILE_DIR='$(sysconfdir)/gconf/schemas' + fi + + AC_ARG_WITH([gconf-schema-file-dir], + AC_HELP_STRING([--with-gconf-schema-file-dir=dir], + [Directory for installing schema files.]), + [GCONF_SCHEMA_FILE_DIR="$withval"],) + + AC_SUBST(GCONF_SCHEMA_FILE_DIR) + AC_MSG_RESULT([Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files]) + + AC_ARG_ENABLE(schemas-install, + AC_HELP_STRING([--disable-schemas-install], + [Disable the schemas installation]), + [case ${enableval} in + yes|no) ;; + *) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-install]) ;; + esac]) + AM_CONDITIONAL([GCONF_SCHEMAS_INSTALL], [test "$enable_schemas_install" != no]) +]) + # gettext.m4 serial 63 (gettext-0.18) dnl Copyright (C) 1995-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation @@ -2517,12 +2563,15 @@ fi AC_SUBST([$1])dnl ]) -# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software +# Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 1 + # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been @@ -2532,7 +2581,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.11.1], [], +m4_if([$1], [1.11.6], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -2548,19 +2597,82 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.11.1])dnl +[AM_AUTOMAKE_VERSION([1.11.6])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) +# Copyright (C) 2011 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 1 + +# AM_PROG_AR([ACT-IF-FAIL]) +# ------------------------- +# Try to determine the archiver interface, and trigger the ar-lib wrapper +# if it is needed. If the detection of archiver interface fails, run +# ACT-IF-FAIL (default is to abort configure with a proper error message). +AC_DEFUN([AM_PROG_AR], +[AC_BEFORE([$0], [LT_INIT])dnl +AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl +AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([ar-lib])dnl +AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false]) +: ${AR=ar} + +AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface], + [am_cv_ar_interface=ar + AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])], + [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD' + AC_TRY_EVAL([am_ar_try]) + if test "$ac_status" -eq 0; then + am_cv_ar_interface=ar + else + am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD' + AC_TRY_EVAL([am_ar_try]) + if test "$ac_status" -eq 0; then + am_cv_ar_interface=lib + else + am_cv_ar_interface=unknown + fi + fi + rm -f conftest.lib libconftest.a + ]) + ]) + +case $am_cv_ar_interface in +ar) + ;; +lib) + # Microsoft lib, so override with the ar-lib wrapper script. + # FIXME: It is wrong to rewrite AR. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__AR in this case, + # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something + # similar. + AR="$am_aux_dir/ar-lib $AR" + ;; +unknown) + m4_default([$1], + [AC_MSG_ERROR([could not determine $AR interface])]) + ;; +esac +AC_SUBST([AR])dnl +]) + # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 1 + # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. @@ -2642,14 +2754,14 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 -# Free Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, +# 2010, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 10 +# serial 12 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, @@ -2689,6 +2801,7 @@ AC_CACHE_CHECK([dependency style of $depcc], # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. + rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. @@ -2753,7 +2866,7 @@ AC_CACHE_CHECK([dependency style of $depcc], break fi ;; - msvisualcpp | msvcmsys) + msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. @@ -2818,10 +2931,13 @@ AC_DEFUN([AM_DEP_TRACK], if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' + am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +AC_SUBST([am__nodep])dnl +_AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- @@ -3043,12 +3159,15 @@ for _am_header in $config_headers :; do done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. +# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation, +# Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 1 + # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. @@ -3215,12 +3334,15 @@ else fi ]) -# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, +# Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 1 + # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. @@ -3243,13 +3365,14 @@ esac # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. +# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software +# Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 4 +# serial 5 # _AM_MANGLE_OPTION(NAME) # ----------------------- @@ -3257,13 +3380,13 @@ AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) -# ------------------------------ +# -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) -# ---------------------------------- +# ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) @@ -3339,12 +3462,14 @@ Check your system clock]) fi AC_MSG_RESULT(yes)]) -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 1 + # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't @@ -3367,13 +3492,13 @@ fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006, 2008 Free Software Foundation, Inc. +# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 2 +# serial 3 # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- @@ -3382,13 +3507,13 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])]) AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- +# -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -3410,10 +3535,11 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], -[# Always define AMTAR for backward compatibility. -AM_MISSING_PROG([AMTAR], [tar]) +[# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AC_SUBST([AMTAR], ['$${TAR-tar}']) m4_if([$1], [v7], - [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) diff --git a/ar-lib b/ar-lib new file mode 100755 index 0000000..0f62c6f --- /dev/null +++ b/ar-lib @@ -0,0 +1,270 @@ +#! /bin/sh +# Wrapper for Microsoft lib.exe + +me=ar-lib +scriptversion=2012-03-01.08; # UTC + +# Copyright (C) 2010, 2012 Free Software Foundation, Inc. +# Written by Peter Rosin . +# +# This program 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, or (at your option) +# any later version. +# +# This program 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 program. If not, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + + +# func_error message +func_error () +{ + echo "$me: $1" 1>&2 + exit 1 +} + +file_conv= + +# func_file_conv build_file +# Convert a $build file to $host form and store it in $file +# Currently only supports Windows hosts. +func_file_conv () +{ + file=$1 + case $file in + / | /[!/]*) # absolute file, and not a UNC file + if test -z "$file_conv"; then + # lazily determine how to convert abs files + case `uname -s` in + MINGW*) + file_conv=mingw + ;; + CYGWIN*) + file_conv=cygwin + ;; + *) + file_conv=wine + ;; + esac + fi + case $file_conv in + mingw) + file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` + ;; + cygwin) + file=`cygpath -m "$file" || echo "$file"` + ;; + wine) + file=`winepath -w "$file" || echo "$file"` + ;; + esac + ;; + esac +} + +# func_at_file at_file operation archive +# Iterate over all members in AT_FILE performing OPERATION on ARCHIVE +# for each of them. +# When interpreting the content of the @FILE, do NOT use func_file_conv, +# since the user would need to supply preconverted file names to +# binutils ar, at least for MinGW. +func_at_file () +{ + operation=$2 + archive=$3 + at_file_contents=`cat "$1"` + eval set x "$at_file_contents" + shift + + for member + do + $AR -NOLOGO $operation:"$member" "$archive" || exit $? + done +} + +case $1 in + '') + func_error "no command. Try '$0 --help' for more information." + ;; + -h | --h*) + cat <. # # This program is free software; you can redistribute it and/or modify @@ -29,21 +29,219 @@ scriptversion=2009-10-06.20; # UTC # bugs to or send patches to # . +nl=' +' + +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent tools from complaining about whitespace usage. +IFS=" "" $nl" + +file_conv= + +# func_file_conv build_file lazy +# Convert a $build file to $host form and store it in $file +# Currently only supports Windows hosts. If the determined conversion +# type is listed in (the comma separated) LAZY, no conversion will +# take place. +func_file_conv () +{ + file=$1 + case $file in + / | /[!/]*) # absolute file, and not a UNC file + if test -z "$file_conv"; then + # lazily determine how to convert abs files + case `uname -s` in + MINGW*) + file_conv=mingw + ;; + CYGWIN*) + file_conv=cygwin + ;; + *) + file_conv=wine + ;; + esac + fi + case $file_conv/,$2, in + *,$file_conv,*) + ;; + mingw/*) + file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` + ;; + cygwin/*) + file=`cygpath -m "$file" || echo "$file"` + ;; + wine/*) + file=`winepath -w "$file" || echo "$file"` + ;; + esac + ;; + esac +} + +# func_cl_dashL linkdir +# Make cl look for libraries in LINKDIR +func_cl_dashL () +{ + func_file_conv "$1" + if test -z "$lib_path"; then + lib_path=$file + else + lib_path="$lib_path;$file" + fi + linker_opts="$linker_opts -LIBPATH:$file" +} + +# func_cl_dashl library +# Do a library search-path lookup for cl +func_cl_dashl () +{ + lib=$1 + found=no + save_IFS=$IFS + IFS=';' + for dir in $lib_path $LIB + do + IFS=$save_IFS + if $shared && test -f "$dir/$lib.dll.lib"; then + found=yes + lib=$dir/$lib.dll.lib + break + fi + if test -f "$dir/$lib.lib"; then + found=yes + lib=$dir/$lib.lib + break + fi + done + IFS=$save_IFS + + if test "$found" != yes; then + lib=$lib.lib + fi +} + +# func_cl_wrapper cl arg... +# Adjust compile command to suit cl +func_cl_wrapper () +{ + # Assume a capable shell + lib_path= + shared=: + linker_opts= + for arg + do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + eat=1 + case $2 in + *.o | *.[oO][bB][jJ]) + func_file_conv "$2" + set x "$@" -Fo"$file" + shift + ;; + *) + func_file_conv "$2" + set x "$@" -Fe"$file" + shift + ;; + esac + ;; + -I) + eat=1 + func_file_conv "$2" mingw + set x "$@" -I"$file" + shift + ;; + -I*) + func_file_conv "${1#-I}" mingw + set x "$@" -I"$file" + shift + ;; + -l) + eat=1 + func_cl_dashl "$2" + set x "$@" "$lib" + shift + ;; + -l*) + func_cl_dashl "${1#-l}" + set x "$@" "$lib" + shift + ;; + -L) + eat=1 + func_cl_dashL "$2" + ;; + -L*) + func_cl_dashL "${1#-L}" + ;; + -static) + shared=false + ;; + -Wl,*) + arg=${1#-Wl,} + save_ifs="$IFS"; IFS=',' + for flag in $arg; do + IFS="$save_ifs" + linker_opts="$linker_opts $flag" + done + IFS="$save_ifs" + ;; + -Xlinker) + eat=1 + linker_opts="$linker_opts $2" + ;; + -*) + set x "$@" "$1" + shift + ;; + *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) + func_file_conv "$1" + set x "$@" -Tp"$file" + shift + ;; + *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) + func_file_conv "$1" mingw + set x "$@" "$file" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift + done + if test -n "$linker_opts"; then + linker_opts="-link$linker_opts" + fi + exec "$@" $linker_opts + exit 1 +} + +eat= + case $1 in '') - echo "$0: No command. Try \`$0 --help' for more information." 1>&2 + echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] -Wrapper for compilers which do not understand `-c -o'. -Remove `-o dest.o' from ARGS, run PROGRAM with the remaining +Wrapper for compilers which do not understand '-c -o'. +Remove '-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the -right script to run: please start by reading the file `INSTALL'. +right script to run: please start by reading the file 'INSTALL'. Report bugs to . EOF @@ -53,11 +251,13 @@ EOF echo "compile $scriptversion" exit $? ;; + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) + func_cl_wrapper "$@" # Doesn't return... + ;; esac ofile= cfile= -eat= for arg do @@ -66,8 +266,8 @@ do else case $1 in -o) - # configure might choose to run compile as `compile cc -o foo foo.c'. - # So we strip `-o arg' only if arg is an object. + # configure might choose to run compile as 'compile cc -o foo foo.c'. + # So we strip '-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) @@ -94,10 +294,10 @@ do done if test -z "$ofile" || test -z "$cfile"; then - # If no `-o' option was seen then we might have been invoked from a + # If no '-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no - # `.c' file was seen then we are probably linking. That is also + # '.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi @@ -106,7 +306,7 @@ fi cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. -# Note: use `[/\\:.-]' here to ensure that we don't use the same name +# Note: use '[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d diff --git a/config.guess b/config.guess index c2246a4..d622a44 100755 --- a/config.guess +++ b/config.guess @@ -1,10 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -# Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +# 2011, 2012 Free Software Foundation, Inc. -timestamp='2009-12-30' +timestamp='2012-02-10' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -17,9 +17,7 @@ timestamp='2009-12-30' # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -57,8 +55,8 @@ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free -Software Foundation, Inc. +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 +Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -145,7 +143,7 @@ UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward @@ -181,7 +179,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in fi ;; *) - os=netbsd + os=netbsd ;; esac # The OS release @@ -224,7 +222,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on @@ -270,7 +268,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit ;; + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + exitcode=$? + trap '' 0 + exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead @@ -296,7 +297,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in echo s390-ibm-zvmoe exit ;; *:OS400:*:*) - echo powerpc-ibm-os400 + echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} @@ -395,23 +396,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit ;; + exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; @@ -481,8 +482,8 @@ EOF echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ @@ -495,7 +496,7 @@ EOF else echo i586-dg-dgux${UNAME_RELEASE} fi - exit ;; + exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; @@ -552,7 +553,7 @@ EOF echo rs6000-ibm-aix3.2 fi exit ;; - *:AIX:*:[456]) + *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 @@ -595,52 +596,52 @@ EOF 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac + esac ;; + esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + sed 's/^ //' << EOF >$dummy.c - #define _HPUX_SOURCE - #include - #include + #define _HPUX_SOURCE + #include + #include - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa @@ -731,22 +732,22 @@ EOF exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd - exit ;; + exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi - exit ;; + exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd - exit ;; + exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd - exit ;; + exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd - exit ;; + exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; @@ -770,14 +771,14 @@ EOF exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} @@ -789,13 +790,12 @@ EOF echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + UNAME_PROCESSOR=`/usr/bin/uname -p` + case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) @@ -804,15 +804,18 @@ EOF *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; + i*:MSYS*:*) + echo ${UNAME_MACHINE}-pc-msys + exit ;; i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) - case ${UNAME_MACHINE} in + case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; @@ -858,6 +861,13 @@ EOF i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; + aarch64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; @@ -867,7 +877,7 @@ EOF EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; - esac + esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} @@ -879,20 +889,29 @@ EOF then echo ${UNAME_MACHINE}-unknown-linux-gnu else - echo ${UNAME_MACHINE}-unknown-linux-gnueabi + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo ${UNAME_MACHINE}-unknown-linux-gnueabi + else + echo ${UNAME_MACHINE}-unknown-linux-gnueabihf + fi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) - echo cris-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-gnu exit ;; crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-gnu exit ;; frv:Linux:*:*) - echo frv-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + hexagon:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:Linux:*:*) LIBC=gnu @@ -934,7 +953,7 @@ EOF test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) - echo or32-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu @@ -960,7 +979,7 @@ EOF echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu @@ -968,14 +987,17 @@ EOF sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; + tile*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. @@ -984,11 +1006,11 @@ EOF echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. + # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) @@ -1020,7 +1042,7 @@ EOF fi exit ;; i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. + # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; @@ -1048,13 +1070,13 @@ EOF exit ;; pc:*:*:*) # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i586. + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp - exit ;; + exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; @@ -1089,8 +1111,8 @@ EOF /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ @@ -1133,10 +1155,10 @@ EOF echo ns32k-sni-sysv fi exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm @@ -1162,11 +1184,11 @@ EOF exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} + echo mips-nec-sysv${UNAME_RELEASE} else - echo mips-unknown-sysv${UNAME_RELEASE} + echo mips-unknown-sysv${UNAME_RELEASE} fi - exit ;; + exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; @@ -1231,6 +1253,9 @@ EOF *:QNX:*:4*) echo i386-pc-qnx exit ;; + NEO-?:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk${UNAME_RELEASE} + exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; @@ -1276,13 +1301,13 @@ EOF echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} + echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` + UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; @@ -1300,6 +1325,9 @@ EOF i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; + x86_64:VMkernel:*:*) + echo ${UNAME_MACHINE}-unknown-esx + exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 @@ -1322,11 +1350,11 @@ main () #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 - "4" + "4" #else - "" + "" #endif - ); exit (0); + ); exit (0); #endif #endif diff --git a/config.h.in b/config.h.in index 05ed111..a45b4a7 100644 --- a/config.h.in +++ b/config.h.in @@ -13,8 +13,8 @@ /* Use AppIndicator 0.2.9 */ #undef HAVE_APPINDICATOR_029 -/* Define to 1 if you have the header file. */ -#undef HAVE_ARPA_INET_H +/* Use libatasmart */ +#undef HAVE_ATASMART /* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework. */ @@ -31,8 +31,8 @@ */ #undef HAVE_DCGETTEXT -/* Define to 1 if you have the header file. */ -#undef HAVE_GETOPT_H +/* Use gconf2 */ +#undef HAVE_GCONF2 /* Define if the GNU gettext() function is already present or preinstalled. */ #undef HAVE_GETTEXT @@ -40,9 +40,6 @@ /* Define to 1 if you have the `gettimeofday' function. */ #undef HAVE_GETTIMEOFDAY -/* Use GTK3 */ -#undef HAVE_GTK3 - /* Use GTOP */ #undef HAVE_GTOP @@ -55,6 +52,9 @@ /* Use JSON */ #undef HAVE_JSON +/* Use JSON0 */ +#undef HAVE_JSON_0 + /* libatiadl is available */ #undef HAVE_LIBATIADL @@ -64,6 +64,9 @@ /* Use desktop notification */ #undef HAVE_LIBNOTIFY +/* Define to 1 if you have the `pthread' library (-lpthread). */ +#undef HAVE_LIBPTHREAD + /* Define to 1 if you have the `sensors' library (-lsensors). */ #undef HAVE_LIBSENSORS @@ -77,9 +80,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H -/* Define to 1 if you have the header file. */ -#undef HAVE_NETINET_IN_H - /* Define to 1 if you have the header file. */ #undef HAVE_NVCTRL_NVCTRLLIB_H @@ -105,6 +105,9 @@ /* Define to 1 if you have the `socket' function. */ #undef HAVE_SOCKET +/* Define to 1 if you have the header file. */ +#undef HAVE_STDBOOL_H + /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H @@ -123,15 +126,9 @@ /* Define to 1 if you have the `strtol' function. */ #undef HAVE_STRTOL -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_SOCKET_H - /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TIME_H - /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H @@ -171,6 +168,17 @@ /* Version number of package */ #undef VERSION +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +#undef _FILE_OFFSET_BITS + +/* Define for large files, on AIX-style hosts. */ +#undef _LARGE_FILES + /* Define to rpl_malloc if the replacement function should be used. */ #undef malloc diff --git a/config.sub b/config.sub index c2d1257..6205f84 100755 --- a/config.sub +++ b/config.sub @@ -1,10 +1,10 @@ #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -# Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +# 2011, 2012 Free Software Foundation, Inc. -timestamp='2010-01-22' +timestamp='2012-04-18' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -21,9 +21,7 @@ timestamp='2010-01-22' # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -76,8 +74,8 @@ version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free -Software Foundation, Inc. +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 +Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -124,13 +122,18 @@ esac # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ - uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ + linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; + android-linux) + os=-linux-android + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown + ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] @@ -157,8 +160,8 @@ case $os in os= basic_machine=$1 ;; - -bluegene*) - os=-cnk + -bluegene*) + os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= @@ -174,10 +177,10 @@ case $os in os=-chorusos basic_machine=$1 ;; - -chorusrdb) - os=-chorusrdb + -chorusrdb) + os=-chorusrdb basic_machine=$1 - ;; + ;; -hiux*) os=-hiuxwe2 ;; @@ -222,6 +225,12 @@ case $os in -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; + -lynx*178) + os=-lynxos178 + ;; + -lynx*5) + os=-lynxos5 + ;; -lynx*) os=-lynxos ;; @@ -246,17 +255,22 @@ case $basic_machine in # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ + | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | be32 | be64 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ + | epiphany \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ + | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep | metag \ @@ -282,29 +296,39 @@ case $basic_machine in | moxie \ | mt \ | msp430 \ + | nds32 | nds32le | nds32be \ | nios | nios2 \ | ns16k | ns32k \ + | open8 \ | or32 \ | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ - | rx \ + | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu | strongarm \ - | tahoe | thumb | tic4x | tic80 | tron \ + | spu \ + | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ - | v850 | v850e \ + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | we32k \ - | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ + | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; - m6811 | m68hc11 | m6812 | m68hc12 | picochip) - # Motorola 68HC11/12. + c54x) + basic_machine=tic54x-unknown + ;; + c55x) + basic_machine=tic55x-unknown + ;; + c6x) + basic_machine=tic6x-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) basic_machine=$basic_machine-unknown os=-none ;; @@ -314,6 +338,21 @@ case $basic_machine in basic_machine=mt-unknown ;; + strongarm | thumb | xscale) + basic_machine=arm-unknown + ;; + xgate) + basic_machine=$basic_machine-unknown + os=-none + ;; + xscaleeb) + basic_machine=armeb-unknown + ;; + + xscaleel) + basic_machine=armel-unknown + ;; + # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. @@ -328,21 +367,25 @@ case $basic_machine in # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ + | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ + | be32-* | be64-* \ | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ + | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ @@ -368,26 +411,29 @@ case $basic_machine in | mmix-* \ | mt-* \ | msp430-* \ + | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ + | open8-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ - | romp-* | rs6000-* | rx-* \ + | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ + | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tile-* | tilegx-* \ + | tile*-* \ | tron-* \ | ubicom32-* \ - | v850-* | v850e-* | vax-* \ + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ + | vax-* \ | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) @@ -412,7 +458,7 @@ case $basic_machine in basic_machine=a29k-amd os=-udi ;; - abacus) + abacus) basic_machine=abacus-unknown ;; adobe68k) @@ -482,11 +528,20 @@ case $basic_machine in basic_machine=powerpc-ibm os=-cnk ;; + c54x-*) + basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c55x-*) + basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c6x-*) + basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; c90) basic_machine=c90-cray os=-unicos ;; - cegcc) + cegcc) basic_machine=arm-unknown os=-cegcc ;; @@ -518,7 +573,7 @@ case $basic_machine in basic_machine=craynv-cray os=-unicosmp ;; - cr16) + cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; @@ -676,7 +731,6 @@ case $basic_machine in i370-ibm* | ibm*) basic_machine=i370-ibm ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 @@ -734,7 +788,7 @@ case $basic_machine in basic_machine=ns32k-utek os=-sysv ;; - microblaze) + microblaze) basic_machine=microblaze-xilinx ;; mingw32) @@ -773,10 +827,18 @@ case $basic_machine in ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; + msys) + basic_machine=i386-pc + os=-msys + ;; mvs) basic_machine=i370-ibm os=-mvs ;; + nacl) + basic_machine=le32-unknown + os=-nacl + ;; ncr3000) basic_machine=i486-ncr os=-sysv4 @@ -841,6 +903,12 @@ case $basic_machine in np1) basic_machine=np1-gould ;; + neo-tandem) + basic_machine=neo-tandem + ;; + nse-tandem) + basic_machine=nse-tandem + ;; nsr-tandem) basic_machine=nsr-tandem ;; @@ -923,9 +991,10 @@ case $basic_machine in ;; power) basic_machine=power-ibm ;; - ppc) basic_machine=powerpc-unknown + ppc | ppcbe) basic_machine=powerpc-unknown ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ppc-* | ppcbe-*) + basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown @@ -1019,6 +1088,9 @@ case $basic_machine in basic_machine=i860-stratus os=-sysv4 ;; + strongarm-* | thumb-*) + basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; sun2) basic_machine=m68000-sun ;; @@ -1075,25 +1147,8 @@ case $basic_machine in basic_machine=t90-cray os=-unicos ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff - ;; - tic55x | c55x*) - basic_machine=tic55x-unknown - os=-coff - ;; - tic6x | c6x*) - basic_machine=tic6x-unknown - os=-coff - ;; - # This must be matched before tile*. - tilegx*) - basic_machine=tilegx-unknown - os=-linux-gnu - ;; tile*) - basic_machine=tile-unknown + basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) @@ -1163,6 +1218,9 @@ case $basic_machine in xps | xps100) basic_machine=xps100-honeywell ;; + xscale-* | xscalee[bl]-*) + basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` + ;; ymp) basic_machine=ymp-cray os=-unicos @@ -1260,11 +1318,11 @@ esac if [ x"$os" != x"" ] then case $os in - # First match some system type aliases - # that might get confused with valid system types. + # First match some system type aliases + # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. - -auroraux) - os=-auroraux + -auroraux) + os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` @@ -1300,8 +1358,9 @@ case $os in | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ + | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ @@ -1348,7 +1407,7 @@ case $os in -opened*) os=-openedition ;; - -os400*) + -os400*) os=-os400 ;; -wince*) @@ -1397,7 +1456,7 @@ case $os in -sinix*) os=-sysv4 ;; - -tpf*) + -tpf*) os=-tpf ;; -triton*) @@ -1442,8 +1501,8 @@ case $os in -dicos*) os=-dicos ;; - -nacl*) - ;; + -nacl*) + ;; -none) ;; *) @@ -1466,10 +1525,10 @@ else # system, and we'll never get to this point. case $basic_machine in - score-*) + score-*) os=-elf ;; - spu-*) + spu-*) os=-elf ;; *-acorn) @@ -1481,8 +1540,20 @@ case $basic_machine in arm*-semi) os=-aout ;; - c4x-* | tic4x-*) - os=-coff + c4x-* | tic4x-*) + os=-coff + ;; + hexagon-*) + os=-elf + ;; + tic54x-*) + os=-coff + ;; + tic55x-*) + os=-coff + ;; + tic6x-*) + os=-coff ;; # This must come before the *-dec entry. pdp10-*) @@ -1502,14 +1573,11 @@ case $basic_machine in ;; m68000-sun) os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 ;; m68*-cisco) os=-aout ;; - mep-*) + mep-*) os=-elf ;; mips*-cisco) @@ -1536,7 +1604,7 @@ case $basic_machine in *-ibm) os=-aix ;; - *-knuth) + *-knuth) os=-mmixware ;; *-wec) diff --git a/configure b/configure index f564541..97948b7 100755 --- a/configure +++ b/configure @@ -1,13 +1,11 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for psensor 0.6.2.17. +# Generated by GNU Autoconf 2.69 for psensor 0.8.0.4. # # Report bugs to . # # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -# Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -136,6 +134,31 @@ export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh @@ -169,7 +192,8 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi -test x\$exitcode = x0 || exit 1" +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && @@ -214,21 +238,25 @@ IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - # Preserve -v and -x to the replacement shell. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; - esac - exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi if test x$as_have_required = xno; then : @@ -331,6 +359,14 @@ $as_echo X"$as_dir" | } # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take @@ -452,6 +488,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). @@ -486,16 +526,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -507,28 +547,8 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -560,12 +580,12 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='psensor' PACKAGE_TARNAME='psensor' -PACKAGE_VERSION='0.6.2.17' -PACKAGE_STRING='psensor 0.6.2.17' +PACKAGE_VERSION='0.8.0.4' +PACKAGE_STRING='psensor 0.8.0.4' PACKAGE_BUGREPORT='jeanfi@gmail.com' PACKAGE_URL='http://wpitchoune.net/psensor' -ac_unique_file="src/compat.h" +ac_unique_file="src/ui.c" # Factoring default headers for most tests. ac_includes_default="\ #include @@ -606,6 +626,9 @@ gt_needs= ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS +CPPCHECK_FALSE +CPPCHECK_TRUE +HAVE_CPPCHECK HELP2MAN GTOP_FALSE GTOP_TRUE @@ -643,20 +666,36 @@ LIBNOTIFY_FALSE LIBNOTIFY_TRUE LIBNOTIFY_LIBS LIBNOTIFY_CFLAGS +ATASMART_FALSE +ATASMART_TRUE +ATASMART_LIBS +ATASMART_CFLAGS +GCONF_FALSE +GCONF_TRUE GCONF_LIBS GCONF_CFLAGS GTK_FALSE GTK_TRUE GTK_LIBS GTK_CFLAGS +XEXT_FALSE +XEXT_TRUE XEXT_LIBS XEXT_CFLAGS +X11_FALSE +X11_TRUE X11_LIBS X11_CFLAGS PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG SENSORS_LIBS +PTHREAD_LIBS +GCONF_SCHEMAS_INSTALL_FALSE +GCONF_SCHEMAS_INSTALL_TRUE +GCONF_SCHEMA_FILE_DIR +GCONF_SCHEMA_CONFIG_SOURCE +GCONFTOOL POSUB LTLIBINTL LIBINTL @@ -687,10 +726,13 @@ EGREP GREP CPP XMKMF +ac_ct_AR +AR RANLIB am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE +am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE @@ -769,12 +811,16 @@ ac_subst_files='' ac_user_opts=' enable_option_checking enable_dependency_tracking +enable_largefile with_x enable_nls with_gnu_ld enable_rpath with_libiconv_prefix with_libintl_prefix +with_gconf_source +with_gconf_schema_file_dir +enable_schemas_install with_libatiadl with_gtop ' @@ -799,6 +845,8 @@ GTK_CFLAGS GTK_LIBS GCONF_CFLAGS GCONF_LIBS +ATASMART_CFLAGS +ATASMART_LIBS LIBNOTIFY_CFLAGS LIBNOTIFY_LIBS APPINDICATOR_CFLAGS @@ -1268,8 +1316,6 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1355,7 +1401,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures psensor 0.6.2.17 to adapt to many kinds of systems. +\`configure' configures psensor 0.8.0.4 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1429,7 +1475,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of psensor 0.6.2.17:";; + short | recursive ) echo "Configuration of psensor 0.8.0.4:";; esac cat <<\_ACEOF @@ -1439,8 +1485,11 @@ Optional Features: --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors + --disable-largefile omit support for large files --disable-nls do not use Native Language Support --disable-rpath do not hardcode runtime library paths + --disable-schemas-install + Disable the schemas installation Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -1451,6 +1500,10 @@ Optional Packages: --without-libiconv-prefix don't search for libiconv in includedir and libdir --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib --without-libintl-prefix don't search for libintl in includedir and libdir + --with-gconf-source=sourceaddress + Config database for installing schema files. + --with-gconf-schema-file-dir=dir + Directory for installing schema files. --with-libatiadl=DIR use libatiadlxx in DIR --with-gtop=yes|no use gtop @@ -1478,6 +1531,10 @@ Some influential environment variables: GCONF_CFLAGS C compiler flags for GCONF, overriding pkg-config GCONF_LIBS linker flags for GCONF, overriding pkg-config + ATASMART_CFLAGS + C compiler flags for ATASMART, overriding pkg-config + ATASMART_LIBS + linker flags for ATASMART, overriding pkg-config LIBNOTIFY_CFLAGS C compiler flags for LIBNOTIFY, overriding pkg-config LIBNOTIFY_LIBS @@ -1567,10 +1624,10 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -psensor configure 0.6.2.17 -generated by GNU Autoconf 2.68 +psensor configure 0.8.0.4 +generated by GNU Autoconf 2.69 -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1683,7 +1740,7 @@ $as_echo "$ac_try_echo"; } >&5 test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext + test -x conftest$ac_exeext }; then : ac_retval=0 else @@ -1990,8 +2047,8 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by psensor $as_me 0.6.2.17, which was -generated by GNU Autoconf 2.68. Invocation command line was +It was created by psensor $as_me 0.8.0.4, which was +generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2408,7 +2465,7 @@ case $as_dir/ in #(( # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -2577,7 +2634,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2617,7 +2674,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2668,7 +2725,7 @@ do test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do - { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ @@ -2721,7 +2778,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2807,7 +2864,7 @@ fi # Define the identity of the package. PACKAGE='psensor' - VERSION='0.6.2.17' + VERSION='0.8.0.4' cat >>confdefs.h <<_ACEOF @@ -2837,11 +2894,11 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. -# Always define AMTAR for backward compatibility. - -AMTAR=${AMTAR-"${am_missing_run}tar"} +# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AMTAR='$${TAR-tar}' -am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' +am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' @@ -2852,6 +2909,9 @@ am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' ac_config_headers="$ac_config_headers config.h" +# m4 + + # Checks for programs. ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -2875,7 +2935,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2915,7 +2975,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2968,7 +3028,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3009,7 +3069,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -3067,7 +3127,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3111,7 +3171,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3557,8 +3617,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include -#include -#include +struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -3694,6 +3753,7 @@ fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' + am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= @@ -3718,6 +3778,7 @@ else # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. + rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. @@ -3777,7 +3838,7 @@ else break fi ;; - msvisualcpp | msvcmsys) + msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. @@ -3959,6 +4020,208 @@ fi + +# Check whether --enable-largefile was given. +if test "${enable_largefile+set}" = set; then : + enableval=$enable_largefile; +fi + +if test "$enable_largefile" != no; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 +$as_echo_n "checking for special C compiler options needed for large files... " >&6; } +if ${ac_cv_sys_largefile_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_sys_largefile_CC=no + if test "$GCC" != yes; then + ac_save_CC=$CC + while :; do + # IRIX 6.2 and later do not support large files by default, + # so use the C compiler's -n32 option if that helps. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF + if ac_fn_c_try_compile "$LINENO"; then : + break +fi +rm -f core conftest.err conftest.$ac_objext + CC="$CC -n32" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_largefile_CC=' -n32'; break +fi +rm -f core conftest.err conftest.$ac_objext + break + done + CC=$ac_save_CC + rm -f conftest.$ac_ext + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 +$as_echo "$ac_cv_sys_largefile_CC" >&6; } + if test "$ac_cv_sys_largefile_CC" != no; then + CC=$CC$ac_cv_sys_largefile_CC + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 +$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } +if ${ac_cv_sys_file_offset_bits+:} false; then : + $as_echo_n "(cached) " >&6 +else + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_file_offset_bits=no; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _FILE_OFFSET_BITS 64 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_file_offset_bits=64; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_file_offset_bits=unknown + break +done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 +$as_echo "$ac_cv_sys_file_offset_bits" >&6; } +case $ac_cv_sys_file_offset_bits in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits +_ACEOF +;; +esac +rm -rf conftest* + if test $ac_cv_sys_file_offset_bits = unknown; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 +$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } +if ${ac_cv_sys_large_files+:} false; then : + $as_echo_n "(cached) " >&6 +else + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_large_files=no; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _LARGE_FILES 1 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_large_files=1; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_large_files=unknown + break +done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 +$as_echo "$ac_cv_sys_large_files" >&6; } +case $ac_cv_sys_large_files in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _LARGE_FILES $ac_cv_sys_large_files +_ACEOF +;; +esac +rm -rf conftest* + fi + + +fi + + # Checks lib build if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. @@ -3977,7 +4240,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4017,7 +4280,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4052,9 +4315,168 @@ else RANLIB="$ac_cv_prog_RANLIB" fi +if test -n "$ac_tool_prefix"; then + for ac_prog in ar lib "link -lib" + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AR="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AR" && break + done +fi +if test -z "$AR"; then + ac_ct_AR=$AR + for ac_prog in ar lib "link -lib" +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AR="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_AR" && break +done + + if test "x$ac_ct_AR" = x; then + AR="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +fi + +: ${AR=ar} + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5 +$as_echo_n "checking the archiver ($AR) interface... " >&6; } +if ${am_cv_ar_interface+:} false; then : + $as_echo_n "(cached) " >&6 +else + am_cv_ar_interface=ar + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int some_variable = 0; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 + (eval $am_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -eq 0; then + am_cv_ar_interface=ar + else + am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 + (eval $am_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -eq 0; then + am_cv_ar_interface=lib + else + am_cv_ar_interface=unknown + fi + fi + rm -f conftest.lib libconftest.a + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5 +$as_echo "$am_cv_ar_interface" >&6; } + +case $am_cv_ar_interface in +ar) + ;; +lib) + # Microsoft lib, so override with the ar-lib wrapper script. + # FIXME: It is wrong to rewrite AR. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__AR in this case, + # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something + # similar. + AR="$am_aux_dir/ar-lib $AR" + ;; +unknown) + as_fn_error $? "could not determine $AR interface" "$LINENO" 5 + ;; +esac -# Checks for header files. +# Checks for header files. ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -4402,7 +4824,7 @@ do for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in @@ -4468,7 +4890,7 @@ do for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in @@ -4645,13 +5067,12 @@ fi done -for ac_header in arpa/inet.h netinet/in.h stdint.h stdlib.h string.h sys/socket.h sys/time.h unistd.h getopt.h +for ac_header in stdbool.h do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + ac_fn_c_check_header_mongrel "$LINENO" "stdbool.h" "ac_cv_header_stdbool_h" "$ac_includes_default" +if test "x$ac_cv_header_stdbool_h" = xyes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_STDBOOL_H 1 _ACEOF fi @@ -4940,7 +5361,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6923,31 +7344,173 @@ $as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h -############### common - -# Checks sensors, required by psensor and psensor-server -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sensors_init in -lsensors" >&5 -$as_echo_n "checking for sensors_init in -lsensors... " >&6; } -if ${ac_cv_lib_sensors_sensors_init+:} false; then : +# Gconf +# Extract the first word of "gconftool-2", so it can be a program name with args. +set dummy gconftool-2; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_GCONFTOOL+:} false; then : $as_echo_n "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsensors $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char sensors_init (); -int -main () -{ -return sensors_init (); - ; + case $GCONFTOOL in + [\\/]* | ?:[\\/]*) + ac_cv_path_GCONFTOOL="$GCONFTOOL" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_GCONFTOOL="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_GCONFTOOL" && ac_cv_path_GCONFTOOL="no" + ;; +esac +fi +GCONFTOOL=$ac_cv_path_GCONFTOOL +if test -n "$GCONFTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCONFTOOL" >&5 +$as_echo "$GCONFTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then + GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source` + else + GCONF_SCHEMA_CONFIG_SOURCE=$GCONF_SCHEMA_INSTALL_SOURCE + fi + + +# Check whether --with-gconf-source was given. +if test "${with_gconf_source+set}" = set; then : + withval=$with_gconf_source; GCONF_SCHEMA_CONFIG_SOURCE="$withval" +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation" >&5 +$as_echo "Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation" >&6; } + + if test "x$GCONF_SCHEMA_FILE_DIR" = "x"; then + GCONF_SCHEMA_FILE_DIR='$(sysconfdir)/gconf/schemas' + fi + + +# Check whether --with-gconf-schema-file-dir was given. +if test "${with_gconf_schema_file_dir+set}" = set; then : + withval=$with_gconf_schema_file_dir; GCONF_SCHEMA_FILE_DIR="$withval" +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files" >&5 +$as_echo "Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files" >&6; } + + # Check whether --enable-schemas-install was given. +if test "${enable_schemas_install+set}" = set; then : + enableval=$enable_schemas_install; case ${enableval} in + yes|no) ;; + *) as_fn_error $? "bad value ${enableval} for --enable-schemas-install" "$LINENO" 5 ;; + esac +fi + + if test "$enable_schemas_install" != no; then + GCONF_SCHEMAS_INSTALL_TRUE= + GCONF_SCHEMAS_INSTALL_FALSE='#' +else + GCONF_SCHEMAS_INSTALL_TRUE='#' + GCONF_SCHEMAS_INSTALL_FALSE= +fi + + + +############### common + +# Checks pthread +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5 +$as_echo_n "checking for pthread_create in -lpthread... " >&6; } +if ${ac_cv_lib_pthread_pthread_create+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpthread $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pthread_create (); +int +main () +{ +return pthread_create (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_pthread_pthread_create=yes +else + ac_cv_lib_pthread_pthread_create=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5 +$as_echo "$ac_cv_lib_pthread_pthread_create" >&6; } +if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBPTHREAD 1 +_ACEOF + + LIBS="-lpthread $LIBS" + +fi + +PTHREAD_LIBS=-pthread + + +# Checks sensors, required by psensor and psensor-server +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sensors_init in -lsensors" >&5 +$as_echo_n "checking for sensors_init in -lsensors... " >&6; } +if ${ac_cv_lib_sensors_sensors_init+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsensors $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char sensors_init (); +int +main () +{ +return sensors_init (); + ; return 0; } _ACEOF @@ -7018,7 +7581,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7061,7 +7624,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7170,31 +7733,13 @@ fi # Put the nasty error message in config.log where it belongs echo "$X11_PKG_ERRORS" >&5 - as_fn_error $? "Package requirements (x11) were not met: - -$X11_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables X11_CFLAGS -and X11_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"x11 missing psensor will not be built\"" >&5 +$as_echo "$as_me: WARNING: \"x11 missing psensor will not be built\"" >&2;} elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables X11_CFLAGS -and X11_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"x11 missing psensor will not be built\"" >&5 +$as_echo "$as_me: WARNING: \"x11 missing psensor will not be built\"" >&2;} else X11_CFLAGS=$pkg_cv_X11_CFLAGS X11_LIBS=$pkg_cv_X11_LIBS @@ -7202,6 +7747,14 @@ else $as_echo "yes" >&6; } fi + if test -n "$X11_LIBS"; then + X11_TRUE= + X11_FALSE='#' +else + X11_TRUE='#' + X11_FALSE= +fi + @@ -7264,31 +7817,13 @@ fi # Put the nasty error message in config.log where it belongs echo "$XEXT_PKG_ERRORS" >&5 - as_fn_error $? "Package requirements (xext) were not met: - -$XEXT_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables XEXT_CFLAGS -and XEXT_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"xext missing psensor will not be built\"" >&5 +$as_echo "$as_me: WARNING: \"xext missing psensor will not be built\"" >&2;} elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables XEXT_CFLAGS -and XEXT_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"xext missing psensor will not be built\"" >&5 +$as_echo "$as_me: WARNING: \"xext missing psensor will not be built\"" >&2;} else XEXT_CFLAGS=$pkg_cv_XEXT_CFLAGS XEXT_LIBS=$pkg_cv_XEXT_LIBS @@ -7296,11 +7831,18 @@ else $as_echo "yes" >&6; } fi + if test -n "$XEXT_LIBS"; then + XEXT_TRUE= + XEXT_FALSE='#' +else + XEXT_TRUE='#' + XEXT_FALSE= +fi + -# Checks GTK -GTK_LIBS= +# Checks GTK+ 3.0 pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK" >&5 @@ -7360,21 +7902,19 @@ fi # Put the nasty error message in config.log where it belongs echo "$GTK_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"GTK+ 3 not present\"" >&5 -$as_echo "$as_me: WARNING: \"GTK+ 3 not present\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"gtk missing psensor will not be built\"" >&5 +$as_echo "$as_me: WARNING: \"gtk missing psensor will not be built\"" >&2;} elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"GTK+ 3 not present\"" >&5 -$as_echo "$as_me: WARNING: \"GTK+ 3 not present\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"gtk missing psensor will not be built\"" >&5 +$as_echo "$as_me: WARNING: \"gtk missing psensor will not be built\"" >&2;} else GTK_CFLAGS=$pkg_cv_GTK_CFLAGS GTK_LIBS=$pkg_cv_GTK_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } -$as_echo "#define HAVE_GTK3 1" >>confdefs.h - fi if test -n "$GTK_LIBS"; then GTK_TRUE= @@ -7384,25 +7924,32 @@ else GTK_FALSE= fi +# ensure that only allowed headers are included +GTK_CFLAGS+=" -DGTK_DISABLE_SINGLE_INCLUDES " +# ensure that no gtk deprecated symbols are used +GTK_CFLAGS+=" -DGDK_DISABLE_DEPRECATED " +GTK_CFLAGS+=" -DGTK_DISABLE_DEPRECATED " +# ensure use of accessors +GTK_CFLAGS+=" -DGSEAL_ENABLE " -if test "$GTK_LIBS" == ""; then +# Check GCONF pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK" >&5 -$as_echo_n "checking for GTK... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCONF" >&5 +$as_echo_n "checking for GCONF... " >&6; } -if test -n "$GTK_CFLAGS"; then - pkg_cv_GTK_CFLAGS="$GTK_CFLAGS" +if test -n "$GCONF_CFLAGS"; then + pkg_cv_GCONF_CFLAGS="$GCONF_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= 2.18\""; } >&5 - ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= 2.18") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gconf-2.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "gconf-2.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_GTK_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 2.18" 2>/dev/null` + pkg_cv_GCONF_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -7410,16 +7957,16 @@ fi else pkg_failed=untried fi -if test -n "$GTK_LIBS"; then - pkg_cv_GTK_LIBS="$GTK_LIBS" +if test -n "$GCONF_LIBS"; then + pkg_cv_GCONF_LIBS="$GCONF_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= 2.18\""; } >&5 - ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= 2.18") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gconf-2.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "gconf-2.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_GTK_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= 2.18" 2>/dev/null` + pkg_cv_GCONF_LIBS=`$PKG_CONFIG --libs "gconf-2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -7440,73 +7987,58 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - GTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gtk+-2.0 >= 2.18" 2>&1` + GCONF_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gconf-2.0" 2>&1` else - GTK_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gtk+-2.0 >= 2.18" 2>&1` + GCONF_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gconf-2.0" 2>&1` fi # Put the nasty error message in config.log where it belongs - echo "$GTK_PKG_ERRORS" >&5 - - as_fn_error $? "Package requirements (gtk+-2.0 >= 2.18) were not met: - -$GTK_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. + echo "$GCONF_PKG_ERRORS" >&5 -Alternatively, you may set the environment variables GTK_CFLAGS -and GTK_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"gconf2 missing psensor will not be built\"" >&5 +$as_echo "$as_me: WARNING: \"gconf2 missing psensor will not be built\"" >&2;} elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables GTK_CFLAGS -and GTK_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"gconf2 missing psensor will not be built\"" >&5 +$as_echo "$as_me: WARNING: \"gconf2 missing psensor will not be built\"" >&2;} else - GTK_CFLAGS=$pkg_cv_GTK_CFLAGS - GTK_LIBS=$pkg_cv_GTK_LIBS + GCONF_CFLAGS=$pkg_cv_GCONF_CFLAGS + GCONF_LIBS=$pkg_cv_GCONF_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } +$as_echo "#define HAVE_GCONF2 1" >>confdefs.h + fi - if test -n "$GTK_LIBS"; then - GTK_TRUE= - GTK_FALSE='#' + if test -n "$GCONF_LIBS"; then + GCONF_TRUE= + GCONF_FALSE='#' else - GTK_TRUE='#' - GTK_FALSE= + GCONF_TRUE='#' + GCONF_FALSE= fi -fi -# Check GCONF +### Optional + +# check libatasmart pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCONF" >&5 -$as_echo_n "checking for GCONF... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ATASMART" >&5 +$as_echo_n "checking for ATASMART... " >&6; } -if test -n "$GCONF_CFLAGS"; then - pkg_cv_GCONF_CFLAGS="$GCONF_CFLAGS" +if test -n "$ATASMART_CFLAGS"; then + pkg_cv_ATASMART_CFLAGS="$ATASMART_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gconf-2.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "gconf-2.0") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libatasmart\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libatasmart") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_GCONF_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0" 2>/dev/null` + pkg_cv_ATASMART_CFLAGS=`$PKG_CONFIG --cflags "libatasmart" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -7514,16 +8046,16 @@ fi else pkg_failed=untried fi -if test -n "$GCONF_LIBS"; then - pkg_cv_GCONF_LIBS="$GCONF_LIBS" +if test -n "$ATASMART_LIBS"; then + pkg_cv_ATASMART_LIBS="$ATASMART_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gconf-2.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "gconf-2.0") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libatasmart\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libatasmart") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_GCONF_LIBS=`$PKG_CONFIG --libs "gconf-2.0" 2>/dev/null` + pkg_cv_ATASMART_LIBS=`$PKG_CONFIG --libs "libatasmart" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -7544,49 +8076,40 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - GCONF_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gconf-2.0" 2>&1` + ATASMART_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libatasmart" 2>&1` else - GCONF_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gconf-2.0" 2>&1` + ATASMART_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libatasmart" 2>&1` fi # Put the nasty error message in config.log where it belongs - echo "$GCONF_PKG_ERRORS" >&5 - - as_fn_error $? "Package requirements (gconf-2.0) were not met: - -$GCONF_PKG_ERRORS + echo "$ATASMART_PKG_ERRORS" >&5 -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables GCONF_CFLAGS -and GCONF_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Library atasmart not present\"" >&5 +$as_echo "$as_me: WARNING: \"Library atasmart not present\"" >&2;} elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables GCONF_CFLAGS -and GCONF_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Library atasmart not present\"" >&5 +$as_echo "$as_me: WARNING: \"Library atasmart not present\"" >&2;} else - GCONF_CFLAGS=$pkg_cv_GCONF_CFLAGS - GCONF_LIBS=$pkg_cv_GCONF_LIBS + ATASMART_CFLAGS=$pkg_cv_ATASMART_CFLAGS + ATASMART_LIBS=$pkg_cv_ATASMART_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } +$as_echo "#define HAVE_ATASMART 1" >>confdefs.h + +fi + + if test -n "$ATASMART_LIBS"; then + ATASMART_TRUE= + ATASMART_FALSE='#' +else + ATASMART_TRUE='#' + ATASMART_FALSE= fi -### Optional # Check libnotify LIBNOTIFY_LIBS= @@ -8024,6 +8547,83 @@ if test -n "$JSON_CFLAGS"; then pkg_cv_JSON_CFLAGS="$JSON_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"json-c\""; } >&5 + ($PKG_CONFIG --exists --print-errors "json-c") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_JSON_CFLAGS=`$PKG_CONFIG --cflags "json-c" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$JSON_LIBS"; then + pkg_cv_JSON_LIBS="$JSON_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"json-c\""; } >&5 + ($PKG_CONFIG --exists --print-errors "json-c") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_JSON_LIBS=`$PKG_CONFIG --libs "json-c" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + JSON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "json-c" 2>&1` + else + JSON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "json-c" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$JSON_PKG_ERRORS" >&5 + + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"json-c missing\"" >&5 +$as_echo "$as_me: WARNING: \"json-c missing\"" >&2;} +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"json-c missing\"" >&5 +$as_echo "$as_me: WARNING: \"json-c missing\"" >&2;} +else + JSON_CFLAGS=$pkg_cv_JSON_CFLAGS + JSON_LIBS=$pkg_cv_JSON_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_JSON 1" >>confdefs.h + +fi + +if test "$JSON_LIBS" == ""; then + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for JSON" >&5 +$as_echo_n "checking for JSON... " >&6; } + +if test -n "$JSON_CFLAGS"; then + pkg_cv_JSON_CFLAGS="$JSON_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"json\""; } >&5 ($PKG_CONFIG --exists --print-errors "json") 2>&5 ac_status=$? @@ -8074,13 +8674,13 @@ fi # Put the nasty error message in config.log where it belongs echo "$JSON_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Remote monitoring disabled" >&5 -$as_echo "$as_me: WARNING: \"Remote monitoring disabled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"json0 missing\"" >&5 +$as_echo "$as_me: WARNING: \"json0 missing\"" >&2;} elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Remote monitoring disabled" >&5 -$as_echo "$as_me: WARNING: \"Remote monitoring disabled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"json0 missing\"" >&5 +$as_echo "$as_me: WARNING: \"json0 missing\"" >&2;} else JSON_CFLAGS=$pkg_cv_JSON_CFLAGS JSON_LIBS=$pkg_cv_JSON_LIBS @@ -8089,7 +8689,12 @@ $as_echo "yes" >&6; } $as_echo "#define HAVE_JSON 1" >>confdefs.h + +$as_echo "#define HAVE_JSON_0 1" >>confdefs.h + +fi fi + if test -n "$JSON_LIBS"; then JSON_TRUE= JSON_FALSE='#' @@ -8552,7 +9157,7 @@ fi -ac_config_files="$ac_config_files Makefile src/Makefile src/glade/Makefile src/lib/Makefile src/server/Makefile icons/hicolor/scalable/Makefile icons/hicolor/14x14/Makefile icons/hicolor/16x16/Makefile icons/hicolor/22x22/Makefile icons/hicolor/24x24/Makefile icons/hicolor/32x32/Makefile icons/hicolor/48x48/Makefile icons/hicolor/64x64/Makefile icons/ubuntu-mono-dark/status/22/Makefile icons/ubuntu-mono-light/status/22/Makefile icons/ubuntu-mono-dark/apps/22/Makefile www/Makefile po/Makefile.in tests/Makefile" +ac_config_files="$ac_config_files Makefile doc/Makefile src/Makefile src/glade/Makefile src/lib/Makefile src/server/Makefile icons/hicolor/scalable/Makefile icons/hicolor/14x14/Makefile icons/hicolor/16x16/Makefile icons/hicolor/22x22/Makefile icons/hicolor/24x24/Makefile icons/hicolor/32x32/Makefile icons/hicolor/48x48/Makefile icons/hicolor/64x64/Makefile icons/ubuntu-mono-dark/status/22/Makefile icons/ubuntu-mono-light/status/22/Makefile icons/ubuntu-mono-dark/apps/22/Makefile www/Makefile po/Makefile.in tests/Makefile" for ac_prog in help2man @@ -8573,7 +9178,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_HELP2MAN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8598,6 +9203,52 @@ fi done +# Extract the first word of "cppcheck", so it can be a program name with args. +set dummy cppcheck; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_HAVE_CPPCHECK+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$HAVE_CPPCHECK"; then + ac_cv_prog_HAVE_CPPCHECK="$HAVE_CPPCHECK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_HAVE_CPPCHECK="yes" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +HAVE_CPPCHECK=$ac_cv_prog_HAVE_CPPCHECK +if test -n "$HAVE_CPPCHECK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_CPPCHECK" >&5 +$as_echo "$HAVE_CPPCHECK" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test -n "$HAVE_CPPCHECK"; then + CPPCHECK_TRUE= + CPPCHECK_FALSE='#' +else + CPPCHECK_TRUE='#' + CPPCHECK_FALSE= +fi + + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure @@ -8723,14 +9374,30 @@ if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${GTK_TRUE}" && test -z "${GTK_FALSE}"; then - as_fn_error $? "conditional \"GTK\" was never defined. +if test -z "${GCONF_SCHEMAS_INSTALL_TRUE}" && test -z "${GCONF_SCHEMAS_INSTALL_FALSE}"; then + as_fn_error $? "conditional \"GCONF_SCHEMAS_INSTALL\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${X11_TRUE}" && test -z "${X11_FALSE}"; then + as_fn_error $? "conditional \"X11\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${XEXT_TRUE}" && test -z "${XEXT_FALSE}"; then + as_fn_error $? "conditional \"XEXT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GTK_TRUE}" && test -z "${GTK_FALSE}"; then as_fn_error $? "conditional \"GTK\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${GCONF_TRUE}" && test -z "${GCONF_FALSE}"; then + as_fn_error $? "conditional \"GCONF\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ATASMART_TRUE}" && test -z "${ATASMART_FALSE}"; then + as_fn_error $? "conditional \"ATASMART\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${LIBNOTIFY_TRUE}" && test -z "${LIBNOTIFY_FALSE}"; then as_fn_error $? "conditional \"LIBNOTIFY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -8767,6 +9434,10 @@ if test -z "${GTOP_TRUE}" && test -z "${GTOP_FALSE}"; then as_fn_error $? "conditional \"GTOP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${CPPCHECK_TRUE}" && test -z "${CPPCHECK_FALSE}"; then + as_fn_error $? "conditional \"CPPCHECK\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 @@ -9065,16 +9736,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -9134,28 +9805,16 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -9176,8 +9835,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by psensor $as_me 0.6.2.17, which was -generated by GNU Autoconf 2.68. Invocation command line was +This file was extended by psensor $as_me 0.8.0.4, which was +generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -9243,11 +9902,11 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -psensor config.status 0.6.2.17 -configured by $0, generated by GNU Autoconf 2.68, +psensor config.status 0.8.0.4 +configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -9338,7 +9997,7 @@ fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' @@ -9383,6 +10042,7 @@ do "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "src/glade/Makefile") CONFIG_FILES="$CONFIG_FILES src/glade/Makefile" ;; "src/lib/Makefile") CONFIG_FILES="$CONFIG_FILES src/lib/Makefile" ;; diff --git a/configure.ac b/configure.ac index eab1b6d..4851a2b 100644 --- a/configure.ac +++ b/configure.ac @@ -1,24 +1,30 @@ # -*- Autoconf -*- # Process this file with autoconf to produce a configure script. -AC_PREREQ([2.64]) -AC_INIT([psensor], [0.6.2.17],[jeanfi@gmail.com],[psensor],[http://wpitchoune.net/psensor]) +AC_PREREQ([2.69]) +AC_INIT([psensor], [0.8.0.4],[jeanfi@gmail.com],[psensor],[http://wpitchoune.net/psensor]) AM_INIT_AUTOMAKE([-Wall -Werror gnu]) -AC_CONFIG_SRCDIR([src/compat.h]) +AC_CONFIG_SRCDIR([src/ui.c]) AC_CONFIG_HEADERS([config.h]) +# m4 +AC_CONFIG_MACRO_DIR([m4]) + # Checks for programs. AC_PROG_CC AM_PROG_CC_C_O +AC_SYS_LARGEFILE + # Checks lib build AC_PROG_RANLIB +AM_PROG_AR # Checks for header files. AC_PATH_X -AC_CHECK_HEADERS([arpa/inet.h netinet/in.h stdint.h stdlib.h string.h sys/socket.h sys/time.h unistd.h getopt.h]) +AC_CHECK_HEADERS([stdbool.h]) # Checks for typedefs, structures, and compiler characteristics. AC_TYPE_SIZE_T @@ -32,8 +38,17 @@ AC_CHECK_FUNCS([gettimeofday memmove socket strdup strtol]) AM_GNU_GETTEXT_VERSION([0.16]) AM_GNU_GETTEXT([external]) +# Gconf +AC_PATH_PROG(GCONFTOOL, gconftool-2, no) +AM_GCONF_SOURCE_2 + ############### common +# Checks pthread +AC_CHECK_LIB(pthread, pthread_create) +PTHREAD_LIBS=-pthread +AC_SUBST(PTHREAD_LIBS) + # Checks sensors, required by psensor and psensor-server AC_CHECK_LIB(sensors, sensors_init) AC_CHECK_HEADERS([sensors/sensors.h sensors/errors.h]) @@ -44,38 +59,48 @@ AC_SUBST(SENSORS_LIBS) ### Required -PKG_CHECK_MODULES(X11, x11) +PKG_CHECK_MODULES(X11, x11,,[AC_MSG_WARN("x11 missing psensor will not be built")]) +AM_CONDITIONAL(X11, test -n "$X11_LIBS") AC_SUBST(X11_CFLAGS) AC_SUBST(X11_LIBS) -PKG_CHECK_MODULES(XEXT, xext) +PKG_CHECK_MODULES(XEXT, xext,,[AC_MSG_WARN("xext missing psensor will not be built")]) +AM_CONDITIONAL(XEXT, test -n "$XEXT_LIBS") AC_SUBST(XEXT_CFLAGS) AC_SUBST(XEXT_LIBS) -# Checks GTK -GTK_LIBS= -PKG_CHECK_MODULES(GTK, - gtk+-3.0, - [AC_DEFINE([HAVE_GTK3],[1],[Use GTK3])], - [AC_MSG_WARN("GTK+ 3 not present")]) +# Checks GTK+ 3.0 +PKG_CHECK_MODULES(GTK, gtk+-3.0,,[AC_MSG_WARN("gtk missing psensor will not be built")]) AM_CONDITIONAL(GTK, test -n "$GTK_LIBS") +# ensure that only allowed headers are included +GTK_CFLAGS+=" -DGTK_DISABLE_SINGLE_INCLUDES " +# ensure that no gtk deprecated symbols are used +GTK_CFLAGS+=" -DGDK_DISABLE_DEPRECATED " +GTK_CFLAGS+=" -DGTK_DISABLE_DEPRECATED " +# ensure use of accessors +GTK_CFLAGS+=" -DGSEAL_ENABLE " AC_SUBST(GTK_CFLAGS) AC_SUBST(GTK_LIBS) -if test "$GTK_LIBS" == ""; then - PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.18) - AM_CONDITIONAL(GTK, test -n "$GTK_LIBS") - AC_SUBST(GTK_CFLAGS) - AC_SUBST(GTK_LIBS) -fi - # Check GCONF -PKG_CHECK_MODULES(GCONF, gconf-2.0) +PKG_CHECK_MODULES(GCONF, gconf-2.0, + [AC_DEFINE([HAVE_GCONF2],[1],[Use gconf2])], + [AC_MSG_WARN("gconf2 missing psensor will not be built")]) +AM_CONDITIONAL(GCONF, test -n "$GCONF_LIBS") AC_SUBST(GCONF_CFLAGS) AC_SUBST(GCONF_LIBS) ### Optional +# check libatasmart +PKG_CHECK_MODULES(ATASMART, libatasmart, + [AC_DEFINE([HAVE_ATASMART],[1],[Use libatasmart])], + [AC_MSG_WARN("Library atasmart not present")]) + +AM_CONDITIONAL(ATASMART, test -n "$ATASMART_LIBS") +AC_SUBST(ATASMART_CFLAGS) +AC_SUBST(ATASMART_LIBS) + # Check libnotify LIBNOTIFY_LIBS= PKG_CHECK_MODULES(LIBNOTIFY, @@ -125,9 +150,18 @@ AC_SUBST(CURL_LIBS) # Check JSON, needed for remote monitoring JSON_LIBS= PKG_CHECK_MODULES(JSON, - json, - [AC_DEFINE([HAVE_JSON],[1],[Use JSON])], - [AC_MSG_WARN("Remote monitoring disabled, json missing")]) + json-c, + [AC_DEFINE([HAVE_JSON],[1],[Use JSON])], + [AC_MSG_WARN("json-c missing")]) + +if test "$JSON_LIBS" == ""; then +PKG_CHECK_MODULES(JSON, + json, + [AC_DEFINE([HAVE_JSON],[1],[Use JSON]) + AC_DEFINE([HAVE_JSON_0],[1],[Use JSON0])], + [AC_MSG_WARN("json0 missing")]) +fi + AM_CONDITIONAL(JSON, test -n "$JSON_LIBS") AC_SUBST(JSON_CFLAGS) AC_SUBST(JSON_LIBS) @@ -224,6 +258,7 @@ AC_SUBST(GTOP_LIBS) AC_CONFIG_FILES([ Makefile + doc/Makefile src/Makefile src/glade/Makefile src/lib/Makefile @@ -246,4 +281,7 @@ AC_CONFIG_FILES([ AC_CHECK_PROGS([HELP2MAN], [help2man]) +AC_CHECK_PROG(HAVE_CPPCHECK, cppcheck, yes) +AM_CONDITIONAL(CPPCHECK, test -n "$HAVE_CPPCHECK") + AC_OUTPUT diff --git a/debian/changelog b/debian/changelog index 653f9fa..6c696f1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,80 @@ +psensor (0.8.0.4-1) unstable; urgency=low + + * New upstream release. + * debian/control + + added dep to autotools-dev to regenerate config.{guess,sub}. + + added vcs fields. + + fixed ordering of build-deps. + + longer description for psensor-common. + * debian/copyright + + copyright end date set to 2013. + * debian/psensor*.lintian-overrides + + ignored no-upstream-change lintian warnings as + upstream does not provide it. + * removed debian/docs because there are multiple bin packages. + * debian/psensor-common.install + + added README. + * debian/psensor-common.doc-base.manual + + registered to doc-base. + * debian/rules + + regenerate config.{guess,sub} automatically. (Closes: #727950) + + -- Jean-Philippe Orsini Fri, 20 Sep 2013 19:39:45 -0400 + +psensor (0.8.0.3-2) unstable; urgency=low + + * debian/control + + exclude build dep to atasmart lib for hurd and kfreebsd. + + -- Jean-Philippe Orsini Sun, 08 Sep 2013 06:36:33 -0400 + +psensor (0.8.0.3-1) unstable; urgency=low + + * New upstream release. + + fixed realloc null returned value not handled in amd.c. + + fixed url var in main function not freed. + + added message when no sensor graphs are enabled. (Closes: #689355) + + replaced deprecated GtkColorSelectionDialog by GtkColorChooserDialog. + to avoid build failure with recent GTK releases. (LP: #1184442) + * debian/control + + added builddep to cppcheck. + + added builddep to asciidoc. + + added mention of FAQ in the psensor-common description. + + added mention of libatasmart support in psensor description. + + replaced builddep libjson0-dev by libjson-c-dev. + + switched to Standards-Version 3.9.4. + * debian/psensor-common.install + + added faq.txt and faq.html. + * debian/psensor.install + + added psensor.glade. + + -- Jean-Philippe Orsini Sat, 25 May 2013 04:16:57 -0400 + +psensor (0.7.0.3-1) unstable; urgency=low + + * New upstream release. + + added gconf schema. (LP: #1026807) + + fixed systray and application indicator visible at the + same time. (LP: #971098) + + fixed wrong background color, get the background color of + the window and not the canvas widget. (LP: #973122) + + removed hicolor/48x48/psensor_hot.png. (LP: #1029065) + + added degree sign for celcius. (LP: #1021900) + + fixed hide window on startup for gnome-shell. (Closes: #676361) + * debian/control + + added builddep to libatasmart-dev. + + switched to debhelper 9. + * debian/psensor.install + + added gconf schema. + * debian/rules + + set GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL to 1 to avoid gconf + schema installation during package build. + * debian/compat + + switched to debhelper 9, fixes hardening-no-relro and + hardening-no-fortify-functions lintian warnings. + + -- Jean-Philippe Orsini Sun, 19 Aug 2012 04:26:27 -0400 + psensor (0.6.2.17-2) unstable; urgency=low * debian/control @@ -8,7 +85,7 @@ psensor (0.6.2.17-2) unstable; urgency=low psensor (0.6.2.17-1) unstable; urgency=low - * New upstream release + * New upstream release. - Fixed sensor type displayed in sensor preferences. (Closes LP: #968912) * debian/control - Switched to Standards-Version 3.9.3. @@ -19,7 +96,7 @@ psensor (0.6.2.17-1) unstable; urgency=low psensor (0.6.2.16-1) unstable; urgency=low - * New upstream release + * New upstream release. - removed -pedantic compilation option. (Closes LP: #905893) * debian/control, debian/psensor.install, debian/psensor-server.install: - applied wrap-and-sort. (Closes: #652531) @@ -28,7 +105,7 @@ psensor (0.6.2.16-1) unstable; urgency=low psensor (0.6.2.15-1) unstable; urgency=low - * New upstream release + * New upstream release. - fct sysinfo is replaced by gtop2 calls. (Closes: #650533) * debian/control - set priority to 'extra' instead of 'optional' due to dependence @@ -38,7 +115,7 @@ psensor (0.6.2.15-1) unstable; urgency=low psensor (0.6.2.14-1) unstable; urgency=low - * New upstream release + * New upstream release. - monochrome icons for Ubuntu themes. (Closes LP: #811003) * debian/copyright: - replaced email with my personnal one @@ -74,7 +151,7 @@ psensor (0.6.1.9-2) unstable; urgency=low psensor (0.6.1.9-1) unstable; urgency=low - * New upstream release + * New upstream release. * debian/control: - Fixed Lintian warning: newer-standards-version. @@ -82,7 +159,7 @@ psensor (0.6.1.9-1) unstable; urgency=low psensor (0.6.1.8-1) unstable; urgency=low - * New upstream release + * New upstream release. * debian/control: - removed empty paragraphs. (Closes: #624236) - added build-dep to autoconf,automake,gettext,autopoint @@ -92,114 +169,19 @@ psensor (0.6.1.8-1) unstable; urgency=low psensor (0.6.1.7-1) unstable; urgency=low - * New upstream release + * New upstream release. -- Jean-Philippe Orsini Tue, 19 Apr 2011 14:43:17 +0200 psensor (0.6.1.6-1) unstable; urgency=low - * New upstream release + * New upstream release. * debian/control: fixed capitalization-error-in-description -- Jean-Philippe Orsini Thu, 14 Apr 2011 23:57:35 +0200 psensor (0.6.1.5-1) unstable; urgency=low - * First official Debian package. + * Initial release. -- Jean-Philippe Orsini Sun, 20 Feb 2011 15:15:30 +0100 - -psensor (0.6.1.5-0ubuntu1) maverick; urgency=low - - * New upstream release - - -- Jean-Philippe Orsini Thu, 17 Feb 2011 02:15:50 +0100 - -psensor (0.6.1.4-0ubuntu1) maverick; urgency=low - - * New upstream release - - -- Jean-Philippe Orsini Wed, 16 Feb 2011 19:17:18 +0100 - -psensor (0.6.1.3-1) maverick; urgency=low - - * upgrade upstream - * removed debian/tmp in .install files - * improved long description of the packages - * fixed debian/copyright(add real name and license preamble) - * use dh_installman - * added debian/watch file - - -- Jean-Philippe Orsini Wed, 16 Feb 2011 09:56:05 +0100 - -psensor (0.6.1.1-3) lucid; urgency=low - - * bump lucid - - -- jeanfi Tue, 15 Feb 2011 12:10:08 +0100 - -psensor (0.6.1.1-2) natty; urgency=low - - * bump natty - - -- jeanfi Tue, 15 Feb 2011 12:09:19 +0100 - -psensor (0.6.1.1-1) maverick; urgency=low - - * upgrade upstream - - -- jeanfi Tue, 15 Feb 2011 11:41:38 +0100 - -psensor (0.6.1-4) natty; urgency=low - - * bump natty - - -- jeanfi Mon, 14 Feb 2011 12:18:28 +0100 - -psensor (0.6.1-3) lucid; urgency=low - - * bump lucid - - -- jeanfi Mon, 14 Feb 2011 12:17:37 +0100 - -psensor (0.6.1-2) maverick; urgency=low - - * fixed file conflicts concerning doc dir - - -- jeanfi Mon, 14 Feb 2011 11:47:16 +0100 - -psensor (0.6.1-1) maverick; urgency=low - - * upgrade upstream - - -- jeanfi Mon, 14 Feb 2011 10:52:24 +0100 - -psensor (0.6.0.14-5) karmic; urgency=low - - * bump karmic - - -- jeanfi Sun, 13 Feb 2011 14:05:07 +0100 - -psensor (0.6.0.14-4) maverick; urgency=low - - * www/index.lua in the psensor-server package - - -- jeanfi Sun, 13 Feb 2011 13:30:30 +0100 - -psensor (0.6.0.14-3) lucid; urgency=low - - * bump lucid - - -- jeanfi Sat, 12 Feb 2011 21:18:22 +0100 - -psensor (0.6.0.14-2) natty; urgency=low - - * bump natty - - -- jeanfi Sat, 12 Feb 2011 21:16:38 +0100 - -psensor (0.6.0.14-1) maverick; urgency=low - - * upgrade upstream - - -- jeanfi Sat, 12 Feb 2011 14:34:42 +0100 diff --git a/debian/compat b/debian/compat index 7f8f011..ec63514 100644 --- a/debian/compat +++ b/debian/compat @@ -1 +1 @@ -7 +9 diff --git a/debian/control b/debian/control index bcf0c05..09275b4 100644 --- a/debian/control +++ b/debian/control @@ -2,22 +2,28 @@ Source: psensor Section: utils Priority: extra Maintainer: Jean-Philippe Orsini -Build-Depends: autoconf, +Build-Depends: asciidoc, + autoconf, automake, autopoint, - debhelper (>= 7.0.50~), + autotools-dev, + cppcheck, + debhelper (>= 9), gettext, help2man, + libatasmart-dev [!hurd-any !kfreebsd-any], libcurl4-gnutls-dev, libgconf2-dev, libgtk-3-dev, libgtop2-dev, - libjson0-dev, + libjson-c-dev, libmicrohttpd-dev, libnotify-dev, libsensors4-dev, perl -Standards-Version: 3.9.3 +Standards-Version: 3.9.4 +Vcs-Browser: http://wpitchoune.net/svnpub/packages/debian/psensor/trunk +Vcs-Svn: http://wpitchoune.net/svnpub/packages/debian/psensor/trunk Homepage: http://wpitchoune.net/psensor Package: psensor @@ -36,7 +42,7 @@ Description: display graphs for monitoring hardware temperature It can monitor: * the temperature of the motherboard and CPU sensors (using lm-sensors). * the temperature of the NVidia GPUs (using XNVCtrl). - * the temperature of the Hard Disk Drives (using hddtemp). + * the temperature of the Hard Disk Drives (using hddtemp or atasmart lib). * the rotation speed of the fans (using lm-sensors). * the sensors of a remote computer (using psensor-server). . @@ -67,5 +73,9 @@ Package: psensor-common Architecture: all Depends: ${misc:Depends} Description: common files for Psensor and Psensor server - It contains languages packs for both Psensor and Psensor server. + It contains: + * the languages packs, + * the README, + * and the FAQ. + This package is required by psensor and psensor-server packages. . diff --git a/debian/copyright b/debian/copyright index 57237f8..eadf39c 100644 --- a/debian/copyright +++ b/debian/copyright @@ -6,7 +6,7 @@ It was downloaded from: http://wpitchoune.net/psensor Upstream Author: Jean-Philippe Orsini Copyright: - Copyright (C) 2010-2012 by Jean-Philippe Orsini + Copyright (C) 2010-2013 by Jean-Philippe Orsini License: @@ -28,7 +28,7 @@ On Debian/Ubuntu systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL-2'. Packaging: - Copyright (C) 2010-2012 by Jean-Philippe Orsini + Copyright (C) 2010-2013 by Jean-Philippe Orsini released under GNU General Public License version 2. diff --git a/debian/docs b/debian/docs deleted file mode 100644 index 139597f..0000000 --- a/debian/docs +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/debian/psensor-common.doc-base.manual b/debian/psensor-common.doc-base.manual new file mode 100644 index 0000000..3d60e5b --- /dev/null +++ b/debian/psensor-common.doc-base.manual @@ -0,0 +1,9 @@ +Document: psensor +Title: Psensor Manual +Author: Jean-Philippe Orsini +Abstract: This manual describes what psensor is and how it can be used +Section: System/Monitoring + +Format: HTML +Index: /usr/share/doc/psensor/README.html +Files: /usr/share/doc/psensor/README.html diff --git a/debian/psensor-common.install b/debian/psensor-common.install index 94125c7..c74cc82 100644 --- a/debian/psensor-common.install +++ b/debian/psensor-common.install @@ -1 +1,5 @@ /usr/share/locale +/usr/share/doc/psensor/faq.txt +/usr/share/doc/psensor/faq.html +/usr/share/doc/psensor/README +/usr/share/doc/psensor/README.html diff --git a/debian/psensor-common.lintian-overrides b/debian/psensor-common.lintian-overrides new file mode 100644 index 0000000..0981191 --- /dev/null +++ b/debian/psensor-common.lintian-overrides @@ -0,0 +1,2 @@ +# Upstream does not provide changelog +psensor-common: no-upstream-changelog diff --git a/debian/psensor-server.lintian-overrides b/debian/psensor-server.lintian-overrides new file mode 100644 index 0000000..e7fabeb --- /dev/null +++ b/debian/psensor-server.lintian-overrides @@ -0,0 +1,2 @@ +# Upstream does not provide changelog +psensor-server: no-upstream-changelog diff --git a/debian/psensor.install b/debian/psensor.install index 3f4a63b..e3090ab 100644 --- a/debian/psensor.install +++ b/debian/psensor.install @@ -1,6 +1,8 @@ /etc/xdg/autostart +/etc/gconf/schemas/psensor.schemas /usr/bin/psensor /usr/share/applications /usr/share/icons /usr/share/psensor/psensor-pref.glade /usr/share/psensor/sensor-edit.glade +/usr/share/psensor/psensor.glade diff --git a/debian/psensor.lintian-overrides b/debian/psensor.lintian-overrides new file mode 100644 index 0000000..1e95f7f --- /dev/null +++ b/debian/psensor.lintian-overrides @@ -0,0 +1,2 @@ +# Upstream does not provide changelog +psensor: no-upstream-changelog diff --git a/debian/psensor.manpages b/debian/psensor.manpages index 16e0814..336b6c0 100644 --- a/debian/psensor.manpages +++ b/debian/psensor.manpages @@ -1,2 +1 @@ debian/tmp/usr/share/man/man1/psensor.1 - diff --git a/debian/rules b/debian/rules index b760bee..1006222 100755 --- a/debian/rules +++ b/debian/rules @@ -8,6 +8,7 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 +export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 %: - dh $@ + dh $@ --with=autotools_dev diff --git a/debian/watch b/debian/watch index 8833e44..073b5ff 100644 --- a/debian/watch +++ b/debian/watch @@ -1,3 +1,2 @@ version=3 - -http://wpitchoune.net/psensor/files/psensor-(\d.*)\.tar\.gz \ No newline at end of file +http://wpitchoune.net/psensor/files/psensor-(\d.*)\.tar\.gz diff --git a/depcomp b/depcomp index df8eea7..25a39e6 100755 --- a/depcomp +++ b/depcomp @@ -1,10 +1,10 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2009-04-28.21; # UTC +scriptversion=2012-03-27.16; # UTC -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free -# Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010, +# 2011, 2012 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -28,7 +28,7 @@ scriptversion=2009-04-28.21; # UTC case $1 in '') - echo "$0: No command. Try \`$0 --help' for more information." 1>&2 + echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) @@ -40,11 +40,11 @@ as side-effects. Environment variables: depmode Dependency tracking mode. - source Source file read by `PROGRAMS ARGS'. - object Object file output by `PROGRAMS ARGS'. + source Source file read by 'PROGRAMS ARGS'. + object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. - tmpdepfile Temporary file to use when outputing dependencies. + tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . @@ -57,6 +57,12 @@ EOF ;; esac +# A tabulation character. +tab=' ' +# A newline character. +nl=' +' + if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 @@ -90,10 +96,24 @@ if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 - cygpath_u="sed s,\\\\\\\\,/,g" + cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi +if test "$depmode" = msvc7msys; then + # This is just like msvc7 but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvc7 +fi + +if test "$depmode" = xlc; then + # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency informations. + gccflag=-qmakedep=gcc,-MF + depmode=gcc +fi + case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what @@ -148,20 +168,21 @@ gcc) ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" -## This next piece of magic avoids the `deleted header file' problem. +## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. - tr ' ' ' -' < "$tmpdepfile" | -## Some versions of gcc put a space before the `:'. On the theory + tr ' ' "$nl" < "$tmpdepfile" | +## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as -## well. +## well. hp depmode also adds that space, but also prefixes the VPATH +## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; @@ -193,18 +214,15 @@ sgi) # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; - # the IRIX cc adds comments like `#:fec' to the end of the + # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. - tr ' ' ' -' < "$tmpdepfile" \ + tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ - tr ' -' ' ' >> "$depfile" + tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. - tr ' ' ' -' < "$tmpdepfile" \ + tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else @@ -216,10 +234,17 @@ sgi) rm -f "$tmpdepfile" ;; +xlc) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the - # current directory. Also, the AIX compiler puts `$object:' at the + # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` @@ -249,12 +274,11 @@ aix) test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then - # Each line is of the form `foo.o: dependent.h'. + # Each line is of the form 'foo.o: dependent.h'. # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. + # '$object: dependent.h' and one to simply 'dependent.h:'. sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile @@ -265,23 +289,26 @@ aix) ;; icc) - # Intel's C compiler understands `-MD -MF file'. However on - # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c + # Intel's C compiler anf tcc (Tiny C Compiler) understand '-MD -MF file'. + # However on + # $CC -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h - # which is wrong. We want: + # which is wrong. We want # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h - # and will wrap long lines using \ : + # and will wrap long lines using '\': # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... - + # tcc 0.9.26 (FIXME still under development at the moment of writing) + # will emit a similar output, but also prepend the continuation lines + # with horizontal tabulation characters. "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : @@ -290,15 +317,21 @@ icc) exit $stat fi rm -f "$depfile" - # Each line is of the form `foo.o: dependent.h', - # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. + # Each line is of the form 'foo.o: dependent.h', + # or 'foo.o: dep1.h dep2.h \', or ' dep3.h dep4.h \'. # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" - # Some versions of the HPUX 10.20 sed can't process this invocation - # correctly. Breaking it into two sed invocations is a workaround. - sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | - sed -e 's/$/ :/' >> "$depfile" + # '$object: dependent.h' and one to simply 'dependent.h:'. + sed -e "s/^[ $tab][ $tab]*/ /" -e "s,^[^:]*:,$object :," \ + < "$tmpdepfile" > "$depfile" + sed ' + s/[ '"$tab"'][ '"$tab"']*/ /g + s/^ *// + s/ *\\*$// + s/^[^:]*: *// + /^$/d + /:$/d + s/$/ :/ + ' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; @@ -334,7 +367,7 @@ hp2) done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" - # Add `dependent.h:' lines. + # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// @@ -349,9 +382,9 @@ hp2) tru64) # The Tru64 compiler uses -MD to generate dependencies as a side - # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. + # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put - # dependencies in `foo.d' instead, so we check for that too. + # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= @@ -397,14 +430,59 @@ tru64) done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; +msvc7) + if test "$libtool" = yes; then + showIncludes=-Wc,-showIncludes + else + showIncludes=-showIncludes + fi + "$@" $showIncludes > "$tmpdepfile" + stat=$? + grep -v '^Note: including file: ' "$tmpdepfile" + if test "$stat" = 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + # The first sed program below extracts the file names and escapes + # backslashes for cygpath. The second sed program outputs the file + # name when reading, but also accumulates all include files in the + # hold buffer in order to output them again at the end. This only + # works with sed implementations that can handle large buffers. + sed < "$tmpdepfile" -n ' +/^Note: including file: *\(.*\)/ { + s//\1/ + s/\\/\\\\/g + p +}' | $cygpath_u | sort -u | sed -n ' +s/ /\\ /g +s/\(.*\)/'"$tab"'\1 \\/p +s/.\(.*\) \\/\1:/ +H +$ { + s/.*/'"$tab"'/ + G + p +}' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvc7msys) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. @@ -422,7 +500,7 @@ dashmstdout) shift fi - # Remove `-o $object'. + # Remove '-o $object'. IFS=" " for arg do @@ -442,15 +520,14 @@ dashmstdout) done test -z "$dashmflag" && dashmflag=-M - # Require at least two characters before searching for `:' + # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: - # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. + # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | - sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" + sed 's:^['"$tab"' ]*[^:'"$tab"' ][^:][^:]*\:['"$tab"' ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" - tr ' ' ' -' < "$tmpdepfile" | \ + tr ' ' "$nl" < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" @@ -503,9 +580,10 @@ makedepend) touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - sed '1,2d' "$tmpdepfile" | tr ' ' ' -' | \ + # makedepend may prepend the VPATH from the source file name to the object. + # No need to regex-escape $object, excess matching of '.' is harmless. + sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" + sed '1,2d' "$tmpdepfile" | tr ' ' "$nl" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" @@ -525,7 +603,7 @@ cpp) shift fi - # Remove `-o $object'. + # Remove '-o $object'. IFS=" " for arg do @@ -594,8 +672,8 @@ msvisualcpp) sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" - sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" - echo " " >> "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" + echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; diff --git a/doc/Makefile.am b/doc/Makefile.am new file mode 100644 index 0000000..ff17802 --- /dev/null +++ b/doc/Makefile.am @@ -0,0 +1,4 @@ +dist_doc_DATA = faq.html faq.txt + +faq.html: faq.txt ../www/style.css + asciidoc --theme style -a themedir=`pwd`/../www -n -a toc faq.txt \ No newline at end of file diff --git a/doc/Makefile.in b/doc/Makefile.in new file mode 100644 index 0000000..6c769d4 --- /dev/null +++ b/doc/Makefile.in @@ -0,0 +1,469 @@ +# Makefile.in generated by automake 1.11.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = doc +DIST_COMMON = $(dist_doc_DATA) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(docdir)" +DATA = $(dist_doc_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +APPINDICATOR_CFLAGS = @APPINDICATOR_CFLAGS@ +APPINDICATOR_LIBS = @APPINDICATOR_LIBS@ +AR = @AR@ +ATASMART_CFLAGS = @ATASMART_CFLAGS@ +ATASMART_LIBS = @ATASMART_LIBS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +GCONFTOOL = @GCONFTOOL@ +GCONF_CFLAGS = @GCONF_CFLAGS@ +GCONF_LIBS = @GCONF_LIBS@ +GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ +GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GREP = @GREP@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +GTOP_CFLAGS = @GTOP_CFLAGS@ +GTOP_LIBS = @GTOP_LIBS@ +HAVE_CPPCHECK = @HAVE_CPPCHECK@ +HELP2MAN = @HELP2MAN@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +JSON_CFLAGS = @JSON_CFLAGS@ +JSON_LIBS = @JSON_LIBS@ +LDFLAGS = @LDFLAGS@ +LIBATIADL_CFLAGS = @LIBATIADL_CFLAGS@ +LIBATIADL_LIBS = @LIBATIADL_LIBS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBMICROHTTPD_CFLAGS = @LIBMICROHTTPD_CFLAGS@ +LIBMICROHTTPD_LIBS = @LIBMICROHTTPD_LIBS@ +LIBNOTIFY_CFLAGS = @LIBNOTIFY_CFLAGS@ +LIBNOTIFY_LIBS = @LIBNOTIFY_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +NVIDIA_CFLAGS = @NVIDIA_CFLAGS@ +NVIDIA_LIBS = @NVIDIA_LIBS@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +POSUB = @POSUB@ +PTHREAD_LIBS = @PTHREAD_LIBS@ +RANLIB = @RANLIB@ +SENSORS_LIBS = @SENSORS_LIBS@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +UNITY_CFLAGS = @UNITY_CFLAGS@ +UNITY_LIBS = @UNITY_LIBS@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +X11_CFLAGS = @X11_CFLAGS@ +X11_LIBS = @X11_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +XMKMF = @XMKMF@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +dist_doc_DATA = faq.html faq.txt +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu doc/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-dist_docDATA: $(dist_doc_DATA) + @$(NORMAL_INSTALL) + @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \ + done + +uninstall-dist_docDATA: + @$(NORMAL_UNINSTALL) + @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir) +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(DATA) +installdirs: + for dir in "$(DESTDIR)$(docdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-dist_docDATA + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-dist_docDATA + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic distclean \ + distclean-generic distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am \ + install-dist_docDATA install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ + pdf-am ps ps-am uninstall uninstall-am uninstall-dist_docDATA + + +faq.html: faq.txt ../www/style.css + asciidoc --theme style -a themedir=`pwd`/../www -n -a toc faq.txt + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/doc/faq.html b/doc/faq.html new file mode 100644 index 0000000..8720436 --- /dev/null +++ b/doc/faq.html @@ -0,0 +1,665 @@ + + + + + +Psensor Frequently Asked Questions + + + + + +
+
+

1. No sensors or only cpu usage is displayed

+
+

Psensor is relying on few libraries or softwares for retrieving the information about the computer:

+
    +
  • +

    +motherboard and CPUs sensors: the information is retrieved + from the lm-sensors library, it requires that + ‘sensors-detect’ has been run and the kernel module + correctly installed. ‘sensors’ can be used for checking. +

    +
  • +
  • +

    +GPUs: it depends on which driver you are using: +

    +
      +
    • +

      +Opensource drivers (nouveau for Nvidia GPUs or + radeon/ati for ATI GPUs) is used and support sensor + monitoring for your GPU, the information is using + lm-sensors, same steps than above. +

      +
    • +
    • +

      +proprietary driver Nvidia: run ‘nvidia-settings’ to + check that it supports sensors monitoring. +

      +
    • +
    • +

      +proprietary driver Catalyst/fglx: use ‘aticonfig’ to + check that it supports sensors monitoring. Important + note: it requires that you are using a Psensor + binary compiled with the ATI support. +

      +
    • +
    +
  • +
  • +

    +HDDs: it uses the hddtemp daemon. Verifies that it is + correctly reporting temperature by using the ‘sudo hddtemp + /dev/sd?’ command. If hddtemp does not support your disk, + you may want to try using the libatasmart support instead + (option –use-libatasmart option). +

    +
  • +
+

If the underlying software is reporting sensors which are not +displayed by Psensor, it is probably a bug in Psensor, so please +report it. Otherwise, the issue is on the underlying software itself +and you should contact the corresponding development team or refer to +its documentation.

+
+
+
+

2. How to monitor an ATI card using the Catalyst driver?

+
+

For monitoring ATI card using the proprietary Catalyst driver, Psensor +must be compiled with a proprietary library which is not packaged in +any Linux distribution.

+

Unfortunely, due to the license of this library, I cannot provide a +compiled version of Psensor, even in a Ubuntu PPA or Ubuntu/Debian +standard repositories. You have to compile Psensor sensor. You can +find the instructions in the section “ATI/AMD GPU Support” of the +README file available in the Psensor source archives.

+

If you are using the ATI OpenSource driver, it is not needed to +compile Psensor with this proprietary library.

+
+
+
+

3. The reported temperature is obviously wrong

+
+

If the reported temperature is obviously wrong (never change, lower +than the ambiant temperature, negative, higher than the sun +temperature, etc):

+
    +
  • +

    +most of the time it is not a bug in Psensor nor in the + underlying monitoring libraries: +

    +
      +
    • +

      +if the temperature does not change, it might be due + to an existent sensor not wired by the hardware + manufacturer. +

      +
    • +
    • +

      +the goal of the sensor is to allow the system to + detect critical temperature and NOT to report an + exact temperature. Most sensors report a relative + temperature. The more it differs from the critical + temperature , the more it is wrong. +

      +
    • +
    +
  • +
  • +

    +It is only a bug in Psensor if the underlying libraries + report a different information than Psensor (use the + appropriate command or software: ‘sensors’, ‘aticonfig’ or + ‘hddtemp’ to check). In this case, please report a bug. +

    +
  • +
+
+
+
+

4. What is the sensors XXXX?

+
+

Since Psensor v0.7.0.4, open the preferences of the sensor (click on +its name in the main window and select the menu item Preferences), and +look at the Chip field.

+

For older Psensor releases, look at the Id field, if the string is +starting with:

+
    +
  • +

    +‘lmsensor coretemp’: Intel CPU. +

    +
  • +
  • +

    +‘lmsensor k10temp’,'lmsensor k8temp’,'lmsensor fam15h_power’: AMD CPU. +

    +
  • +
  • +

    +‘nvidia’ or ‘lmsensor nouveau’: NVIDIA GPU. +

    +
  • +
  • +

    +‘hdd’: hard disk drive. +

    +
  • +
  • +

    +‘amd’: AMD GPU. +

    +
  • +
  • +

    +‘lmsensor C B’: C is the name of the chip, B the name of the adapter. +

    +
  • +
+

For more information about lmsensor devices, see +http://lm-sensors.org/wiki/Devices.

+
+
+
+

5. How to report a bug?

+
+

Please use https://bugs.launchpad.net/psensor/+filebug to report bugs +even if it can only reproduced with a non-Ubuntu distribution or a +release not available in the standard Ubuntu repositories.

+

You can also use +https://bugs.launchpad.net/ubuntu/+source/psensor/+filebug if the bug +can be reproduced with a package from the standard Ubuntu +repositories.

+

If you don’t want to use the launchpad, you can send the report by +email to:

+ +

If the bug is concerning Debian or Ubuntu derivatives distribution, +please add in its description the output of the command ‘apt-cache +policy psensor’.

+

If it is related to the Psensor source compilation, please add the +full output of the ‘configure’ command.

+
+
+
+

6. How to send ideas, questions or comments?

+
+

Check the FAQ or the TODO pages.

+

If you don’t find the information, you can send an email to the public +mailing-list psensor-users@googlegroups.com (require registration at: +https://groups.google.com/forum/?fromgroups&hl=en#!forum/psensor-users) +or send an email directly to me: jeanfi@gmail.com.

+
+
+
+

7. How to contribute?

+ +
+
+

8. How to install Psensor on Ubuntu?

+
+

Psensor is in the official repository, search “psensor” in the software center and install it. More information at: http://wpitchoune.net/blog/psensor/ubuntu-integration/.

+
+
+
+

9. How to install Psensor on Debian?

+
+

Psensor will be in the official repository since Debian 7.0. You can get the last packaged version from the sid repository. More information at: http://packages.qa.debian.org/p/psensor.html.

+
+
+
+

10. What is the difference between the 3 Ubuntu PPAs?

+
+
    +
  • +

    +ppa:jfi/ppa: last stable version. +

    +
  • +
  • +

    +ppa:jfi/psensor-unstable: last development version, no major + bug is expected. +

    +
  • +
  • +

    +ppa:jfi/psensor-daily-trunk: build each day directly from + the SVN source repository. It may contain major bugs or + incomplete features. Useful for contributors or testing + whether a bug is fixed. +

    +
  • +
+
+
+
+

11. How to install Psensor on ArchLinux?

+ +
+
+

12. How to install Psensor on my Linux distribution?

+
+

Psensor packages are available in the standard repositories of Ubuntu +(since Oneiric) and Debian (since v7) distributions.

+

For other distributions, you will find the compilation and +installation instructions in the section ‘Installation from source +archive’ in the README file of the source archive. Psensor should +compile in any modern distribution.

+
+
+
+

13. How to log sensors temperatures?

+
+

The best way is probably to use sensord or a custom script based on +the output of the different commands like sensors.

+

Anyway, as I received several requests about such feature, since the +0.7.0.4 release it is implemented in both psensor ( menu preferences > +sensors > enable log of measures) and psensor-server (–sensor-log-file +option).

+
+
+
+

14. No graphs are displayed, but the table of the main window is displaying sensors

+
+

In the sensors table of the main window, switch on the checkbox of the last +column (named "Enabled" or "Graph" depending on the Psensor version).

+
+
+
+

15. Is there any other similar softwares?

+
+

Here is a list of few well-known sensors monitoring softwares:

+
+
+
+
+

+ + + diff --git a/doc/faq.txt b/doc/faq.txt new file mode 100644 index 0000000..434472d --- /dev/null +++ b/doc/faq.txt @@ -0,0 +1,228 @@ +Psensor Frequently Asked Questions +================================== + +[[S_NoSensors]] +No sensors or only cpu usage is displayed +----------------------------------------- + +Psensor is relying on few libraries or softwares for retrieving the information about the computer: + + - motherboard and CPUs sensors: the information is retrieved + from the lm-sensors library, it requires that + ‘sensors-detect’ has been run and the kernel module + correctly installed. ‘sensors’ can be used for checking. + + - GPUs: it depends on which driver you are using: + + * Opensource drivers (nouveau for Nvidia GPUs or + radeon/ati for ATI GPUs) is used and support sensor + monitoring for your GPU, the information is using + lm-sensors, same steps than above. + + * proprietary driver Nvidia: run ‘nvidia-settings’ to + check that it supports sensors monitoring. + + * proprietary driver Catalyst/fglx: use ‘aticonfig’ to + check that it supports sensors monitoring. Important + note: it requires that you are using a Psensor + binary compiled with the ATI support. + + - HDDs: it uses the hddtemp daemon. Verifies that it is + correctly reporting temperature by using the ‘sudo hddtemp + /dev/sd?’ command. If hddtemp does not support your disk, + you may want to try using the libatasmart support instead + (option –use-libatasmart option). + +If the underlying software is reporting sensors which are not +displayed by Psensor, it is probably a bug in Psensor, so please +report it. Otherwise, the issue is on the underlying software itself +and you should contact the corresponding development team or refer to +its documentation. + +[[S_ATIMonitoring]] +How to monitor an ATI card using the Catalyst driver? +----------------------------------------------------- + +For monitoring ATI card using the proprietary Catalyst driver, Psensor +must be compiled with a proprietary library which is not packaged in +any Linux distribution. + +Unfortunely, due to the license of this library, I cannot provide a +compiled version of Psensor, even in a Ubuntu PPA or Ubuntu/Debian +standard repositories. You have to compile Psensor sensor. You can +find the instructions in the section “ATI/AMD GPU Support” of the +README file available in the Psensor source archives. + +If you are using the ATI OpenSource driver, it is not needed to +compile Psensor with this proprietary library. + +[[S_WrongTemperature]] +The reported temperature is obviously wrong +------------------------------------------- + +If the reported temperature is obviously wrong (never change, lower +than the ambiant temperature, negative, higher than the sun +temperature, etc): + + - most of the time it is not a bug in Psensor nor in the + underlying monitoring libraries: + + * if the temperature does not change, it might be due + to an existent sensor not wired by the hardware + manufacturer. + + * the goal of the sensor is to allow the system to + detect critical temperature and NOT to report an + exact temperature. Most sensors report a relative + temperature. The more it differs from the critical + temperature , the more it is wrong. + + - It is only a bug in Psensor if the underlying libraries + report a different information than Psensor (use the + appropriate command or software: ‘sensors’, ‘aticonfig’ or + ‘hddtemp’ to check). In this case, please report a bug. + +[[S_WhatIsTheSensor]] +What is the sensors XXXX? +------------------------- + +Since Psensor v0.7.0.4, open the preferences of the sensor (click on +its name in the main window and select the menu item Preferences), and +look at the Chip field. + +For older Psensor releases, look at the Id field, if the string is +starting with: + + - ‘lmsensor coretemp’: Intel CPU. + - ‘lmsensor k10temp’,'lmsensor k8temp’,'lmsensor fam15h_power’: AMD CPU. + - ‘nvidia’ or ‘lmsensor nouveau’: NVIDIA GPU. + - ‘hdd’: hard disk drive. + - ‘amd’: AMD GPU. + - ‘lmsensor C B’: C is the name of the chip, B the name of the adapter. + +For more information about lmsensor devices, see +http://lm-sensors.org/wiki/Devices. + +[[S_BugReport]] +How to report a bug? +-------------------- + +Please use https://bugs.launchpad.net/psensor/+filebug to report bugs +even if it can only reproduced with a non-Ubuntu distribution or a +release not available in the standard Ubuntu repositories. + +You can also use +https://bugs.launchpad.net/ubuntu/+source/psensor/+filebug if the bug +can be reproduced with a package from the standard Ubuntu +repositories. + +If you don’t want to use the launchpad, you can send the report by +email to: + + - psensor-users@googlegroups.com (require registration at: + https://groups.google.com/forum/?fromgroups&hl=en#!forum/psensor-users) + - or jeanfi@gmail.com. + +If the bug is concerning Debian or Ubuntu derivatives distribution, +please add in its description the output of the command ‘apt-cache +policy psensor’. + +If it is related to the Psensor source compilation, please add the +full output of the ‘configure’ command. + +[[S_SubmitIdea]] +How to send ideas, questions or comments? +----------------------------------------- + +Check the FAQ or the TODO pages. + +If you don’t find the information, you can send an email to the public +mailing-list psensor-users@googlegroups.com (require registration at: +https://groups.google.com/forum/?fromgroups&hl=en#!forum/psensor-users) +or send an email directly to me: jeanfi@gmail.com. + + +[[S_Contribute]] +How to contribute? +------------------ + +See http://wpitchoune.net/blog/psensor/how-to-contribute/. + +[[S_UbuntuInstall]] +How to install Psensor on Ubuntu? +--------------------------------- + +Psensor is in the official repository, search “psensor” in the software center and install it. More information at: http://wpitchoune.net/blog/psensor/ubuntu-integration/. + +[[S_DebianInstall]] +How to install Psensor on Debian? +--------------------------------- + +Psensor will be in the official repository since Debian 7.0. You can get the last packaged version from the sid repository. More information at: http://packages.qa.debian.org/p/psensor.html. + +[[S_PPA]] +What is the difference between the 3 Ubuntu PPAs? +------------------------------------------------- + + - ppa:jfi/ppa: last stable version. + + - ppa:jfi/psensor-unstable: last development version, no major + bug is expected. + + - ppa:jfi/psensor-daily-trunk: build each day directly from + the SVN source repository. It may contain major bugs or + incomplete features. Useful for contributors or testing + whether a bug is fixed. + +[[S_ArchLinuxInstall]] +How to install Psensor on ArchLinux? +------------------------------------ + +See http://aur.archlinux.org/packages.php?ID=37807. + +[[S_OtherInstall]] +How to install Psensor on my Linux distribution? +------------------------------------------------ + +Psensor packages are available in the standard repositories of Ubuntu +(since Oneiric) and Debian (since v7) distributions. + +For other distributions, you will find the compilation and +installation instructions in the section ‘Installation from source +archive’ in the README file of the source archive. Psensor should +compile in any modern distribution. + +[[S_LOG]] +How to log sensors temperatures? +-------------------------------- + +The best way is probably to use sensord or a custom script based on +the output of the different commands like sensors. + +Anyway, as I received several requests about such feature, since the +0.7.0.4 release it is implemented in both psensor ( menu preferences > +sensors > enable log of measures) and psensor-server (–sensor-log-file +option). + +[[S_NO_GRAPH_DISPLAYED]] + +No graphs are displayed, but the table of the main window is displaying sensors +------------------------------------------------------------------------------- + +In the sensors table of the main window, switch on the checkbox of the last +column (named "Enabled" or "Graph" depending on the Psensor version). + +[[S_SimilarSoft]] +Is there any other similar softwares? +------------------------------------- + +Here is a list of few well-known sensors monitoring softwares: + + - for X11: http://freecode.com/projects/xsensors + + - for GNOME2: http://sensors-applet.sourceforge.net/ + + - for Ubuntu Unity: https://launchpad.net/indicator-sensors + + - more general, but can be configured to display sensors + information: http://conky.sourceforge.net/ diff --git a/icons/hicolor/14x14/Makefile.in b/icons/hicolor/14x14/Makefile.in index 1276725..b20199e 100644 --- a/icons/hicolor/14x14/Makefile.in +++ b/icons/hicolor/14x14/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +16,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -46,6 +63,11 @@ CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -67,6 +89,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(psensordistpixdir)" DATA = $(psensordistpix_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -74,6 +102,9 @@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ APPINDICATOR_CFLAGS = @APPINDICATOR_CFLAGS@ APPINDICATOR_LIBS = @APPINDICATOR_LIBS@ +AR = @AR@ +ATASMART_CFLAGS = @ATASMART_CFLAGS@ +ATASMART_LIBS = @ATASMART_LIBS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -93,8 +124,11 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +GCONFTOOL = @GCONFTOOL@ GCONF_CFLAGS = @GCONF_CFLAGS@ GCONF_LIBS = @GCONF_LIBS@ +GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ +GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ @@ -103,6 +137,7 @@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ GTOP_CFLAGS = @GTOP_CFLAGS@ GTOP_LIBS = @GTOP_LIBS@ +HAVE_CPPCHECK = @HAVE_CPPCHECK@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -147,6 +182,7 @@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ +PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SENSORS_LIBS = @SENSORS_LIBS@ SET_MAKE = @SET_MAKE@ @@ -168,6 +204,7 @@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ @@ -255,8 +292,11 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): install-psensordistpixDATA: $(psensordistpix_DATA) @$(NORMAL_INSTALL) - test -z "$(psensordistpixdir)" || $(MKDIR_P) "$(DESTDIR)$(psensordistpixdir)" @list='$(psensordistpix_DATA)'; test -n "$(psensordistpixdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(psensordistpixdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(psensordistpixdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -270,9 +310,7 @@ uninstall-psensordistpixDATA: @$(NORMAL_UNINSTALL) @list='$(psensordistpix_DATA)'; test -n "$(psensordistpixdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(psensordistpixdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(psensordistpixdir)" && rm -f $$files + dir='$(DESTDIR)$(psensordistpixdir)'; $(am__uninstall_files_from_dir) tags: TAGS TAGS: @@ -327,10 +365,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/icons/hicolor/16x16/Makefile.in b/icons/hicolor/16x16/Makefile.in index 9a66b67..7a22a7d 100644 --- a/icons/hicolor/16x16/Makefile.in +++ b/icons/hicolor/16x16/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +16,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -46,6 +63,11 @@ CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -67,6 +89,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(psensordistpixdir)" DATA = $(psensordistpix_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -74,6 +102,9 @@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ APPINDICATOR_CFLAGS = @APPINDICATOR_CFLAGS@ APPINDICATOR_LIBS = @APPINDICATOR_LIBS@ +AR = @AR@ +ATASMART_CFLAGS = @ATASMART_CFLAGS@ +ATASMART_LIBS = @ATASMART_LIBS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -93,8 +124,11 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +GCONFTOOL = @GCONFTOOL@ GCONF_CFLAGS = @GCONF_CFLAGS@ GCONF_LIBS = @GCONF_LIBS@ +GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ +GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ @@ -103,6 +137,7 @@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ GTOP_CFLAGS = @GTOP_CFLAGS@ GTOP_LIBS = @GTOP_LIBS@ +HAVE_CPPCHECK = @HAVE_CPPCHECK@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -147,6 +182,7 @@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ +PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SENSORS_LIBS = @SENSORS_LIBS@ SET_MAKE = @SET_MAKE@ @@ -168,6 +204,7 @@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ @@ -255,8 +292,11 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): install-psensordistpixDATA: $(psensordistpix_DATA) @$(NORMAL_INSTALL) - test -z "$(psensordistpixdir)" || $(MKDIR_P) "$(DESTDIR)$(psensordistpixdir)" @list='$(psensordistpix_DATA)'; test -n "$(psensordistpixdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(psensordistpixdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(psensordistpixdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -270,9 +310,7 @@ uninstall-psensordistpixDATA: @$(NORMAL_UNINSTALL) @list='$(psensordistpix_DATA)'; test -n "$(psensordistpixdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(psensordistpixdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(psensordistpixdir)" && rm -f $$files + dir='$(DESTDIR)$(psensordistpixdir)'; $(am__uninstall_files_from_dir) tags: TAGS TAGS: @@ -327,10 +365,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/icons/hicolor/22x22/Makefile.in b/icons/hicolor/22x22/Makefile.in index a680ee5..4e610e6 100644 --- a/icons/hicolor/22x22/Makefile.in +++ b/icons/hicolor/22x22/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +16,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -46,6 +63,11 @@ CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -67,6 +89,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(psensordistpixdir)" DATA = $(psensordistpix_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -74,6 +102,9 @@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ APPINDICATOR_CFLAGS = @APPINDICATOR_CFLAGS@ APPINDICATOR_LIBS = @APPINDICATOR_LIBS@ +AR = @AR@ +ATASMART_CFLAGS = @ATASMART_CFLAGS@ +ATASMART_LIBS = @ATASMART_LIBS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -93,8 +124,11 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +GCONFTOOL = @GCONFTOOL@ GCONF_CFLAGS = @GCONF_CFLAGS@ GCONF_LIBS = @GCONF_LIBS@ +GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ +GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ @@ -103,6 +137,7 @@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ GTOP_CFLAGS = @GTOP_CFLAGS@ GTOP_LIBS = @GTOP_LIBS@ +HAVE_CPPCHECK = @HAVE_CPPCHECK@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -147,6 +182,7 @@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ +PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SENSORS_LIBS = @SENSORS_LIBS@ SET_MAKE = @SET_MAKE@ @@ -168,6 +204,7 @@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ @@ -255,8 +292,11 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): install-psensordistpixDATA: $(psensordistpix_DATA) @$(NORMAL_INSTALL) - test -z "$(psensordistpixdir)" || $(MKDIR_P) "$(DESTDIR)$(psensordistpixdir)" @list='$(psensordistpix_DATA)'; test -n "$(psensordistpixdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(psensordistpixdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(psensordistpixdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -270,9 +310,7 @@ uninstall-psensordistpixDATA: @$(NORMAL_UNINSTALL) @list='$(psensordistpix_DATA)'; test -n "$(psensordistpixdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(psensordistpixdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(psensordistpixdir)" && rm -f $$files + dir='$(DESTDIR)$(psensordistpixdir)'; $(am__uninstall_files_from_dir) tags: TAGS TAGS: @@ -327,10 +365,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/icons/hicolor/24x24/Makefile.in b/icons/hicolor/24x24/Makefile.in index b6e396a..fe5a02c 100644 --- a/icons/hicolor/24x24/Makefile.in +++ b/icons/hicolor/24x24/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +16,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -46,6 +63,11 @@ CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -67,6 +89,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(psensordistpixdir)" DATA = $(psensordistpix_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -74,6 +102,9 @@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ APPINDICATOR_CFLAGS = @APPINDICATOR_CFLAGS@ APPINDICATOR_LIBS = @APPINDICATOR_LIBS@ +AR = @AR@ +ATASMART_CFLAGS = @ATASMART_CFLAGS@ +ATASMART_LIBS = @ATASMART_LIBS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -93,8 +124,11 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +GCONFTOOL = @GCONFTOOL@ GCONF_CFLAGS = @GCONF_CFLAGS@ GCONF_LIBS = @GCONF_LIBS@ +GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ +GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ @@ -103,6 +137,7 @@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ GTOP_CFLAGS = @GTOP_CFLAGS@ GTOP_LIBS = @GTOP_LIBS@ +HAVE_CPPCHECK = @HAVE_CPPCHECK@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -147,6 +182,7 @@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ +PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SENSORS_LIBS = @SENSORS_LIBS@ SET_MAKE = @SET_MAKE@ @@ -168,6 +204,7 @@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ @@ -255,8 +292,11 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): install-psensordistpixDATA: $(psensordistpix_DATA) @$(NORMAL_INSTALL) - test -z "$(psensordistpixdir)" || $(MKDIR_P) "$(DESTDIR)$(psensordistpixdir)" @list='$(psensordistpix_DATA)'; test -n "$(psensordistpixdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(psensordistpixdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(psensordistpixdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -270,9 +310,7 @@ uninstall-psensordistpixDATA: @$(NORMAL_UNINSTALL) @list='$(psensordistpix_DATA)'; test -n "$(psensordistpixdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(psensordistpixdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(psensordistpixdir)" && rm -f $$files + dir='$(DESTDIR)$(psensordistpixdir)'; $(am__uninstall_files_from_dir) tags: TAGS TAGS: @@ -327,10 +365,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/icons/hicolor/32x32/Makefile.in b/icons/hicolor/32x32/Makefile.in index 5aad275..68f51f5 100644 --- a/icons/hicolor/32x32/Makefile.in +++ b/icons/hicolor/32x32/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +16,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -46,6 +63,11 @@ CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -67,6 +89,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(psensordistpixdir)" DATA = $(psensordistpix_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -74,6 +102,9 @@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ APPINDICATOR_CFLAGS = @APPINDICATOR_CFLAGS@ APPINDICATOR_LIBS = @APPINDICATOR_LIBS@ +AR = @AR@ +ATASMART_CFLAGS = @ATASMART_CFLAGS@ +ATASMART_LIBS = @ATASMART_LIBS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -93,8 +124,11 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +GCONFTOOL = @GCONFTOOL@ GCONF_CFLAGS = @GCONF_CFLAGS@ GCONF_LIBS = @GCONF_LIBS@ +GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ +GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ @@ -103,6 +137,7 @@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ GTOP_CFLAGS = @GTOP_CFLAGS@ GTOP_LIBS = @GTOP_LIBS@ +HAVE_CPPCHECK = @HAVE_CPPCHECK@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -147,6 +182,7 @@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ +PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SENSORS_LIBS = @SENSORS_LIBS@ SET_MAKE = @SET_MAKE@ @@ -168,6 +204,7 @@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ @@ -255,8 +292,11 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): install-psensordistpixDATA: $(psensordistpix_DATA) @$(NORMAL_INSTALL) - test -z "$(psensordistpixdir)" || $(MKDIR_P) "$(DESTDIR)$(psensordistpixdir)" @list='$(psensordistpix_DATA)'; test -n "$(psensordistpixdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(psensordistpixdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(psensordistpixdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -270,9 +310,7 @@ uninstall-psensordistpixDATA: @$(NORMAL_UNINSTALL) @list='$(psensordistpix_DATA)'; test -n "$(psensordistpixdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(psensordistpixdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(psensordistpixdir)" && rm -f $$files + dir='$(DESTDIR)$(psensordistpixdir)'; $(am__uninstall_files_from_dir) tags: TAGS TAGS: @@ -327,10 +365,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/icons/hicolor/48x48/Makefile.am b/icons/hicolor/48x48/Makefile.am index 7d09bac..28c39de 100644 --- a/icons/hicolor/48x48/Makefile.am +++ b/icons/hicolor/48x48/Makefile.am @@ -1,6 +1,6 @@ themedir = $(datadir)/icons/hicolor size = 48x48 context = apps -EXTRA_DIST = psensor.png psensor_hot.png +EXTRA_DIST = psensor.png psensordistpixdir = $(themedir)/$(size)/$(context) psensordistpix_DATA = $(EXTRA_DIST) diff --git a/icons/hicolor/48x48/Makefile.in b/icons/hicolor/48x48/Makefile.in index b425cfd..ad87a44 100644 --- a/icons/hicolor/48x48/Makefile.in +++ b/icons/hicolor/48x48/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +16,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -46,6 +63,11 @@ CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -67,6 +89,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(psensordistpixdir)" DATA = $(psensordistpix_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -74,6 +102,9 @@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ APPINDICATOR_CFLAGS = @APPINDICATOR_CFLAGS@ APPINDICATOR_LIBS = @APPINDICATOR_LIBS@ +AR = @AR@ +ATASMART_CFLAGS = @ATASMART_CFLAGS@ +ATASMART_LIBS = @ATASMART_LIBS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -93,8 +124,11 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +GCONFTOOL = @GCONFTOOL@ GCONF_CFLAGS = @GCONF_CFLAGS@ GCONF_LIBS = @GCONF_LIBS@ +GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ +GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ @@ -103,6 +137,7 @@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ GTOP_CFLAGS = @GTOP_CFLAGS@ GTOP_LIBS = @GTOP_LIBS@ +HAVE_CPPCHECK = @HAVE_CPPCHECK@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -147,6 +182,7 @@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ +PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SENSORS_LIBS = @SENSORS_LIBS@ SET_MAKE = @SET_MAKE@ @@ -168,6 +204,7 @@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ @@ -217,7 +254,7 @@ top_srcdir = @top_srcdir@ themedir = $(datadir)/icons/hicolor size = 48x48 context = apps -EXTRA_DIST = psensor.png psensor_hot.png +EXTRA_DIST = psensor.png psensordistpixdir = $(themedir)/$(size)/$(context) psensordistpix_DATA = $(EXTRA_DIST) all: all-am @@ -255,8 +292,11 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): install-psensordistpixDATA: $(psensordistpix_DATA) @$(NORMAL_INSTALL) - test -z "$(psensordistpixdir)" || $(MKDIR_P) "$(DESTDIR)$(psensordistpixdir)" @list='$(psensordistpix_DATA)'; test -n "$(psensordistpixdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(psensordistpixdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(psensordistpixdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -270,9 +310,7 @@ uninstall-psensordistpixDATA: @$(NORMAL_UNINSTALL) @list='$(psensordistpix_DATA)'; test -n "$(psensordistpixdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(psensordistpixdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(psensordistpixdir)" && rm -f $$files + dir='$(DESTDIR)$(psensordistpixdir)'; $(am__uninstall_files_from_dir) tags: TAGS TAGS: @@ -327,10 +365,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/icons/hicolor/48x48/psensor_hot.png b/icons/hicolor/48x48/psensor_hot.png deleted file mode 100644 index 6f05f59..0000000 Binary files a/icons/hicolor/48x48/psensor_hot.png and /dev/null differ diff --git a/icons/hicolor/64x64/Makefile.in b/icons/hicolor/64x64/Makefile.in index 914c9dc..58be39f 100644 --- a/icons/hicolor/64x64/Makefile.in +++ b/icons/hicolor/64x64/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +16,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -46,6 +63,11 @@ CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -67,6 +89,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(psensordistpixdir)" DATA = $(psensordistpix_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -74,6 +102,9 @@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ APPINDICATOR_CFLAGS = @APPINDICATOR_CFLAGS@ APPINDICATOR_LIBS = @APPINDICATOR_LIBS@ +AR = @AR@ +ATASMART_CFLAGS = @ATASMART_CFLAGS@ +ATASMART_LIBS = @ATASMART_LIBS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -93,8 +124,11 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +GCONFTOOL = @GCONFTOOL@ GCONF_CFLAGS = @GCONF_CFLAGS@ GCONF_LIBS = @GCONF_LIBS@ +GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ +GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ @@ -103,6 +137,7 @@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ GTOP_CFLAGS = @GTOP_CFLAGS@ GTOP_LIBS = @GTOP_LIBS@ +HAVE_CPPCHECK = @HAVE_CPPCHECK@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -147,6 +182,7 @@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ +PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SENSORS_LIBS = @SENSORS_LIBS@ SET_MAKE = @SET_MAKE@ @@ -168,6 +204,7 @@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ @@ -255,8 +292,11 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): install-psensordistpixDATA: $(psensordistpix_DATA) @$(NORMAL_INSTALL) - test -z "$(psensordistpixdir)" || $(MKDIR_P) "$(DESTDIR)$(psensordistpixdir)" @list='$(psensordistpix_DATA)'; test -n "$(psensordistpixdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(psensordistpixdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(psensordistpixdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -270,9 +310,7 @@ uninstall-psensordistpixDATA: @$(NORMAL_UNINSTALL) @list='$(psensordistpix_DATA)'; test -n "$(psensordistpixdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(psensordistpixdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(psensordistpixdir)" && rm -f $$files + dir='$(DESTDIR)$(psensordistpixdir)'; $(am__uninstall_files_from_dir) tags: TAGS TAGS: @@ -327,10 +365,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/icons/hicolor/scalable/Makefile.in b/icons/hicolor/scalable/Makefile.in index 1986610..e46072c 100644 --- a/icons/hicolor/scalable/Makefile.in +++ b/icons/hicolor/scalable/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +16,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -46,6 +63,11 @@ CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -67,6 +89,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(psensordistpixdir)" DATA = $(psensordistpix_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -74,6 +102,9 @@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ APPINDICATOR_CFLAGS = @APPINDICATOR_CFLAGS@ APPINDICATOR_LIBS = @APPINDICATOR_LIBS@ +AR = @AR@ +ATASMART_CFLAGS = @ATASMART_CFLAGS@ +ATASMART_LIBS = @ATASMART_LIBS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -93,8 +124,11 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +GCONFTOOL = @GCONFTOOL@ GCONF_CFLAGS = @GCONF_CFLAGS@ GCONF_LIBS = @GCONF_LIBS@ +GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ +GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ @@ -103,6 +137,7 @@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ GTOP_CFLAGS = @GTOP_CFLAGS@ GTOP_LIBS = @GTOP_LIBS@ +HAVE_CPPCHECK = @HAVE_CPPCHECK@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -147,6 +182,7 @@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ +PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SENSORS_LIBS = @SENSORS_LIBS@ SET_MAKE = @SET_MAKE@ @@ -168,6 +204,7 @@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ @@ -255,8 +292,11 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): install-psensordistpixDATA: $(psensordistpix_DATA) @$(NORMAL_INSTALL) - test -z "$(psensordistpixdir)" || $(MKDIR_P) "$(DESTDIR)$(psensordistpixdir)" @list='$(psensordistpix_DATA)'; test -n "$(psensordistpixdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(psensordistpixdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(psensordistpixdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -270,9 +310,7 @@ uninstall-psensordistpixDATA: @$(NORMAL_UNINSTALL) @list='$(psensordistpix_DATA)'; test -n "$(psensordistpixdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(psensordistpixdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(psensordistpixdir)" && rm -f $$files + dir='$(DESTDIR)$(psensordistpixdir)'; $(am__uninstall_files_from_dir) tags: TAGS TAGS: @@ -327,10 +365,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/icons/ubuntu-mono-dark/apps/22/Makefile.in b/icons/ubuntu-mono-dark/apps/22/Makefile.in index e98885c..eb49932 100644 --- a/icons/ubuntu-mono-dark/apps/22/Makefile.in +++ b/icons/ubuntu-mono-dark/apps/22/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +16,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -46,6 +63,11 @@ CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -67,6 +89,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(psensordistpixdir)" DATA = $(psensordistpix_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -74,6 +102,9 @@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ APPINDICATOR_CFLAGS = @APPINDICATOR_CFLAGS@ APPINDICATOR_LIBS = @APPINDICATOR_LIBS@ +AR = @AR@ +ATASMART_CFLAGS = @ATASMART_CFLAGS@ +ATASMART_LIBS = @ATASMART_LIBS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -93,8 +124,11 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +GCONFTOOL = @GCONFTOOL@ GCONF_CFLAGS = @GCONF_CFLAGS@ GCONF_LIBS = @GCONF_LIBS@ +GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ +GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ @@ -103,6 +137,7 @@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ GTOP_CFLAGS = @GTOP_CFLAGS@ GTOP_LIBS = @GTOP_LIBS@ +HAVE_CPPCHECK = @HAVE_CPPCHECK@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -147,6 +182,7 @@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ +PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SENSORS_LIBS = @SENSORS_LIBS@ SET_MAKE = @SET_MAKE@ @@ -168,6 +204,7 @@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ @@ -255,8 +292,11 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): install-psensordistpixDATA: $(psensordistpix_DATA) @$(NORMAL_INSTALL) - test -z "$(psensordistpixdir)" || $(MKDIR_P) "$(DESTDIR)$(psensordistpixdir)" @list='$(psensordistpix_DATA)'; test -n "$(psensordistpixdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(psensordistpixdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(psensordistpixdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -270,9 +310,7 @@ uninstall-psensordistpixDATA: @$(NORMAL_UNINSTALL) @list='$(psensordistpix_DATA)'; test -n "$(psensordistpixdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(psensordistpixdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(psensordistpixdir)" && rm -f $$files + dir='$(DESTDIR)$(psensordistpixdir)'; $(am__uninstall_files_from_dir) tags: TAGS TAGS: @@ -327,10 +365,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/icons/ubuntu-mono-dark/status/22/Makefile.in b/icons/ubuntu-mono-dark/status/22/Makefile.in index 8ec144f..127db98 100644 --- a/icons/ubuntu-mono-dark/status/22/Makefile.in +++ b/icons/ubuntu-mono-dark/status/22/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +16,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -46,6 +63,11 @@ CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -67,6 +89,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(psensordistpixdir)" DATA = $(psensordistpix_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -74,6 +102,9 @@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ APPINDICATOR_CFLAGS = @APPINDICATOR_CFLAGS@ APPINDICATOR_LIBS = @APPINDICATOR_LIBS@ +AR = @AR@ +ATASMART_CFLAGS = @ATASMART_CFLAGS@ +ATASMART_LIBS = @ATASMART_LIBS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -93,8 +124,11 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +GCONFTOOL = @GCONFTOOL@ GCONF_CFLAGS = @GCONF_CFLAGS@ GCONF_LIBS = @GCONF_LIBS@ +GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ +GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ @@ -103,6 +137,7 @@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ GTOP_CFLAGS = @GTOP_CFLAGS@ GTOP_LIBS = @GTOP_LIBS@ +HAVE_CPPCHECK = @HAVE_CPPCHECK@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -147,6 +182,7 @@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ +PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SENSORS_LIBS = @SENSORS_LIBS@ SET_MAKE = @SET_MAKE@ @@ -168,6 +204,7 @@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ @@ -255,8 +292,11 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): install-psensordistpixDATA: $(psensordistpix_DATA) @$(NORMAL_INSTALL) - test -z "$(psensordistpixdir)" || $(MKDIR_P) "$(DESTDIR)$(psensordistpixdir)" @list='$(psensordistpix_DATA)'; test -n "$(psensordistpixdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(psensordistpixdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(psensordistpixdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -270,9 +310,7 @@ uninstall-psensordistpixDATA: @$(NORMAL_UNINSTALL) @list='$(psensordistpix_DATA)'; test -n "$(psensordistpixdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(psensordistpixdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(psensordistpixdir)" && rm -f $$files + dir='$(DESTDIR)$(psensordistpixdir)'; $(am__uninstall_files_from_dir) tags: TAGS TAGS: @@ -327,10 +365,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/icons/ubuntu-mono-light/status/22/Makefile.in b/icons/ubuntu-mono-light/status/22/Makefile.in index 78ce328..853e2b3 100644 --- a/icons/ubuntu-mono-light/status/22/Makefile.in +++ b/icons/ubuntu-mono-light/status/22/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +16,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -46,6 +63,11 @@ CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -67,6 +89,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(psensordistpixdir)" DATA = $(psensordistpix_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -74,6 +102,9 @@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ APPINDICATOR_CFLAGS = @APPINDICATOR_CFLAGS@ APPINDICATOR_LIBS = @APPINDICATOR_LIBS@ +AR = @AR@ +ATASMART_CFLAGS = @ATASMART_CFLAGS@ +ATASMART_LIBS = @ATASMART_LIBS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -93,8 +124,11 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +GCONFTOOL = @GCONFTOOL@ GCONF_CFLAGS = @GCONF_CFLAGS@ GCONF_LIBS = @GCONF_LIBS@ +GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ +GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ @@ -103,6 +137,7 @@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ GTOP_CFLAGS = @GTOP_CFLAGS@ GTOP_LIBS = @GTOP_LIBS@ +HAVE_CPPCHECK = @HAVE_CPPCHECK@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -147,6 +182,7 @@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ +PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SENSORS_LIBS = @SENSORS_LIBS@ SET_MAKE = @SET_MAKE@ @@ -168,6 +204,7 @@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ @@ -255,8 +292,11 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): install-psensordistpixDATA: $(psensordistpix_DATA) @$(NORMAL_INSTALL) - test -z "$(psensordistpixdir)" || $(MKDIR_P) "$(DESTDIR)$(psensordistpixdir)" @list='$(psensordistpix_DATA)'; test -n "$(psensordistpixdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(psensordistpixdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(psensordistpixdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -270,9 +310,7 @@ uninstall-psensordistpixDATA: @$(NORMAL_UNINSTALL) @list='$(psensordistpix_DATA)'; test -n "$(psensordistpixdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(psensordistpixdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(psensordistpixdir)" && rm -f $$files + dir='$(DESTDIR)$(psensordistpixdir)'; $(am__uninstall_files_from_dir) tags: TAGS TAGS: @@ -327,10 +365,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/install-sh b/install-sh index 6781b98..a9244eb 100755 --- a/install-sh +++ b/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2009-04-28.21; # UTC +scriptversion=2011-01-19.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -156,6 +156,10 @@ while test $# -ne 0; do -s) stripcmd=$stripprog;; -t) dst_arg=$2 + # Protect names problematic for `test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac shift;; -T) no_target_directory=true;; @@ -186,6 +190,10 @@ if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then fi shift # arg dst_arg=$arg + # Protect names problematic for `test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac done fi @@ -200,7 +208,11 @@ if test $# -eq 0; then fi if test -z "$dir_arg"; then - trap '(exit $?); exit' 1 2 13 15 + do_exit='(exit $ret); exit $ret' + trap "ret=129; $do_exit" 1 + trap "ret=130; $do_exit" 2 + trap "ret=141; $do_exit" 13 + trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. @@ -228,9 +240,9 @@ fi for src do - # Protect names starting with `-'. + # Protect names problematic for `test' and other utilities. case $src in - -*) src=./$src;; + -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then @@ -252,12 +264,7 @@ do echo "$0: no destination specified." >&2 exit 1 fi - dst=$dst_arg - # Protect names starting with `-'. - case $dst in - -*) dst=./$dst;; - esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. @@ -385,7 +392,7 @@ do case $dstdir in /*) prefix='/';; - -*) prefix='./';; + [-=\(\)!]*) prefix='./';; *) prefix='';; esac @@ -403,7 +410,7 @@ do for d do - test -z "$d" && continue + test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then diff --git a/missing b/missing index 28055d2..86a8fc3 100755 --- a/missing +++ b/missing @@ -1,10 +1,10 @@ #! /bin/sh # Common stub for a few missing GNU programs while installing. -scriptversion=2009-04-28.21; # UTC +scriptversion=2012-01-06.13; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, -# 2008, 2009 Free Software Foundation, Inc. +# 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify @@ -84,7 +84,6 @@ Supported PROGRAM values: help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file - tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and @@ -122,15 +121,6 @@ case $1 in # Not GNU programs, they don't have --version. ;; - tar*) - if test -n "$run"; then - echo 1>&2 "ERROR: \`tar' requires --run" - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - exit 1 - fi - ;; - *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. @@ -226,7 +216,7 @@ WARNING: \`$1' $msg. You should only need it if \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then - eval LASTARG="\${$#}" + eval LASTARG=\${$#} case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` @@ -256,7 +246,7 @@ WARNING: \`$1' is $msg. You should only need it if \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then - eval LASTARG="\${$#}" + eval LASTARG=\${$#} case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` @@ -318,41 +308,6 @@ WARNING: \`$1' is $msg. You should only need it if touch $file ;; - tar*) - shift - - # We have already tried tar in the generic part. - # Look for gnutar/gtar before invocation to avoid ugly error - # messages. - if (gnutar --version > /dev/null 2>&1); then - gnutar "$@" && exit 0 - fi - if (gtar --version > /dev/null 2>&1); then - gtar "$@" && exit 0 - fi - firstarg="$1" - if shift; then - case $firstarg in - *o*) - firstarg=`echo "$firstarg" | sed s/o//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - case $firstarg in - *h*) - firstarg=`echo "$firstarg" | sed s/h//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - fi - - echo 1>&2 "\ -WARNING: I can't seem to be able to run \`tar' with the given arguments. - You may want to install GNU tar or Free paxutils, or check the - command line arguments." - exit 1 - ;; - *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. diff --git a/po/LINGUAS b/po/LINGUAS index 31787eb..30d27cb 100644 --- a/po/LINGUAS +++ b/po/LINGUAS @@ -6,6 +6,16 @@ # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright # notice and this notice are preserved. +de +es fr -zh_CN +hu +it +lv +pt_BR +ru +sl +sr tr +uk +zh_CN diff --git a/po/POTFILES.in b/po/POTFILES.in index a99bf87..3101cb6 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -1,18 +1,25 @@ +src/glade/psensor.glade +src/glade/psensor-pref.glade +src/glade/sensor-edit.glade +src/lib/amd.c +src/lib/cpu.c +src/lib/hdd_atasmart.c +src/lib/hdd_hddtemp.c +src/lib/lmsensor.c +src/lib/log.c +src/lib/nvidia.c +src/lib/psensor.c +src/lib/slog.c src/main.c +src/rsensor.c +src/server/server.c src/ui.c src/ui_sensorlist.c src/ui_appindicator.c src/ui_color.c +src/ui_graph.c src/ui_notify.c src/ui_pref.c +src/ui_sensorlist.c src/ui_sensorpref.c -src/rsensor.c -src/server/server.c -src/lib/amd.c -src/lib/hdd.c -src/lib/log.c -src/lib/nvidia.c -src/lib/lmsensor.c -src/lib/psensor.c -src/glade/psensor-pref.glade -src/glade/sensor-edit.glade +tests/test_psensor_type_to_unit_str.c \ No newline at end of file diff --git a/po/de.gmo b/po/de.gmo new file mode 100644 index 0000000..3e0c08f Binary files /dev/null and b/po/de.gmo differ diff --git a/po/de.po b/po/de.po new file mode 100644 index 0000000..644c7dc --- /dev/null +++ b/po/de.po @@ -0,0 +1,670 @@ +# German translations for psensor package. +# Copyright (C) 2012 Free Software Foundation, Inc. +# This file is distributed under the same license as the psensor package. +# , 2012. +# +msgid "" +msgstr "" +"Project-Id-Version: psensor 0.7.0.x\n" +"Report-Msgid-Bugs-To: jeanfi@gmail.com\n" +"POT-Creation-Date: 2013-10-16 09:19+0200\n" +"PO-Revision-Date: 2013-05-20 21:13+0000\n" +"Last-Translator: Dennis Baudys \n" +"Language-Team: German\n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-10-18 06:32+0000\n" +"X-Generator: Launchpad (build 16799)\n" + +#: src/glade/psensor.glade:5 src/ui_appindicator.c:124 +msgid "About" +msgstr "Info" + +#: src/glade/psensor.glade:9 src/ui_sensorlist.c:209 src/ui_appindicator.c:112 +msgid "Preferences" +msgstr "Einstellungen" + +#: src/glade/psensor.glade:13 src/ui_appindicator.c:130 +msgid "Quit" +msgstr "Beenden" + +#: src/glade/psensor.glade:17 +msgid "Sensor Preferences" +msgstr "Sensoreinstellungen" + +#: src/glade/psensor.glade:96 +msgid "Psensor - Temperature Monitor" +msgstr "Psensor – Temperaturüberwachung" + +#: src/glade/psensor.glade:111 +msgid "_Psensor" +msgstr "_Psensor" + +#: src/glade/psensor.glade:158 +msgid "_Help" +msgstr "_Hilfe" + +#: src/glade/psensor-pref.glade:7 +msgid "Edit Preferences" +msgstr "Einstellungen bearbeiten" + +#: src/glade/psensor-pref.glade:72 +msgid "Position of sensors table:" +msgstr "Position der Sensorentabelle:" + +#: src/glade/psensor-pref.glade:81 +msgid "Hide window decoration" +msgstr "Keine Fensterdekorationen verwenden" + +#: src/glade/psensor-pref.glade:98 +msgid "Keep window below" +msgstr "Fenster unterhalb anheften" + +#: src/glade/psensor-pref.glade:115 +msgid "Enable menu" +msgstr "Menü aktivieren" + +#: src/glade/psensor-pref.glade:132 +msgid "Enable Unity Launcher counter" +msgstr "Wert im Starter von Unity anzeigen" + +#: src/glade/psensor-pref.glade:149 +msgid "Hide window on startup" +msgstr "Fenster beim Programmstart ausblenden" + +#: src/glade/psensor-pref.glade:166 +msgid "Restore window position and size" +msgstr "Fensterposition und -größe merken" + +#: src/glade/psensor-pref.glade:186 +msgid "Temperature unit:" +msgstr "Temperatureinheit:" + +#: src/glade/psensor-pref.glade:238 +msgid "Interface" +msgstr "Benutzeroberfläche" + +#: src/glade/psensor-pref.glade:276 +msgid "Foreground:" +msgstr "Vordergrund:" + +#: src/glade/psensor-pref.glade:291 +msgid "Background:" +msgstr "Hintergrund:" + +#: src/glade/psensor-pref.glade:325 +msgid "Background opacity:" +msgstr "Hintergrunddeckkraft:" + +#: src/glade/psensor-pref.glade:348 +msgid "Min" +msgstr "Min." + +#: src/glade/psensor-pref.glade:375 +msgid "Max" +msgstr "Max." + +#: src/glade/psensor-pref.glade:401 +msgid "Colors" +msgstr "Farben" + +#: src/glade/psensor-pref.glade:419 +msgid "Monitoring duration:" +msgstr "Überwachungszeitraum:" + +#: src/glade/psensor-pref.glade:457 +msgid "minute(s)" +msgstr "Minute(n)" + +#: src/glade/psensor-pref.glade:474 src/glade/psensor-pref.glade:626 +msgid "second(s)" +msgstr "Sekunde(n)" + +#: src/glade/psensor-pref.glade:510 +msgid "Update interval:" +msgstr "Aktualisierungsintervall:" + +#: src/glade/psensor-pref.glade:528 +msgid "Measures" +msgstr "Messungen" + +#: src/glade/psensor-pref.glade:564 src/glade/sensor-edit.glade:169 +#: src/ui_sensorlist.c:334 +msgid "Graph" +msgstr "Graph" + +#: src/glade/psensor-pref.glade:588 +msgid "Measure update interval:" +msgstr "Messintervall:" + +#: src/glade/psensor-pref.glade:637 +msgid "Enable sensors logging" +msgstr "Sensorenprotokollierung aktivieren" + +#: src/glade/psensor-pref.glade:684 +msgid "Sensors logging interval" +msgstr "Sensoren-Protokollierungsintervall" + +#: src/glade/psensor-pref.glade:701 +msgid "seconds(s)" +msgstr "Sekunde(n)" + +#: src/glade/psensor-pref.glade:718 +msgid "Script executed when an alarm is raised" +msgstr "" + +#: src/glade/psensor-pref.glade:751 +msgid "Sensors" +msgstr "Sensoren" + +#: src/glade/sensor-edit.glade:19 +msgid "Edit Sensor Preferences" +msgstr "Sensoreinstellungen bearbeiten" + +#: src/glade/sensor-edit.glade:87 +msgid "Name" +msgstr "Name" + +#: src/glade/sensor-edit.glade:138 +msgid "Type:" +msgstr "Typ:" + +#: src/glade/sensor-edit.glade:153 src/glade/sensor-edit.glade:294 +#: src/glade/sensor-edit.glade:388 src/glade/sensor-edit.glade:459 +#: src/glade/sensor-edit.glade:508 src/lib/psensor.c:486 src/ui_notify.c:81 +msgid "N/A" +msgstr "N/V" + +#: src/glade/sensor-edit.glade:187 +msgid "Color:" +msgstr "Farbe:" + +#: src/glade/sensor-edit.glade:201 +msgid "Alarm" +msgstr "Alarm" + +#: src/glade/sensor-edit.glade:216 +msgid "Activate desktop notifications" +msgstr "Benachrichtigungen aktivieren" + +#: src/glade/sensor-edit.glade:236 +msgid "Sensor Information" +msgstr "Sensorinformationen" + +#: src/glade/sensor-edit.glade:249 +msgid "Draw sensor curve" +msgstr "Sensorgraphen darstellen" + +#: src/glade/sensor-edit.glade:333 +msgid "High threshold:" +msgstr "Obere Grenze:" + +#: src/glade/sensor-edit.glade:348 +msgid "Low threshold:" +msgstr "Untere Grenze:" + +#: src/glade/sensor-edit.glade:409 +msgid "Ubuntu Application Indicator" +msgstr "Ubuntu-Anwendungsindikator" + +#: src/glade/sensor-edit.glade:424 +msgid "Display sensor in the Application Indicator menu" +msgstr "Sensor im Indikatormenü für Anwendungen zeigen" + +#: src/glade/sensor-edit.glade:444 +msgid "Chip:" +msgstr "Chip:" + +#: src/glade/sensor-edit.glade:489 +msgid "Id:" +msgstr "Id:" + +#: src/glade/sensor-edit.glade:523 +msgid "Details" +msgstr "Details" + +#: src/glade/sensor-edit.glade:541 +msgid "Name:" +msgstr "Name:" + +#: src/lib/amd.c:170 +msgid "AMD: cannot found ADL library." +msgstr "AMD: ADL-Bibliothek konnte nicht gefunden werden." + +#: src/lib/amd.c:197 +msgid "AMD: missing ADL's API." +msgstr "AMD: API der ADL-Bibliothek fehlt." + +#: src/lib/amd.c:207 +msgid "AMD: failed to initialize ADL." +msgstr "AMD: ADL-Bibliothek konnte nicht initialisiert werden." + +#: src/lib/amd.c:213 +msgid "AMD: cannot get the number of adapters." +msgstr "AMD: Anzahl der Adapter konnte nicht ermittelt werden." + +#: src/lib/amd.c:252 +#, c-format +msgid "Number of AMD/ATI adapters: %d" +msgstr "Anzahl der AMD/ATI-Adapter: %d" + +#: src/lib/amd.c:253 +#, c-format +msgid "Number of active AMD/ATI adapters: %d" +msgstr "Anzahl der aktiven AMD/ATI-Adapter: %d" + +#: src/lib/hdd_atasmart.c:152 +#, c-format +msgid "atasmart: sk_disk_open() failure: %s." +msgstr "atasmart: sk_disk_open() gescheitert: %s." + +#: src/lib/hdd_hddtemp.c:59 +msgid "hddtemp: failed to open socket." +msgstr "hddtemp: Öffnen des Sockets gescheitert." + +#: src/lib/hdd_hddtemp.c:72 +msgid "hddtemp: failed to open connection." +msgstr "hddtemp: Öffnen der Verbindung gescheitert." + +#: src/lib/hdd_hddtemp.c:186 src/lib/hdd_hddtemp.c:256 +#, c-format +msgid "hddtemp: wrong string: %s." +msgstr "hddtemp: Falsche Zeichenkette: %s." + +#: src/lib/lmsensor.c:42 +#, c-format +msgid "lmsensor: cannot get value of subfeature %s: %s." +msgstr "lmsensor: Wert der Unterfunktion %s kann nicht ermittelt werden: %s." + +#: src/lib/lmsensor.c:123 +msgid "lmsensor: lmsensor_psensor_create failure: wrong feature type." +msgstr "lmsensor: lmsensor_psensor_create gescheitert: Falscher Funktionstyp." + +#: src/lib/lmsensor.c:218 +#, c-format +msgid "lmsensor: initialization failure: %s." +msgstr "lmsensor: Initialisierung gescheitert: %s." + +#: src/lib/log.c:43 +#, c-format +msgid "Cannot open log file: %s" +msgstr "Protokolldatei kann nicht geöffnet werden: %s" + +#: src/lib/nvidia.c:54 +msgid "" +"NVIDIA proprietary driver not used or cannot retrieve NVIDIA GPU temperature." +msgstr "" +"Entweder wird kein proprietärer NVIDIA-Treiber verwendet oder die NVIDIA-GPU-" +"Temperatur kann nicht ermittelt werden." + +#: src/lib/nvidia.c:97 +msgid "Cannot open connection to X11 server." +msgstr "Verbindung zum X11-Server konnte nicht hergestellt werden." + +#: src/lib/nvidia.c:105 +msgid "Failed to retrieve NVIDIA information." +msgstr "Ermittlung der NVIDIA-Informationen gescheitert." + +#: src/lib/psensor.c:482 tests/test_psensor_type_to_unit_str.c:62 +msgid "RPM" +msgstr "U/min" + +#: src/lib/psensor.c:484 +msgid "%" +msgstr "%" + +#: src/lib/slog.c:68 +msgid "HOME variable not set." +msgstr "HOME-Variable ist nicht festgelegt." + +#: src/lib/slog.c:78 +msgid "Sensor log file already open." +msgstr "Sensorprotokolldatei ist bereits geöffnet." + +#: src/lib/slog.c:87 +#, fuzzy, c-format +msgid "Cannot open sensor log file: %s." +msgstr "Sensorprotokolldatei kann nicht geöffnet werden: %s." + +#: src/lib/slog.c:118 +msgid "Sensor log file not open." +msgstr "Sensorprotokolldatei ist nicht geöffnet." + +#: src/lib/slog.c:174 +msgid "Sensor log not open, cannot close." +msgstr "" +"Sensorprotokolldatei ist nicht geöffnet und kann deswegen nicht geschlossen " +"werden." + +#: src/main.c:77 +#, c-format +msgid "" +"Copyright (C) %s jeanfi@gmail.com\n" +"License GPLv2: GNU GPL version 2 or later \n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +msgstr "" +"Copyright © %s jeanfi@gmail.com\n" +"Lizenz GPLv2: GNU GPL Version 2 oder neuer \n" +"Dies ist freie Software: Sie können Sie beliebig ändern und " +"weiterverbreiten.\n" +"Sie wird OHNE JEGLICHE GEWÄHRLEISTUNG zur Verfügung gestellt.\n" + +#: src/main.c:88 src/server/server.c:94 +#, c-format +msgid "Usage: %s [OPTION]...\n" +msgstr "Aufruf: %s [OPTION] …\n" + +#: src/main.c:90 +msgid "" +"Psensor is a GTK+ application for monitoring hardware sensors, including " +"temperatures and fan speeds." +msgstr "" +"Psensor ist eine GTK+-Anwendung zur Überwachung von Hardware-Sensoren, " +"inklusive Temperaturen und Lüftergeschwindigkeiten." + +#: src/main.c:94 +msgid "Options:" +msgstr "Optionen:" + +#: src/main.c:95 +msgid "" +" -h, --help display this help and exit\n" +" -v, --version display version information and exit" +msgstr "" +" -h, --help Diese Hilfe anzeigen und beenden\n" +" -v, --version Versionsinformationen anzeigen und beenden" + +#: src/main.c:101 +msgid "" +" -u, --url=URL the URL of the psensor-server,\n" +" example: http://hostname:3131" +msgstr "" +" -u, --url=URL Die Adresse (URL) von psensor-server,\n" +" Beispiel: http://hostname:3131" + +#: src/main.c:104 +msgid "" +" --use-libatasmart use atasmart library for disk monitoring instead of\n" +" hddtemp daemon" +msgstr "" +" --use-libatasmart atasmart-Bibliothek zur Festplattenüberwachung\n" +" anstelle des hddtemp-Dienstes nutzen" + +#: src/main.c:107 +msgid " -n, --new-instance force the creation of a new Psensor application" +msgstr "" +" -n, --new-instance Erzeugung einer neuen Psensor-Anwendung erzwingen" + +#: src/main.c:110 +msgid " -d, --debug=LEVEL set the debug level, integer between 0 and 3" +msgstr "" +" -d, --debug=STUFE Fehlerdiagnosestufe festlegen, Ganzzahl zwischen 0 und " +"3" + +#: src/main.c:115 src/server/server.c:117 +#, c-format +msgid "Report bugs to: %s\n" +msgstr "Programmfehler melden an: %s\n" + +#: src/main.c:117 src/server/server.c:119 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "%s-Website: <%s>\n" + +#: src/main.c:454 +msgid "Psensor has not been compiled with remote sensor support." +msgstr "Psensor wurde ohne Unterstützung für entfernte Sensoren kompiliert." + +#: src/main.c:517 +msgid "Enables debug mode." +msgstr "Fehlerdiagnosemodus wird aktiviert." + +#: src/main.c:529 src/server/server.c:380 +#, c-format +msgid "Try `%s --help' for more information.\n" +msgstr "Rufen Sie »%s --help« auf, um weitere Informationen zu erhalten.\n" + +#: src/main.c:542 +msgid "A Psensor instance already exists." +msgstr "Es existiert bereits eine Psensor-Instanz." + +#: src/rsensor.c:107 +#, c-format +msgid "Fail to connect to: %s" +msgstr "Herstellen der Verbindung gescheitert: %s" + +#: src/rsensor.c:144 +#, c-format +msgid "Invalid content: %s" +msgstr "Ungültiger Inhalt: %s" + +#: src/rsensor.c:184 +#, c-format +msgid "Invalid JSON: %s" +msgstr "Ungültiges JSON: %s" + +#: src/server/server.c:54 +msgid "

Server stop requested

" +msgstr "

Anhalten des Servers angefordert

" + +#: src/server/server.c:60 +msgid "" +"

Page not found - Go to Main page

" +msgstr "" +"

Seite nicht gefunden – Gehen Sie zurück zur Startseite

" + +#: src/server/server.c:84 +#, c-format +msgid "" +"Copyright (C) %s jeanfi@gmail.com\n" +"License GPLv2: GNU GPL version 2 or later \n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +msgstr "" +"Copyright © %s jeanfi@gmail.com\n" +"Lizenz GPLv2: GNU GPL Version 2 oder neuer \n" +"Dies ist freie Software: Sie können Sie beliebig ändern und " +"weiterverbreiten.\n" +"Sie wird OHNE JEGLICHE GEWÄHRLEISTUNG zur Verfügung gestellt.\n" + +#: src/server/server.c:96 +msgid "" +"psensor-server is an HTTP server for monitoring hardware sensors remotely." +msgstr "" +"psensor-server ist ein HTTP-Server zur Fernüberwachung von Hardware-Sensoren." + +#: src/server/server.c:101 +msgid "" +" -h, --help\t\tdisplay this help and exit\n" +" -v, --version\t\tdisplay version information and exit" +msgstr "" +" -h, --help\t\tDiese Hilfe anzeigen und beenden\n" +" -v, --version\t\tVersionsinformationen anzeigen und beenden" + +#: src/server/server.c:105 +msgid "" +" -p,--port=PORT\twebserver port\n" +" -w,--wdir=DIR\t\tdirectory containing webserver pages" +msgstr "" +" -p,--port=PORT\tWebserver-Port\n" +" -w,--wdir=DIR\t\tOrdner, der Webserver-Seiten enthält" + +#: src/server/server.c:109 +msgid " -d, --debug=LEVEL set the debug level, integer between 0 and 3" +msgstr "" +" -d, --debug=LEVEL Fehlerdiagnoseebene festlegen, Ganzzahl zwischen 0 " +"und 3" + +#: src/server/server.c:111 +msgid " -l, --log-file=PATH set the log file to PATH" +msgstr " -l, --log-file=PATH Protokolldatei auf PATH festlegen" + +#: src/server/server.c:112 +msgid " --sensor-log-file=PATH set the sensor log file to PATH" +msgstr " --sensor-log-file=PATH Sensorenprotokolldatei auf PATH festlegen" + +#: src/server/server.c:113 +msgid " --sensor-log-interval=S set the sensor log interval to S (seconds)" +msgstr "" +" --sensor-log-interval=S Sensorenprotokollierungsintervall auf S (Sekunden) " +"festlegen" + +#: src/server/server.c:297 +#, c-format +msgid "HTTP Request: %s" +msgstr "HTTP Abfrage: %s" + +#: src/server/server.c:360 +#, c-format +msgid "Enables debug mode: %d" +msgstr "Aktiviert den Fehlerdiagnosemodus: %d" + +#: src/server/server.c:402 +msgid "No sensors detected." +msgstr "Keine Sensoren erkannt." + +#: src/server/server.c:409 +msgid "Failed to create Web server." +msgstr "Erzeugen des Webservers ist gescheitert." + +#: src/server/server.c:413 +#, c-format +msgid "Web server started on port: %d" +msgstr "Web-Server wurde gestartet auf Port: %d" + +#: src/server/server.c:414 +#, c-format +msgid "WWW directory: %s" +msgstr "WWW-Ordner: %s" + +#: src/server/server.c:415 +#, c-format +msgid "URL: http://localhost:%d" +msgstr "Adresse: http://localhost:%d" + +#: src/server/server.c:425 +msgid "Failed to activate logging of sensors." +msgstr "Aktivieren der Sensorenprotokollierung ist gescheitert." + +#: src/ui.c:84 +msgid "Psensor is a GTK+ application for monitoring hardware sensors" +msgstr "Psensor ist eine GTK-Anwendung zur Überwachung von Hardware-Sensoren" + +#: src/ui.c:87 +msgid "" +"Copyright(c) 2010-2013\n" +"jeanfi@gmail.com" +msgstr "" +"Copyright © 2010-2013\n" +"jeanfi@gmail.com" + +#: src/ui.c:90 +msgid "About Psensor" +msgstr "Info zu Psensor" + +#: src/ui.c:93 +msgid "Psensor Homepage" +msgstr "Psensor-Website" + +#: src/ui.c:217 +msgid "Failed to load Psensor icon." +msgstr "Laden des Psensor-Symbols ist gescheitert." + +#: src/ui_sensorlist.c:245 +msgid "Select foreground color" +msgstr "Wählen Sie eine Vordergrundfarbe" + +#: src/ui_sensorlist.c:297 +msgid "Sensor" +msgstr "Sensor" + +#: src/ui_sensorlist.c:303 +msgid "Value" +msgstr "Wert" + +#: src/ui_sensorlist.c:309 +msgid "Min" +msgstr "Min." + +#: src/ui_sensorlist.c:315 +msgid "Max" +msgstr "Max." + +#: src/ui_sensorlist.c:322 +msgid "Color" +msgstr "Farbe" + +#: src/ui_appindicator.c:106 +msgid "_Show" +msgstr "_Anzeigen" + +#: src/ui_appindicator.c:107 +msgid "Show" +msgstr "Anzeigen" + +#: src/ui_appindicator.c:111 +msgid "_Preferences" +msgstr "_Einstellungen" + +#: src/ui_appindicator.c:116 +msgid "S_ensor Preferences" +msgstr "_Sensoreinstellungen" + +#: src/ui_appindicator.c:118 +msgid "SensorPreferences" +msgstr "Sensoreinstellungen" + +#: src/ui_appindicator.c:122 +msgid "_About" +msgstr "_Info" + +#: src/ui_appindicator.c:129 +msgid "_Quit" +msgstr "_Beenden" + +#: src/ui_appindicator.c:220 +#, c-format +msgid "building menus failed: %s" +msgstr "Erstellen der Menüs ist gescheitert: %s" + +#: src/ui_notify.c:48 +msgid "gettimeofday failed." +msgstr "gettimeofday ist gescheitert." + +#: src/ui_notify.c:77 +msgid "Temperature alert" +msgstr "Temperaturalarm" + +#: src/ui_notify.c:79 +msgid "Fan alert" +msgstr "Lüfteralarm" + +#: src/ui_sensorpref.c:248 +msgid "Unknown" +msgstr "Unbekannt" + +#~ msgid "Sensor Name" +#~ msgstr "Sensor-Name" + +#~ msgid "Enabled" +#~ msgstr "Aktiviert" + +#, fuzzy +#~ msgid "Enable log of measures" +#~ msgstr "Menü aktivieren" + +#, fuzzy +#~ msgid "slog_init: cannot open sensor log file: %s" +#~ msgstr "Protokolldatei kann nicht geöffnet werden: %s" + +#, fuzzy +#~ msgid "Enable indicator" +#~ msgstr "Aktiviert" diff --git a/po/es.gmo b/po/es.gmo new file mode 100644 index 0000000..fb34226 Binary files /dev/null and b/po/es.gmo differ diff --git a/po/es.po b/po/es.po new file mode 100644 index 0000000..2eee923 --- /dev/null +++ b/po/es.po @@ -0,0 +1,651 @@ +# Spanish translation for psensor +# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012 +# This file is distributed under the same license as the psensor package. +# Jean-Philippe Orsini 2012. +# +msgid "" +msgstr "" +"Project-Id-Version: psensor\n" +"Report-Msgid-Bugs-To: jeanfi@gmail.com\n" +"POT-Creation-Date: 2013-10-16 09:19+0200\n" +"PO-Revision-Date: 2013-05-12 22:16+0000\n" +"Last-Translator: Javier \n" +"Language-Team: Spanish \n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-10-18 06:32+0000\n" +"X-Generator: Launchpad (build 16799)\n" + +#: src/glade/psensor.glade:5 src/ui_appindicator.c:124 +msgid "About" +msgstr "Acerca de" + +#: src/glade/psensor.glade:9 src/ui_sensorlist.c:209 src/ui_appindicator.c:112 +msgid "Preferences" +msgstr "Ajustes" + +#: src/glade/psensor.glade:13 src/ui_appindicator.c:130 +msgid "Quit" +msgstr "Salir" + +#: src/glade/psensor.glade:17 +msgid "Sensor Preferences" +msgstr "Ajustes de los Sensores" + +#: src/glade/psensor.glade:96 +msgid "Psensor - Temperature Monitor" +msgstr "Psensor - Monitor de temperatura" + +#: src/glade/psensor.glade:111 +msgid "_Psensor" +msgstr "_Psensor" + +#: src/glade/psensor.glade:158 +msgid "_Help" +msgstr "_Ayuda" + +#: src/glade/psensor-pref.glade:7 +msgid "Edit Preferences" +msgstr "Editar Ajustes" + +#: src/glade/psensor-pref.glade:72 +msgid "Position of sensors table:" +msgstr "Ubicación de los valores" + +#: src/glade/psensor-pref.glade:81 +msgid "Hide window decoration" +msgstr "Ocultar el marco de la ventana" + +#: src/glade/psensor-pref.glade:98 +msgid "Keep window below" +msgstr "Mantener debajo del resto de ventanas" + +#: src/glade/psensor-pref.glade:115 +msgid "Enable menu" +msgstr "Activar menú" + +#: src/glade/psensor-pref.glade:132 +msgid "Enable Unity Launcher counter" +msgstr "Inicio retardado al abrir sesión" + +#: src/glade/psensor-pref.glade:149 +msgid "Hide window on startup" +msgstr "Ocultar la ventana de gráficas al iniciar sesión." + +#: src/glade/psensor-pref.glade:166 +msgid "Restore window position and size" +msgstr "Restaurar tamaño y posición de la ventana" + +#: src/glade/psensor-pref.glade:186 +msgid "Temperature unit:" +msgstr "Unidad de temperatura" + +#: src/glade/psensor-pref.glade:238 +msgid "Interface" +msgstr "Interfaz" + +#: src/glade/psensor-pref.glade:276 +msgid "Foreground:" +msgstr "Escalas y cuadrícula" + +#: src/glade/psensor-pref.glade:291 +msgid "Background:" +msgstr "Fondo de gráfica" + +#: src/glade/psensor-pref.glade:325 +msgid "Background opacity:" +msgstr "Opacidad del fondo:" + +#: src/glade/psensor-pref.glade:348 +msgid "Min" +msgstr "Mín" + +#: src/glade/psensor-pref.glade:375 +msgid "Max" +msgstr "Máx" + +#: src/glade/psensor-pref.glade:401 +msgid "Colors" +msgstr "Colores" + +#: src/glade/psensor-pref.glade:419 +msgid "Monitoring duration:" +msgstr "Intervalo de la gráfica" + +#: src/glade/psensor-pref.glade:457 +msgid "minute(s)" +msgstr "minuto(s)" + +#: src/glade/psensor-pref.glade:474 src/glade/psensor-pref.glade:626 +msgid "second(s)" +msgstr "segundo(s)" + +#: src/glade/psensor-pref.glade:510 +msgid "Update interval:" +msgstr "Intervalo de actualización:" + +#: src/glade/psensor-pref.glade:528 +msgid "Measures" +msgstr "Medidas" + +#: src/glade/psensor-pref.glade:564 src/glade/sensor-edit.glade:169 +#: src/ui_sensorlist.c:334 +msgid "Graph" +msgstr "Gráfica" + +#: src/glade/psensor-pref.glade:588 +msgid "Measure update interval:" +msgstr "Medir sensores cada:" + +#: src/glade/psensor-pref.glade:637 +msgid "Enable sensors logging" +msgstr "Activar registro de sensores" + +#: src/glade/psensor-pref.glade:684 +msgid "Sensors logging interval" +msgstr "Intervalo de registro de sensores" + +#: src/glade/psensor-pref.glade:701 +msgid "seconds(s)" +msgstr "segundo(s)" + +#: src/glade/psensor-pref.glade:718 +msgid "Script executed when an alarm is raised" +msgstr "" + +#: src/glade/psensor-pref.glade:751 +msgid "Sensors" +msgstr "Sensores" + +#: src/glade/sensor-edit.glade:19 +msgid "Edit Sensor Preferences" +msgstr "Editar Ajustes Sensores" + +#: src/glade/sensor-edit.glade:87 +msgid "Name" +msgstr "Nombre" + +#: src/glade/sensor-edit.glade:138 +msgid "Type:" +msgstr "Tipo:" + +#: src/glade/sensor-edit.glade:153 src/glade/sensor-edit.glade:294 +#: src/glade/sensor-edit.glade:388 src/glade/sensor-edit.glade:459 +#: src/glade/sensor-edit.glade:508 src/lib/psensor.c:486 src/ui_notify.c:81 +msgid "N/A" +msgstr "No disponible" + +#: src/glade/sensor-edit.glade:187 +msgid "Color:" +msgstr "Color:" + +#: src/glade/sensor-edit.glade:201 +msgid "Alarm" +msgstr "Alarma" + +#: src/glade/sensor-edit.glade:216 +msgid "Activate desktop notifications" +msgstr "Activar notificaciones en el escritorio" + +#: src/glade/sensor-edit.glade:236 +msgid "Sensor Information" +msgstr "Información del sensor" + +#: src/glade/sensor-edit.glade:249 +msgid "Draw sensor curve" +msgstr "Representar el sensor en la gráfica" + +#: src/glade/sensor-edit.glade:333 +msgid "High threshold:" +msgstr "Límite superior" + +#: src/glade/sensor-edit.glade:348 +msgid "Low threshold:" +msgstr "Límite inferior" + +#: src/glade/sensor-edit.glade:409 +msgid "Ubuntu Application Indicator" +msgstr "Indicador de aplicación de Ubuntu" + +#: src/glade/sensor-edit.glade:424 +msgid "Display sensor in the Application Indicator menu" +msgstr "Mostrar sensor en el menú de aplicaciones" + +#: src/glade/sensor-edit.glade:444 +msgid "Chip:" +msgstr "Chip:" + +#: src/glade/sensor-edit.glade:489 +msgid "Id:" +msgstr "Identificativo:" + +#: src/glade/sensor-edit.glade:523 +msgid "Details" +msgstr "Detalles" + +#: src/glade/sensor-edit.glade:541 +msgid "Name:" +msgstr "Nombre:" + +#: src/lib/amd.c:170 +msgid "AMD: cannot found ADL library." +msgstr "AMD: no se ha encontrado la librería ADL" + +#: src/lib/amd.c:197 +msgid "AMD: missing ADL's API." +msgstr "AMD: ADL's API perdidos" + +#: src/lib/amd.c:207 +msgid "AMD: failed to initialize ADL." +msgstr "AMD: error al iniciar ADL" + +#: src/lib/amd.c:213 +msgid "AMD: cannot get the number of adapters." +msgstr "AMD: imposible listar el número de adaptadores" + +#: src/lib/amd.c:252 +#, c-format +msgid "Number of AMD/ATI adapters: %d" +msgstr "Numero de adaptadores AMD/ATI: %d" + +#: src/lib/amd.c:253 +#, c-format +msgid "Number of active AMD/ATI adapters: %d" +msgstr "Numero de adaptadores AMD/ATI: %d" + +#: src/lib/hdd_atasmart.c:152 +#, c-format +msgid "atasmart: sk_disk_open() failure: %s." +msgstr "atasmart: sk_disk_open() Error: %s" + +#: src/lib/hdd_hddtemp.c:59 +msgid "hddtemp: failed to open socket." +msgstr "hddtemp: fallo al desplegar el conector" + +#: src/lib/hdd_hddtemp.c:72 +msgid "hddtemp: failed to open connection." +msgstr "hddtemp: fallo al establecer conexión" + +#: src/lib/hdd_hddtemp.c:186 src/lib/hdd_hddtemp.c:256 +#, c-format +msgid "hddtemp: wrong string: %s." +msgstr "hddtemp: argumento erróneo:%s." + +#: src/lib/lmsensor.c:42 +#, c-format +msgid "lmsensor: cannot get value of subfeature %s: %s." +msgstr "lmsensor: imposible obtener el valor de subcaracterística %s:%s" + +#: src/lib/lmsensor.c:123 +msgid "lmsensor: lmsensor_psensor_create failure: wrong feature type." +msgstr "lmsensor: lmsensor_psensor_create Fallo: tipo de funcion equivocada." + +#: src/lib/lmsensor.c:218 +#, c-format +msgid "lmsensor: initialization failure: %s." +msgstr "lmsensor: Fallo de inicialización:%s." + +#: src/lib/log.c:43 +#, c-format +msgid "Cannot open log file: %s" +msgstr "Imposible abrir el archivo de registro: %s" + +#: src/lib/nvidia.c:54 +msgid "" +"NVIDIA proprietary driver not used or cannot retrieve NVIDIA GPU temperature." +msgstr "" +"Controlador propietario de NVIDIA no activado ó incapaz de obtener la " +"temperatura de la GPU" + +#: src/lib/nvidia.c:97 +msgid "Cannot open connection to X11 server." +msgstr "Imposible establecer conexión con el servidor X11." + +#: src/lib/nvidia.c:105 +msgid "Failed to retrieve NVIDIA information." +msgstr "Error al obtener la información de NVIDIA" + +#: src/lib/psensor.c:482 tests/test_psensor_type_to_unit_str.c:62 +msgid "RPM" +msgstr "RPM" + +#: src/lib/psensor.c:484 +msgid "%" +msgstr "%" + +#: src/lib/slog.c:68 +msgid "HOME variable not set." +msgstr "La variable HOME no ha sido definida" + +#: src/lib/slog.c:78 +msgid "Sensor log file already open." +msgstr "Ya existe un registro de sensores abierto" + +#: src/lib/slog.c:87 +#, fuzzy, c-format +msgid "Cannot open sensor log file: %s." +msgstr "No se puede abrir el archivo de registro: %s." + +#: src/lib/slog.c:118 +msgid "Sensor log file not open." +msgstr "No se abrió el archivo de registro." + +#: src/lib/slog.c:174 +msgid "Sensor log not open, cannot close." +msgstr "¡No existe archivo que cerrar!" + +#: src/main.c:77 +#, c-format +msgid "" +"Copyright (C) %s jeanfi@gmail.com\n" +"License GPLv2: GNU GPL version 2 or later \n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +msgstr "" +"Copyright (C) %s jeanfi@gmail.com\n" +"Licencia GPLv2: GNU GPL versión 2 o posterior \n" +"Este programa es software libre: su modificación y difusión está autorizada " +"y apoyada por su autor.\n" +"No existe NINGUNA GARANTÍA hasta donde la ley lo permita.\n" + +#: src/main.c:88 src/server/server.c:94 +#, c-format +msgid "Usage: %s [OPTION]...\n" +msgstr "Uso: %s [OPTION]...\n" + +#: src/main.c:90 +msgid "" +"Psensor is a GTK+ application for monitoring hardware sensors, including " +"temperatures and fan speeds." +msgstr "" +"Psensor es un programa GTK+ que muestra datos de temperatura y ventiladores " +"a través de los sensores de su hardware." + +#: src/main.c:94 +msgid "Options:" +msgstr "Opciones" + +#: src/main.c:95 +msgid "" +" -h, --help display this help and exit\n" +" -v, --version display version information and exit" +msgstr "" +" -h, --help Muestra esta ayuda. \n" +" -v, --versión Muestra información sobre la versión." + +#: src/main.c:101 +msgid "" +" -u, --url=URL the URL of the psensor-server,\n" +" example: http://hostname:3131" +msgstr "" +" -u, --url=URL La URL del servidor psensor,\n" +" ejemplo: http://hostname:3131" + +#: src/main.c:104 +msgid "" +" --use-libatasmart use atasmart library for disk monitoring instead of\n" +" hddtemp daemon" +msgstr "" +" --usar-libatasmart usar librería atasmart para leer el sensor del disco\n" +" duro en lugar de hddtemp daemon" + +#: src/main.c:107 +msgid " -n, --new-instance force the creation of a new Psensor application" +msgstr " -n, --new-instance Fuerza el inicio de otro Psensor paralelo" + +#: src/main.c:110 +msgid " -d, --debug=LEVEL set the debug level, integer between 0 and 3" +msgstr "" +" -d, --debug=NIVEL Establece el nivel de depuración con un valor entre 0 y " +"3" + +#: src/main.c:115 src/server/server.c:117 +#, c-format +msgid "Report bugs to: %s\n" +msgstr "Comunicar fallos: %s\n" + +#: src/main.c:117 src/server/server.c:119 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "%s Página Oficial: <%s>\n" + +#: src/main.c:454 +msgid "Psensor has not been compiled with remote sensor support." +msgstr "Psensor no ha sido compilado con soporte para sensores remotos." + +#: src/main.c:517 +msgid "Enables debug mode." +msgstr "Activa el modo de depuración" + +#: src/main.c:529 src/server/server.c:380 +#, c-format +msgid "Try `%s --help' for more information.\n" +msgstr "Introducir `%s --ayuda' para obtener más información\n" + +#: src/main.c:542 +msgid "A Psensor instance already exists." +msgstr "Ya existe un Psensor en ejecución." + +#: src/rsensor.c:107 +#, c-format +msgid "Fail to connect to: %s" +msgstr "Error al conectar a:%s" + +#: src/rsensor.c:144 +#, c-format +msgid "Invalid content: %s" +msgstr "Contenido no válido:%s" + +#: src/rsensor.c:184 +#, c-format +msgid "Invalid JSON: %s" +msgstr "JSON no válido:%s" + +#: src/server/server.c:54 +msgid "

Server stop requested

" +msgstr "

El servidor solicitó detenerse

" + +#: src/server/server.c:60 +msgid "" +"

Page not found - Go to Main page

" +msgstr "" +"

Página no encontrada- Ir a Página Principal" + +#: src/server/server.c:84 +#, c-format +msgid "" +"Copyright (C) %s jeanfi@gmail.com\n" +"License GPLv2: GNU GPL version 2 or later \n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +msgstr "" +"Copyright (C) %s jeanfi@gmail.com\n" +"Licencia GPLv2: GNU GPL versión 2 o posterior \n" +"Este programa es software libre: su modificación y difusión está aprobada y " +"apoyada por el autor. \n" +"No existe NINGUNA GARANTÍA hasta donde la ley lo permita.\n" + +#: src/server/server.c:96 +msgid "" +"psensor-server is an HTTP server for monitoring hardware sensors remotely." +msgstr "" +"psensor-server es un servidor HTTP para obtener información de los sensores " +"de forma remota." + +#: src/server/server.c:101 +msgid "" +" -h, --help\t\tdisplay this help and exit\n" +" -v, --version\t\tdisplay version information and exit" +msgstr "" +" -h, --help\t\tMuestra esta ayuda.\n" +" -v, --version\t\tMuestra la versión." + +#: src/server/server.c:105 +msgid "" +" -p,--port=PORT\twebserver port\n" +" -w,--wdir=DIR\t\tdirectory containing webserver pages" +msgstr "" +" -p,--port=PORT\tPuerto del servidor web. \n" +" -w,--wdir=DIR\t\tDirectorio de servidores web." + +#: src/server/server.c:109 +msgid " -d, --debug=LEVEL set the debug level, integer between 0 and 3" +msgstr "" +" -d, --debug=NIVEL Establece el nivel de depuración con un número de 0 " +"a 3" + +#: src/server/server.c:111 +msgid " -l, --log-file=PATH set the log file to PATH" +msgstr " -l, --log-file=PATH establece el archivo de registro en PATH" + +#: src/server/server.c:112 +msgid " --sensor-log-file=PATH set the sensor log file to PATH" +msgstr " --sensor-log-file=PATH establecer el archivo de registro en PATH" + +#: src/server/server.c:113 +#, fuzzy +msgid " --sensor-log-interval=S set the sensor log interval to S (seconds)" +msgstr " --sensor-log-interval=S registrar sensores cada S (seconds)" + +#: src/server/server.c:297 +#, c-format +msgid "HTTP Request: %s" +msgstr "Petición HTTP:%s" + +#: src/server/server.c:360 +#, c-format +msgid "Enables debug mode: %d" +msgstr "Activa el modo de depuración:%d" + +#: src/server/server.c:402 +msgid "No sensors detected." +msgstr "No se han detectado sensores." + +#: src/server/server.c:409 +msgid "Failed to create Web server." +msgstr "Fallo al crear el servidor Web" + +#: src/server/server.c:413 +#, c-format +msgid "Web server started on port: %d" +msgstr "Servidor web iniciado en el puerto:%d" + +#: src/server/server.c:414 +#, c-format +msgid "WWW directory: %s" +msgstr "directorio WWW:%s" + +#: src/server/server.c:415 +#, c-format +msgid "URL: http://localhost:%d" +msgstr "URL: http://localhost:%d" + +#: src/server/server.c:425 +msgid "Failed to activate logging of sensors." +msgstr "Error al activar el registro de sensores" + +#: src/ui.c:84 +msgid "Psensor is a GTK+ application for monitoring hardware sensors" +msgstr "" +"Psensor es una aplicación GTK+ que recoge y muestra información de los " +"sensores del hardware." + +#: src/ui.c:87 +msgid "" +"Copyright(c) 2010-2013\n" +"jeanfi@gmail.com" +msgstr "" +"Copyright(c) 2010-2013\n" +"jeanfi@gmail.com" + +#: src/ui.c:90 +msgid "About Psensor" +msgstr "Sobre Psensor" + +#: src/ui.c:93 +msgid "Psensor Homepage" +msgstr "Web de Psensor" + +#: src/ui.c:217 +msgid "Failed to load Psensor icon." +msgstr "Error al cargar el icono de Psensor" + +#: src/ui_sensorlist.c:245 +msgid "Select foreground color" +msgstr "Seleccionar el color del primer plano" + +#: src/ui_sensorlist.c:297 +msgid "Sensor" +msgstr "Sensor" + +#: src/ui_sensorlist.c:303 +msgid "Value" +msgstr "Valor" + +#: src/ui_sensorlist.c:309 +msgid "Min" +msgstr "Mín" + +#: src/ui_sensorlist.c:315 +msgid "Max" +msgstr "Máx" + +#: src/ui_sensorlist.c:322 +msgid "Color" +msgstr "Color" + +#: src/ui_appindicator.c:106 +msgid "_Show" +msgstr "_Mostrar" + +#: src/ui_appindicator.c:107 +msgid "Show" +msgstr "Mostrar" + +#: src/ui_appindicator.c:111 +msgid "_Preferences" +msgstr "_Ajustes" + +#: src/ui_appindicator.c:116 +msgid "S_ensor Preferences" +msgstr "Ajust_es del sensores" + +#: src/ui_appindicator.c:118 +msgid "SensorPreferences" +msgstr "Ajustes del sensor" + +#: src/ui_appindicator.c:122 +msgid "_About" +msgstr "_Acerca de" + +#: src/ui_appindicator.c:129 +msgid "_Quit" +msgstr "_Salir" + +#: src/ui_appindicator.c:220 +#, c-format +msgid "building menus failed: %s" +msgstr "Error al construir los menús :%s" + +#: src/ui_notify.c:48 +msgid "gettimeofday failed." +msgstr "Error en la adquisición del horario." + +#: src/ui_notify.c:77 +msgid "Temperature alert" +msgstr "Alarma por temperatura." + +#: src/ui_notify.c:79 +msgid "Fan alert" +msgstr "Alarma por parada de ventilador." + +#: src/ui_sensorpref.c:248 +msgid "Unknown" +msgstr "Desconocido" diff --git a/po/fr.gmo b/po/fr.gmo index 4394921..e41f20c 100644 Binary files a/po/fr.gmo and b/po/fr.gmo differ diff --git a/po/fr.po b/po/fr.po index f594d71..3b035be 100644 --- a/po/fr.po +++ b/po/fr.po @@ -1,23 +1,342 @@ # Oriya translations for psensor package. # Copyright (C) 2011 Free Software Foundation, Inc. # This file is distributed under the same license as the psensor package. -# Jean-Philippe Orsini , 2011. +# Jean-Philippe Orsini , 2011, 2012. # msgid "" msgstr "" -"Project-Id-Version: psensor 0.6.0.9\n" +"Project-Id-Version: psensor\n" "Report-Msgid-Bugs-To: jeanfi@gmail.com\n" -"POT-Creation-Date: 2012-03-26 10:30+0200\n" -"PO-Revision-Date: 2011-02-07 21:18+0100\n" -"Last-Translator: Jean-Philippe Orsini \n" -"Language-Team: Oriya\n" -"Language: or\n" +"POT-Creation-Date: 2013-10-16 09:19+0200\n" +"PO-Revision-Date: 2013-06-29 15:14+0000\n" +"Last-Translator: londumas \n" +"Language-Team: French <>\n" +"Language: fr_FR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8-bit\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-10-18 06:32+0000\n" +"X-Generator: Launchpad (build 16799)\n" -#: src/main.c:77 +#: src/glade/psensor.glade:5 src/ui_appindicator.c:124 +msgid "About" +msgstr "À propos" + +#: src/glade/psensor.glade:9 src/ui_sensorlist.c:209 src/ui_appindicator.c:112 +msgid "Preferences" +msgstr "Préférences" + +#: src/glade/psensor.glade:13 src/ui_appindicator.c:130 +msgid "Quit" +msgstr "Quitter" + +#: src/glade/psensor.glade:17 +msgid "Sensor Preferences" +msgstr "Préférences des capteurs" + +#: src/glade/psensor.glade:96 +msgid "Psensor - Temperature Monitor" +msgstr "Psensor - Surveillance Des Températures" + +#: src/glade/psensor.glade:111 +msgid "_Psensor" +msgstr "" + +#: src/glade/psensor.glade:158 +msgid "_Help" +msgstr "_Aide" + +#: src/glade/psensor-pref.glade:7 +msgid "Edit Preferences" +msgstr "Modifier les préférences" + +#: src/glade/psensor-pref.glade:72 +msgid "Position of sensors table:" +msgstr "Position de la table des capteurs:" + +#: src/glade/psensor-pref.glade:81 +msgid "Hide window decoration" +msgstr "Cacher les décorations de la fenêtre" + +#: src/glade/psensor-pref.glade:98 +msgid "Keep window below" +msgstr "Garder la fenêtre en arrière-plan" + +#: src/glade/psensor-pref.glade:115 +msgid "Enable menu" +msgstr "Activer le menu" + +#: src/glade/psensor-pref.glade:132 +msgid "Enable Unity Launcher counter" +msgstr "Activer le compteur du lanceur de Unity" + +#: src/glade/psensor-pref.glade:149 +msgid "Hide window on startup" +msgstr "Cacher la fenêtre au lancement" + +#: src/glade/psensor-pref.glade:166 +msgid "Restore window position and size" +msgstr "Rétablir la position et la taille de la fenêtre" + +#: src/glade/psensor-pref.glade:186 +msgid "Temperature unit:" +msgstr "Unité de température:" + +#: src/glade/psensor-pref.glade:238 +msgid "Interface" +msgstr "Interface" + +#: src/glade/psensor-pref.glade:276 +msgid "Foreground:" +msgstr "Avant-plan:" + +#: src/glade/psensor-pref.glade:291 +msgid "Background:" +msgstr "Arrière-plan:" + +#: src/glade/psensor-pref.glade:325 +msgid "Background opacity:" +msgstr "Opacité de l'arrière-plan :" + +#: src/glade/psensor-pref.glade:348 +msgid "Min" +msgstr "Min" + +#: src/glade/psensor-pref.glade:375 +msgid "Max" +msgstr "Max" + +#: src/glade/psensor-pref.glade:401 +msgid "Colors" +msgstr "Couleurs" + +#: src/glade/psensor-pref.glade:419 +msgid "Monitoring duration:" +msgstr "Durée de surveillance:" + +#: src/glade/psensor-pref.glade:457 +msgid "minute(s)" +msgstr "minutes(s)" + +#: src/glade/psensor-pref.glade:474 src/glade/psensor-pref.glade:626 +msgid "second(s)" +msgstr "seconde(s)" + +#: src/glade/psensor-pref.glade:510 +msgid "Update interval:" +msgstr "Intervalle de mise à jour:" + +#: src/glade/psensor-pref.glade:528 +msgid "Measures" +msgstr "Mesures" + +#: src/glade/psensor-pref.glade:564 src/glade/sensor-edit.glade:169 +#: src/ui_sensorlist.c:334 +msgid "Graph" +msgstr "Graphe" + +#: src/glade/psensor-pref.glade:588 +msgid "Measure update interval:" +msgstr "Intervalle de mise à jour des mesures:" + +#: src/glade/psensor-pref.glade:637 +msgid "Enable sensors logging" +msgstr "Activer la journalisation des capteurs" + +#: src/glade/psensor-pref.glade:684 +msgid "Sensors logging interval" +msgstr "Intervalle de journallisation des capteurs" + +#: src/glade/psensor-pref.glade:701 +msgid "seconds(s)" +msgstr "seconde(s)" + +#: src/glade/psensor-pref.glade:718 +msgid "Script executed when an alarm is raised" +msgstr "" + +#: src/glade/psensor-pref.glade:751 +msgid "Sensors" +msgstr "Capteurs" + +#: src/glade/sensor-edit.glade:19 +msgid "Edit Sensor Preferences" +msgstr "Préférences des capteurs" + +#: src/glade/sensor-edit.glade:87 +msgid "Name" +msgstr "Nom :" + +#: src/glade/sensor-edit.glade:138 +msgid "Type:" +msgstr "Type :" + +#: src/glade/sensor-edit.glade:153 src/glade/sensor-edit.glade:294 +#: src/glade/sensor-edit.glade:388 src/glade/sensor-edit.glade:459 +#: src/glade/sensor-edit.glade:508 src/lib/psensor.c:486 src/ui_notify.c:81 +msgid "N/A" +msgstr "N/A" + +#: src/glade/sensor-edit.glade:187 +msgid "Color:" +msgstr "Couleur:" + +#: src/glade/sensor-edit.glade:201 +msgid "Alarm" +msgstr "Alarme" + +#: src/glade/sensor-edit.glade:216 +msgid "Activate desktop notifications" +msgstr "Activer les notifications du bureau" + +#: src/glade/sensor-edit.glade:236 +msgid "Sensor Information" +msgstr "Informations du capteur" + +#: src/glade/sensor-edit.glade:249 +msgid "Draw sensor curve" +msgstr "Dessiner la courbe du capteur" + +#: src/glade/sensor-edit.glade:333 +msgid "High threshold:" +msgstr "Seuil supérieur:" + +#: src/glade/sensor-edit.glade:348 +msgid "Low threshold:" +msgstr "Seuil inférieur:" + +#: src/glade/sensor-edit.glade:409 +msgid "Ubuntu Application Indicator" +msgstr "Indicateur d'application d'Ubuntu" + +#: src/glade/sensor-edit.glade:424 +msgid "Display sensor in the Application Indicator menu" +msgstr "Afficher le capteur dans le menu de l'indicateur d'application" + +#: src/glade/sensor-edit.glade:444 +msgid "Chip:" +msgstr "Puce :" + +#: src/glade/sensor-edit.glade:489 +msgid "Id:" +msgstr "Id:" + +#: src/glade/sensor-edit.glade:523 +msgid "Details" +msgstr "Détails" + +#: src/glade/sensor-edit.glade:541 +msgid "Name:" +msgstr "Nom:" + +#: src/lib/amd.c:170 +msgid "AMD: cannot found ADL library." +msgstr "AMD: impossible de trouver la bibliothèque ADL." + +#: src/lib/amd.c:197 +msgid "AMD: missing ADL's API." +msgstr "AMD: L'interface de programmation ADL est manquante." + +#: src/lib/amd.c:207 +msgid "AMD: failed to initialize ADL." +msgstr "AMD: échec de l'initialisation d'ADL." + +#: src/lib/amd.c:213 +msgid "AMD: cannot get the number of adapters." +msgstr "AMD: impossible de récupérer le nombre d'adaptateurs." + +#: src/lib/amd.c:252 +#, c-format +msgid "Number of AMD/ATI adapters: %d" +msgstr "" + +#: src/lib/amd.c:253 +#, c-format +msgid "Number of active AMD/ATI adapters: %d" +msgstr "" + +#: src/lib/hdd_atasmart.c:152 +#, c-format +msgid "atasmart: sk_disk_open() failure: %s." +msgstr "atasmart: échec de sk_disk_open(): %s." + +#: src/lib/hdd_hddtemp.c:59 +msgid "hddtemp: failed to open socket." +msgstr "hddtemp: échec d'ouverture de l'interface de connexion." + +#: src/lib/hdd_hddtemp.c:72 +msgid "hddtemp: failed to open connection." +msgstr "hddtemp: échec de l'ouverture de la connexion." + +#: src/lib/hdd_hddtemp.c:186 src/lib/hdd_hddtemp.c:256 +#, c-format +msgid "hddtemp: wrong string: %s." +msgstr "hddtemp: mauvaise chaîne: %s." + +#: src/lib/lmsensor.c:42 +#, c-format +msgid "lmsensor: cannot get value of subfeature %s: %s." +msgstr "" +"lmsensor: impossible de récupérer la valeur de la sous-fonction %s: %s." + +#: src/lib/lmsensor.c:123 +msgid "lmsensor: lmsensor_psensor_create failure: wrong feature type." +msgstr "lmsensor: échec de lmsensor_psensor_create : mauvais type de fonction." + +#: src/lib/lmsensor.c:218 +#, c-format +msgid "lmsensor: initialization failure: %s." +msgstr "lmsensor: échec de l'initialisation: %s." + +#: src/lib/log.c:43 +#, c-format +msgid "Cannot open log file: %s" +msgstr "Impossible d'ouvrir le journal: %s" + +#: src/lib/nvidia.c:54 +msgid "" +"NVIDIA proprietary driver not used or cannot retrieve NVIDIA GPU temperature." +msgstr "Échec de la récupération des températures NVIDIA." + +#: src/lib/nvidia.c:97 +msgid "Cannot open connection to X11 server." +msgstr "Impossible d'ouvrir la connexion au serveur X11." + +#: src/lib/nvidia.c:105 +msgid "Failed to retrieve NVIDIA information." +msgstr "Échec de la récupération des information NVIDIA." + +#: src/lib/psensor.c:482 tests/test_psensor_type_to_unit_str.c:62 +msgid "RPM" +msgstr "Tr/min" + +#: src/lib/psensor.c:484 +msgid "%" +msgstr "%" + +#: src/lib/slog.c:68 +msgid "HOME variable not set." +msgstr "Variable home non définie." + +#: src/lib/slog.c:78 +msgid "Sensor log file already open." +msgstr "Le journal des capteurs est déjà ouvert." + +#: src/lib/slog.c:87 #, fuzzy, c-format +msgid "Cannot open sensor log file: %s." +msgstr "Ne peut ouvrir le journal : %s." + +#: src/lib/slog.c:118 +msgid "Sensor log file not open." +msgstr "Le journal des capteurs n'est pas ouvert." + +#: src/lib/slog.c:174 +msgid "Sensor log not open, cannot close." +msgstr "Le journal des capteurs n'est pas ouvert, il ne peut être fermé." + +#: src/main.c:77 +#, c-format msgid "" "Copyright (C) %s jeanfi@gmail.com\n" "License GPLv2: GNU GPL version 2 or later \n" -"Ceci est un logiciel libre, vous êtes libre de le modifier et de le \n" +"Ceci est un logiciel libre, vous êtes libre de le modifier et de le\n" "redistribuer.\n" -"Ce logiciel n'est accompagné d'ABSOLUMENT AUCUNE GARANTIE, dans les limites\n" -"autorisees par la loi applicable.\n" +"Ce logiciel n'est accompagné d’ABSOLUMENT AUCUNE GARANTIE, dans les limites\n" +"autorisées par la loi.\n" -#: src/main.c:88 src/server/server.c:86 +#: src/main.c:88 src/server/server.c:94 #, c-format msgid "Usage: %s [OPTION]...\n" msgstr "Utilisation: %s [OPTION]...\n" #: src/main.c:90 msgid "" -"psensor is a GTK application for monitoring hardware sensors, including " +"Psensor is a GTK+ application for monitoring hardware sensors, including " "temperatures and fan speeds." msgstr "" -"psensor est une application GTK pour surveiller les sondes matérielles " -"thermiques et les ventilateurs." +"Psensor est une application GTK+ pour surveiller les capteurs thermiques et " +"les vitesses de ventilateurs." #: src/main.c:94 msgid "Options:" @@ -58,183 +377,89 @@ msgstr "" " -h, --help afficher cette aide et quitter\n" " -v, --version afficher les informations de version et quitter" -#: src/main.c:100 +#: src/main.c:101 msgid "" -" -u, --url=URL the URL of the psensor-server, example: http://" -"hostname:3131" +" -u, --url=URL the URL of the psensor-server,\n" +" example: http://hostname:3131" msgstr "" " -u, --url=URL l'URL de psensor-server, example: http://hostname:3131" -#: src/main.c:105 -msgid " -d, --debug=LEVEL set the debug level, integer between 0 and 3" -msgstr "" - -#: src/main.c:110 src/server/server.c:104 -#, c-format -msgid "Report bugs to: %s\n" -msgstr "Signaler les bugs à: %s\n" - -#: src/main.c:112 src/server/server.c:106 -#, c-format -msgid "%s home page: <%s>\n" -msgstr "%s page d'acceuil: <%s>\n" - -#: src/main.c:425 -#, fuzzy -msgid "Enables debug mode." -msgstr "Activée" - -#: src/main.c:434 src/server/server.c:352 -#, c-format -msgid "Try `%s --help' for more information.\n" -msgstr "Essayez `%s --help' pour plus d'informations.\n" - -#: src/main.c:469 -#, c-format -msgid "ERROR: Not compiled with remote sensor support.\n" -msgstr "" -"ERREUR: Psensor n'a pas ete compilé avec le support de surveillance à " -"distance.\n" - -#: src/ui.c:80 -#, fuzzy -msgid "Psensor is a GTK+ application for monitoring hardware sensors" -msgstr "" -"psensor est une application GTK pour surveiller les sondes matérielles " -"thermiques et les ventilateurs." - -#: src/ui.c:83 +#: src/main.c:104 msgid "" -"Copyright(c) 2010-2012\n" -"jeanfi@gmail.com" +" --use-libatasmart use atasmart library for disk monitoring instead of\n" +" hddtemp daemon" msgstr "" +" --use-libatasmart utiliser la librairie atasmart pour la surveillance\n" +" des disks a la place du serveur hddtemp" -#: src/ui.c:86 -msgid "About Psensor" +#: src/main.c:107 +msgid " -n, --new-instance force the creation of a new Psensor application" msgstr "" +" -n, --new-instance forcer la création d'une nouvelle occurrence de " +"l'application Psensor" -#: src/ui.c:89 -msgid "Psensor Homepage" +#: src/main.c:110 +msgid " -d, --debug=LEVEL set the debug level, integer between 0 and 3" msgstr "" +" -d, --debug=LEVEL assigner le niveau de débogage, nombre entier entre 0 " +"et 3" -#: src/ui.c:144 -#, fuzzy -msgid "_Preferences" -msgstr "Configuration" - -#: src/ui.c:145 src/ui_sensorlist.c:200 -msgid "Preferences" -msgstr "Configuration" - -#: src/ui.c:149 -#, fuzzy -msgid "_Sensor Preferences" -msgstr "Editer La Configuration Des Sondes" - -#: src/ui.c:150 -#, fuzzy -msgid "Sensor Preferences" -msgstr "Editer La Configuration Des Sondes" - -#: src/ui.c:154 -#, fuzzy -msgid "_Quit" -msgstr "Quitter" +#: src/main.c:115 src/server/server.c:117 +#, c-format +msgid "Report bugs to: %s\n" +msgstr "Signaler les bogues à: %s\n" -#: src/ui.c:154 -msgid "Quit" -msgstr "Quitter" +#: src/main.c:117 src/server/server.c:119 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "%s page d’accueil: <%s>\n" -#: src/ui.c:160 -msgid "_About" +#: src/main.c:454 +msgid "Psensor has not been compiled with remote sensor support." msgstr "" +"Psensor n'a pas été compilé avec le support de surveillance à distance." -#: src/ui.c:161 -msgid "About" -msgstr "" +#: src/main.c:517 +msgid "Enables debug mode." +msgstr "Active le mode de débogage." -#: src/ui.c:183 src/ui_appindicator.c:176 +#: src/main.c:529 src/server/server.c:380 #, c-format -msgid "building menus failed: %s" -msgstr "" - -#: src/ui.c:231 -msgid "Psensor - Temperature Monitor" -msgstr "Psensor - Surveillance Des Temperatures" - -#: src/ui.c:248 -#, fuzzy, c-format -msgid "ERROR: Failed to load psensor icon.\n" -msgstr "ERREUR: Echec de l'initialisation de 'lm-sensors'\n" - -#: src/ui_sensorlist.c:231 -msgid "Select foreground color" -msgstr "Selectionner la couleur d'avant-plan" - -#: src/ui_sensorlist.c:308 src/glade/psensor-pref.glade:241 -msgid "Sensor" -msgstr "Sonde" - -#: src/ui_sensorlist.c:314 -msgid "Value" -msgstr "Valeur" - -#: src/ui_sensorlist.c:320 -msgid "Min" -msgstr "Min" - -#: src/ui_sensorlist.c:326 -msgid "Max" -msgstr "Max" - -#: src/ui_sensorlist.c:333 -msgid "Color" -msgstr "Couleur" - -#: src/ui_sensorlist.c:345 -msgid "Enabled" -msgstr "Activée" - -#: src/ui_sensorlist.c:374 src/ui_sensorlist.c:375 src/ui_sensorlist.c:376 -#: src/glade/sensor-edit.glade:87 src/glade/sensor-edit.glade:153 -msgid "N/A" -msgstr "N/A" - -#: src/ui_notify.c:45 -msgid "gettimeofday failed" -msgstr "" - -#: src/ui_notify.c:67 src/ui_notify.c:69 -msgid "Temperature alert" -msgstr "Alerte thermique" +msgid "Try `%s --help' for more information.\n" +msgstr "Essayez « %s --help » pour plus d'informations.\n" -#: src/ui_sensorpref.c:397 -#, fuzzy -msgid "Sensor Name" -msgstr "Sonde" +#: src/main.c:542 +msgid "A Psensor instance already exists." +msgstr "Une instance de Psensor existe déjà." #: src/rsensor.c:107 -#, fuzzy, c-format +#, c-format msgid "Fail to connect to: %s" -msgstr "ERREUR: Echer de la connectio à: %s\n" +msgstr "Échec de la connexion à: %s" #: src/rsensor.c:144 -#, fuzzy, c-format +#, c-format msgid "Invalid content: %s" -msgstr "ERREUR: Contenu invalide: %s\n" +msgstr "Contenu invalide: %s" #: src/rsensor.c:184 -#, fuzzy, c-format +#, c-format msgid "Invalid JSON: %s" -msgstr "ERREUR: Invalide JSON: %s\n" +msgstr "JSON invalide: %s" + +#: src/server/server.c:54 +msgid "

Server stop requested

" +msgstr "

L’arrêt du serveur a été demandé

" -#: src/server/server.c:53 +#: src/server/server.c:60 msgid "" "

Page not found - Go to Main page

" msgstr "" +"

Page introuvable - Allez à Main page

" -#: src/server/server.c:76 -#, fuzzy, c-format +#: src/server/server.c:84 +#, c-format msgid "" "Copyright (C) %s jeanfi@gmail.com\n" "License GPLv2: GNU GPL version 2 or later \n" "Ceci est un logiciel libre, vous êtes libre de le modifier et de le \n" "redistribuer.\n" "Ce logiciel n'est accompagné d'ABSOLUMENT AUCUNE GARANTIE, dans les limites\n" -"autorisees par la loi applicable.\n" +"autorisées par la loi.\n" -#: src/server/server.c:88 +#: src/server/server.c:96 msgid "" "psensor-server is an HTTP server for monitoring hardware sensors remotely." msgstr "" -"psensor-server est un serveur HTTP pour surveiller à distance les sondes " +"psensor-server est un serveur HTTP pour surveiller à distance les capteurs " "matérielles." -#: src/server/server.c:93 -#, fuzzy +#: src/server/server.c:101 msgid "" " -h, --help\t\tdisplay this help and exit\n" " -v, --version\t\tdisplay version information and exit" msgstr "" -" -h, --help afficher cette aide et quitter\n" -" -v, --version afficher les informations de version et quitter" +" -h, --help\t\tafficher cette aide et quitter\n" +" -v, --version\t\tafficher les informations de version et quitter" -#: src/server/server.c:98 -#, fuzzy +#: src/server/server.c:105 msgid "" -" -d,--debug\t\trun in debug mode\n" " -p,--port=PORT\twebserver port\n" " -w,--wdir=DIR\t\tdirectory containing webserver pages" msgstr "" -" -p,--port=PORT port du serveur Web\n" -" -w,--wdir=DIR répertoire contenant les pages du serveur Web" +" -p,--port=PORT\tport du serveur Web\n" +" -w,--wdir=DIR\t\trépertoire contenant les pages du serveur Web" -#: src/server/server.c:175 -msgid "

Server stop requested

" +#: src/server/server.c:109 +msgid " -d, --debug=LEVEL set the debug level, integer between 0 and 3" msgstr "" +" -d, --debug=LEVEL assigne le niveau de débogage, nombre entier entre 0 " +"et 3" -#: src/server/server.c:290 -#, c-format -msgid "HTTP Request: %s\n" -msgstr "Requete HTTP: %s\n" +#: src/server/server.c:111 +msgid " -l, --log-file=PATH set the log file to PATH" +msgstr " -l, --log-file=PATH assigner le chemin d’accès au journal" -#: src/server/server.c:366 -#, c-format -msgid "ERROR: no sensors detected\n" -msgstr "ERREUR: Aucune sonde detectee\n" +#: src/server/server.c:112 +msgid " --sensor-log-file=PATH set the sensor log file to PATH" +msgstr " --sensor-log-file=PATH assigne le journal du capteur vers PATH" -#: src/server/server.c:373 -#, c-format -msgid "ERROR: Fail to create web server\n" -msgstr "ERREUR: Echec de la creation du serveur Web\n" - -#: src/server/server.c:377 -#, fuzzy, c-format -msgid "Web server started on port: %d" -msgstr "Server Web demarre sur le port: %d\n" - -#: src/server/server.c:378 -#, fuzzy, c-format -msgid "WWW directory: %s" -msgstr "WWW repertoire: %s\n" - -#: src/server/server.c:379 -#, fuzzy, c-format -msgid "URL: http://localhost:%d" -msgstr "URL: http://localhost:%d\n" - -#: src/lib/amd.c:151 -#, c-format -msgid "ERROR: ADL library not found!\n" +#: src/server/server.c:113 +msgid " --sensor-log-interval=S set the sensor log interval to S (seconds)" msgstr "" +" --sensor-log-interval=S assigne l'intervalle de journalisation du capteur " +"à S (secondes)" -#: src/lib/amd.c:176 +#: src/server/server.c:297 #, c-format -msgid "ERROR: ADL's API is missing!\n" -msgstr "" - -#: src/lib/amd.c:185 -#, fuzzy, c-format -msgid "ERROR: ADL Initialization Error!\n" -msgstr "ERREUR: échec de l'initialisation nvidia\n" - -#: src/lib/amd.c:193 -#, fuzzy, c-format -msgid "ERROR: Cannot get the number of adapters!\n" -msgstr "" -"ERREUR: Impossible de récuperer la valeur de la sous-fonctionnalité %s: %s\n" +msgid "HTTP Request: %s" +msgstr "Requête HTTP: %s" -#: src/lib/hdd.c:58 -#, fuzzy, c-format -msgid "ERROR: hdd fetch, failed to open socket\n" -msgstr "ERREUR: hdd_fetch, écher d'ouverture de la socket\n" - -#: src/lib/hdd.c:72 -#, fuzzy, c-format -msgid "ERROR: hdd fetch, failed to open connection\n" -msgstr "ERREUR: hdd_fetch, écher de l'ouverture de la connection\n" - -#: src/lib/hdd.c:182 -#, c-format -msgid "ERROR: wrong hdd string: %s" -msgstr "ERREUR: mauvaise chaine hdd: %s" - -#: src/lib/hdd.c:252 -#, c-format -msgid "ERROR: wrong hdd string: %s\n" -msgstr "ERREUR: mauvaise chaine hdd: %s\n" - -#: src/lib/log.c:37 -#, c-format -msgid "Cannot open log file: %s" -msgstr "" - -#: src/lib/nvidia.c:54 +#: src/server/server.c:360 #, c-format -msgid "ERROR: failed to retrieve nvidia temperature\n" -msgstr "ERREUR: échec de la récupération des températures nvidia\n" +msgid "Enables debug mode: %d" +msgstr "Activation du mode de déboguage: %d" -#: src/lib/nvidia.c:91 -#, fuzzy, c-format -msgid "ERROR: Cannot open connection to X Server\n" -msgstr "ERREUR: Echer de la connectio à: %s\n" +#: src/server/server.c:402 +msgid "No sensors detected." +msgstr "Aucun capteur détecté." -#: src/lib/nvidia.c:99 -#, fuzzy, c-format -msgid "ERROR: Cannot retrieve NVidia information\n" -msgstr "ERREUR: échec de la récupération des températures nvidia\n" +#: src/server/server.c:409 +msgid "Failed to create Web server." +msgstr "Échec de la création du serveur Web." -#: src/lib/lmsensor.c:43 +#: src/server/server.c:413 #, c-format -msgid "ERROR: Can't get value of subfeature %s: %s\n" -msgstr "" -"ERREUR: Impossible de récuperer la valeur de la sous-fonctionnalité %s: %s\n" +msgid "Web server started on port: %d" +msgstr "Le serveur Web a été démarré sur le port: %d" -#: src/lib/lmsensor.c:125 +#: src/server/server.c:414 #, c-format -msgid "ERROR: create_sensor, wrong feature type\n" -msgstr "ERREUR: create_sensor, mauvais type de fonctionnalité\n" +msgid "WWW directory: %s" +msgstr "WWW répertoire: %s" -#: src/lib/lmsensor.c:208 +#: src/server/server.c:415 #, c-format -msgid "ERROR: lm-sensors initialization failure: %s\n" -msgstr "ERREUR: échec de l'initialisation de lm-sensors: %s\n" +msgid "URL: http://localhost:%d" +msgstr "URL: http://localhost:%d" -#: src/lib/psensor.c:430 -msgid "C" -msgstr "" +#: src/server/server.c:425 +msgid "Failed to activate logging of sensors." +msgstr "Échec de l'activation de la journalisation des capteurs." -#: src/lib/psensor.c:433 -msgid "RPM" +#: src/ui.c:84 +msgid "Psensor is a GTK+ application for monitoring hardware sensors" msgstr "" +"Psensor est une application GTK+ pour surveiller les capteurs thermiques et " +"les ventilateurs." -#: src/lib/psensor.c:436 -msgid "%" +#: src/ui.c:87 +msgid "" +"Copyright(c) 2010-2013\n" +"jeanfi@gmail.com" msgstr "" +"Copyright © 2010-2013\n" +"jeanfi@gmail.com" -#: src/glade/psensor-pref.glade:7 -msgid "Edit Preferences" -msgstr "Editer la configuration" - -#: src/glade/psensor-pref.glade:70 -msgid "Graph Colors" -msgstr "Couleurs du graphe" - -#: src/glade/psensor-pref.glade:86 -msgid "Foreground:" -msgstr "Avant-plan:" +#: src/ui.c:90 +msgid "About Psensor" +msgstr "À propos de Psensor" -#: src/glade/psensor-pref.glade:100 -msgid "Background:" -msgstr "Arrière-plan :" +#: src/ui.c:93 +msgid "Psensor Homepage" +msgstr "Site internet de Psensor" -#: src/glade/psensor-pref.glade:114 -msgid "Background opacity:" -msgstr "Opacité du fond:" +#: src/ui.c:217 +msgid "Failed to load Psensor icon." +msgstr "Échec du chargement de l’icône de Psensor." -#: src/glade/psensor-pref.glade:165 src/glade/sensor-edit.glade:184 -msgid "Graph" -msgstr "Graphe" +#: src/ui_sensorlist.c:245 +msgid "Select foreground color" +msgstr "Sélectionner la couleur d'avant-plan" -#: src/glade/psensor-pref.glade:183 -#, fuzzy -msgid "Update interval:" -msgstr "Interval de mise à jour du graphe:" +#: src/ui_sensorlist.c:297 +msgid "Sensor" +msgstr "Capteur" -#: src/glade/psensor-pref.glade:197 -#, fuzzy -msgid "Monitoring duration:" -msgstr "Durée de surveillance du graphe:" +#: src/ui_sensorlist.c:303 +msgid "Value" +msgstr "Valeur" -#: src/glade/psensor-pref.glade:210 src/glade/psensor-pref.glade:272 -msgid "second(s)" -msgstr "seconde(s)" +#: src/ui_sensorlist.c:309 +msgid "Min" +msgstr "Min" -#: src/glade/psensor-pref.glade:225 -msgid "minute(s)" -msgstr "minutes(s)" +#: src/ui_sensorlist.c:315 +msgid "Max" +msgstr "Max" -#: src/glade/psensor-pref.glade:259 -msgid "Measure update interval:" -msgstr "Interval de mise à jour des mesures:" +#: src/ui_sensorlist.c:322 +msgid "Color" +msgstr "Couleur" -#: src/glade/psensor-pref.glade:288 -msgid "Interface" -msgstr "Interface" +#: src/ui_appindicator.c:106 +msgid "_Show" +msgstr "_Afficher" -#: src/glade/psensor-pref.glade:306 -msgid "Position of sensors table:" -msgstr "Position de la table des sondes:" +#: src/ui_appindicator.c:107 +msgid "Show" +msgstr "Afficher" -#: src/glade/psensor-pref.glade:317 -msgid "Hide window decoration" -msgstr "Cacher les décorations de la fenêtre" +#: src/ui_appindicator.c:111 +msgid "_Preferences" +msgstr "_Préférences" -#: src/glade/psensor-pref.glade:335 -msgid "Keep window below" -msgstr "Garder la fenêtre en arrière-plan" +#: src/ui_appindicator.c:116 +msgid "S_ensor Preferences" +msgstr "Préférences des capteurs" -#: src/glade/psensor-pref.glade:436 -msgid "Min" -msgstr "Min" +#: src/ui_appindicator.c:118 +msgid "SensorPreferences" +msgstr "Configuration des capteurs" -#: src/glade/psensor-pref.glade:463 -msgid "Max" -msgstr "Max" +#: src/ui_appindicator.c:122 +msgid "_About" +msgstr "À _propos" -#: src/glade/psensor-pref.glade:483 -#, fuzzy -msgid "Enable menu" -msgstr "Activée" +#: src/ui_appindicator.c:129 +msgid "_Quit" +msgstr "_Quitter" -#: src/glade/psensor-pref.glade:500 -msgid "Enable Unity Launcher counter" -msgstr "Activer le compteur du lanceur de Unity" +#: src/ui_appindicator.c:220 +#, c-format +msgid "building menus failed: %s" +msgstr "La construction des menus a échouée: %s" -#: src/glade/psensor-pref.glade:518 -#, fuzzy -msgid "Hide window on startup" -msgstr "Cacher les décorations de la fenêtre" +#: src/ui_notify.c:48 +msgid "gettimeofday failed." +msgstr "Échec de gettimeofday." -#: src/glade/psensor-pref.glade:535 -msgid "Restore window position and size" -msgstr "" +#: src/ui_notify.c:77 +msgid "Temperature alert" +msgstr "Alerte thermique" -#: src/glade/sensor-edit.glade:8 -msgid "Edit Sensor Preferences" -msgstr "Editer La Configuration Des Sondes" +#: src/ui_notify.c:79 +msgid "Fan alert" +msgstr "Alerte ventilateur" -#: src/glade/sensor-edit.glade:104 -msgid "Name:" -msgstr "Nom:" +#: src/ui_sensorpref.c:248 +msgid "Unknown" +msgstr "Inconnu" -#: src/glade/sensor-edit.glade:139 -msgid "Type:" -msgstr "Type:" +#~ msgid "Sensor Name" +#~ msgstr "Nom de la Sonde" -#: src/glade/sensor-edit.glade:169 -msgid "Id:" -msgstr "Id:" +#~ msgid "Enabled" +#~ msgstr "Activé" -#: src/glade/sensor-edit.glade:202 #, fuzzy -msgid "Color:" -msgstr "Couleur:" - -#: src/glade/sensor-edit.glade:216 -msgid "Alarm" -msgstr "Alarme" - -#: src/glade/sensor-edit.glade:231 -msgid "Activate desktop notifications" -msgstr "Activer les notifications du bureau" - -#: src/glade/sensor-edit.glade:251 -msgid "Temperature limit:" -msgstr "Limite de température:" - -#: src/glade/sensor-edit.glade:266 -msgid "Sensor Information" -msgstr "Information sonde" - -#: src/glade/sensor-edit.glade:279 -msgid "Draw sensor curve" -msgstr "Dessiner la courbe de la sonde" - -#: src/glade/sensor-edit.glade:327 -msgid "°C" -msgstr "°C" - -#~ msgid "ERROR: failed gettimeofday\n" -#~ msgstr "ERREUR: échec gettimeofday\n" - -#~ msgid "Current" -#~ msgstr "Actuelle" - -#~ msgid "ERROR: failed to init lm-sensors\n" -#~ msgstr "ERREUR: Echec de l'initialisation de 'lm-sensors'\n" +#~ msgid "Enable log of measures" +#~ msgstr "Activer le menu" #, fuzzy -#~ msgid "ERROR: lmsensor init failure: %s\n" -#~ msgstr "ERREUR: Echec de l'initialisation de 'lm-sensors'\n" - -#~ msgid "LUATPL Error: failed to load Lua script: %s.\n" -#~ msgstr "LUATPL Erreur: échec du chargement du script LUA: %s.\n" - -#~ msgid "LUATPL Error: failed to call init function: %s.\n" -#~ msgstr "LUATPL Erreur: échec du lancement de la fonction init: %s.\n" +#~ msgid "slog_init: cannot open sensor log file: %s" +#~ msgstr "Impossible d'ouvrir le journal: %s" -#~ msgid "LUATPL Error:failed to execute Lua script (%s): %s.\n" -#~ msgstr "LUATP Erreur: échec de l'exécution du script Lua (%s): %s.\n" - -#~ msgid "LUATPL Error:lua script (%s) returned a wrong type.\n" -#~ msgstr "LUATPL Errur: le script Lua (%s) a retourné le mauvais type.\n" - -#~ msgid "LUATPL Error:failed to open lua state.\n" -#~ msgstr "LUATPL Errur: écher de creation du Lua state.\n" - -#~ msgid "LUATPL Error: code: %d.\n" -#~ msgstr "LUATPL Erreur: code: %d.\n" - -#~ msgid "ERROR: nvidia initialization failure: %d\n" -#~ msgstr "ERREUR: échec de l'initialisation nvidia: %d\n" - -#~ msgid "ERROR: no nvidia chips or initialization failure\n" -#~ msgstr "ERREUR: aucunes puces nvidia ou échec de l'initialisation\n" - -#~ msgid "Show" -#~ msgstr "Montrer" - -#~ msgid "Right" -#~ msgstr "Droite" - -#~ msgid "Left" -#~ msgstr "Gauche" - -#~ msgid "Top" -#~ msgstr "Haut" +#, fuzzy +#~ msgid "slog_init: gettimeofday failed." +#~ msgstr "Échec de gettimeofday." -#~ msgid "Bottom" -#~ msgstr "Bas" +#, fuzzy +#~ msgid "slog_write_sensors: gettimeofday failed." +#~ msgstr "Échec de gettimeofday." -#~ msgid "ERROR: Lua support not enabled\n" -#~ msgstr "ERREUR: Le support de Lua n'est pas activé\n" +#, fuzzy +#~ msgid "Enable indicator" +#~ msgstr "Activée" diff --git a/po/hu.gmo b/po/hu.gmo new file mode 100644 index 0000000..68e6bd6 Binary files /dev/null and b/po/hu.gmo differ diff --git a/po/hu.po b/po/hu.po new file mode 100644 index 0000000..2ad2ad6 --- /dev/null +++ b/po/hu.po @@ -0,0 +1,673 @@ +# Hungarian translation for psensor +# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012 +# This file is distributed under the same license as the psensor package. +# +# FIRST AUTHOR , 2012. +# Lukács Bence , 2012. +msgid "" +msgstr "" +"Project-Id-Version: psensor\n" +"Report-Msgid-Bugs-To: jeanfi@gmail.com\n" +"POT-Creation-Date: 2013-10-16 09:19+0200\n" +"PO-Revision-Date: 2012-10-29 09:41+0000\n" +"Last-Translator: Bence Lukács \n" +"Language-Team: Hungarian \n" +"Language: hu\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-01-21 09:32+0000\n" +"X-Generator: Launchpad (build 16430)\n" + +#: src/glade/psensor.glade:5 src/ui_appindicator.c:124 +msgid "About" +msgstr "Névjegy" + +#: src/glade/psensor.glade:9 src/ui_sensorlist.c:209 src/ui_appindicator.c:112 +msgid "Preferences" +msgstr "Beállítások" + +#: src/glade/psensor.glade:13 src/ui_appindicator.c:130 +msgid "Quit" +msgstr "Kilépés" + +#: src/glade/psensor.glade:17 +msgid "Sensor Preferences" +msgstr "Érzékelő beállításai" + +#: src/glade/psensor.glade:96 +msgid "Psensor - Temperature Monitor" +msgstr "Psensor - hőmérsékletfigyelő" + +#: src/glade/psensor.glade:111 +msgid "_Psensor" +msgstr "" + +#: src/glade/psensor.glade:158 +msgid "_Help" +msgstr "_Súgó" + +#: src/glade/psensor-pref.glade:7 +msgid "Edit Preferences" +msgstr "Beállítások szerkesztése" + +#: src/glade/psensor-pref.glade:72 +msgid "Position of sensors table:" +msgstr "Érzékelőtábla pozíciója:" + +#: src/glade/psensor-pref.glade:81 +msgid "Hide window decoration" +msgstr "Ablakdíszítés elrejtése" + +#: src/glade/psensor-pref.glade:98 +msgid "Keep window below" +msgstr "Ablak alul tartása" + +#: src/glade/psensor-pref.glade:115 +msgid "Enable menu" +msgstr "Menü engedélyezése" + +#: src/glade/psensor-pref.glade:132 +msgid "Enable Unity Launcher counter" +msgstr "Unity indítón lévő számláló engedélyezése" + +#: src/glade/psensor-pref.glade:149 +msgid "Hide window on startup" +msgstr "Ablak elrejtése induláskor" + +#: src/glade/psensor-pref.glade:166 +msgid "Restore window position and size" +msgstr "Ablak pozíciójának és méretének visszaállítása" + +#: src/glade/psensor-pref.glade:186 +msgid "Temperature unit:" +msgstr "Hőmérséklet mértékegysége:" + +#: src/glade/psensor-pref.glade:238 +msgid "Interface" +msgstr "Felület" + +#: src/glade/psensor-pref.glade:276 +msgid "Foreground:" +msgstr "Előtér:" + +#: src/glade/psensor-pref.glade:291 +msgid "Background:" +msgstr "Háttér:" + +#: src/glade/psensor-pref.glade:325 +msgid "Background opacity:" +msgstr "Háttér átlátszósága:" + +#: src/glade/psensor-pref.glade:348 +msgid "Min" +msgstr "Min" + +#: src/glade/psensor-pref.glade:375 +msgid "Max" +msgstr "Max" + +#: src/glade/psensor-pref.glade:401 +msgid "Colors" +msgstr "Színek" + +#: src/glade/psensor-pref.glade:419 +msgid "Monitoring duration:" +msgstr "Figyelés hossza:" + +#: src/glade/psensor-pref.glade:457 +msgid "minute(s)" +msgstr "perc" + +#: src/glade/psensor-pref.glade:474 src/glade/psensor-pref.glade:626 +msgid "second(s)" +msgstr "s" + +#: src/glade/psensor-pref.glade:510 +msgid "Update interval:" +msgstr "Frissítési időköz:" + +#: src/glade/psensor-pref.glade:528 +msgid "Measures" +msgstr "Mérések" + +#: src/glade/psensor-pref.glade:564 src/glade/sensor-edit.glade:169 +#: src/ui_sensorlist.c:334 +msgid "Graph" +msgstr "Grafikon" + +#: src/glade/psensor-pref.glade:588 +msgid "Measure update interval:" +msgstr "Mérések frissítési időköze:" + +#: src/glade/psensor-pref.glade:637 +msgid "Enable sensors logging" +msgstr "Érzékelők naplózásának engedélyezése" + +#: src/glade/psensor-pref.glade:684 +msgid "Sensors logging interval" +msgstr "Naplózás időköze" + +#: src/glade/psensor-pref.glade:701 +msgid "seconds(s)" +msgstr "másodperc(ek)" + +#: src/glade/psensor-pref.glade:718 +msgid "Script executed when an alarm is raised" +msgstr "" + +#: src/glade/psensor-pref.glade:751 +msgid "Sensors" +msgstr "Érzékelők" + +#: src/glade/sensor-edit.glade:19 +msgid "Edit Sensor Preferences" +msgstr "Érzékelő beállításainak szerkesztése" + +#: src/glade/sensor-edit.glade:87 +msgid "Name" +msgstr "" + +#: src/glade/sensor-edit.glade:138 +msgid "Type:" +msgstr "Típus:" + +#: src/glade/sensor-edit.glade:153 src/glade/sensor-edit.glade:294 +#: src/glade/sensor-edit.glade:388 src/glade/sensor-edit.glade:459 +#: src/glade/sensor-edit.glade:508 src/lib/psensor.c:486 src/ui_notify.c:81 +msgid "N/A" +msgstr "---" + +#: src/glade/sensor-edit.glade:187 +msgid "Color:" +msgstr "Szín:" + +#: src/glade/sensor-edit.glade:201 +msgid "Alarm" +msgstr "Riasztás" + +#: src/glade/sensor-edit.glade:216 +msgid "Activate desktop notifications" +msgstr "Asztali értesítések bekapcsolása" + +#: src/glade/sensor-edit.glade:236 +msgid "Sensor Information" +msgstr "Érzékelő információi" + +#: src/glade/sensor-edit.glade:249 +msgid "Draw sensor curve" +msgstr "Érzékelő görbéjének rajzolása" + +#: src/glade/sensor-edit.glade:333 +msgid "High threshold:" +msgstr "Felső küszöbérték:" + +#: src/glade/sensor-edit.glade:348 +msgid "Low threshold:" +msgstr "Alsó küszöbérték:" + +#: src/glade/sensor-edit.glade:409 +msgid "Ubuntu Application Indicator" +msgstr "Ubuntu Alkalmazásmenü" + +#: src/glade/sensor-edit.glade:424 +msgid "Display sensor in the Application Indicator menu" +msgstr "Érzékelők megjelenítése az alkalmazásmenüben" + +#: src/glade/sensor-edit.glade:444 +msgid "Chip:" +msgstr "Chip:" + +#: src/glade/sensor-edit.glade:489 +msgid "Id:" +msgstr "Id:" + +#: src/glade/sensor-edit.glade:523 +msgid "Details" +msgstr "Részletek" + +#: src/glade/sensor-edit.glade:541 +msgid "Name:" +msgstr "Név:" + +#: src/lib/amd.c:170 +msgid "AMD: cannot found ADL library." +msgstr "AMD: Nem sikerült betölteni az ADL programkönyvtárat." + +#: src/lib/amd.c:197 +msgid "AMD: missing ADL's API." +msgstr "AMD: hiányzó ADL API." + +#: src/lib/amd.c:207 +msgid "AMD: failed to initialize ADL." +msgstr "AMD: az ADL előkészítése meghiúsult." + +#: src/lib/amd.c:213 +msgid "AMD: cannot get the number of adapters." +msgstr "AMD: adapterek számainak lekérése meghiúsult" + +#: src/lib/amd.c:252 +#, c-format +msgid "Number of AMD/ATI adapters: %d" +msgstr "" + +#: src/lib/amd.c:253 +#, c-format +msgid "Number of active AMD/ATI adapters: %d" +msgstr "" + +#: src/lib/hdd_atasmart.c:152 +#, c-format +msgid "atasmart: sk_disk_open() failure: %s." +msgstr "atasmart: sk_disk_open() hiba: %s." + +#: src/lib/hdd_hddtemp.c:59 +msgid "hddtemp: failed to open socket." +msgstr "hddtemp: foglalat megnyitása meghiúsult." + +#: src/lib/hdd_hddtemp.c:72 +msgid "hddtemp: failed to open connection." +msgstr "hddtemp: a kapcsolat megnyitása nem sikerült." + +#: src/lib/hdd_hddtemp.c:186 src/lib/hdd_hddtemp.c:256 +#, c-format +msgid "hddtemp: wrong string: %s." +msgstr "hddtemp: rossz karakterlánc: %s." + +#: src/lib/lmsensor.c:42 +#, c-format +msgid "lmsensor: cannot get value of subfeature %s: %s." +msgstr "lmsensor: alfunkció értékének lekérdezése meghiúsult %s: %s." + +#: src/lib/lmsensor.c:123 +msgid "lmsensor: lmsensor_psensor_create failure: wrong feature type." +msgstr "lmsensor: lmsensor_psensor_create hiba: rossz funkciótípus." + +#: src/lib/lmsensor.c:218 +#, c-format +msgid "lmsensor: initialization failure: %s." +msgstr "lmsensor: előkészítési hiba: %s." + +#: src/lib/log.c:43 +#, c-format +msgid "Cannot open log file: %s" +msgstr "A naplófájl megnyitása sikertelen: %s" + +#: src/lib/nvidia.c:54 +msgid "" +"NVIDIA proprietary driver not used or cannot retrieve NVIDIA GPU temperature." +msgstr "" + +#: src/lib/nvidia.c:97 +msgid "Cannot open connection to X11 server." +msgstr "Nem lehet létrehozni a kapcsolatot az X11 kiszolgálóval." + +#: src/lib/nvidia.c:105 +msgid "Failed to retrieve NVIDIA information." +msgstr "NVIDIA információinak lekérése meghiúsult." + +#: src/lib/psensor.c:482 tests/test_psensor_type_to_unit_str.c:62 +msgid "RPM" +msgstr "RPM" + +#: src/lib/psensor.c:484 +msgid "%" +msgstr "%" + +#: src/lib/slog.c:68 +msgid "HOME variable not set." +msgstr "HOME változó nincs beállítva." + +#: src/lib/slog.c:78 +msgid "Sensor log file already open." +msgstr "Az érzékelő naplófájlja már meg van nyitva." + +#: src/lib/slog.c:87 +#, c-format +msgid "Cannot open sensor log file: %s." +msgstr "%s érzékelő naplófájlját nem lehet megnyitni" + +#: src/lib/slog.c:118 +msgid "Sensor log file not open." +msgstr "Az érzékelő naplófájlja nincs nyitva." + +#: src/lib/slog.c:174 +msgid "Sensor log not open, cannot close." +msgstr "Az érzékelő naplófájlja nincs nyitva, nem lehet bezárni." + +#: src/main.c:77 +#, c-format +msgid "" +"Copyright (C) %s jeanfi@gmail.com\n" +"License GPLv2: GNU GPL version 2 or later \n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +msgstr "" +"Copyright (C) %s jeanfi@gmail.com\n" +"Licenc: GNU General Public License második (vagy bármely későbbi) változata\n" +"\n" +"Ez egy szabad szoftver: szabadon terjesztheti és/vagy módosíthatja\n" +"NINCS GARANCIA, a jogszabályok által megengedett mértékben.\n" + +#: src/main.c:88 src/server/server.c:94 +#, c-format +msgid "Usage: %s [OPTION]...\n" +msgstr "Használat: %s [KAPCSOLÓK]...\n" + +#: src/main.c:90 +msgid "" +"Psensor is a GTK+ application for monitoring hardware sensors, including " +"temperatures and fan speeds." +msgstr "" +"A Psensor egy GTK+ alkalmazás a hardver érzékelőinek figyelésére, beleértve " +"a hőmérsékleteket és a ventilátor sebességét." + +#: src/main.c:94 +msgid "Options:" +msgstr "Kapcsolók:" + +#: src/main.c:95 +msgid "" +" -h, --help display this help and exit\n" +" -v, --version display version information and exit" +msgstr "" +" -h, --help ezen súgó megjelenítése, majd kilépés\n" +" -v, --version verzióinformációk megjelenítése, majd kilépés" + +#: src/main.c:101 +msgid "" +" -u, --url=URL the URL of the psensor-server,\n" +" example: http://hostname:3131" +msgstr "" +" -u, --url=URL a psensor-server URL-címe,\n" +" például: http://gepnev:3131" + +#: src/main.c:104 +msgid "" +" --use-libatasmart use atasmart library for disk monitoring instead of\n" +" hddtemp daemon" +msgstr "" +" --use-libatasmart atasmart függvénykönyvtár használata a lemezek " +"figyelésére a\n" +" hddtemp démon helyett" + +#: src/main.c:107 +msgid " -n, --new-instance force the creation of a new Psensor application" +msgstr " -n, --new-instance új Psensor alkalmazás indításának kényszerítése" + +#: src/main.c:110 +msgid " -d, --debug=LEVEL set the debug level, integer between 0 and 3" +msgstr "" +" -d, --debug=LEVEL hibakeresési szint beállítása, egész 0 és 3 között" + +#: src/main.c:115 src/server/server.c:117 +#, c-format +msgid "Report bugs to: %s\n" +msgstr "A talált hibákat itt jelentse be: %s\n" + +#: src/main.c:117 src/server/server.c:119 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "%s honlap: <%s>\n" + +#: src/main.c:454 +msgid "Psensor has not been compiled with remote sensor support." +msgstr "A Psensor távoli érzékelők támogatása nélkül lett lefordítva." + +#: src/main.c:517 +msgid "Enables debug mode." +msgstr "Hibakeresési mód engedélyezése." + +#: src/main.c:529 src/server/server.c:380 +#, c-format +msgid "Try `%s --help' for more information.\n" +msgstr "További információkért adja ki a „%s --help” parancsot.\n" + +#: src/main.c:542 +msgid "A Psensor instance already exists." +msgstr "A Psensors egy példánya már létezik." + +#: src/rsensor.c:107 +#, c-format +msgid "Fail to connect to: %s" +msgstr "Nem sikerül kapcsolódni a következőhöz: %s" + +#: src/rsensor.c:144 +#, c-format +msgid "Invalid content: %s" +msgstr "Érvénytelen tartalom: %s" + +#: src/rsensor.c:184 +#, c-format +msgid "Invalid JSON: %s" +msgstr "Érvénytelen JSON: %s" + +#: src/server/server.c:54 +msgid "

Server stop requested

" +msgstr "

A kiszolgáló leállítást kért

" + +#: src/server/server.c:60 +msgid "" +"

Page not found - Go to Main page

" +msgstr "" +"

Az oldal nem található - Ugrás a Főoldalra" + +#: src/server/server.c:84 +#, c-format +msgid "" +"Copyright (C) %s jeanfi@gmail.com\n" +"License GPLv2: GNU GPL version 2 or later \n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +msgstr "" +"Copyright (C) %s jeanfi@gmail.com\n" +"Licenc: GNU General Public License második (vagy bármely későbbi) változata\n" +"\n" +"Ez egy szabad szoftver: szabadon terjesztheti és/vagy módosíthatja\n" +"NINCS GARANCIA, a jogszabályok által megengedett mértékben.\n" + +#: src/server/server.c:96 +msgid "" +"psensor-server is an HTTP server for monitoring hardware sensors remotely." +msgstr "" +"A psensor-server egy HTTP kiszolgáló a hardver érzékelőinek figyelésére " +"távolról." + +#: src/server/server.c:101 +msgid "" +" -h, --help\t\tdisplay this help and exit\n" +" -v, --version\t\tdisplay version information and exit" +msgstr "" +" -h, --help\t\tezen súgó megjelenítése, majd kilépés\n" +" -v, --version\t\tverzióinformáció megjelenítése, majd kilépés" + +#: src/server/server.c:105 +msgid "" +" -p,--port=PORT\twebserver port\n" +" -w,--wdir=DIR\t\tdirectory containing webserver pages" +msgstr "" +" -p,--port=PORT\twebkiszolgáló portja\n" +" -w,--wdir=DIR\t\ta webkiszolgáló oldalait tartalmazó mappa" + +#: src/server/server.c:109 +msgid " -d, --debug=LEVEL set the debug level, integer between 0 and 3" +msgstr "" +" -d, --debug=LEVEL hibakeresési szint beállítása, egész 0 és 3 között" + +#: src/server/server.c:111 +msgid " -l, --log-file=PATH set the log file to PATH" +msgstr " -l, --log-file=ÚTVONAL a naplófájl ÚTVONALÁNAK beállítása" + +#: src/server/server.c:112 +msgid " --sensor-log-file=PATH set the sensor log file to PATH" +msgstr "" +" --sensor-log-file=ÚTVONAL érzékelők naplójának beállítása az ÚTVONALRA" + +#: src/server/server.c:113 +msgid " --sensor-log-interval=S set the sensor log interval to S (seconds)" +msgstr "" +" --sensor-log-interval=S érzékelő naplózási gyakoriságának beállítása S " +"másodpercre" + +#: src/server/server.c:297 +#, c-format +msgid "HTTP Request: %s" +msgstr "HTTP-kérés: %s" + +#: src/server/server.c:360 +#, c-format +msgid "Enables debug mode: %d" +msgstr "Hibakeresési mód engedélyezése: %d" + +#: src/server/server.c:402 +msgid "No sensors detected." +msgstr "Nem találhatók érzékelők." + +#: src/server/server.c:409 +msgid "Failed to create Web server." +msgstr "Nem sikerült létrehozni a webkiszolgálót." + +#: src/server/server.c:413 +#, c-format +msgid "Web server started on port: %d" +msgstr "A webkiszolgáló elindult ezen a porton: %d" + +#: src/server/server.c:414 +#, c-format +msgid "WWW directory: %s" +msgstr "WWW könyvtár: %s" + +#: src/server/server.c:415 +#, c-format +msgid "URL: http://localhost:%d" +msgstr "URL: http://localhost:%d" + +#: src/server/server.c:425 +msgid "Failed to activate logging of sensors." +msgstr "Érzékelők naplózásának aktiválása meghiúsult." + +#: src/ui.c:84 +msgid "Psensor is a GTK+ application for monitoring hardware sensors" +msgstr "A Psensor egy GTK+ alkalmazás a hardver érzékelőinek figyelésére" + +#: src/ui.c:87 +msgid "" +"Copyright(c) 2010-2013\n" +"jeanfi@gmail.com" +msgstr "" +"Copyright(c) 2010-2013\n" +"jeanfi@gmail.com" + +#: src/ui.c:90 +msgid "About Psensor" +msgstr "A Psensor névjegye" + +#: src/ui.c:93 +msgid "Psensor Homepage" +msgstr "A Psensor honlapja" + +#: src/ui.c:217 +msgid "Failed to load Psensor icon." +msgstr "Nem sikerült betölteni a Psensor ikont." + +#: src/ui_sensorlist.c:245 +msgid "Select foreground color" +msgstr "Előtérszín kiválasztása" + +#: src/ui_sensorlist.c:297 +msgid "Sensor" +msgstr "Érzékelő" + +#: src/ui_sensorlist.c:303 +msgid "Value" +msgstr "Érték" + +#: src/ui_sensorlist.c:309 +msgid "Min" +msgstr "Minimum" + +#: src/ui_sensorlist.c:315 +msgid "Max" +msgstr "Maximum" + +#: src/ui_sensorlist.c:322 +msgid "Color" +msgstr "Szín" + +#: src/ui_appindicator.c:106 +msgid "_Show" +msgstr "_Megjelenítés" + +#: src/ui_appindicator.c:107 +msgid "Show" +msgstr "Megjelenítés" + +#: src/ui_appindicator.c:111 +msgid "_Preferences" +msgstr "_Beállítások" + +#: src/ui_appindicator.c:116 +msgid "S_ensor Preferences" +msgstr "_Érzékelő beállításai" + +#: src/ui_appindicator.c:118 +msgid "SensorPreferences" +msgstr "Érzékelőbeállítások" + +#: src/ui_appindicator.c:122 +msgid "_About" +msgstr "_Névjegy" + +#: src/ui_appindicator.c:129 +msgid "_Quit" +msgstr "_Kilépés" + +#: src/ui_appindicator.c:220 +#, c-format +msgid "building menus failed: %s" +msgstr "menük építése meghiúsult: %s" + +#: src/ui_notify.c:48 +msgid "gettimeofday failed." +msgstr "gettimeofday meghiúsult." + +#: src/ui_notify.c:77 +msgid "Temperature alert" +msgstr "Hőmérséklet riasztás" + +#: src/ui_notify.c:79 +msgid "Fan alert" +msgstr "Ventilátor riasztás" + +#: src/ui_sensorpref.c:248 +msgid "Unknown" +msgstr "Ismeretlen" + +#~ msgid "Sensor Name" +#~ msgstr "Érzékelő neve" + +#~ msgid "Enabled" +#~ msgstr "Engedélyezés" + +#, fuzzy +#~ msgid "Enable log of measures" +#~ msgstr "Menü engedélyezése" + +#, fuzzy +#~ msgid "slog_init: cannot open sensor log file: %s" +#~ msgstr "A naplófájl megnyitása sikertelen: %s" + +#, fuzzy +#~ msgid "slog_init: gettimeofday failed." +#~ msgstr "gettimeofday meghiúsult." + +#, fuzzy +#~ msgid "slog_write_sensors: gettimeofday failed." +#~ msgstr "gettimeofday meghiúsult." + +#, fuzzy +#~ msgid "Enable indicator" +#~ msgstr "Engedélyezés" diff --git a/po/it.gmo b/po/it.gmo new file mode 100644 index 0000000..42928b4 Binary files /dev/null and b/po/it.gmo differ diff --git a/po/it.po b/po/it.po new file mode 100644 index 0000000..b6046d7 --- /dev/null +++ b/po/it.po @@ -0,0 +1,672 @@ +# Italian translations for psensor package. +# Copyright (C) 2012 Free Software Foundation, Inc. +# This file is distributed under the same license as the psensor package. +# , 2012. +# +msgid "" +msgstr "" +"Project-Id-Version: psensor 0.7.0.x\n" +"Report-Msgid-Bugs-To: jeanfi@gmail.com\n" +"POT-Creation-Date: 2013-10-16 09:19+0200\n" +"PO-Revision-Date: 2013-04-14 16:06+0000\n" +"Last-Translator: Diego Pierotto \n" +"Language-Team: Italian\n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-04-20 08:36+0000\n" +"X-Generator: Launchpad (build 16567)\n" + +#: src/glade/psensor.glade:5 src/ui_appindicator.c:124 +msgid "About" +msgstr "Informazioni su..." + +#: src/glade/psensor.glade:9 src/ui_sensorlist.c:209 src/ui_appindicator.c:112 +msgid "Preferences" +msgstr "Preferenze" + +#: src/glade/psensor.glade:13 src/ui_appindicator.c:130 +msgid "Quit" +msgstr "Esci" + +#: src/glade/psensor.glade:17 +msgid "Sensor Preferences" +msgstr "Sensor Preferenze" + +#: src/glade/psensor.glade:96 +msgid "Psensor - Temperature Monitor" +msgstr "Psensor - Monitor temperatura" + +#: src/glade/psensor.glade:111 +msgid "_Psensor" +msgstr "_Psensor" + +#: src/glade/psensor.glade:158 +msgid "_Help" +msgstr "_Aiuto" + +#: src/glade/psensor-pref.glade:7 +msgid "Edit Preferences" +msgstr "Modifica le preferenze" + +#: src/glade/psensor-pref.glade:72 +msgid "Position of sensors table:" +msgstr "Posizione della tabella dei sensori" + +#: src/glade/psensor-pref.glade:81 +msgid "Hide window decoration" +msgstr "Nascondi le decorazioni della finestra" + +#: src/glade/psensor-pref.glade:98 +msgid "Keep window below" +msgstr "Mantieni la finestra sotto" + +#: src/glade/psensor-pref.glade:115 +msgid "Enable menu" +msgstr "Abilita il menù" + +#: src/glade/psensor-pref.glade:132 +msgid "Enable Unity Launcher counter" +msgstr "Abilita contatore nel Launcher Unity" + +#: src/glade/psensor-pref.glade:149 +msgid "Hide window on startup" +msgstr "Nascondi la finestra all'avvio" + +#: src/glade/psensor-pref.glade:166 +msgid "Restore window position and size" +msgstr "Ripristina posizione e dimensione della finestra" + +#: src/glade/psensor-pref.glade:186 +msgid "Temperature unit:" +msgstr "Unità di misura della temperatura" + +#: src/glade/psensor-pref.glade:238 +msgid "Interface" +msgstr "Interfaccia" + +#: src/glade/psensor-pref.glade:276 +msgid "Foreground:" +msgstr "Primo piano:" + +#: src/glade/psensor-pref.glade:291 +msgid "Background:" +msgstr "Sfondo:" + +#: src/glade/psensor-pref.glade:325 +msgid "Background opacity:" +msgstr "Opacità dello sfondo:" + +#: src/glade/psensor-pref.glade:348 +msgid "Min" +msgstr "Minimo" + +#: src/glade/psensor-pref.glade:375 +msgid "Max" +msgstr "Massimo" + +#: src/glade/psensor-pref.glade:401 +msgid "Colors" +msgstr "Colori" + +#: src/glade/psensor-pref.glade:419 +msgid "Monitoring duration:" +msgstr "Durata del monitoraggio:" + +#: src/glade/psensor-pref.glade:457 +msgid "minute(s)" +msgstr "minuto/i" + +#: src/glade/psensor-pref.glade:474 src/glade/psensor-pref.glade:626 +msgid "second(s)" +msgstr "secondo/i" + +#: src/glade/psensor-pref.glade:510 +msgid "Update interval:" +msgstr "Intervallo di aggiornamento:" + +#: src/glade/psensor-pref.glade:528 +msgid "Measures" +msgstr "Misure" + +#: src/glade/psensor-pref.glade:564 src/glade/sensor-edit.glade:169 +#: src/ui_sensorlist.c:334 +msgid "Graph" +msgstr "Grafico" + +#: src/glade/psensor-pref.glade:588 +msgid "Measure update interval:" +msgstr "Intervallo di aggiornamento delle misure" + +#: src/glade/psensor-pref.glade:637 +msgid "Enable sensors logging" +msgstr "Abilita registrazione sensori" + +#: src/glade/psensor-pref.glade:684 +msgid "Sensors logging interval" +msgstr "Intervallo registrazione sensori" + +#: src/glade/psensor-pref.glade:701 +msgid "seconds(s)" +msgstr "secondo(i)" + +#: src/glade/psensor-pref.glade:718 +msgid "Script executed when an alarm is raised" +msgstr "" + +#: src/glade/psensor-pref.glade:751 +msgid "Sensors" +msgstr "Sensori" + +#: src/glade/sensor-edit.glade:19 +msgid "Edit Sensor Preferences" +msgstr "Modifica preferenze del sensore" + +#: src/glade/sensor-edit.glade:87 +msgid "Name" +msgstr "Nome" + +#: src/glade/sensor-edit.glade:138 +msgid "Type:" +msgstr "Tipo:" + +#: src/glade/sensor-edit.glade:153 src/glade/sensor-edit.glade:294 +#: src/glade/sensor-edit.glade:388 src/glade/sensor-edit.glade:459 +#: src/glade/sensor-edit.glade:508 src/lib/psensor.c:486 src/ui_notify.c:81 +msgid "N/A" +msgstr "N/A" + +#: src/glade/sensor-edit.glade:187 +msgid "Color:" +msgstr "Colore:" + +#: src/glade/sensor-edit.glade:201 +msgid "Alarm" +msgstr "Avviso" + +#: src/glade/sensor-edit.glade:216 +msgid "Activate desktop notifications" +msgstr "Attiva le notifiche sul desktop" + +#: src/glade/sensor-edit.glade:236 +msgid "Sensor Information" +msgstr "Informazioni sul Sensore" + +#: src/glade/sensor-edit.glade:249 +msgid "Draw sensor curve" +msgstr "Disegna curva" + +#: src/glade/sensor-edit.glade:333 +msgid "High threshold:" +msgstr "Soglia verso l'alto" + +#: src/glade/sensor-edit.glade:348 +msgid "Low threshold:" +msgstr "Soglia verso il basso" + +#: src/glade/sensor-edit.glade:409 +msgid "Ubuntu Application Indicator" +msgstr "Indicatore Applicazione Ubuntu" + +#: src/glade/sensor-edit.glade:424 +msgid "Display sensor in the Application Indicator menu" +msgstr "Mostra sensore nel menu indicatore Applicazione" + +#: src/glade/sensor-edit.glade:444 +msgid "Chip:" +msgstr "Processore:" + +#: src/glade/sensor-edit.glade:489 +msgid "Id:" +msgstr "Id:" + +#: src/glade/sensor-edit.glade:523 +msgid "Details" +msgstr "Dettagli" + +#: src/glade/sensor-edit.glade:541 +msgid "Name:" +msgstr "Nome:" + +#: src/lib/amd.c:170 +msgid "AMD: cannot found ADL library." +msgstr "AMD: impossibile trovare la libreria ADL" + +#: src/lib/amd.c:197 +msgid "AMD: missing ADL's API." +msgstr "AMD: impossibile trovare l'API di ADL" + +#: src/lib/amd.c:207 +msgid "AMD: failed to initialize ADL." +msgstr "AMD: impossibile inizializzare ADL" + +#: src/lib/amd.c:213 +msgid "AMD: cannot get the number of adapters." +msgstr "AMD: impossibile rilevare il numero di adattatori." + +#: src/lib/amd.c:252 +#, c-format +msgid "Number of AMD/ATI adapters: %d" +msgstr "" + +#: src/lib/amd.c:253 +#, c-format +msgid "Number of active AMD/ATI adapters: %d" +msgstr "" + +#: src/lib/hdd_atasmart.c:152 +#, c-format +msgid "atasmart: sk_disk_open() failure: %s." +msgstr "atasmart: errore sk_disk_open(): %s." + +#: src/lib/hdd_hddtemp.c:59 +msgid "hddtemp: failed to open socket." +msgstr "hddtemp: impossibile aprire il socket." + +#: src/lib/hdd_hddtemp.c:72 +msgid "hddtemp: failed to open connection." +msgstr "hddtemp: impossibile aprire la connessione." + +#: src/lib/hdd_hddtemp.c:186 src/lib/hdd_hddtemp.c:256 +#, c-format +msgid "hddtemp: wrong string: %s." +msgstr "hddtemp: errore di stringa: %s" + +#: src/lib/lmsensor.c:42 +#, c-format +msgid "lmsensor: cannot get value of subfeature %s: %s." +msgstr "lmsensor: impossibile rilevare il valore della sotto funzione %s: %s." + +#: src/lib/lmsensor.c:123 +msgid "lmsensor: lmsensor_psensor_create failure: wrong feature type." +msgstr "lmsensor: lmsensor_psensor_create fallito: tipo di funzione errata." + +#: src/lib/lmsensor.c:218 +#, c-format +msgid "lmsensor: initialization failure: %s." +msgstr "lmsensor: inizializzazione fallita: %s" + +#: src/lib/log.c:43 +#, c-format +msgid "Cannot open log file: %s" +msgstr "Impossibile aprire il file di log: %s" + +#: src/lib/nvidia.c:54 +msgid "" +"NVIDIA proprietary driver not used or cannot retrieve NVIDIA GPU temperature." +msgstr "" +"Driver proprietario NVIDIA non usato o impossibile rilevare la temperatura " +"della GPU NVIDIA." + +#: src/lib/nvidia.c:97 +msgid "Cannot open connection to X11 server." +msgstr "Impossibile connettersi al server X11." + +#: src/lib/nvidia.c:105 +msgid "Failed to retrieve NVIDIA information." +msgstr "Impossibile recuperare informazioni da NVIDIA" + +#: src/lib/psensor.c:482 tests/test_psensor_type_to_unit_str.c:62 +msgid "RPM" +msgstr "RPM" + +#: src/lib/psensor.c:484 +msgid "%" +msgstr "%" + +#: src/lib/slog.c:68 +msgid "HOME variable not set." +msgstr "Variabile HOME non impostata." + +#: src/lib/slog.c:78 +#, fuzzy +msgid "Sensor log file already open." +msgstr "File di registazione sensori già aperto." + +#: src/lib/slog.c:87 +#, fuzzy, c-format +msgid "Cannot open sensor log file: %s." +msgstr "Impossibile aprire il file di registrazione sensori: %s." + +#: src/lib/slog.c:118 +msgid "Sensor log file not open." +msgstr "File di registazione sensori non aperto." + +#: src/lib/slog.c:174 +msgid "Sensor log not open, cannot close." +msgstr "Registro sensori non aperto, impossibile chiuderlo." + +#: src/main.c:77 +#, c-format +msgid "" +"Copyright (C) %s jeanfi@gmail.com\n" +"License GPLv2: GNU GPL version 2 or later \n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +msgstr "" +"Copyright (C) %s jeanfi@gmail.com\n" +"Licenza GPLv2: GNU GPL versione 2 o successiva \n" +"Questo è software libero: sei libero di modificarlo e ridistribuirlo.\n" +"NON esiste GARANZIA, per gli scopi permessi dalla legge.\n" + +#: src/main.c:88 src/server/server.c:94 +#, c-format +msgid "Usage: %s [OPTION]...\n" +msgstr "Uso: %s [OPZIONE]...\n" + +#: src/main.c:90 +msgid "" +"Psensor is a GTK+ application for monitoring hardware sensors, including " +"temperatures and fan speeds." +msgstr "" +"Psensor è un'applicazione GTK+ per monitorare i sensori dell'hardware, " +"incluse temperature e velocità delle ventole." + +#: src/main.c:94 +msgid "Options:" +msgstr "Opzioni:" + +#: src/main.c:95 +msgid "" +" -h, --help display this help and exit\n" +" -v, --version display version information and exit" +msgstr "" +" -h, --help mostra questo help ed esce\n" +" -v, --version mostra le informazioni sulla versione ed esce" + +#: src/main.c:101 +msgid "" +" -u, --url=URL the URL of the psensor-server,\n" +" example: http://hostname:3131" +msgstr "" +" -u, --url=URL URL del server psensor,\n" +" esempio: http://hostname:3131" + +#: src/main.c:104 +msgid "" +" --use-libatasmart use atasmart library for disk monitoring instead of\n" +" hddtemp daemon" +msgstr "" +" --use-libatasmart usa la libreria atasmart library per il monitoraggio " +"dell'hard disk invece del \n" +" servizio hddtemp" + +#: src/main.c:107 +msgid " -n, --new-instance force the creation of a new Psensor application" +msgstr "" +" -n, --new-instance forza la creazione di una nuova applicazione Psensor" + +#: src/main.c:110 +msgid " -d, --debug=LEVEL set the debug level, integer between 0 and 3" +msgstr "" +" -d, --debug=LEVEL imposta il livello di debug, un intero compreso tra 0 e 3" + +#: src/main.c:115 src/server/server.c:117 +#, c-format +msgid "Report bugs to: %s\n" +msgstr "Segnalare i bug a: %s\n" + +#: src/main.c:117 src/server/server.c:119 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "%s home page: <%s>\n" + +#: src/main.c:454 +msgid "Psensor has not been compiled with remote sensor support." +msgstr "Psensor è stato compilato senza il supporto per sensori remoti." + +#: src/main.c:517 +msgid "Enables debug mode." +msgstr "Abilita la modalità debug." + +#: src/main.c:529 src/server/server.c:380 +#, c-format +msgid "Try `%s --help' for more information.\n" +msgstr "Usare '%s --help' per maggiori informazioni.\n" + +#: src/main.c:542 +msgid "A Psensor instance already exists." +msgstr "Esiste già un'istanza di Psensor" + +#: src/rsensor.c:107 +#, c-format +msgid "Fail to connect to: %s" +msgstr "Impossibile connettersi a: %s" + +#: src/rsensor.c:144 +#, c-format +msgid "Invalid content: %s" +msgstr "Conenuto non valido: %s" + +#: src/rsensor.c:184 +#, c-format +msgid "Invalid JSON: %s" +msgstr "JSON non valido: %s" + +#: src/server/server.c:54 +msgid "

Server stop requested

" +msgstr "

Arresto del server richiesto

" + +#: src/server/server.c:60 +msgid "" +"

Page not found - Go to Main page

" +msgstr "" +"

Pagina non trovata - Vai a Pagina principale" + +#: src/server/server.c:84 +#, c-format +msgid "" +"Copyright (C) %s jeanfi@gmail.com\n" +"License GPLv2: GNU GPL version 2 or later \n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +msgstr "" +"Copyright (C) %s jeanfi@gmail.com\n" +"Licenza GPLv2: GNU GPL versione 2 o successiva \n" +"Questo è software libero: sei libero di modificarlo e redistribuirlo.\n" +"NON esiste GARANZIA, per gli scopi permessi dalla legge.\n" + +#: src/server/server.c:96 +msgid "" +"psensor-server is an HTTP server for monitoring hardware sensors remotely." +msgstr "" +"psensor-server è un server HTTP per il monitoraggio remoto di sensori " +"hardware." + +#: src/server/server.c:101 +msgid "" +" -h, --help\t\tdisplay this help and exit\n" +" -v, --version\t\tdisplay version information and exit" +msgstr "" +" -h, --help\t\tmostra questo help ed esce\n" +" -v, --version\t\tmostra le informazioni sulla versione ed esce" + +#: src/server/server.c:105 +msgid "" +" -p,--port=PORT\twebserver port\n" +" -w,--wdir=DIR\t\tdirectory containing webserver pages" +msgstr "" +" -p,--port=PORT\tporta del server web\n" +" -w,--wdir=DIR\t\tdirectory che contiene le pagine web" + +#: src/server/server.c:109 +msgid " -d, --debug=LEVEL set the debug level, integer between 0 and 3" +msgstr "" +" -d, --debug=LEVEL imposta il livello di debug, un intero compreso tra 0 e 3" + +#: src/server/server.c:111 +msgid " -l, --log-file=PATH set the log file to PATH" +msgstr " -l, --log-file=PATH imposta il file di log su PATH" + +#: src/server/server.c:112 +msgid " --sensor-log-file=PATH set the sensor log file to PATH" +msgstr "" +" --sensor-log-file=PATH imposta il file di registro dei sensori come PATH" + +#: src/server/server.c:113 +msgid " --sensor-log-interval=S set the sensor log interval to S (seconds)" +msgstr "" +" --sensor-log-interval=S imposta l'intervallo del registro di sensori come " +"S (secondi)" + +#: src/server/server.c:297 +#, c-format +msgid "HTTP Request: %s" +msgstr "HTTP Request: %s" + +#: src/server/server.c:360 +#, c-format +msgid "Enables debug mode: %d" +msgstr "Abilita modalità di debug: %d" + +#: src/server/server.c:402 +msgid "No sensors detected." +msgstr "Nessun sensore rilevato." + +#: src/server/server.c:409 +msgid "Failed to create Web server." +msgstr "Impossibile creare il Web server." + +#: src/server/server.c:413 +#, c-format +msgid "Web server started on port: %d" +msgstr "Web server inizializzato sulla porta: %d" + +#: src/server/server.c:414 +#, c-format +msgid "WWW directory: %s" +msgstr "WWW directory: %s" + +#: src/server/server.c:415 +#, c-format +msgid "URL: http://localhost:%d" +msgstr "URL: http://localhost:%d" + +#: src/server/server.c:425 +msgid "Failed to activate logging of sensors." +msgstr "Attivazione registro dei sensori fallita." + +#: src/ui.c:84 +msgid "Psensor is a GTK+ application for monitoring hardware sensors" +msgstr "Psensor è un'applicazione GTK+ per monitorare i sensori hardware" + +#: src/ui.c:87 +msgid "" +"Copyright(c) 2010-2013\n" +"jeanfi@gmail.com" +msgstr "" +"Copyright(c) 2010-2013\n" +"jeanfi@gmail.com" + +#: src/ui.c:90 +msgid "About Psensor" +msgstr "Informazioni su Psensor" + +#: src/ui.c:93 +msgid "Psensor Homepage" +msgstr "Psensor Homepage" + +#: src/ui.c:217 +msgid "Failed to load Psensor icon." +msgstr "Impossibile caricare l'icona di Psensor." + +#: src/ui_sensorlist.c:245 +msgid "Select foreground color" +msgstr "Colore di primo piano:" + +#: src/ui_sensorlist.c:297 +msgid "Sensor" +msgstr "Sensore" + +#: src/ui_sensorlist.c:303 +msgid "Value" +msgstr "Valore" + +#: src/ui_sensorlist.c:309 +msgid "Min" +msgstr "Minimo" + +#: src/ui_sensorlist.c:315 +msgid "Max" +msgstr "Massimo" + +#: src/ui_sensorlist.c:322 +msgid "Color" +msgstr "Colore" + +#: src/ui_appindicator.c:106 +msgid "_Show" +msgstr "_Mostra" + +#: src/ui_appindicator.c:107 +msgid "Show" +msgstr "Mostra" + +#: src/ui_appindicator.c:111 +msgid "_Preferences" +msgstr "_Preferenze" + +#: src/ui_appindicator.c:116 +msgid "S_ensor Preferences" +msgstr "S_ensor Preferenze" + +#: src/ui_appindicator.c:118 +msgid "SensorPreferences" +msgstr "SensorPreferenze" + +#: src/ui_appindicator.c:122 +msgid "_About" +msgstr "_Informazioni" + +#: src/ui_appindicator.c:129 +msgid "_Quit" +msgstr "_Esci" + +#: src/ui_appindicator.c:220 +#, c-format +msgid "building menus failed: %s" +msgstr "costruzione dei menù fallita: %s" + +#: src/ui_notify.c:48 +msgid "gettimeofday failed." +msgstr "gettimeofday fallito." + +#: src/ui_notify.c:77 +msgid "Temperature alert" +msgstr "Allarme temperatura" + +#: src/ui_notify.c:79 +msgid "Fan alert" +msgstr "Allarme ventola" + +#: src/ui_sensorpref.c:248 +msgid "Unknown" +msgstr "Sconosciuto" + +#~ msgid "Sensor Name" +#~ msgstr "Nome sensore" + +#~ msgid "Enabled" +#~ msgstr "Abilitato" + +#, fuzzy +#~ msgid "Enable log of measures" +#~ msgstr "Abilita il menù" + +#, fuzzy +#~ msgid "slog_init: cannot open sensor log file: %s" +#~ msgstr "Impossibile aprire il file di log: %s" + +#, fuzzy +#~ msgid "slog_init: gettimeofday failed." +#~ msgstr "gettimeofday fallito." + +#, fuzzy +#~ msgid "slog_write_sensors: gettimeofday failed." +#~ msgstr "gettimeofday fallito." diff --git a/po/lv.gmo b/po/lv.gmo new file mode 100644 index 0000000..1f519e4 Binary files /dev/null and b/po/lv.gmo differ diff --git a/po/lv.po b/po/lv.po new file mode 100644 index 0000000..f8d2229 --- /dev/null +++ b/po/lv.po @@ -0,0 +1,646 @@ +# Latvian translation for psensor +# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012 +# This file is distributed under the same license as the psensor package. +# FIRST AUTHOR , 2012. +# +msgid "" +msgstr "" +"Project-Id-Version: psensor\n" +"Report-Msgid-Bugs-To: jeanfi@gmail.com\n" +"POT-Creation-Date: 2013-10-16 09:19+0200\n" +"PO-Revision-Date: 2013-05-01 09:48+0000\n" +"Last-Translator: tuxmaniack \n" +"Language-Team: Latvian \n" +"Language: lv\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-05-20 08:44+0000\n" +"X-Generator: Launchpad (build 16626)\n" + +#: src/glade/psensor.glade:5 src/ui_appindicator.c:124 +msgid "About" +msgstr "Par" + +#: src/glade/psensor.glade:9 src/ui_sensorlist.c:209 src/ui_appindicator.c:112 +msgid "Preferences" +msgstr "Iestatījumi" + +#: src/glade/psensor.glade:13 src/ui_appindicator.c:130 +msgid "Quit" +msgstr "Iziet" + +#: src/glade/psensor.glade:17 +msgid "Sensor Preferences" +msgstr "Sensoru iestatījumi" + +#: src/glade/psensor.glade:96 +msgid "Psensor - Temperature Monitor" +msgstr "Psensor - temperatūras pārraugs" + +#: src/glade/psensor.glade:111 +msgid "_Psensor" +msgstr "_Psensor" + +#: src/glade/psensor.glade:158 +msgid "_Help" +msgstr "_Palīdzība" + +#: src/glade/psensor-pref.glade:7 +msgid "Edit Preferences" +msgstr "Rediģēt iestatījumus" + +#: src/glade/psensor-pref.glade:72 +msgid "Position of sensors table:" +msgstr "Sensoru tabulas novietojums:" + +#: src/glade/psensor-pref.glade:81 +msgid "Hide window decoration" +msgstr "Slēpt loga apdari" + +#: src/glade/psensor-pref.glade:98 +msgid "Keep window below" +msgstr "Turēt logu apakšā" + +#: src/glade/psensor-pref.glade:115 +msgid "Enable menu" +msgstr "Aktivizēt izvēlni" + +#: src/glade/psensor-pref.glade:132 +msgid "Enable Unity Launcher counter" +msgstr "Aktivizēt Unity palaidēja skaitītāju" + +#: src/glade/psensor-pref.glade:149 +msgid "Hide window on startup" +msgstr "Slēpt logu pieteicoties sistēmā" + +#: src/glade/psensor-pref.glade:166 +msgid "Restore window position and size" +msgstr "Atjaunot loga pozīciju un izmēru" + +#: src/glade/psensor-pref.glade:186 +msgid "Temperature unit:" +msgstr "Temperatūras mērvienība:" + +#: src/glade/psensor-pref.glade:238 +msgid "Interface" +msgstr "Saskarne" + +#: src/glade/psensor-pref.glade:276 +msgid "Foreground:" +msgstr "Priekšplāns:" + +#: src/glade/psensor-pref.glade:291 +msgid "Background:" +msgstr "Fons:" + +#: src/glade/psensor-pref.glade:325 +msgid "Background opacity:" +msgstr "Fona necaurspīdība:" + +#: src/glade/psensor-pref.glade:348 +msgid "Min" +msgstr "Min." + +#: src/glade/psensor-pref.glade:375 +msgid "Max" +msgstr "Maks." + +#: src/glade/psensor-pref.glade:401 +msgid "Colors" +msgstr "Krāsas" + +#: src/glade/psensor-pref.glade:419 +msgid "Monitoring duration:" +msgstr "Pārraudzības ilgums:" + +#: src/glade/psensor-pref.glade:457 +msgid "minute(s)" +msgstr "minūte(s)" + +#: src/glade/psensor-pref.glade:474 src/glade/psensor-pref.glade:626 +msgid "second(s)" +msgstr "sekunde(s)" + +#: src/glade/psensor-pref.glade:510 +msgid "Update interval:" +msgstr "Atjaunināšanas intervāls:" + +#: src/glade/psensor-pref.glade:528 +msgid "Measures" +msgstr "Mērījumi" + +#: src/glade/psensor-pref.glade:564 src/glade/sensor-edit.glade:169 +#: src/ui_sensorlist.c:334 +msgid "Graph" +msgstr "Grafiks" + +#: src/glade/psensor-pref.glade:588 +msgid "Measure update interval:" +msgstr "Mērījumu atjaunināšanas intervāls:" + +#: src/glade/psensor-pref.glade:637 +msgid "Enable sensors logging" +msgstr "Aktivizēt sensora žurnalēšanu" + +#: src/glade/psensor-pref.glade:684 +msgid "Sensors logging interval" +msgstr "Sensoru žurnalēšanas intervāls" + +#: src/glade/psensor-pref.glade:701 +msgid "seconds(s)" +msgstr "sekunde(s)" + +#: src/glade/psensor-pref.glade:718 +msgid "Script executed when an alarm is raised" +msgstr "" + +#: src/glade/psensor-pref.glade:751 +msgid "Sensors" +msgstr "Sensori" + +#: src/glade/sensor-edit.glade:19 +msgid "Edit Sensor Preferences" +msgstr "Rediģēt sensoru iestatījumus" + +#: src/glade/sensor-edit.glade:87 +msgid "Name" +msgstr "Nosaukums" + +#: src/glade/sensor-edit.glade:138 +msgid "Type:" +msgstr "Tips:" + +#: src/glade/sensor-edit.glade:153 src/glade/sensor-edit.glade:294 +#: src/glade/sensor-edit.glade:388 src/glade/sensor-edit.glade:459 +#: src/glade/sensor-edit.glade:508 src/lib/psensor.c:486 src/ui_notify.c:81 +msgid "N/A" +msgstr "N/P" + +#: src/glade/sensor-edit.glade:187 +msgid "Color:" +msgstr "Krāsa:" + +#: src/glade/sensor-edit.glade:201 +msgid "Alarm" +msgstr "Trauksme" + +#: src/glade/sensor-edit.glade:216 +msgid "Activate desktop notifications" +msgstr "Aktivizēt darbvirsmas paziņojumus" + +#: src/glade/sensor-edit.glade:236 +msgid "Sensor Information" +msgstr "Sensora informācija" + +#: src/glade/sensor-edit.glade:249 +msgid "Draw sensor curve" +msgstr "Zīmēt sensora līkni" + +#: src/glade/sensor-edit.glade:333 +msgid "High threshold:" +msgstr "Augsts slieksnis:" + +#: src/glade/sensor-edit.glade:348 +msgid "Low threshold:" +msgstr "Zems slieksnis:" + +#: src/glade/sensor-edit.glade:409 +msgid "Ubuntu Application Indicator" +msgstr "Ubuntu aplikāciju indikators" + +#: src/glade/sensor-edit.glade:424 +msgid "Display sensor in the Application Indicator menu" +msgstr "Rādīt sensoru aplikāciju indikatora izvēlnē" + +#: src/glade/sensor-edit.glade:444 +msgid "Chip:" +msgstr "Mikroshēma:" + +#: src/glade/sensor-edit.glade:489 +msgid "Id:" +msgstr "Id:" + +#: src/glade/sensor-edit.glade:523 +msgid "Details" +msgstr "Detaļas" + +#: src/glade/sensor-edit.glade:541 +msgid "Name:" +msgstr "Nosaukums:" + +#: src/lib/amd.c:170 +msgid "AMD: cannot found ADL library." +msgstr "AMD: nevar atrast ADL bibliotēku." + +#: src/lib/amd.c:197 +msgid "AMD: missing ADL's API." +msgstr "AMD: trūkst ADL programmatūras saskarne." + +#: src/lib/amd.c:207 +msgid "AMD: failed to initialize ADL." +msgstr "AMD: neizdevās inicializēt ADL." + +#: src/lib/amd.c:213 +msgid "AMD: cannot get the number of adapters." +msgstr "AMD: nevar saņemt adapteru skaitu." + +#: src/lib/amd.c:252 +#, c-format +msgid "Number of AMD/ATI adapters: %d" +msgstr "" + +#: src/lib/amd.c:253 +#, c-format +msgid "Number of active AMD/ATI adapters: %d" +msgstr "" + +#: src/lib/hdd_atasmart.c:152 +#, c-format +msgid "atasmart: sk_disk_open() failure: %s." +msgstr "atasmart: sk_disk_open() atteice: %s." + +#: src/lib/hdd_hddtemp.c:59 +msgid "hddtemp: failed to open socket." +msgstr "hddtemp: neizdevās atvērt ligzdu." + +#: src/lib/hdd_hddtemp.c:72 +msgid "hddtemp: failed to open connection." +msgstr "hddtemp: neizdevās atvērt savienojumu." + +#: src/lib/hdd_hddtemp.c:186 src/lib/hdd_hddtemp.c:256 +#, c-format +msgid "hddtemp: wrong string: %s." +msgstr "hddtemp: nepareiza virkne: %s." + +#: src/lib/lmsensor.c:42 +#, c-format +msgid "lmsensor: cannot get value of subfeature %s: %s." +msgstr "lmsensor: nevar iegūt vērtību no apakšīpašības %s: %s." + +#: src/lib/lmsensor.c:123 +msgid "lmsensor: lmsensor_psensor_create failure: wrong feature type." +msgstr "lmsensor: lmsensor_psensor_create atteice: nepareis īpašības tips." + +#: src/lib/lmsensor.c:218 +#, c-format +msgid "lmsensor: initialization failure: %s." +msgstr "lmsensor: inicializācijas kļūda: %s." + +#: src/lib/log.c:43 +#, c-format +msgid "Cannot open log file: %s" +msgstr "Nevar atvērt žurnāla failu: %s" + +#: src/lib/nvidia.c:54 +msgid "" +"NVIDIA proprietary driver not used or cannot retrieve NVIDIA GPU temperature." +msgstr "" + +#: src/lib/nvidia.c:97 +msgid "Cannot open connection to X11 server." +msgstr "Nevar atvērt savienojumu ar X11 server." + +#: src/lib/nvidia.c:105 +msgid "Failed to retrieve NVIDIA information." +msgstr "Neizdevās saņemt NVIDIA informāciju." + +#: src/lib/psensor.c:482 tests/test_psensor_type_to_unit_str.c:62 +msgid "RPM" +msgstr "RPM" + +#: src/lib/psensor.c:484 +msgid "%" +msgstr "%" + +#: src/lib/slog.c:68 +msgid "HOME variable not set." +msgstr "HOME mainīgais nav iestatīts." + +#: src/lib/slog.c:78 +msgid "Sensor log file already open." +msgstr "Sensora žurnāla fails jau ir atvērts." + +#: src/lib/slog.c:87 +#, c-format +msgid "Cannot open sensor log file: %s." +msgstr "Nevar atvērt sensora žurnāla failu: %s." + +#: src/lib/slog.c:118 +msgid "Sensor log file not open." +msgstr "Sensora žurnāla fails nav atvērts." + +#: src/lib/slog.c:174 +msgid "Sensor log not open, cannot close." +msgstr "Sensora žurnāls nav atvērts, nevar aizvērt." + +#: src/main.c:77 +#, c-format +msgid "" +"Copyright (C) %s jeanfi@gmail.com\n" +"License GPLv2: GNU GPL version 2 or later \n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +msgstr "" + +#: src/main.c:88 src/server/server.c:94 +#, c-format +msgid "Usage: %s [OPTION]...\n" +msgstr "" + +#: src/main.c:90 +msgid "" +"Psensor is a GTK+ application for monitoring hardware sensors, including " +"temperatures and fan speeds." +msgstr "" +"Psensor ir GTK+ lietotne aparatūras sensoru pārraudzībai, ieskaitot " +"temperatūras un ventilatoru ātrumus." + +#: src/main.c:94 +msgid "Options:" +msgstr "Opcijas:" + +#: src/main.c:95 +msgid "" +" -h, --help display this help and exit\n" +" -v, --version display version information and exit" +msgstr "" +" -h, --help rādīt šo palīdzību un iziet\n" +" -v, --version rādīt versijas informāciju un iziet" + +#: src/main.c:101 +msgid "" +" -u, --url=URL the URL of the psensor-server,\n" +" example: http://hostname:3131" +msgstr "" +" -u, --url=SAITE psensor-server adrese,\n" +" piemērs: http://saimniekdatoravārds:3131" + +#: src/main.c:104 +msgid "" +" --use-libatasmart use atasmart library for disk monitoring instead of\n" +" hddtemp daemon" +msgstr "" +" --use-libatasmart izmantot atasmart bibliotēku disku pārraudzībai\n" +" hddtemp dēmona vietā" + +#: src/main.c:107 +msgid " -n, --new-instance force the creation of a new Psensor application" +msgstr " -n, --new-instance piespiest izveidot jaunu Psensor lietotni" + +#: src/main.c:110 +msgid " -d, --debug=LEVEL set the debug level, integer between 0 and 3" +msgstr " -d, --debug=LĪMENIS iestatīt atkļūdošanas līmeni, starp 0 un 3" + +#: src/main.c:115 src/server/server.c:117 +#, c-format +msgid "Report bugs to: %s\n" +msgstr "Ziņojiet kļūdas uz: %s.\n" + +#: src/main.c:117 src/server/server.c:119 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "%s mājas lapa: <%s>\n" + +#: src/main.c:454 +msgid "Psensor has not been compiled with remote sensor support." +msgstr "Psensor nav kompilēts ar attālināto sensoru atbalstu." + +#: src/main.c:517 +msgid "Enables debug mode." +msgstr "Aktivizēt atkļūdošanas režīmu." + +#: src/main.c:529 src/server/server.c:380 +#, c-format +msgid "Try `%s --help' for more information.\n" +msgstr "Mēģiniet `%s --help', lai iegūtu vairāk informācijas.\n" + +#: src/main.c:542 +msgid "A Psensor instance already exists." +msgstr "Psensor instance jau eksistē." + +#: src/rsensor.c:107 +#, c-format +msgid "Fail to connect to: %s" +msgstr "Neizdevās savienoties ar: %s" + +#: src/rsensor.c:144 +#, c-format +msgid "Invalid content: %s" +msgstr "Nederīgs saturs: %s" + +#: src/rsensor.c:184 +#, c-format +msgid "Invalid JSON: %s" +msgstr "Nederīgs JSON: %s" + +#: src/server/server.c:54 +msgid "

Server stop requested

" +msgstr "

Servera apturēšana pieprasīta

" + +#: src/server/server.c:60 +msgid "" +"

Page not found - Go to Main page

" +msgstr "" +"

Lapa nav atrasta - dodieties uz galveno lapu" + +#: src/server/server.c:84 +#, c-format +msgid "" +"Copyright (C) %s jeanfi@gmail.com\n" +"License GPLv2: GNU GPL version 2 or later \n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +msgstr "" + +#: src/server/server.c:96 +msgid "" +"psensor-server is an HTTP server for monitoring hardware sensors remotely." +msgstr "" +"psensor-server ir HTTP serveris aparatūras sensoru attālinātai pārraudzībai." + +#: src/server/server.c:101 +msgid "" +" -h, --help\t\tdisplay this help and exit\n" +" -v, --version\t\tdisplay version information and exit" +msgstr "" +" -h, --help\t\trādīt šo palīdzību un iziet\n" +" -v, --version\t\trādīt versijas informāciju un iziet" + +#: src/server/server.c:105 +msgid "" +" -p,--port=PORT\twebserver port\n" +" -w,--wdir=DIR\t\tdirectory containing webserver pages" +msgstr "" +" -p,--port=PORTS\ttīmekļa servera ports\n" +" -w,--wdir=DIR\t\tmape ar tīmekļa servera lapām" + +#: src/server/server.c:109 +msgid " -d, --debug=LEVEL set the debug level, integer between 0 and 3" +msgstr "" +" -d, --debug=LĪMENIS iestatīt atkļūdošanas līmeni, vesels skaitlis " +"starp 0 un 3" + +#: src/server/server.c:111 +msgid " -l, --log-file=PATH set the log file to PATH" +msgstr " -l, --log-file=CEĻŠ žurnalēšanas faila ceļš" + +#: src/server/server.c:112 +msgid " --sensor-log-file=PATH set the sensor log file to PATH" +msgstr " --sensor-log-file=CEĻŠ sensora žurnāla faila ceļš" + +#: src/server/server.c:113 +msgid " --sensor-log-interval=S set the sensor log interval to S (seconds)" +msgstr "" +" --sensor-log-interval=S iestata sensora žurnāla intervālu uz S (sekundēm)" + +#: src/server/server.c:297 +#, c-format +msgid "HTTP Request: %s" +msgstr "HTTP pieprasījums: %s" + +#: src/server/server.c:360 +#, c-format +msgid "Enables debug mode: %d" +msgstr "Aktivizē atkļūdošanas režīmu: %d" + +#: src/server/server.c:402 +msgid "No sensors detected." +msgstr "Sensori nav atklāti." + +#: src/server/server.c:409 +msgid "Failed to create Web server." +msgstr "Neizdevās izveidot tīmekļa serveri." + +#: src/server/server.c:413 +#, c-format +msgid "Web server started on port: %d" +msgstr "Tīmekļa serveris sākts uz porta: %d" + +#: src/server/server.c:414 +#, c-format +msgid "WWW directory: %s" +msgstr "WWW mape: %s" + +#: src/server/server.c:415 +#, c-format +msgid "URL: http://localhost:%d" +msgstr "Saite: http://localhost:%d" + +#: src/server/server.c:425 +msgid "Failed to activate logging of sensors." +msgstr "Neizdevās aktivizēt sensoru žurnalēšanu." + +#: src/ui.c:84 +msgid "Psensor is a GTK+ application for monitoring hardware sensors" +msgstr "Psensor ir GTK+ lietotne aparatūras sensoru pārraudzībai" + +#: src/ui.c:87 +msgid "" +"Copyright(c) 2010-2013\n" +"jeanfi@gmail.com" +msgstr "" +"Autortiesības(c) 2010-2013\n" +"jeanfi@gmail.com" + +#: src/ui.c:90 +msgid "About Psensor" +msgstr "Par Psensor" + +#: src/ui.c:93 +msgid "Psensor Homepage" +msgstr "Psensor mājas lapa" + +#: src/ui.c:217 +msgid "Failed to load Psensor icon." +msgstr "Neizdevās ielādēt Psensor ikonu." + +#: src/ui_sensorlist.c:245 +msgid "Select foreground color" +msgstr "Izvēlieties priekšplāna krāsu" + +#: src/ui_sensorlist.c:297 +msgid "Sensor" +msgstr "Sensors" + +#: src/ui_sensorlist.c:303 +msgid "Value" +msgstr "Vērtība" + +#: src/ui_sensorlist.c:309 +msgid "Min" +msgstr "Min." + +#: src/ui_sensorlist.c:315 +msgid "Max" +msgstr "Maks." + +#: src/ui_sensorlist.c:322 +msgid "Color" +msgstr "Krāsa" + +#: src/ui_appindicator.c:106 +msgid "_Show" +msgstr "_Rādīt" + +#: src/ui_appindicator.c:107 +msgid "Show" +msgstr "Rādīt" + +#: src/ui_appindicator.c:111 +msgid "_Preferences" +msgstr "_Iestatījumi" + +#: src/ui_appindicator.c:116 +msgid "S_ensor Preferences" +msgstr "S_ensoru iestatījumi" + +#: src/ui_appindicator.c:118 +msgid "SensorPreferences" +msgstr "SensoraIestatījumi" + +#: src/ui_appindicator.c:122 +msgid "_About" +msgstr "P_ar" + +#: src/ui_appindicator.c:129 +msgid "_Quit" +msgstr "_Iziet" + +#: src/ui_appindicator.c:220 +#, c-format +msgid "building menus failed: %s" +msgstr "neizdevās izveidot izvēlnes: %s" + +#: src/ui_notify.c:48 +msgid "gettimeofday failed." +msgstr "gettimeofday neizdevās." + +#: src/ui_notify.c:77 +msgid "Temperature alert" +msgstr "Temperatūras trauksme" + +#: src/ui_notify.c:79 +msgid "Fan alert" +msgstr "Ventilatora trauksme" + +#: src/ui_sensorpref.c:248 +msgid "Unknown" +msgstr "Nezināms" + +#~ msgid "Sensor Name" +#~ msgstr "Sensora nosaukums" + +#~ msgid "Enabled" +#~ msgstr "Aktivizēts" + +#, fuzzy +#~ msgid "Enable log of measures" +#~ msgstr "Aktivizēt izvēlni" + +#, fuzzy +#~ msgid "Enable indicator" +#~ msgstr "Aktivizēts" diff --git a/po/psensor.pot b/po/psensor.pot index fc1cf5e..3e17ba0 100644 --- a/po/psensor.pot +++ b/po/psensor.pot @@ -8,482 +8,604 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: jeanfi@gmail.com\n" -"POT-Creation-Date: 2012-03-26 10:30+0200\n" +"POT-Creation-Date: 2013-10-16 09:19+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" +"Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: src/main.c:77 -#, c-format -msgid "" -"Copyright (C) %s jeanfi@gmail.com\n" -"License GPLv2: GNU GPL version 2 or later \n" -"This is free software: you are free to change and redistribute it.\n" -"There is NO WARRANTY, to the extent permitted by law.\n" +#: src/glade/psensor.glade:5 src/ui_appindicator.c:124 +msgid "About" msgstr "" -#: src/main.c:88 src/server/server.c:86 -#, c-format -msgid "Usage: %s [OPTION]...\n" +#: src/glade/psensor.glade:9 src/ui_sensorlist.c:209 src/ui_appindicator.c:112 +msgid "Preferences" msgstr "" -#: src/main.c:90 -msgid "" -"psensor is a GTK application for monitoring hardware sensors, including " -"temperatures and fan speeds." +#: src/glade/psensor.glade:13 src/ui_appindicator.c:130 +msgid "Quit" msgstr "" -#: src/main.c:94 -msgid "Options:" +#: src/glade/psensor.glade:17 +msgid "Sensor Preferences" msgstr "" -#: src/main.c:95 -msgid "" -" -h, --help display this help and exit\n" -" -v, --version display version information and exit" +#: src/glade/psensor.glade:96 +msgid "Psensor - Temperature Monitor" msgstr "" -#: src/main.c:100 -msgid "" -" -u, --url=URL the URL of the psensor-server, example: http://" -"hostname:3131" +#: src/glade/psensor.glade:111 +msgid "_Psensor" msgstr "" -#: src/main.c:105 -msgid " -d, --debug=LEVEL set the debug level, integer between 0 and 3" +#: src/glade/psensor.glade:158 +msgid "_Help" msgstr "" -#: src/main.c:110 src/server/server.c:104 -#, c-format -msgid "Report bugs to: %s\n" +#: src/glade/psensor-pref.glade:7 +msgid "Edit Preferences" msgstr "" -#: src/main.c:112 src/server/server.c:106 -#, c-format -msgid "%s home page: <%s>\n" +#: src/glade/psensor-pref.glade:72 +msgid "Position of sensors table:" msgstr "" -#: src/main.c:425 -msgid "Enables debug mode." +#: src/glade/psensor-pref.glade:81 +msgid "Hide window decoration" msgstr "" -#: src/main.c:434 src/server/server.c:352 -#, c-format -msgid "Try `%s --help' for more information.\n" +#: src/glade/psensor-pref.glade:98 +msgid "Keep window below" msgstr "" -#: src/main.c:469 -#, c-format -msgid "ERROR: Not compiled with remote sensor support.\n" +#: src/glade/psensor-pref.glade:115 +msgid "Enable menu" msgstr "" -#: src/ui.c:80 -msgid "Psensor is a GTK+ application for monitoring hardware sensors" +#: src/glade/psensor-pref.glade:132 +msgid "Enable Unity Launcher counter" msgstr "" -#: src/ui.c:83 -msgid "" -"Copyright(c) 2010-2012\n" -"jeanfi@gmail.com" +#: src/glade/psensor-pref.glade:149 +msgid "Hide window on startup" msgstr "" -#: src/ui.c:86 -msgid "About Psensor" +#: src/glade/psensor-pref.glade:166 +msgid "Restore window position and size" msgstr "" -#: src/ui.c:89 -msgid "Psensor Homepage" +#: src/glade/psensor-pref.glade:186 +msgid "Temperature unit:" msgstr "" -#: src/ui.c:144 -msgid "_Preferences" +#: src/glade/psensor-pref.glade:238 +msgid "Interface" msgstr "" -#: src/ui.c:145 src/ui_sensorlist.c:200 -msgid "Preferences" +#: src/glade/psensor-pref.glade:276 +msgid "Foreground:" msgstr "" -#: src/ui.c:149 -msgid "_Sensor Preferences" +#: src/glade/psensor-pref.glade:291 +msgid "Background:" msgstr "" -#: src/ui.c:150 -msgid "Sensor Preferences" +#: src/glade/psensor-pref.glade:325 +msgid "Background opacity:" msgstr "" -#: src/ui.c:154 -msgid "_Quit" +#: src/glade/psensor-pref.glade:348 +msgid "Min" msgstr "" -#: src/ui.c:154 -msgid "Quit" +#: src/glade/psensor-pref.glade:375 +msgid "Max" msgstr "" -#: src/ui.c:160 -msgid "_About" +#: src/glade/psensor-pref.glade:401 +msgid "Colors" msgstr "" -#: src/ui.c:161 -msgid "About" +#: src/glade/psensor-pref.glade:419 +msgid "Monitoring duration:" msgstr "" -#: src/ui.c:183 src/ui_appindicator.c:176 -#, c-format -msgid "building menus failed: %s" +#: src/glade/psensor-pref.glade:457 +msgid "minute(s)" msgstr "" -#: src/ui.c:231 -msgid "Psensor - Temperature Monitor" +#: src/glade/psensor-pref.glade:474 src/glade/psensor-pref.glade:626 +msgid "second(s)" msgstr "" -#: src/ui.c:248 -#, c-format -msgid "ERROR: Failed to load psensor icon.\n" +#: src/glade/psensor-pref.glade:510 +msgid "Update interval:" msgstr "" -#: src/ui_sensorlist.c:231 -msgid "Select foreground color" +#: src/glade/psensor-pref.glade:528 +msgid "Measures" msgstr "" -#: src/ui_sensorlist.c:308 src/glade/psensor-pref.glade:241 -msgid "Sensor" +#: src/glade/psensor-pref.glade:564 src/glade/sensor-edit.glade:169 +#: src/ui_sensorlist.c:334 +msgid "Graph" msgstr "" -#: src/ui_sensorlist.c:314 -msgid "Value" +#: src/glade/psensor-pref.glade:588 +msgid "Measure update interval:" msgstr "" -#: src/ui_sensorlist.c:320 -msgid "Min" +#: src/glade/psensor-pref.glade:637 +msgid "Enable sensors logging" msgstr "" -#: src/ui_sensorlist.c:326 -msgid "Max" +#: src/glade/psensor-pref.glade:684 +msgid "Sensors logging interval" msgstr "" -#: src/ui_sensorlist.c:333 -msgid "Color" +#: src/glade/psensor-pref.glade:701 +msgid "seconds(s)" +msgstr "" + +#: src/glade/psensor-pref.glade:718 +msgid "Script executed when an alarm is raised" +msgstr "" + +#: src/glade/psensor-pref.glade:751 +msgid "Sensors" msgstr "" -#: src/ui_sensorlist.c:345 -msgid "Enabled" +#: src/glade/sensor-edit.glade:19 +msgid "Edit Sensor Preferences" msgstr "" -#: src/ui_sensorlist.c:374 src/ui_sensorlist.c:375 src/ui_sensorlist.c:376 -#: src/glade/sensor-edit.glade:87 src/glade/sensor-edit.glade:153 +#: src/glade/sensor-edit.glade:87 +msgid "Name" +msgstr "" + +#: src/glade/sensor-edit.glade:138 +msgid "Type:" +msgstr "" + +#: src/glade/sensor-edit.glade:153 src/glade/sensor-edit.glade:294 +#: src/glade/sensor-edit.glade:388 src/glade/sensor-edit.glade:459 +#: src/glade/sensor-edit.glade:508 src/lib/psensor.c:486 src/ui_notify.c:81 msgid "N/A" msgstr "" -#: src/ui_notify.c:45 -msgid "gettimeofday failed" +#: src/glade/sensor-edit.glade:187 +msgid "Color:" msgstr "" -#: src/ui_notify.c:67 src/ui_notify.c:69 -msgid "Temperature alert" +#: src/glade/sensor-edit.glade:201 +msgid "Alarm" msgstr "" -#: src/ui_sensorpref.c:397 -msgid "Sensor Name" +#: src/glade/sensor-edit.glade:216 +msgid "Activate desktop notifications" msgstr "" -#: src/rsensor.c:107 -#, c-format -msgid "Fail to connect to: %s" +#: src/glade/sensor-edit.glade:236 +msgid "Sensor Information" msgstr "" -#: src/rsensor.c:144 -#, c-format -msgid "Invalid content: %s" +#: src/glade/sensor-edit.glade:249 +msgid "Draw sensor curve" msgstr "" -#: src/rsensor.c:184 -#, c-format -msgid "Invalid JSON: %s" +#: src/glade/sensor-edit.glade:333 +msgid "High threshold:" msgstr "" -#: src/server/server.c:53 -msgid "" -"

Page not found - Go to Main page

" +#: src/glade/sensor-edit.glade:348 +msgid "Low threshold:" msgstr "" -#: src/server/server.c:76 -#, c-format -msgid "" -"Copyright (C) %s jeanfi@gmail.com\n" -"License GPLv2: GNU GPL version 2 or later \n" -"This is free software: you are free to change and redistribute it.\n" -"There is NO WARRANTY, to the extent permitted by law.\n" +#: src/glade/sensor-edit.glade:409 +msgid "Ubuntu Application Indicator" msgstr "" -#: src/server/server.c:88 -msgid "" -"psensor-server is an HTTP server for monitoring hardware sensors remotely." +#: src/glade/sensor-edit.glade:424 +msgid "Display sensor in the Application Indicator menu" msgstr "" -#: src/server/server.c:93 -msgid "" -" -h, --help\t\tdisplay this help and exit\n" -" -v, --version\t\tdisplay version information and exit" +#: src/glade/sensor-edit.glade:444 +msgid "Chip:" msgstr "" -#: src/server/server.c:98 -msgid "" -" -d,--debug\t\trun in debug mode\n" -" -p,--port=PORT\twebserver port\n" -" -w,--wdir=DIR\t\tdirectory containing webserver pages" +#: src/glade/sensor-edit.glade:489 +msgid "Id:" msgstr "" -#: src/server/server.c:175 -msgid "

Server stop requested

" +#: src/glade/sensor-edit.glade:523 +msgid "Details" msgstr "" -#: src/server/server.c:290 -#, c-format -msgid "HTTP Request: %s\n" +#: src/glade/sensor-edit.glade:541 +msgid "Name:" msgstr "" -#: src/server/server.c:366 -#, c-format -msgid "ERROR: no sensors detected\n" +#: src/lib/amd.c:170 +msgid "AMD: cannot found ADL library." msgstr "" -#: src/server/server.c:373 -#, c-format -msgid "ERROR: Fail to create web server\n" +#: src/lib/amd.c:197 +msgid "AMD: missing ADL's API." msgstr "" -#: src/server/server.c:377 -#, c-format -msgid "Web server started on port: %d" +#: src/lib/amd.c:207 +msgid "AMD: failed to initialize ADL." +msgstr "" + +#: src/lib/amd.c:213 +msgid "AMD: cannot get the number of adapters." msgstr "" -#: src/server/server.c:378 +#: src/lib/amd.c:252 #, c-format -msgid "WWW directory: %s" +msgid "Number of AMD/ATI adapters: %d" msgstr "" -#: src/server/server.c:379 +#: src/lib/amd.c:253 #, c-format -msgid "URL: http://localhost:%d" +msgid "Number of active AMD/ATI adapters: %d" msgstr "" -#: src/lib/amd.c:151 +#: src/lib/hdd_atasmart.c:152 #, c-format -msgid "ERROR: ADL library not found!\n" +msgid "atasmart: sk_disk_open() failure: %s." +msgstr "" + +#: src/lib/hdd_hddtemp.c:59 +msgid "hddtemp: failed to open socket." +msgstr "" + +#: src/lib/hdd_hddtemp.c:72 +msgid "hddtemp: failed to open connection." msgstr "" -#: src/lib/amd.c:176 +#: src/lib/hdd_hddtemp.c:186 src/lib/hdd_hddtemp.c:256 #, c-format -msgid "ERROR: ADL's API is missing!\n" +msgid "hddtemp: wrong string: %s." msgstr "" -#: src/lib/amd.c:185 +#: src/lib/lmsensor.c:42 #, c-format -msgid "ERROR: ADL Initialization Error!\n" +msgid "lmsensor: cannot get value of subfeature %s: %s." msgstr "" -#: src/lib/amd.c:193 +#: src/lib/lmsensor.c:123 +msgid "lmsensor: lmsensor_psensor_create failure: wrong feature type." +msgstr "" + +#: src/lib/lmsensor.c:218 #, c-format -msgid "ERROR: Cannot get the number of adapters!\n" +msgid "lmsensor: initialization failure: %s." msgstr "" -#: src/lib/hdd.c:58 +#: src/lib/log.c:43 #, c-format -msgid "ERROR: hdd fetch, failed to open socket\n" +msgid "Cannot open log file: %s" +msgstr "" + +#: src/lib/nvidia.c:54 +msgid "" +"NVIDIA proprietary driver not used or cannot retrieve NVIDIA GPU temperature." +msgstr "" + +#: src/lib/nvidia.c:97 +msgid "Cannot open connection to X11 server." +msgstr "" + +#: src/lib/nvidia.c:105 +msgid "Failed to retrieve NVIDIA information." +msgstr "" + +#: src/lib/psensor.c:482 tests/test_psensor_type_to_unit_str.c:62 +msgid "RPM" +msgstr "" + +#: src/lib/psensor.c:484 +msgid "%" +msgstr "" + +#: src/lib/slog.c:68 +msgid "HOME variable not set." +msgstr "" + +#: src/lib/slog.c:78 +msgid "Sensor log file already open." msgstr "" -#: src/lib/hdd.c:72 +#: src/lib/slog.c:87 #, c-format -msgid "ERROR: hdd fetch, failed to open connection\n" +msgid "Cannot open sensor log file: %s." +msgstr "" + +#: src/lib/slog.c:118 +msgid "Sensor log file not open." msgstr "" -#: src/lib/hdd.c:182 +#: src/lib/slog.c:174 +msgid "Sensor log not open, cannot close." +msgstr "" + +#: src/main.c:77 #, c-format -msgid "ERROR: wrong hdd string: %s" +msgid "" +"Copyright (C) %s jeanfi@gmail.com\n" +"License GPLv2: GNU GPL version 2 or later \n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" msgstr "" -#: src/lib/hdd.c:252 +#: src/main.c:88 src/server/server.c:94 #, c-format -msgid "ERROR: wrong hdd string: %s\n" +msgid "Usage: %s [OPTION]...\n" +msgstr "" + +#: src/main.c:90 +msgid "" +"Psensor is a GTK+ application for monitoring hardware sensors, including " +"temperatures and fan speeds." +msgstr "" + +#: src/main.c:94 +msgid "Options:" +msgstr "" + +#: src/main.c:95 +msgid "" +" -h, --help display this help and exit\n" +" -v, --version display version information and exit" +msgstr "" + +#: src/main.c:101 +msgid "" +" -u, --url=URL the URL of the psensor-server,\n" +" example: http://hostname:3131" msgstr "" -#: src/lib/log.c:37 +#: src/main.c:104 +msgid "" +" --use-libatasmart use atasmart library for disk monitoring instead of\n" +" hddtemp daemon" +msgstr "" + +#: src/main.c:107 +msgid " -n, --new-instance force the creation of a new Psensor application" +msgstr "" + +#: src/main.c:110 +msgid " -d, --debug=LEVEL set the debug level, integer between 0 and 3" +msgstr "" + +#: src/main.c:115 src/server/server.c:117 #, c-format -msgid "Cannot open log file: %s" +msgid "Report bugs to: %s\n" msgstr "" -#: src/lib/nvidia.c:54 +#: src/main.c:117 src/server/server.c:119 #, c-format -msgid "ERROR: failed to retrieve nvidia temperature\n" +msgid "%s home page: <%s>\n" msgstr "" -#: src/lib/nvidia.c:91 +#: src/main.c:454 +msgid "Psensor has not been compiled with remote sensor support." +msgstr "" + +#: src/main.c:517 +msgid "Enables debug mode." +msgstr "" + +#: src/main.c:529 src/server/server.c:380 #, c-format -msgid "ERROR: Cannot open connection to X Server\n" +msgid "Try `%s --help' for more information.\n" msgstr "" -#: src/lib/nvidia.c:99 +#: src/main.c:542 +msgid "A Psensor instance already exists." +msgstr "" + +#: src/rsensor.c:107 #, c-format -msgid "ERROR: Cannot retrieve NVidia information\n" +msgid "Fail to connect to: %s" msgstr "" -#: src/lib/lmsensor.c:43 +#: src/rsensor.c:144 #, c-format -msgid "ERROR: Can't get value of subfeature %s: %s\n" +msgid "Invalid content: %s" msgstr "" -#: src/lib/lmsensor.c:125 +#: src/rsensor.c:184 #, c-format -msgid "ERROR: create_sensor, wrong feature type\n" +msgid "Invalid JSON: %s" +msgstr "" + +#: src/server/server.c:54 +msgid "

Server stop requested

" +msgstr "" + +#: src/server/server.c:60 +msgid "" +"

Page not found - Go to Main page

" msgstr "" -#: src/lib/lmsensor.c:208 +#: src/server/server.c:84 #, c-format -msgid "ERROR: lm-sensors initialization failure: %s\n" +msgid "" +"Copyright (C) %s jeanfi@gmail.com\n" +"License GPLv2: GNU GPL version 2 or later \n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" msgstr "" -#: src/lib/psensor.c:430 -msgid "C" +#: src/server/server.c:96 +msgid "" +"psensor-server is an HTTP server for monitoring hardware sensors remotely." msgstr "" -#: src/lib/psensor.c:433 -msgid "RPM" +#: src/server/server.c:101 +msgid "" +" -h, --help\t\tdisplay this help and exit\n" +" -v, --version\t\tdisplay version information and exit" msgstr "" -#: src/lib/psensor.c:436 -msgid "%" +#: src/server/server.c:105 +msgid "" +" -p,--port=PORT\twebserver port\n" +" -w,--wdir=DIR\t\tdirectory containing webserver pages" msgstr "" -#: src/glade/psensor-pref.glade:7 -msgid "Edit Preferences" +#: src/server/server.c:109 +msgid " -d, --debug=LEVEL set the debug level, integer between 0 and 3" msgstr "" -#: src/glade/psensor-pref.glade:70 -msgid "Graph Colors" +#: src/server/server.c:111 +msgid " -l, --log-file=PATH set the log file to PATH" msgstr "" -#: src/glade/psensor-pref.glade:86 -msgid "Foreground:" +#: src/server/server.c:112 +msgid " --sensor-log-file=PATH set the sensor log file to PATH" msgstr "" -#: src/glade/psensor-pref.glade:100 -msgid "Background:" +#: src/server/server.c:113 +msgid " --sensor-log-interval=S set the sensor log interval to S (seconds)" msgstr "" -#: src/glade/psensor-pref.glade:114 -msgid "Background opacity:" +#: src/server/server.c:297 +#, c-format +msgid "HTTP Request: %s" msgstr "" -#: src/glade/psensor-pref.glade:165 src/glade/sensor-edit.glade:184 -msgid "Graph" +#: src/server/server.c:360 +#, c-format +msgid "Enables debug mode: %d" msgstr "" -#: src/glade/psensor-pref.glade:183 -msgid "Update interval:" +#: src/server/server.c:402 +msgid "No sensors detected." msgstr "" -#: src/glade/psensor-pref.glade:197 -msgid "Monitoring duration:" +#: src/server/server.c:409 +msgid "Failed to create Web server." msgstr "" -#: src/glade/psensor-pref.glade:210 src/glade/psensor-pref.glade:272 -msgid "second(s)" +#: src/server/server.c:413 +#, c-format +msgid "Web server started on port: %d" msgstr "" -#: src/glade/psensor-pref.glade:225 -msgid "minute(s)" +#: src/server/server.c:414 +#, c-format +msgid "WWW directory: %s" msgstr "" -#: src/glade/psensor-pref.glade:259 -msgid "Measure update interval:" +#: src/server/server.c:415 +#, c-format +msgid "URL: http://localhost:%d" msgstr "" -#: src/glade/psensor-pref.glade:288 -msgid "Interface" +#: src/server/server.c:425 +msgid "Failed to activate logging of sensors." msgstr "" -#: src/glade/psensor-pref.glade:306 -msgid "Position of sensors table:" +#: src/ui.c:84 +msgid "Psensor is a GTK+ application for monitoring hardware sensors" msgstr "" -#: src/glade/psensor-pref.glade:317 -msgid "Hide window decoration" +#: src/ui.c:87 +msgid "" +"Copyright(c) 2010-2013\n" +"jeanfi@gmail.com" msgstr "" -#: src/glade/psensor-pref.glade:335 -msgid "Keep window below" +#: src/ui.c:90 +msgid "About Psensor" msgstr "" -#: src/glade/psensor-pref.glade:436 -msgid "Min" +#: src/ui.c:93 +msgid "Psensor Homepage" msgstr "" -#: src/glade/psensor-pref.glade:463 -msgid "Max" +#: src/ui.c:217 +msgid "Failed to load Psensor icon." msgstr "" -#: src/glade/psensor-pref.glade:483 -msgid "Enable menu" +#: src/ui_sensorlist.c:245 +msgid "Select foreground color" msgstr "" -#: src/glade/psensor-pref.glade:500 -msgid "Enable Unity Launcher counter" +#: src/ui_sensorlist.c:297 +msgid "Sensor" msgstr "" -#: src/glade/psensor-pref.glade:518 -msgid "Hide window on startup" +#: src/ui_sensorlist.c:303 +msgid "Value" msgstr "" -#: src/glade/psensor-pref.glade:535 -msgid "Restore window position and size" +#: src/ui_sensorlist.c:309 +msgid "Min" msgstr "" -#: src/glade/sensor-edit.glade:8 -msgid "Edit Sensor Preferences" +#: src/ui_sensorlist.c:315 +msgid "Max" msgstr "" -#: src/glade/sensor-edit.glade:104 -msgid "Name:" +#: src/ui_sensorlist.c:322 +msgid "Color" msgstr "" -#: src/glade/sensor-edit.glade:139 -msgid "Type:" +#: src/ui_appindicator.c:106 +msgid "_Show" msgstr "" -#: src/glade/sensor-edit.glade:169 -msgid "Id:" +#: src/ui_appindicator.c:107 +msgid "Show" msgstr "" -#: src/glade/sensor-edit.glade:202 -msgid "Color:" +#: src/ui_appindicator.c:111 +msgid "_Preferences" msgstr "" -#: src/glade/sensor-edit.glade:216 -msgid "Alarm" +#: src/ui_appindicator.c:116 +msgid "S_ensor Preferences" msgstr "" -#: src/glade/sensor-edit.glade:231 -msgid "Activate desktop notifications" +#: src/ui_appindicator.c:118 +msgid "SensorPreferences" msgstr "" -#: src/glade/sensor-edit.glade:251 -msgid "Temperature limit:" +#: src/ui_appindicator.c:122 +msgid "_About" msgstr "" -#: src/glade/sensor-edit.glade:266 -msgid "Sensor Information" +#: src/ui_appindicator.c:129 +msgid "_Quit" msgstr "" -#: src/glade/sensor-edit.glade:279 -msgid "Draw sensor curve" +#: src/ui_appindicator.c:220 +#, c-format +msgid "building menus failed: %s" +msgstr "" + +#: src/ui_notify.c:48 +msgid "gettimeofday failed." +msgstr "" + +#: src/ui_notify.c:77 +msgid "Temperature alert" +msgstr "" + +#: src/ui_notify.c:79 +msgid "Fan alert" msgstr "" -#: src/glade/sensor-edit.glade:327 -msgid "°C" +#: src/ui_sensorpref.c:248 +msgid "Unknown" msgstr "" diff --git a/po/pt_BR.gmo b/po/pt_BR.gmo new file mode 100644 index 0000000..37391f2 Binary files /dev/null and b/po/pt_BR.gmo differ diff --git a/po/pt_BR.po b/po/pt_BR.po new file mode 100644 index 0000000..e19e29d --- /dev/null +++ b/po/pt_BR.po @@ -0,0 +1,643 @@ +# Portuguese translations for psensor package. +# Copyright (C) 2012 Free Software Foundation, Inc. +# This file is distributed under the same license as the psensor package. +# , 2012. +# +msgid "" +msgstr "" +"Project-Id-Version: psensor 0.7.0.x\n" +"Report-Msgid-Bugs-To: jeanfi@gmail.com\n" +"POT-Creation-Date: 2013-10-16 09:19+0200\n" +"PO-Revision-Date: 2013-09-01 18:54+0000\n" +"Last-Translator: Celio Alves \n" +"Language-Team: Brazilian Portuguese\n" +"Language: pt_BR\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-10-18 06:32+0000\n" +"X-Generator: Launchpad (build 16799)\n" + +#: src/glade/psensor.glade:5 src/ui_appindicator.c:124 +msgid "About" +msgstr "Sobre" + +#: src/glade/psensor.glade:9 src/ui_sensorlist.c:209 src/ui_appindicator.c:112 +msgid "Preferences" +msgstr "Preferências" + +#: src/glade/psensor.glade:13 src/ui_appindicator.c:130 +msgid "Quit" +msgstr "Sair" + +#: src/glade/psensor.glade:17 +msgid "Sensor Preferences" +msgstr "Preferências de sensores" + +#: src/glade/psensor.glade:96 +msgid "Psensor - Temperature Monitor" +msgstr "Psensor - Monitor de temperatura" + +#: src/glade/psensor.glade:111 +msgid "_Psensor" +msgstr "_Psensor" + +#: src/glade/psensor.glade:158 +msgid "_Help" +msgstr "Ajuda" + +#: src/glade/psensor-pref.glade:7 +msgid "Edit Preferences" +msgstr "Editar Preferências" + +#: src/glade/psensor-pref.glade:72 +msgid "Position of sensors table:" +msgstr "Posição da tabela de sensores:" + +#: src/glade/psensor-pref.glade:81 +msgid "Hide window decoration" +msgstr "Ocultar decoração da janela" + +#: src/glade/psensor-pref.glade:98 +msgid "Keep window below" +msgstr "Manter janela abaixo" + +#: src/glade/psensor-pref.glade:115 +msgid "Enable menu" +msgstr "Habilitar menu" + +#: src/glade/psensor-pref.glade:132 +msgid "Enable Unity Launcher counter" +msgstr "" + +#: src/glade/psensor-pref.glade:149 +msgid "Hide window on startup" +msgstr "Ocultar janela na inicialização" + +#: src/glade/psensor-pref.glade:166 +msgid "Restore window position and size" +msgstr "Restaurar posição e tamanho da janela" + +#: src/glade/psensor-pref.glade:186 +msgid "Temperature unit:" +msgstr "Unidade de temperatura:" + +#: src/glade/psensor-pref.glade:238 +msgid "Interface" +msgstr "Interface" + +#: src/glade/psensor-pref.glade:276 +msgid "Foreground:" +msgstr "Primeiro plano:" + +#: src/glade/psensor-pref.glade:291 +msgid "Background:" +msgstr "Plano de fundo:" + +#: src/glade/psensor-pref.glade:325 +msgid "Background opacity:" +msgstr "Opacidade do plano de fundo:" + +#: src/glade/psensor-pref.glade:348 +msgid "Min" +msgstr "Min" + +#: src/glade/psensor-pref.glade:375 +msgid "Max" +msgstr "Max" + +#: src/glade/psensor-pref.glade:401 +msgid "Colors" +msgstr "Cores" + +#: src/glade/psensor-pref.glade:419 +msgid "Monitoring duration:" +msgstr "Duração do monitoramento:" + +#: src/glade/psensor-pref.glade:457 +msgid "minute(s)" +msgstr "minuto(s)" + +#: src/glade/psensor-pref.glade:474 src/glade/psensor-pref.glade:626 +msgid "second(s)" +msgstr "segundo(s)" + +#: src/glade/psensor-pref.glade:510 +msgid "Update interval:" +msgstr "Intervalo de atualização:" + +#: src/glade/psensor-pref.glade:528 +msgid "Measures" +msgstr "Medidas" + +#: src/glade/psensor-pref.glade:564 src/glade/sensor-edit.glade:169 +#: src/ui_sensorlist.c:334 +msgid "Graph" +msgstr "Grafo" + +#: src/glade/psensor-pref.glade:588 +msgid "Measure update interval:" +msgstr "Intervalo de atualização das medições:" + +#: src/glade/psensor-pref.glade:637 +msgid "Enable sensors logging" +msgstr "Habilitar registro (log) de sensores" + +#: src/glade/psensor-pref.glade:684 +msgid "Sensors logging interval" +msgstr "Intervalo de registro dos sensores" + +#: src/glade/psensor-pref.glade:701 +msgid "seconds(s)" +msgstr "segundo(s)" + +#: src/glade/psensor-pref.glade:718 +msgid "Script executed when an alarm is raised" +msgstr "" + +#: src/glade/psensor-pref.glade:751 +msgid "Sensors" +msgstr "Sensores" + +#: src/glade/sensor-edit.glade:19 +msgid "Edit Sensor Preferences" +msgstr "Editar preferências do sensor" + +#: src/glade/sensor-edit.glade:87 +msgid "Name" +msgstr "Nome" + +#: src/glade/sensor-edit.glade:138 +msgid "Type:" +msgstr "Tipo:" + +#: src/glade/sensor-edit.glade:153 src/glade/sensor-edit.glade:294 +#: src/glade/sensor-edit.glade:388 src/glade/sensor-edit.glade:459 +#: src/glade/sensor-edit.glade:508 src/lib/psensor.c:486 src/ui_notify.c:81 +msgid "N/A" +msgstr "N/D" + +#: src/glade/sensor-edit.glade:187 +msgid "Color:" +msgstr "Cor:" + +#: src/glade/sensor-edit.glade:201 +msgid "Alarm" +msgstr "Alarme" + +#: src/glade/sensor-edit.glade:216 +msgid "Activate desktop notifications" +msgstr "Ativar notificações de desktop" + +#: src/glade/sensor-edit.glade:236 +msgid "Sensor Information" +msgstr "Informações do sensor" + +#: src/glade/sensor-edit.glade:249 +msgid "Draw sensor curve" +msgstr "Desenhar curva do sensor" + +#: src/glade/sensor-edit.glade:333 +msgid "High threshold:" +msgstr "Limite superior:" + +#: src/glade/sensor-edit.glade:348 +msgid "Low threshold:" +msgstr "Limite inferior:" + +#: src/glade/sensor-edit.glade:409 +msgid "Ubuntu Application Indicator" +msgstr "" + +#: src/glade/sensor-edit.glade:424 +msgid "Display sensor in the Application Indicator menu" +msgstr "" + +#: src/glade/sensor-edit.glade:444 +msgid "Chip:" +msgstr "Chip:" + +#: src/glade/sensor-edit.glade:489 +msgid "Id:" +msgstr "ID:" + +#: src/glade/sensor-edit.glade:523 +msgid "Details" +msgstr "Detalhes" + +#: src/glade/sensor-edit.glade:541 +msgid "Name:" +msgstr "Nome:" + +#: src/lib/amd.c:170 +msgid "AMD: cannot found ADL library." +msgstr "AMD: não foi possível encontrar a biblioteca ADL." + +#: src/lib/amd.c:197 +msgid "AMD: missing ADL's API." +msgstr "AMD: está faltando a API da ADL." + +#: src/lib/amd.c:207 +msgid "AMD: failed to initialize ADL." +msgstr "AMD: falha ao iniciar ADL." + +#: src/lib/amd.c:213 +msgid "AMD: cannot get the number of adapters." +msgstr "AMD: não foi possível obter número de adaptadores." + +#: src/lib/amd.c:252 +#, c-format +msgid "Number of AMD/ATI adapters: %d" +msgstr "Número de adaptadores AMD/ATI: %d" + +#: src/lib/amd.c:253 +#, c-format +msgid "Number of active AMD/ATI adapters: %d" +msgstr "Número de adaptadores AMD/ATI ativos: %d" + +#: src/lib/hdd_atasmart.c:152 +#, c-format +msgid "atasmart: sk_disk_open() failure: %s." +msgstr "atasmart: falha em sk_disk_open(): %s." + +#: src/lib/hdd_hddtemp.c:59 +msgid "hddtemp: failed to open socket." +msgstr "" + +#: src/lib/hdd_hddtemp.c:72 +msgid "hddtemp: failed to open connection." +msgstr "hddtemp: falha em abrir conexão." + +#: src/lib/hdd_hddtemp.c:186 src/lib/hdd_hddtemp.c:256 +#, c-format +msgid "hddtemp: wrong string: %s." +msgstr "" + +#: src/lib/lmsensor.c:42 +#, c-format +msgid "lmsensor: cannot get value of subfeature %s: %s." +msgstr "lmsensor: não foi possível obter valor do sub-recurso %s: %s." + +#: src/lib/lmsensor.c:123 +msgid "lmsensor: lmsensor_psensor_create failure: wrong feature type." +msgstr "" + +#: src/lib/lmsensor.c:218 +#, c-format +msgid "lmsensor: initialization failure: %s." +msgstr "lmsensor: falha na inicialização: %s." + +#: src/lib/log.c:43 +#, c-format +msgid "Cannot open log file: %s" +msgstr "Não é possível abrir arquivo de log: %s" + +#: src/lib/nvidia.c:54 +msgid "" +"NVIDIA proprietary driver not used or cannot retrieve NVIDIA GPU temperature." +msgstr "" + +#: src/lib/nvidia.c:97 +msgid "Cannot open connection to X11 server." +msgstr "Não é possível abrir conexão com o servidor X11." + +#: src/lib/nvidia.c:105 +msgid "Failed to retrieve NVIDIA information." +msgstr "Falha ao recuperar informações de NVIDIA." + +#: src/lib/psensor.c:482 tests/test_psensor_type_to_unit_str.c:62 +msgid "RPM" +msgstr "RPM" + +#: src/lib/psensor.c:484 +msgid "%" +msgstr "%" + +#: src/lib/slog.c:68 +msgid "HOME variable not set." +msgstr "Variável HOME não configurada." + +#: src/lib/slog.c:78 +msgid "Sensor log file already open." +msgstr "Arquivo de registro do sensor já está aberto." + +#: src/lib/slog.c:87 +#, c-format +msgid "Cannot open sensor log file: %s." +msgstr "Não é possível abrir arquivo de log do sensor: %s." + +#: src/lib/slog.c:118 +msgid "Sensor log file not open." +msgstr "Arquivo de registros do sensor não foi aberto." + +#: src/lib/slog.c:174 +msgid "Sensor log not open, cannot close." +msgstr "" + +#: src/main.c:77 +#, c-format +msgid "" +"Copyright (C) %s jeanfi@gmail.com\n" +"License GPLv2: GNU GPL version 2 or later \n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +msgstr "" +"Copyright (C) %s jeanfi@gmail.com\n" +"Licença GPLv2: GNU GPL versão 2 ou superior \n" +"Este é um software livre: você é livre para modificar e redistribuir.\n" +"Não há NENHUMA GARANTIA, na medida do permitido por lei.\n" + +#: src/main.c:88 src/server/server.c:94 +#, c-format +msgid "Usage: %s [OPTION]...\n" +msgstr "Uso: %s [OPÇÃO]...\n" + +#: src/main.c:90 +msgid "" +"Psensor is a GTK+ application for monitoring hardware sensors, including " +"temperatures and fan speeds." +msgstr "" +"Psensor é um aplicativo GTK+ para monitoramento de sensores de hardware, " +"incluindo temperatura e velocidade de ventoinhas." + +#: src/main.c:94 +msgid "Options:" +msgstr "Opções:" + +#: src/main.c:95 +msgid "" +" -h, --help display this help and exit\n" +" -v, --version display version information and exit" +msgstr "" +" -h, --help exibir esta ajuda e sair\n" +" -v, --version exibir informação de versão e sair" + +#: src/main.c:101 +msgid "" +" -u, --url=URL the URL of the psensor-server,\n" +" example: http://hostname:3131" +msgstr "" +" -u, --url=URL a URL do psensor-server,\n" +" exemplo: http://hostname:3131" + +#: src/main.c:104 +msgid "" +" --use-libatasmart use atasmart library for disk monitoring instead of\n" +" hddtemp daemon" +msgstr "" + +#: src/main.c:107 +msgid " -n, --new-instance force the creation of a new Psensor application" +msgstr "" + +#: src/main.c:110 +msgid " -d, --debug=LEVEL set the debug level, integer between 0 and 3" +msgstr "" + +#: src/main.c:115 src/server/server.c:117 +#, c-format +msgid "Report bugs to: %s\n" +msgstr "Relatar falhas para: %s\n" + +#: src/main.c:117 src/server/server.c:119 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "Página inicial de %s: <%s>\n" + +#: src/main.c:454 +msgid "Psensor has not been compiled with remote sensor support." +msgstr "" + +#: src/main.c:517 +msgid "Enables debug mode." +msgstr "Ativar o modo de depuração" + +#: src/main.c:529 src/server/server.c:380 +#, c-format +msgid "Try `%s --help' for more information.\n" +msgstr "Utilize `%s --help' para mais informações.\n" + +#: src/main.c:542 +msgid "A Psensor instance already exists." +msgstr "Uma instancia de Psensor já existe." + +#: src/rsensor.c:107 +#, c-format +msgid "Fail to connect to: %s" +msgstr "Falha ao conectar: %s" + +#: src/rsensor.c:144 +#, c-format +msgid "Invalid content: %s" +msgstr "Conteúdo inválido: %s" + +#: src/rsensor.c:184 +#, c-format +msgid "Invalid JSON: %s" +msgstr "JSON inválido: %s" + +#: src/server/server.c:54 +msgid "

Server stop requested

" +msgstr "" + +#: src/server/server.c:60 +msgid "" +"

Page not found - Go to Main page

" +msgstr "" +"

Página não encontrada - Ir para a página inicial

" + +#: src/server/server.c:84 +#, c-format +msgid "" +"Copyright (C) %s jeanfi@gmail.com\n" +"License GPLv2: GNU GPL version 2 or later \n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +msgstr "" + +#: src/server/server.c:96 +msgid "" +"psensor-server is an HTTP server for monitoring hardware sensors remotely." +msgstr "" +"psensor-server é um servidor HTTP para monitoramento remoto de sensores de " +"hardware." + +#: src/server/server.c:101 +msgid "" +" -h, --help\t\tdisplay this help and exit\n" +" -v, --version\t\tdisplay version information and exit" +msgstr "" + +#: src/server/server.c:105 +msgid "" +" -p,--port=PORT\twebserver port\n" +" -w,--wdir=DIR\t\tdirectory containing webserver pages" +msgstr "" + +#: src/server/server.c:109 +msgid " -d, --debug=LEVEL set the debug level, integer between 0 and 3" +msgstr "" + +#: src/server/server.c:111 +msgid " -l, --log-file=PATH set the log file to PATH" +msgstr "" + +#: src/server/server.c:112 +msgid " --sensor-log-file=PATH set the sensor log file to PATH" +msgstr "" + +#: src/server/server.c:113 +msgid " --sensor-log-interval=S set the sensor log interval to S (seconds)" +msgstr "" + +#: src/server/server.c:297 +#, c-format +msgid "HTTP Request: %s" +msgstr "Requisição HTTP: %s" + +#: src/server/server.c:360 +#, c-format +msgid "Enables debug mode: %d" +msgstr "Habilita modo de depuração: %d" + +#: src/server/server.c:402 +msgid "No sensors detected." +msgstr "Nenhum sensor detectado" + +#: src/server/server.c:409 +msgid "Failed to create Web server." +msgstr "Falhou ao criar servidor web." + +#: src/server/server.c:413 +#, c-format +msgid "Web server started on port: %d" +msgstr "Servidor web iniciado na porta: %d" + +#: src/server/server.c:414 +#, c-format +msgid "WWW directory: %s" +msgstr "Diretório WWW: %s" + +#: src/server/server.c:415 +#, c-format +msgid "URL: http://localhost:%d" +msgstr "URL: http://localhost:%d" + +#: src/server/server.c:425 +msgid "Failed to activate logging of sensors." +msgstr "" + +#: src/ui.c:84 +msgid "Psensor is a GTK+ application for monitoring hardware sensors" +msgstr "Psensor é uma aplicação GTK+ para monitorar sensores de hardware" + +#: src/ui.c:87 +msgid "" +"Copyright(c) 2010-2013\n" +"jeanfi@gmail.com" +msgstr "" +"Copyright(c) 2010-2013\n" +"jeanfi@gmail.com" + +#: src/ui.c:90 +msgid "About Psensor" +msgstr "Sobre o Psensor" + +#: src/ui.c:93 +msgid "Psensor Homepage" +msgstr "Site do Psensor" + +#: src/ui.c:217 +msgid "Failed to load Psensor icon." +msgstr "Falha ao carregar o ícone do Psensor." + +#: src/ui_sensorlist.c:245 +msgid "Select foreground color" +msgstr "Selecionar cor do primeiro plano" + +#: src/ui_sensorlist.c:297 +msgid "Sensor" +msgstr "Sensor" + +#: src/ui_sensorlist.c:303 +msgid "Value" +msgstr "Valor" + +#: src/ui_sensorlist.c:309 +msgid "Min" +msgstr "Min" + +#: src/ui_sensorlist.c:315 +msgid "Max" +msgstr "Max" + +#: src/ui_sensorlist.c:322 +msgid "Color" +msgstr "Cor" + +#: src/ui_appindicator.c:106 +msgid "_Show" +msgstr "Mo_strar" + +#: src/ui_appindicator.c:107 +msgid "Show" +msgstr "Mostrar" + +#: src/ui_appindicator.c:111 +msgid "_Preferences" +msgstr "_Preferências" + +#: src/ui_appindicator.c:116 +msgid "S_ensor Preferences" +msgstr "" + +#: src/ui_appindicator.c:118 +msgid "SensorPreferences" +msgstr "Preferências do Sensor" + +#: src/ui_appindicator.c:122 +msgid "_About" +msgstr "Sobre" + +#: src/ui_appindicator.c:129 +msgid "_Quit" +msgstr "Sair" + +#: src/ui_appindicator.c:220 +#, c-format +msgid "building menus failed: %s" +msgstr "falha na montagem dos menus: %s" + +#: src/ui_notify.c:48 +msgid "gettimeofday failed." +msgstr "falha em gettimeofday." + +#: src/ui_notify.c:77 +msgid "Temperature alert" +msgstr "Alerta de temperatura" + +#: src/ui_notify.c:79 +msgid "Fan alert" +msgstr "Alenta do ventilador" + +#: src/ui_sensorpref.c:248 +msgid "Unknown" +msgstr "Desconhecido" + +#~ msgid "Sensor Name" +#~ msgstr "Nome do sensor" + +#~ msgid "Enabled" +#~ msgstr "Habilitado" + +#, fuzzy +#~ msgid "Enable log of measures" +#~ msgstr "Habilitar menu" + +#, fuzzy +#~ msgid "Enable indicator" +#~ msgstr "Habilitado" diff --git a/po/ru.gmo b/po/ru.gmo new file mode 100644 index 0000000..9ac0d04 Binary files /dev/null and b/po/ru.gmo differ diff --git a/po/ru.po b/po/ru.po new file mode 100644 index 0000000..1bad7e3 --- /dev/null +++ b/po/ru.po @@ -0,0 +1,656 @@ +# Russian translations for psensor package. +# Copyright (C) 2012 Free Software Foundation, Inc. +# This file is distributed under the same license as the psensor package. +# , 2012. +# +msgid "" +msgstr "" +"Project-Id-Version: psensor 0.7.0.x\n" +"Report-Msgid-Bugs-To: jeanfi@gmail.com\n" +"POT-Creation-Date: 2013-10-16 09:19+0200\n" +"PO-Revision-Date: 2012-12-25 06:05+0000\n" +"Last-Translator: Ilya Volchanetskiy \n" +"Language-Team: Russian\n" +"Language: ru\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-01-21 09:32+0000\n" +"X-Generator: Launchpad (build 16430)\n" + +#: src/glade/psensor.glade:5 src/ui_appindicator.c:124 +msgid "About" +msgstr "О программе" + +#: src/glade/psensor.glade:9 src/ui_sensorlist.c:209 src/ui_appindicator.c:112 +msgid "Preferences" +msgstr "Параметры" + +#: src/glade/psensor.glade:13 src/ui_appindicator.c:130 +msgid "Quit" +msgstr "Выход" + +#: src/glade/psensor.glade:17 +msgid "Sensor Preferences" +msgstr "Параметры датчиков" + +#: src/glade/psensor.glade:96 +msgid "Psensor - Temperature Monitor" +msgstr "Psensor - монитор температуры" + +#: src/glade/psensor.glade:111 +msgid "_Psensor" +msgstr "" + +#: src/glade/psensor.glade:158 +msgid "_Help" +msgstr "_Справка" + +#: src/glade/psensor-pref.glade:7 +msgid "Edit Preferences" +msgstr "Изменить параметры" + +#: src/glade/psensor-pref.glade:72 +msgid "Position of sensors table:" +msgstr "Положение таблицы датчиков:" + +#: src/glade/psensor-pref.glade:81 +msgid "Hide window decoration" +msgstr "Спрятать рамку окна" + +#: src/glade/psensor-pref.glade:98 +msgid "Keep window below" +msgstr "Держать окно позади" + +#: src/glade/psensor-pref.glade:115 +msgid "Enable menu" +msgstr "Включить меню" + +#: src/glade/psensor-pref.glade:132 +msgid "Enable Unity Launcher counter" +msgstr "Включить счётчик в панеле запуска Unity" + +#: src/glade/psensor-pref.glade:149 +msgid "Hide window on startup" +msgstr "Скрыть окно при запуске" + +#: src/glade/psensor-pref.glade:166 +msgid "Restore window position and size" +msgstr "Восстанавливать положение и размер окна" + +#: src/glade/psensor-pref.glade:186 +msgid "Temperature unit:" +msgstr "Единица измерения температуры:" + +#: src/glade/psensor-pref.glade:238 +msgid "Interface" +msgstr "Внешний вид" + +#: src/glade/psensor-pref.glade:276 +msgid "Foreground:" +msgstr "Передний план:" + +#: src/glade/psensor-pref.glade:291 +msgid "Background:" +msgstr "Фон:" + +#: src/glade/psensor-pref.glade:325 +msgid "Background opacity:" +msgstr "Непрозрачность фона:" + +#: src/glade/psensor-pref.glade:348 +msgid "Min" +msgstr "Мин." + +#: src/glade/psensor-pref.glade:375 +msgid "Max" +msgstr "Макс." + +#: src/glade/psensor-pref.glade:401 +msgid "Colors" +msgstr "Цвета" + +#: src/glade/psensor-pref.glade:419 +msgid "Monitoring duration:" +msgstr "Время мониторинга:" + +#: src/glade/psensor-pref.glade:457 +msgid "minute(s)" +msgstr "мин." + +#: src/glade/psensor-pref.glade:474 src/glade/psensor-pref.glade:626 +msgid "second(s)" +msgstr "сек." + +#: src/glade/psensor-pref.glade:510 +msgid "Update interval:" +msgstr "Интервал обновления:" + +#: src/glade/psensor-pref.glade:528 +msgid "Measures" +msgstr "Замеры" + +#: src/glade/psensor-pref.glade:564 src/glade/sensor-edit.glade:169 +#: src/ui_sensorlist.c:334 +msgid "Graph" +msgstr "Диаграмма" + +#: src/glade/psensor-pref.glade:588 +msgid "Measure update interval:" +msgstr "Интервал обновления замеров:" + +#: src/glade/psensor-pref.glade:637 +msgid "Enable sensors logging" +msgstr "Вести журнал событий датчиков" + +#: src/glade/psensor-pref.glade:684 +msgid "Sensors logging interval" +msgstr "Интервал ведения журнала событий датчиков" + +#: src/glade/psensor-pref.glade:701 +msgid "seconds(s)" +msgstr "секунд(с)" + +#: src/glade/psensor-pref.glade:718 +msgid "Script executed when an alarm is raised" +msgstr "" + +#: src/glade/psensor-pref.glade:751 +msgid "Sensors" +msgstr "Датчики" + +#: src/glade/sensor-edit.glade:19 +msgid "Edit Sensor Preferences" +msgstr "Изменить параметры датчика" + +#: src/glade/sensor-edit.glade:87 +msgid "Name" +msgstr "" + +#: src/glade/sensor-edit.glade:138 +msgid "Type:" +msgstr "Тип:" + +#: src/glade/sensor-edit.glade:153 src/glade/sensor-edit.glade:294 +#: src/glade/sensor-edit.glade:388 src/glade/sensor-edit.glade:459 +#: src/glade/sensor-edit.glade:508 src/lib/psensor.c:486 src/ui_notify.c:81 +msgid "N/A" +msgstr "Н/Д" + +#: src/glade/sensor-edit.glade:187 +msgid "Color:" +msgstr "Цвет:" + +#: src/glade/sensor-edit.glade:201 +msgid "Alarm" +msgstr "Уведомление" + +#: src/glade/sensor-edit.glade:216 +msgid "Activate desktop notifications" +msgstr "Включить уведомления" + +#: src/glade/sensor-edit.glade:236 +msgid "Sensor Information" +msgstr "Информация датчика" + +#: src/glade/sensor-edit.glade:249 +msgid "Draw sensor curve" +msgstr "Рисовать график датчика" + +#: src/glade/sensor-edit.glade:333 +msgid "High threshold:" +msgstr "Высший порог:" + +#: src/glade/sensor-edit.glade:348 +msgid "Low threshold:" +msgstr "Нижний порог:" + +#: src/glade/sensor-edit.glade:409 +msgid "Ubuntu Application Indicator" +msgstr "Индикатор приложения" + +#: src/glade/sensor-edit.glade:424 +msgid "Display sensor in the Application Indicator menu" +msgstr "Показать датчик в индикаторе меню приложений" + +#: src/glade/sensor-edit.glade:444 +msgid "Chip:" +msgstr "Микросхема:" + +#: src/glade/sensor-edit.glade:489 +msgid "Id:" +msgstr "Идентификатор:" + +#: src/glade/sensor-edit.glade:523 +msgid "Details" +msgstr "Сведения" + +#: src/glade/sensor-edit.glade:541 +msgid "Name:" +msgstr "Название:" + +#: src/lib/amd.c:170 +msgid "AMD: cannot found ADL library." +msgstr "AMD: библиотека ADL не найдена." + +#: src/lib/amd.c:197 +msgid "AMD: missing ADL's API." +msgstr "AMD: отсутствует API ADL." + +#: src/lib/amd.c:207 +msgid "AMD: failed to initialize ADL." +msgstr "AMD: не удалось инициализировать ADL." + +#: src/lib/amd.c:213 +msgid "AMD: cannot get the number of adapters." +msgstr "AMD: ошибка определения количества адаптеров." + +#: src/lib/amd.c:252 +#, c-format +msgid "Number of AMD/ATI adapters: %d" +msgstr "" + +#: src/lib/amd.c:253 +#, c-format +msgid "Number of active AMD/ATI adapters: %d" +msgstr "" + +#: src/lib/hdd_atasmart.c:152 +#, c-format +msgid "atasmart: sk_disk_open() failure: %s." +msgstr "atasmart: ошибка sk_disk_open(): %s." + +#: src/lib/hdd_hddtemp.c:59 +msgid "hddtemp: failed to open socket." +msgstr "hddtemp: не удалось открыть сокет." + +#: src/lib/hdd_hddtemp.c:72 +msgid "hddtemp: failed to open connection." +msgstr "hddtemp: не удалось открыть соединение." + +#: src/lib/hdd_hddtemp.c:186 src/lib/hdd_hddtemp.c:256 +#, c-format +msgid "hddtemp: wrong string: %s." +msgstr "hddtemp: неправильная строка: %s." + +#: src/lib/lmsensor.c:42 +#, c-format +msgid "lmsensor: cannot get value of subfeature %s: %s." +msgstr "" + +#: src/lib/lmsensor.c:123 +msgid "lmsensor: lmsensor_psensor_create failure: wrong feature type." +msgstr "" + +#: src/lib/lmsensor.c:218 +#, c-format +msgid "lmsensor: initialization failure: %s." +msgstr "lmsensor: ошибка инициализации: %s." + +#: src/lib/log.c:43 +#, c-format +msgid "Cannot open log file: %s" +msgstr "Ошибка открытия файла журнала: %s" + +#: src/lib/nvidia.c:54 +msgid "" +"NVIDIA proprietary driver not used or cannot retrieve NVIDIA GPU temperature." +msgstr "" + +#: src/lib/nvidia.c:97 +msgid "Cannot open connection to X11 server." +msgstr "Ошибка открытия соединения к серверу X11." + +#: src/lib/nvidia.c:105 +msgid "Failed to retrieve NVIDIA information." +msgstr "Не удалось получить информацию NVIDIA." + +#: src/lib/psensor.c:482 tests/test_psensor_type_to_unit_str.c:62 +msgid "RPM" +msgstr "об/мин" + +#: src/lib/psensor.c:484 +msgid "%" +msgstr "%" + +#: src/lib/slog.c:68 +msgid "HOME variable not set." +msgstr "Переменная HOME не установлена." + +#: src/lib/slog.c:78 +msgid "Sensor log file already open." +msgstr "Файл журнала датчика уже открыт." + +#: src/lib/slog.c:87 +#, fuzzy, c-format +msgid "Cannot open sensor log file: %s." +msgstr "Не удалось открыть файл журнала датчика: %s." + +#: src/lib/slog.c:118 +msgid "Sensor log file not open." +msgstr "Файл журнала датчика не открыт." + +#: src/lib/slog.c:174 +msgid "Sensor log not open, cannot close." +msgstr "Файл журнала датчика не открыт, не удалось закрыть." + +#: src/main.c:77 +#, c-format +msgid "" +"Copyright (C) %s jeanfi@gmail.com\n" +"License GPLv2: GNU GPL version 2 or later \n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +msgstr "" + +#: src/main.c:88 src/server/server.c:94 +#, c-format +msgid "Usage: %s [OPTION]...\n" +msgstr "Использование: %s [КЛЮЧ]...\n" + +#: src/main.c:90 +msgid "" +"Psensor is a GTK+ application for monitoring hardware sensors, including " +"temperatures and fan speeds." +msgstr "" +"Psensor — это GTK+ приложение для мониторинга аппаратных датчиков, включая " +"температуру и скорость вентилятора." + +#: src/main.c:94 +msgid "Options:" +msgstr "Опции:" + +#: src/main.c:95 +msgid "" +" -h, --help display this help and exit\n" +" -v, --version display version information and exit" +msgstr "" +" -h, --help показать эту справку и выйти\n" +" -v, --version показать версию и выйти" + +#: src/main.c:101 +msgid "" +" -u, --url=URL the URL of the psensor-server,\n" +" example: http://hostname:3131" +msgstr "" +" -u, --url=URL URL psensor-сервера, пример: http://hostname:3131" + +#: src/main.c:104 +msgid "" +" --use-libatasmart use atasmart library for disk monitoring instead of\n" +" hddtemp daemon" +msgstr "" +" --use-libatasmart использовать библиотеку atasmart для мониторинга " +"дисков вместо демона hddtemp" + +#: src/main.c:107 +msgid " -n, --new-instance force the creation of a new Psensor application" +msgstr "" +" -n, --new-instance принудительно запускает новую копию программы Psensor" + +#: src/main.c:110 +msgid " -d, --debug=LEVEL set the debug level, integer between 0 and 3" +msgstr " -d, --debug=УРОВЕНЬ установить уровень отладки, целое между 0 и 3" + +#: src/main.c:115 src/server/server.c:117 +#, c-format +msgid "Report bugs to: %s\n" +msgstr "Сообщайте об ошибках на: %s\n" + +#: src/main.c:117 src/server/server.c:119 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "%s домашняя страница: <%s>\n" + +#: src/main.c:454 +msgid "Psensor has not been compiled with remote sensor support." +msgstr "Psensor не был собран с поддержкой удалённых датчиков." + +#: src/main.c:517 +msgid "Enables debug mode." +msgstr "Включает режим отладки." + +#: src/main.c:529 src/server/server.c:380 +#, c-format +msgid "Try `%s --help' for more information.\n" +msgstr "Попробуйте `%s --help' для дополнительной информации.↵\n" + +#: src/main.c:542 +msgid "A Psensor instance already exists." +msgstr "Копия Psensor уже запущена." + +#: src/rsensor.c:107 +#, c-format +msgid "Fail to connect to: %s" +msgstr "Ошибка подключения к: %s" + +#: src/rsensor.c:144 +#, c-format +msgid "Invalid content: %s" +msgstr "Неправильное содержимое: %s" + +#: src/rsensor.c:184 +#, c-format +msgid "Invalid JSON: %s" +msgstr "Неправильный JSON: %s" + +#: src/server/server.c:54 +msgid "

Server stop requested

" +msgstr "

Запрошена остановка сервера

" + +#: src/server/server.c:60 +msgid "" +"

Page not found - Go to Main page

" +msgstr "" +"

Страница не найдена - Перейти к Главной странице

" + +#: src/server/server.c:84 +#, c-format +msgid "" +"Copyright (C) %s jeanfi@gmail.com\n" +"License GPLv2: GNU GPL version 2 or later \n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +msgstr "" + +#: src/server/server.c:96 +msgid "" +"psensor-server is an HTTP server for monitoring hardware sensors remotely." +msgstr "" +"psensor-server ‌— это HTTP-сервер для удалённого мониторинга аппаратных " +"датчиков." + +#: src/server/server.c:101 +msgid "" +" -h, --help\t\tdisplay this help and exit\n" +" -v, --version\t\tdisplay version information and exit" +msgstr "" +" -h, --help\t\tпоказать эту справку и выйти\n" +" -v, --version\t\tпоказать версию и выйти" + +#: src/server/server.c:105 +msgid "" +" -p,--port=PORT\twebserver port\n" +" -w,--wdir=DIR\t\tdirectory containing webserver pages" +msgstr "" +" -p,--port=PORT\tпорт веб-сервера\n" +" -w,--wdir=DIR\t\tдиректория для страниц веб-сервера" + +#: src/server/server.c:109 +msgid " -d, --debug=LEVEL set the debug level, integer between 0 and 3" +msgstr " -d, --debug=LEVEL установить уровень отладки, целое между 0 и 3" + +#: src/server/server.c:111 +msgid " -l, --log-file=PATH set the log file to PATH" +msgstr " -l, --log-file=ПУТЬ установить ПУТЬ к файлу журнала" + +#: src/server/server.c:112 +msgid " --sensor-log-file=PATH set the sensor log file to PATH" +msgstr " --sensor-log-file=ПУТЬ установить ПУТЬ к файлу журнала датчика" + +#: src/server/server.c:113 +msgid " --sensor-log-interval=S set the sensor log interval to S (seconds)" +msgstr "" +" --sensor-log-interval=ПЕРИОД установить ПЕРИОД журналирования датчиков (в " +"секундах)" + +#: src/server/server.c:297 +#, c-format +msgid "HTTP Request: %s" +msgstr "HTTP запрос: %s" + +#: src/server/server.c:360 +#, c-format +msgid "Enables debug mode: %d" +msgstr "Включает режим отладки: %d" + +#: src/server/server.c:402 +msgid "No sensors detected." +msgstr "Датчики не обнаружены." + +#: src/server/server.c:409 +msgid "Failed to create Web server." +msgstr "Не удалось создать веб-сервер." + +#: src/server/server.c:413 +#, c-format +msgid "Web server started on port: %d" +msgstr "Веб-сервер запущен на порту: %d" + +#: src/server/server.c:414 +#, c-format +msgid "WWW directory: %s" +msgstr "WWW-каталог: %s" + +#: src/server/server.c:415 +#, c-format +msgid "URL: http://localhost:%d" +msgstr "URL: http://localhost:%d" + +#: src/server/server.c:425 +msgid "Failed to activate logging of sensors." +msgstr "Не удалось включить журналирование датчиков." + +#: src/ui.c:84 +msgid "Psensor is a GTK+ application for monitoring hardware sensors" +msgstr "Psensor — это GTK+ приложения для мониторинга аппаратных серсоров" + +#: src/ui.c:87 +msgid "" +"Copyright(c) 2010-2013\n" +"jeanfi@gmail.com" +msgstr "" + +#: src/ui.c:90 +msgid "About Psensor" +msgstr "О Psensor" + +#: src/ui.c:93 +msgid "Psensor Homepage" +msgstr "Домашняя страница Psensor" + +#: src/ui.c:217 +msgid "Failed to load Psensor icon." +msgstr "Не удалось загрузить значок Psensor." + +#: src/ui_sensorlist.c:245 +msgid "Select foreground color" +msgstr "Выберите цвет переднего плана" + +#: src/ui_sensorlist.c:297 +msgid "Sensor" +msgstr "Датчик" + +#: src/ui_sensorlist.c:303 +msgid "Value" +msgstr "Значение" + +#: src/ui_sensorlist.c:309 +msgid "Min" +msgstr "Мин." + +#: src/ui_sensorlist.c:315 +msgid "Max" +msgstr "Макс." + +#: src/ui_sensorlist.c:322 +msgid "Color" +msgstr "Цвет" + +#: src/ui_appindicator.c:106 +msgid "_Show" +msgstr "_Показать" + +#: src/ui_appindicator.c:107 +msgid "Show" +msgstr "Показать" + +#: src/ui_appindicator.c:111 +msgid "_Preferences" +msgstr "_Параметры" + +#: src/ui_appindicator.c:116 +msgid "S_ensor Preferences" +msgstr "Параметры д_атчика" + +#: src/ui_appindicator.c:118 +msgid "SensorPreferences" +msgstr "" + +#: src/ui_appindicator.c:122 +msgid "_About" +msgstr "_О программе" + +#: src/ui_appindicator.c:129 +msgid "_Quit" +msgstr "_Выход" + +#: src/ui_appindicator.c:220 +#, c-format +msgid "building menus failed: %s" +msgstr "не удалось создать меню: %s" + +#: src/ui_notify.c:48 +msgid "gettimeofday failed." +msgstr "ошибка gettimeofday." + +#: src/ui_notify.c:77 +msgid "Temperature alert" +msgstr "Уведомление температуры" + +#: src/ui_notify.c:79 +msgid "Fan alert" +msgstr "Уведомление вентилятора" + +#: src/ui_sensorpref.c:248 +msgid "Unknown" +msgstr "" + +#~ msgid "Sensor Name" +#~ msgstr "Название датчика" + +#~ msgid "Enabled" +#~ msgstr "Включён" + +#, fuzzy +#~ msgid "Enable log of measures" +#~ msgstr "Включить меню" + +#, fuzzy +#~ msgid "slog_init: cannot open sensor log file: %s" +#~ msgstr "Ошибка открытия файла журнала: %s" + +#, fuzzy +#~ msgid "slog_init: gettimeofday failed." +#~ msgstr "ошибка gettimeofday." + +#, fuzzy +#~ msgid "slog_write_sensors: gettimeofday failed." +#~ msgstr "ошибка gettimeofday." + +#, fuzzy +#~ msgid "Enable indicator" +#~ msgstr "Включён" diff --git a/po/sl.gmo b/po/sl.gmo new file mode 100644 index 0000000..4512682 Binary files /dev/null and b/po/sl.gmo differ diff --git a/po/sl.po b/po/sl.po new file mode 100644 index 0000000..776b3aa --- /dev/null +++ b/po/sl.po @@ -0,0 +1,612 @@ +# Slovenian translation for psensor +# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012 +# This file is distributed under the same license as the psensor package. +# Maintained by Jean-Philippe Orsini +# +msgid "" +msgstr "" +"Project-Id-Version: psensor\n" +"Report-Msgid-Bugs-To: jeanfi@gmail.com\n" +"POT-Creation-Date: 2013-10-16 09:19+0200\n" +"PO-Revision-Date: 2012-04-14 21:02+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Slovenian \n" +"Language: sl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2012-07-02 08:28+0000\n" +"X-Generator: Launchpad (build 15520)\n" + +#: src/glade/psensor.glade:5 src/ui_appindicator.c:124 +msgid "About" +msgstr "" + +#: src/glade/psensor.glade:9 src/ui_sensorlist.c:209 src/ui_appindicator.c:112 +msgid "Preferences" +msgstr "" + +#: src/glade/psensor.glade:13 src/ui_appindicator.c:130 +msgid "Quit" +msgstr "" + +#: src/glade/psensor.glade:17 +msgid "Sensor Preferences" +msgstr "" + +#: src/glade/psensor.glade:96 +msgid "Psensor - Temperature Monitor" +msgstr "" + +#: src/glade/psensor.glade:111 +msgid "_Psensor" +msgstr "" + +#: src/glade/psensor.glade:158 +msgid "_Help" +msgstr "" + +#: src/glade/psensor-pref.glade:7 +msgid "Edit Preferences" +msgstr "" + +#: src/glade/psensor-pref.glade:72 +msgid "Position of sensors table:" +msgstr "" + +#: src/glade/psensor-pref.glade:81 +msgid "Hide window decoration" +msgstr "" + +#: src/glade/psensor-pref.glade:98 +msgid "Keep window below" +msgstr "" + +#: src/glade/psensor-pref.glade:115 +msgid "Enable menu" +msgstr "" + +#: src/glade/psensor-pref.glade:132 +msgid "Enable Unity Launcher counter" +msgstr "" + +#: src/glade/psensor-pref.glade:149 +msgid "Hide window on startup" +msgstr "" + +#: src/glade/psensor-pref.glade:166 +msgid "Restore window position and size" +msgstr "" + +#: src/glade/psensor-pref.glade:186 +msgid "Temperature unit:" +msgstr "" + +#: src/glade/psensor-pref.glade:238 +msgid "Interface" +msgstr "" + +#: src/glade/psensor-pref.glade:276 +msgid "Foreground:" +msgstr "" + +#: src/glade/psensor-pref.glade:291 +msgid "Background:" +msgstr "" + +#: src/glade/psensor-pref.glade:325 +msgid "Background opacity:" +msgstr "" + +#: src/glade/psensor-pref.glade:348 +msgid "Min" +msgstr "" + +#: src/glade/psensor-pref.glade:375 +msgid "Max" +msgstr "" + +#: src/glade/psensor-pref.glade:401 +msgid "Colors" +msgstr "" + +#: src/glade/psensor-pref.glade:419 +msgid "Monitoring duration:" +msgstr "" + +#: src/glade/psensor-pref.glade:457 +msgid "minute(s)" +msgstr "" + +#: src/glade/psensor-pref.glade:474 src/glade/psensor-pref.glade:626 +msgid "second(s)" +msgstr "" + +#: src/glade/psensor-pref.glade:510 +msgid "Update interval:" +msgstr "" + +#: src/glade/psensor-pref.glade:528 +msgid "Measures" +msgstr "" + +#: src/glade/psensor-pref.glade:564 src/glade/sensor-edit.glade:169 +#: src/ui_sensorlist.c:334 +msgid "Graph" +msgstr "" + +#: src/glade/psensor-pref.glade:588 +msgid "Measure update interval:" +msgstr "" + +#: src/glade/psensor-pref.glade:637 +msgid "Enable sensors logging" +msgstr "" + +#: src/glade/psensor-pref.glade:684 +msgid "Sensors logging interval" +msgstr "" + +#: src/glade/psensor-pref.glade:701 +msgid "seconds(s)" +msgstr "" + +#: src/glade/psensor-pref.glade:718 +msgid "Script executed when an alarm is raised" +msgstr "" + +#: src/glade/psensor-pref.glade:751 +msgid "Sensors" +msgstr "" + +#: src/glade/sensor-edit.glade:19 +msgid "Edit Sensor Preferences" +msgstr "" + +#: src/glade/sensor-edit.glade:87 +msgid "Name" +msgstr "" + +#: src/glade/sensor-edit.glade:138 +msgid "Type:" +msgstr "" + +#: src/glade/sensor-edit.glade:153 src/glade/sensor-edit.glade:294 +#: src/glade/sensor-edit.glade:388 src/glade/sensor-edit.glade:459 +#: src/glade/sensor-edit.glade:508 src/lib/psensor.c:486 src/ui_notify.c:81 +msgid "N/A" +msgstr "" + +#: src/glade/sensor-edit.glade:187 +msgid "Color:" +msgstr "" + +#: src/glade/sensor-edit.glade:201 +msgid "Alarm" +msgstr "" + +#: src/glade/sensor-edit.glade:216 +msgid "Activate desktop notifications" +msgstr "" + +#: src/glade/sensor-edit.glade:236 +msgid "Sensor Information" +msgstr "" + +#: src/glade/sensor-edit.glade:249 +msgid "Draw sensor curve" +msgstr "" + +#: src/glade/sensor-edit.glade:333 +msgid "High threshold:" +msgstr "" + +#: src/glade/sensor-edit.glade:348 +msgid "Low threshold:" +msgstr "" + +#: src/glade/sensor-edit.glade:409 +msgid "Ubuntu Application Indicator" +msgstr "" + +#: src/glade/sensor-edit.glade:424 +msgid "Display sensor in the Application Indicator menu" +msgstr "" + +#: src/glade/sensor-edit.glade:444 +msgid "Chip:" +msgstr "" + +#: src/glade/sensor-edit.glade:489 +msgid "Id:" +msgstr "" + +#: src/glade/sensor-edit.glade:523 +msgid "Details" +msgstr "" + +#: src/glade/sensor-edit.glade:541 +msgid "Name:" +msgstr "" + +#: src/lib/amd.c:170 +msgid "AMD: cannot found ADL library." +msgstr "" + +#: src/lib/amd.c:197 +msgid "AMD: missing ADL's API." +msgstr "" + +#: src/lib/amd.c:207 +msgid "AMD: failed to initialize ADL." +msgstr "" + +#: src/lib/amd.c:213 +msgid "AMD: cannot get the number of adapters." +msgstr "" + +#: src/lib/amd.c:252 +#, c-format +msgid "Number of AMD/ATI adapters: %d" +msgstr "" + +#: src/lib/amd.c:253 +#, c-format +msgid "Number of active AMD/ATI adapters: %d" +msgstr "" + +#: src/lib/hdd_atasmart.c:152 +#, c-format +msgid "atasmart: sk_disk_open() failure: %s." +msgstr "" + +#: src/lib/hdd_hddtemp.c:59 +msgid "hddtemp: failed to open socket." +msgstr "" + +#: src/lib/hdd_hddtemp.c:72 +msgid "hddtemp: failed to open connection." +msgstr "" + +#: src/lib/hdd_hddtemp.c:186 src/lib/hdd_hddtemp.c:256 +#, c-format +msgid "hddtemp: wrong string: %s." +msgstr "" + +#: src/lib/lmsensor.c:42 +#, c-format +msgid "lmsensor: cannot get value of subfeature %s: %s." +msgstr "" + +#: src/lib/lmsensor.c:123 +msgid "lmsensor: lmsensor_psensor_create failure: wrong feature type." +msgstr "" + +#: src/lib/lmsensor.c:218 +#, c-format +msgid "lmsensor: initialization failure: %s." +msgstr "" + +#: src/lib/log.c:43 +#, c-format +msgid "Cannot open log file: %s" +msgstr "" + +#: src/lib/nvidia.c:54 +msgid "" +"NVIDIA proprietary driver not used or cannot retrieve NVIDIA GPU temperature." +msgstr "" + +#: src/lib/nvidia.c:97 +msgid "Cannot open connection to X11 server." +msgstr "" + +#: src/lib/nvidia.c:105 +msgid "Failed to retrieve NVIDIA information." +msgstr "" + +#: src/lib/psensor.c:482 tests/test_psensor_type_to_unit_str.c:62 +msgid "RPM" +msgstr "" + +#: src/lib/psensor.c:484 +msgid "%" +msgstr "" + +#: src/lib/slog.c:68 +msgid "HOME variable not set." +msgstr "" + +#: src/lib/slog.c:78 +msgid "Sensor log file already open." +msgstr "" + +#: src/lib/slog.c:87 +#, c-format +msgid "Cannot open sensor log file: %s." +msgstr "" + +#: src/lib/slog.c:118 +msgid "Sensor log file not open." +msgstr "" + +#: src/lib/slog.c:174 +msgid "Sensor log not open, cannot close." +msgstr "" + +#: src/main.c:77 +#, c-format +msgid "" +"Copyright (C) %s jeanfi@gmail.com\n" +"License GPLv2: GNU GPL version 2 or later \n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +msgstr "" + +#: src/main.c:88 src/server/server.c:94 +#, c-format +msgid "Usage: %s [OPTION]...\n" +msgstr "" + +#: src/main.c:90 +msgid "" +"Psensor is a GTK+ application for monitoring hardware sensors, including " +"temperatures and fan speeds." +msgstr "" + +#: src/main.c:94 +msgid "Options:" +msgstr "" + +#: src/main.c:95 +msgid "" +" -h, --help display this help and exit\n" +" -v, --version display version information and exit" +msgstr "" + +#: src/main.c:101 +msgid "" +" -u, --url=URL the URL of the psensor-server,\n" +" example: http://hostname:3131" +msgstr "" + +#: src/main.c:104 +msgid "" +" --use-libatasmart use atasmart library for disk monitoring instead of\n" +" hddtemp daemon" +msgstr "" + +#: src/main.c:107 +msgid " -n, --new-instance force the creation of a new Psensor application" +msgstr "" + +#: src/main.c:110 +msgid " -d, --debug=LEVEL set the debug level, integer between 0 and 3" +msgstr "" + +#: src/main.c:115 src/server/server.c:117 +#, c-format +msgid "Report bugs to: %s\n" +msgstr "" + +#: src/main.c:117 src/server/server.c:119 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "" + +#: src/main.c:454 +msgid "Psensor has not been compiled with remote sensor support." +msgstr "" + +#: src/main.c:517 +msgid "Enables debug mode." +msgstr "" + +#: src/main.c:529 src/server/server.c:380 +#, c-format +msgid "Try `%s --help' for more information.\n" +msgstr "" + +#: src/main.c:542 +msgid "A Psensor instance already exists." +msgstr "" + +#: src/rsensor.c:107 +#, c-format +msgid "Fail to connect to: %s" +msgstr "" + +#: src/rsensor.c:144 +#, c-format +msgid "Invalid content: %s" +msgstr "" + +#: src/rsensor.c:184 +#, c-format +msgid "Invalid JSON: %s" +msgstr "" + +#: src/server/server.c:54 +msgid "

Server stop requested

" +msgstr "" + +#: src/server/server.c:60 +msgid "" +"

Page not found - Go to Main page

" +msgstr "" + +#: src/server/server.c:84 +#, c-format +msgid "" +"Copyright (C) %s jeanfi@gmail.com\n" +"License GPLv2: GNU GPL version 2 or later \n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +msgstr "" + +#: src/server/server.c:96 +msgid "" +"psensor-server is an HTTP server for monitoring hardware sensors remotely." +msgstr "" + +#: src/server/server.c:101 +msgid "" +" -h, --help\t\tdisplay this help and exit\n" +" -v, --version\t\tdisplay version information and exit" +msgstr "" + +#: src/server/server.c:105 +msgid "" +" -p,--port=PORT\twebserver port\n" +" -w,--wdir=DIR\t\tdirectory containing webserver pages" +msgstr "" + +#: src/server/server.c:109 +msgid " -d, --debug=LEVEL set the debug level, integer between 0 and 3" +msgstr "" + +#: src/server/server.c:111 +msgid " -l, --log-file=PATH set the log file to PATH" +msgstr "" + +#: src/server/server.c:112 +msgid " --sensor-log-file=PATH set the sensor log file to PATH" +msgstr "" + +#: src/server/server.c:113 +msgid " --sensor-log-interval=S set the sensor log interval to S (seconds)" +msgstr "" + +#: src/server/server.c:297 +#, c-format +msgid "HTTP Request: %s" +msgstr "" + +#: src/server/server.c:360 +#, c-format +msgid "Enables debug mode: %d" +msgstr "" + +#: src/server/server.c:402 +msgid "No sensors detected." +msgstr "" + +#: src/server/server.c:409 +msgid "Failed to create Web server." +msgstr "" + +#: src/server/server.c:413 +#, c-format +msgid "Web server started on port: %d" +msgstr "" + +#: src/server/server.c:414 +#, c-format +msgid "WWW directory: %s" +msgstr "" + +#: src/server/server.c:415 +#, c-format +msgid "URL: http://localhost:%d" +msgstr "" + +#: src/server/server.c:425 +msgid "Failed to activate logging of sensors." +msgstr "" + +#: src/ui.c:84 +msgid "Psensor is a GTK+ application for monitoring hardware sensors" +msgstr "" + +#: src/ui.c:87 +msgid "" +"Copyright(c) 2010-2013\n" +"jeanfi@gmail.com" +msgstr "" + +#: src/ui.c:90 +msgid "About Psensor" +msgstr "" + +#: src/ui.c:93 +msgid "Psensor Homepage" +msgstr "" + +#: src/ui.c:217 +msgid "Failed to load Psensor icon." +msgstr "" + +#: src/ui_sensorlist.c:245 +msgid "Select foreground color" +msgstr "" + +#: src/ui_sensorlist.c:297 +msgid "Sensor" +msgstr "" + +#: src/ui_sensorlist.c:303 +msgid "Value" +msgstr "" + +#: src/ui_sensorlist.c:309 +msgid "Min" +msgstr "" + +#: src/ui_sensorlist.c:315 +msgid "Max" +msgstr "" + +#: src/ui_sensorlist.c:322 +msgid "Color" +msgstr "" + +#: src/ui_appindicator.c:106 +msgid "_Show" +msgstr "" + +#: src/ui_appindicator.c:107 +msgid "Show" +msgstr "" + +#: src/ui_appindicator.c:111 +msgid "_Preferences" +msgstr "" + +#: src/ui_appindicator.c:116 +msgid "S_ensor Preferences" +msgstr "" + +#: src/ui_appindicator.c:118 +msgid "SensorPreferences" +msgstr "" + +#: src/ui_appindicator.c:122 +msgid "_About" +msgstr "" + +#: src/ui_appindicator.c:129 +msgid "_Quit" +msgstr "" + +#: src/ui_appindicator.c:220 +#, c-format +msgid "building menus failed: %s" +msgstr "" + +#: src/ui_notify.c:48 +msgid "gettimeofday failed." +msgstr "" + +#: src/ui_notify.c:77 +msgid "Temperature alert" +msgstr "" + +#: src/ui_notify.c:79 +msgid "Fan alert" +msgstr "" + +#: src/ui_sensorpref.c:248 +msgid "Unknown" +msgstr "" diff --git a/po/sr.gmo b/po/sr.gmo new file mode 100644 index 0000000..d5cfaa6 Binary files /dev/null and b/po/sr.gmo differ diff --git a/po/sr.po b/po/sr.po new file mode 100644 index 0000000..decb6d7 --- /dev/null +++ b/po/sr.po @@ -0,0 +1,626 @@ +# Serbian translation for psensor +# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011 +# This file is distributed under the same license as the psensor package. +# Maintained by Jean-Philippe Orsini +# +msgid "" +msgstr "" +"Project-Id-Version: psensor\n" +"Report-Msgid-Bugs-To: jeanfi@gmail.com\n" +"POT-Creation-Date: 2013-10-16 09:19+0200\n" +"PO-Revision-Date: 2012-05-03 02:31+0000\n" +"Last-Translator: Мирослав Николић \n" +"Language-Team: Serbian \n" +"Language: sr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2012-07-02 08:28+0000\n" +"X-Generator: Launchpad (build 15520)\n" + +#: src/glade/psensor.glade:5 src/ui_appindicator.c:124 +msgid "About" +msgstr "О програму" + +#: src/glade/psensor.glade:9 src/ui_sensorlist.c:209 src/ui_appindicator.c:112 +msgid "Preferences" +msgstr "Поставке" + +#: src/glade/psensor.glade:13 src/ui_appindicator.c:130 +msgid "Quit" +msgstr "Изађи" + +#: src/glade/psensor.glade:17 +msgid "Sensor Preferences" +msgstr "" + +#: src/glade/psensor.glade:96 +msgid "Psensor - Temperature Monitor" +msgstr "" + +#: src/glade/psensor.glade:111 +msgid "_Psensor" +msgstr "" + +#: src/glade/psensor.glade:158 +msgid "_Help" +msgstr "" + +#: src/glade/psensor-pref.glade:7 +msgid "Edit Preferences" +msgstr "" + +#: src/glade/psensor-pref.glade:72 +msgid "Position of sensors table:" +msgstr "" + +#: src/glade/psensor-pref.glade:81 +msgid "Hide window decoration" +msgstr "" + +#: src/glade/psensor-pref.glade:98 +msgid "Keep window below" +msgstr "" + +#: src/glade/psensor-pref.glade:115 +msgid "Enable menu" +msgstr "Укључено" + +#: src/glade/psensor-pref.glade:132 +msgid "Enable Unity Launcher counter" +msgstr "" + +#: src/glade/psensor-pref.glade:149 +msgid "Hide window on startup" +msgstr "" + +#: src/glade/psensor-pref.glade:166 +msgid "Restore window position and size" +msgstr "" + +#: src/glade/psensor-pref.glade:186 +msgid "Temperature unit:" +msgstr "" + +#: src/glade/psensor-pref.glade:238 +msgid "Interface" +msgstr "" + +#: src/glade/psensor-pref.glade:276 +msgid "Foreground:" +msgstr "" + +#: src/glade/psensor-pref.glade:291 +msgid "Background:" +msgstr "" + +#: src/glade/psensor-pref.glade:325 +msgid "Background opacity:" +msgstr "" + +#: src/glade/psensor-pref.glade:348 +msgid "Min" +msgstr "" + +#: src/glade/psensor-pref.glade:375 +msgid "Max" +msgstr "" + +#: src/glade/psensor-pref.glade:401 +msgid "Colors" +msgstr "У боји" + +#: src/glade/psensor-pref.glade:419 +msgid "Monitoring duration:" +msgstr "" + +#: src/glade/psensor-pref.glade:457 +msgid "minute(s)" +msgstr "" + +#: src/glade/psensor-pref.glade:474 src/glade/psensor-pref.glade:626 +msgid "second(s)" +msgstr "" + +#: src/glade/psensor-pref.glade:510 +msgid "Update interval:" +msgstr "" + +#: src/glade/psensor-pref.glade:528 +msgid "Measures" +msgstr "" + +#: src/glade/psensor-pref.glade:564 src/glade/sensor-edit.glade:169 +#: src/ui_sensorlist.c:334 +msgid "Graph" +msgstr "" + +#: src/glade/psensor-pref.glade:588 +msgid "Measure update interval:" +msgstr "" + +#: src/glade/psensor-pref.glade:637 +msgid "Enable sensors logging" +msgstr "" + +#: src/glade/psensor-pref.glade:684 +msgid "Sensors logging interval" +msgstr "" + +#: src/glade/psensor-pref.glade:701 +msgid "seconds(s)" +msgstr "" + +#: src/glade/psensor-pref.glade:718 +msgid "Script executed when an alarm is raised" +msgstr "" + +#: src/glade/psensor-pref.glade:751 +msgid "Sensors" +msgstr "Сензор" + +#: src/glade/sensor-edit.glade:19 +msgid "Edit Sensor Preferences" +msgstr "" + +#: src/glade/sensor-edit.glade:87 +msgid "Name" +msgstr "" + +#: src/glade/sensor-edit.glade:138 +msgid "Type:" +msgstr "" + +#: src/glade/sensor-edit.glade:153 src/glade/sensor-edit.glade:294 +#: src/glade/sensor-edit.glade:388 src/glade/sensor-edit.glade:459 +#: src/glade/sensor-edit.glade:508 src/lib/psensor.c:486 src/ui_notify.c:81 +msgid "N/A" +msgstr "Недоступно" + +#: src/glade/sensor-edit.glade:187 +msgid "Color:" +msgstr "" + +#: src/glade/sensor-edit.glade:201 +msgid "Alarm" +msgstr "" + +#: src/glade/sensor-edit.glade:216 +msgid "Activate desktop notifications" +msgstr "" + +#: src/glade/sensor-edit.glade:236 +msgid "Sensor Information" +msgstr "" + +#: src/glade/sensor-edit.glade:249 +msgid "Draw sensor curve" +msgstr "" + +#: src/glade/sensor-edit.glade:333 +msgid "High threshold:" +msgstr "" + +#: src/glade/sensor-edit.glade:348 +msgid "Low threshold:" +msgstr "" + +#: src/glade/sensor-edit.glade:409 +msgid "Ubuntu Application Indicator" +msgstr "" + +#: src/glade/sensor-edit.glade:424 +msgid "Display sensor in the Application Indicator menu" +msgstr "" + +#: src/glade/sensor-edit.glade:444 +msgid "Chip:" +msgstr "" + +#: src/glade/sensor-edit.glade:489 +msgid "Id:" +msgstr "" + +#: src/glade/sensor-edit.glade:523 +msgid "Details" +msgstr "" + +#: src/glade/sensor-edit.glade:541 +msgid "Name:" +msgstr "" + +#: src/lib/amd.c:170 +msgid "AMD: cannot found ADL library." +msgstr "" + +#: src/lib/amd.c:197 +msgid "AMD: missing ADL's API." +msgstr "" + +#: src/lib/amd.c:207 +msgid "AMD: failed to initialize ADL." +msgstr "" + +#: src/lib/amd.c:213 +msgid "AMD: cannot get the number of adapters." +msgstr "" + +#: src/lib/amd.c:252 +#, c-format +msgid "Number of AMD/ATI adapters: %d" +msgstr "" + +#: src/lib/amd.c:253 +#, c-format +msgid "Number of active AMD/ATI adapters: %d" +msgstr "" + +#: src/lib/hdd_atasmart.c:152 +#, c-format +msgid "atasmart: sk_disk_open() failure: %s." +msgstr "" + +#: src/lib/hdd_hddtemp.c:59 +msgid "hddtemp: failed to open socket." +msgstr "" + +#: src/lib/hdd_hddtemp.c:72 +msgid "hddtemp: failed to open connection." +msgstr "" + +#: src/lib/hdd_hddtemp.c:186 src/lib/hdd_hddtemp.c:256 +#, c-format +msgid "hddtemp: wrong string: %s." +msgstr "" + +#: src/lib/lmsensor.c:42 +#, c-format +msgid "lmsensor: cannot get value of subfeature %s: %s." +msgstr "" + +#: src/lib/lmsensor.c:123 +msgid "lmsensor: lmsensor_psensor_create failure: wrong feature type." +msgstr "" + +#: src/lib/lmsensor.c:218 +#, c-format +msgid "lmsensor: initialization failure: %s." +msgstr "" + +#: src/lib/log.c:43 +#, c-format +msgid "Cannot open log file: %s" +msgstr "" + +#: src/lib/nvidia.c:54 +msgid "" +"NVIDIA proprietary driver not used or cannot retrieve NVIDIA GPU temperature." +msgstr "" + +#: src/lib/nvidia.c:97 +msgid "Cannot open connection to X11 server." +msgstr "" + +#: src/lib/nvidia.c:105 +msgid "Failed to retrieve NVIDIA information." +msgstr "" + +#: src/lib/psensor.c:482 tests/test_psensor_type_to_unit_str.c:62 +msgid "RPM" +msgstr "" + +#: src/lib/psensor.c:484 +msgid "%" +msgstr "" + +#: src/lib/slog.c:68 +msgid "HOME variable not set." +msgstr "" + +#: src/lib/slog.c:78 +msgid "Sensor log file already open." +msgstr "" + +#: src/lib/slog.c:87 +#, c-format +msgid "Cannot open sensor log file: %s." +msgstr "" + +#: src/lib/slog.c:118 +msgid "Sensor log file not open." +msgstr "" + +#: src/lib/slog.c:174 +msgid "Sensor log not open, cannot close." +msgstr "" + +#: src/main.c:77 +#, c-format +msgid "" +"Copyright (C) %s jeanfi@gmail.com\n" +"License GPLv2: GNU GPL version 2 or later \n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +msgstr "" + +#: src/main.c:88 src/server/server.c:94 +#, c-format +msgid "Usage: %s [OPTION]...\n" +msgstr "Употреба: %s [ОПЦИЈА]...\n" + +#: src/main.c:90 +msgid "" +"Psensor is a GTK+ application for monitoring hardware sensors, including " +"temperatures and fan speeds." +msgstr "" + +#: src/main.c:94 +msgid "Options:" +msgstr "Опције:" + +#: src/main.c:95 +msgid "" +" -h, --help display this help and exit\n" +" -v, --version display version information and exit" +msgstr "" + +#: src/main.c:101 +msgid "" +" -u, --url=URL the URL of the psensor-server,\n" +" example: http://hostname:3131" +msgstr "" + +#: src/main.c:104 +msgid "" +" --use-libatasmart use atasmart library for disk monitoring instead of\n" +" hddtemp daemon" +msgstr "" + +#: src/main.c:107 +msgid " -n, --new-instance force the creation of a new Psensor application" +msgstr "" + +#: src/main.c:110 +msgid " -d, --debug=LEVEL set the debug level, integer between 0 and 3" +msgstr "" + +#: src/main.c:115 src/server/server.c:117 +#, c-format +msgid "Report bugs to: %s\n" +msgstr "Пријавите грешку на: %s\n" + +#: src/main.c:117 src/server/server.c:119 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "%s матична страна: <%s>\n" + +#: src/main.c:454 +msgid "Psensor has not been compiled with remote sensor support." +msgstr "" + +#: src/main.c:517 +msgid "Enables debug mode." +msgstr "" + +#: src/main.c:529 src/server/server.c:380 +#, c-format +msgid "Try `%s --help' for more information.\n" +msgstr "Покушајте„%s --help“ за више информација.\n" + +#: src/main.c:542 +msgid "A Psensor instance already exists." +msgstr "" + +#: src/rsensor.c:107 +#, c-format +msgid "Fail to connect to: %s" +msgstr "" + +#: src/rsensor.c:144 +#, c-format +msgid "Invalid content: %s" +msgstr "" + +#: src/rsensor.c:184 +#, c-format +msgid "Invalid JSON: %s" +msgstr "" + +#: src/server/server.c:54 +msgid "

Server stop requested

" +msgstr "" + +#: src/server/server.c:60 +msgid "" +"

Page not found - Go to Main page

" +msgstr "" + +#: src/server/server.c:84 +#, c-format +msgid "" +"Copyright (C) %s jeanfi@gmail.com\n" +"License GPLv2: GNU GPL version 2 or later \n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +msgstr "" + +#: src/server/server.c:96 +msgid "" +"psensor-server is an HTTP server for monitoring hardware sensors remotely." +msgstr "" + +#: src/server/server.c:101 +msgid "" +" -h, --help\t\tdisplay this help and exit\n" +" -v, --version\t\tdisplay version information and exit" +msgstr "" + +#: src/server/server.c:105 +msgid "" +" -p,--port=PORT\twebserver port\n" +" -w,--wdir=DIR\t\tdirectory containing webserver pages" +msgstr "" + +#: src/server/server.c:109 +msgid " -d, --debug=LEVEL set the debug level, integer between 0 and 3" +msgstr "" + +#: src/server/server.c:111 +msgid " -l, --log-file=PATH set the log file to PATH" +msgstr "" + +#: src/server/server.c:112 +msgid " --sensor-log-file=PATH set the sensor log file to PATH" +msgstr "" + +#: src/server/server.c:113 +msgid " --sensor-log-interval=S set the sensor log interval to S (seconds)" +msgstr "" + +#: src/server/server.c:297 +#, c-format +msgid "HTTP Request: %s" +msgstr "" + +#: src/server/server.c:360 +#, c-format +msgid "Enables debug mode: %d" +msgstr "" + +#: src/server/server.c:402 +msgid "No sensors detected." +msgstr "" + +#: src/server/server.c:409 +msgid "Failed to create Web server." +msgstr "" + +#: src/server/server.c:413 +#, c-format +msgid "Web server started on port: %d" +msgstr "" + +#: src/server/server.c:414 +#, c-format +msgid "WWW directory: %s" +msgstr "" + +#: src/server/server.c:415 +#, c-format +msgid "URL: http://localhost:%d" +msgstr "" + +#: src/server/server.c:425 +msgid "Failed to activate logging of sensors." +msgstr "" + +#: src/ui.c:84 +msgid "Psensor is a GTK+ application for monitoring hardware sensors" +msgstr "" + +#: src/ui.c:87 +msgid "" +"Copyright(c) 2010-2013\n" +"jeanfi@gmail.com" +msgstr "" + +#: src/ui.c:90 +msgid "About Psensor" +msgstr "О Псензору" + +#: src/ui.c:93 +msgid "Psensor Homepage" +msgstr "Матична страница Псензора" + +#: src/ui.c:217 +msgid "Failed to load Psensor icon." +msgstr "" + +#: src/ui_sensorlist.c:245 +msgid "Select foreground color" +msgstr "Одаберите боју текста" + +#: src/ui_sensorlist.c:297 +msgid "Sensor" +msgstr "Сензор" + +#: src/ui_sensorlist.c:303 +msgid "Value" +msgstr "" + +#: src/ui_sensorlist.c:309 +msgid "Min" +msgstr "Најмање" + +#: src/ui_sensorlist.c:315 +msgid "Max" +msgstr "Највише" + +#: src/ui_sensorlist.c:322 +msgid "Color" +msgstr "У боји" + +#: src/ui_appindicator.c:106 +msgid "_Show" +msgstr "" + +#: src/ui_appindicator.c:107 +msgid "Show" +msgstr "" + +#: src/ui_appindicator.c:111 +msgid "_Preferences" +msgstr "_Поставке" + +#: src/ui_appindicator.c:116 +msgid "S_ensor Preferences" +msgstr "" + +#: src/ui_appindicator.c:118 +msgid "SensorPreferences" +msgstr "" + +#: src/ui_appindicator.c:122 +msgid "_About" +msgstr "О _програму" + +#: src/ui_appindicator.c:129 +msgid "_Quit" +msgstr "_Изађи" + +#: src/ui_appindicator.c:220 +#, c-format +msgid "building menus failed: %s" +msgstr "" + +#: src/ui_notify.c:48 +msgid "gettimeofday failed." +msgstr "" + +#: src/ui_notify.c:77 +msgid "Temperature alert" +msgstr "" + +#: src/ui_notify.c:79 +msgid "Fan alert" +msgstr "" + +#: src/ui_sensorpref.c:248 +msgid "Unknown" +msgstr "" + +#~ msgid "Sensor Name" +#~ msgstr "Назив сензора" + +#~ msgid "Enabled" +#~ msgstr "Укључено" + +#, fuzzy +#~ msgid "Enable log of measures" +#~ msgstr "Укључено" + +#, fuzzy +#~ msgid "Enable indicator" +#~ msgstr "Укључено" diff --git a/po/tr.gmo b/po/tr.gmo index 6d8e076..3bb90cd 100644 Binary files a/po/tr.gmo and b/po/tr.gmo differ diff --git a/po/tr.po b/po/tr.po index 70806e9..47c13c4 100644 --- a/po/tr.po +++ b/po/tr.po @@ -7,499 +7,609 @@ msgid "" msgstr "" "Project-Id-Version: psensor\n" "Report-Msgid-Bugs-To: jeanfi@gmail.com\n" -"POT-Creation-Date: 2012-03-26 10:30+0200\n" -"PO-Revision-Date: 2011-04-10 13:11+0000\n" +"POT-Creation-Date: 2013-10-16 09:19+0200\n" +"PO-Revision-Date: 2012-04-28 11:24+0000\n" "Last-Translator: zeugma \n" "Language-Team: Turkish \n" "Language: tr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-04-11 05:41+0000\n" -"X-Generator: Launchpad (build 12735)\n" +"X-Launchpad-Export-Date: 2012-07-02 08:28+0000\n" +"X-Generator: Launchpad (build 15520)\n" -#: src/main.c:77 -#, c-format -msgid "" -"Copyright (C) %s jeanfi@gmail.com\n" -"License GPLv2: GNU GPL version 2 or later \n" -"This is free software: you are free to change and redistribute it.\n" -"There is NO WARRANTY, to the extent permitted by law.\n" +#: src/glade/psensor.glade:5 src/ui_appindicator.c:124 +msgid "About" msgstr "" -#: src/main.c:88 src/server/server.c:86 -#, c-format -msgid "Usage: %s [OPTION]...\n" -msgstr "Kullanım: %s [SEÇENEK]...\n" +#: src/glade/psensor.glade:9 src/ui_sensorlist.c:209 src/ui_appindicator.c:112 +msgid "Preferences" +msgstr "Tercihler" -#: src/main.c:90 -msgid "" -"psensor is a GTK application for monitoring hardware sensors, including " -"temperatures and fan speeds." +#: src/glade/psensor.glade:13 src/ui_appindicator.c:130 +msgid "Quit" msgstr "" -#: src/main.c:94 -msgid "Options:" -msgstr "" +#: src/glade/psensor.glade:17 +msgid "Sensor Preferences" +msgstr "Tercihleri düzenle" -#: src/main.c:95 -msgid "" -" -h, --help display this help and exit\n" -" -v, --version display version information and exit" +#: src/glade/psensor.glade:96 +msgid "Psensor - Temperature Monitor" msgstr "" -#: src/main.c:100 -msgid "" -" -u, --url=URL the URL of the psensor-server, example: http://" -"hostname:3131" +#: src/glade/psensor.glade:111 +msgid "_Psensor" msgstr "" -#: src/main.c:105 -msgid " -d, --debug=LEVEL set the debug level, integer between 0 and 3" +#: src/glade/psensor.glade:158 +msgid "_Help" msgstr "" -#: src/main.c:110 src/server/server.c:104 -#, c-format -msgid "Report bugs to: %s\n" -msgstr "Hataları rapor et:%s\n" +#: src/glade/psensor-pref.glade:7 +msgid "Edit Preferences" +msgstr "Tercihleri düzenle" -#: src/main.c:112 src/server/server.c:106 -#, c-format -msgid "%s home page: <%s>\n" -msgstr "%s ana sayfa: <%s>\n" +#: src/glade/psensor-pref.glade:72 +msgid "Position of sensors table:" +msgstr "" -#: src/main.c:425 -msgid "Enables debug mode." +#: src/glade/psensor-pref.glade:81 +msgid "Hide window decoration" msgstr "" -#: src/main.c:434 src/server/server.c:352 -#, c-format -msgid "Try `%s --help' for more information.\n" -msgstr "Daha fazla bilgi için `%s --help' yazın.\n" +#: src/glade/psensor-pref.glade:98 +msgid "Keep window below" +msgstr "" -#: src/main.c:469 -#, c-format -msgid "ERROR: Not compiled with remote sensor support.\n" +#: src/glade/psensor-pref.glade:115 +msgid "Enable menu" msgstr "" -#: src/ui.c:80 -msgid "Psensor is a GTK+ application for monitoring hardware sensors" +#: src/glade/psensor-pref.glade:132 +msgid "Enable Unity Launcher counter" msgstr "" -#: src/ui.c:83 -msgid "" -"Copyright(c) 2010-2012\n" -"jeanfi@gmail.com" +#: src/glade/psensor-pref.glade:149 +msgid "Hide window on startup" msgstr "" -#: src/ui.c:86 -msgid "About Psensor" +#: src/glade/psensor-pref.glade:166 +msgid "Restore window position and size" msgstr "" -#: src/ui.c:89 -msgid "Psensor Homepage" +#: src/glade/psensor-pref.glade:186 +msgid "Temperature unit:" msgstr "" -#: src/ui.c:144 -#, fuzzy -msgid "_Preferences" -msgstr "Tercihler" +#: src/glade/psensor-pref.glade:238 +msgid "Interface" +msgstr "Arayüz" -#: src/ui.c:145 src/ui_sensorlist.c:200 -msgid "Preferences" -msgstr "Tercihler" +#: src/glade/psensor-pref.glade:276 +msgid "Foreground:" +msgstr "" -#: src/ui.c:149 -#, fuzzy -msgid "_Sensor Preferences" -msgstr "Tercihleri düzenle" +#: src/glade/psensor-pref.glade:291 +msgid "Background:" +msgstr "Arkaplan:" -#: src/ui.c:150 -#, fuzzy -msgid "Sensor Preferences" -msgstr "Tercihleri düzenle" +#: src/glade/psensor-pref.glade:325 +msgid "Background opacity:" +msgstr "Arkaplan belirginliği:" -#: src/ui.c:154 -msgid "_Quit" +#: src/glade/psensor-pref.glade:348 +msgid "Min" msgstr "" -#: src/ui.c:154 -msgid "Quit" +#: src/glade/psensor-pref.glade:375 +msgid "Max" msgstr "" -#: src/ui.c:160 -msgid "_About" +#: src/glade/psensor-pref.glade:401 +msgid "Colors" +msgstr "Renk" + +#: src/glade/psensor-pref.glade:419 +msgid "Monitoring duration:" msgstr "" -#: src/ui.c:161 -msgid "About" +#: src/glade/psensor-pref.glade:457 +msgid "minute(s)" msgstr "" -#: src/ui.c:183 src/ui_appindicator.c:176 -#, c-format -msgid "building menus failed: %s" +#: src/glade/psensor-pref.glade:474 src/glade/psensor-pref.glade:626 +msgid "second(s)" msgstr "" -#: src/ui.c:231 -msgid "Psensor - Temperature Monitor" +#: src/glade/psensor-pref.glade:510 +msgid "Update interval:" msgstr "" -#: src/ui.c:248 -#, c-format -msgid "ERROR: Failed to load psensor icon.\n" +#: src/glade/psensor-pref.glade:528 +msgid "Measures" msgstr "" -#: src/ui_sensorlist.c:231 -msgid "Select foreground color" +#: src/glade/psensor-pref.glade:564 src/glade/sensor-edit.glade:169 +#: src/ui_sensorlist.c:334 +msgid "Graph" +msgstr "Grafik" + +#: src/glade/psensor-pref.glade:588 +msgid "Measure update interval:" msgstr "" -#: src/ui_sensorlist.c:308 src/glade/psensor-pref.glade:241 -msgid "Sensor" -msgstr "Algılayıcı" +#: src/glade/psensor-pref.glade:637 +msgid "Enable sensors logging" +msgstr "" -#: src/ui_sensorlist.c:314 -msgid "Value" +#: src/glade/psensor-pref.glade:684 +msgid "Sensors logging interval" msgstr "" -#: src/ui_sensorlist.c:320 -msgid "Min" +#: src/glade/psensor-pref.glade:701 +msgid "seconds(s)" msgstr "" -#: src/ui_sensorlist.c:326 -msgid "Max" +#: src/glade/psensor-pref.glade:718 +msgid "Script executed when an alarm is raised" msgstr "" -#: src/ui_sensorlist.c:333 -msgid "Color" -msgstr "Renk" +#: src/glade/psensor-pref.glade:751 +msgid "Sensors" +msgstr "Algılayıcı" -#: src/ui_sensorlist.c:345 -msgid "Enabled" +#: src/glade/sensor-edit.glade:19 +msgid "Edit Sensor Preferences" +msgstr "Tercihleri düzenle" + +#: src/glade/sensor-edit.glade:87 +msgid "Name" msgstr "" -#: src/ui_sensorlist.c:374 src/ui_sensorlist.c:375 src/ui_sensorlist.c:376 -#: src/glade/sensor-edit.glade:87 src/glade/sensor-edit.glade:153 +#: src/glade/sensor-edit.glade:138 +msgid "Type:" +msgstr "Tür:" + +#: src/glade/sensor-edit.glade:153 src/glade/sensor-edit.glade:294 +#: src/glade/sensor-edit.glade:388 src/glade/sensor-edit.glade:459 +#: src/glade/sensor-edit.glade:508 src/lib/psensor.c:486 src/ui_notify.c:81 msgid "N/A" msgstr "" -#: src/ui_notify.c:45 -msgid "gettimeofday failed" +#: src/glade/sensor-edit.glade:187 +msgid "Color:" +msgstr "Renk :" + +#: src/glade/sensor-edit.glade:201 +msgid "Alarm" +msgstr "Alarm" + +#: src/glade/sensor-edit.glade:216 +msgid "Activate desktop notifications" msgstr "" -#: src/ui_notify.c:67 src/ui_notify.c:69 -msgid "Temperature alert" +#: src/glade/sensor-edit.glade:236 +msgid "Sensor Information" msgstr "" -#: src/ui_sensorpref.c:397 -#, fuzzy -msgid "Sensor Name" -msgstr "Algılayıcı" +#: src/glade/sensor-edit.glade:249 +msgid "Draw sensor curve" +msgstr "" -#: src/rsensor.c:107 -#, c-format -msgid "Fail to connect to: %s" +#: src/glade/sensor-edit.glade:333 +msgid "High threshold:" msgstr "" -#: src/rsensor.c:144 -#, c-format -msgid "Invalid content: %s" +#: src/glade/sensor-edit.glade:348 +msgid "Low threshold:" msgstr "" -#: src/rsensor.c:184 -#, c-format -msgid "Invalid JSON: %s" +#: src/glade/sensor-edit.glade:409 +msgid "Ubuntu Application Indicator" msgstr "" -#: src/server/server.c:53 -msgid "" -"

Page not found - Go to Main page

" +#: src/glade/sensor-edit.glade:424 +msgid "Display sensor in the Application Indicator menu" msgstr "" -#: src/server/server.c:76 -#, c-format -msgid "" -"Copyright (C) %s jeanfi@gmail.com\n" -"License GPLv2: GNU GPL version 2 or later \n" -"This is free software: you are free to change and redistribute it.\n" -"There is NO WARRANTY, to the extent permitted by law.\n" +#: src/glade/sensor-edit.glade:444 +msgid "Chip:" msgstr "" -#: src/server/server.c:88 -msgid "" -"psensor-server is an HTTP server for monitoring hardware sensors remotely." +#: src/glade/sensor-edit.glade:489 +msgid "Id:" msgstr "" -#: src/server/server.c:93 -msgid "" -" -h, --help\t\tdisplay this help and exit\n" -" -v, --version\t\tdisplay version information and exit" +#: src/glade/sensor-edit.glade:523 +msgid "Details" msgstr "" -#: src/server/server.c:98 -msgid "" -" -d,--debug\t\trun in debug mode\n" -" -p,--port=PORT\twebserver port\n" -" -w,--wdir=DIR\t\tdirectory containing webserver pages" +#: src/glade/sensor-edit.glade:541 +msgid "Name:" +msgstr "Ä°sim:" + +#: src/lib/amd.c:170 +msgid "AMD: cannot found ADL library." msgstr "" -#: src/server/server.c:175 -msgid "

Server stop requested

" +#: src/lib/amd.c:197 +msgid "AMD: missing ADL's API." msgstr "" -#: src/server/server.c:290 -#, c-format -msgid "HTTP Request: %s\n" +#: src/lib/amd.c:207 +msgid "AMD: failed to initialize ADL." msgstr "" -#: src/server/server.c:366 -#, c-format -msgid "ERROR: no sensors detected\n" +#: src/lib/amd.c:213 +msgid "AMD: cannot get the number of adapters." msgstr "" -#: src/server/server.c:373 +#: src/lib/amd.c:252 #, c-format -msgid "ERROR: Fail to create web server\n" +msgid "Number of AMD/ATI adapters: %d" msgstr "" -#: src/server/server.c:377 +#: src/lib/amd.c:253 #, c-format -msgid "Web server started on port: %d" +msgid "Number of active AMD/ATI adapters: %d" msgstr "" -#: src/server/server.c:378 +#: src/lib/hdd_atasmart.c:152 #, c-format -msgid "WWW directory: %s" +msgid "atasmart: sk_disk_open() failure: %s." msgstr "" -#: src/server/server.c:379 -#, c-format -msgid "URL: http://localhost:%d" +#: src/lib/hdd_hddtemp.c:59 +msgid "hddtemp: failed to open socket." msgstr "" -#: src/lib/amd.c:151 -#, c-format -msgid "ERROR: ADL library not found!\n" +#: src/lib/hdd_hddtemp.c:72 +msgid "hddtemp: failed to open connection." msgstr "" -#: src/lib/amd.c:176 +#: src/lib/hdd_hddtemp.c:186 src/lib/hdd_hddtemp.c:256 #, c-format -msgid "ERROR: ADL's API is missing!\n" +msgid "hddtemp: wrong string: %s." msgstr "" -#: src/lib/amd.c:185 +#: src/lib/lmsensor.c:42 #, c-format -msgid "ERROR: ADL Initialization Error!\n" +msgid "lmsensor: cannot get value of subfeature %s: %s." msgstr "" -#: src/lib/amd.c:193 -#, c-format -msgid "ERROR: Cannot get the number of adapters!\n" +#: src/lib/lmsensor.c:123 +msgid "lmsensor: lmsensor_psensor_create failure: wrong feature type." msgstr "" -#: src/lib/hdd.c:58 +#: src/lib/lmsensor.c:218 #, c-format -msgid "ERROR: hdd fetch, failed to open socket\n" +msgid "lmsensor: initialization failure: %s." msgstr "" -#: src/lib/hdd.c:72 +#: src/lib/log.c:43 #, c-format -msgid "ERROR: hdd fetch, failed to open connection\n" +msgid "Cannot open log file: %s" msgstr "" -#: src/lib/hdd.c:182 -#, c-format -msgid "ERROR: wrong hdd string: %s" +#: src/lib/nvidia.c:54 +msgid "" +"NVIDIA proprietary driver not used or cannot retrieve NVIDIA GPU temperature." +msgstr "" + +#: src/lib/nvidia.c:97 +msgid "Cannot open connection to X11 server." +msgstr "" + +#: src/lib/nvidia.c:105 +msgid "Failed to retrieve NVIDIA information." msgstr "" -#: src/lib/hdd.c:252 +#: src/lib/psensor.c:482 tests/test_psensor_type_to_unit_str.c:62 +msgid "RPM" +msgstr "" + +#: src/lib/psensor.c:484 +msgid "%" +msgstr "" + +#: src/lib/slog.c:68 +msgid "HOME variable not set." +msgstr "" + +#: src/lib/slog.c:78 +msgid "Sensor log file already open." +msgstr "" + +#: src/lib/slog.c:87 #, c-format -msgid "ERROR: wrong hdd string: %s\n" +msgid "Cannot open sensor log file: %s." msgstr "" -#: src/lib/log.c:37 +#: src/lib/slog.c:118 +msgid "Sensor log file not open." +msgstr "" + +#: src/lib/slog.c:174 +msgid "Sensor log not open, cannot close." +msgstr "" + +#: src/main.c:77 #, c-format -msgid "Cannot open log file: %s" +msgid "" +"Copyright (C) %s jeanfi@gmail.com\n" +"License GPLv2: GNU GPL version 2 or later \n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" msgstr "" -#: src/lib/nvidia.c:54 +#: src/main.c:88 src/server/server.c:94 #, c-format -msgid "ERROR: failed to retrieve nvidia temperature\n" +msgid "Usage: %s [OPTION]...\n" +msgstr "Kullanım: %s [SEÇENEK]...\n" + +#: src/main.c:90 +msgid "" +"Psensor is a GTK+ application for monitoring hardware sensors, including " +"temperatures and fan speeds." +msgstr "" + +#: src/main.c:94 +msgid "Options:" +msgstr "" + +#: src/main.c:95 +msgid "" +" -h, --help display this help and exit\n" +" -v, --version display version information and exit" +msgstr "" + +#: src/main.c:101 +msgid "" +" -u, --url=URL the URL of the psensor-server,\n" +" example: http://hostname:3131" msgstr "" -#: src/lib/nvidia.c:91 +#: src/main.c:104 +msgid "" +" --use-libatasmart use atasmart library for disk monitoring instead of\n" +" hddtemp daemon" +msgstr "" + +#: src/main.c:107 +msgid " -n, --new-instance force the creation of a new Psensor application" +msgstr "" + +#: src/main.c:110 +msgid " -d, --debug=LEVEL set the debug level, integer between 0 and 3" +msgstr "" + +#: src/main.c:115 src/server/server.c:117 +#, c-format +msgid "Report bugs to: %s\n" +msgstr "Hataları rapor et:%s\n" + +#: src/main.c:117 src/server/server.c:119 #, c-format -msgid "ERROR: Cannot open connection to X Server\n" +msgid "%s home page: <%s>\n" +msgstr "%s ana sayfa: <%s>\n" + +#: src/main.c:454 +msgid "Psensor has not been compiled with remote sensor support." +msgstr "" + +#: src/main.c:517 +msgid "Enables debug mode." msgstr "" -#: src/lib/nvidia.c:99 +#: src/main.c:529 src/server/server.c:380 #, c-format -msgid "ERROR: Cannot retrieve NVidia information\n" +msgid "Try `%s --help' for more information.\n" +msgstr "Daha fazla bilgi için `%s --help' yazın.\n" + +#: src/main.c:542 +msgid "A Psensor instance already exists." msgstr "" -#: src/lib/lmsensor.c:43 +#: src/rsensor.c:107 #, c-format -msgid "ERROR: Can't get value of subfeature %s: %s\n" +msgid "Fail to connect to: %s" msgstr "" -#: src/lib/lmsensor.c:125 +#: src/rsensor.c:144 #, c-format -msgid "ERROR: create_sensor, wrong feature type\n" +msgid "Invalid content: %s" msgstr "" -#: src/lib/lmsensor.c:208 +#: src/rsensor.c:184 #, c-format -msgid "ERROR: lm-sensors initialization failure: %s\n" +msgid "Invalid JSON: %s" msgstr "" -#: src/lib/psensor.c:430 -msgid "C" +#: src/server/server.c:54 +msgid "

Server stop requested

" msgstr "" -#: src/lib/psensor.c:433 -msgid "RPM" +#: src/server/server.c:60 +msgid "" +"

Page not found - Go to Main page

" msgstr "" -#: src/lib/psensor.c:436 -msgid "%" +#: src/server/server.c:84 +#, c-format +msgid "" +"Copyright (C) %s jeanfi@gmail.com\n" +"License GPLv2: GNU GPL version 2 or later \n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" msgstr "" -#: src/glade/psensor-pref.glade:7 -msgid "Edit Preferences" -msgstr "Tercihleri düzenle" +#: src/server/server.c:96 +msgid "" +"psensor-server is an HTTP server for monitoring hardware sensors remotely." +msgstr "" -#: src/glade/psensor-pref.glade:70 -msgid "Graph Colors" -msgstr "Grafik Renkleri" +#: src/server/server.c:101 +msgid "" +" -h, --help\t\tdisplay this help and exit\n" +" -v, --version\t\tdisplay version information and exit" +msgstr "" -#: src/glade/psensor-pref.glade:86 -#, fuzzy -msgid "Foreground:" -msgstr "Arkaplan:" +#: src/server/server.c:105 +msgid "" +" -p,--port=PORT\twebserver port\n" +" -w,--wdir=DIR\t\tdirectory containing webserver pages" +msgstr "" -#: src/glade/psensor-pref.glade:100 -msgid "Background:" -msgstr "Arkaplan:" +#: src/server/server.c:109 +msgid " -d, --debug=LEVEL set the debug level, integer between 0 and 3" +msgstr "" -#: src/glade/psensor-pref.glade:114 -msgid "Background opacity:" -msgstr "Arkaplan belirginliği:" +#: src/server/server.c:111 +msgid " -l, --log-file=PATH set the log file to PATH" +msgstr "" -#: src/glade/psensor-pref.glade:165 src/glade/sensor-edit.glade:184 -msgid "Graph" -msgstr "Grafik" +#: src/server/server.c:112 +msgid " --sensor-log-file=PATH set the sensor log file to PATH" +msgstr "" -#: src/glade/psensor-pref.glade:183 -msgid "Update interval:" +#: src/server/server.c:113 +msgid " --sensor-log-interval=S set the sensor log interval to S (seconds)" msgstr "" -#: src/glade/psensor-pref.glade:197 -msgid "Monitoring duration:" +#: src/server/server.c:297 +#, c-format +msgid "HTTP Request: %s" msgstr "" -#: src/glade/psensor-pref.glade:210 src/glade/psensor-pref.glade:272 -msgid "second(s)" +#: src/server/server.c:360 +#, c-format +msgid "Enables debug mode: %d" msgstr "" -#: src/glade/psensor-pref.glade:225 -msgid "minute(s)" +#: src/server/server.c:402 +msgid "No sensors detected." msgstr "" -#: src/glade/psensor-pref.glade:259 -msgid "Measure update interval:" +#: src/server/server.c:409 +msgid "Failed to create Web server." msgstr "" -#: src/glade/psensor-pref.glade:288 -msgid "Interface" -msgstr "Arayüz" +#: src/server/server.c:413 +#, c-format +msgid "Web server started on port: %d" +msgstr "" -#: src/glade/psensor-pref.glade:306 -msgid "Position of sensors table:" +#: src/server/server.c:414 +#, c-format +msgid "WWW directory: %s" msgstr "" -#: src/glade/psensor-pref.glade:317 -msgid "Hide window decoration" +#: src/server/server.c:415 +#, c-format +msgid "URL: http://localhost:%d" msgstr "" -#: src/glade/psensor-pref.glade:335 -msgid "Keep window below" +#: src/server/server.c:425 +msgid "Failed to activate logging of sensors." msgstr "" -#: src/glade/psensor-pref.glade:436 -msgid "Min" +#: src/ui.c:84 +msgid "Psensor is a GTK+ application for monitoring hardware sensors" msgstr "" -#: src/glade/psensor-pref.glade:463 -msgid "Max" +#: src/ui.c:87 +msgid "" +"Copyright(c) 2010-2013\n" +"jeanfi@gmail.com" msgstr "" -#: src/glade/psensor-pref.glade:483 -msgid "Enable menu" +#: src/ui.c:90 +msgid "About Psensor" msgstr "" -#: src/glade/psensor-pref.glade:500 -msgid "Enable Unity Launcher counter" +#: src/ui.c:93 +msgid "Psensor Homepage" msgstr "" -#: src/glade/psensor-pref.glade:518 -msgid "Hide window on startup" +#: src/ui.c:217 +msgid "Failed to load Psensor icon." msgstr "" -#: src/glade/psensor-pref.glade:535 -msgid "Restore window position and size" +#: src/ui_sensorlist.c:245 +msgid "Select foreground color" msgstr "" -#: src/glade/sensor-edit.glade:8 -#, fuzzy -msgid "Edit Sensor Preferences" -msgstr "Tercihleri düzenle" +#: src/ui_sensorlist.c:297 +msgid "Sensor" +msgstr "Algılayıcı" -#: src/glade/sensor-edit.glade:104 -msgid "Name:" -msgstr "İsim:" +#: src/ui_sensorlist.c:303 +msgid "Value" +msgstr "" -#: src/glade/sensor-edit.glade:139 -msgid "Type:" -msgstr "Tür:" +#: src/ui_sensorlist.c:309 +msgid "Min" +msgstr "" -#: src/glade/sensor-edit.glade:169 -msgid "Id:" +#: src/ui_sensorlist.c:315 +msgid "Max" msgstr "" -#: src/glade/sensor-edit.glade:202 -msgid "Color:" -msgstr "Renk :" +#: src/ui_sensorlist.c:322 +msgid "Color" +msgstr "Renk" -#: src/glade/sensor-edit.glade:216 -msgid "Alarm" -msgstr "Alarm" +#: src/ui_appindicator.c:106 +msgid "_Show" +msgstr "" -#: src/glade/sensor-edit.glade:231 -msgid "Activate desktop notifications" +#: src/ui_appindicator.c:107 +msgid "Show" msgstr "" -#: src/glade/sensor-edit.glade:251 -msgid "Temperature limit:" +#: src/ui_appindicator.c:111 +msgid "_Preferences" +msgstr "Tercihler" + +#: src/ui_appindicator.c:116 +msgid "S_ensor Preferences" +msgstr "Tercihleri düzenle" + +#: src/ui_appindicator.c:118 +msgid "SensorPreferences" +msgstr "Tercihleri düzenle" + +#: src/ui_appindicator.c:122 +msgid "_About" msgstr "" -#: src/glade/sensor-edit.glade:266 -msgid "Sensor Information" +#: src/ui_appindicator.c:129 +msgid "_Quit" msgstr "" -#: src/glade/sensor-edit.glade:279 -msgid "Draw sensor curve" +#: src/ui_appindicator.c:220 +#, c-format +msgid "building menus failed: %s" msgstr "" -#: src/glade/sensor-edit.glade:327 -msgid "°C" +#: src/ui_notify.c:48 +msgid "gettimeofday failed." msgstr "" -#~ msgid "Right" -#~ msgstr "Sağ" +#: src/ui_notify.c:77 +msgid "Temperature alert" +msgstr "" -#~ msgid "Left" -#~ msgstr "Sol" +#: src/ui_notify.c:79 +msgid "Fan alert" +msgstr "" + +#: src/ui_sensorpref.c:248 +msgid "Unknown" +msgstr "" -#~ msgid "Top" -#~ msgstr "Üstte" +#~ msgid "Sensor Name" +#~ msgstr "Algılayıcı" diff --git a/po/uk.gmo b/po/uk.gmo new file mode 100644 index 0000000..a8fc5cd Binary files /dev/null and b/po/uk.gmo differ diff --git a/po/uk.po b/po/uk.po new file mode 100644 index 0000000..b2abb0c --- /dev/null +++ b/po/uk.po @@ -0,0 +1,647 @@ +# Ukrainian translation for psensor +# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012 +# This file is distributed under the same license as the psensor package. +# , 2012. +# +msgid "" +msgstr "" +"Project-Id-Version: psensor\n" +"Report-Msgid-Bugs-To: jeanfi@gmail.com\n" +"POT-Creation-Date: 2013-10-16 09:19+0200\n" +"PO-Revision-Date: 2012-10-13 16:24+0000\n" +"Last-Translator: Ilya Volchanetskiy \n" +"Language-Team: Ukrainian \n" +"Language: uk\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-01-21 09:32+0000\n" +"X-Generator: Launchpad (build 16430)\n" + +#: src/glade/psensor.glade:5 src/ui_appindicator.c:124 +msgid "About" +msgstr "Про програму" + +#: src/glade/psensor.glade:9 src/ui_sensorlist.c:209 src/ui_appindicator.c:112 +msgid "Preferences" +msgstr "Налаштування" + +#: src/glade/psensor.glade:13 src/ui_appindicator.c:130 +msgid "Quit" +msgstr "Вихід" + +#: src/glade/psensor.glade:17 +msgid "Sensor Preferences" +msgstr "Налаштування датчиків" + +#: src/glade/psensor.glade:96 +msgid "Psensor - Temperature Monitor" +msgstr "" + +#: src/glade/psensor.glade:111 +msgid "_Psensor" +msgstr "" + +#: src/glade/psensor.glade:158 +msgid "_Help" +msgstr "_Довдіка" + +#: src/glade/psensor-pref.glade:7 +msgid "Edit Preferences" +msgstr "Редагувати налаштування" + +#: src/glade/psensor-pref.glade:72 +msgid "Position of sensors table:" +msgstr "Положення таблиці датчиків:" + +#: src/glade/psensor-pref.glade:81 +msgid "Hide window decoration" +msgstr "Сховати каркас вікна" + +#: src/glade/psensor-pref.glade:98 +msgid "Keep window below" +msgstr "Тримати вікно позаду" + +#: src/glade/psensor-pref.glade:115 +msgid "Enable menu" +msgstr "Увімкнути меню" + +#: src/glade/psensor-pref.glade:132 +msgid "Enable Unity Launcher counter" +msgstr "Увімкнути лічильник на панелі запуску Unity" + +#: src/glade/psensor-pref.glade:149 +msgid "Hide window on startup" +msgstr "Сховати вікно після запуску" + +#: src/glade/psensor-pref.glade:166 +msgid "Restore window position and size" +msgstr "Відновляти позицію і розмір вікна" + +#: src/glade/psensor-pref.glade:186 +msgid "Temperature unit:" +msgstr "Одиниця температури:" + +#: src/glade/psensor-pref.glade:238 +msgid "Interface" +msgstr "Зовнішній вигляд" + +#: src/glade/psensor-pref.glade:276 +msgid "Foreground:" +msgstr "Передній план:" + +#: src/glade/psensor-pref.glade:291 +msgid "Background:" +msgstr "Тло:" + +#: src/glade/psensor-pref.glade:325 +msgid "Background opacity:" +msgstr "Непрозорість тла:" + +#: src/glade/psensor-pref.glade:348 +msgid "Min" +msgstr "Мін." + +#: src/glade/psensor-pref.glade:375 +msgid "Max" +msgstr "Макс." + +#: src/glade/psensor-pref.glade:401 +msgid "Colors" +msgstr "Кольори" + +#: src/glade/psensor-pref.glade:419 +msgid "Monitoring duration:" +msgstr "Тривалість спостереження" + +#: src/glade/psensor-pref.glade:457 +msgid "minute(s)" +msgstr "хв." + +#: src/glade/psensor-pref.glade:474 src/glade/psensor-pref.glade:626 +msgid "second(s)" +msgstr "сек." + +#: src/glade/psensor-pref.glade:510 +msgid "Update interval:" +msgstr "Інтервал оновлення:" + +#: src/glade/psensor-pref.glade:528 +msgid "Measures" +msgstr "Заміри" + +#: src/glade/psensor-pref.glade:564 src/glade/sensor-edit.glade:169 +#: src/ui_sensorlist.c:334 +msgid "Graph" +msgstr "Діаграма" + +#: src/glade/psensor-pref.glade:588 +msgid "Measure update interval:" +msgstr "Інтервал оновлення замірів:" + +#: src/glade/psensor-pref.glade:637 +msgid "Enable sensors logging" +msgstr "" + +#: src/glade/psensor-pref.glade:684 +msgid "Sensors logging interval" +msgstr "" + +#: src/glade/psensor-pref.glade:701 +msgid "seconds(s)" +msgstr "" + +#: src/glade/psensor-pref.glade:718 +msgid "Script executed when an alarm is raised" +msgstr "" + +#: src/glade/psensor-pref.glade:751 +msgid "Sensors" +msgstr "Датчики" + +#: src/glade/sensor-edit.glade:19 +msgid "Edit Sensor Preferences" +msgstr "Редагувати налаштування датчика" + +#: src/glade/sensor-edit.glade:87 +msgid "Name" +msgstr "" + +#: src/glade/sensor-edit.glade:138 +msgid "Type:" +msgstr "Тип:" + +#: src/glade/sensor-edit.glade:153 src/glade/sensor-edit.glade:294 +#: src/glade/sensor-edit.glade:388 src/glade/sensor-edit.glade:459 +#: src/glade/sensor-edit.glade:508 src/lib/psensor.c:486 src/ui_notify.c:81 +msgid "N/A" +msgstr "Н/Д" + +#: src/glade/sensor-edit.glade:187 +msgid "Color:" +msgstr "Колір:" + +#: src/glade/sensor-edit.glade:201 +msgid "Alarm" +msgstr "Оповіщення" + +#: src/glade/sensor-edit.glade:216 +msgid "Activate desktop notifications" +msgstr "Увімкнути оповіщення" + +#: src/glade/sensor-edit.glade:236 +msgid "Sensor Information" +msgstr "Інформація датчика" + +#: src/glade/sensor-edit.glade:249 +msgid "Draw sensor curve" +msgstr "Малювати криву датчика" + +#: src/glade/sensor-edit.glade:333 +msgid "High threshold:" +msgstr "Вищий поріг:" + +#: src/glade/sensor-edit.glade:348 +msgid "Low threshold:" +msgstr "Нижчий поріг:" + +#: src/glade/sensor-edit.glade:409 +msgid "Ubuntu Application Indicator" +msgstr "" + +#: src/glade/sensor-edit.glade:424 +msgid "Display sensor in the Application Indicator menu" +msgstr "" + +#: src/glade/sensor-edit.glade:444 +msgid "Chip:" +msgstr "" + +#: src/glade/sensor-edit.glade:489 +msgid "Id:" +msgstr "Ідентифікатор:" + +#: src/glade/sensor-edit.glade:523 +msgid "Details" +msgstr "Подробиці" + +#: src/glade/sensor-edit.glade:541 +msgid "Name:" +msgstr "Назва:" + +#: src/lib/amd.c:170 +msgid "AMD: cannot found ADL library." +msgstr "AMD: не вдалося знайти бібліотеку ADL." + +#: src/lib/amd.c:197 +msgid "AMD: missing ADL's API." +msgstr "AMD: відсутнє API ADL." + +#: src/lib/amd.c:207 +msgid "AMD: failed to initialize ADL." +msgstr "AMD: не вдалося ініціалізувати ADL." + +#: src/lib/amd.c:213 +msgid "AMD: cannot get the number of adapters." +msgstr "AMD: не вдалося отримати кількість адаптерів." + +#: src/lib/amd.c:252 +#, c-format +msgid "Number of AMD/ATI adapters: %d" +msgstr "" + +#: src/lib/amd.c:253 +#, c-format +msgid "Number of active AMD/ATI adapters: %d" +msgstr "" + +#: src/lib/hdd_atasmart.c:152 +#, c-format +msgid "atasmart: sk_disk_open() failure: %s." +msgstr "atasmart: помилка sk_disk_open(): %s." + +#: src/lib/hdd_hddtemp.c:59 +msgid "hddtemp: failed to open socket." +msgstr "hddtemp: не вдалося відкрити сокет." + +#: src/lib/hdd_hddtemp.c:72 +msgid "hddtemp: failed to open connection." +msgstr "hddtemp: не вдалося встановити з'єднання." + +#: src/lib/hdd_hddtemp.c:186 src/lib/hdd_hddtemp.c:256 +#, c-format +msgid "hddtemp: wrong string: %s." +msgstr "hddtemp: неправильний рядок: %s." + +#: src/lib/lmsensor.c:42 +#, c-format +msgid "lmsensor: cannot get value of subfeature %s: %s." +msgstr "" + +#: src/lib/lmsensor.c:123 +msgid "lmsensor: lmsensor_psensor_create failure: wrong feature type." +msgstr "" + +#: src/lib/lmsensor.c:218 +#, c-format +msgid "lmsensor: initialization failure: %s." +msgstr "lmsensor: помилка ініціалізації: %s." + +#: src/lib/log.c:43 +#, c-format +msgid "Cannot open log file: %s" +msgstr "Не вдалося відкрити лог-файл: %s" + +#: src/lib/nvidia.c:54 +msgid "" +"NVIDIA proprietary driver not used or cannot retrieve NVIDIA GPU temperature." +msgstr "" + +#: src/lib/nvidia.c:97 +msgid "Cannot open connection to X11 server." +msgstr "Не вдалося встановити з'єднання до сервера X11." + +#: src/lib/nvidia.c:105 +msgid "Failed to retrieve NVIDIA information." +msgstr "Не вдалося отримати інформацію NVIDIA." + +#: src/lib/psensor.c:482 tests/test_psensor_type_to_unit_str.c:62 +msgid "RPM" +msgstr "об/хв" + +#: src/lib/psensor.c:484 +msgid "%" +msgstr "%" + +#: src/lib/slog.c:68 +msgid "HOME variable not set." +msgstr "Змінна HOME не встановлена." + +#: src/lib/slog.c:78 +msgid "Sensor log file already open." +msgstr "" + +#: src/lib/slog.c:87 +#, c-format +msgid "Cannot open sensor log file: %s." +msgstr "" + +#: src/lib/slog.c:118 +msgid "Sensor log file not open." +msgstr "" + +#: src/lib/slog.c:174 +msgid "Sensor log not open, cannot close." +msgstr "" + +#: src/main.c:77 +#, c-format +msgid "" +"Copyright (C) %s jeanfi@gmail.com\n" +"License GPLv2: GNU GPL version 2 or later \n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +msgstr "" + +#: src/main.c:88 src/server/server.c:94 +#, c-format +msgid "Usage: %s [OPTION]...\n" +msgstr "Використання: %s [КЛЮЧ]...\n" + +#: src/main.c:90 +msgid "" +"Psensor is a GTK+ application for monitoring hardware sensors, including " +"temperatures and fan speeds." +msgstr "" + +#: src/main.c:94 +msgid "Options:" +msgstr "Опції:" + +#: src/main.c:95 +msgid "" +" -h, --help display this help and exit\n" +" -v, --version display version information and exit" +msgstr "" +" -h, --help показати цю довідку і вийти\n" +" -v, --version показати версію і вийти" + +#: src/main.c:101 +msgid "" +" -u, --url=URL the URL of the psensor-server,\n" +" example: http://hostname:3131" +msgstr "" +" -u, --url=URL URL psensor-сервера, наприклад: http://hostname:3131" + +#: src/main.c:104 +msgid "" +" --use-libatasmart use atasmart library for disk monitoring instead of\n" +" hddtemp daemon" +msgstr "" +" --use-libatasmart використовувати бібліотеку atasmart для моніторингу\n" +"дисків замість демона hddtemp" + +#: src/main.c:107 +msgid " -n, --new-instance force the creation of a new Psensor application" +msgstr " -n, --new-instance примусово створювати нову копію програми Psensor" + +#: src/main.c:110 +msgid " -d, --debug=LEVEL set the debug level, integer between 0 and 3" +msgstr " -d, --debug=РІВЕНЬ встановити рівень налагодження, ціле між 0 та 3" + +#: src/main.c:115 src/server/server.c:117 +#, c-format +msgid "Report bugs to: %s\n" +msgstr "Звітуйте про помилки до: %s\n" + +#: src/main.c:117 src/server/server.c:119 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "%s домашня сторінка: <%s>\n" + +#: src/main.c:454 +msgid "Psensor has not been compiled with remote sensor support." +msgstr "Psensor не був зібраний з підтримкою віддалених датчиків." + +#: src/main.c:517 +msgid "Enables debug mode." +msgstr "Включає режим налагодження." + +#: src/main.c:529 src/server/server.c:380 +#, c-format +msgid "Try `%s --help' for more information.\n" +msgstr "Спробуйте `%s --help' щоб отримати більше інформації.\n" + +#: src/main.c:542 +msgid "A Psensor instance already exists." +msgstr "" + +#: src/rsensor.c:107 +#, c-format +msgid "Fail to connect to: %s" +msgstr "Не вдалося підключитися до: %s" + +#: src/rsensor.c:144 +#, c-format +msgid "Invalid content: %s" +msgstr "" + +#: src/rsensor.c:184 +#, c-format +msgid "Invalid JSON: %s" +msgstr "Неправильний JSON: %s" + +#: src/server/server.c:54 +msgid "

Server stop requested

" +msgstr "" + +#: src/server/server.c:60 +msgid "" +"

Page not found - Go to Main page

" +msgstr "" +"

Сторінка не знайдена - Перейти до Головної " +"сторінки

" + +#: src/server/server.c:84 +#, c-format +msgid "" +"Copyright (C) %s jeanfi@gmail.com\n" +"License GPLv2: GNU GPL version 2 or later \n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +msgstr "" + +#: src/server/server.c:96 +msgid "" +"psensor-server is an HTTP server for monitoring hardware sensors remotely." +msgstr "" +"psensor-server ‌— це HTTP-сервер для віддаленого моніторингу апаратних " +"датчиків." + +#: src/server/server.c:101 +msgid "" +" -h, --help\t\tdisplay this help and exit\n" +" -v, --version\t\tdisplay version information and exit" +msgstr "" +" -h, --help\t\tпоказати цю довідку і вийти\n" +" -v, --version\t\tпоказати версію і вийти" + +#: src/server/server.c:105 +msgid "" +" -p,--port=PORT\twebserver port\n" +" -w,--wdir=DIR\t\tdirectory containing webserver pages" +msgstr "" +" -p,--port=PORT\tпорт веб-сервера\n" +" -w,--wdir=DIR\t\tдиректорія для сторінок веб-сервера" + +#: src/server/server.c:109 +msgid " -d, --debug=LEVEL set the debug level, integer between 0 and 3" +msgstr "" + +#: src/server/server.c:111 +msgid " -l, --log-file=PATH set the log file to PATH" +msgstr "" + +#: src/server/server.c:112 +msgid " --sensor-log-file=PATH set the sensor log file to PATH" +msgstr "" + +#: src/server/server.c:113 +msgid " --sensor-log-interval=S set the sensor log interval to S (seconds)" +msgstr "" + +#: src/server/server.c:297 +#, c-format +msgid "HTTP Request: %s" +msgstr "HTTP запит: %s" + +#: src/server/server.c:360 +#, c-format +msgid "Enables debug mode: %d" +msgstr "" + +#: src/server/server.c:402 +msgid "No sensors detected." +msgstr "Датчики не знайдені." + +#: src/server/server.c:409 +msgid "Failed to create Web server." +msgstr "Не вдалося створити веб-сервер." + +#: src/server/server.c:413 +#, c-format +msgid "Web server started on port: %d" +msgstr "" + +#: src/server/server.c:414 +#, c-format +msgid "WWW directory: %s" +msgstr "WWW-директорія: %s" + +#: src/server/server.c:415 +#, c-format +msgid "URL: http://localhost:%d" +msgstr "URL: http://localhost:%d" + +#: src/server/server.c:425 +msgid "Failed to activate logging of sensors." +msgstr "" + +#: src/ui.c:84 +msgid "Psensor is a GTK+ application for monitoring hardware sensors" +msgstr "" + +#: src/ui.c:87 +msgid "" +"Copyright(c) 2010-2013\n" +"jeanfi@gmail.com" +msgstr "" + +#: src/ui.c:90 +msgid "About Psensor" +msgstr "Про Psensor" + +#: src/ui.c:93 +msgid "Psensor Homepage" +msgstr "Домашня сторінка Psensor" + +#: src/ui.c:217 +msgid "Failed to load Psensor icon." +msgstr "Не вдалося завантажити іконку Psensor." + +#: src/ui_sensorlist.c:245 +msgid "Select foreground color" +msgstr "Оберіть колір переднього плану" + +#: src/ui_sensorlist.c:297 +msgid "Sensor" +msgstr "Датчик" + +#: src/ui_sensorlist.c:303 +msgid "Value" +msgstr "Значення" + +#: src/ui_sensorlist.c:309 +msgid "Min" +msgstr "Мін." + +#: src/ui_sensorlist.c:315 +msgid "Max" +msgstr "Макс." + +#: src/ui_sensorlist.c:322 +msgid "Color" +msgstr "Колір" + +#: src/ui_appindicator.c:106 +msgid "_Show" +msgstr "Пок_азати" + +#: src/ui_appindicator.c:107 +msgid "Show" +msgstr "Показати" + +#: src/ui_appindicator.c:111 +msgid "_Preferences" +msgstr "_Налаштування" + +#: src/ui_appindicator.c:116 +msgid "S_ensor Preferences" +msgstr "Налаштув_ання датчиків" + +#: src/ui_appindicator.c:118 +msgid "SensorPreferences" +msgstr "" + +#: src/ui_appindicator.c:122 +msgid "_About" +msgstr "_Про програму" + +#: src/ui_appindicator.c:129 +msgid "_Quit" +msgstr "_Вихід" + +#: src/ui_appindicator.c:220 +#, c-format +msgid "building menus failed: %s" +msgstr "не вдалося створити меню: %s" + +#: src/ui_notify.c:48 +msgid "gettimeofday failed." +msgstr "помилка gettimeofday." + +#: src/ui_notify.c:77 +msgid "Temperature alert" +msgstr "" + +#: src/ui_notify.c:79 +msgid "Fan alert" +msgstr "" + +#: src/ui_sensorpref.c:248 +msgid "Unknown" +msgstr "" + +#~ msgid "Sensor Name" +#~ msgstr "Назва датчика" + +#~ msgid "Enabled" +#~ msgstr "Увімкнен" + +#, fuzzy +#~ msgid "slog_init: cannot open sensor log file: %s" +#~ msgstr "Не вдалося відкрити лог-файл: %s" + +#, fuzzy +#~ msgid "slog_init: gettimeofday failed." +#~ msgstr "помилка gettimeofday." + +#, fuzzy +#~ msgid "slog_write_sensors: gettimeofday failed." +#~ msgstr "помилка gettimeofday." + +#, fuzzy +#~ msgid "Enable indicator" +#~ msgstr "Увімкнен" diff --git a/po/zh_CN.gmo b/po/zh_CN.gmo index 865fa91..96e1924 100644 Binary files a/po/zh_CN.gmo and b/po/zh_CN.gmo differ diff --git a/po/zh_CN.po b/po/zh_CN.po index 7f3bb90..98115f2 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -1,521 +1,660 @@ # Chinese translations for psensor package. # Copyright (C) 2011 Free Software Foundation, Inc. # This file is distributed under the same license as the psensor package. -# wpitchoune , 2011. -# Chinese translation from 大宝 +# Maintained by Jean-Philippe Orsini +# Initial Chinese translation from 大宝 msgid "" msgstr "" -"Project-Id-Version: psensor 0.6.0.10\n" +"Project-Id-Version: psensor\n" "Report-Msgid-Bugs-To: jeanfi@gmail.com\n" -"POT-Creation-Date: 2012-03-26 10:30+0200\n" -"PO-Revision-Date: 2011-06-06 08:57+0000\n" -"Last-Translator: royclark \n" +"POT-Creation-Date: 2013-10-16 09:19+0200\n" +"PO-Revision-Date: 2013-01-15 12:24+0000\n" +"Last-Translator: Wang Dianjin \n" "Language-Team: Chinese (simplified)\n" "Language: zh_CN\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-06-06 09:00+0000\n" -"X-Generator: Launchpad (build 13144)\n" +"X-Launchpad-Export-Date: 2013-01-21 09:32+0000\n" +"X-Generator: Launchpad (build 16430)\n" -#: src/main.c:77 -#, c-format -msgid "" -"Copyright (C) %s jeanfi@gmail.com\n" -"License GPLv2: GNU GPL version 2 or later \n" -"This is free software: you are free to change and redistribute it.\n" -"There is NO WARRANTY, to the extent permitted by law.\n" -msgstr "" +#: src/glade/psensor.glade:5 src/ui_appindicator.c:124 +msgid "About" +msgstr "关于" -#: src/main.c:88 src/server/server.c:86 -#, c-format -msgid "Usage: %s [OPTION]...\n" -msgstr "用法:%s [选项]...\n" +#: src/glade/psensor.glade:9 src/ui_sensorlist.c:209 src/ui_appindicator.c:112 +msgid "Preferences" +msgstr "首选项" -#: src/main.c:90 -msgid "" -"psensor is a GTK application for monitoring hardware sensors, including " -"temperatures and fan speeds." -msgstr "psensor 是一个 GTK 程序,用来监视硬件传感器,包括温度和风扇转速。" +#: src/glade/psensor.glade:13 src/ui_appindicator.c:130 +msgid "Quit" +msgstr "退出" -#: src/main.c:94 -msgid "Options:" -msgstr "" +#: src/glade/psensor.glade:17 +msgid "Sensor Preferences" +msgstr "传感器首选项" -#: src/main.c:95 -msgid "" -" -h, --help display this help and exit\n" -" -v, --version display version information and exit" +#: src/glade/psensor.glade:96 +msgid "Psensor - Temperature Monitor" +msgstr "Psensor - 温度监视器" + +#: src/glade/psensor.glade:111 +msgid "_Psensor" msgstr "" -" -h, --help 显示这个帮助并退出\n" -" -v, --version 显示版本信息并退出" -#: src/main.c:100 -msgid "" -" -u, --url=URL the URL of the psensor-server, example: http://" -"hostname:3131" -msgstr " -u, --url=URL psensor服务器的 URL ,比如:http://hostname:3131" +#: src/glade/psensor.glade:158 +msgid "_Help" +msgstr "帮助(_H)" -#: src/main.c:105 -msgid " -d, --debug=LEVEL set the debug level, integer between 0 and 3" -msgstr "" +#: src/glade/psensor-pref.glade:7 +msgid "Edit Preferences" +msgstr "编辑首选项" -#: src/main.c:110 src/server/server.c:104 -#, c-format -msgid "Report bugs to: %s\n" -msgstr "" +#: src/glade/psensor-pref.glade:72 +msgid "Position of sensors table:" +msgstr "监视设备列表位置:" -#: src/main.c:112 src/server/server.c:106 -#, c-format -msgid "%s home page: <%s>\n" -msgstr "" +#: src/glade/psensor-pref.glade:81 +msgid "Hide window decoration" +msgstr "隐藏窗口标题栏" -#: src/main.c:425 -msgid "Enables debug mode." -msgstr "" +#: src/glade/psensor-pref.glade:98 +msgid "Keep window below" +msgstr "保持在最底层" -#: src/main.c:434 src/server/server.c:352 -#, c-format -msgid "Try `%s --help' for more information.\n" -msgstr "" +#: src/glade/psensor-pref.glade:115 +msgid "Enable menu" +msgstr "启用菜单" -#: src/main.c:469 -#, c-format -msgid "ERROR: Not compiled with remote sensor support.\n" -msgstr "" +#: src/glade/psensor-pref.glade:132 +msgid "Enable Unity Launcher counter" +msgstr "启用 Unity 启动器计数器" -#: src/ui.c:80 -#, fuzzy -msgid "Psensor is a GTK+ application for monitoring hardware sensors" -msgstr "psensor 是一个 GTK 程序,用来监视硬件传感器,包括温度和风扇转速。" +#: src/glade/psensor-pref.glade:149 +msgid "Hide window on startup" +msgstr "启动时隐藏窗口" -#: src/ui.c:83 -msgid "" -"Copyright(c) 2010-2012\n" -"jeanfi@gmail.com" -msgstr "" +#: src/glade/psensor-pref.glade:166 +msgid "Restore window position and size" +msgstr "恢复窗口位置和大小" -#: src/ui.c:86 -msgid "About Psensor" -msgstr "" +#: src/glade/psensor-pref.glade:186 +msgid "Temperature unit:" +msgstr "温度单位:" -#: src/ui.c:89 -msgid "Psensor Homepage" -msgstr "" +#: src/glade/psensor-pref.glade:238 +msgid "Interface" +msgstr "界面" -#: src/ui.c:144 -msgid "_Preferences" -msgstr "" +#: src/glade/psensor-pref.glade:276 +msgid "Foreground:" +msgstr "前景:" -#: src/ui.c:145 src/ui_sensorlist.c:200 -msgid "Preferences" -msgstr "选项" +#: src/glade/psensor-pref.glade:291 +msgid "Background:" +msgstr "背景:" -#: src/ui.c:149 -msgid "_Sensor Preferences" -msgstr "" +#: src/glade/psensor-pref.glade:325 +msgid "Background opacity:" +msgstr "背景透明:" -#: src/ui.c:150 -msgid "Sensor Preferences" -msgstr "" +#: src/glade/psensor-pref.glade:348 +msgid "Min" +msgstr "最小值" -#: src/ui.c:154 -msgid "_Quit" -msgstr "" +#: src/glade/psensor-pref.glade:375 +msgid "Max" +msgstr "最大值" -#: src/ui.c:154 -msgid "Quit" -msgstr "退出" +#: src/glade/psensor-pref.glade:401 +msgid "Colors" +msgstr "颜色" -#: src/ui.c:160 -msgid "_About" -msgstr "" +#: src/glade/psensor-pref.glade:419 +msgid "Monitoring duration:" +msgstr "监视持续时长:" -#: src/ui.c:161 -msgid "About" -msgstr "" +#: src/glade/psensor-pref.glade:457 +msgid "minute(s)" +msgstr "分钟" -#: src/ui.c:183 src/ui_appindicator.c:176 -#, c-format -msgid "building menus failed: %s" -msgstr "" +#: src/glade/psensor-pref.glade:474 src/glade/psensor-pref.glade:626 +msgid "second(s)" +msgstr "秒" -#: src/ui.c:231 -msgid "Psensor - Temperature Monitor" -msgstr "" +#: src/glade/psensor-pref.glade:510 +msgid "Update interval:" +msgstr "更新间隔:" -#: src/ui.c:248 -#, c-format -msgid "ERROR: Failed to load psensor icon.\n" -msgstr "" +#: src/glade/psensor-pref.glade:528 +msgid "Measures" +msgstr "测量" -#: src/ui_sensorlist.c:231 -msgid "Select foreground color" -msgstr "选择前景色" +#: src/glade/psensor-pref.glade:564 src/glade/sensor-edit.glade:169 +#: src/ui_sensorlist.c:334 +msgid "Graph" +msgstr "图表" -#: src/ui_sensorlist.c:308 src/glade/psensor-pref.glade:241 -msgid "Sensor" -msgstr "监视设备" +#: src/glade/psensor-pref.glade:588 +msgid "Measure update interval:" +msgstr "测量更新间隔:" -#: src/ui_sensorlist.c:314 -msgid "Value" +#: src/glade/psensor-pref.glade:637 +msgid "Enable sensors logging" +msgstr "启用监测器记录" + +#: src/glade/psensor-pref.glade:684 +msgid "Sensors logging interval" +msgstr "监测器记录间隔" + +#: src/glade/psensor-pref.glade:701 +msgid "seconds(s)" +msgstr "秒" + +#: src/glade/psensor-pref.glade:718 +msgid "Script executed when an alarm is raised" msgstr "" -#: src/ui_sensorlist.c:320 -msgid "Min" -msgstr "最小值" +#: src/glade/psensor-pref.glade:751 +msgid "Sensors" +msgstr "传感器" -#: src/ui_sensorlist.c:326 -msgid "Max" -msgstr "最大值" +#: src/glade/sensor-edit.glade:19 +msgid "Edit Sensor Preferences" +msgstr "编辑传感器首选项" -#: src/ui_sensorlist.c:333 -msgid "Color" -msgstr "颜色" +#: src/glade/sensor-edit.glade:87 +msgid "Name" +msgstr "" -#: src/ui_sensorlist.c:345 -msgid "Enabled" -msgstr "激活" +#: src/glade/sensor-edit.glade:138 +msgid "Type:" +msgstr "类型:" -#: src/ui_sensorlist.c:374 src/ui_sensorlist.c:375 src/ui_sensorlist.c:376 -#: src/glade/sensor-edit.glade:87 src/glade/sensor-edit.glade:153 +#: src/glade/sensor-edit.glade:153 src/glade/sensor-edit.glade:294 +#: src/glade/sensor-edit.glade:388 src/glade/sensor-edit.glade:459 +#: src/glade/sensor-edit.glade:508 src/lib/psensor.c:486 src/ui_notify.c:81 msgid "N/A" -msgstr "" +msgstr "不可用" -#: src/ui_notify.c:45 -msgid "gettimeofday failed" -msgstr "" +#: src/glade/sensor-edit.glade:187 +msgid "Color:" +msgstr "颜色:" -#: src/ui_notify.c:67 src/ui_notify.c:69 -msgid "Temperature alert" -msgstr "温度报警" +#: src/glade/sensor-edit.glade:201 +msgid "Alarm" +msgstr "警告" -#: src/ui_sensorpref.c:397 -msgid "Sensor Name" -msgstr "" +#: src/glade/sensor-edit.glade:216 +msgid "Activate desktop notifications" +msgstr "激活桌面气泡提示" -#: src/rsensor.c:107 +#: src/glade/sensor-edit.glade:236 +msgid "Sensor Information" +msgstr "传感器信息" + +#: src/glade/sensor-edit.glade:249 +msgid "Draw sensor curve" +msgstr "绘制监视曲线" + +#: src/glade/sensor-edit.glade:333 +msgid "High threshold:" +msgstr "高阈值:" + +#: src/glade/sensor-edit.glade:348 +msgid "Low threshold:" +msgstr "低阈值:" + +#: src/glade/sensor-edit.glade:409 +msgid "Ubuntu Application Indicator" +msgstr "Ubuntu 应用指示器" + +#: src/glade/sensor-edit.glade:424 +msgid "Display sensor in the Application Indicator menu" +msgstr "在应用指示器菜单中显示监视器" + +#: src/glade/sensor-edit.glade:444 +msgid "Chip:" +msgstr "芯片:" + +#: src/glade/sensor-edit.glade:489 +msgid "Id:" +msgstr "标识:" + +#: src/glade/sensor-edit.glade:523 +msgid "Details" +msgstr "详情" + +#: src/glade/sensor-edit.glade:541 +msgid "Name:" +msgstr "名称:" + +#: src/lib/amd.c:170 +msgid "AMD: cannot found ADL library." +msgstr "AMD:未找到 ADL 库。" + +#: src/lib/amd.c:197 +msgid "AMD: missing ADL's API." +msgstr "AMD:ADL 的 API 丢失。" + +#: src/lib/amd.c:207 +msgid "AMD: failed to initialize ADL." +msgstr "AMD:ADL 初始化出错。" + +#: src/lib/amd.c:213 +msgid "AMD: cannot get the number of adapters." +msgstr "AMD:无法获取适配器数目。" + +#: src/lib/amd.c:252 #, c-format -msgid "Fail to connect to: %s" +msgid "Number of AMD/ATI adapters: %d" msgstr "" -#: src/rsensor.c:144 +#: src/lib/amd.c:253 #, c-format -msgid "Invalid content: %s" +msgid "Number of active AMD/ATI adapters: %d" msgstr "" -#: src/rsensor.c:184 +#: src/lib/hdd_atasmart.c:152 #, c-format -msgid "Invalid JSON: %s" -msgstr "" +msgid "atasmart: sk_disk_open() failure: %s." +msgstr "atasmart:sk_disk_open() 失败:%s。" + +#: src/lib/hdd_hddtemp.c:59 +msgid "hddtemp: failed to open socket." +msgstr "硬盘温度:无法打开套接字。" + +#: src/lib/hdd_hddtemp.c:72 +msgid "hddtemp: failed to open connection." +msgstr "硬盘温度:无法打开连接。" -#: src/server/server.c:53 +#: src/lib/hdd_hddtemp.c:186 src/lib/hdd_hddtemp.c:256 +#, c-format +msgid "hddtemp: wrong string: %s." +msgstr "硬盘温度:错误字符:%s。" + +#: src/lib/lmsensor.c:42 +#, c-format +msgid "lmsensor: cannot get value of subfeature %s: %s." +msgstr "lmsensor:无法获取子功能%s的值:%s。" + +#: src/lib/lmsensor.c:123 +msgid "lmsensor: lmsensor_psensor_create failure: wrong feature type." +msgstr "lmsensor:lmsensor_psensor_create 失败:错误的功能类型。" + +#: src/lib/lmsensor.c:218 +#, c-format +msgid "lmsensor: initialization failure: %s." +msgstr "lmsensor:初始化失败:%s。" + +#: src/lib/log.c:43 +#, c-format +msgid "Cannot open log file: %s" +msgstr "无法打开日志文件:%s" + +#: src/lib/nvidia.c:54 msgid "" -"

Page not found - Go to Main page

" +"NVIDIA proprietary driver not used or cannot retrieve NVIDIA GPU temperature." msgstr "" -#: src/server/server.c:76 +#: src/lib/nvidia.c:97 +msgid "Cannot open connection to X11 server." +msgstr "无法打开到 X11 服务器的连接。" + +#: src/lib/nvidia.c:105 +msgid "Failed to retrieve NVIDIA information." +msgstr "无法获取 NVIDIA 信息。" + +#: src/lib/psensor.c:482 tests/test_psensor_type_to_unit_str.c:62 +msgid "RPM" +msgstr "转速" + +#: src/lib/psensor.c:484 +msgid "%" +msgstr "%" + +#: src/lib/slog.c:68 +msgid "HOME variable not set." +msgstr "未设置 HOME 变量。" + +#: src/lib/slog.c:78 +msgid "Sensor log file already open." +msgstr "已经打开监测器日志文件。" + +#: src/lib/slog.c:87 +#, fuzzy, c-format +msgid "Cannot open sensor log file: %s." +msgstr "无法打开监测器日志文件:%s。" + +#: src/lib/slog.c:118 +msgid "Sensor log file not open." +msgstr "监测器日志文件未打开。" + +#: src/lib/slog.c:174 +msgid "Sensor log not open, cannot close." +msgstr "监测器日志未打开,故无法关闭。" + +#: src/main.c:77 #, c-format msgid "" "Copyright (C) %s jeanfi@gmail.com\n" "License GPLv2: GNU GPL version 2 or later \n" -"This is free software: you are free to change and redistribute it.\n" +"This is free software: you are free to change and redistribute it.\n" "There is NO WARRANTY, to the extent permitted by law.\n" msgstr "" +"版权所有(C) %s jeanfi@gmail.com\n" +"协议 GPLv2:GNU GPL 第 2 版或以后的 \n" +"该软件为自由软件:您可以自由修改并分发。\n" +"There is NO WARRANTY, to the extent permitted by law。\n" + +#: src/main.c:88 src/server/server.c:94 +#, c-format +msgid "Usage: %s [OPTION]...\n" +msgstr "用法:%s [选项]...\n" -#: src/server/server.c:88 +#: src/main.c:90 msgid "" -"psensor-server is an HTTP server for monitoring hardware sensors remotely." -msgstr "psensor 服务器是用来远程监视硬件的 HTTP 服务器。" +"Psensor is a GTK+ application for monitoring hardware sensors, including " +"temperatures and fan speeds." +msgstr "Psensor 是一款 GTK+ 应用程序,可监测硬件传感器,包括温度与风扇转速。" -#: src/server/server.c:93 -#, fuzzy +#: src/main.c:94 +msgid "Options:" +msgstr "选项:" + +#: src/main.c:95 msgid "" -" -h, --help\t\tdisplay this help and exit\n" -" -v, --version\t\tdisplay version information and exit" +" -h, --help display this help and exit\n" +" -v, --version display version information and exit" msgstr "" " -h, --help 显示这个帮助并退出\n" " -v, --version 显示版本信息并退出" -#: src/server/server.c:98 +#: src/main.c:101 msgid "" -" -d,--debug\t\trun in debug mode\n" -" -p,--port=PORT\twebserver port\n" -" -w,--wdir=DIR\t\tdirectory containing webserver pages" -msgstr "" - -#: src/server/server.c:175 -msgid "

Server stop requested

" -msgstr "" - -#: src/server/server.c:290 -#, c-format -msgid "HTTP Request: %s\n" -msgstr "" - -#: src/server/server.c:366 -#, c-format -msgid "ERROR: no sensors detected\n" -msgstr "" - -#: src/server/server.c:373 -#, c-format -msgid "ERROR: Fail to create web server\n" +" -u, --url=URL the URL of the psensor-server,\n" +" example: http://hostname:3131" msgstr "" +" -u, --url=URL psensor 服务器 URL\n" +" 例如:http://hostname:3131" -#: src/server/server.c:377 -#, c-format -msgid "Web server started on port: %d" +#: src/main.c:104 +msgid "" +" --use-libatasmart use atasmart library for disk monitoring instead of\n" +" hddtemp daemon" msgstr "" +" --use-libatasmart 使用 atasmart 库来监测硬盘,而不是\n" +" hddtemp 进程" -#: src/server/server.c:378 -#, c-format -msgid "WWW directory: %s" -msgstr "" +#: src/main.c:107 +msgid " -n, --new-instance force the creation of a new Psensor application" +msgstr " -n, --new-instance 强制创建一个新的 Psensor 例程" -#: src/server/server.c:379 -#, c-format -msgid "URL: http://localhost:%d" -msgstr "" +#: src/main.c:110 +msgid " -d, --debug=LEVEL set the debug level, integer between 0 and 3" +msgstr " -d,--debug=LEVEL 设置调试等级,等级为 0 到 3 之间的整数" -#: src/lib/amd.c:151 +#: src/main.c:115 src/server/server.c:117 #, c-format -msgid "ERROR: ADL library not found!\n" -msgstr "" +msgid "Report bugs to: %s\n" +msgstr "报告问题至:%s\n" -#: src/lib/amd.c:176 +#: src/main.c:117 src/server/server.c:119 #, c-format -msgid "ERROR: ADL's API is missing!\n" -msgstr "" +msgid "%s home page: <%s>\n" +msgstr "%s 主页:<%s>\n" -#: src/lib/amd.c:185 -#, c-format -msgid "ERROR: ADL Initialization Error!\n" -msgstr "" +#: src/main.c:454 +msgid "Psensor has not been compiled with remote sensor support." +msgstr "Psensor 不支持远程传感器。" -#: src/lib/amd.c:193 -#, c-format -msgid "ERROR: Cannot get the number of adapters!\n" -msgstr "" +#: src/main.c:517 +msgid "Enables debug mode." +msgstr "启用调试模式。" -#: src/lib/hdd.c:58 +#: src/main.c:529 src/server/server.c:380 #, c-format -msgid "ERROR: hdd fetch, failed to open socket\n" -msgstr "" +msgid "Try `%s --help' for more information.\n" +msgstr "试用‘%s --help’来获得更多信息。\n" -#: src/lib/hdd.c:72 -#, c-format -msgid "ERROR: hdd fetch, failed to open connection\n" -msgstr "" +#: src/main.c:542 +msgid "A Psensor instance already exists." +msgstr "已存在一个 Psensor 例程。" -#: src/lib/hdd.c:182 +#: src/rsensor.c:107 #, c-format -msgid "ERROR: wrong hdd string: %s" -msgstr "" +msgid "Fail to connect to: %s" +msgstr "无法连接到:%s" -#: src/lib/hdd.c:252 +#: src/rsensor.c:144 #, c-format -msgid "ERROR: wrong hdd string: %s\n" -msgstr "" +msgid "Invalid content: %s" +msgstr "无效内容:%s" -#: src/lib/log.c:37 +#: src/rsensor.c:184 #, c-format -msgid "Cannot open log file: %s" -msgstr "" +msgid "Invalid JSON: %s" +msgstr "无效 JSON:%s" -#: src/lib/nvidia.c:54 -#, c-format -msgid "ERROR: failed to retrieve nvidia temperature\n" -msgstr "" +#: src/server/server.c:54 +msgid "

Server stop requested

" +msgstr "

服务器停止请求

" -#: src/lib/nvidia.c:91 -#, c-format -msgid "ERROR: Cannot open connection to X Server\n" -msgstr "" +#: src/server/server.c:60 +msgid "" +"

Page not found - Go to Main page

" +msgstr "

未找到页面 - 请访问主页

" -#: src/lib/nvidia.c:99 +#: src/server/server.c:84 #, c-format -msgid "ERROR: Cannot retrieve NVidia information\n" +msgid "" +"Copyright (C) %s jeanfi@gmail.com\n" +"License GPLv2: GNU GPL version 2 or later \n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" msgstr "" +"版权所有(C) %s jeanfi@gmail.com\n" +"协议 GPLv2:GNU GPL 第 2 版或更新的\n" +"本软件为自由软件:您可以自由修改并分发。\n" +"There is NO WARRANTY, to the extent permitted by law。\n" -#: src/lib/lmsensor.c:43 -#, c-format -msgid "ERROR: Can't get value of subfeature %s: %s\n" -msgstr "" +#: src/server/server.c:96 +msgid "" +"psensor-server is an HTTP server for monitoring hardware sensors remotely." +msgstr "psensor 服务器是用来远程监视硬件的 HTTP 服务器。" -#: src/lib/lmsensor.c:125 -#, c-format -msgid "ERROR: create_sensor, wrong feature type\n" +#: src/server/server.c:101 +msgid "" +" -h, --help\t\tdisplay this help and exit\n" +" -v, --version\t\tdisplay version information and exit" msgstr "" +" -h, --help\t\t 显示本帮助并退出\n" +" -v, --version\t\t 显示版本信息并退出" -#: src/lib/lmsensor.c:208 -#, c-format -msgid "ERROR: lm-sensors initialization failure: %s\n" +#: src/server/server.c:105 +msgid "" +" -p,--port=PORT\twebserver port\n" +" -w,--wdir=DIR\t\tdirectory containing webserver pages" msgstr "" +" -p,--port=PORT\t 网络服务器端口\n" +" -w,--wdir=DIR\t\t 包括网络服务器页面的目录" -#: src/lib/psensor.c:430 -msgid "C" -msgstr "" +#: src/server/server.c:109 +msgid " -d, --debug=LEVEL set the debug level, integer between 0 and 3" +msgstr " -d, --debug=LEVEL 设置调试级别,0~3 之间的整数" -#: src/lib/psensor.c:433 -msgid "RPM" -msgstr "" +#: src/server/server.c:111 +msgid " -l, --log-file=PATH set the log file to PATH" +msgstr " -l, --log-file=PATH 将日志文件设为 PATH" -#: src/lib/psensor.c:436 -msgid "%" -msgstr "" +#: src/server/server.c:112 +msgid " --sensor-log-file=PATH set the sensor log file to PATH" +msgstr " --sensor-log-file=路径 设置监测器日志文件的路径" -#: src/glade/psensor-pref.glade:7 -msgid "Edit Preferences" +#: src/server/server.c:113 +msgid " --sensor-log-interval=S set the sensor log interval to S (seconds)" msgstr "" -#: src/glade/psensor-pref.glade:70 -msgid "Graph Colors" -msgstr "图表颜色" +#: src/server/server.c:297 +#, c-format +msgid "HTTP Request: %s" +msgstr "HTTP 请求:%s" -#: src/glade/psensor-pref.glade:86 -msgid "Foreground:" -msgstr "坐标栏:" +#: src/server/server.c:360 +#, c-format +msgid "Enables debug mode: %d" +msgstr "启用调试模式:%d" -#: src/glade/psensor-pref.glade:100 -msgid "Background:" -msgstr "背景:" +#: src/server/server.c:402 +msgid "No sensors detected." +msgstr "未检测到传感器。" -#: src/glade/psensor-pref.glade:114 -msgid "Background opacity:" -msgstr "背景亮度:" +#: src/server/server.c:409 +msgid "Failed to create Web server." +msgstr "无法创建网络服务器。" -#: src/glade/psensor-pref.glade:165 src/glade/sensor-edit.glade:184 -msgid "Graph" -msgstr "图表" +#: src/server/server.c:413 +#, c-format +msgid "Web server started on port: %d" +msgstr "网络服务器启动端口:%d" -#: src/glade/psensor-pref.glade:183 -msgid "Update interval:" -msgstr "" +#: src/server/server.c:414 +#, c-format +msgid "WWW directory: %s" +msgstr "WWW 目录:%s" -#: src/glade/psensor-pref.glade:197 -msgid "Monitoring duration:" -msgstr "" +#: src/server/server.c:415 +#, c-format +msgid "URL: http://localhost:%d" +msgstr "URL: http://localhost:%d" -#: src/glade/psensor-pref.glade:210 src/glade/psensor-pref.glade:272 -msgid "second(s)" -msgstr "" +#: src/server/server.c:425 +msgid "Failed to activate logging of sensors." +msgstr "无法激活监测器日志。" -#: src/glade/psensor-pref.glade:225 -msgid "minute(s)" -msgstr "" +#: src/ui.c:84 +msgid "Psensor is a GTK+ application for monitoring hardware sensors" +msgstr "Psensor 是一款 GTK+ 硬件监测传感应用程序" -#: src/glade/psensor-pref.glade:259 -msgid "Measure update interval:" +#: src/ui.c:87 +msgid "" +"Copyright(c) 2010-2013\n" +"jeanfi@gmail.com" msgstr "" +"版权所有(c) 2010-2013\n" +"jeanfi@gmail.com" -#: src/glade/psensor-pref.glade:288 -msgid "Interface" -msgstr "界面" - -#: src/glade/psensor-pref.glade:306 -msgid "Position of sensors table:" -msgstr "监视设备列表位置:" +#: src/ui.c:90 +msgid "About Psensor" +msgstr "关于 Psensor" -#: src/glade/psensor-pref.glade:317 -msgid "Hide window decoration" -msgstr "隐藏窗口标题栏" +#: src/ui.c:93 +msgid "Psensor Homepage" +msgstr "Psensor 主页" -#: src/glade/psensor-pref.glade:335 -msgid "Keep window below" -msgstr "保持在最底层" +#: src/ui.c:217 +msgid "Failed to load Psensor icon." +msgstr "无法加载 Psensor 图标。" -#: src/glade/psensor-pref.glade:436 -msgid "Min" -msgstr "最小值" +#: src/ui_sensorlist.c:245 +msgid "Select foreground color" +msgstr "选择前景色" -#: src/glade/psensor-pref.glade:463 -msgid "Max" -msgstr "最大值" +#: src/ui_sensorlist.c:297 +msgid "Sensor" +msgstr "监视设备" -#: src/glade/psensor-pref.glade:483 -msgid "Enable menu" -msgstr "" +#: src/ui_sensorlist.c:303 +msgid "Value" +msgstr "值" -#: src/glade/psensor-pref.glade:500 -msgid "Enable Unity Launcher counter" -msgstr "" +#: src/ui_sensorlist.c:309 +msgid "Min" +msgstr "最小值" -#: src/glade/psensor-pref.glade:518 -#, fuzzy -msgid "Hide window on startup" -msgstr "隐藏窗口标题栏" +#: src/ui_sensorlist.c:315 +msgid "Max" +msgstr "最大值" -#: src/glade/psensor-pref.glade:535 -msgid "Restore window position and size" -msgstr "" +#: src/ui_sensorlist.c:322 +msgid "Color" +msgstr "颜色" -#: src/glade/sensor-edit.glade:8 -msgid "Edit Sensor Preferences" -msgstr "监视设备选项" +#: src/ui_appindicator.c:106 +msgid "_Show" +msgstr "显示(_S)" -#: src/glade/sensor-edit.glade:104 -msgid "Name:" -msgstr "名称:" +#: src/ui_appindicator.c:107 +msgid "Show" +msgstr "显示" -#: src/glade/sensor-edit.glade:139 -msgid "Type:" -msgstr "类型:" +#: src/ui_appindicator.c:111 +msgid "_Preferences" +msgstr "首选项(_P)" -#: src/glade/sensor-edit.glade:169 -msgid "Id:" -msgstr "标识:" +#: src/ui_appindicator.c:116 +msgid "S_ensor Preferences" +msgstr "传感器首选项(_E)" -#: src/glade/sensor-edit.glade:202 -msgid "Color:" -msgstr "" +#: src/ui_appindicator.c:118 +msgid "SensorPreferences" +msgstr "传感器首选项" -#: src/glade/sensor-edit.glade:216 -msgid "Alarm" -msgstr "警告信息" +#: src/ui_appindicator.c:122 +msgid "_About" +msgstr "关于(_A)" -#: src/glade/sensor-edit.glade:231 -msgid "Activate desktop notifications" -msgstr "激活桌面气泡提示" +#: src/ui_appindicator.c:129 +msgid "_Quit" +msgstr "退出(_Q)" -#: src/glade/sensor-edit.glade:251 -msgid "Temperature limit:" -msgstr "温度警戒线:" +#: src/ui_appindicator.c:220 +#, c-format +msgid "building menus failed: %s" +msgstr "创建菜单失败:%s" -#: src/glade/sensor-edit.glade:266 -msgid "Sensor Information" -msgstr "设备信息" +#: src/ui_notify.c:48 +msgid "gettimeofday failed." +msgstr "获取时间失败。" -#: src/glade/sensor-edit.glade:279 -msgid "Draw sensor curve" -msgstr "绘制监视曲线" +#: src/ui_notify.c:77 +msgid "Temperature alert" +msgstr "温度报警" -#: src/glade/sensor-edit.glade:327 -msgid "°C" -msgstr "" +#: src/ui_notify.c:79 +msgid "Fan alert" +msgstr "风扇警报" -#~ msgid "Current" -#~ msgstr "当前" +#: src/ui_sensorpref.c:248 +msgid "Unknown" +msgstr "未知" -#~ msgid "Right" -#~ msgstr "右侧" +#~ msgid "Sensor Name" +#~ msgstr "传感器名称" -#~ msgid "Left" -#~ msgstr "左侧" +#~ msgid "Enabled" +#~ msgstr "激活" -#~ msgid "Top" -#~ msgstr "顶部" +#, fuzzy +#~ msgid "Enable log of measures" +#~ msgstr "启用菜单" -#~ msgid "Bottom" -#~ msgstr "底部" +#, fuzzy +#~ msgid "slog_init: cannot open sensor log file: %s" +#~ msgstr "无法打开日志文件:%s" -#~ msgid "Show" -#~ msgstr "显示主窗口" +#, fuzzy +#~ msgid "slog_init: gettimeofday failed." +#~ msgstr "获取时间失败。" -#~ msgid "Graph update interval:" -#~ msgstr "图表更新间隔:" +#, fuzzy +#~ msgid "slog_write_sensors: gettimeofday failed." +#~ msgstr "获取时间失败。" -#~ msgid "Graph monitoring duration:" -#~ msgstr "图表监视持续时间:" +#, fuzzy +#~ msgid "Enable indicator" +#~ msgstr "激活" diff --git a/psensor.desktop b/psensor.desktop index dd3d849..3e76173 100644 --- a/psensor.desktop +++ b/psensor.desktop @@ -4,6 +4,7 @@ Version=1.0 Name=Psensor GenericName=Psensor Comment=Psensor is a graphical temperature monitor for Linux +Keywords=temperature;fan;monitoring;indicator Icon=psensor TryExec=psensor Exec=psensor diff --git a/src/Makefile.am b/src/Makefile.am index 15a0e17..f484916 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,6 +1,7 @@ SUBDIRS = lib glade -AM_LDFLAGS = -Wl,--as-needed +# -export-dynamic is need for defining handlers in the glade file. +AM_LDFLAGS = -Wl,--as-needed -export-dynamic if LIBMICROHTTPD if JSON @@ -8,6 +9,7 @@ SUBDIRS += server endif endif +# -no-deprecated-declarations to avoid some glib deprecation warnings AM_CPPFLAGS = -Wno-deprecated-declarations -Wall -Werror -DDEFAULT_WWW_DIR=\""$(pkgdatadir)/www"\"\ -I$(top_srcdir)/src/lib \ -I$(top_srcdir)/src/unity \ @@ -21,12 +23,23 @@ LIBS = \ lib/libpsensor.a \ $(GTK_LIBS)\ $(GCONF_LIBS)\ + $(PTHREAD_LIBS)\ $(SENSORS_LIBS) +if GTK +if X11 +if XEXT +if GCONF bin_PROGRAMS = psensor +dist_man_MANS = psensor.1 +endif +endif +endif +endif + psensor_SOURCES = \ - compat.h \ cfg.h cfg.c \ + notify_cmd.c notify_cmd.h \ graph.h graph.c \ main.c \ ui.h ui.c \ @@ -56,15 +69,22 @@ AM_CPPFLAGS += $(APPINDICATOR_CFLAGS) endif if NVIDIA +if X11 AM_CPPFLAGS += $(NVIDIA_CFLAGS) LIBS += $(NVIDIA_LIBS) endif +endif if LIBATIADL AM_CPPFLAGS += $(LIBATIADL_CFLAGS) LIBS += $(LIBATIADL_LIBS) endif +if ATASMART +AM_CPPFLAGS += $(ATASMART_CFLAGS) +LIBS += $(ATASMART_LIBS) +endif + if UNITY psensor_SOURCES += ui_unity.h ui_unity.c AM_CPPFLAGS += $(UNITY_CFLAGS) @@ -79,8 +99,15 @@ AM_CPPFLAGS += $(CURL_CFLAGS) $(JSON_CFLAGS) endif endif -dist_man_MANS = psensor.1 -EXTRA_DIST = description.txt +EXTRA_DIST = description.txt psensor.schemas + +if GCONF +schemadir = $(GCONF_SCHEMA_FILE_DIR) +schema_DATA = psensor.schemas + +install-data-local: + GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(top_srcdir)/src/$(schema_DATA) +endif psensor.1: main.c $(top_srcdir)/configure.ac $(MAKE) $(AM_MAKEFLAGS) psensor$(EXEEXT) diff --git a/src/Makefile.in b/src/Makefile.in index b0f9d61..85c76fa 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -15,7 +15,25 @@ @SET_MAKE@ + VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -35,7 +53,8 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @JSON_TRUE@@LIBMICROHTTPD_TRUE@am__append_1 = server -bin_PROGRAMS = psensor$(EXEEXT) +@GCONF_TRUE@@GTK_TRUE@@X11_TRUE@@XEXT_TRUE@bin_PROGRAMS = \ +@GCONF_TRUE@@GTK_TRUE@@X11_TRUE@@XEXT_TRUE@ psensor$(EXEEXT) @GTOP_TRUE@am__append_2 = $(GTOP_CFLAGS) @GTOP_TRUE@am__append_3 = $(GTOP_LIBS) @LIBNOTIFY_TRUE@am__append_4 = ui_notify.h ui_notify.c @@ -44,16 +63,18 @@ bin_PROGRAMS = psensor$(EXEEXT) @APPINDICATOR_TRUE@am__append_7 = ui_appindicator.c @APPINDICATOR_TRUE@am__append_8 = $(APPINDICATOR_LIBS) @APPINDICATOR_TRUE@am__append_9 = $(APPINDICATOR_CFLAGS) -@NVIDIA_TRUE@am__append_10 = $(NVIDIA_CFLAGS) -@NVIDIA_TRUE@am__append_11 = $(NVIDIA_LIBS) +@NVIDIA_TRUE@@X11_TRUE@am__append_10 = $(NVIDIA_CFLAGS) +@NVIDIA_TRUE@@X11_TRUE@am__append_11 = $(NVIDIA_LIBS) @LIBATIADL_TRUE@am__append_12 = $(LIBATIADL_CFLAGS) @LIBATIADL_TRUE@am__append_13 = $(LIBATIADL_LIBS) -@UNITY_TRUE@am__append_14 = ui_unity.h ui_unity.c -@UNITY_TRUE@am__append_15 = $(UNITY_CFLAGS) -@UNITY_TRUE@am__append_16 = $(UNITY_LIBS) -@CURL_TRUE@@JSON_TRUE@am__append_17 = rsensor.h rsensor.c -@CURL_TRUE@@JSON_TRUE@am__append_18 = $(CURL_LIBS) $(JSON_LIBS) -@CURL_TRUE@@JSON_TRUE@am__append_19 = $(CURL_CFLAGS) $(JSON_CFLAGS) +@ATASMART_TRUE@am__append_14 = $(ATASMART_CFLAGS) +@ATASMART_TRUE@am__append_15 = $(ATASMART_LIBS) +@UNITY_TRUE@am__append_16 = ui_unity.h ui_unity.c +@UNITY_TRUE@am__append_17 = $(UNITY_CFLAGS) +@UNITY_TRUE@am__append_18 = $(UNITY_LIBS) +@CURL_TRUE@@JSON_TRUE@am__append_19 = rsensor.h rsensor.c +@CURL_TRUE@@JSON_TRUE@am__append_20 = $(CURL_LIBS) $(JSON_LIBS) +@CURL_TRUE@@JSON_TRUE@am__append_21 = $(CURL_CFLAGS) $(JSON_CFLAGS) subdir = src DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in @@ -65,21 +86,23 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" \ + "$(DESTDIR)$(schemadir)" PROGRAMS = $(bin_PROGRAMS) -am__psensor_SOURCES_DIST = compat.h cfg.h cfg.c graph.h graph.c main.c \ - ui.h ui.c ui_appindicator.h ui_color.h ui_color.c ui_graph.h \ - ui_graph.c ui_pref.h ui_pref.c ui_sensorlist.h ui_sensorlist.c \ - ui_sensorpref.h ui_sensorpref.c ui_status.h ui_status.c \ - ui_notify.h ui_notify.c ui_appindicator.c ui_unity.h \ - ui_unity.c rsensor.h rsensor.c +am__psensor_SOURCES_DIST = cfg.h cfg.c notify_cmd.c notify_cmd.h \ + graph.h graph.c main.c ui.h ui.c ui_appindicator.h ui_color.h \ + ui_color.c ui_graph.h ui_graph.c ui_pref.h ui_pref.c \ + ui_sensorlist.h ui_sensorlist.c ui_sensorpref.h \ + ui_sensorpref.c ui_status.h ui_status.c ui_notify.h \ + ui_notify.c ui_appindicator.c ui_unity.h ui_unity.c rsensor.h \ + rsensor.c @LIBNOTIFY_TRUE@am__objects_1 = ui_notify.$(OBJEXT) @APPINDICATOR_TRUE@am__objects_2 = ui_appindicator.$(OBJEXT) @UNITY_TRUE@am__objects_3 = ui_unity.$(OBJEXT) @CURL_TRUE@@JSON_TRUE@am__objects_4 = rsensor.$(OBJEXT) -am_psensor_OBJECTS = cfg.$(OBJEXT) graph.$(OBJEXT) main.$(OBJEXT) \ - ui.$(OBJEXT) ui_color.$(OBJEXT) ui_graph.$(OBJEXT) \ - ui_pref.$(OBJEXT) ui_sensorlist.$(OBJEXT) \ +am_psensor_OBJECTS = cfg.$(OBJEXT) notify_cmd.$(OBJEXT) \ + graph.$(OBJEXT) main.$(OBJEXT) ui.$(OBJEXT) ui_color.$(OBJEXT) \ + ui_graph.$(OBJEXT) ui_pref.$(OBJEXT) ui_sensorlist.$(OBJEXT) \ ui_sensorpref.$(OBJEXT) ui_status.$(OBJEXT) $(am__objects_1) \ $(am__objects_2) $(am__objects_3) $(am__objects_4) psensor_OBJECTS = $(am_psensor_OBJECTS) @@ -101,6 +124,11 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -122,9 +150,16 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } man1dir = $(mandir)/man1 NROFF = nroff MANS = $(dist_man_MANS) +DATA = $(schema_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ @@ -163,6 +198,9 @@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ APPINDICATOR_CFLAGS = @APPINDICATOR_CFLAGS@ APPINDICATOR_LIBS = @APPINDICATOR_LIBS@ +AR = @AR@ +ATASMART_CFLAGS = @ATASMART_CFLAGS@ +ATASMART_LIBS = @ATASMART_LIBS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -182,8 +220,11 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +GCONFTOOL = @GCONFTOOL@ GCONF_CFLAGS = @GCONF_CFLAGS@ GCONF_LIBS = @GCONF_LIBS@ +GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ +GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ @@ -192,6 +233,7 @@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ GTOP_CFLAGS = @GTOP_CFLAGS@ GTOP_LIBS = @GTOP_LIBS@ +HAVE_CPPCHECK = @HAVE_CPPCHECK@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -212,10 +254,10 @@ LIBMICROHTTPD_LIBS = @LIBMICROHTTPD_LIBS@ LIBNOTIFY_CFLAGS = @LIBNOTIFY_CFLAGS@ LIBNOTIFY_LIBS = @LIBNOTIFY_LIBS@ LIBOBJS = @LIBOBJS@ -LIBS = lib/libpsensor.a $(GTK_LIBS) $(GCONF_LIBS) $(SENSORS_LIBS) \ - $(am__append_3) $(am__append_5) $(am__append_8) \ - $(am__append_11) $(am__append_13) $(am__append_16) \ - $(am__append_18) +LIBS = lib/libpsensor.a $(GTK_LIBS) $(GCONF_LIBS) $(PTHREAD_LIBS) \ + $(SENSORS_LIBS) $(am__append_3) $(am__append_5) \ + $(am__append_8) $(am__append_11) $(am__append_13) \ + $(am__append_15) $(am__append_18) $(am__append_20) LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ @@ -239,6 +281,7 @@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ +PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SENSORS_LIBS = @SENSORS_LIBS@ SET_MAKE = @SET_MAKE@ @@ -260,6 +303,7 @@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ @@ -307,22 +351,28 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = lib glade $(am__append_1) -AM_LDFLAGS = -Wl,--as-needed + +# -export-dynamic is need for defining handlers in the glade file. +AM_LDFLAGS = -Wl,--as-needed -export-dynamic + +# -no-deprecated-declarations to avoid some glib deprecation warnings AM_CPPFLAGS = -Wno-deprecated-declarations -Wall -Werror \ -DDEFAULT_WWW_DIR=\""$(pkgdatadir)/www"\" \ -I$(top_srcdir)/src/lib -I$(top_srcdir)/src/unity \ $(GTK_CFLAGS) $(GCONF_CFLAGS) $(SENSORS_CFLAGS) \ $(am__append_2) $(am__append_6) $(am__append_9) \ - $(am__append_10) $(am__append_12) $(am__append_15) \ - $(am__append_19) -psensor_SOURCES = compat.h cfg.h cfg.c graph.h graph.c main.c ui.h \ - ui.c ui_appindicator.h ui_color.h ui_color.c ui_graph.h \ - ui_graph.c ui_pref.h ui_pref.c ui_sensorlist.h ui_sensorlist.c \ - ui_sensorpref.h ui_sensorpref.c ui_status.h ui_status.c \ - $(am__append_4) $(am__append_7) $(am__append_14) \ - $(am__append_17) -dist_man_MANS = psensor.1 -EXTRA_DIST = description.txt + $(am__append_10) $(am__append_12) $(am__append_14) \ + $(am__append_17) $(am__append_21) +@GCONF_TRUE@@GTK_TRUE@@X11_TRUE@@XEXT_TRUE@dist_man_MANS = psensor.1 +psensor_SOURCES = cfg.h cfg.c notify_cmd.c notify_cmd.h graph.h \ + graph.c main.c ui.h ui.c ui_appindicator.h ui_color.h \ + ui_color.c ui_graph.h ui_graph.c ui_pref.h ui_pref.c \ + ui_sensorlist.h ui_sensorlist.c ui_sensorpref.h \ + ui_sensorpref.c ui_status.h ui_status.c $(am__append_4) \ + $(am__append_7) $(am__append_16) $(am__append_19) +EXTRA_DIST = description.txt psensor.schemas +@GCONF_TRUE@schemadir = $(GCONF_SCHEMA_FILE_DIR) +@GCONF_TRUE@schema_DATA = psensor.schemas all: all-recursive .SUFFIXES: @@ -359,8 +409,11 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p; \ @@ -394,7 +447,7 @@ uninstall-binPROGRAMS: clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) -psensor$(EXEEXT): $(psensor_OBJECTS) $(psensor_DEPENDENCIES) +psensor$(EXEEXT): $(psensor_OBJECTS) $(psensor_DEPENDENCIES) $(EXTRA_psensor_DEPENDENCIES) @rm -f psensor$(EXEEXT) $(LINK) $(psensor_OBJECTS) $(psensor_LDADD) $(LIBS) @@ -407,6 +460,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfg.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/graph.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/notify_cmd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rsensor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ui.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ui_appindicator.Po@am__quote@ @@ -434,11 +488,18 @@ distclean-compile: @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` install-man1: $(dist_man_MANS) @$(NORMAL_INSTALL) - test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" - @list=''; test -n "$(man1dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ - l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.1[a-z]*$$/p'; \ + @list1=''; \ + list2='$(dist_man_MANS)'; \ + test -n "$(man1dir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.1[a-z]*$$/p'; \ + fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ @@ -467,9 +528,28 @@ uninstall-man1: sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } + dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) +install-schemaDATA: $(schema_DATA) + @$(NORMAL_INSTALL) + @list='$(schema_DATA)'; test -n "$(schemadir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(schemadir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(schemadir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(schemadir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(schemadir)" || exit $$?; \ + done + +uninstall-schemaDATA: + @$(NORMAL_UNINSTALL) + @list='$(schema_DATA)'; test -n "$(schemadir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(schemadir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. @@ -651,13 +731,10 @@ distdir: $(DISTFILES) done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ @@ -679,10 +756,10 @@ distdir: $(DISTFILES) done check-am: all-am check: check-recursive -all-am: Makefile $(PROGRAMS) $(MANS) +all-am: Makefile $(PROGRAMS) $(MANS) $(DATA) installdirs: installdirs-recursive installdirs-am: - for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \ + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(schemadir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive @@ -695,10 +772,15 @@ install-am: all-am installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -710,6 +792,7 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." +@GCONF_FALSE@install-data-local: clean: clean-recursive clean-am: clean-binPROGRAMS clean-generic mostlyclean-am @@ -732,7 +815,7 @@ info: info-recursive info-am: -install-data-am: install-man +install-data-am: install-data-local install-man install-schemaDATA install-dvi: install-dvi-recursive @@ -777,7 +860,7 @@ ps: ps-recursive ps-am: -uninstall-am: uninstall-binPROGRAMS uninstall-man +uninstall-am: uninstall-binPROGRAMS uninstall-man uninstall-schemaDATA uninstall-man: uninstall-man1 @@ -789,17 +872,21 @@ uninstall-man: uninstall-man1 clean-generic ctags ctags-recursive distclean \ distclean-compile distclean-generic distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ - install-binPROGRAMS install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-man1 install-pdf install-pdf-am install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am uninstall-binPROGRAMS uninstall-man \ - uninstall-man1 - + install-binPROGRAMS install-data install-data-am \ + install-data-local install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-man1 install-pdf \ + install-pdf-am install-ps install-ps-am install-schemaDATA \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ + ps ps-am tags tags-recursive uninstall uninstall-am \ + uninstall-binPROGRAMS uninstall-man uninstall-man1 \ + uninstall-schemaDATA + + +@GCONF_TRUE@install-data-local: +@GCONF_TRUE@ GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(top_srcdir)/src/$(schema_DATA) psensor.1: main.c $(top_srcdir)/configure.ac $(MAKE) $(AM_MAKEFLAGS) psensor$(EXEEXT) diff --git a/src/cfg.c b/src/cfg.c index 606ecc4..41aa09a 100644 --- a/src/cfg.c +++ b/src/cfg.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 jeanfi@gmail.com + * Copyright (C) 2010-2013 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -21,146 +21,192 @@ #include #include -#include - #include "cfg.h" +#include "log.h" + +static const char *KEY_SENSORS = "/apps/psensor/sensors"; + +static const char *ATT_SENSOR_ALARM_ENABLED = "alarm/enabled"; +static const char *ATT_SENSOR_ALARM_HIGH_THRESHOLD = "alarm/high_threshold"; +static const char *ATT_SENSOR_ALARM_LOW_THRESHOLD = "alarm/low_threshold"; +static const char *ATT_SENSOR_COLOR = "color"; +static const char *ATT_SENSOR_ENABLED = "enabled"; +static const char *ATT_SENSOR_NAME = "name"; +static const char *ATT_SENSOR_APPINDICATOR_DISABLED = "appindicator/disabled"; +static const char *ATT_SENSOR_POSITION = "position"; + +static const char *KEY_SENSOR_UPDATE_INTERVAL += "/apps/psensor/sensor/update_interval"; + +static const char *KEY_GRAPH_UPDATE_INTERVAL += "/apps/psensor/graph/update_interval"; + +static const char *KEY_GRAPH_MONITORING_DURATION += "/apps/psensor/graph/monitoring_duration"; + +static const char *KEY_GRAPH_BACKGROUND_COLOR += "/apps/psensor/graph/background_color"; -#define KEY_SENSOR_UPDATE_INTERVAL "/apps/psensor/sensor/update_interval" +static const char *DEFAULT_GRAPH_BACKGROUND_COLOR = "#e8f4e8f4a8f5"; -#define KEY_GRAPH_UPDATE_INTERVAL "/apps/psensor/graph/update_interval" -#define KEY_GRAPH_MONITORING_DURATION "/apps/psensor/graph/monitoring_duration" +static const char *KEY_GRAPH_BACKGROUND_ALPHA += "/apps/psensor/graph/background_alpha"; -#define KEY_GRAPH_BACKGROUND_COLOR "/apps/psensor/graph/background_color" -#define DEFAULT_GRAPH_BACKGROUND_COLOR "#e8f4e8f4a8f5" +static const char *KEY_GRAPH_FOREGROUND_COLOR += "/apps/psensor/graph/foreground_color"; +static const char *DEFAULT_GRAPH_FOREGROUND_COLOR = "#000000000000"; -#define KEY_GRAPH_BACKGROUND_ALPHA "/apps/psensor/graph/background_alpha" -#define DEFAULT_GRAPH_BACKGROUND_ALPHA "1.0" +static const char *KEY_ALPHA_CHANNEL_ENABLED += "/apps/psensor/graph/alpha_channel_enabled"; -#define KEY_GRAPH_FOREGROUND_COLOR "/apps/psensor/graph/foreground_color" -#define DEFAULT_GRAPH_FOREGROUND_COLOR "#000000000000" +static const char *KEY_INTERFACE_SENSORLIST_POSITION += "/apps/psensor/interface/sensorlist_position"; -#define KEY_ALPHA_CHANNEL_ENABLED "/apps/psensor/graph/alpha_channel_enabled" -#define DEFAULT_ALPHA_CHANNEL_ENABLED 0 +static const char *KEY_INTERFACE_WINDOW_DECORATION_DISABLED += "/apps/psensor/interface/window_decoration_disabled"; -#define KEY_INTERFACE_SENSORLIST_POSITION \ -"/apps/psensor/interface/sensorlist_position" +static const char *KEY_INTERFACE_WINDOW_KEEP_BELOW_ENABLED += "/apps/psensor/interface/window_keep_below_enabled"; -#define KEY_INTERFACE_WINDOW_DECORATION_DISABLED \ -"/apps/psensor/interface/window_decoration_disabled" +static const char *KEY_INTERFACE_MENU_BAR_DISABLED += "/apps/psensor/interface/menu_bar_disabled"; -#define KEY_INTERFACE_WINDOW_KEEP_BELOW_ENABLED \ -"/apps/psensor/interface/window_keep_below_enabled" +static const char *KEY_INTERFACE_UNITY_LAUNCHER_COUNT_DISABLED += "/apps/psensor/interface/unity_launcher_count_disabled"; -#define KEY_INTERFACE_MENU_BAR_DISABLED \ -"/apps/psensor/interface/menu_bar_disabled" +static const char *KEY_INTERFACE_HIDE_ON_STARTUP += "/apps/psensor/interface/hide_on_startup"; -#define KEY_INTERFACE_UNITY_LAUNCHER_COUNT_DISABLED \ -"/apps/psensor/interface/unity_launcher_count_disabled" +static const char *KEY_INTERFACE_WINDOW_RESTORE_ENABLED += "/apps/psensor/interface/window_restore_enabled"; -#define KEY_INTERFACE_HIDE_ON_STARTUP \ -"/apps/psensor/interface/hide_on_startup" +static const char *KEY_INTERFACE_WINDOW_X = "/apps/psensor/interface/window_x"; +static const char *KEY_INTERFACE_WINDOW_Y = "/apps/psensor/interface/window_y"; +static const char *KEY_INTERFACE_WINDOW_W = "/apps/psensor/interface/window_w"; +static const char *KEY_INTERFACE_WINDOW_H = "/apps/psensor/interface/window_h"; -#define KEY_INTERFACE_WINDOW_RESTORE_ENABLED \ -"/apps/psensor/interface/window_restore_enabled" +static const char *KEY_INTERFACE_WINDOW_DIVIDER_POS += "/apps/psensor/interface/window_divider_pos"; -#define KEY_INTERFACE_WINDOW_X "/apps/psensor/interface/window_x" -#define KEY_INTERFACE_WINDOW_Y "/apps/psensor/interface/window_y" -#define KEY_INTERFACE_WINDOW_W "/apps/psensor/interface/window_w" -#define KEY_INTERFACE_WINDOW_H "/apps/psensor/interface/window_h" +static const char *KEY_INTERFACE_TEMPERATURE_UNIT += "/apps/psensor/interface/temperature_unit"; -#define KEY_INTERFACE_WINDOW_DIVIDER_POS \ -"/apps/psensor/interface/window_divider_pos" +static const char *KEY_SLOG_ENABLED = "/apps/psensor/slog/enabled"; +static const char *KEY_SLOG_INTERVAL = "/apps/psensor/slog/interval"; -GConfClient *client; +static const char *KEY_NOTIFICATION_SCRIPT = "/apps/psensor/notif_script"; -static char *get_string(char *key, char *default_value) +static GConfClient *client; + +static char *get_string(const char *key, const char *default_value) { - char *value = gconf_client_get_string(client, - key, - NULL); + char *value; + + value = gconf_client_get_string(client, key, NULL); if (!value) { value = strdup(default_value); - gconf_client_set_string(client, key, default_value, NULL); } return value; } -static struct color *config_get_background_color() +char *config_get_notif_script() +{ + char *str; + + str = gconf_client_get_string(client, KEY_NOTIFICATION_SCRIPT, NULL); + if (str && !strlen(str)) { + free(str); + str = NULL; + } + + return str; +} + +void config_set_notif_script(const char *str) { + if (str && strlen(str) > 0) + gconf_client_set_string(client, + KEY_NOTIFICATION_SCRIPT, str, NULL); + else + gconf_client_set_string(client, + KEY_NOTIFICATION_SCRIPT, "", NULL); +} - char *scolor = get_string(KEY_GRAPH_BACKGROUND_COLOR, - DEFAULT_GRAPH_BACKGROUND_COLOR); +static struct color *get_background_color() +{ + char *scolor; + struct color *c; - struct color *c = string_to_color(scolor); + scolor = get_string(KEY_GRAPH_BACKGROUND_COLOR, + DEFAULT_GRAPH_BACKGROUND_COLOR); + c = str_to_color(scolor); free(scolor); - if (c == NULL) + if (!c) return color_new(0xffff, 0xffff, 0xffff); return c; } -static struct color *config_get_foreground_color() +static struct color *get_foreground_color() { - char *scolor = get_string(KEY_GRAPH_FOREGROUND_COLOR, - DEFAULT_GRAPH_FOREGROUND_COLOR); + char *scolor; + struct color *c; - struct color *c = string_to_color(scolor); + scolor = get_string(KEY_GRAPH_FOREGROUND_COLOR, + DEFAULT_GRAPH_FOREGROUND_COLOR); + c = str_to_color(scolor); free(scolor); - if (c == NULL) + if (!c) return color_new(0x0000, 0x0000, 0x0000); return c; } -static int config_is_alpha_channel_enabled() +static bool is_alpha_channel_enabled() { - gboolean b = gconf_client_get_bool(client, - KEY_ALPHA_CHANNEL_ENABLED, - NULL); - - return b == TRUE; + return gconf_client_get_bool(client, KEY_ALPHA_CHANNEL_ENABLED, NULL); } -static int config_get_sensorlist_position() +static enum sensorlist_position get_sensorlist_position() { return gconf_client_get_int(client, KEY_INTERFACE_SENSORLIST_POSITION, NULL); } -static void config_set_sensorlist_position(int pos) +static void set_sensorlist_position(enum sensorlist_position pos) { gconf_client_set_int(client, KEY_INTERFACE_SENSORLIST_POSITION, pos, NULL); } -static double config_get_graph_background_alpha() +static double get_graph_background_alpha() { - double a = gconf_client_get_float(client, - KEY_GRAPH_BACKGROUND_ALPHA, - NULL); + double a; + a = gconf_client_get_float(client, KEY_GRAPH_BACKGROUND_ALPHA, NULL); if (a == 0) gconf_client_set_float(client, KEY_GRAPH_BACKGROUND_ALPHA, 1.0, NULL); return a; } -static void config_set_graph_background_alpha(double alpha) +static void set_graph_background_alpha(double alpha) { gconf_client_set_float(client, KEY_GRAPH_BACKGROUND_ALPHA, alpha, NULL); } -static void config_set_background_color(struct color *color) +static void set_background_color(const struct color *color) { - char *scolor = color_to_string(color); + char *scolor; + scolor = color_to_str(color); if (!scolor) scolor = strdup(DEFAULT_GRAPH_BACKGROUND_COLOR); @@ -170,52 +216,54 @@ static void config_set_background_color(struct color *color) free(scolor); } -static void config_set_foreground_color(struct color *color) +static void set_foreground_color(const struct color *color) { - char *scolor = color_to_string(color); + char *str; - if (!scolor) - scolor = strdup(DEFAULT_GRAPH_FOREGROUND_COLOR); + str = color_to_str(color); + if (!str) + str = strdup(DEFAULT_GRAPH_FOREGROUND_COLOR); - gconf_client_set_string(client, - KEY_GRAPH_FOREGROUND_COLOR, scolor, NULL); + gconf_client_set_string(client, KEY_GRAPH_FOREGROUND_COLOR, str, NULL); - free(scolor); + free(str); } -static char *config_get_sensor_key(char *sensor_name) +static char *get_sensor_att_key(const char *sid, const char *att) { - char *escaped_name = gconf_escape_key(sensor_name, -1); - /* /apps/psensor/sensors/[sensor_name]/color */ - char *key = malloc(22 + 2 * strlen(escaped_name) + 6 + 1); + char *esc_sid, *key; + + esc_sid = gconf_escape_key(sid, -1); + /* [KEY_SENSORS]/[esc_sid]/[att] */ + key = malloc(strlen(KEY_SENSORS) + + 1 + 2 * strlen(esc_sid) + + 1 + strlen(att) + 1); - sprintf(key, "/apps/psensor/sensors/%s/color", escaped_name); + sprintf(key, "%s/%s/%s", KEY_SENSORS, esc_sid, att); - free(escaped_name); + free(esc_sid); return key; } -struct color *config_get_sensor_color(char *sensor_name, - struct color *default_color) +struct color * +config_get_sensor_color(const char *sid, const struct color *dft) { - char *key = config_get_sensor_key(sensor_name); + char *key, *scolor; + struct color *color; - char *scolor = gconf_client_get_string(client, - key, - NULL); + key = get_sensor_att_key(sid, ATT_SENSOR_COLOR); - struct color *color = NULL; + scolor = gconf_client_get_string(client, key, NULL); + + color = NULL; if (scolor) - color = string_to_color(scolor); + color = str_to_color(scolor); if (!scolor || !color) { - color = color_new(default_color->red, - default_color->green, default_color->blue); - - scolor = color_to_string(color); - + color = color_new(dft->red, dft->green, dft->blue); + scolor = color_to_str(color); gconf_client_set_string(client, key, scolor, NULL); } @@ -225,183 +273,247 @@ struct color *config_get_sensor_color(char *sensor_name, return color; } -void config_set_sensor_color(char *sensor_name, struct color *color) +void config_set_sensor_color(const char *sid, const struct color *color) { - char *key = config_get_sensor_key(sensor_name); + char *key, *scolor; - char *scolor = color_to_string(color); + key = get_sensor_att_key(sid, ATT_SENSOR_COLOR); + scolor = color_to_str(color); gconf_client_set_string(client, key, scolor, NULL); free(scolor); + free(key); } -int config_get_sensor_alarm_limit(char *sensor_name, int def) +int config_get_sensor_alarm_high_threshold(const char *sid) { int res; - char *escaped_name = gconf_escape_key(sensor_name, -1); - /* /apps/psensor/sensors/[sensor_name]/alarmlimit */ - char *key = malloc(22 + 2 * strlen(escaped_name) + 1 + 10 + 1); - - sprintf(key, "/apps/psensor/sensors/%s/alarmlimit", escaped_name); + char *key; + key = get_sensor_att_key(sid, ATT_SENSOR_ALARM_HIGH_THRESHOLD); res = gconf_client_get_int(client, key, NULL); + free(key); - free(escaped_name); - - return res ? res : def; + return res; } -void config_set_sensor_alarm_limit(char *sensor_name, int alarm_limit) +void +config_set_sensor_alarm_high_threshold(const char *sid, int threshold) { - char *escaped_name = gconf_escape_key(sensor_name, -1); - /* /apps/psensor/sensors/[sensor_name]/alarmlimit */ - char *key = malloc(22 + 2 * strlen(escaped_name) + 1 + 10 + 1); + char *key; + + key = get_sensor_att_key(sid, ATT_SENSOR_ALARM_HIGH_THRESHOLD); + gconf_client_set_int(client, key, threshold, NULL); + free(key); +} - sprintf(key, "/apps/psensor/sensors/%s/alarmlimit", escaped_name); +int config_get_sensor_alarm_low_threshold(const char *sid) +{ + int res; + char *key; - gconf_client_set_int(client, key, alarm_limit, NULL); + key = get_sensor_att_key(sid, ATT_SENSOR_ALARM_LOW_THRESHOLD); + res = gconf_client_get_int(client, key, NULL); + free(key); - free(escaped_name); + return res; } -int config_get_sensor_alarm_enabled(char *sid) +void +config_set_sensor_alarm_low_threshold(const char *sid, int threshold) { - gboolean res; - char *escaped_name = gconf_escape_key(sid, -1); - /* /apps/psensor/sensors/[sensor_name]/alarmenabled */ - char *key = malloc(22 + 2 * strlen(escaped_name) + 1 + 12 + 1); + char *key; - sprintf(key, "/apps/psensor/sensors/%s/alarmenabled", escaped_name); + key = get_sensor_att_key(sid, ATT_SENSOR_ALARM_LOW_THRESHOLD); + gconf_client_set_int(client, key, threshold, NULL); + free(key); +} - res = gconf_client_get_bool(client, key, NULL); +bool config_get_sensor_alarm_enabled(const char *sid) +{ + gboolean b; + char *key; - free(escaped_name); + key = get_sensor_att_key(sid, ATT_SENSOR_ALARM_ENABLED); + b = gconf_client_get_bool(client, key, NULL); + free(key); - return res == TRUE; + return b; } -void config_set_sensor_alarm_enabled(char *sid, int enabled) +void config_set_sensor_alarm_enabled(const char *sid, bool enabled) { - char *escaped_name = gconf_escape_key(sid, -1); - /* /apps/psensor/sensors/[sensor_name]/alarmenabled */ - char *key = malloc(22 + 2 * strlen(escaped_name) + 1 + 12 + 1); - - sprintf(key, "/apps/psensor/sensors/%s/alarmenabled", escaped_name); + char *key; + key = get_sensor_att_key(sid, ATT_SENSOR_ALARM_ENABLED); gconf_client_set_bool(client, key, enabled, NULL); - - free(escaped_name); + free(key); } -int config_is_sensor_enabled(char *sid) +bool config_is_sensor_enabled(const char *sid) { - gboolean res; - char *escaped_name = gconf_escape_key(sid, -1); - /* /apps/psensor/sensors/[sensor_name]/enabled */ - char *key = malloc(22 + 2 * strlen(escaped_name) + 1 + 7 + 1); + gboolean b; + char *key; - sprintf(key, "/apps/psensor/sensors/%s/enabled", escaped_name); + key = get_sensor_att_key(sid, ATT_SENSOR_ENABLED); + b = gconf_client_get_bool(client, key, NULL); + free(key); - res = gconf_client_get_bool(client, key, NULL); + return b; +} - free(escaped_name); +void config_set_sensor_enabled(const char *sid, bool enabled) +{ + char *key; - return res == TRUE; + key = get_sensor_att_key(sid, ATT_SENSOR_ENABLED); + gconf_client_set_bool(client, key, enabled, NULL); + free(key); +} +char *config_get_sensor_name(const char *sid) +{ + char *name, *key; + + key = get_sensor_att_key(sid, ATT_SENSOR_NAME); + name = gconf_client_get_string(client, key, NULL); + free(key); + + return name; } -void config_set_sensor_enabled(char *sid, int enabled) +void config_set_sensor_name(const char *sid, const char *name) { - char *escaped_name = gconf_escape_key(sid, -1); - /* /apps/psensor/sensors/[sensor_name]/enabled */ - char *key = malloc(22 + 2 * strlen(escaped_name) + 1 + 7 + 1); + char *key; + + key = get_sensor_att_key(sid, ATT_SENSOR_NAME); + gconf_client_set_string(client, key, name, NULL); + free(key); +} - sprintf(key, "/apps/psensor/sensors/%s/enabled", escaped_name); +int config_get_sensor_position(const char *sid) +{ + char *key; + int pos; - gconf_client_set_bool(client, key, enabled, NULL); + key = get_sensor_att_key(sid, ATT_SENSOR_POSITION); + pos = gconf_client_get_int(client, key, NULL); + free(key); - free(escaped_name); + return pos; } -char *config_get_sensor_name(char *sid) +void config_set_sensor_position(const char *sid, int pos) { - char *res; - char *escaped_name = gconf_escape_key(sid, -1); - /* /apps/psensor/sensors/[sensor_name]/name */ - char *key = malloc(22 + 2 * strlen(escaped_name) + 1 + 4 + 1); + char *key; - sprintf(key, "/apps/psensor/sensors/%s/name", escaped_name); + key = get_sensor_att_key(sid, ATT_SENSOR_POSITION); + gconf_client_set_int(client, key, pos, NULL); + free(key); +} - res = gconf_client_get_string(client, key, NULL); +bool config_is_appindicator_enabled(const char *sid) +{ + char *key; + gboolean b; - free(escaped_name); + key = get_sensor_att_key(sid, ATT_SENSOR_APPINDICATOR_DISABLED); + b = gconf_client_get_bool(client, key, NULL); + free(key); - return res; + return !b; } -void config_set_sensor_name(char *sid, const char *name) +void config_set_appindicator_enabled(const char *sid, bool enabled) { - char *escaped_name = gconf_escape_key(sid, -1); - /* /apps/psensor/sensors/[sensor_name]/name */ - char *key = malloc(22 + 2 * strlen(escaped_name) + 1 + 4 + 1); + char *key; - sprintf(key, "/apps/psensor/sensors/%s/name", escaped_name); + key = get_sensor_att_key(sid, ATT_SENSOR_APPINDICATOR_DISABLED); + gconf_client_set_bool(client, key, !enabled, NULL); + free(key); +} - gconf_client_set_string(client, key, name, NULL); +bool is_slog_enabled() +{ + return gconf_client_get_bool(client, KEY_SLOG_ENABLED, NULL); +} - free(escaped_name); +static void set_slog_enabled(bool enabled) +{ + gconf_client_set_bool(client, KEY_SLOG_ENABLED, enabled, NULL); } -static int config_is_window_decoration_enabled() +void config_slog_enabled_notify_add(GConfClientNotifyFunc cbk, void *data) { - gboolean b; + log_debug("config_slog_enabled_notify_add"); + gconf_client_add_dir(client, + KEY_SLOG_ENABLED, + GCONF_CLIENT_PRELOAD_NONE, + NULL); + gconf_client_notify_add(client, + KEY_SLOG_ENABLED, + cbk, + data, + NULL, + NULL); +} - b = gconf_client_get_bool(client, - KEY_INTERFACE_WINDOW_DECORATION_DISABLED, - NULL); +int config_get_slog_interval() +{ + int res; - return b == FALSE; + res = gconf_client_get_int(client, KEY_SLOG_INTERVAL, NULL); + + if (res <= 0) + return 300; + else + return res; } -static int config_is_window_keep_below_enabled() +static void set_slog_interval(int interval) { - gboolean b; + if (interval <= 0) + interval = 300; - b = gconf_client_get_bool(client, - KEY_INTERFACE_WINDOW_KEEP_BELOW_ENABLED, - NULL); + gconf_client_set_int(client, KEY_SLOG_INTERVAL, interval, NULL); +} - return b == TRUE; +static bool is_window_decoration_enabled() +{ + return !gconf_client_get_bool(client, + KEY_INTERFACE_WINDOW_DECORATION_DISABLED, + NULL); } -static void config_set_window_decoration_enabled(int enabled) +static bool is_window_keep_below_enabled() { - if (enabled) - gconf_client_set_bool - (client, - KEY_INTERFACE_WINDOW_DECORATION_DISABLED, FALSE, NULL); - else - gconf_client_set_bool - (client, - KEY_INTERFACE_WINDOW_DECORATION_DISABLED, TRUE, NULL); + return gconf_client_get_bool(client, + KEY_INTERFACE_WINDOW_KEEP_BELOW_ENABLED, + NULL); } -static void config_set_window_keep_below_enabled(int enabled) +static void set_window_decoration_enabled(bool enabled) { - if (enabled) - gconf_client_set_bool(client, - KEY_INTERFACE_WINDOW_KEEP_BELOW_ENABLED, - TRUE, NULL); - else - gconf_client_set_bool(client, - KEY_INTERFACE_WINDOW_KEEP_BELOW_ENABLED, - FALSE, NULL); + gconf_client_set_bool + (client, + KEY_INTERFACE_WINDOW_DECORATION_DISABLED, !enabled, NULL); } -void config_init() +static void set_window_keep_below_enabled(bool enabled) +{ + gconf_client_set_bool(client, + KEY_INTERFACE_WINDOW_KEEP_BELOW_ENABLED, + enabled, NULL); +} + +/* + * Initializes the GConf client. + */ +static void init() { - client = gconf_client_get_default(); + if (!client) + client = gconf_client_get_default(); } void config_cleanup() @@ -416,15 +528,19 @@ struct config *config_load() { struct config *c; + init(); + c = malloc(sizeof(struct config)); - c->graph_bgcolor = config_get_background_color(); - c->graph_fgcolor = config_get_foreground_color(); - c->graph_bg_alpha = config_get_graph_background_alpha(); - c->alpha_channel_enabled = config_is_alpha_channel_enabled(); - c->sensorlist_position = config_get_sensorlist_position(); - c->window_decoration_enabled = config_is_window_decoration_enabled(); - c->window_keep_below_enabled = config_is_window_keep_below_enabled(); + c->graph_bgcolor = get_background_color(); + c->graph_fgcolor = get_foreground_color(); + c->graph_bg_alpha = get_graph_background_alpha(); + c->alpha_channel_enabled = is_alpha_channel_enabled(); + c->sensorlist_position = get_sensorlist_position(); + c->window_decoration_enabled = is_window_decoration_enabled(); + c->window_keep_below_enabled = is_window_keep_below_enabled(); + c->slog_enabled = is_slog_enabled(); + c->slog_interval = config_get_slog_interval(); c->sensor_update_interval = gconf_client_get_int(client, KEY_SENSOR_UPDATE_INTERVAL, NULL); @@ -491,17 +607,22 @@ struct config *config_load() c->window_h = 200; } + c->temperature_unit = gconf_client_get_int + (client, KEY_INTERFACE_TEMPERATURE_UNIT, NULL); + return c; } -void config_save(struct config *c) +void config_save(const struct config *c) { - config_set_background_color(c->graph_bgcolor); - config_set_foreground_color(c->graph_fgcolor); - config_set_graph_background_alpha(c->graph_bg_alpha); - config_set_sensorlist_position(c->sensorlist_position); - config_set_window_decoration_enabled(c->window_decoration_enabled); - config_set_window_keep_below_enabled(c->window_keep_below_enabled); + set_background_color(c->graph_bgcolor); + set_foreground_color(c->graph_fgcolor); + set_graph_background_alpha(c->graph_bg_alpha); + set_sensorlist_position(c->sensorlist_position); + set_window_decoration_enabled(c->window_decoration_enabled); + set_window_keep_below_enabled(c->window_keep_below_enabled); + set_slog_enabled(c->slog_enabled); + set_slog_interval(c->slog_interval); gconf_client_set_int(client, KEY_GRAPH_UPDATE_INTERVAL, @@ -532,25 +653,18 @@ void config_save(struct config *c) c->window_restore_enabled, NULL); - gconf_client_set_int(client, - KEY_INTERFACE_WINDOW_X, - c->window_x, - NULL); - gconf_client_set_int(client, - KEY_INTERFACE_WINDOW_Y, - c->window_y, - NULL); - gconf_client_set_int(client, - KEY_INTERFACE_WINDOW_W, - c->window_w, - NULL); - gconf_client_set_int(client, - KEY_INTERFACE_WINDOW_H, - c->window_h, - NULL); + gconf_client_set_int(client, KEY_INTERFACE_WINDOW_X, c->window_x, NULL); + gconf_client_set_int(client, KEY_INTERFACE_WINDOW_Y, c->window_y, NULL); + gconf_client_set_int(client, KEY_INTERFACE_WINDOW_W, c->window_w, NULL); + gconf_client_set_int(client, KEY_INTERFACE_WINDOW_H, c->window_h, NULL); gconf_client_set_int(client, KEY_INTERFACE_WINDOW_DIVIDER_POS, c->window_divider_pos, NULL); + + gconf_client_set_int(client, + KEY_INTERFACE_TEMPERATURE_UNIT, + c->temperature_unit, + NULL); } diff --git a/src/cfg.h b/src/cfg.h index f7d4df1..b8fccd1 100644 --- a/src/cfg.h +++ b/src/cfg.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 jeanfi@gmail.com + * Copyright (C) 2010-2013 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -19,8 +19,16 @@ #ifndef _PSENSOR_CONFIG_H_ #define _PSENSOR_CONFIG_H_ +#include + +#include "bool.h" #include "color.h" +enum temperature_unit { + CELCIUS, + FAHRENHEIT +}; + enum sensorlist_position { SENSORLIST_POSITION_RIGHT, SENSORLIST_POSITION_LEFT, @@ -34,16 +42,16 @@ struct config { double graph_bg_alpha; - int alpha_channel_enabled; + bool alpha_channel_enabled; /* - Position of the sensors list table + * Position of the sensors list table */ enum sensorlist_position sensorlist_position; - int window_decoration_enabled; - int window_keep_below_enabled; - int window_restore_enabled; + bool window_decoration_enabled; + bool window_keep_below_enabled; + bool window_restore_enabled; /* Last saved position of the window. */ int window_x; int window_y; @@ -59,11 +67,16 @@ struct config { int sensor_values_max_length; int sensor_update_interval; - int menu_bar_disabled; + bool menu_bar_disabled; - int unity_launcher_count_disabled; + bool unity_launcher_count_disabled; int hide_on_startup; + + enum temperature_unit temperature_unit; + + bool slog_enabled; + int slog_interval; }; /* @@ -71,25 +84,39 @@ struct config { */ struct config *config_load(); -void config_save(struct config *); - -void config_init(); +void config_save(const struct config *); void config_cleanup(); -struct color *config_get_sensor_color(char *, struct color *); -void config_set_sensor_color(char *, struct color *); +struct color *config_get_sensor_color(const char *sid, const struct color *); +void config_set_sensor_color(const char *sid, const struct color *); + +int config_get_sensor_alarm_high_threshold(const char *); +void config_set_sensor_alarm_high_threshold(const char *, int); + +int config_get_sensor_alarm_low_threshold(const char *); +void config_set_sensor_alarm_low_threshold(const char *, int); + +bool config_get_sensor_alarm_enabled(const char *); +void config_set_sensor_alarm_enabled(const char *, bool); + +bool config_is_sensor_enabled(const char *); +void config_set_sensor_enabled(const char *, bool); + +char *config_get_sensor_name(const char *); +void config_set_sensor_name(const char *, const char *); -int config_get_sensor_alarm_limit(char *, int); -void config_set_sensor_alarm_limit(char *, int); +bool config_is_appindicator_enabled(const char *); +void config_set_appindicator_enabled(const char *, bool); -int config_get_sensor_alarm_enabled(char *); -void config_set_sensor_alarm_enabled(char *, int); +void config_slog_enabled_notify_add(GConfClientNotifyFunc cbk, void *data); +bool is_slog_enabled(); -int config_is_sensor_enabled(char *); -void config_set_sensor_enabled(char *, int); +int config_get_slog_interval(); -char *config_get_sensor_name(char *); -void config_set_sensor_name(char *, const char *); +int config_get_sensor_position(const char *); +void config_set_sensor_position(const char *, int); +char *config_get_notif_script(); +void config_set_notif_script(const char *); #endif diff --git a/src/compat.h b/src/compat.h deleted file mode 100644 index 1478b5d..0000000 --- a/src/compat.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2010-2012 jeanfi@gmail.com - * - * This program 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 program 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 program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301 USA - */ - -/* - * gtk_dialog_get_content_area exists since gtk 2.14 As debian 5.0.6 - * (lenny) is using gtk 2.12 defines the function by using a macro. - */ -#if !defined(gtk_dialog_get_content_area) -#define gtk_dialog_get_content_area(dialog) (GTK_DIALOG(dialog)->vbox) -#endif diff --git a/src/description.txt b/src/description.txt index f85c2ca..3dfdd56 100644 --- a/src/description.txt +++ b/src/description.txt @@ -11,7 +11,8 @@ It can monitor: * the temperature of the motherboard and CPU sensors (using lm\-sensors). * the temperature of the NVidia GPUs (using XNVCtrl). * the temperature and fan rotation speed of the ATI GPUs. - * the temperature of the Hard Disk Drives (using hddtemp). + * the temperature of the Hard Disk Drives (using hddtemp or atasmart + library). * the rotation speed of the fans (using lm\-sensors). * the sensors of a remote computer (using psensor\-server). @@ -22,7 +23,7 @@ instruction. See the manpages of sensors(1) and sensors\-detect(8) for more information. To retrieve the temperature of the Hard Disk Drives, the hddtemp -daemon must be running. +daemon must be running or atasmart used ('\-\-use\-libatasmart'). For remote monitoring: * start psensor\-server(1) on the remote computer @@ -32,7 +33,12 @@ ATI/AMD GPUs monitoring is available if the library libatiadlxx is present in the directory /usr/lib and psensor has been compiled with the ATI ADL SDK. -Log is written to '$HOME/.psensor/log'. +Log messages are written to '$HOME/.psensor/log'. + +By default, if a Psensor process is already running, the command +psensor will show the graph window then exit. +It is possible to run multiple instances of Psensor by using the +option '\-\-new\-instance'. [SEE ALSO] diff --git a/src/glade/Makefile.am b/src/glade/Makefile.am index 58d1551..3f01895 100644 --- a/src/glade/Makefile.am +++ b/src/glade/Makefile.am @@ -1,5 +1,6 @@ gladedir = $(pkgdatadir) glade_DATA = \ + psensor.glade \ sensor-edit.glade \ psensor-pref.glade diff --git a/src/glade/Makefile.in b/src/glade/Makefile.in index 2cadc99..52f75a3 100644 --- a/src/glade/Makefile.in +++ b/src/glade/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +16,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -46,6 +63,11 @@ CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -67,6 +89,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(gladedir)" DATA = $(glade_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -74,6 +102,9 @@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ APPINDICATOR_CFLAGS = @APPINDICATOR_CFLAGS@ APPINDICATOR_LIBS = @APPINDICATOR_LIBS@ +AR = @AR@ +ATASMART_CFLAGS = @ATASMART_CFLAGS@ +ATASMART_LIBS = @ATASMART_LIBS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -93,8 +124,11 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +GCONFTOOL = @GCONFTOOL@ GCONF_CFLAGS = @GCONF_CFLAGS@ GCONF_LIBS = @GCONF_LIBS@ +GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ +GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ @@ -103,6 +137,7 @@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ GTOP_CFLAGS = @GTOP_CFLAGS@ GTOP_LIBS = @GTOP_LIBS@ +HAVE_CPPCHECK = @HAVE_CPPCHECK@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -147,6 +182,7 @@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ +PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SENSORS_LIBS = @SENSORS_LIBS@ SET_MAKE = @SET_MAKE@ @@ -168,6 +204,7 @@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ @@ -216,6 +253,7 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ gladedir = $(pkgdatadir) glade_DATA = \ + psensor.glade \ sensor-edit.glade \ psensor-pref.glade @@ -255,8 +293,11 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): install-gladeDATA: $(glade_DATA) @$(NORMAL_INSTALL) - test -z "$(gladedir)" || $(MKDIR_P) "$(DESTDIR)$(gladedir)" @list='$(glade_DATA)'; test -n "$(gladedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(gladedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(gladedir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -270,9 +311,7 @@ uninstall-gladeDATA: @$(NORMAL_UNINSTALL) @list='$(glade_DATA)'; test -n "$(gladedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(gladedir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(gladedir)" && rm -f $$files + dir='$(DESTDIR)$(gladedir)'; $(am__uninstall_files_from_dir) tags: TAGS TAGS: @@ -327,10 +366,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/glade/psensor-pref.glade b/src/glade/psensor-pref.glade index 5526765..4a784be 100644 --- a/src/glade/psensor-pref.glade +++ b/src/glade/psensor-pref.glade @@ -1,6 +1,6 @@ - + False 5 @@ -24,7 +24,6 @@ True True True - False True @@ -39,7 +38,6 @@ True True True - False True @@ -57,499 +55,715 @@ - + True - False - 18 - 3 - - - True - False - 0 - Graph Colors - - - - - - 3 - 4 - 4 - - + True - + True False - 0 - Foreground: + 8 + 3 + + + True + False + 0 + Position of sensors table: + + + 14 + 4 + + + + + Hide window decoration + True + True + False + 0 + True + + + 3 + 1 + 2 + 14 + 4 + + + + + Keep window below + True + True + False + 0 + True + + + 3 + 2 + 3 + 14 + 4 + + + + + Enable menu + True + True + False + 0 + True + + + 3 + 3 + 4 + 14 + 4 + + + + + Enable Unity Launcher counter + True + True + False + 0 + True + + + 3 + 4 + 5 + 14 + 4 + + + + + Hide window on startup + True + True + False + 0 + True + + + 3 + 5 + 6 + 14 + 4 + + + + + Restore window position and size + True + True + False + 0 + True + + + 3 + 6 + 7 + 14 + 4 + + + + + True + False + 0 + Temperature unit: + + + 7 + 8 + 14 + + + + + True + False + 0 + 1 + + Celcius + Fahrenheit + + + + 1 + 3 + 7 + 8 + 4 + 4 + + + + + True + False + position_list_store + 0 + + + + 0 + + + + + 1 + 3 + + - - 1 - 2 - 14 - 4 - - - + + True False - 0 - Background: + Interface - 2 - 3 - 14 - 4 + False - + True False - 0 - Background opacity: - - - 3 - 3 - 4 - 14 - 4 - - - - - True - True - True - False - #000000000000 - - - 1 - 3 - 1 - 2 - - 4 - 4 - - - - - True - True - True - False - #000000000000 + start + True + + + True + True + True + start + 4 + 4 + 4 + 4 + #000000000000 + + + 1 + 1 + 1 + 1 + + + + + True + False + start + 14 + 0 + Foreground: + + + 0 + 1 + 2 + 1 + + + + + True + False + 14 + 0 + Background: + + + 0 + 2 + 2 + 1 + + + + + True + True + True + start + 4 + 4 + 4 + 4 + #000000000000 + + + 1 + 2 + 1 + 1 + + + + + True + False + 14 + 0 + Background opacity: + + + 0 + 3 + 1 + 1 + + + + + True + False + 4 + 4 + 4 + 4 + 8 + + + True + False + 0 + <i>Min</i> + True + + + False + True + 0 + + + + + True + True + opacity + False + + + True + True + 1 + + + + + True + False + 0 + <i>Max</i> + True + + + False + True + 2 + + + + + 1 + 3 + 2 + 1 + + + + + True + False + 4 + 4 + 4 + 4 + 0 + Colors + + + + + + 0 + 0 + 2 + 1 + + + + + True + False + 14 + 0 + Monitoring duration: + + + 0 + 5 + 1 + 1 + + + + + True + True + 4 + 4 + 4 + 4 + • + True + False + False + mins + + + 1 + 5 + 1 + 1 + + + + + True + False + 4 + 4 + 4 + 4 + minute(s) + + + 2 + 5 + 1 + 1 + + + + + True + False + 4 + 4 + 4 + 4 + second(s) + + + 2 + 6 + 1 + 1 + + + + + True + True + 4 + 4 + 4 + 4 + • + True + False + False + secs + + + 1 + 6 + 1 + 1 + + + + + True + False + 14 + 0 + Update interval: + + + 0 + 6 + 1 + 1 + + + + + True + False + 4 + 4 + 8 + 4 + 0 + Measures + + + + + + 0 + 4 + 1 + 1 + + + + + + + + + + + + + + + + + - 1 - 3 - 2 - 3 - - 4 - 4 + 1 - - + + True False - 0 Graph - - - - 3 - 5 - 6 - 4 - 4 - - - - - True - False - 0 - Update interval: - - - 6 - 7 - 14 - 4 - - - - - True - False - 0 - Monitoring duration: - - - 7 - 8 - 14 - 4 - - - - - True - False - second(s) - - - 2 - 3 - 6 - 7 - 4 - 4 - - - - - True - False - minute(s) - - - 2 - 3 - 7 - 8 - 4 - 4 - - - - - True - False - 0 - Sensor - - - - - - 3 - 8 - 9 - 4 - 4 - - - - - True - False - 0 - Measure update interval: - - - 9 - 10 - 14 - 4 - - - - - True - False - second(s) - - - 2 - 3 - 9 - 10 - 4 - 4 - - - - - True - False - 0 - Interface - - - - - - 3 - 10 - 11 - 4 - 4 - - - - - True - False - 0 - Position of sensors table: - - - 11 - 12 - 14 - 4 - - - - - Hide window decoration - True - True - False - False - 0 - True - - - 3 - 12 - 13 - 14 - 4 - - - - - Keep window below - True - True - False - False - 0 - True - - - 3 - 13 - 14 - 14 - 4 - - - - - True - True - • - False - False - secs - - - 1 - 2 - 6 - 7 - 4 - 4 - - - - - True - True - • - False - False - mins - - - 1 - 2 - 7 - 8 - 4 - 4 - - - - - True - True - • - False - False - secs2 - - - 1 - 2 - 9 - 10 - 4 - 4 + 1 + False - + True False - liststore1 + start + 8 - - - 0 - + + True + False + start + start + 4 + 4 + 8 + 4 + 0 + Measure update interval: + + + 0 + 0 + 1 + 1 + + + + + True + True + 4 + 4 + 4 + 4 + • + True + False + False + secs2 + + + 1 + 0 + 1 + 1 + - - - 1 - 3 - 11 - 12 - 4 - 4 - - - - - True - False - 8 - + True False + 4 + 4 + 4 + 4 + second(s) + + + 2 + 0 + 1 + 1 + + + + + Enable sensors logging + True + True + False + 4 + 4 + 4 + 4 0 - <i>Min</i> - True + 0.49000000953674316 + True - False - True - 0 + 0 + 1 + 3 + 1 - + True True - opacity - False + 4 + 4 + 4 + 4 + • + 1 + slog_interval_adjustment - True - True - 1 + 1 + 2 + 1 + 1 - + True False - 0 - <i>Max</i> - True + start + 4 + 4 + 4 + 4 + Sensors logging interval - False - True - 2 + 0 + 2 + 1 + 1 + + + + + True + False + 4 + 4 + 4 + 4 + seconds(s) + + + 2 + 2 + 1 + 1 + + + + + True + False + 4 + 4 + 4 + 4 + Script executed when an alarm is raised + + + 0 + 3 + 1 + 1 + + + + + True + True + • + True + + + 1 + 3 + 2 + 1 - 3 - 4 - 5 - 14 - 4 - - - - - Enable menu - True - True - False - False - True - - - 3 - 14 - 15 - 14 - 4 + 2 + False - - - Enable Unity Launcher counter + + True - True - False - False - 0 - True + False + Sensors - 3 - 15 - 16 - 14 - 4 + 2 + False - - Hide window on startup - True - True - False - False - True - - - 3 - 16 - 17 - 14 - 4 - + - - - Restore window position and size - True - True - False - False - True - - - 3 - 17 - 18 - 14 - 4 - + + - True + False True 1 @@ -561,14 +775,26 @@ button2 - + + 1 + 65535 + 10 + 1 + 10 + + + 1 + 0.01 + 0.10000000000000001 + + - Right + Right Left @@ -581,18 +807,12 @@ - + 1 - 65535 - 10 + 256 1 10 - - 1 - 0.01 - 0.10000000000000001 - 1 256 @@ -600,9 +820,10 @@ 1 10 - + 1 - 256 + 6500 + 300 1 10 diff --git a/src/glade/psensor.glade b/src/glade/psensor.glade new file mode 100644 index 0000000..71276b3 --- /dev/null +++ b/src/glade/psensor.glade @@ -0,0 +1,238 @@ + + + + + About + + + + Preferences + + + + Quit + + + + Sensor Preferences + + + + True + False + + + PreferencesAction + True + False + True + True + + + + + SensorPreferencesAction + True + False + True + True + + + + + True + False + + + + + AboutAction + True + False + True + True + + + + + True + False + + + + + QuitAction + True + False + True + True + + + + + + + + + + + + + + + + + + + + + + + + + + + False + Psensor - Temperature Monitor + psensor + + + True + False + vertical + + + True + False + + + True + False + _Psensor + True + + + True + False + + + PreferencesAction + True + False + True + True + + + + + SensorPreferencesAction + True + False + True + True + + + + + True + False + + + + + QuitAction + True + False + True + True + + + + + + + + + True + False + _Help + True + + + True + False + + + AboutAction + True + False + True + True + + + + + + + + + False + True + 0 + + + + + True + True + + + True + False + True + True + + + True + True + + + + + True + True + never + in + + + True + True + True + True + sensors_store + 0 + True + + + none + + + + + + + False + True + + + + + True + True + 1 + + + + + + diff --git a/src/glade/sensor-edit.glade b/src/glade/sensor-edit.glade index 8b098b7..777e930 100644 --- a/src/glade/sensor-edit.glade +++ b/src/glade/sensor-edit.glade @@ -1,7 +1,18 @@ - - + + + -9999 + 9999 + 1 + 10 + + + -9999 + 9999 + 1 + 10 + False 5 @@ -9,14 +20,14 @@ True True dialog - True - + True False + vertical 2 - + True False end @@ -26,7 +37,6 @@ True True True - False True @@ -41,7 +51,6 @@ True True True - False True @@ -67,6 +76,23 @@ True True sensors_liststore + False + True + 1 + + + + + + Name + + + + 0 + + + + False @@ -77,39 +103,13 @@ True False - 10 + 15 2 - - True - False - 0 - N/A - - - 1 - 2 - 1 - 2 - 4 - 4 - + - - True - False - 0 - 10 - Name: - - - 3 - 4 - GTK_FILL - 4 - 4 - + @@ -119,14 +119,12 @@ True False False - True - True 1 2 - 3 - 4 + 1 + 2 4 4 @@ -136,7 +134,9 @@ True False 0 + 0.49000000953674316 Type: + fill 2 @@ -162,21 +162,6 @@ - - True - False - 0 - Id: - - - 1 - 2 - GTK_FILL - 14 - 4 - - - True False @@ -188,8 +173,8 @@ 2 - 4 - 5 + 6 + 7 4 4 @@ -202,8 +187,8 @@ Color: - 6 - 7 + 8 + 9 14 4 @@ -220,8 +205,8 @@ 2 - 7 - 8 + 9 + 10 4 4 @@ -232,28 +217,13 @@ True True False - False + 0 True 2 - 8 - 9 - 14 - 4 - - - - - True - False - 0 - Temperature limit: - - - 9 - 10 - GTK_FILL + 10 + 11 14 4 @@ -280,14 +250,13 @@ True True False - False - 0.41999998688697815 + 0 True 2 - 5 - 6 + 7 + 8 14 4 @@ -297,17 +266,14 @@ True False - + True True - 3 • True False False - True - True - temp_limit + alarm_high_threshold_value 1 True True @@ -320,11 +286,12 @@ - + True False + start 0 - °C + N/A True @@ -336,8 +303,8 @@ 1 2 - 9 - 10 + 11 + 12 @@ -345,16 +312,238 @@ True True True - False 0 #000000000000 1 2 - 6 - 7 - + 8 + 9 + + 4 + 4 + + + + + True + False + 0.0099999997764825821 + High threshold: + + + 11 + 12 + GTK_FILL + 14 + 4 + + + + + True + False + 0.0099999997764825821 + Low threshold: + + + 12 + 13 + GTK_FILL + 14 + 4 + + + + + True + False + + + True + True + • + True + False + False + alarm_low_threshold_value + 1 + True + True + if-valid + + + False + True + 0 + + + + + True + False + start + 0 + N/A + + + True + True + 1 + + + + + 1 + 2 + 12 + 13 + + + + + True + False + 0 + Ubuntu Application Indicator + + + + + + 2 + 13 + 14 + 4 + 4 + + + + + Display sensor in the Application Indicator menu + True + True + False + 0 + True + + + 2 + 14 + 15 + 14 + 4 + + + + + True + False + 0 + Chip: + + + 3 + 4 + GTK_FILL + 14 + 4 + + + + + True + False + 0 + N/A + + + 1 + 2 + 3 + 4 + 4 + 4 + + + + + True + True + + + True + False + 4 + 4 + 4 + 4 + True + True + + + True + False + 0 + Id: + + + 0 + 0 + 1 + 1 + + + + + True + False + 4 + 4 + 4 + 4 + True + 0 + N/A + + + 1 + 0 + 1 + 1 + + + + + + + True + False + Details + + + + + 2 + 5 + 6 + 14 + 4 + + + + + True + False + 0 + 10 + Name: + + + 1 + 2 + GTK_FILL 4 4 @@ -381,13 +570,10 @@ - + + + - - 256 - 1 - 10 - diff --git a/src/graph.c b/src/graph.c index f40e442..f12a155 100644 --- a/src/graph.c +++ b/src/graph.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 jeanfi@gmail.com + * Copyright (C) 2010-2013 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -17,10 +17,15 @@ * 02110-1301 USA */ #include +#include + #include + +#include #include #include "cfg.h" +#include "log.h" #include "psensor.h" /* horizontal padding */ @@ -76,27 +81,31 @@ draw_graph_background(cairo_t *cr, int g_xoff, int g_yoff, int g_width, int g_height, int width, int height, struct config *config, - GtkWidget *widget) + GtkWidget *widget, + GtkWidget *window) { - GtkStyle *style; - struct color *bgcolor = config->graph_bgcolor; - GdkColor *bg; + GtkStyleContext *style_ctx; + struct color *bgcolor; + GdkRGBA rgba; - style = gtk_widget_get_style(widget); + bgcolor = config->graph_bgcolor; - bg = &style->bg[GTK_STATE_NORMAL]; + style_ctx = gtk_widget_get_style_context(window); + gtk_style_context_get_background_color(style_ctx, + GTK_STATE_FLAG_NORMAL, + &rgba); if (config->alpha_channel_enabled) cairo_set_source_rgba(cr, - ((double)bg->red) / 65535, - ((double)bg->green) / 65535, - ((double)bg->blue) / 65535, + rgba.red, + rgba.green, + rgba.blue, config->graph_bg_alpha); else cairo_set_source_rgb(cr, - ((double)bg->red) / 65535, - ((double)bg->green) / 65535, - ((double)bg->blue) / 65535); + rgba.red, + rgba.green, + rgba.blue); cairo_rectangle(cr, 0, 0, width, height); cairo_fill(cr); @@ -104,13 +113,13 @@ draw_graph_background(cairo_t *cr, cairo_set_source_rgba(cr, bgcolor->f_red, bgcolor->f_green, - bgcolor->f_blue, config->graph_bg_alpha); + bgcolor->f_blue, + config->graph_bg_alpha); else cairo_set_source_rgb(cr, bgcolor->f_red, - bgcolor->f_green, bgcolor->f_blue); - - + bgcolor->f_green, + bgcolor->f_blue); cairo_rectangle(cr, g_xoff, g_yoff, g_width, g_height); cairo_fill(cr); @@ -171,27 +180,28 @@ static void draw_sensor_curve(struct psensor *s, int g_xoff, int g_yoff) { - int first = 1; - int i; + int first, i, x, y, t, dt, vdt; + double v; cairo_set_source_rgb(cr, s->color->f_red, s->color->f_green, s->color->f_blue); - cairo_set_line_join(cr, CAIRO_LINE_JOIN_ROUND); - cairo_set_line_width(cr, 1); + dt = et - bt; + first = 1; for (i = 0; i < s->values_max_length; i++) { - int x, y, t; - double v; - t = s->measures[i].time.tv_sec; - v = s->measures[i].value.d_num; + v = s->measures[i].value; + + if (v == UNKNOWN_DBL_VALUE || !t) + continue; - if (v == UNKNOWN_DBL_VALUE || !t || (t - bt) < 0) + vdt = t - bt; + if (vdt < 0) continue; - x = (t - bt) * g_width / (et - bt) + g_xoff; + x = vdt * g_width / dt + g_xoff; y = compute_y(v, min, max, g_height, g_yoff); @@ -206,36 +216,62 @@ static void draw_sensor_curve(struct psensor *s, cairo_stroke(cr); } +static void display_no_graphs_warning(cairo_t *cr, int x, int y) +{ + char *msg; + + msg = strdup(_("No graphs enabled")); + + cairo_select_font_face(cr, + "sans-serif", + CAIRO_FONT_SLANT_NORMAL, + CAIRO_FONT_WEIGHT_NORMAL); + cairo_set_font_size(cr, 18.0); + + cairo_move_to(cr, x, y); + cairo_show_text(cr, msg); + + free(msg); +} void graph_update(struct psensor **sensors, GtkWidget *w_graph, - struct config *config) + struct config *config, + GtkWidget *window) { struct color *fgcolor = config->graph_fgcolor; int et, bt, width, height, g_width, g_height; double min_rpm, max_rpm, mint, maxt; char *strmin, *strmax; /* horizontal and vertical offset of the graph */ - int g_xoff, g_yoff; + int g_xoff, g_yoff, no_graphs, min, max; cairo_surface_t *cst; cairo_t *cr, *cr_pixmap; char *str_btime, *str_etime; cairo_text_extents_t te_btime, te_etime, te_max, te_min; - struct psensor **sensor_cur; + struct psensor **sensor_cur, **enabled_sensors; GtkAllocation galloc; + GtkStyleContext *style_ctx; + GdkRGBA rgba; if (!gtk_widget_is_drawable(w_graph)) return ; - min_rpm = get_min_rpm(sensors); - max_rpm = get_max_rpm(sensors); + enabled_sensors = psensor_list_filter_graph_enabled(sensors); - mint = get_min_temp(sensors); - strmin = psensor_value_to_string(SENSOR_TYPE_TEMP, mint); + min_rpm = get_min_rpm(enabled_sensors); + max_rpm = get_max_rpm(enabled_sensors); - maxt = get_max_temp(sensors); - strmax = psensor_value_to_string(SENSOR_TYPE_TEMP, maxt); + mint = get_min_temp(enabled_sensors); + strmin = psensor_value_to_str(SENSOR_TYPE_TEMP, + mint, + config->temperature_unit == CELCIUS); + + maxt = get_max_temp(enabled_sensors); + strmax = psensor_value_to_str(SENSOR_TYPE_TEMP, + maxt, + config->temperature_unit == CELCIUS); str_btime = time_to_str(get_graph_begin_time_s(config)); str_etime = time_to_str(get_graph_end_time_s()); @@ -276,10 +312,13 @@ graph_update(struct psensor **sensors, draw_graph_background(cr, g_xoff, g_yoff, g_width, g_height, width, height, config, - w_graph); + w_graph, + window); - cairo_set_source_rgb(cr, - fgcolor->f_red, fgcolor->f_green, fgcolor->f_blue); + /** Set the color for text drawing */ + style_ctx = gtk_widget_get_style_context(window); + gtk_style_context_get_color(style_ctx, GTK_STATE_FLAG_NORMAL, &rgba); + cairo_set_source_rgb(cr, rgba.red, rgba.green, rgba.blue); /* draw graph begin time */ cairo_move_to(cr, g_xoff, height - GRAPH_V_PADDING); @@ -313,35 +352,40 @@ graph_update(struct psensor **sensors, et = get_graph_end_time_s(); if (bt && et) { - sensor_cur = sensors; + sensor_cur = enabled_sensors; + + cairo_set_line_join(cr, CAIRO_LINE_JOIN_ROUND); + cairo_set_line_width(cr, 1); + no_graphs = 1; while (*sensor_cur) { struct psensor *s = *sensor_cur; - if (s->enabled) { - double min, max; - - if (is_fan_type(s->type)) { - min = min_rpm; - max = max_rpm; - } else if (s->type & SENSOR_TYPE_CPU_USAGE) { - min = 0; - max = get_max_value - (sensors, - SENSOR_TYPE_CPU_USAGE); - } else { - min = mint; - max = maxt; - } - - draw_sensor_curve(s, cr, - min, max, - bt, et, - g_width, g_height, - g_xoff, g_yoff); + no_graphs = 0; + if (is_fan_type(s->type)) { + min = min_rpm; + max = max_rpm; + } else if (s->type & SENSOR_TYPE_CPU_USAGE) { + min = 0; + max = get_max_value(enabled_sensors, + SENSOR_TYPE_CPU_USAGE); + } else { + min = mint; + max = maxt; } + draw_sensor_curve(s, cr, + min, max, + bt, et, + g_width, g_height, + g_xoff, g_yoff); + sensor_cur++; } + + if (no_graphs) + display_no_graphs_warning(cr, + g_xoff + 12, + g_height / 2); } cr_pixmap = gdk_cairo_create(gtk_widget_get_window(w_graph)); @@ -355,6 +399,8 @@ graph_update(struct psensor **sensors, cairo_paint(cr_pixmap); } + free(enabled_sensors); + cairo_destroy(cr_pixmap); cairo_surface_destroy(cst); cairo_destroy(cr); diff --git a/src/graph.h b/src/graph.h index 897ec7b..e4966da 100644 --- a/src/graph.h +++ b/src/graph.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 jeanfi@gmail.com + * Copyright (C) 2010-2013 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -24,6 +24,9 @@ #include "psensor.h" #include "cfg.h" -void graph_update(struct psensor **, GtkWidget *, struct config *config); +void graph_update(struct psensor **sensors, + GtkWidget * w_graph, + struct config *config, + GtkWidget * window); #endif diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am index 74d2b76..03ffdc8 100644 --- a/src/lib/Makefile.am +++ b/src/lib/Makefile.am @@ -2,22 +2,32 @@ noinst_LIBRARIES = libpsensor.a libpsensor_a_SOURCES = \ amd.h \ - cpu.h \ - measure.h measure.c \ + bool.h \ color.h color.c \ + cpu.h \ + hdd.h hdd_hddtemp.c\ + lmsensor.h lmsensor.c \ log.h log.c \ - psensor.h psensor.c\ - hdd.h hdd.c\ + measure.h measure.c \ + ptime.h ptime.c \ nvidia.h \ - lmsensor.h lmsensor.c \ - p_io.h p_io.c \ + psensor.h psensor.c\ + pio.h pio.c \ + slog.c slog.h \ url.c url.h AM_CPPFLAGS = -Wall -Werror +if ATASMART +libpsensor_a_SOURCES += hdd_atasmart.c +LIBS += $(ATASMART_LIBS) +AM_CPPFLAGS += $(ATASMART_CFLAGS) +endif + if NVIDIA libpsensor_a_SOURCES += nvidia.c endif + if LIBATIADL LIBS += $(LIBATIADL_LIBS) AM_CPPFLAGS += $(LIBATIADL_CFLAGS) diff --git a/src/lib/Makefile.in b/src/lib/Makefile.in index 80f2527..d366e16 100644 --- a/src/lib/Makefile.in +++ b/src/lib/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +16,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -34,16 +51,19 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -@NVIDIA_TRUE@am__append_1 = nvidia.c -@LIBATIADL_TRUE@am__append_2 = $(LIBATIADL_LIBS) -@LIBATIADL_TRUE@am__append_3 = $(LIBATIADL_CFLAGS) -@LIBATIADL_TRUE@am__append_4 = amd.c -@GTOP_TRUE@am__append_5 = cpu.c -@GTOP_TRUE@am__append_6 = $(GTOP_LIBS) -@GTOP_TRUE@am__append_7 = $(GTOP_CFLAGS) -@JSON_TRUE@am__append_8 = psensor_json.h psensor_json.c -@JSON_TRUE@am__append_9 = $(JSON_LIBS) -@JSON_TRUE@am__append_10 = $(JSON_CFLAGS) +@ATASMART_TRUE@am__append_1 = hdd_atasmart.c +@ATASMART_TRUE@am__append_2 = $(ATASMART_LIBS) +@ATASMART_TRUE@am__append_3 = $(ATASMART_CFLAGS) +@NVIDIA_TRUE@am__append_4 = nvidia.c +@LIBATIADL_TRUE@am__append_5 = $(LIBATIADL_LIBS) +@LIBATIADL_TRUE@am__append_6 = $(LIBATIADL_CFLAGS) +@LIBATIADL_TRUE@am__append_7 = amd.c +@GTOP_TRUE@am__append_8 = cpu.c +@GTOP_TRUE@am__append_9 = $(GTOP_LIBS) +@GTOP_TRUE@am__append_10 = $(GTOP_CFLAGS) +@JSON_TRUE@am__append_11 = psensor_json.h psensor_json.c +@JSON_TRUE@am__append_12 = $(JSON_LIBS) +@JSON_TRUE@am__append_13 = $(JSON_CFLAGS) subdir = src/lib DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -55,23 +75,24 @@ CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) -AR = ar ARFLAGS = cru libpsensor_a_AR = $(AR) $(ARFLAGS) libpsensor_a_LIBADD = -am__libpsensor_a_SOURCES_DIST = amd.h cpu.h measure.h measure.c \ - color.h color.c log.h log.c psensor.h psensor.c hdd.h hdd.c \ - nvidia.h lmsensor.h lmsensor.c p_io.h p_io.c url.c url.h \ +am__libpsensor_a_SOURCES_DIST = amd.h bool.h color.h color.c cpu.h \ + hdd.h hdd_hddtemp.c lmsensor.h lmsensor.c log.h log.c \ + measure.h measure.c ptime.h ptime.c nvidia.h psensor.h \ + psensor.c pio.h pio.c slog.c slog.h url.c url.h hdd_atasmart.c \ nvidia.c amd.c cpu.c psensor_json.h psensor_json.c -@NVIDIA_TRUE@am__objects_1 = nvidia.$(OBJEXT) -@LIBATIADL_TRUE@am__objects_2 = amd.$(OBJEXT) -@GTOP_TRUE@am__objects_3 = cpu.$(OBJEXT) -@JSON_TRUE@am__objects_4 = psensor_json.$(OBJEXT) -am_libpsensor_a_OBJECTS = measure.$(OBJEXT) color.$(OBJEXT) \ - log.$(OBJEXT) psensor.$(OBJEXT) hdd.$(OBJEXT) \ - lmsensor.$(OBJEXT) p_io.$(OBJEXT) url.$(OBJEXT) \ - $(am__objects_1) $(am__objects_2) $(am__objects_3) \ - $(am__objects_4) +@ATASMART_TRUE@am__objects_1 = hdd_atasmart.$(OBJEXT) +@NVIDIA_TRUE@am__objects_2 = nvidia.$(OBJEXT) +@LIBATIADL_TRUE@am__objects_3 = amd.$(OBJEXT) +@GTOP_TRUE@am__objects_4 = cpu.$(OBJEXT) +@JSON_TRUE@am__objects_5 = psensor_json.$(OBJEXT) +am_libpsensor_a_OBJECTS = color.$(OBJEXT) hdd_hddtemp.$(OBJEXT) \ + lmsensor.$(OBJEXT) log.$(OBJEXT) measure.$(OBJEXT) \ + ptime.$(OBJEXT) psensor.$(OBJEXT) pio.$(OBJEXT) slog.$(OBJEXT) \ + url.$(OBJEXT) $(am__objects_1) $(am__objects_2) \ + $(am__objects_3) $(am__objects_4) $(am__objects_5) libpsensor_a_OBJECTS = $(am_libpsensor_a_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp @@ -83,6 +104,11 @@ CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libpsensor_a_SOURCES) DIST_SOURCES = $(am__libpsensor_a_SOURCES_DIST) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -90,6 +116,9 @@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ APPINDICATOR_CFLAGS = @APPINDICATOR_CFLAGS@ APPINDICATOR_LIBS = @APPINDICATOR_LIBS@ +AR = @AR@ +ATASMART_CFLAGS = @ATASMART_CFLAGS@ +ATASMART_LIBS = @ATASMART_LIBS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -109,8 +138,11 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +GCONFTOOL = @GCONFTOOL@ GCONF_CFLAGS = @GCONF_CFLAGS@ GCONF_LIBS = @GCONF_LIBS@ +GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ +GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ @@ -119,6 +151,7 @@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ GTOP_CFLAGS = @GTOP_CFLAGS@ GTOP_LIBS = @GTOP_LIBS@ +HAVE_CPPCHECK = @HAVE_CPPCHECK@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -139,7 +172,8 @@ LIBMICROHTTPD_LIBS = @LIBMICROHTTPD_LIBS@ LIBNOTIFY_CFLAGS = @LIBNOTIFY_CFLAGS@ LIBNOTIFY_LIBS = @LIBNOTIFY_LIBS@ LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ $(am__append_2) $(am__append_6) $(am__append_9) +LIBS = @LIBS@ $(am__append_2) $(am__append_5) $(am__append_9) \ + $(am__append_12) LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ @@ -163,6 +197,7 @@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ +PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SENSORS_LIBS = @SENSORS_LIBS@ SET_MAKE = @SET_MAKE@ @@ -184,6 +219,7 @@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ @@ -231,13 +267,14 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LIBRARIES = libpsensor.a -libpsensor_a_SOURCES = amd.h cpu.h measure.h measure.c color.h color.c \ - log.h log.c psensor.h psensor.c hdd.h hdd.c nvidia.h \ - lmsensor.h lmsensor.c p_io.h p_io.c url.c url.h \ - $(am__append_1) $(am__append_4) $(am__append_5) \ - $(am__append_8) -AM_CPPFLAGS = -Wall -Werror $(am__append_3) $(am__append_7) \ - $(am__append_10) +libpsensor_a_SOURCES = amd.h bool.h color.h color.c cpu.h hdd.h \ + hdd_hddtemp.c lmsensor.h lmsensor.c log.h log.c measure.h \ + measure.c ptime.h ptime.c nvidia.h psensor.h psensor.c pio.h \ + pio.c slog.c slog.h url.c url.h $(am__append_1) \ + $(am__append_4) $(am__append_7) $(am__append_8) \ + $(am__append_11) +AM_CPPFLAGS = -Wall -Werror $(am__append_3) $(am__append_6) \ + $(am__append_10) $(am__append_13) EXTRA_DIST = $(libpsensor_a_SOURCES) \ amd.c \ cpu.c \ @@ -280,7 +317,7 @@ $(am__aclocal_m4_deps): clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libpsensor.a: $(libpsensor_a_OBJECTS) $(libpsensor_a_DEPENDENCIES) +libpsensor.a: $(libpsensor_a_OBJECTS) $(libpsensor_a_DEPENDENCIES) $(EXTRA_libpsensor_a_DEPENDENCIES) -rm -f libpsensor.a $(libpsensor_a_AR) libpsensor.a $(libpsensor_a_OBJECTS) $(libpsensor_a_LIBADD) $(RANLIB) libpsensor.a @@ -294,14 +331,17 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/color.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hdd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hdd_atasmart.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hdd_hddtemp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lmsensor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/measure.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nvidia.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/p_io.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pio.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/psensor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/psensor_json.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ptime.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/slog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/url.Po@am__quote@ .c.o: @@ -414,10 +454,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/lib/amd.c b/src/lib/amd.c index ff60332..02fcc03 100644 --- a/src/lib/amd.c +++ b/src/lib/amd.c @@ -1,6 +1,8 @@ /* - * Copyright (C) 2010-2011 thgreasi@gmail.com - * Copyright (C) 2010-2012 jeanfi@gmail.com + * Copyright (C) 2010-2011 thgreasi@gmail.com, jeanfi@gmail.com + * Copyright (C) 2010-2013 jeanfi@gmail.com + * + * GPU usage is a contribution of MestreLion * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -20,10 +22,6 @@ #ifndef LINUX #define LINUX 1 #endif -#ifdef HAVE_LIBATIADL - /* AMD id for the aticonfig */ - int amd_id; -#endif #include #include @@ -43,154 +41,176 @@ typedef int (*ADL_MAIN_CONTROL_DESTROY)(); typedef int (*ADL_ADAPTER_NUMBEROFADAPTERS_GET) (int *); typedef int (*ADL_ADAPTER_ADAPTERINFO_GET) (LPAdapterInfo, int); typedef int (*ADL_ADAPTER_ACTIVE_GET) (int, int*); -typedef int (*ADL_OVERDRIVE5_TEMPERATURE_GET) (int, int, ADLTemperature*); -typedef int (*ADL_OVERDRIVE5_FANSPEED_GET) (int, int, ADLFanSpeedValue*); - -static ADL_MAIN_CONTROL_CREATE adl_main_control_create; -static ADL_MAIN_CONTROL_DESTROY adl_main_control_destroy; -static ADL_ADAPTER_NUMBEROFADAPTERS_GET adl_adapter_numberofadapters_get; -static ADL_ADAPTER_ADAPTERINFO_GET adl_adapter_adapterinfo_get; -static ADL_ADAPTER_ACTIVE_GET adl_adapter_active_get; -static ADL_OVERDRIVE5_TEMPERATURE_GET adl_overdrive5_temperature_get; -static ADL_OVERDRIVE5_FANSPEED_GET adl_overdrive5_fanspeed_get; +typedef int (*ADL_OD5_TEMPERATURE_GET) (int, int, ADLTemperature*); +typedef int (*ADL_OD5_FANSPEED_GET) (int, int, ADLFanSpeedValue*); +typedef int (*ADL_OD5_CURRENTACTIVITY_GET) (int, ADLPMActivity*); + +static ADL_MAIN_CONTROL_CREATE adl_main_control_create; +static ADL_MAIN_CONTROL_DESTROY adl_main_control_destroy; +static ADL_ADAPTER_NUMBEROFADAPTERS_GET adl_adapter_numberofadapters_get; +static ADL_ADAPTER_ADAPTERINFO_GET adl_adapter_adapterinfo_get; +static ADL_ADAPTER_ACTIVE_GET adl_adapter_active_get; +static ADL_OD5_TEMPERATURE_GET adl_od5_temperature_get; +static ADL_OD5_FANSPEED_GET adl_od5_fanspeed_get; +static ADL_OD5_CURRENTACTIVITY_GET adl_od5_currentactivity_get; static void *hdll; static int adl_main_control_done; -static int *active_amd_adapters; +static int *active_adapters; -/* Memory allocation function */ static void __stdcall *adl_main_memory_alloc(int isize) { void *lpbuffer = malloc(isize); return lpbuffer; } -static void *getprocaddress(void *plibrary, const char * name) +static void *getprocaddress(void *plibrary, const char *name) { return dlsym(plibrary, name); } /* - Returns the temperature (Celcius) of an AMD/Ati GPU. + Returns the temperature (Celcius) of an AMD/ATI GPU. */ static double get_temp(struct psensor *sensor) { - ADLTemperature temperature; + ADLTemperature v; - temperature.iSize = sizeof(ADLTemperature); - temperature.iTemperature = -273; - if (ADL_OK != adl_overdrive5_temperature_get(sensor->amd_id, - 0, &temperature)) + v.iSize = sizeof(ADLTemperature); + v.iTemperature = -273; + if (ADL_OK == adl_od5_temperature_get(sensor->amd_id, 0, &v)) + return v.iTemperature/1000; + else return UNKNOWN_DBL_VALUE; - - return temperature.iTemperature/1000; } static double get_fanspeed(struct psensor *sensor) { - ADLFanSpeedValue fanspeedvalue; - - fanspeedvalue.iSize = sizeof(ADLFanSpeedValue); - fanspeedvalue.iSpeedType = ADL_DL_FANCTRL_SPEED_TYPE_RPM; - fanspeedvalue.iFanSpeed = -1; - if (ADL_OK != adl_overdrive5_fanspeed_get(sensor->amd_id, - 0, &fanspeedvalue)) + ADLFanSpeedValue v; + + v.iSize = sizeof(ADLFanSpeedValue); + v.iSpeedType = ADL_DL_FANCTRL_SPEED_TYPE_RPM; + v.iFanSpeed = -1; + if (ADL_OK == adl_od5_fanspeed_get(sensor->amd_id, 0, &v)) + return v.iFanSpeed; + else return UNKNOWN_DBL_VALUE; +} + +static double get_usage(struct psensor *sensor) +{ + ADLPMActivity v; - return fanspeedvalue.iFanSpeed; + v.iSize = sizeof(ADLPMActivity); + if (ADL_OK == adl_od5_currentactivity_get(sensor->amd_id, &v)) + return v.iActivityPercent; + else + return UNKNOWN_DBL_VALUE; } -static struct psensor *create_sensor(int id, int values_len) +static struct psensor *create_sensor(int id, int type, int values_len) { char name[200]; char *sid; int sensor_type; - struct psensor *s; - if (id & 1) {/* odd number ids represent fan sensors */ - id = id >> 1; - sprintf(name, "GPU%dfan", id); - sensor_type = SENSOR_TYPE_AMD_FAN; - } else {/* even number ids represent temperature sensors */ - id = id >> 1; - sprintf(name, "GPU%dtemp", id); - sensor_type = SENSOR_TYPE_AMD_TEMP; + sensor_type = SENSOR_TYPE_ATIADL; + switch (type) { + /* Fan rotation speed */ + case 0: + sprintf(name, "AMD GPU%d Fan", id); + sensor_type |= SENSOR_TYPE_FAN | SENSOR_TYPE_RPM; + break; + + /* Temperature */ + case 1: + sprintf(name, "AMD GPU%d Temperature", id); + sensor_type |= SENSOR_TYPE_GPU | SENSOR_TYPE_TEMP; + break; + + /* GPU Usage (Activity/Load %) */ + case 2: + sprintf(name, "AMD GPU%d Usage", id); + sensor_type |= SENSOR_TYPE_GPU | SENSOR_TYPE_USAGE; + break; } sid = malloc(strlen("amd") + 1 + strlen(name) + 1); sprintf(sid, "amd %s", name); - s = psensor_create(sid, strdup(name), - sensor_type, values_len); + s = psensor_create(sid, + strdup(name), + strdup("AMD/ATI GPU"), + sensor_type, + values_len); - s->amd_id = active_amd_adapters[id]; + s->amd_id = active_adapters[id]; return s; } /* - Returns the number of AMD/Ati GPU sensors (temperature and fan - speed). + Returns the number of active AMD/ATI GPU adapters - Return 0 if no AMD/Ati gpus or cannot get information. + Return 0 if no AMD/ATI GPUs or cannot get information. */ static int init() { - LPAdapterInfo lpadapterinfo = NULL; - int i, inumberadapters, inumberadaptersactive = 0; - int lpstatus, iadapterindex; + LPAdapterInfo lpadapterinfo; + int i, inumberadapters, inumberadaptersactive, lpstatus, iadapterindex; - hdll = NULL; adl_main_control_done = 0; - active_amd_adapters = NULL; - hdll = dlopen("libatiadlxx.so", RTLD_LAZY|RTLD_GLOBAL); + inumberadaptersactive = 0; + active_adapters = NULL; + lpadapterinfo = NULL; + hdll = dlopen("libatiadlxx.so", RTLD_LAZY|RTLD_GLOBAL); if (!hdll) { - fprintf(stderr, - _("ERROR: ADL library not found!\n")); + log_debug(_("AMD: cannot found ADL library.")); return 0; } adl_main_control_create = (ADL_MAIN_CONTROL_CREATE) - getprocaddress(hdll, "ADL_Main_Control_Create"); + getprocaddress(hdll, "ADL_Main_Control_Create"); adl_main_control_destroy = (ADL_MAIN_CONTROL_DESTROY) - getprocaddress(hdll, "ADL_Main_Control_Destroy"); + getprocaddress(hdll, "ADL_Main_Control_Destroy"); adl_adapter_numberofadapters_get = (ADL_ADAPTER_NUMBEROFADAPTERS_GET) - getprocaddress(hdll, "ADL_Adapter_NumberOfAdapters_Get"); + getprocaddress(hdll, "ADL_Adapter_NumberOfAdapters_Get"); adl_adapter_adapterinfo_get = (ADL_ADAPTER_ADAPTERINFO_GET) - getprocaddress(hdll, "ADL_Adapter_AdapterInfo_Get"); + getprocaddress(hdll, "ADL_Adapter_AdapterInfo_Get"); adl_adapter_active_get = (ADL_ADAPTER_ACTIVE_GET) - getprocaddress(hdll, "ADL_Adapter_Active_Get"); - adl_overdrive5_temperature_get = (ADL_OVERDRIVE5_TEMPERATURE_GET) - getprocaddress(hdll, "ADL_Overdrive5_Temperature_Get"); - adl_overdrive5_fanspeed_get = (ADL_OVERDRIVE5_FANSPEED_GET) - getprocaddress(hdll, "ADL_Overdrive5_FanSpeed_Get"); - if (!adl_main_control_create || - !adl_main_control_destroy || - !adl_adapter_numberofadapters_get || - !adl_adapter_adapterinfo_get || - !adl_overdrive5_temperature_get || - !adl_overdrive5_fanspeed_get) { - fprintf(stderr, - _("ERROR: ADL's API is missing!\n")); + getprocaddress(hdll, "ADL_Adapter_Active_Get"); + adl_od5_temperature_get = (ADL_OD5_TEMPERATURE_GET) + getprocaddress(hdll, "ADL_Overdrive5_Temperature_Get"); + adl_od5_fanspeed_get = (ADL_OD5_FANSPEED_GET) + getprocaddress(hdll, "ADL_Overdrive5_FanSpeed_Get"); + adl_od5_currentactivity_get = (ADL_OD5_CURRENTACTIVITY_GET) + getprocaddress(hdll, "ADL_Overdrive5_CurrentActivity_Get"); + if (!adl_main_control_create + || !adl_main_control_destroy + || !adl_adapter_numberofadapters_get + || !adl_adapter_adapterinfo_get + || !adl_od5_temperature_get + || !adl_od5_fanspeed_get + || !adl_od5_currentactivity_get) { + log_err(_("AMD: missing ADL's API.")); return 0; } - /* Initialize ADL. The second parameter is 1, which means: - retrieve adapter information only for adapters that - are physically present and enabled in the system */ + /* + 1 in 2nd parameter means retrieve adapter information only + for adapters that are physically present and enabled in the + system + */ if (ADL_OK != adl_main_control_create(adl_main_memory_alloc, 1)) { - fprintf(stderr, - _("ERROR: ADL Initialization Error!\n")); + log_err(_("AMD: failed to initialize ADL.")); return 0; } adl_main_control_done = 1; - /* Obtain the number of adapters for the system */ if (ADL_OK != adl_adapter_numberofadapters_get(&inumberadapters)) { - fprintf(stderr, - _("ERROR: Cannot get the number of adapters!\n")); + log_err(_("AMD: cannot get the number of adapters.")); return 0; } @@ -200,11 +220,9 @@ static int init() lpadapterinfo = malloc(sizeof(AdapterInfo) * inumberadapters); memset(lpadapterinfo, '\0', sizeof(AdapterInfo) * inumberadapters); - /* Get the AdapterInfo structure for all adapters in the system */ adl_adapter_adapterinfo_get(lpadapterinfo, sizeof(AdapterInfo) * inumberadapters); - /* Repeat for all available adapters in the system */ for (i = 0; i < inumberadapters; i++) { iadapterindex = lpadapterinfo[i].iAdapterIndex; @@ -212,28 +230,33 @@ static int init() if (ADL_OK != adl_adapter_active_get(iadapterindex, &lpstatus)) continue; if (lpstatus != ADL_TRUE) - /* count only if the adapter is active */ continue; - if (!active_amd_adapters) { - active_amd_adapters = (int *) malloc(sizeof(int)); + if (!active_adapters) { + active_adapters = (int *) malloc(sizeof(int)); inumberadaptersactive = 1; } else { ++inumberadaptersactive; - active_amd_adapters = (int *)realloc - (active_amd_adapters, + active_adapters = (int *)realloc + (active_adapters, sizeof(int)*inumberadaptersactive); + + if (!active_adapters) + exit(EXIT_FAILURE); } - active_amd_adapters[inumberadaptersactive-1] = iadapterindex; + active_adapters[inumberadaptersactive-1] = iadapterindex; } free(lpadapterinfo); - /* Each Adapter has one GPU temperature sensor and one fan - control sensor */ - return 2*inumberadaptersactive; + log_debug(_("Number of AMD/ATI adapters: %d"), inumberadapters); + log_debug(_("Number of active AMD/ATI adapters: %d"), + inumberadaptersactive); + + return inumberadaptersactive; } +/* Called regularly to update sensors values */ void amd_psensor_list_update(struct psensor **sensors) { struct psensor **ss, *s; @@ -242,34 +265,40 @@ void amd_psensor_list_update(struct psensor **sensors) while (*ss) { s = *ss; - if (s->type == SENSOR_TYPE_AMD_TEMP) - psensor_set_current_value(s, get_temp(s)); - else if (s->type == SENSOR_TYPE_AMD_FAN) - psensor_set_current_value(s, get_fanspeed(s)); + if (s->type & SENSOR_TYPE_ATIADL) { + if (s->type & SENSOR_TYPE_TEMP) + psensor_set_current_value(s, get_temp(s)); + else if (s->type & SENSOR_TYPE_RPM) + psensor_set_current_value(s, get_fanspeed(s)); + else if (s->type & SENSOR_TYPE_USAGE) + psensor_set_current_value(s, get_usage(s)); + } ss++; } } +/* Entry point for AMD sensors */ struct psensor * * amd_psensor_list_add(struct psensor **sensors, int values_len) { - int i, n; + int i, j, n; struct psensor **tmp, **ss, *s; n = init(); ss = sensors; - for (i = 0; i < n; i++) { - s = create_sensor(i, values_len); - - tmp = psensor_list_add(ss, s); + for (i = 0; i < n; i++) + /* Each GPU Adapter has 3 sensors: temp, fan speed and usage */ + for (j = 0; j < 3; j++) { + s = create_sensor(i, j, values_len); + tmp = psensor_list_add(ss, s); - if (ss != tmp) - free(ss); + if (ss != tmp) + free(ss); - ss = tmp; - } + ss = tmp; + } return ss; } @@ -282,8 +311,8 @@ void amd_cleanup() dlclose(hdll); } - if (active_amd_adapters) { - free(active_amd_adapters); - active_amd_adapters = NULL; + if (active_adapters) { + free(active_adapters); + active_adapters = NULL; } } diff --git a/src/lib/amd.h b/src/lib/amd.h index 467fe72..1a5449c 100644 --- a/src/lib/amd.h +++ b/src/lib/amd.h @@ -1,6 +1,6 @@ /* - * Copyright (C) 2010-2011 thgreasi@gmail.com - * Copyright (C) 2010-2012 jeanfi@gmail.com + * Copyright (C) 2010-2011 thgreasi@gmail.com, jeanfi@gmail.com + * Copyright (C) 2010-2013 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as diff --git a/src/lib/bool.h b/src/lib/bool.h new file mode 100644 index 0000000..900edc1 --- /dev/null +++ b/src/lib/bool.h @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2010-2013 jeanfi@gmail.com + * + * This program 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 program 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 program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA + */ +#ifndef _PSENSOR_BOOL_H_ +#define _PSENSOR_BOOL_H_ + +#include "config.h" + +#if HAVE_STDBOOL +#include +#else +#define bool char +#endif + +#endif diff --git a/src/lib/color.c b/src/lib/color.c index 0c5e30c..ab8462d 100644 --- a/src/lib/color.c +++ b/src/lib/color.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 jeanfi@gmail.com + * Copyright (C) 2010-2013 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -23,9 +23,10 @@ #include "color.h" -void -color_set(struct color *color, - unsigned int red, unsigned int green, unsigned int blue) +void color_set(struct color *color, + unsigned int red, + unsigned int green, + unsigned int blue) { color->red = red; color->green = green; @@ -65,7 +66,7 @@ int is_color(const char *str) return 1; } -struct color *string_to_color(const char *str) +struct color *str_to_color(const char *str) { char tmp[5]; unsigned int red, green, blue; @@ -88,7 +89,7 @@ struct color *string_to_color(const char *str) return color_new(red, green, blue); } -char *color_to_string(struct color *color) +char *color_to_str(const struct color *color) { char *str = malloc(1 + 12 + 1); diff --git a/src/lib/color.h b/src/lib/color.h index 22a1ef1..eb8fac9 100644 --- a/src/lib/color.h +++ b/src/lib/color.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 jeanfi@gmail.com + * Copyright (C) 2010-2013 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -19,14 +19,15 @@ #ifndef _PSENSOR_COLOR_H_ #define _PSENSOR_COLOR_H_ -/* Represents a RGB color. - - Contains integer and floating RGB representation to avoid useless -conversion. - - Uses color_set to maintain the coherence of the both - representation. -*/ +/* + * Represents a RGB color. + * + * Contains integer and floating RGB representation to avoid useless + * conversion. + * + * Uses color_set to maintain the coherence of the both + * representation. + */ struct color { /* rgb 0..65535 */ unsigned int red; @@ -39,18 +40,20 @@ struct color { double f_blue; }; -struct color *color_new(unsigned int red, - unsigned int green, unsigned int blue); +struct color * +color_new(unsigned int red, unsigned int green, unsigned int blue); struct color *color_dup(struct color *); void color_set(struct color *, - unsigned int red, unsigned int green, unsigned int blue); + unsigned int red, + unsigned int green, + unsigned int blue); int is_color(const char *str); -struct color *string_to_color(const char *str); +struct color *str_to_color(const char *str); -char *color_to_string(struct color *color); +char *color_to_str(const struct color *color); #endif diff --git a/src/lib/cpu.c b/src/lib/cpu.c index 66c6df9..7cf2105 100644 --- a/src/lib/cpu.c +++ b/src/lib/cpu.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 jeanfi@gmail.com + * Copyright (C) 2010-2013 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -41,7 +41,7 @@ struct psensor *create_cpu_usage_sensor(int measures_len) label = strdup("cpu usage"); type = SENSOR_TYPE_CPU_USAGE; - psensor = psensor_create(id, label, type, measures_len); + psensor = psensor_create(id, label, strdup("CPU"), type, measures_len); return psensor; } @@ -93,7 +93,8 @@ void cpu_psensor_list_update(struct psensor **sensors) while (*ss) { s = *ss; - if (s->type == SENSOR_TYPE_CPU_USAGE) + if (!(s->type & SENSOR_TYPE_REMOTE) + && s->type == SENSOR_TYPE_CPU_USAGE) cpu_usage_sensor_update(s); ss++; diff --git a/src/lib/cpu.h b/src/lib/cpu.h index 508a256..7acc4eb 100644 --- a/src/lib/cpu.h +++ b/src/lib/cpu.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 jeanfi@gmail.com + * Copyright (C) 2010-2013 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as diff --git a/src/lib/hdd.c b/src/lib/hdd.c deleted file mode 100644 index d142c4e..0000000 --- a/src/lib/hdd.c +++ /dev/null @@ -1,256 +0,0 @@ -/* - * Copyright (C) 2010-2012 jeanfi@gmail.com - * - * This program 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 program 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 program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301 USA - */ -#include -#include -#define _(str) gettext(str) - -/* - Following code is based on GNOME sensors applet code hddtemp-plugin.c - see http://sensors-applet.sourceforge.net/ -*/ -#include -#include -#include -#include -#include -#include -#include -#include - -#include "psensor.h" - -#define HDDTEMP_SERVER_IP_ADDRESS "127.0.0.1" -#define HDDTEMP_PORT_NUMBER 7634 -#define HDDTEMP_OUTPUT_BUFFER_LENGTH 4048 - -struct hdd_info { - char *name; - int temp; -}; - -static char *fetch() -{ - int sockfd; - ssize_t n = 1; - int output_length = 0; - char *pc; - char *buffer; - struct sockaddr_in address; - - sockfd = socket(AF_INET, SOCK_STREAM, 0); - if (sockfd == -1) { - fprintf(stderr, _("ERROR: hdd fetch, failed to open socket\n")); - return NULL; - } - - address.sin_family = AF_INET; - address.sin_addr.s_addr = inet_addr(HDDTEMP_SERVER_IP_ADDRESS); - address.sin_port = htons(HDDTEMP_PORT_NUMBER); - - buffer = NULL; - - if (connect(sockfd, - (struct sockaddr *)&address, - (socklen_t) sizeof(address)) == -1) { - fprintf(stderr, - _("ERROR: hdd fetch, failed to open connection\n")); - } else { - buffer = malloc(HDDTEMP_OUTPUT_BUFFER_LENGTH); - - pc = buffer; - while ((n = read(sockfd, - pc, - HDDTEMP_OUTPUT_BUFFER_LENGTH - - output_length)) > 0) { - - output_length += n; - pc = &pc[n]; - } - - buffer[output_length] = '\0'; - } - - close(sockfd); - - return buffer; -} - -static int str_index(char *str, char d) -{ - char *c; - int i; - - if (!str || *str == '\0') - return -1; - - c = str; - - i = 0; - while (*c) { - if (*c == d) - return i; - i++; - c++; - } - - return -1; -} - -static struct psensor * -create_sensor(char *id, char *name, int values_max_length) -{ - return psensor_create(id, name, SENSOR_TYPE_HDD_TEMP, - values_max_length); -} - -static char *next_hdd_info(char *string, struct hdd_info *info) -{ - char *c; - int idx_name_n, i, temp; - - if (!string || strlen(string) <= 5 /* at least 5 pipes */ - || string[0] != '|') - return NULL; - - /* skip first pipe */ - c = string + 1; - - /* name */ - idx_name_n = str_index(c, '|'); - - if (idx_name_n == -1) - return NULL; - c = c + idx_name_n + 1; - - /* skip label */ - i = str_index(c, '|'); - if (i == -1) - return NULL; - c = c + i + 1; - - /* temp */ - i = str_index(c, '|'); - if (i == -1) - return NULL; - temp = atoi(c); - c = c + i + 1; - - /* skip unit */ - i = str_index(c, '|'); - if (i == -1) - return NULL; - c = c + i + 1; - - info->name = malloc(idx_name_n + 1); - strncpy(info->name, string + 1, idx_name_n); - info->name[idx_name_n] = '\0'; - - info->temp = temp; - - return c; -} - -struct psensor **hdd_psensor_list_add(struct psensor **sensors, - int values_max_length) -{ - char *hddtemp_output = fetch(); - char *c; - struct hdd_info info; - struct psensor **result; - - if (!hddtemp_output) - return sensors; - - if (hddtemp_output[0] != '|') { - fprintf(stderr, - _("ERROR: wrong hdd string: %s"), hddtemp_output); - - free(hddtemp_output); - - return sensors; - } - - c = hddtemp_output; - - result = sensors; - - while (c && (c = next_hdd_info(c, &info))) { - struct psensor *sensor; - struct psensor **tmp_sensors; - - char *id = malloc(strlen("hdd ") + strlen(info.name) + 1); - strcpy(id, "hdd "); - strcat(id, info.name); - - sensor = create_sensor(id, info.name, values_max_length); - - tmp_sensors = psensor_list_add(result, sensor); - - if (result != sensors) - free(result); - - result = tmp_sensors; - } - - free(hddtemp_output); - - return result; -} - -static void update(struct psensor **sensors, struct hdd_info *info) -{ - struct psensor **sensor_cur = sensors; - - while (*sensor_cur) { - if ((*sensor_cur)->type == SENSOR_TYPE_HDD_TEMP - && !strcmp((*sensor_cur)->id + 4, info->name)) - psensor_set_current_value(*sensor_cur, - (float)info->temp); - - sensor_cur++; - } -} - -void hdd_psensor_list_update(struct psensor **sensors) -{ - char *hddtemp_output = fetch(); - - if (!hddtemp_output) - return; - - if (hddtemp_output[0] == '|') { - - char *c = hddtemp_output; - struct hdd_info info; - info.name = NULL; - info.temp = 0; - - while (c && (c = next_hdd_info(c, &info))) { - - update(sensors, &info); - - free(info.name); - } - } else { - fprintf(stderr, - _("ERROR: wrong hdd string: %s\n"), hddtemp_output); - } - - free(hddtemp_output); -} diff --git a/src/lib/hdd.h b/src/lib/hdd.h index 6c31800..41b63ee 100644 --- a/src/lib/hdd.h +++ b/src/lib/hdd.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 jeanfi@gmail.com + * Copyright (C) 2010-2013 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -19,11 +19,19 @@ #ifndef _PSENSOR_HDD_H_ #define _PSENSOR_HDD_H_ +#include "config.h" #include "psensor.h" +#ifdef HAVE_ATASMART struct psensor **hdd_psensor_list_add(struct psensor **sensors, int values_max_length); void hdd_psensor_list_update(struct psensor **sensors); +#endif + +struct psensor **hddtemp_psensor_list_add(struct psensor **sensors, + int values_max_length); + +void hddtemp_psensor_list_update(struct psensor **sensors); #endif diff --git a/src/lib/hdd_atasmart.c b/src/lib/hdd_atasmart.c new file mode 100644 index 0000000..7e99648 --- /dev/null +++ b/src/lib/hdd_atasmart.c @@ -0,0 +1,195 @@ +/* + * Copyright (C) 2010-2013 jeanfi@gmail.com + * + * This program 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 program 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 program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA + */ +#define _LARGEFILE_SOURCE 1 +#include "config.h" + +#include +#include +#define _(str) gettext(str) + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "pio.h" +#include "hdd.h" +#include "log.h" + +static int filter_sd(const char *p) +{ + return strlen(p) == 8 && !strncmp(p, "/dev/sd", 7); +} + +static struct psensor * +create_sensor(char *id, char *name, SkDisk *disk, int values_max_length) +{ + struct psensor *s; + int t; + + t = SENSOR_TYPE_ATASMART | SENSOR_TYPE_HDD | SENSOR_TYPE_TEMP; + + s = psensor_create(id, + strdup(name), + strdup("HDD"), + t, + values_max_length); + + s->disk = disk; + + return s; +} + +/* + * Performs the same tests than sk_disk_open and outputs the result. + */ +static void analyze_disk(const char *dname) +{ + int f; + struct stat st; + uint64_t size; + + log_debug("analyze_disk(hdd_atasmart): %s", dname); + + f = open(dname, O_RDONLY|O_NOCTTY|O_NONBLOCK|O_CLOEXEC); + + if (f < 0) { + log_debug("analyze_disk(hdd_atasmart): Could not open file %s: %s", + dname, + strerror(errno)); + goto fail; + } + + if (fstat(f, &st) < 0) { + log_debug("analyze_disk(hdd_atasmart): fstat fails %s: %s", + dname, + strerror(errno)); + goto fail; + } + + if (!S_ISBLK(st.st_mode)) { + log_debug("analyze_disk(hdd_atasmart): !S_ISBLK fails %s", + dname); + goto fail; + } + + size = (uint64_t)-1; + /* So, it's a block device. Let's make sure the ioctls work */ + if (ioctl(f, BLKGETSIZE64, &size) < 0) { + log_debug("analyze_disk(hdd_atasmart): ioctl fails %s: %s", + dname, + strerror(errno)); + goto fail; + } + + if (size <= 0 || size == (uint64_t) -1) { + log_debug("analyze_disk(hdd_atasmart): ioctl wrong size %s: %ld", + dname, + size); + goto fail; + } + + fail: + close(f); +} + +struct psensor **hdd_psensor_list_add(struct psensor **sensors, + int values_max_length) +{ + char **paths, **tmp, *id; + SkDisk *disk; + struct psensor *sensor, **tmp_sensors, **result; + + log_debug("hdd_psensor_list_add(hdd_atasmart)"); + + paths = dir_list("/dev", filter_sd); + + result = sensors; + tmp = paths; + while (*tmp) { + log_debug("hdd_psensor_list_add(hdd_atasmart) open %s", *tmp); + + if (!sk_disk_open(*tmp, &disk)) { + id = malloc(strlen("hdd at") + strlen(*tmp) + 1); + strcpy(id, "hdd at"); + strcat(id, *tmp); + + sensor = create_sensor(id, + *tmp, + disk, + values_max_length); + + tmp_sensors = psensor_list_add(result, sensor); + + if (result != sensors) + free(result); + + result = tmp_sensors; + } else { + log_err(_("atasmart: sk_disk_open() failure: %s."), + *tmp); + analyze_disk(*tmp); + } + + tmp++; + } + + paths_free(paths); + + return result; +} + +void hdd_psensor_list_update(struct psensor **sensors) +{ + struct psensor **cur, *s; + uint64_t kelvin; + int ret; + double c; + + cur = sensors; + while (*cur) { + s = *cur; + if (!(s->type & SENSOR_TYPE_REMOTE) + && s->type & SENSOR_TYPE_ATASMART) { + ret = sk_disk_smart_read_data(s->disk); + + if (!ret) { + ret = sk_disk_smart_get_temperature(s->disk, + &kelvin); + + if (!ret) { + c = (kelvin - 273150) / 1000; + psensor_set_current_value(s, c); + log_debug("hdd_psensor_list_update(hdd_atasmart): %s %.2f", + s->id, + c); + } + } + } + + cur++; + } +} diff --git a/src/lib/hdd_hddtemp.c b/src/lib/hdd_hddtemp.c new file mode 100644 index 0000000..afd57b4 --- /dev/null +++ b/src/lib/hdd_hddtemp.c @@ -0,0 +1,260 @@ +/* + * Copyright (C) 2010-2013 jeanfi@gmail.com + * + * This program 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 program 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 program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA + */ +#include +#include +#define _(str) gettext(str) + +/* + * Following code is based on GNOME sensors applet code + * hddtemp-plugin.c see http://sensors-applet.sourceforge.net/ + */ +#include +#include +#include +#include +#include +#include +#include +#include + +#include "hdd.h" +#include "psensor.h" + +#define HDDTEMP_SERVER_IP_ADDRESS "127.0.0.1" +#define HDDTEMP_PORT_NUMBER 7634 +#define HDDTEMP_OUTPUT_BUFFER_LENGTH 4048 + +struct hdd_info { + char *name; + int temp; +}; + +static char *fetch() +{ + int sockfd; + ssize_t n = 1; + int output_length = 0; + char *pc; + char *buffer; + struct sockaddr_in address; + + sockfd = socket(AF_INET, SOCK_STREAM, 0); + if (sockfd == -1) { + log_err(_("hddtemp: failed to open socket.")); + return NULL; + } + + address.sin_family = AF_INET; + address.sin_addr.s_addr = inet_addr(HDDTEMP_SERVER_IP_ADDRESS); + address.sin_port = htons(HDDTEMP_PORT_NUMBER); + + buffer = NULL; + + if (connect(sockfd, + (struct sockaddr *)&address, + (socklen_t) sizeof(address)) == -1) { + log_err(_("hddtemp: failed to open connection.")); + } else { + buffer = malloc(HDDTEMP_OUTPUT_BUFFER_LENGTH); + + pc = buffer; + while ((n = read(sockfd, + pc, + HDDTEMP_OUTPUT_BUFFER_LENGTH - + output_length)) > 0) { + + output_length += n; + pc = &pc[n]; + } + + buffer[output_length] = '\0'; + } + + close(sockfd); + + return buffer; +} + +static int str_index(char *str, char d) +{ + char *c; + int i; + + if (!str || *str == '\0') + return -1; + + c = str; + + i = 0; + while (*c) { + if (*c == d) + return i; + i++; + c++; + } + + return -1; +} + +static struct psensor * +create_sensor(char *id, char *name, int values_max_length) +{ + int t; + + t = SENSOR_TYPE_HDD | SENSOR_TYPE_HDDTEMP | SENSOR_TYPE_TEMP; + + return psensor_create(id, name, strdup("HDD"), + t, + values_max_length); +} + +static char *next_hdd_info(char *string, struct hdd_info *info) +{ + char *c; + int idx_name_n, i, temp; + + if (!string || strlen(string) <= 5 /* at least 5 pipes */ + || string[0] != '|') + return NULL; + + /* skip first pipe */ + c = string + 1; + + /* name */ + idx_name_n = str_index(c, '|'); + + if (idx_name_n == -1) + return NULL; + c = c + idx_name_n + 1; + + /* skip label */ + i = str_index(c, '|'); + if (i == -1) + return NULL; + c = c + i + 1; + + /* temp */ + i = str_index(c, '|'); + if (i == -1) + return NULL; + temp = atoi(c); + c = c + i + 1; + + /* skip unit */ + i = str_index(c, '|'); + if (i == -1) + return NULL; + c = c + i + 1; + + info->name = malloc(idx_name_n + 1); + strncpy(info->name, string + 1, idx_name_n); + info->name[idx_name_n] = '\0'; + + info->temp = temp; + + return c; +} + +struct psensor **hddtemp_psensor_list_add(struct psensor **sensors, + int values_max_length) +{ + char *hddtemp_output = fetch(); + char *c; + struct hdd_info info; + struct psensor **result; + + if (!hddtemp_output) + return sensors; + + if (hddtemp_output[0] != '|') { + log_err(_("hddtemp: wrong string: %s."), hddtemp_output); + + free(hddtemp_output); + + return sensors; + } + + c = hddtemp_output; + + result = sensors; + + while (c && (c = next_hdd_info(c, &info))) { + struct psensor *sensor; + struct psensor **tmp_sensors; + + char *id = malloc(strlen("hdd ") + strlen(info.name) + 1); + strcpy(id, "hdd "); + strcat(id, info.name); + + sensor = create_sensor(id, info.name, values_max_length); + + tmp_sensors = psensor_list_add(result, sensor); + + if (result != sensors) + free(result); + + result = tmp_sensors; + } + + free(hddtemp_output); + + return result; +} + +static void update(struct psensor **sensors, struct hdd_info *info) +{ + struct psensor **sensor_cur = sensors; + + while (*sensor_cur) { + if (!((*sensor_cur)->type & SENSOR_TYPE_REMOTE) + && (*sensor_cur)->type & SENSOR_TYPE_HDDTEMP + && !strcmp((*sensor_cur)->id + 4, info->name)) + psensor_set_current_value(*sensor_cur, + (float)info->temp); + + sensor_cur++; + } +} + +void hddtemp_psensor_list_update(struct psensor **sensors) +{ + char *hddtemp_output = fetch(); + + if (!hddtemp_output) + return; + + if (hddtemp_output[0] == '|') { + + char *c = hddtemp_output; + struct hdd_info info; + info.name = NULL; + info.temp = 0; + + while (c && (c = next_hdd_info(c, &info))) { + + update(sensors, &info); + + free(info.name); + } + } else { + log_err(_("hddtemp: wrong string: %s."), hddtemp_output); + } + + free(hddtemp_output); +} diff --git a/src/lib/lmsensor.c b/src/lib/lmsensor.c index c33dfb2..2ace110 100644 --- a/src/lib/lmsensor.c +++ b/src/lib/lmsensor.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 jeanfi@gmail.com + * Copyright (C) 2010-2013 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -39,8 +39,7 @@ static double get_value(const sensors_chip_name *name, err = sensors_get_value(name, sub->number, &val); if (err) { - fprintf(stderr, - _("ERROR: Can't get value of subfeature %s: %s\n"), + log_err(_("lmsensor: cannot get value of subfeature %s: %s."), sub->name, sensors_strerror(err)); val = UNKNOWN_DBL_VALUE; } @@ -85,14 +84,16 @@ void lmsensor_psensor_list_update(struct psensor **sensors) return ; while (*s_ptr) { - struct psensor *sensor = *s_ptr; - - if (sensor->type == SENSOR_TYPE_LMSENSOR_TEMP) - psensor_set_current_value - (sensor, get_temp_input(sensor)); - else if (sensor->type == SENSOR_TYPE_LMSENSOR_FAN) - psensor_set_current_value(sensor, - get_fan_input(sensor)); + struct psensor *s = *s_ptr; + + if (!(s->type & SENSOR_TYPE_REMOTE) + && s->type & SENSOR_TYPE_LMSENSOR) { + if (s->type & SENSOR_TYPE_TEMP) + psensor_set_current_value(s, + get_temp_input(s)); + else if (s->type & SENSOR_TYPE_RPM) + psensor_set_current_value(s, get_fan_input(s)); + } s_ptr++; } @@ -105,9 +106,8 @@ lmsensor_psensor_create(const sensors_chip_name *chip, { char name[200]; const sensors_subfeature *sf; - char *label; int type; - char *id; + char *id, *label, *cname; struct psensor *psensor; sensors_subfeature_type fault_subfeature; @@ -116,13 +116,11 @@ lmsensor_psensor_create(const sensors_chip_name *chip, if (feature->type == SENSORS_FEATURE_TEMP) { fault_subfeature = SENSORS_SUBFEATURE_TEMP_FAULT; - } else if (feature->type == SENSORS_FEATURE_FAN) { fault_subfeature = SENSORS_SUBFEATURE_FAN_FAULT; - } else { - fprintf(stderr, - _("ERROR: create_sensor, wrong feature type\n")); + log_err(_( +"lmsensor: lmsensor_psensor_create failure: wrong feature type.")); return NULL; } @@ -134,11 +132,11 @@ lmsensor_psensor_create(const sensors_chip_name *chip, if (!label) return NULL; - type = 0; + type = SENSOR_TYPE_LMSENSOR; if (feature->type == SENSORS_FEATURE_TEMP) - type = SENSOR_TYPE_LMSENSOR_TEMP; + type |= SENSOR_TYPE_TEMP; else if (feature->type == SENSORS_FEATURE_FAN) - type = SENSOR_TYPE_LMSENSOR_FAN; + type |= (SENSOR_TYPE_RPM|SENSOR_TYPE_FAN); else return NULL; @@ -146,7 +144,20 @@ lmsensor_psensor_create(const sensors_chip_name *chip, 1); sprintf(id, "lmsensor %s %s", name, label); - psensor = psensor_create(id, label, type, values_max_length); + if (!strcmp(chip->prefix, "coretemp")) + cname = strdup("Intel CPU"); + else if (!strcmp(chip->prefix, "k10temp") + || !strcmp(chip->prefix, "k8temp") + || !strcmp(chip->prefix, "fam15h_power")) + cname = strdup("AMD CPU"); + else if (!strcmp(chip->prefix, "nouveau")) + cname = strdup("Nvidia GPU"); + else if (!strcmp(chip->prefix, "via-cputemp")) + cname = strdup("VIA CPU"); + else + cname = strdup(chip->prefix); + + psensor = psensor_create(id, label, cname, type, values_max_length); psensor->iname = chip; psensor->feature = feature; @@ -204,8 +215,7 @@ void lmsensor_init() int err = sensors_init(NULL); if (err) { - fprintf(stderr, - _("ERROR: lm-sensors initialization failure: %s\n"), + log_err(_("lmsensor: initialization failure: %s."), sensors_strerror(err)); init_done = 0; } else { diff --git a/src/lib/lmsensor.h b/src/lib/lmsensor.h index 0559b05..d9e5787 100644 --- a/src/lib/lmsensor.h +++ b/src/lib/lmsensor.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 jeanfi@gmail.com + * Copyright (C) 2010-2013 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as diff --git a/src/lib/log.c b/src/lib/log.c index e66ca8f..7b4331f 100644 --- a/src/lib/log.c +++ b/src/lib/log.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 jeanfi@gmail.com + * Copyright (C) 2010-2013 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -16,15 +16,21 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301 USA */ +#define _LARGEFILE_SOURCE 1 +#include "config.h" + #include #include #define _(str) gettext(str) #include #include +#include #include +#include #include "log.h" +#include "ptime.h" static FILE *file; int log_level = LOG_WARN; @@ -51,9 +57,8 @@ void log_close() #define LOG_BUFFER 4096 static void vlogf(int lvl, const char *fmt, va_list ap) { - struct timeval tv; char buffer[1 + LOG_BUFFER]; - char *lvl_str; + char *lvl_str, *t; FILE *stdf; if (lvl > LOG_INFO && (!file || lvl > log_level)) @@ -62,9 +67,6 @@ static void vlogf(int lvl, const char *fmt, va_list ap) vsnprintf(buffer, LOG_BUFFER, fmt, ap); buffer[LOG_BUFFER] = '\0'; - if (gettimeofday(&tv, NULL) != 0) - timerclear(&tv); - switch (lvl) { case LOG_WARN: lvl_str = "[WARN]"; @@ -82,9 +84,15 @@ static void vlogf(int lvl, const char *fmt, va_list ap) lvl_str = "[??]"; } + t = get_time_str(); + if (!t) + return ; + if (file && lvl <= log_level) { - fprintf(file, "[%ld] %s %s\n", tv.tv_sec, lvl_str, buffer); + fprintf(file, "[%s] %s %s\n", t, lvl_str, buffer); fflush(file); + } else { + t = NULL; } if (lvl <= LOG_INFO) { @@ -93,8 +101,11 @@ static void vlogf(int lvl, const char *fmt, va_list ap) else stdf = stdout; - fprintf(stdf, "[%ld] %s %s\n", tv.tv_sec, lvl_str, buffer); + + fprintf(stdf, "[%s] %s %s\n", t, lvl_str, buffer); } + + free(t); } void log_printf(int lvl, const char *fmt, ...) @@ -117,3 +128,30 @@ void log_debug(const char *fmt, ...) vlogf(LOG_DEBUG, fmt, ap); va_end(ap); } + +void log_err(const char *fmt, ...) +{ + va_list ap; + + va_start(ap, fmt); + vlogf(LOG_ERR, fmt, ap); + va_end(ap); +} + +void log_warn(const char *fmt, ...) +{ + va_list ap; + + va_start(ap, fmt); + vlogf(LOG_WARN, fmt, ap); + va_end(ap); +} + +void log_info(const char *fmt, ...) +{ + va_list ap; + + va_start(ap, fmt); + vlogf(LOG_INFO, fmt, ap); + va_end(ap); +} diff --git a/src/lib/log.h b/src/lib/log.h index f5fd227..5d4e2bc 100644 --- a/src/lib/log.h +++ b/src/lib/log.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 jeanfi@gmail.com + * Copyright (C) 2010-2013 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -30,6 +30,9 @@ void log_open(const char *path); void log_printf(int lvl, const char *fmt, ...); void log_debug(const char *fmt, ...); +void log_err(const char *fmt, ...); +void log_info(const char *fmt, ...); +void log_warn(const char *fmt, ...); void log_close(); diff --git a/src/lib/measure.c b/src/lib/measure.c index 92aa5bd..146ae16 100644 --- a/src/lib/measure.c +++ b/src/lib/measure.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 jeanfi@gmail.com + * Copyright (C) 2010-2013 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -30,7 +30,7 @@ struct measure *measures_dbl_create(int size) result = malloc(size * sizeof(struct measure)); for (i = 0; i < size; i++) { - result[i].value.d_num = UNKNOWN_DBL_VALUE; + result[i].value = UNKNOWN_DBL_VALUE; timerclear(&result[i].time); } diff --git a/src/lib/measure.h b/src/lib/measure.h index f95ce51..16181ca 100644 --- a/src/lib/measure.h +++ b/src/lib/measure.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 jeanfi@gmail.com + * Copyright (C) 2010-2013 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -26,10 +26,7 @@ #define UNKNOWN_DBL_VALUE DBL_MIN struct measure { - union value { - double d_num; - uint64_t ui64_num; - } value; + double value; struct timeval time; }; diff --git a/src/lib/nvidia.c b/src/lib/nvidia.c index 1e9ea4f..92d7574 100644 --- a/src/lib/nvidia.c +++ b/src/lib/nvidia.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 jeanfi@gmail.com + * Copyright (C) 2010-2013 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -51,7 +51,8 @@ static int get_temp(struct psensor *sensor) if (res == True) return temp; - fprintf(stderr, _("ERROR: failed to retrieve nvidia temperature\n")); + log_debug(_("NVIDIA proprietary driver not used or cannot " + "retrieve NVIDIA GPU temperature.")); return 0; } @@ -60,14 +61,20 @@ static struct psensor *create_sensor(int id, int values_len) char name[200]; char *sid; struct psensor *s; + int t; sprintf(name, "GPU%d", id); sid = malloc(strlen("nvidia") + 1 + strlen(name) + 1); sprintf(sid, "nvidia %s", name); - s = psensor_create(sid, strdup(name), - SENSOR_TYPE_NVIDIA_TEMP, values_len); + t = SENSOR_TYPE_NVCTRL | SENSOR_TYPE_GPU | SENSOR_TYPE_TEMP; + + s = psensor_create(sid, + strdup(name), + strdup("Nvidia GPU"), + t, + values_len); s->nvidia_id = id; @@ -87,8 +94,7 @@ static int init() display = XOpenDisplay(NULL); if (!display) { - fprintf(stderr, - _("ERROR: Cannot open connection to X Server\n")); + log_err(_("Cannot open connection to X11 server.")); return 0; } @@ -96,7 +102,7 @@ static int init() XNVCTRLQueryTargetCount(display, NV_CTRL_TARGET_TYPE_GPU, &n)) return n; - fprintf(stderr, _("ERROR: Cannot retrieve NVidia information\n")); + log_err(_("Failed to retrieve NVIDIA information.")); return 0; } @@ -109,7 +115,7 @@ void nvidia_psensor_list_update(struct psensor **sensors) while (*ss) { s = *ss; - if (s->type == SENSOR_TYPE_NVIDIA_TEMP) + if (s->type & SENSOR_TYPE_NVCTRL) psensor_set_current_value(s, get_temp(s)); ss++; diff --git a/src/lib/nvidia.h b/src/lib/nvidia.h index 984fd36..64ad279 100644 --- a/src/lib/nvidia.h +++ b/src/lib/nvidia.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 jeanfi@gmail.com + * Copyright (C) 2010-2013 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as diff --git a/src/lib/p_io.c b/src/lib/p_io.c deleted file mode 100644 index 817de32..0000000 --- a/src/lib/p_io.c +++ /dev/null @@ -1,296 +0,0 @@ -/* - * Copyright (C) 2010-2012 jeanfi@gmail.com - * - * This program 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 program 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 program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301 USA - */ -#include -#include -#include -#include -#include - -#include "p_io.h" - -int is_dir(const char *path) -{ - struct stat st; - - int ret = lstat(path, &st); - - if (ret == 0 && S_ISDIR(st.st_mode)) - return 1; - - return 0; -} - -int is_file(const char *path) -{ - struct stat st; - - int ret = lstat(path, &st); - - if (ret == 0 && S_ISREG(st.st_mode)) - return 1; - - return 0; -} - -char *dir_normalize(const char *dpath) -{ - char *npath; - int n; - - if (!dpath || !strlen(dpath)) - return NULL; - - npath = strdup(dpath); - - n = strlen(npath); - - if (n > 1 && npath[n - 1] == '/') - npath[n - 1] = '\0'; - - return npath; -} - -char **dir_list(const char *dpath, int (*filter) (const char *path)) -{ - struct dirent *ent; - DIR *dir; - char **paths; - int n; - - dir = opendir(dpath); - - if (!dir) - return NULL; - - n = 1; - paths = malloc(sizeof(void *)); - *paths = NULL; - - while ((ent = readdir(dir)) != NULL) { - char *fpath; - char *name = ent->d_name; - - if (!strcmp(name, ".") || !strcmp(name, "..")) - continue; - - fpath = malloc(strlen(dpath) + 1 + strlen(name) + 1); - - strcpy(fpath, dpath); - strcat(fpath, "/"); - strcat(fpath, name); - - if (!filter || filter(fpath)) { - char **npaths; - - n++; - npaths = malloc(n * sizeof(void *)); - memcpy(npaths + 1, paths, (n - 1) * sizeof(void *)); - free(paths); - paths = npaths; - *npaths = fpath; - - } else { - free(fpath); - } - } - - closedir(dir); - - return paths; -} - -void paths_free(char **paths) -{ - char **paths_cur; - - paths_cur = paths; - while (*paths_cur) { - free(*paths_cur); - - paths_cur++; - } - - free(paths); -} - -char *file_get_content(const char *fpath) -{ - long size; - - char *page; - - size = file_get_size(fpath); - - if (size == -1) { - page = NULL; - - } else if (size == 0) { - page = malloc(1); - *page = '\0'; - - } else { - FILE *fp = fopen(fpath, "rb"); - if (fp) { - page = malloc(size + 1); - if (!page || size != fread(page, 1, size, fp)) { - free(page); - return NULL; - } - - *(page + size) = '\0'; - - fclose(fp); - } else { - page = NULL; - } - } - - return page; -} - -long file_get_size(const char *path) -{ - FILE *fp; - - if (!is_file(path)) - return -1; - - fp = fopen(path, "rb"); - if (fp) { - long size; - - if (fseek(fp, 0, SEEK_END) == -1) - return -1; - - size = ftell(fp); - - fclose(fp); - - return size; - } - - return -1; -} - -#define FCOPY_BUF_SZ 4096 -static int FILE_copy(FILE *src, FILE *dst) -{ - int ret = 0; - char *buf = malloc(FCOPY_BUF_SZ); - int n; - - if (!buf) - return FILE_COPY_ERROR_ALLOC_BUFFER; - - while (!ret) { - n = fread(buf, 1, FCOPY_BUF_SZ, src); - if (n) { - if (fwrite(buf, 1, n, dst) != n) - ret = FILE_COPY_ERROR_WRITE; - } else { - if (!feof(src)) - ret = FILE_COPY_ERROR_READ; - else - break; - } - } - - free(buf); - - return ret; -} - -int -file_copy(const char *src, const char *dst) -{ - FILE *fsrc, *fdst; - int ret = 0; - - fsrc = fopen(src, "r"); - - if (fsrc) { - fdst = fopen(dst, "w+"); - - if (fdst) { - ret = FILE_copy(fsrc, fdst); - fclose(fdst); - } else { - ret = FILE_COPY_ERROR_OPEN_DST; - } - - fclose(fsrc); - } else { - ret = FILE_COPY_ERROR_OPEN_SRC; - } - - return ret; -} - -char *path_append(const char *dir, const char *path) -{ - char *ret, *ndir; - - ndir = dir_normalize(dir); - - if (!ndir && (!path || !strlen(path))) - ret = NULL; - - else if (!ndir) { - ret = strdup(path); - - } else if (!path || !strlen(path)) { - return ndir; - - } else { - ret = malloc(strlen(ndir) + 1 + strlen(path) + 1); - strcpy(ret, ndir); - strcat(ret, "/"); - strcat(ret, path); - } - - free(ndir); - - return ret; -} - -void -file_copy_print_error(int code, const char *src, const char *dst) -{ - switch (code) { - case 0: - break; - case FILE_COPY_ERROR_OPEN_SRC: - printf("File copy error: failed to open %s.\n", src); - break; - case FILE_COPY_ERROR_OPEN_DST: - printf("File copy error: failed to open %s.\n", dst); - break; - case FILE_COPY_ERROR_READ: - printf("File copy error: failed to read %s.\n", src); - break; - case FILE_COPY_ERROR_WRITE: - printf("File copy error: failed to write %s.\n", src); - break; - case FILE_COPY_ERROR_ALLOC_BUFFER: - printf("File copy error: failed to allocate buffer.\n"); - break; - default: - printf("File copy error: unknown error %d.\n", code); - } -} diff --git a/src/lib/p_io.h b/src/lib/p_io.h deleted file mode 100644 index f525df3..0000000 --- a/src/lib/p_io.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (C) 2010-2012 jeanfi@gmail.com - * - * This program 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 program 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 program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301 USA - */ -#ifndef _P_IO_H -#define _P_IO_H - -/* Returns '1' if a given 'path' denotates a directory else returns - 0 */ -int is_dir(const char *path); - -/* Returns '1' if a given 'path' denotates a file else returns - 0 */ -int is_file(const char *path); - -/* Returns a normalized path */ -char *path_normalize(const char *dpath); - -/* Returns the null-terminated entries of a directory */ -char **dir_list(const char *dpath, int (*filter) (const char *path)); -void paths_free(char **paths); - -char *path_append(const char *dir, const char *path); - -/* - Returns the size of a file. - Returns '-1' if the size cannot be retrieved or not a file. -*/ -long file_get_size(const char *path); - -/* - Returns the content of a file. - Returns 'NULL' if the file cannot be read or failed to allocate - enough memory. - Returns an empty string if the file exists but is empty. -*/ -char *file_get_content(const char *path); - -enum file_copy_error { - FILE_COPY_ERROR_OPEN_SRC = 1, - FILE_COPY_ERROR_OPEN_DST, - FILE_COPY_ERROR_READ, - FILE_COPY_ERROR_WRITE, - FILE_COPY_ERROR_ALLOC_BUFFER -}; - -void file_copy_print_error(int code, const char *src, const char *dst); - -/* - Copy a file. - - Returns '0' if sucessfull, otherwise return the error code. -*/ -int file_copy(const char *src, const char *dst); - -#endif diff --git a/src/lib/pio.c b/src/lib/pio.c new file mode 100644 index 0000000..d150bed --- /dev/null +++ b/src/lib/pio.c @@ -0,0 +1,108 @@ +/* + * Copyright (C) 2010-2013 jeanfi@gmail.com + * + * This program 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 program 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 program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA + */ +#define _LARGEFILE_SOURCE 1 +#include "config.h" + +#include +#include +#include +#include +#include + +#include "pio.h" + +static char *path_append(const char *dir, const char *path) +{ + char *result; + + result = malloc(strlen(dir) + 1 + strlen(path) + 1); + + strcpy(result, dir); + strcat(result, "/"); + strcat(result, path); + + return result; +} + +static char **paths_add(char **paths, int n, char *path) +{ + char **result; + + result = malloc((n+1) * sizeof(void *)); + + memcpy(result + 1, paths, n * sizeof(void *)); + + *result = path; + + return result; +} + +char **dir_list(const char *dpath, int (*filter) (const char *)) +{ + struct dirent *ent; + DIR *dir; + char **paths, *path, *name, **tmp; + int n; + + dir = opendir(dpath); + + if (!dir) + return NULL; + + n = 1; + paths = malloc(sizeof(void *)); + *paths = NULL; + + while ((ent = readdir(dir)) != NULL) { + name = ent->d_name; + + if (!strcmp(name, ".") || !strcmp(name, "..")) + continue; + + path = path_append(dpath, name); + + if (!filter || filter(path)) { + tmp = paths_add(paths, n, path); + free(paths); + paths = tmp; + + n++; + } else { + free(path); + } + } + + closedir(dir); + + return paths; +} + +void paths_free(char **paths) +{ + char **paths_cur; + + paths_cur = paths; + while (*paths_cur) { + free(*paths_cur); + + paths_cur++; + } + + free(paths); +} diff --git a/src/lib/pio.h b/src/lib/pio.h new file mode 100644 index 0000000..29aa798 --- /dev/null +++ b/src/lib/pio.h @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2010-2013 jeanfi@gmail.com + * + * This program 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 program 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 program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA + */ +#ifndef _P_IO_H +#define _P_IO_H + +char **dir_list(const char *dpath, int (*filter) (const char *path)); +void paths_free(char **paths); + +#endif diff --git a/src/lib/psensor.c b/src/lib/psensor.c index a4f1eb5..5be048e 100644 --- a/src/lib/psensor.c +++ b/src/lib/psensor.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 jeanfi@gmail.com + * Copyright (C) 2010-2013 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -31,16 +31,19 @@ #include "cpu.h" #endif - -struct psensor *psensor_create(char *id, char *name, - unsigned int type, int values_max_length) +struct psensor *psensor_create(char *id, + char *name, + char *chip, + unsigned int type, + int values_max_length) { - struct psensor *psensor - = (struct psensor *)malloc(sizeof(struct psensor)); + struct psensor *psensor; + + psensor = (struct psensor *)malloc(sizeof(struct psensor)); psensor->id = id; psensor->name = name; - psensor->enabled = 1; + psensor->chip = chip; psensor->min = UNKNOWN_DBL_VALUE; psensor->max = UNKNOWN_DBL_VALUE; @@ -49,18 +52,21 @@ struct psensor *psensor_create(char *id, char *name, psensor->values_max_length = values_max_length; psensor->measures = measures_dbl_create(values_max_length); - psensor->alarm_limit = 0; + psensor->alarm_enabled = 0; + psensor->alarm_high_threshold = 0; + psensor->alarm_low_threshold = 0; psensor->cb_alarm_raised = NULL; psensor->cb_alarm_raised_data = NULL; psensor->alarm_raised = 0; - psensor->alarm_enabled = 0; - psensor->url = NULL; psensor->color = NULL; + psensor->graph_enabled = 1; + psensor->appindicator_enabled = 0; + return psensor; } @@ -89,9 +95,14 @@ void psensor_values_resize(struct psensor *s, int new_size) void psensor_free(struct psensor *sensor) { if (sensor) { + log_debug("Cleanup %s", sensor->id); + free(sensor->name); free(sensor->id); + if (sensor->chip) + free(sensor->chip); + if (sensor->color) free(sensor->color); @@ -149,7 +160,7 @@ int psensor_list_contains_type(struct psensor **sensors, unsigned int type) s = sensors; while (*s) { - if ((*s)->type == type) + if ((*s)->type & type) return 1; s++; } @@ -198,26 +209,46 @@ int is_fan_type(unsigned int type) return type & SENSOR_TYPE_FAN; } -char *psensor_value_to_string(unsigned int type, double value) +double celcius_to_fahrenheit(double c) { - /* should not be possible to exceed 20 characters with temp or - rpm values the .x part is never displayed */ - char *str = malloc(20); + return c * (9.0/5.0) + 32; +} + +double fahrenheit_to_celcius(double f) +{ + return (f - 32) * (5.0/9.0); +} - char *unit; +char * +psensor_value_to_str(unsigned int type, double value, int use_celcius) +{ + char *str; + const char *unit; + + /* + * should not be possible to exceed 20 characters with temp or + * rpm values the .x part is never displayed + */ + str = malloc(20); - if (is_temp_type(type)) - unit = "C"; - else if (type & SENSOR_TYPE_CPU_USAGE) - unit = "%"; - else - unit = ""; + unit = psensor_type_to_unit_str(type, use_celcius); + + if (is_temp_type(type) && !use_celcius) + value = celcius_to_fahrenheit(value); sprintf(str, "%.0f%s", value, unit); return str; } +char * +psensor_measure_to_str(const struct measure *m, + unsigned int type, + unsigned int use_celcius) +{ + return psensor_value_to_str(type, m->value, use_celcius); +} + void psensor_set_current_value(struct psensor *sensor, double value) { struct timeval tv; @@ -228,15 +259,13 @@ void psensor_set_current_value(struct psensor *sensor, double value) psensor_set_current_measure(sensor, value, tv); } -void -psensor_set_current_measure(struct psensor *s, - double v, struct timeval tv) +void psensor_set_current_measure(struct psensor *s, double v, struct timeval tv) { memmove(s->measures, &s->measures[1], (s->values_max_length - 1) * sizeof(struct measure)); - s->measures[s->values_max_length - 1].value.d_num = v; + s->measures[s->values_max_length - 1].value = v; s->measures[s->values_max_length - 1].time = tv; if (s->min == UNKNOWN_DBL_VALUE || v < s->min) @@ -245,11 +274,10 @@ psensor_set_current_measure(struct psensor *s, if (s->max == UNKNOWN_DBL_VALUE || v > s->max) s->max = v; - if (s->alarm_limit && s->alarm_enabled) { - if (v > s->alarm_limit) { + if (s->alarm_enabled) { + if (v > s->alarm_high_threshold || v < s->alarm_low_threshold) { if (!s->alarm_raised && s->cb_alarm_raised) - s->cb_alarm_raised(s, - s->cb_alarm_raised_data); + s->cb_alarm_raised(s, s->cb_alarm_raised_data); s->alarm_raised = 1; } else { @@ -258,9 +286,9 @@ psensor_set_current_measure(struct psensor *s, } } -double psensor_get_current_value(struct psensor *sensor) +double psensor_get_current_value(const struct psensor *sensor) { - return sensor->measures[sensor->values_max_length - 1].value.d_num; + return sensor->measures[sensor->values_max_length - 1].value; } struct measure *psensor_get_current_measure(struct psensor *sensor) @@ -272,7 +300,7 @@ struct measure *psensor_get_current_measure(struct psensor *sensor) Returns the minimal value of a given 'type' (SENSOR_TYPE_TEMP or SENSOR_TYPE_FAN) */ -double get_min_value(struct psensor **sensors, int type) +static double get_min_value(struct psensor **sensors, int type) { double m = UNKNOWN_DBL_VALUE; struct psensor **s = sensors; @@ -280,12 +308,12 @@ double get_min_value(struct psensor **sensors, int type) while (*s) { struct psensor *sensor = *s; - if (sensor->enabled && (sensor->type & type)) { + if (sensor->type & type) { int i; double t; for (i = 0; i < sensor->values_max_length; i++) { - t = sensor->measures[i].value.d_num; + t = sensor->measures[i].value; if (t == UNKNOWN_DBL_VALUE) continue; @@ -312,11 +340,11 @@ double get_max_value(struct psensor **sensors, int type) while (*s) { struct psensor *sensor = *s; - if (sensor->enabled && (sensor->type & type)) { + if (sensor->type & type) { int i; double t; for (i = 0; i < sensor->values_max_length; i++) { - t = sensor->measures[i].value.d_num; + t = sensor->measures[i].value; if (t == UNKNOWN_DBL_VALUE) continue; @@ -340,7 +368,7 @@ psensor_get_max_current_value(struct psensor **sensors, unsigned int type) while (*s_cur) { struct psensor *s = *s_cur; - if (s->enabled && (s->type & type)) { + if (s->graph_enabled && (s->type & type)) { double v = psensor_get_current_value(s); if (m == UNKNOWN_DBL_VALUE || v > m) @@ -373,18 +401,31 @@ double get_max_temp(struct psensor **sensors) return get_max_value(sensors, SENSOR_TYPE_TEMP); } -struct psensor **get_all_sensors(int values_max_length) +struct psensor **get_all_sensors(int use_libatasmart, int values_max_length) { - struct psensor **psensors = NULL; + struct psensor **psensors; struct psensor **tmp_psensors; psensors = lmsensor_psensor_list_add(NULL, values_max_length); - tmp_psensors = hdd_psensor_list_add(psensors, values_max_length); - if (tmp_psensors != psensors) { - free(psensors); - psensors = tmp_psensors; + if (!use_libatasmart) { + tmp_psensors = hddtemp_psensor_list_add(psensors, + values_max_length); + if (tmp_psensors != psensors) { + free(psensors); + psensors = tmp_psensors; + } } +#ifdef HAVE_ATASMART + else { + tmp_psensors = hdd_psensor_list_add(psensors, + values_max_length); + if (tmp_psensors != psensors) { + free(psensors); + psensors = tmp_psensors; + } + } +#endif if (!psensors) { /* there is no detected sensors */ psensors = malloc(sizeof(struct psensor *)); @@ -396,19 +437,22 @@ struct psensor **get_all_sensors(int values_max_length) const char *psensor_type_to_str(unsigned int type) { - if ((type & SENSOR_TYPE_NVIDIA_TEMP) == SENSOR_TYPE_NVIDIA_TEMP) - return "NVidia GPU Temperature"; - - if ((type & SENSOR_TYPE_AMD_TEMP) == SENSOR_TYPE_AMD_TEMP) - return "AMD GPU Temperature"; - - if ((type & SENSOR_TYPE_AMD_FAN) == SENSOR_TYPE_AMD_FAN) - return "AMD GPU Fan Speed"; + if (type & SENSOR_TYPE_NVCTRL) + return "NVidia GPU"; + + if (type & SENSOR_TYPE_ATIADL) { + if (type & SENSOR_TYPE_TEMP) + return "AMD GPU Temperature"; + else if (type & SENSOR_TYPE_RPM) + return "AMD GPU Fan Speed"; + else /* type & SENSOR_TYPE_USAGE */ + return "AMD GPU Usage"; + } if ((type & SENSOR_TYPE_HDD_TEMP) == SENSOR_TYPE_HDD_TEMP) return "HDD Temperature"; - if (type & SENSOR_TYPE_CPU_USAGE) + if ((type & SENSOR_TYPE_CPU_USAGE) == SENSOR_TYPE_CPU_USAGE) return "CPU Usage"; if (type & SENSOR_TYPE_TEMP) @@ -417,25 +461,30 @@ const char *psensor_type_to_str(unsigned int type) if (type & SENSOR_TYPE_FAN) return "Fan"; + if (type & SENSOR_TYPE_CPU) + return "CPU"; + if (type & SENSOR_TYPE_REMOTE) return "Remote"; - return "N/A"; /* should not be possible */ + return "N/A"; } -const char *psensor_type_to_unit_str(unsigned int type) +const char *psensor_type_to_unit_str(unsigned int type, int use_celcius) { - if (type & SENSOR_TYPE_TEMP) - return _("C"); - - if (type & SENSOR_TYPE_FAN) + if (is_temp_type(type)) { + if (use_celcius) + return "\302\260C"; + else + return "\302\260F"; + } else if (is_fan_type(type)) { return _("RPM"); - - if (type & SENSOR_TYPE_CPU_USAGE) + } else if (type & SENSOR_TYPE_CPU_USAGE) { return _("%"); - - return "N/A"; + } else { + return _("N/A"); + } } void psensor_list_update_measures(struct psensor **sensors) @@ -446,8 +495,25 @@ void psensor_list_update_measures(struct psensor **sensors) cpu_psensor_list_update(sensors); #endif - if (psensor_list_contains_type(sensors, SENSOR_TYPE_HDD_TEMP)) + if (psensor_list_contains_type(sensors, SENSOR_TYPE_HDDTEMP)) + hddtemp_psensor_list_update(sensors); + +#ifdef HAVE_ATASMART + if (psensor_list_contains_type(sensors, SENSOR_TYPE_ATASMART)) hdd_psensor_list_update(sensors); +#endif +} + +void psensor_log_measures(struct psensor **sensors) +{ + if (log_level == LOG_DEBUG) + while (*sensors) { + log_debug("Measure: %s %.2f", + (*sensors)->name, + psensor_get_current_value(*sensors)); + + sensors++; + } } void psensor_init() @@ -459,3 +525,48 @@ void psensor_cleanup() { lmsensor_cleanup(); } + +struct psensor **psensor_list_copy(struct psensor **sensors) +{ + struct psensor **result; + int n, i; + + n = psensor_list_size(sensors); + result = malloc((n+1) * sizeof(struct psensor *)); + for (i = 0; i < n; i++) + result[i] = sensors[i]; + result[n] = NULL; + + return result; +} + +char * +psensor_current_value_to_str(const struct psensor *s, unsigned int celcius) +{ + return psensor_value_to_str(s->type, + psensor_get_current_value(s), + celcius); +} + +struct psensor **psensor_list_filter_graph_enabled(struct psensor **sensors) +{ + int n, i; + struct psensor **result, **cur, *s; + + if (!sensors) + return NULL; + + n = psensor_list_size(sensors); + result = malloc((n+1) * sizeof(struct psensor *)); + + for (cur = sensors, i = 0; *cur; cur++) { + s = *cur; + + if (s->graph_enabled) + result[i++] = s; + } + + result[i] = NULL; + + return result; +} diff --git a/src/lib/psensor.h b/src/lib/psensor.h index 6280fdb..e459866 100644 --- a/src/lib/psensor.h +++ b/src/lib/psensor.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 jeanfi@gmail.com + * Copyright (C) 2010-2013 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -19,29 +19,44 @@ #ifndef _PSENSOR_PSENSOR_H_ #define _PSENSOR_PSENSOR_H_ -#include "config.h" #include +#include "config.h" +#ifdef HAVE_ATASMART +#include +#endif + +#include "bool.h" #include "color.h" #include "log.h" #include "measure.h" enum psensor_type { - SENSOR_TYPE_TEMP = 0x0001, - SENSOR_TYPE_FAN = 0x0002, - SENSOR_TYPE_REMOTE = 0x0004, - - SENSOR_TYPE_LMSENSOR = 0x0100, - SENSOR_TYPE_NVIDIA_TEMP = 0x0200 | SENSOR_TYPE_TEMP, - SENSOR_TYPE_HDD_TEMP = 0x0400 | SENSOR_TYPE_TEMP, - SENSOR_TYPE_CPU_USAGE = 0x0800, - SENSOR_TYPE_AMD = 0x1000, - - SENSOR_TYPE_AMD_TEMP = SENSOR_TYPE_AMD | SENSOR_TYPE_TEMP, - SENSOR_TYPE_AMD_FAN = SENSOR_TYPE_AMD | SENSOR_TYPE_FAN, - - SENSOR_TYPE_LMSENSOR_TEMP = SENSOR_TYPE_LMSENSOR | SENSOR_TYPE_TEMP, - SENSOR_TYPE_LMSENSOR_FAN = SENSOR_TYPE_LMSENSOR | SENSOR_TYPE_FAN + /* type of sensor values */ + SENSOR_TYPE_TEMP = 0x00001, + SENSOR_TYPE_RPM = 0x00002, + SENSOR_TYPE_USAGE = 0x00004, + + /* Whether the sensor is remote */ + SENSOR_TYPE_REMOTE = 0x00008, + + /* Libraries used for retrieving sensor information */ + SENSOR_TYPE_LMSENSOR = 0x00100, + SENSOR_TYPE_NVCTRL = 0x00200, + SENSOR_TYPE_GTOP = 0x00400, + SENSOR_TYPE_ATIADL = 0x00800, + SENSOR_TYPE_ATASMART = 0x01000, + SENSOR_TYPE_HDDTEMP = 0x02000, + + /* Type of HW component */ + SENSOR_TYPE_HDD = 0x04000, + SENSOR_TYPE_CPU = 0x08000, + SENSOR_TYPE_GPU = 0x10000, + SENSOR_TYPE_FAN = 0x20000, + + /* Combinations */ + SENSOR_TYPE_HDD_TEMP = (SENSOR_TYPE_HDD | SENSOR_TYPE_TEMP), + SENSOR_TYPE_CPU_USAGE = (SENSOR_TYPE_CPU | SENSOR_TYPE_USAGE) }; struct psensor { @@ -51,6 +66,9 @@ struct psensor { /* Uniq id of the sensor */ char *id; + /* Name of the chip. */ + char *chip; + /* lm-sensor */ const sensors_chip_name *iname; const sensors_feature *feature; @@ -65,8 +83,8 @@ struct psensor { /* Color of the sensor used for the graph */ struct color *color; - /* Whether the sensor is displayed in the graph */ - int enabled; + /* Whether the graph sensor is displayed. */ + bool graph_enabled; /* see psensor_type */ unsigned int type; @@ -77,19 +95,14 @@ struct psensor { /* The minimum detected value of the sensor */ double min; - /* - Whether alarm alerts is enabled for this sensor - */ - int alarm_enabled; + /* Whether alarm alert is enabled for this sensor */ + bool alarm_enabled; - /* - An alarm is raised if the current sensor value is bigger. 0 - means no limit - */ - double alarm_limit; + int alarm_high_threshold; + int alarm_low_threshold; - /* Whether the current value is bigger than 'alarm_limit'. */ - int alarm_raised; + /* Whether an alarm is raised for this sensor */ + unsigned int alarm_raised; void (*cb_alarm_raised) (struct psensor *, void *); void *cb_alarm_raised_data; @@ -102,12 +115,18 @@ struct psensor { /* AMD id for the aticonfig */ int amd_id; #endif - +#ifdef HAVE_ATASMART + SkDisk *disk; +#endif char *url; + + bool appindicator_enabled; }; struct psensor *psensor_create(char *id, - char *name, unsigned int type, + char *name, + char *chip, + unsigned int type, int values_max_length); void psensor_values_resize(struct psensor *s, int new_size); @@ -117,6 +136,8 @@ void psensor_free(struct psensor *sensor); void psensor_list_free(struct psensor **sensors); int psensor_list_size(struct psensor **sensors); +struct psensor **psensor_list_filter_graph_enabled(struct psensor **); + struct psensor *psensor_list_get_by_id(struct psensor **sensors, const char *id); @@ -146,18 +167,26 @@ psensor_get_max_current_value(struct psensor **sensors, unsigned int type); parameter 'type' is SENSOR_TYPE_LMSENSOR_TEMP, SENSOR_TYPE_NVIDIA, or SENSOR_TYPE_LMSENSOR_FAN */ -char *psensor_value_to_string(unsigned int type, double value); +char *psensor_value_to_str(unsigned int type, + double value, + int use_celcius); + +char *psensor_measure_to_str(const struct measure *m, + unsigned int type, + unsigned int use_celcius); -struct psensor **get_all_sensors(int values_max_length); +struct psensor **get_all_sensors(int use_libatasmart, int values_max_length); struct psensor **psensor_list_add(struct psensor **sensors, struct psensor *sensor); +struct psensor **psensor_list_copy(struct psensor **); + void psensor_set_current_value(struct psensor *sensor, double value); void psensor_set_current_measure(struct psensor *sensor, double value, struct timeval tv); -double psensor_get_current_value(struct psensor *sensor); +double psensor_get_current_value(const struct psensor *); struct measure *psensor_get_current_measure(struct psensor *sensor); @@ -166,7 +195,7 @@ struct measure *psensor_get_current_measure(struct psensor *sensor); */ const char *psensor_type_to_str(unsigned int type); -const char *psensor_type_to_unit_str(unsigned int type); +const char *psensor_type_to_unit_str(unsigned int type, int use_celcius); void psensor_list_update_measures(struct psensor **sensors); @@ -176,4 +205,11 @@ void psensor_cleanup(); double get_max_value(struct psensor **sensors, int type); +double celcius_to_fahrenheit(double c); +double fahrenheit_to_celcius(double c); + +char *psensor_current_value_to_str(const struct psensor *, unsigned int); + +void psensor_log_measures(struct psensor **sensors); + #endif diff --git a/src/lib/psensor_json.c b/src/lib/psensor_json.c index 1d4668c..b6feecf 100644 --- a/src/lib/psensor_json.c +++ b/src/lib/psensor_json.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 jeanfi@gmail.com + * Copyright (C) 2010-2013 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -39,7 +39,7 @@ measure_to_json_object(struct measure *m) json_object_object_add(o, ATT_MEASURE_VALUE, - json_object_new_double(m->value.d_num)); + json_object_new_double(m->value)); json_object_object_add(o, ATT_MEASURE_TIME, json_object_new_int((m->time).tv_sec)); return o; @@ -89,7 +89,7 @@ static json_object *sensor_to_json(struct psensor *s) mo = json_object_new_object(); json_object_object_add(mo, ATT_MEASURE_VALUE, - json_object_new_double(m->value.d_num)); + json_object_new_double(m->value)); json_object_object_add(mo, ATT_MEASURE_TIME, json_object_new_int((m->time).tv_sec)); json_object_object_add(obj, ATT_SENSOR_LAST_MEASURE, mo); @@ -150,6 +150,7 @@ struct psensor *psensor_new_from_json(json_object *o, s = psensor_create(strdup(url), strdup(json_object_get_string(oname)), + NULL, json_object_get_int(otype) | SENSOR_TYPE_REMOTE, values_max_length); s->url = url; diff --git a/src/lib/psensor_json.h b/src/lib/psensor_json.h index d87a9ad..31ceb00 100644 --- a/src/lib/psensor_json.h +++ b/src/lib/psensor_json.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 jeanfi@gmail.com + * Copyright (C) 2010-2013 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -19,7 +19,13 @@ #ifndef _PSENSOR_PSENSOR_JSON_H_ #define _PSENSOR_PSENSOR_JSON_H_ +#include "config.h" + +#ifdef HAVE_JSON_0 #include +#else +#include +#endif #include "psensor.h" @@ -30,7 +36,7 @@ char *sensors_to_json_string(struct psensor **sensors); * Creates a new allocated psensor corresponding to a given json * representation. */ -struct psensor *psensor_new_from_json(json_object *o, +struct psensor *psensor_new_from_json(json_object * o, const char *sensors_url, int values_max_length); #endif diff --git a/src/lib/ptime.c b/src/lib/ptime.c new file mode 100644 index 0000000..34ae92e --- /dev/null +++ b/src/lib/ptime.c @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2010-2013 jeanfi@gmail.com + * + * This program 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 program 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 program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA + */ +#include + +#include "ptime.h" + +char *time_to_str(time_t *t) +{ + struct tm lt; + char *str; + + if (!localtime_r(t, <)) + return NULL; + + str = malloc(64); + + if (strftime(str, 64, "%s", <)) { + return str; + } else { + free(str); + return NULL; + } +} + +char *get_time_str() +{ + time_t t; + + t = time(NULL); + return time_to_str(&t); +} diff --git a/src/lib/ptime.h b/src/lib/ptime.h new file mode 100644 index 0000000..aac8c52 --- /dev/null +++ b/src/lib/ptime.h @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2010-2013 jeanfi@gmail.com + * + * This program 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 program 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 program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA + */ +#ifndef _P_TIME_H +#define _P_TIME_H + +#include + +char *get_time_str(); +char *time_to_str(time_t *t); + +#endif diff --git a/src/lib/slog.c b/src/lib/slog.c new file mode 100644 index 0000000..d3e646d --- /dev/null +++ b/src/lib/slog.c @@ -0,0 +1,197 @@ +/* + * Copyright (C) 2010-2013 jeanfi@gmail.com + * + * This program 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 program 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 program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA + */ +#define _LARGEFILE_SOURCE 1 +#include "config.h" + +#include +#include +#define _(str) gettext(str) + +#include +#include +#include +#include +#include +#include +#include + +#include "bool.h" +#include "config.h" +#include "log.h" +#include "ptime.h" +#include "slog.h" + +static FILE *file; +static double *last_values; +static int period; +static struct psensor **sensors; +static pthread_mutex_t *sensors_mutex; +static pthread_t thread; +static time_t st; + +static const char *DEFAULT_FILENAME = "sensors.log"; + +static char *get_default_path() +{ + char *home, *path, *dir; + + home = getenv("HOME"); + + if (home) { + dir = malloc(strlen(home)+1+strlen(".psensor")+1); + sprintf(dir, "%s/%s", home, ".psensor"); + mkdir(dir, 0777); + + path = malloc(strlen(dir)+1+strlen(DEFAULT_FILENAME)+1); + sprintf(path, "%s/%s", dir, DEFAULT_FILENAME); + + free(dir); + + return path; + } else { + log_warn(_("HOME variable not set.")); + return strdup(DEFAULT_FILENAME); + } +} + +static bool slog_open(const char *path, struct psensor **sensors) +{ + char *lpath, *t; + + if (file) { + log_err(_("Sensor log file already open.")); + return 0; + } + + lpath = path ? (char *)path : get_default_path(); + + file = fopen(lpath, "a"); + + if (!file) + log_err(_("Cannot open sensor log file: %s."), lpath); + + if (!path) + free((char *)lpath); + + if (!file) + return 0; + + st = time(NULL); + t = time_to_str(&st); + + fprintf(file, "I,%s,%s\n", t, VERSION); + + while (*sensors) { + fprintf(file, "S,%s,%x\n", (*sensors)->id, (*sensors)->type); + sensors++; + } + + fflush(file); + + return 1; +} + +static void slog_write_sensors(struct psensor **sensors) +{ + int count, i; + double v; + struct timeval tv; + bool first_call; + + if (!file) { + log_err(_("Sensor log file not open.")); + return ; + } + + gettimeofday(&tv, NULL); + + count = psensor_list_size(sensors); + + if (last_values) { + first_call = 0; + } else { + first_call = 1; + last_values = malloc(count * sizeof(double)); + } + + fprintf(file, "%ld", (long int)(tv.tv_sec - st)); + for (i = 0; i < count; i++) { + v = psensor_get_current_value(sensors[i]); + + if (!first_call && last_values[i] == v) + fputc(',', file); + else + fprintf(file, ",%.1f", v); + + last_values[i] = v; + } + + fputc('\n', file); + + fflush(file); +} + +static void *slog_routine(void *data) +{ + while (1) { + pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL); + pthread_mutex_lock(sensors_mutex); + slog_write_sensors(sensors); + pthread_mutex_unlock(sensors_mutex); + pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); + sleep(period); + } + + pthread_exit(0); +} + +void slog_close() +{ + if (file) { + pthread_cancel(thread); + + fclose(file); + file = NULL; + free(last_values); + last_values = NULL; + } else { + log_debug(_("Sensor log not open, cannot close.")); + } +} + +bool slog_activate(const char *path, + struct psensor **ss, + pthread_mutex_t *mutex, + int p) +{ + bool ret; + + sensors = ss; + sensors_mutex = mutex; + period = p; + + pthread_mutex_lock(mutex); + ret = slog_open(path, sensors); + pthread_mutex_unlock(mutex); + + if (ret) + pthread_create(&thread, NULL, slog_routine, NULL); + + return ret; +} diff --git a/src/lib/slog.h b/src/lib/slog.h new file mode 100644 index 0000000..34ebe23 --- /dev/null +++ b/src/lib/slog.h @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2010-2013 jeanfi@gmail.com + * + * This program 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 program 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 program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA + */ +#ifndef _PSENSOR_SLOG_H_ +#define _PSENSOR_SLOG_H_ + +#include + +#include "psensor.h" + +bool slog_activate(const char *, struct psensor **, pthread_mutex_t *, int s); +void slog_close(); + +#endif diff --git a/src/lib/url.c b/src/lib/url.c index 0a471b3..a08ccd3 100644 --- a/src/lib/url.c +++ b/src/lib/url.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 jeanfi@gmail.com + * Copyright (C) 2010-2013 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as diff --git a/src/lib/url.h b/src/lib/url.h index 7e01187..ed2df80 100644 --- a/src/lib/url.h +++ b/src/lib/url.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 jeanfi@gmail.com + * Copyright (C) 2010-2013 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as diff --git a/src/main.c b/src/main.c index fb534d8..ede84e6 100644 --- a/src/main.c +++ b/src/main.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 jeanfi@gmail.com + * Copyright (C) 2010-2013 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -37,6 +37,8 @@ #include "ui_sensorlist.h" #include "ui_color.h" #include "lmsensor.h" +#include "notify_cmd.h" +#include "slog.h" #include "ui_pref.h" #include "ui_graph.h" #include "ui_status.h" @@ -67,8 +69,6 @@ #include "cpu.h" #endif -#include "compat.h" - static const char *program_name; static void print_version() @@ -80,14 +80,14 @@ static void print_version() "This is free software: you are free to change and " " redistribute it.\n" "There is NO WARRANTY, to the extent permitted by law.\n"), - "2010-2012"); + "2010-2013"); } static void print_help() { printf(_("Usage: %s [OPTION]...\n"), program_name); - puts(_("psensor is a GTK application for monitoring hardware sensors, " + puts(_("Psensor is a GTK+ application for monitoring hardware sensors, " "including temperatures and fan speeds.")); puts(""); @@ -97,9 +97,14 @@ static void print_help() puts(""); - puts(_(" -u, --url=URL " - "the URL of the psensor-server, example: http://hostname:3131")); - + puts(_( +" -u, --url=URL the URL of the psensor-server,\n" +" example: http://hostname:3131")); + puts(_( +" --use-libatasmart use atasmart library for disk monitoring instead of\n" +" hddtemp daemon")); + puts(_( +" -n, --new-instance force the creation of a new Psensor application")); puts(""); puts(_(" -d, --debug=LEVEL " @@ -113,50 +118,39 @@ static void print_help() } /* - Updates the size of the sensor values if different than the - configuration. + * Updates the size of the sensor values if different than the + * configuration. */ -void +static void update_psensor_values_size(struct psensor **sensors, struct config *cfg) { - struct psensor **cur; + struct psensor **cur, *s; - cur = sensors; - while (*cur) { - struct psensor *s = *cur; + for (cur = sensors; *cur; cur++) { + s = *cur; if (s->values_max_length != cfg->sensor_values_max_length) psensor_values_resize(s, cfg->sensor_values_max_length); - - cur++; } } -static void log_measures(struct psensor **sensors) +static void update_measures(struct ui_psensor *ui) { - if (log_level == LOG_DEBUG) - while (*sensors) { - log_debug("Measure: %s %.2f", - (*sensors)->name, - psensor_get_current_value(*sensors)); - - sensors++; - } -} + struct psensor **sensors; + struct config *cfg; + int period; -void update_psensor_measures(struct ui_psensor *ui) -{ - struct psensor **sensors = ui->sensors; - struct config *cfg = ui->config; + cfg = ui->config; while (1) { - g_mutex_lock(ui->sensors_mutex); + pthread_mutex_lock(&ui->sensors_mutex); + sensors = ui->sensors; if (!sensors) return; - update_psensor_values_size(sensors, ui->config); + update_psensor_values_size(sensors, cfg); psensor_list_update_measures(sensors); #ifdef HAVE_REMOTE_SUPPORT @@ -169,11 +163,13 @@ void update_psensor_measures(struct ui_psensor *ui) amd_psensor_list_update(sensors); #endif - log_measures(sensors); + psensor_log_measures(sensors); - g_mutex_unlock(ui->sensors_mutex); + period = cfg->sensor_update_interval; - sleep(cfg->sensor_update_interval); + pthread_mutex_unlock(&ui->sensors_mutex); + + sleep(period); } } @@ -211,18 +207,19 @@ gboolean ui_refresh_thread(gpointer data) ret = TRUE; cfg = ui->config; - g_mutex_lock(ui->sensors_mutex); + pthread_mutex_lock(&ui->sensors_mutex); - graph_update(ui->sensors, ui->w_graph, ui->config); + graph_update(ui->sensors, ui->w_graph, ui->config, ui->main_window); - ui_sensorlist_update(ui); + ui_sensorlist_update(ui, 0); if (is_appindicator_supported() || is_status_supported()) indicators_update(ui); #ifdef HAVE_UNITY ui_unity_launcher_entry_update(ui->sensors, - !cfg->unity_launcher_count_disabled); + !cfg->unity_launcher_count_disabled, + cfg->temperature_unit == CELCIUS); #endif if (ui->graph_update_interval != cfg->graph_update_interval) { @@ -230,7 +227,7 @@ gboolean ui_refresh_thread(gpointer data) ret = FALSE; } - g_mutex_unlock(ui->sensors_mutex); + pthread_mutex_unlock(&ui->sensors_mutex); if (ret == FALSE) g_timeout_add(1000 * ui->graph_update_interval, @@ -239,12 +236,14 @@ gboolean ui_refresh_thread(gpointer data) return ret; } -void cb_alarm_raised(struct psensor *sensor, void *data) +static void cb_alarm_raised(struct psensor *sensor, void *data) { #ifdef HAVE_LIBNOTIFY - if (sensor->enabled) + if (sensor->alarm_enabled) ui_notify(sensor, (struct ui_psensor *)data); #endif + + notify_cmd(sensor); } static void associate_colors(struct psensor **sensors) @@ -255,7 +254,7 @@ static void associate_colors(struct psensor **sensors) unsigned int colors[COLORS_COUNT][3] = { {0x0000, 0x0000, 0x0000}, /* black */ {0xffff, 0x0000, 0x0000}, /* red */ - {0x0000, 0.0000, 0xffff}, /* blue */ + {0x0000, 0x0000, 0xffff}, /* blue */ {0x0000, 0xffff, 0x0000}, /* green */ {0x7fff, 0x7fff, 0x7fff}, /* grey */ @@ -263,22 +262,17 @@ static void associate_colors(struct psensor **sensors) {0x0000, 0x0000, 0x7fff}, /* dark blue */ {0x0000, 0x7fff, 0x0000} /* dark green */ }; + struct psensor **cur; + int i; + struct color c; - struct psensor **sensor_cur = sensors; - int i = 0; - while (*sensor_cur) { - struct color default_color; - color_set(&default_color, + for (cur = sensors, i = 0; *cur; cur++) { + color_set(&c, colors[i % COLORS_COUNT][0], colors[i % COLORS_COUNT][1], colors[i % COLORS_COUNT][2]); - (*sensor_cur)->color - = config_get_sensor_color((*sensor_cur)->id, - &default_color); - - sensor_cur++; - i++; + (*cur)->color = config_get_sensor_color((*cur)->id, &c); } } @@ -292,13 +286,16 @@ associate_cb_alarm_raised(struct psensor **sensors, struct ui_psensor *ui) s->cb_alarm_raised = cb_alarm_raised; s->cb_alarm_raised_data = ui; - if (is_temp_type(s->type)) { - s->alarm_limit - = config_get_sensor_alarm_limit(s->id, 60); + s->alarm_high_threshold + = config_get_sensor_alarm_high_threshold(s->id); + s->alarm_low_threshold + = config_get_sensor_alarm_low_threshold(s->id); + + if (is_temp_type(s->type) || is_fan_type(s->type)) { s->alarm_enabled = config_get_sensor_alarm_enabled(s->id); } else { - s->alarm_limit = 0; + s->alarm_high_threshold = 0; s->alarm_enabled = 0; } @@ -313,12 +310,16 @@ static void associate_preferences(struct psensor **sensors) char *n; struct psensor *s = *sensor_cur; - s->enabled = config_is_sensor_enabled(s->id); + s->graph_enabled = config_is_sensor_enabled(s->id); n = config_get_sensor_name(s->id); - if (n) + if (n) { + free(s->name); s->name = n; + } + + s->appindicator_enabled = config_is_appindicator_enabled(s->id); sensor_cur++; } @@ -347,10 +348,12 @@ static void log_init() } static struct option long_options[] = { + {"use-libatasmart", no_argument, 0, 0}, {"version", no_argument, 0, 'v'}, {"help", no_argument, 0, 'h'}, {"url", required_argument, 0, 'u'}, {"debug", required_argument, 0, 'd'}, + {"new-instance", no_argument, 0, 'n'}, {0, 0, 0, 0} }; @@ -389,13 +392,96 @@ static void log_glib_info() glib_micro_version); } +static void cb_activate(GApplication *application, + gpointer data) +{ + ui_window_show((struct ui_psensor *)data); +} + +/* + * Release memory for Valgrind. + */ +static void cleanup(struct ui_psensor *ui) +{ + pthread_mutex_lock(&ui->sensors_mutex); + + log_debug("Cleanup..."); + + psensor_cleanup(); + +#ifdef HAVE_NVIDIA + nvidia_cleanup(); +#endif +#ifdef HAVE_LIBATIADL + amd_cleanup(); +#endif +#ifdef HAVE_REMOTE_SUPPORT + rsensor_cleanup(); +#endif + + psensor_list_free(ui->sensors); + ui->sensors = NULL; + +#if defined(HAVE_APPINDICATOR) || defined(HAVE_APPINDICATOR_029) + ui_appindicator_cleanup(); +#endif + + ui_status_cleanup(); + + pthread_mutex_unlock(&ui->sensors_mutex); + + config_cleanup(); + + log_debug("Cleanup done, closing log"); +} + +/* + * Creates the list of sensors. + * + * 'url': remote psensor server url, null for local monitoring. + * 'use_libatasmart': whether the libatasmart must be used. + */ +static struct psensor **create_sensors_list(const char *url, + unsigned int use_libatasmart) +{ + struct psensor **sensors; + + if (url) { +#ifdef HAVE_REMOTE_SUPPORT + rsensor_init(); + sensors = get_remote_sensors(url, 600); +#else + log_err(_("Psensor has not been compiled with remote " + "sensor support.")); + exit(EXIT_FAILURE); +#endif + } else { + sensors = get_all_sensors(use_libatasmart, 600); +#ifdef HAVE_NVIDIA + sensors = nvidia_psensor_list_add(sensors, 600); +#endif +#ifdef HAVE_LIBATIADL + sensors = amd_psensor_list_add(sensors, 600); +#endif +#ifdef HAVE_GTOP + sensors = cpu_psensor_list_add(sensors, 600); +#endif + } + + associate_preferences(sensors); + associate_colors(sensors); + + return sensors; +} + int main(int argc, char **argv) { struct ui_psensor ui; GError *error; GThread *thread; - int optc, cmdok; + int optc, cmdok, opti, use_libatasmart, new_instance; char *url = NULL; + GApplication *app; program_name = argv[0]; @@ -406,10 +492,16 @@ int main(int argc, char **argv) textdomain(PACKAGE); #endif + use_libatasmart = new_instance = 0; + cmdok = 1; - while ((optc = getopt_long(argc, argv, "vhd:u:", long_options, - NULL)) != -1) { + while ((optc = getopt_long(argc, argv, "vhd:u:n", long_options, + &opti)) != -1) { switch (optc) { + case 0: + if (!strcmp(long_options[opti].name, "use-libatasmart")) + use_libatasmart = 1; + break; case 'u': if (optarg) url = strdup(optarg); @@ -422,7 +514,10 @@ int main(int argc, char **argv) exit(EXIT_SUCCESS); case 'd': log_level = atoi(optarg); - log_printf(LOG_INFO, _("Enables debug mode.")); + log_info(_("Enables debug mode.")); + break; + case 'n': + new_instance = 1; break; default: cmdok = 0; @@ -438,6 +533,18 @@ int main(int argc, char **argv) log_init(); + app = g_application_new("wpitchoune.psensor", 0); + + g_application_register(app, NULL, NULL); + + if (!new_instance && g_application_get_is_remote(app)) { + g_application_activate(app); + log_warn(_("A Psensor instance already exists.")); + exit(EXIT_SUCCESS); + } + + g_signal_connect(app, "activate", G_CALLBACK(cb_activate), &ui); + log_glib_info(); #if !(GLIB_CHECK_VERSION(2, 31, 0)) /* @@ -452,55 +559,32 @@ int main(int argc, char **argv) gtk_init(NULL, NULL); - ui.sensors_mutex = g_mutex_new(); - - config_init(); + pthread_mutex_init(&ui.sensors_mutex, NULL); ui.config = config_load(); psensor_init(); - if (url) { -#ifdef HAVE_REMOTE_SUPPORT - rsensor_init(); - ui.sensors = get_remote_sensors(url, 600); -#else - fprintf(stderr, - _("ERROR: Not compiled with remote sensor support.\n")); - exit(EXIT_FAILURE); -#endif - } else { - ui.sensors = get_all_sensors(600); -#ifdef HAVE_NVIDIA - ui.sensors = nvidia_psensor_list_add(ui.sensors, 600); -#endif -#ifdef HAVE_LIBATIADL - ui.sensors = amd_psensor_list_add(ui.sensors, 600); -#endif -#ifdef HAVE_GTOP - ui.sensors = cpu_psensor_list_add(ui.sensors, 600); -#endif - } - - associate_preferences(ui.sensors); - associate_colors(ui.sensors); + ui.sensors = create_sensors_list(url, use_libatasmart); associate_cb_alarm_raised(ui.sensors, &ui); + if (ui.config->slog_enabled) + slog_activate(NULL, + ui.sensors, + &ui.sensors_mutex, + config_get_slog_interval()); + #if !defined(HAVE_APPINDICATOR) && !defined(HAVE_APPINDICATOR_029) ui_status_init(&ui); + ui_status_set_visible(1); #endif /* main window */ ui_window_create(&ui); - ui.sensor_box = NULL; - - /* drawing box */ - ui.w_graph = ui_graph_create(&ui); - /* sensor list */ - ui_sensorlist_create(&ui); + ui_enable_alpha_channel(&ui); - thread = g_thread_create((GThreadFunc) update_psensor_measures, + thread = g_thread_create((GThreadFunc) update_measures, &ui, TRUE, &error); if (!thread) @@ -514,47 +598,30 @@ int main(int argc, char **argv) ui_appindicator_init(&ui); #endif - /* - * show the window as soon as all gtk events have been processed - * in order to ensure that the status icon is attempted to be - * drawn before. If not, there is no way to detect that it is - * visible. - */ - g_idle_add((GSourceFunc)initial_window_show, &ui); - gdk_notify_startup_complete(); + /* + * hack, did not find a cleaner solution. + * wait 30s to ensure that the status icon is attempted to be + * drawn before determining whether the main window must be + * show. + */ + if (ui.config->hide_on_startup) + g_timeout_add(30000, (GSourceFunc)initial_window_show, &ui); + else + initial_window_show(&ui); + /* main loop */ gtk_main(); - g_mutex_lock(ui.sensors_mutex); - - psensor_cleanup(); - -#ifdef HAVE_NVIDIA - nvidia_cleanup(); -#endif -#ifdef HAVE_LIBATIADL - amd_cleanup(); -#endif -#ifdef HAVE_REMOTE_SUPPORT - rsensor_cleanup(); -#endif - - psensor_list_free(ui.sensors); - ui.sensors = NULL; - -#if defined(HAVE_APPINDICATOR) || defined(HAVE_APPINDICATOR_029) - ui_appindicator_cleanup(); -#endif - - ui_status_cleanup(); - - g_mutex_unlock(ui.sensors_mutex); - - config_cleanup(); + g_object_unref(app); + cleanup(&ui); + log_debug("Quitting..."); log_close(); + if (url) + free(url); + return 0; } diff --git a/src/notify_cmd.c b/src/notify_cmd.c new file mode 100644 index 0000000..dd42e92 --- /dev/null +++ b/src/notify_cmd.c @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2010-2013 jeanfi@gmail.com + * + * This program 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 program 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 program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA + */ + +#include +#include + +#include "notify_cmd.h" +#include "cfg.h" + +void notify_cmd(struct psensor *s) +{ + char *script; + char *v; + char *cmd; + int ret; + + script = config_get_notif_script(); + + if (script) { + v = psensor_current_value_to_str(s, 1); + + cmd = malloc(strlen(script)+1+1+strlen(s->id)+1+strlen(v)+1); + sprintf(cmd, "%s \"%s\" %s", script, s->id, v); + + log_debug("execute cmd: %s", cmd); + + ret = system(cmd); + + log_debug("cmd returns: %d", ret); + + free(cmd); + free(v); + free(script); + } +} + diff --git a/src/notify_cmd.h b/src/notify_cmd.h new file mode 100644 index 0000000..8f60bcf --- /dev/null +++ b/src/notify_cmd.h @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2010-2013 jeanfi@gmail.com + * + * This program 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 program 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 program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA + */ +#ifndef _PSENSOR_NOTIFY_CMD_H_ +#define _PSENSOR_NOTIFY_CMD_H_ + +#include "psensor.h" + +void notify_cmd(struct psensor *); + +#endif diff --git a/src/psensor.1 b/src/psensor.1 index b75a44d..01df5b5 100644 --- a/src/psensor.1 +++ b/src/psensor.1 @@ -1,5 +1,5 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.40.4. -.TH PSENSOR "1" "March 2012" "psensor 0.6.2.17" "User Commands" +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3. +.TH PSENSOR "1" "October 2013" "psensor 0.8.0.4" "User Commands" .SH NAME psensor \- Temperature monitoring application .SH SYNOPSIS @@ -8,40 +8,7 @@ psensor \- Temperature monitoring application .SH DESCRIPTION .PP -psensor is a GTK application for monitoring hardware sensors, including temperatures and fan speeds. -.PP - -It displays a curve for each sensor, and uses Desktop Notification to -raise an alarm when a temperature is too high. On Ubuntu an -Application Indicator is also available, its icon changes when a -temperature alert is raised. - -It can monitor: - * the temperature of the motherboard and CPU sensors (using lm\-sensors). - * the temperature of the NVidia GPUs (using XNVCtrl). - * the temperature and fan rotation speed of the ATI GPUs. - * the temperature of the Hard Disk Drives (using hddtemp). - * the rotation speed of the fans (using lm\-sensors). - * the sensors of a remote computer (using psensor\-server). - -Psensor requires lm\-sensors to be correctly installed and configured, -it can be checked by running the command 'sensors'. If it has never be -done, you may need to run the command 'sensors\-detect' and follow the -instruction. See the manpages of sensors(1) and sensors\-detect(8) for -more information. - -To retrieve the temperature of the Hard Disk Drives, the hddtemp -daemon must be running. - -For remote monitoring: - * start psensor\-server(1) on the remote computer - * run psensor with '\-\-url' option: 'psensor \-\-url=http://localhost:3131' - -ATI/AMD GPUs monitoring is available if the library libatiadlxx is -present in the directory /usr/lib and psensor has been compiled with -the ATI ADL SDK. - -Log is written to '$HOME/.psensor/log'. +Psensor is a GTK+ application for monitoring hardware sensors, including temperatures and fan speeds. .SH OPTIONS .TP \fB\-h\fR, \fB\-\-help\fR @@ -51,7 +18,15 @@ display this help and exit display version information and exit .TP \fB\-u\fR, \fB\-\-url\fR=\fIURL\fR -the URL of the psensor\-server, example: http://hostname:3131 +the URL of the psensor\-server, +example: http://hostname:3131 +.TP +\fB\-\-use\-libatasmart\fR +use atasmart library for disk monitoring instead of +hddtemp daemon +.TP +\fB\-n\fR, \fB\-\-new\-instance\fR +force the creation of a new Psensor application .TP \fB\-d\fR, \fB\-\-debug\fR=\fILEVEL\fR set the debug level, integer between 0 and 3 @@ -60,7 +35,7 @@ Report bugs to: jeanfi@gmail.com .PP psensor home page: .SH COPYRIGHT -Copyright \(co 2010\-2012 jeanfi@gmail.com +Copyright \(co 2010\-2013 jeanfi@gmail.com License GPLv2: GNU GPL version 2 or later .br This is free software: you are free to change and redistribute it. diff --git a/src/psensor.schemas b/src/psensor.schemas new file mode 100644 index 0000000..177ee17 --- /dev/null +++ b/src/psensor.schemas @@ -0,0 +1,274 @@ + + + + + + + + + + + + + + + + + + + + + /schemas/apps/psensor/graph/alpha_channel_enabled + /apps/psensor/graph/alpha_channel_enabled + psensor + bool + false + + Whether the alpha channel is enabled + + Whether the alpha channel is enabled. Must be enabled for changing + the transparency of the background of the graph window. + + + + + + /schemas/apps/psensor/graph/background_alpha + /apps/psensor/graph/background_alpha + psensor + float + 1 + + The alpha value of the background of the graph window + + The alpha value of the background of the graph window. It must + be a positive float between 0 and 1. '1' is the maximum opacity. + + + + + + /schemas/apps/psensor/graph/background_color + /apps/psensor/graph/background_color + psensor + string + #e8f4e8f4a8f5 + + The color of the background of the graph canvas + + The color of the background of the graph canvas as a #rgb + representation. + + + + + + /schemas/apps/psensor/graph/foreground_color + /apps/psensor/graph/foreground_color + psensor + string + #000000000000 + + The color of the foreground of the graph canvas + + The color of the foreground of the graph canvas as a #rgb + representation. + + + + + + /schemas/apps/psensor/graph/monitoring_duration + /apps/psensor/graph/monitoring_duration + psensor + int + 10 + + The monitoring duration of the graph + + The monitoring duration of the graph as minutes. It must + be greater than 1. + + + + + + /schemas/apps/psensor/graph/update_interval + /apps/psensor/graph/update_interval + psensor + int + 1 + + The interval between refreshs of the graph + + The interval between refreshs of the graph as seconds. It + must be greater than 1. + + + + + + + + /schemas/apps/psensor/interface/hide_on_startup + /apps/psensor/interface/hide_on_startup + psensor + bool + false + + Whether the graph window is hidden on startup + + Whether the graph window is hidden on startup. The graph + will be hidden only if the Ubuntu Application Indicator or + status icon support is available. + + + + + + /schemas/apps/psensor/interface/menu_bar_disabled + /apps/psensor/interface/menu_bar_disabled + psensor + bool + false + + Whether the menu of the graph window is disabled + + Whether the menu of the graph window is disabled + + + + + + /schemas/apps/psensor/interface/sensorlist_position + /apps/psensor/interface/sensorlist_position + psensor + int + 0 + + Position of the sensor list in the graph window + Position of the sensor list in the graph + window. Possible values are 0 (right), 1 (left), 2 (top), 3 + (bottom). + + + + + /schemas/apps/psensor/interface/unity_launcher_count_disabled + /apps/psensor/interface/unity_launcher_count_disabled + psensor + bool + false + + Whether the greatest temperature is displayed in Unity + launcher + If set to 'true' the greatest temperature will be + displayed in the Unity launcher. + + + + + /schemas/apps/psensor/interface/temperature_unit + /apps/psensor/interface/temperature_unit + psensor + int + 0 + + The displayed temperature unit + The displayed temperature unit, '0' for Celcius, '1' for Fahenrenheit. + + + + + /schemas/apps/psensor/interface/window_decoration_disabled + /apps/psensor/interface/window_decoration_disabled + psensor + int + 0 + + Whether the decoration of the window is disabled + Whether the decoration of the window is disabled. + + + + + /schemas/apps/psensor/interface/window_keep_below_enabled + /apps/psensor/interface/window_keep_below_enabled + psensor + bool + false + + Whether the graph window is kept below all other windows + Whether the graph window is kept below all other windows. + + + + + /schemas/apps/psensor/interface/window_restore_enabled + /apps/psensor/interface/window_restore_enabled + psensor + bool + false + + Whether the position and size of the graph window are restored + Whether the position and size of the graph window are restored + + + + + /schemas/apps/psensor/interface/window_divider_pos + /apps/psensor/interface/window_divider_pos + psensor + int + + Position of the divider between the graph window and the list of sensors + Position of the divider between the graph window and the list of sensors + + + + + /schemas/apps/psensor/interface/window_w + /apps/psensor/interface/window_w + psensor + int + + Width of the graph window + Width of the graph window. + + + + + /schemas/apps/psensor/interface/window_h + /apps/psensor/interface/window_h + psensor + int + + Height of the graph window + Height of the graph window. + + + + + /schemas/apps/psensor/interface/window_x + /apps/psensor/interface/window_x + psensor + int + + Horizontal position of the graph window + Horizontal position of the graph window. + + + + + /schemas/apps/psensor/interface/window_y + /apps/psensor/interface/window_y + psensor + int + + Vertical position of the graph window + Vertical position of the graph window. + + + + + diff --git a/src/rsensor.c b/src/rsensor.c index fbf6d2b..9bebb7a 100644 --- a/src/rsensor.c +++ b/src/rsensor.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 jeanfi@gmail.com + * Copyright (C) 2010-2013 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -55,17 +55,17 @@ static size_t cbk_curl(void *buffer, size_t size, size_t nmemb, void *userp) return realsize; } -static char *create_api_1_0_sensors_url(const char *base_url) +static char *create_api_1_1_sensors_url(const char *base_url) { char *nurl, *ret; int n; nurl = url_normalize(base_url); - n = strlen(nurl) + strlen(URL_BASE_API_1_0_SENSORS) + 1; + n = strlen(nurl) + strlen(URL_BASE_API_1_1_SENSORS) + 1; ret = malloc(n); strcpy(ret, nurl); - strcat(ret, URL_BASE_API_1_0_SENSORS); + strcat(ret, URL_BASE_API_1_1_SENSORS); free(nurl); @@ -121,7 +121,7 @@ struct psensor **get_remote_sensors(const char *server_url, sensors = NULL; - url = create_api_1_0_sensors_url(server_url); + url = create_api_1_1_sensors_url(server_url); obj = get_json_object(url); diff --git a/src/rsensor.h b/src/rsensor.h index 8567177..312f4a1 100644 --- a/src/rsensor.h +++ b/src/rsensor.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 jeanfi@gmail.com + * Copyright (C) 2010-2013 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as diff --git a/src/server/Makefile.am b/src/server/Makefile.am index d9817d7..0697e58 100644 --- a/src/server/Makefile.am +++ b/src/server/Makefile.am @@ -14,7 +14,8 @@ LIBS = \ ../lib/libpsensor.a \ $(SENSORS_LIBS) \ $(JSON_LIBS) \ - $(LIBMICROHTTPD_LIBS) + $(LIBMICROHTTPD_LIBS) \ + $(PTHREAD_LIBS) if GTOP AM_CPPFLAGS += $(GTOP_CFLAGS) @@ -23,8 +24,13 @@ AM_LDFLAGS = -Wl,--as-needed psensor_server_SOURCES += sysinfo.h sysinfo.c endif +if ATASMART +AM_CPPFLAGS += $(ATASMART_CFLAGS) +LIBS += $(ATASMART_LIBS) +endif + dist_man_MANS = psensor-server.1 EXTRA_DIST = description.txt psensor-server.1: server.c $(top_srcdir)/configure.ac $(MAKE) $(AM_MAKEFLAGS) psensor-server$(EXEEXT) - help2man --include=description.txt -N --name="Temperature and system monitoring Web server" --output=psensor-server.1 ./psensor-server$(EXEEXT) \ No newline at end of file + help2man --include=description.txt -N --name="Temperature and system monitoring Web server" --output=psensor-server.1 ./psensor-server$(EXEEXT) diff --git a/src/server/Makefile.in b/src/server/Makefile.in index d95868a..0e05ef3 100644 --- a/src/server/Makefile.in +++ b/src/server/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +16,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -38,6 +55,8 @@ bin_PROGRAMS = psensor-server$(EXEEXT) @GTOP_TRUE@am__append_1 = $(GTOP_CFLAGS) @GTOP_TRUE@am__append_2 = $(GTOP_LIBS) @GTOP_TRUE@am__append_3 = sysinfo.h sysinfo.c +@ATASMART_TRUE@am__append_4 = $(ATASMART_CFLAGS) +@ATASMART_TRUE@am__append_5 = $(ATASMART_LIBS) subdir = src/server DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in @@ -67,6 +86,11 @@ CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(psensor_server_SOURCES) DIST_SOURCES = $(am__psensor_server_SOURCES_DIST) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -88,6 +112,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } man1dir = $(mandir)/man1 NROFF = nroff MANS = $(dist_man_MANS) @@ -98,6 +128,9 @@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ APPINDICATOR_CFLAGS = @APPINDICATOR_CFLAGS@ APPINDICATOR_LIBS = @APPINDICATOR_LIBS@ +AR = @AR@ +ATASMART_CFLAGS = @ATASMART_CFLAGS@ +ATASMART_LIBS = @ATASMART_LIBS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -117,8 +150,11 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +GCONFTOOL = @GCONFTOOL@ GCONF_CFLAGS = @GCONF_CFLAGS@ GCONF_LIBS = @GCONF_LIBS@ +GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ +GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ @@ -127,6 +163,7 @@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ GTOP_CFLAGS = @GTOP_CFLAGS@ GTOP_LIBS = @GTOP_LIBS@ +HAVE_CPPCHECK = @HAVE_CPPCHECK@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -148,7 +185,8 @@ LIBNOTIFY_CFLAGS = @LIBNOTIFY_CFLAGS@ LIBNOTIFY_LIBS = @LIBNOTIFY_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = ../lib/libpsensor.a $(SENSORS_LIBS) $(JSON_LIBS) \ - $(LIBMICROHTTPD_LIBS) $(am__append_2) + $(LIBMICROHTTPD_LIBS) $(PTHREAD_LIBS) $(am__append_2) \ + $(am__append_5) LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ @@ -172,6 +210,7 @@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ +PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SENSORS_LIBS = @SENSORS_LIBS@ SET_MAKE = @SET_MAKE@ @@ -193,6 +232,7 @@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ @@ -242,7 +282,8 @@ top_srcdir = @top_srcdir@ psensor_server_SOURCES = server.c server.h $(am__append_3) AM_CPPFLAGS = -Wall -Werror -DDEFAULT_WWW_DIR=\""$(pkgdatadir)/www"\" \ -I$(top_srcdir)/src -I$(top_srcdir)/src/lib $(SENSORS_CFLAGS) \ - $(JSON_CFLAGS) $(LIBMICROHTTPD_CFLAGS) $(am__append_1) + $(JSON_CFLAGS) $(LIBMICROHTTPD_CFLAGS) $(am__append_1) \ + $(am__append_4) @GTOP_TRUE@AM_LDFLAGS = -Wl,--as-needed dist_man_MANS = psensor-server.1 EXTRA_DIST = description.txt @@ -282,8 +323,11 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p; \ @@ -317,7 +361,7 @@ uninstall-binPROGRAMS: clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) -psensor-server$(EXEEXT): $(psensor_server_OBJECTS) $(psensor_server_DEPENDENCIES) +psensor-server$(EXEEXT): $(psensor_server_OBJECTS) $(psensor_server_DEPENDENCIES) $(EXTRA_psensor_server_DEPENDENCIES) @rm -f psensor-server$(EXEEXT) $(LINK) $(psensor_server_OBJECTS) $(psensor_server_LDADD) $(LIBS) @@ -345,11 +389,18 @@ distclean-compile: @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` install-man1: $(dist_man_MANS) @$(NORMAL_INSTALL) - test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" - @list=''; test -n "$(man1dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ - l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.1[a-z]*$$/p'; \ + @list1=''; \ + list2='$(dist_man_MANS)'; \ + test -n "$(man1dir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.1[a-z]*$$/p'; \ + fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ @@ -378,9 +429,7 @@ uninstall-man1: sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } + dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ @@ -494,10 +543,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/server/description.txt b/src/server/description.txt index 11e65fb..744dc8c 100644 --- a/src/server/description.txt +++ b/src/server/description.txt @@ -47,9 +47,53 @@ Fields of the type 'sensor': The URL http://hostname:3131/api/1.0/sensors returns a JSON array containing all JSON objects of type 'sensor'. -If run in debug mode, psensor\-server can be stopped by sending an HTTP +psensor\-server can be stopped by sending an HTTP request with the URL 'http://hostname:port/api/1.0/server/stop'. +[SENSOR LOG FILE] + +Sensors can be logged using the \-\-sensor-log-file option. + +It is using a text format, each line is terminated with a NEWLINE +char. + +The first line is: I,%D,%V + +%D is the starting time of the log expressed as the number of seconds +since EPOC. + +%V is the version of psensor-server. + +Following lines gives the ordered list of sensors: S,%I,%T + +%I is the uniq identifier of the sensor. + +%T is the hexadecimal representation of the sensor type. + +Then, the values of all sensors are written: %D,%V... + +%D is the number of seconds elapsed since the starting time of the +log. + +%V... is the list separated by a comma of the current value of all +sensors. The ordering is the same than the list of sensor identifiers. + +The value is expressed as a float with one digit precision. Temperatures +are using Celcius unit. + +The value is written only if it has changed. + +Example: +I,1345974927,0.7.0.4 +S,lmsensor coretemp-isa-0000 Physical id 0,101 +S,lmsensor coretemp-isa-0000 Core 0,101 +S,lmsensor coretemp-isa-0000 Core 1,101 +0,37.0,37.0,36.0 +5,36.0,,36.0 + +Five seconds after the log starts, the temperature of the second +sensor (Core 0) is still 37C. + [WARNING] psensor\-server does not provide any way to restrict the connection to diff --git a/src/server/psensor-server.1 b/src/server/psensor-server.1 index c5f751d..bab3d19 100644 --- a/src/server/psensor-server.1 +++ b/src/server/psensor-server.1 @@ -1,5 +1,5 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.40.4. -.TH PSENSOR-SERVER "1" "March 2012" "psensor-server 0.6.2.17" "User Commands" +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3. +.TH PSENSOR-SERVER "1" "October 2013" "psensor-server 0.8.0.4" "User Commands" .SH NAME psensor-server \- Temperature and system monitoring Web server .SH SYNOPSIS @@ -56,7 +56,7 @@ Fields of the type 'sensor': The URL http://hostname:3131/api/1.0/sensors returns a JSON array containing all JSON objects of type 'sensor'. -If run in debug mode, psensor\-server can be stopped by sending an HTTP +psensor\-server can be stopped by sending an HTTP request with the URL 'http://hostname:port/api/1.0/server/stop'. .SH OPTIONS .TP @@ -66,14 +66,64 @@ display this help and exit \fB\-v\fR, \fB\-\-version\fR display version information and exit .TP -\fB\-d\fR,\-\-debug -run in debug mode -.TP \fB\-p\fR,\-\-port=PORT webserver port .TP \fB\-w\fR,\-\-wdir=DIR directory containing webserver pages +.TP +\fB\-d\fR, \fB\-\-debug\fR=\fILEVEL\fR +set the debug level, integer between 0 and 3 +.TP +\fB\-l\fR, \fB\-\-log\-file\fR=\fIPATH\fR +set the log file to PATH +.HP +\fB\-\-sensor\-log\-file\fR=\fIPATH\fR set the sensor log file to PATH +.HP +\fB\-\-sensor\-log\-interval\fR=\fIS\fR set the sensor log interval to S (seconds) +.SH "SENSOR LOG FILE" + +Sensors can be logged using the \-\-sensor-log-file option. + +It is using a text format, each line is terminated with a NEWLINE +char. + +The first line is: I,%D,%V + +%D is the starting time of the log expressed as the number of seconds +since EPOC. + +%V is the version of psensor-server. + +Following lines gives the ordered list of sensors: S,%I,%T + +%I is the uniq identifier of the sensor. + +%T is the hexadecimal representation of the sensor type. + +Then, the values of all sensors are written: %D,%V... + +%D is the number of seconds elapsed since the starting time of the +log. + +%V... is the list separated by a comma of the current value of all +sensors. The ordering is the same than the list of sensor identifiers. + +The value is expressed as a float with one digit precision. Temperatures +are using Celcius unit. + +The value is written only if it has changed. + +Example: +I,1345974927,0.7.0.4 +S,lmsensor coretemp-isa-0000 Physical id 0,101 +S,lmsensor coretemp-isa-0000 Core 0,101 +S,lmsensor coretemp-isa-0000 Core 1,101 +0,37.0,37.0,36.0 +5,36.0,,36.0 + +Five seconds after the log starts, the temperature of the second +sensor (Core 0) is still 37C. .SH WARNING psensor\-server does not provide any way to restrict the connection to diff --git a/src/server/server.c b/src/server/server.c index c9492cb..39e1f49 100644 --- a/src/server/server.c +++ b/src/server/server.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 jeanfi@gmail.com + * Copyright (C) 2010-2013 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -16,12 +16,13 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301 USA */ +#define _LARGEFILE_SOURCE 1 +#include "config.h" + #include #include #define _(str) gettext(str) -#include "config.h" - #include #include #include @@ -41,14 +42,20 @@ #include "cpu.h" #endif +#include "log.h" #include "psensor_json.h" #include "url.h" -#include "p_io.h" #include "server.h" +#include "slog.h" + +static const char *DEFAULT_LOG_FILE = "/var/log/psensor-server.log"; + +#define HTML_STOP_REQUESTED \ +(_("

Server stop requested

")) static const char *program_name; -#define DEFAULT_PORT 3131 +static const int DEFAULT_PORT = 3131; #define PAGE_NOT_FOUND (_("

"\ "Page not found - Go to Main page

")) @@ -58,7 +65,10 @@ static struct option long_options[] = { {"help", no_argument, 0, 'h'}, {"port", required_argument, 0, 'p'}, {"wdir", required_argument, 0, 'w'}, - {"debug", no_argument, 0, 'd'}, + {"debug", required_argument, 0, 'd'}, + {"log-file", required_argument, 0, 'l'}, + {"sensor-log-file", required_argument, 0, 0}, + {"sensor-log-interval", required_argument, 0, 0}, {0, 0, 0, 0} }; @@ -66,11 +76,9 @@ static struct server_data server_data; static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; -static int debug; - static int server_stop_requested; -void print_version() +static void print_version() { printf("psensor-server %s\n", VERSION); printf(_("Copyright (C) %s jeanfi@gmail.com\n" @@ -81,12 +89,12 @@ void print_version() "2010-2012"); } -void print_help() +static void print_help() { printf(_("Usage: %s [OPTION]...\n"), program_name); - puts(_("psensor-server is an HTTP server " - "for monitoring hardware sensors remotely.")); + puts(_("psensor-server is an HTTP server for monitoring hardware " + "sensors remotely.")); puts(""); puts("Options:"); @@ -94,22 +102,27 @@ void print_help() " -v, --version display version information and exit")); puts(""); - - puts(_(" -d,--debug run in debug mode\n" - " -p,--port=PORT webserver port\n" + puts(_(" -p,--port=PORT webserver port\n" " -w,--wdir=DIR directory containing webserver pages")); puts(""); + puts(_(" -d, --debug=LEVEL " + "set the debug level, integer between 0 and 3")); + puts(_(" -l, --log-file=PATH set the log file to PATH")); + puts(_(" --sensor-log-file=PATH set the sensor log file to PATH")); + puts(_(" --sensor-log-interval=S " + "set the sensor log interval to S (seconds)")); + puts(""); printf(_("Report bugs to: %s\n"), PACKAGE_BUGREPORT); puts(""); printf(_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL); } /* - Returns the file path corresponding to a given URL -*/ -char *get_path(const char *url, const char *www_dir) + * Returns the file path corresponding to a given URL + */ +static char *get_path(const char *url, const char *www_dir) { const char *p; char *res; @@ -137,43 +150,40 @@ file_reader(void *cls, uint64_t pos, char *buf, int max) { FILE *file = cls; - fseek(file, pos, SEEK_SET); + fseeko(file, pos, SEEK_SET); return fread(buf, 1, max, file); } -struct MHD_Response * -create_response_api(const char *nurl, - const char *method, - unsigned int *rp_code) +static struct MHD_Response * +create_response_api(const char *nurl, const char *method, unsigned int *rp_code) { struct MHD_Response *resp; struct psensor *s; char *page = NULL; - if (!strcmp(nurl, URL_BASE_API_1_0_SENSORS)) { + if (!strcmp(nurl, URL_BASE_API_1_1_SENSORS)) { page = sensors_to_json_string(server_data.sensors); #ifdef HAVE_GTOP - } else if (!strcmp(nurl, URL_API_1_0_SYSINFO)) { + } else if (!strcmp(nurl, URL_API_1_1_SYSINFO)) { page = sysinfo_to_json_string(&server_data.psysinfo); - } else if (!strcmp(nurl, URL_API_1_0_CPU_USAGE)) { + } else if (!strcmp(nurl, URL_API_1_1_CPU_USAGE)) { page = sensor_to_json_string(server_data.cpu_usage); #endif - } else if (!strncmp(nurl, URL_BASE_API_1_0_SENSORS, - strlen(URL_BASE_API_1_0_SENSORS)) - && nurl[strlen(URL_BASE_API_1_0_SENSORS)] == '/') { + } else if (!strncmp(nurl, URL_BASE_API_1_1_SENSORS, + strlen(URL_BASE_API_1_1_SENSORS)) + && nurl[strlen(URL_BASE_API_1_1_SENSORS)] == '/') { - const char *sid = nurl + strlen(URL_BASE_API_1_0_SENSORS) + 1; + const char *sid = nurl + strlen(URL_BASE_API_1_1_SENSORS) + 1; s = psensor_list_get_by_id(server_data.sensors, sid); if (s) page = sensor_to_json_string(s); - } else if (debug && !strcmp(nurl, URL_API_1_0_SERVER_STOP)) { + } else if (!strcmp(nurl, URL_API_1_1_SERVER_STOP)) { server_stop_requested = 1; - page = strdup(_("

" - "Server stop requested

")); + page = strdup(HTML_STOP_REQUESTED); } if (page) { @@ -191,11 +201,10 @@ create_response_api(const char *nurl, return NULL; } -struct MHD_Response * -create_response_file(const char *nurl, - const char *method, - unsigned int *rp_code, - const char *fpath) +static struct MHD_Response *create_response_file(const char *nurl, + const char *method, + unsigned int *rp_code, + const char *fpath) { struct stat st; int ret; @@ -223,19 +232,19 @@ create_response_file(const char *nurl, (MHD_ContentReaderFreeCallback)&fclose); } else { - log_printf(LOG_ERR, "Failed to open: %s\n", fpath); + log_err("Failed to open: %s.", fpath); } } return NULL; } -struct MHD_Response * +static struct MHD_Response * create_response(const char *nurl, const char *method, unsigned int *rp_code) { struct MHD_Response *resp = NULL; - if (!strncmp(nurl, URL_BASE_API_1_0, strlen(URL_BASE_API_1_0))) { + if (!strncmp(nurl, URL_BASE_API_1_1, strlen(URL_BASE_API_1_1))) { resp = create_response_api(nurl, method, rp_code); } else { char *fpath = get_path(nurl, server_data.www_dir); @@ -256,14 +265,13 @@ create_response(const char *nurl, const char *method, unsigned int *rp_code) } } -static int -cbk_http_request(void *cls, - struct MHD_Connection *connection, - const char *url, - const char *method, - const char *version, - const char *upload_data, - size_t *upload_data_size, void **ptr) +static int cbk_http_request(void *cls, + struct MHD_Connection *connection, + const char *url, + const char *method, + const char *version, + const char *upload_data, + size_t *upload_data_size, void **ptr) { static int dummy; struct MHD_Response *response; @@ -286,8 +294,7 @@ cbk_http_request(void *cls, *ptr = NULL; /* clear context pointer */ - if (debug) - printf(_("HTTP Request: %s\n"), url); + log_debug(_("HTTP Request: %s"), url); nurl = url_normalize(url); @@ -306,9 +313,8 @@ cbk_http_request(void *cls, int main(int argc, char *argv[]) { struct MHD_Daemon *d; - int port = DEFAULT_PORT; - int optc; - int cmdok = 1; + int port, opti, optc, cmdok, ret, slog_interval; + char *log_file, *slog_file; program_name = argv[0]; @@ -319,11 +325,21 @@ int main(int argc, char *argv[]) textdomain(PACKAGE); #endif - server_data.www_dir = DEFAULT_WWW_DIR; + server_data.www_dir = NULL; +#ifdef HAVE_GTOP server_data.psysinfo.interfaces = NULL; - - while ((optc = getopt_long(argc, argv, - "vhp:w:d", long_options, NULL)) != -1) { +#endif + log_file = NULL; + slog_file = NULL; + slog_interval = 300; + port = DEFAULT_PORT; + cmdok = 1; + + while ((optc = getopt_long(argc, + argv, + "vhp:w:d:l:", + long_options, + &opti)) != -1) { switch (optc) { case 'w': if (optarg) @@ -340,7 +356,19 @@ int main(int argc, char *argv[]) print_version(); exit(EXIT_SUCCESS); case 'd': - debug = 1; + log_level = atoi(optarg); + log_info(_("Enables debug mode: %d"), log_level); + break; + case 'l': + if (optarg) + log_file = strdup(optarg); + break; + case 0: + if (!strcmp(long_options[opti].name, "sensor-log-file")) + slog_file = strdup(optarg); + else if (!strcmp(long_options[opti].name, + "sensor-log-interval")) + slog_interval = atoi(optarg); break; default: cmdok = 0; @@ -354,29 +382,48 @@ int main(int argc, char *argv[]) exit(EXIT_FAILURE); } + if (!server_data.www_dir) + server_data.www_dir = strdup(DEFAULT_WWW_DIR); + + if (!log_file) + log_file = strdup(DEFAULT_LOG_FILE); + + log_open(log_file); + psensor_init(); - server_data.sensors = get_all_sensors(600); + server_data.sensors = get_all_sensors(0, 600); #ifdef HAVE_GTOP server_data.cpu_usage = create_cpu_usage_sensor(600); #endif if (!*server_data.sensors) - fprintf(stderr, _("ERROR: no sensors detected\n")); + log_err(_("No sensors detected.")); d = MHD_start_daemon(MHD_USE_THREAD_PER_CONNECTION, port, NULL, NULL, &cbk_http_request, server_data.sensors, MHD_OPTION_END); if (!d) { - fprintf(stderr, _("ERROR: Fail to create web server\n")); + log_err(_("Failed to create Web server.")); exit(EXIT_FAILURE); } - log_printf(LOG_INFO, _("Web server started on port: %d"), port); - log_printf(LOG_INFO, _("WWW directory: %s"), server_data.www_dir); - log_printf(LOG_INFO, _("URL: http://localhost:%d"), port); + log_info(_("Web server started on port: %d"), port); + log_info(_("WWW directory: %s"), server_data.www_dir); + log_info(_("URL: http://localhost:%d"), port); + + if (slog_file) { + if (slog_interval <= 0) + slog_interval = 300; + ret = slog_activate(slog_file, + server_data.sensors, + &mutex, + slog_interval); + if (!ret) + log_err(_("Failed to activate logging of sensors.")); + } while (!server_stop_requested) { pthread_mutex_lock(&mutex); @@ -387,10 +434,14 @@ int main(int argc, char *argv[]) #endif psensor_list_update_measures(server_data.sensors); + psensor_log_measures(server_data.sensors); + pthread_mutex_unlock(&mutex); sleep(5); } + slog_close(); + MHD_stop_daemon(d); /* sanity cleanup for valgrind */ @@ -406,5 +457,8 @@ int main(int argc, char *argv[]) cpu_cleanup(); #endif + if (log_file != DEFAULT_LOG_FILE) + free(log_file); + return EXIT_SUCCESS; } diff --git a/src/server/server.h b/src/server/server.h index 9125e7c..8ce56c2 100644 --- a/src/server/server.h +++ b/src/server/server.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 jeanfi@gmail.com + * Copyright (C) 2010-2013 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -19,19 +19,26 @@ #ifndef _PSENSOR_SERVER_H_ #define _PSENSOR_SERVER_H_ +#include "config.h" + #include "psensor.h" + +#ifdef HAVE_GTOP #include "sysinfo.h" +#endif -#define URL_BASE_API_1_0 "/api/1.0" -#define URL_BASE_API_1_0_SENSORS "/api/1.0/sensors" -#define URL_API_1_0_SERVER_STOP "/api/1.0/server/stop" -#define URL_API_1_0_SYSINFO "/api/1.0/sysinfo" -#define URL_API_1_0_CPU_USAGE "/api/1.0/cpu/usage" +#define URL_BASE_API_1_1 "/api/1.1" +#define URL_BASE_API_1_1_SENSORS "/api/1.1/sensors" +#define URL_API_1_1_SERVER_STOP "/api/1.1/server/stop" +#define URL_API_1_1_SYSINFO "/api/1.1/sysinfo" +#define URL_API_1_1_CPU_USAGE "/api/1.1/cpu/usage" struct server_data { struct psensor *cpu_usage; struct psensor **sensors; +#ifdef HAVE_GTOP struct psysinfo psysinfo; +#endif char *www_dir; }; diff --git a/src/server/sysinfo.c b/src/server/sysinfo.c index b256b0d..81d793e 100644 --- a/src/server/sysinfo.c +++ b/src/server/sysinfo.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 jeanfi@gmail.com + * Copyright (C) 2010-2013 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -21,7 +21,13 @@ #include #include +#include "config.h" + +#ifdef HAVE_JSON_0 #include +#else +#include +#endif #include "sysinfo.h" @@ -64,7 +70,7 @@ void sysinfo_update(struct psysinfo *info) void sysinfo_cleanup() { if (cpu) - free(cpu); + g_free(cpu); } static json_object *ram_to_json_object(const struct psysinfo *s) diff --git a/src/server/sysinfo.h b/src/server/sysinfo.h index ecc054b..491cb91 100644 --- a/src/server/sysinfo.h +++ b/src/server/sysinfo.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 jeanfi@gmail.com + * Copyright (C) 2010-2013 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as diff --git a/src/ui.c b/src/ui.c index 6d1b509..53aa4fb 100644 --- a/src/ui.c +++ b/src/ui.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 jeanfi@gmail.com + * Copyright (C) 2010-2013 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -16,7 +16,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301 USA */ +#include + #include "cfg.h" +#include "slog.h" #include "ui.h" #include "ui_graph.h" #include "ui_pref.h" @@ -75,37 +78,38 @@ on_delete_event_cb(GtkWidget *widget, GdkEvent *event, gpointer data) void ui_show_about_dialog() { - gtk_show_about_dialog(NULL, - "comments", - _("Psensor is a GTK+ application for monitoring " - "hardware sensors"), - "copyright", - _("Copyright(c) 2010-2012\njeanfi@gmail.com"), - "logo-icon-name", "psensor", - "program-name", "Psensor", - "title", _("About Psensor"), - "version", VERSION, - "website", PACKAGE_URL, - "website-label", _("Psensor Homepage"), - NULL); + gtk_show_about_dialog + (NULL, + "comments", + _("Psensor is a GTK+ application for monitoring hardware " + "sensors"), + "copyright", + _("Copyright(c) 2010-2013\njeanfi@gmail.com"), + "logo-icon-name", "psensor", + "program-name", "Psensor", + "title", _("About Psensor"), + "version", VERSION, + "website", PACKAGE_URL, + "website-label", _("Psensor Homepage"), + NULL); } -static void cb_about(GtkMenuItem *mi, gpointer data) +void ui_cb_about(GtkMenuItem *mi, gpointer data) { ui_show_about_dialog(); } -static void cb_menu_quit(GtkMenuItem *mi, gpointer data) +void ui_cb_menu_quit(GtkMenuItem *mi, gpointer data) { ui_psensor_quit((struct ui_psensor *)data); } -static void cb_preferences(GtkMenuItem *mi, gpointer data) +void ui_cb_preferences(GtkMenuItem *mi, gpointer data) { ui_pref_dialog_run((struct ui_psensor *)data); } -static void cb_sensor_preferences(GtkMenuItem *mi, gpointer data) +void ui_cb_sensor_preferences(GtkMenuItem *mi, gpointer data) { struct ui_psensor *ui = data; @@ -122,130 +126,95 @@ void ui_psensor_quit(struct ui_psensor *ui) gtk_main_quit(); } -static const char *menu_desc = -"" -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -""; - -static GtkActionEntry entries[] = { - { "PsensorMenuAction", NULL, "_Psensor" }, - - { "PreferencesAction", GTK_STOCK_PREFERENCES, - N_("_Preferences"), NULL, - N_("Preferences"), - G_CALLBACK(cb_preferences) }, - - { "SensorPreferencesAction", GTK_STOCK_PREFERENCES, - N_("_Sensor Preferences"), NULL, - N_("Sensor Preferences"), - G_CALLBACK(cb_sensor_preferences) }, - - { "QuitAction", - GTK_STOCK_QUIT, N_("_Quit"), NULL, N_("Quit"), - G_CALLBACK(cb_menu_quit) }, - - { "HelpMenuAction", NULL, "_Help" }, - - { "AboutAction", GTK_STOCK_PREFERENCES, - N_("_About"), NULL, - N_("About"), - G_CALLBACK(cb_about) } -}; -static guint n_entries = G_N_ELEMENTS(entries); - -static GtkWidget *get_menu(struct ui_psensor *ui) +void ui_enable_alpha_channel(struct ui_psensor *ui) { - GtkActionGroup *action_group; - GtkUIManager *menu_manager; - GError *error; - - action_group = gtk_action_group_new("PsensorActions"); - gtk_action_group_set_translation_domain(action_group, PACKAGE); - menu_manager = gtk_ui_manager_new(); - - gtk_action_group_add_actions(action_group, entries, n_entries, ui); - gtk_ui_manager_insert_action_group(menu_manager, action_group, 0); + GdkScreen *screen; + GdkVisual *visual; + struct config *cfg; - error = NULL; - gtk_ui_manager_add_ui_from_string(menu_manager, menu_desc, -1, &error); + cfg = ui->config; - if (error) - g_error(_("building menus failed: %s"), error->message); + screen = gtk_widget_get_screen(ui->main_window); - return gtk_ui_manager_get_widget(menu_manager, "/MainMenu"); + log_debug("Config alpha channel enabled: %d", + cfg->alpha_channel_enabled); + if (cfg->alpha_channel_enabled && gdk_screen_is_composited(screen)) { + log_debug("Screen is composited"); + visual = gdk_screen_get_rgba_visual(screen); + if (visual) { + gtk_widget_set_visual(ui->main_window, visual); + } else { + cfg->alpha_channel_enabled = 0; + log_err("Enable alpha channel has failed"); + } + } else { + cfg->alpha_channel_enabled = 0; + } } -static unsigned int enable_alpha_channel(GtkWidget *w) +static void +slog_enabled_cbk(GConfClient *client, guint id, GConfEntry *e, gpointer data) { - GdkScreen *screen = gtk_widget_get_screen(w); + struct ui_psensor *ui; + struct psensor **sensors; + pthread_mutex_t *mutex; -#if (GTK_CHECK_VERSION(3, 0, 0)) - GdkVisual *visual = gdk_screen_get_rgba_visual(screen); + ui = (struct ui_psensor *)data; + sensors = ui->sensors; + mutex = &ui->sensors_mutex; - if (visual) { - gtk_widget_set_visual(w, visual); - return 1; - } -#else - GdkColormap *colormap = gdk_screen_get_rgba_colormap(screen); + log_debug("slog_enabled_cbk"); - if (colormap) { - gtk_widget_set_colormap(w, colormap); - return 1; - } -#endif - return 0; + if (is_slog_enabled()) + slog_activate(NULL, sensors, mutex, config_get_slog_interval()); + else + slog_close(); } void ui_window_create(struct ui_psensor *ui) { - GtkWidget *window, *menubar; - GdkScreen *screen; + GtkWidget *window; GdkPixbuf *icon; GtkIconTheme *icon_theme; struct config *cfg; + guint ok; + GtkBuilder *builder; + GError *error; - window = gtk_window_new(GTK_WINDOW_TOPLEVEL); + builder = gtk_builder_new(); + + error = NULL; + ok = gtk_builder_add_from_file + (builder, + PACKAGE_DATA_DIR G_DIR_SEPARATOR_S "psensor.glade", + &error); + + if (!ok) { + log_printf(LOG_ERR, error->message); + g_error_free(error); + return ; + } + window = GTK_WIDGET(gtk_builder_get_object(builder, "window")); + gtk_builder_connect_signals(builder, ui); cfg = ui->config; if (cfg->window_restore_enabled) gtk_window_move(GTK_WINDOW(window), cfg->window_x, cfg->window_y); + config_slog_enabled_notify_add(slog_enabled_cbk, ui); + gtk_window_set_default_size(GTK_WINDOW(window), cfg->window_w, cfg->window_h); - gtk_window_set_title(GTK_WINDOW(window), - _("Psensor - Temperature Monitor")); - gtk_window_set_role(GTK_WINDOW(window), "psensor"); - - screen = gtk_widget_get_screen(window); - - if (cfg->alpha_channel_enabled && gdk_screen_is_composited(screen)) { - if (!enable_alpha_channel(window)) - cfg->alpha_channel_enabled = 0; - } else { - cfg->alpha_channel_enabled = 0; - } - icon_theme = gtk_icon_theme_get_default(); icon = gtk_icon_theme_load_icon(icon_theme, "psensor", 48, 0, NULL); if (icon) gtk_window_set_icon(GTK_WINDOW(window), icon); else - fprintf(stderr, _("ERROR: Failed to load psensor icon.\n")); + log_err(_("Failed to load Psensor icon.")); g_signal_connect(window, "delete_event", G_CALLBACK(on_delete_event_cb), ui); @@ -256,20 +225,34 @@ void ui_window_create(struct ui_psensor *ui) gtk_window_set_keep_below(GTK_WINDOW(window), cfg->window_keep_below_enabled); - /* main box */ - menubar = get_menu(ui); - - ui->main_box = gtk_vbox_new(FALSE, 1); - - gtk_box_pack_start(GTK_BOX(ui->main_box), menubar, - FALSE, TRUE, 0); - - gtk_container_add(GTK_CONTAINER(window), ui->main_box); - + ui->menu_bar = GTK_WIDGET(gtk_builder_get_object(builder, "menu_bar")); + ui->main_box = GTK_WIDGET(gtk_builder_get_object(builder, "main_box")); + ui->popup_menu = GTK_WIDGET(gtk_builder_get_object(builder, + "popup_menu")); + g_object_ref(G_OBJECT(ui->popup_menu)); ui->main_window = window; - ui->menu_bar = menubar; - + ui->w_graph = GTK_WIDGET(gtk_builder_get_object(builder, + "graph")); + ui_graph_create(ui); + + ui->sensor_box = GTK_PANED(gtk_builder_get_object(builder, + "sensor_box")); + ui->sensors_store = GTK_LIST_STORE(gtk_builder_get_object + (builder, "sensors_store")); + ui->sensors_tree = GTK_TREE_VIEW(gtk_builder_get_object + (builder, "sensors_tree")); + ui->sensors_scrolled_tree + = GTK_SCROLLED_WINDOW(gtk_builder_get_object + (builder, "sensors_scrolled_tree")); + + ui_sensorlist_create(ui); + + log_debug("ui_window_create(): show_all"); gtk_widget_show_all(ui->main_box); + + g_object_unref(G_OBJECT(builder)); + + log_debug("ui_window_create() ends"); } static void menu_bar_show(unsigned int show, struct ui_psensor *ui) @@ -283,53 +266,55 @@ static void menu_bar_show(unsigned int show, struct ui_psensor *ui) void ui_window_update(struct ui_psensor *ui) { struct config *cfg; - int init = 1; - cfg = ui->config; + log_debug("ui_window_update()"); - if (ui->sensor_box) { - g_object_ref(GTK_WIDGET(ui->ui_sensorlist->widget)); + cfg = ui->config; - gtk_container_remove(GTK_CONTAINER(ui->sensor_box), - ui->ui_sensorlist->widget); + g_object_ref(GTK_WIDGET(ui->sensors_scrolled_tree)); + g_object_ref(GTK_WIDGET(ui->w_graph)); - gtk_container_remove(GTK_CONTAINER(ui->main_box), - ui->sensor_box); + gtk_container_remove(GTK_CONTAINER(ui->sensor_box), + GTK_WIDGET(ui->sensors_scrolled_tree)); - ui->w_graph = ui_graph_create(ui); + gtk_container_remove(GTK_CONTAINER(ui->sensor_box), ui->w_graph); - init = 0; - } + gtk_container_remove(GTK_CONTAINER(ui->main_box), + GTK_WIDGET(ui->sensor_box)); if (cfg->sensorlist_position == SENSORLIST_POSITION_RIGHT || cfg->sensorlist_position == SENSORLIST_POSITION_LEFT) - ui->sensor_box = gtk_hpaned_new(); + ui->sensor_box + = GTK_PANED(gtk_paned_new(GTK_ORIENTATION_HORIZONTAL)); else - ui->sensor_box = gtk_vpaned_new(); + ui->sensor_box + = GTK_PANED(gtk_paned_new(GTK_ORIENTATION_VERTICAL)); - gtk_box_pack_end(GTK_BOX(ui->main_box), ui->sensor_box, TRUE, TRUE, 2); + gtk_box_pack_end(GTK_BOX(ui->main_box), + GTK_WIDGET(ui->sensor_box), TRUE, TRUE, 2); if (cfg->sensorlist_position == SENSORLIST_POSITION_RIGHT || cfg->sensorlist_position == SENSORLIST_POSITION_BOTTOM) { - gtk_paned_pack1(GTK_PANED(ui->sensor_box), + gtk_paned_pack1(ui->sensor_box, GTK_WIDGET(ui->w_graph), TRUE, TRUE); - gtk_paned_pack2(GTK_PANED(ui->sensor_box), - ui->ui_sensorlist->widget, FALSE, TRUE); + gtk_paned_pack2(ui->sensor_box, + GTK_WIDGET(ui->sensors_scrolled_tree), + FALSE, TRUE); } else { - gtk_paned_pack1(GTK_PANED(ui->sensor_box), - ui->ui_sensorlist->widget, FALSE, TRUE); - gtk_paned_pack2(GTK_PANED(ui->sensor_box), + gtk_paned_pack1(ui->sensor_box, + GTK_WIDGET(ui->sensors_scrolled_tree), + FALSE, TRUE); + gtk_paned_pack2(ui->sensor_box, GTK_WIDGET(ui->w_graph), TRUE, TRUE); } if (cfg->window_restore_enabled) - gtk_paned_set_position(GTK_PANED(ui->sensor_box), - ui->config->window_divider_pos); + gtk_paned_set_position(ui->sensor_box, cfg->window_divider_pos); - if (!init) - g_object_unref(GTK_WIDGET(ui->ui_sensorlist->widget)); + g_object_unref(GTK_WIDGET(ui->sensors_scrolled_tree)); + g_object_unref(GTK_WIDGET(ui->w_graph)); - gtk_widget_show_all(ui->sensor_box); + gtk_widget_show_all(GTK_WIDGET(ui->sensor_box)); if (cfg->menu_bar_disabled) menu_bar_show(0, ui); @@ -340,5 +325,33 @@ void ui_window_update(struct ui_psensor *ui) void ui_window_show(struct ui_psensor *ui) { log_debug("ui_window_show()"); + ui_window_update(ui); gtk_window_present(GTK_WINDOW(ui->main_window)); } + +static int cmp_sensors(const void *p1, const void *p2) +{ + const struct psensor *s1, *s2; + int pos1, pos2; + + s1 = *(void **)p1; + s2 = *(void **)p2; + + pos1 = config_get_sensor_position(s1->id); + pos2 = config_get_sensor_position(s2->id); + + return pos1 - pos2; +} + +struct psensor **ui_get_sensors_ordered_by_position(const struct ui_psensor *ui) +{ + struct psensor **result; + + result = psensor_list_copy(ui->sensors); + qsort(result, + psensor_list_size(result), + sizeof(struct psensor *), + cmp_sensors); + + return result; +} diff --git a/src/ui.h b/src/ui.h index 753d7b9..a68a6c9 100644 --- a/src/ui.h +++ b/src/ui.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 jeanfi@gmail.com + * Copyright (C) 2010-2013 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -21,6 +21,8 @@ #include "config.h" +#include + #include #include @@ -30,19 +32,23 @@ #include "psensor.h" +#define PSENSOR_ICON "psensor" + struct ui_psensor { struct psensor **sensors; + /* mutex which MUST be used for accessing sensors.*/ + pthread_mutex_t sensors_mutex; GtkWidget *w_graph; - struct ui_sensorlist *ui_sensorlist; - struct config *config; GtkWidget *main_window; GtkWidget *menu_bar; + GtkWidget *popup_menu; + /* * The main vertical box, top contains the menubar, bottom * contains the sensor_box. @@ -53,11 +59,13 @@ struct ui_psensor { * The box which contains the sensors graph and the sensors * information list. */ - GtkWidget *sensor_box; + GtkPaned *sensor_box; - int graph_update_interval; + GtkListStore *sensors_store; + GtkTreeView *sensors_tree; + GtkScrolledWindow *sensors_scrolled_tree; - GMutex *sensors_mutex; + int graph_update_interval; }; /* @@ -83,4 +91,12 @@ void ui_menu_bar_show(unsigned int show, struct ui_psensor *ui); void ui_show_about_dialog(); +void ui_enable_alpha_channel(struct ui_psensor *ui); + +void ui_cb_preferences(GtkMenuItem *mi, gpointer data); +void ui_cb_about(GtkMenuItem *mi, gpointer data); +void ui_cb_menu_quit(GtkMenuItem *mi, gpointer data); +void ui_cb_sensor_preferences(GtkMenuItem *mi, gpointer data); + +struct psensor **ui_get_sensors_ordered_by_position(const struct ui_psensor *); #endif diff --git a/src/ui_appindicator.c b/src/ui_appindicator.c index dce718f..31616a1 100644 --- a/src/ui_appindicator.c +++ b/src/ui_appindicator.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 jeanfi@gmail.com + * Copyright (C) 2010-2013 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -23,6 +23,7 @@ #include #include +#include "cfg.h" #include "psensor.h" #include "ui.h" #include "ui_appindicator.h" @@ -33,8 +34,8 @@ static const char *ICON = "psensor_normal"; static const char *ATTENTION_ICON = "psensor_hot"; -static GtkMenuItem **sensor_menu_items; -static GtkWidget *main_window; +static struct psensor **sensors; +static GtkMenuItem **menu_items; static int appindicator_supported = 1; static AppIndicator *indicator; static struct ui_psensor *ui_psensor; @@ -102,53 +103,100 @@ static GtkActionEntry entries[] = { { "PsensorMenuAction", NULL, "_Psensor" }, { "ShowAction", NULL, - "_Show", NULL, - "Show", + N_("_Show"), NULL, + N_("Show"), G_CALLBACK(cb_menu_show) }, { "PreferencesAction", GTK_STOCK_PREFERENCES, - "_Preferences", NULL, - "Preferences", + N_("_Preferences"), NULL, + N_("Preferences"), G_CALLBACK(cb_menu_preferences) }, { "SensorPreferencesAction", GTK_STOCK_PREFERENCES, - "S_ensor Preferences", + N_("S_ensor Preferences"), NULL, - "SensorPreferences", + N_("SensorPreferences"), G_CALLBACK(cb_sensor_preferences) }, { "AboutAction", NULL, - "_About", + N_("_About"), NULL, - "About", + N_("About"), G_CALLBACK(cb_about) }, { "QuitAction", - GTK_STOCK_QUIT, "_Quit", NULL, "Quit", G_CALLBACK(cb_menu_quit) } + GTK_STOCK_QUIT, + N_("_Quit"), + NULL, N_("Quit"), + G_CALLBACK(cb_menu_quit) } }; static guint n_entries = G_N_ELEMENTS(entries); -static void update_sensor_menu_item(GtkMenuItem *item, struct psensor *s) +static void +update_menu_item(GtkMenuItem *item, struct psensor *s, int use_celcius) { gchar *str; + char *v; + + v = psensor_current_value_to_str(s, use_celcius); - str = g_strdup_printf("%s: %2.f %s", - s->name, - psensor_get_current_value(s), - psensor_type_to_unit_str(s->type)); + str = g_strdup_printf("%s: %s", s->name, v); gtk_menu_item_set_label(item, str); + free(v); g_free(str); } -static void update_sensor_menu_items(struct psensor **sensors) +static void update_menu_items(int use_celcius) +{ + struct psensor **s; + GtkMenuItem **m; + + if (!sensors) + return ; + + for (s = sensors, m = menu_items; *s; s++, m++) + update_menu_item(*m, *s, use_celcius); +} + +static void +build_sensor_menu_items(const struct ui_psensor *ui, + GtkMenu *menu) { - int n, i; + int i, j, n, celcius; + const char *name; + struct psensor **sorted_sensors; + + free(menu_items); + + celcius = ui->config->temperature_unit == CELCIUS; - n = psensor_list_size(sensors); - for (i = 0; i < n; i++) - update_sensor_menu_item(sensor_menu_items[i], sensors[i]); + sorted_sensors = ui_get_sensors_ordered_by_position(ui); + n = psensor_list_size(sorted_sensors); + menu_items = malloc(n * sizeof(GtkWidget *)); + sensors = malloc((n + 1) * sizeof(struct psensor *)); + for (i = 0, j = 0; i < n; i++) { + if (config_is_appindicator_enabled(sorted_sensors[i]->id)) { + sensors[j] = sorted_sensors[i]; + name = sensors[j]->name; + + menu_items[j] = GTK_MENU_ITEM + (gtk_menu_item_new_with_label(name)); + + gtk_menu_shell_insert(GTK_MENU_SHELL(menu), + GTK_WIDGET(menu_items[j]), + j+2); + + update_menu_item(menu_items[j], sensors[j], celcius); + + j++; + } + } + + sensors[j] = NULL; + + free(sorted_sensors); } static GtkWidget *get_menu(struct ui_psensor *ui) @@ -157,10 +205,6 @@ static GtkWidget *get_menu(struct ui_psensor *ui) GtkUIManager *menu_manager; GError *error; GtkMenu *menu; - int i; - int n = psensor_list_size(ui->sensors); - struct psensor **sensors = ui->sensors; - action_group = gtk_action_group_new("PsensorActions"); gtk_action_group_set_translation_domain(action_group, PACKAGE); @@ -177,21 +221,7 @@ static GtkWidget *get_menu(struct ui_psensor *ui) menu = GTK_MENU(gtk_ui_manager_get_widget(menu_manager, "/MainMenu")); - sensor_menu_items = malloc(sizeof(GtkWidget *)*n); - for (i = 0; i < n; i++) { - struct psensor *s = sensors[i]; - - sensor_menu_items[i] - = GTK_MENU_ITEM(gtk_menu_item_new_with_label(s->name)); - - gtk_menu_shell_insert(GTK_MENU_SHELL(menu), - GTK_WIDGET(sensor_menu_items[i]), - i+2); - - update_sensor_menu_item(sensor_menu_items[i], - s); - } - + build_sensor_menu_items(ui, menu); return GTK_WIDGET(menu); } @@ -206,39 +236,54 @@ void ui_appindicator_update(struct ui_psensor *ui, unsigned int attention) status = app_indicator_get_status(indicator); if (!attention && status == APP_INDICATOR_STATUS_ATTENTION) - app_indicator_set_status - (indicator, APP_INDICATOR_STATUS_ACTIVE); + app_indicator_set_status(indicator, + APP_INDICATOR_STATUS_ACTIVE); if (attention && status == APP_INDICATOR_STATUS_ACTIVE) - app_indicator_set_status - (indicator, APP_INDICATOR_STATUS_ATTENTION); + app_indicator_set_status(indicator, + APP_INDICATOR_STATUS_ATTENTION); - update_sensor_menu_items(ui->sensors); + update_menu_items(ui->config->temperature_unit == CELCIUS); } static GtkStatusIcon *unity_fallback(AppIndicator *indicator) { - log_debug("ui_appindicator#unity_fallback"); + GtkStatusIcon *ico; + + log_debug("ui_appindicator.unity_fallback()"); appindicator_supported = 0; - return ui_status_get_icon(ui_psensor); + ico = ui_status_get_icon(ui_psensor); + + ui_status_set_visible(1); + + return ico; } static void unity_unfallback(AppIndicator *indicator, GtkStatusIcon *status_icon) { - log_debug("ui_appindicator#unity_unfallback"); + log_debug("ui_appindicator.unity_unfallback()"); + + ui_status_set_visible(0); appindicator_supported = 1; } -void ui_appindicator_init(struct ui_psensor *ui) +void ui_appindicator_update_menu(struct ui_psensor *ui) { GtkWidget *menu; + menu = get_menu(ui); + app_indicator_set_menu(indicator, GTK_MENU(menu)); + + gtk_widget_show_all(menu); +} + +void ui_appindicator_init(struct ui_psensor *ui) +{ ui_psensor = ui; - main_window = ui->main_window; indicator = app_indicator_new ("psensor", @@ -251,10 +296,7 @@ void ui_appindicator_init(struct ui_psensor *ui) app_indicator_set_status(indicator, APP_INDICATOR_STATUS_ACTIVE); app_indicator_set_attention_icon(indicator, ATTENTION_ICON); - menu = get_menu(ui); - app_indicator_set_menu(indicator, GTK_MENU(menu)); - - gtk_widget_show_all(menu); + ui_appindicator_update_menu(ui); } int is_appindicator_supported() @@ -264,5 +306,6 @@ int is_appindicator_supported() void ui_appindicator_cleanup() { + free(sensors); /* TODO: cleanup menu items. */ } diff --git a/src/ui_appindicator.h b/src/ui_appindicator.h index 19ab873..1ed263a 100644 --- a/src/ui_appindicator.h +++ b/src/ui_appindicator.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 jeanfi@gmail.com + * Copyright (C) 2010-2013 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -25,6 +25,7 @@ #if defined(HAVE_APPINDICATOR) || defined(HAVE_APPINDICATOR_029) void ui_appindicator_init(struct ui_psensor *ui); void ui_appindicator_update(struct ui_psensor *ui, unsigned int attention); +void ui_appindicator_update_menu(struct ui_psensor *ui); int is_appindicator_supported(); void ui_appindicator_cleanup(); #else diff --git a/src/ui_color.c b/src/ui_color.c index a5e1e87..cae61f0 100644 --- a/src/ui_color.c +++ b/src/ui_color.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 jeanfi@gmail.com + * Copyright (C) 2010-2013 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -20,31 +20,50 @@ #include "ui_color.h" -int ui_change_color(const char *title, struct color *col) +int ui_change_color(const char *title, struct color *col, GtkWindow *win) { - GdkColor color; - GtkColorSelection *colorsel; + GdkRGBA color; int res; - GtkColorSelectionDialog *colordlg; + GtkColorChooserDialog *colordlg; + double r, g, b; color.red = col->red; color.green = col->green; color.blue = col->blue; + color.alpha = 1; - colordlg = GTK_COLOR_SELECTION_DIALOG - (gtk_color_selection_dialog_new(title)); + colordlg = GTK_COLOR_CHOOSER_DIALOG + (gtk_color_chooser_dialog_new(title, win)); - colorsel = GTK_COLOR_SELECTION - (gtk_color_selection_dialog_get_color_selection(colordlg)); + gtk_color_chooser_set_use_alpha(GTK_COLOR_CHOOSER(colordlg), 0); - gtk_color_selection_set_current_color(colorsel, &color); + gtk_color_chooser_set_rgba(GTK_COLOR_CHOOSER(colordlg), &color); res = gtk_dialog_run(GTK_DIALOG(colordlg)); if (res == GTK_RESPONSE_OK) { - gtk_color_selection_get_current_color(colorsel, &color); + gtk_color_chooser_get_rgba(GTK_COLOR_CHOOSER(colordlg), &color); - color_set(col, color.red, color.green, color.blue); + /* GdkRGBA defines rgb as double 0..1 but chooser returns + * values > 1 when selecting a custom undefined color. + * Not sure whether that's a gtk/gdk bug. */ + + if (color.red > 1) + r = 1; + else + r = color.red; + + if (color.green > 1) + g = 1; + else + g = color.green; + + if (color.blue > 1) + b = 1; + else + b = color.blue; + + color_set(col, 65535*r, 65535*g, 65535*b); } gtk_widget_destroy(GTK_WIDGET(colordlg)); diff --git a/src/ui_color.h b/src/ui_color.h index 0dfe127..c73b2ed 100644 --- a/src/ui_color.h +++ b/src/ui_color.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 jeanfi@gmail.com + * Copyright (C) 2010-2013 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -22,10 +22,10 @@ #include "color.h" /* - UI to change a given color. - - Returns 1 if the color has been modified. + * UI to change a given color. + * + * Returns 1 if the color has been modified. */ -int ui_change_color(const char *title, struct color *col); +int ui_change_color(const char *title, struct color *col, GtkWindow *win); #endif diff --git a/src/ui_graph.c b/src/ui_graph.c index 47d9fd4..a50d6a1 100644 --- a/src/ui_graph.c +++ b/src/ui_graph.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 jeanfi@gmail.com + * Copyright (C) 2010-2013 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -18,101 +18,15 @@ */ #include "graph.h" #include "ui_graph.h" -#include "ui_pref.h" -#include "ui_sensorpref.h" - -static void cb_menu_quit(GtkMenuItem *mi, gpointer data) -{ - ui_psensor_quit((struct ui_psensor *)data); -} - -static void cb_preferences(GtkMenuItem *mi, gpointer data) -{ - ui_pref_dialog_run((struct ui_psensor *)data); -} - -static void cb_about(GtkMenuItem *mi, gpointer data) -{ - ui_show_about_dialog(); -} - -static void cb_sensor_preferences(GtkMenuItem *mi, gpointer data) -{ - struct ui_psensor *ui = data; - - if (ui->sensors && *ui->sensors) - ui_sensorpref_dialog_run(*ui->sensors, ui); -} - -static const char *menu_desc = -"" -" " -" " -" " -" " -" " -" " -" " -" " -""; - -static GtkActionEntry entries[] = { - { "PsensorMenuAction", NULL, "_Psensor" }, - - { "PreferencesAction", GTK_STOCK_PREFERENCES, - "_Preferences", NULL, - "Preferences", - G_CALLBACK(cb_preferences) }, - - { "SensorPreferencesAction", GTK_STOCK_PREFERENCES, - "_Sensor Preferences", NULL, - "Sensor Preferences", - G_CALLBACK(cb_sensor_preferences) }, - - { "AboutAction", NULL, - "_About", NULL, - "About", - G_CALLBACK(cb_about) }, - - { "QuitAction", - GTK_STOCK_QUIT, "_Quit", NULL, "Quit", G_CALLBACK(cb_menu_quit) } -}; -static guint n_entries = G_N_ELEMENTS(entries); - -static GtkWidget *get_menu(struct ui_psensor *ui) -{ - GtkActionGroup *action_group; - GtkUIManager *menu_manager; - GError *error; - - action_group = gtk_action_group_new("PsensorActions"); - gtk_action_group_set_translation_domain(action_group, PACKAGE); - menu_manager = gtk_ui_manager_new(); - - gtk_action_group_add_actions(action_group, entries, n_entries, ui); - gtk_ui_manager_insert_action_group(menu_manager, action_group, 0); - - error = NULL; - gtk_ui_manager_add_ui_from_string(menu_manager, menu_desc, -1, &error); - - if (error) - g_error(_("building menus failed: %s"), error->message); - - return gtk_ui_manager_get_widget(menu_manager, "/MainMenu"); -} - static int on_graph_clicked(GtkWidget *widget, GdkEventButton *event, gpointer data) { - GtkWidget *menu; - if (event->type != GDK_BUTTON_PRESS) return FALSE; - menu = get_menu((struct ui_psensor *)data); - - gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, + gtk_menu_popup(GTK_MENU(((struct ui_psensor *)data)->popup_menu), + NULL, NULL, NULL, NULL, event->button, event->time); return TRUE; @@ -124,33 +38,31 @@ on_expose_event(GtkWidget *widget, GdkEventExpose *event, gpointer data) struct ui_psensor *ui_psensor = (struct ui_psensor *)data; graph_update(ui_psensor->sensors, - ui_psensor->w_graph, ui_psensor->config); + ui_psensor->w_graph, + ui_psensor->config, + ui_psensor->main_window); return FALSE; } -GtkWidget *ui_graph_create(struct ui_psensor * ui) +void ui_graph_create(struct ui_psensor *ui) { GtkWidget *w_graph; - w_graph = gtk_drawing_area_new(); + log_debug("ui_graph_create()"); - if (GTK_MAJOR_VERSION == 2) - g_signal_connect(GTK_WIDGET(w_graph), - "expose-event", - G_CALLBACK(on_expose_event), - ui); - else - g_signal_connect(GTK_WIDGET(w_graph), - "draw", - G_CALLBACK(on_expose_event), - ui); + w_graph = ui->w_graph; + + g_signal_connect(GTK_WIDGET(w_graph), + "draw", + G_CALLBACK(on_expose_event), + ui); gtk_widget_add_events(w_graph, GDK_BUTTON_PRESS_MASK); g_signal_connect(GTK_WIDGET(w_graph), - "button_press_event", - (GCallback) on_graph_clicked, ui); + "button_press_event", + (GCallback) on_graph_clicked, ui); - return w_graph; + log_debug("ui_graph_create() ends"); } diff --git a/src/ui_graph.h b/src/ui_graph.h index d6bf466..d877d42 100644 --- a/src/ui_graph.h +++ b/src/ui_graph.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 jeanfi@gmail.com + * Copyright (C) 2010-2013 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -23,6 +23,6 @@ #include "ui.h" -GtkWidget *ui_graph_create(struct ui_psensor * ui); +void ui_graph_create(struct ui_psensor *ui); #endif diff --git a/src/ui_notify.c b/src/ui_notify.c index c92b5fb..f55821c 100644 --- a/src/ui_notify.c +++ b/src/ui_notify.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 jeanfi@gmail.com + * Copyright (C) 2010-2013 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -27,6 +27,7 @@ #define NOTIFY_CHECK_VERSION(x, y, z) 0 #endif +#include "cfg.h" #include "ui.h" #include "ui_notify.h" @@ -36,13 +37,15 @@ static struct timeval last_notification_tv; void ui_notify(struct psensor *sensor, struct ui_psensor *ui) { struct timeval t; - char *name; + char *body, *svalue; + const char *summary; NotifyNotification *notif; + unsigned int use_celcius; log_debug("last_notification %d", last_notification_tv.tv_sec); if (gettimeofday(&t, NULL) != 0) { - log_printf(LOG_ERR, _("gettimeofday failed")); + log_err(_("gettimeofday failed.")); return; } @@ -56,27 +59,45 @@ void ui_notify(struct psensor *sensor, struct ui_psensor *ui) notify_init("psensor"); if (notify_is_initted() == TRUE) { - name = strdup(sensor->name); + if (ui->config->temperature_unit == CELCIUS) + use_celcius = 1; + else + use_celcius = 0; + + svalue = psensor_measure_to_str + (psensor_get_current_measure(sensor), + sensor->type, + use_celcius); + + body = malloc(strlen(sensor->name) + 3 + strlen(svalue) + 1); + sprintf(body, "%s : %s", sensor->name, svalue); + free(svalue); + + if (is_temp_type(sensor->type)) + summary = _("Temperature alert"); + else if (is_fan_type(sensor->type)) + summary = _("Fan alert"); + else + summary = _("N/A"); /* * Since libnotify 0.7 notify_notification_new has * only 3 parameters. */ #if NOTIFY_CHECK_VERSION(0, 7, 0) - notif = notify_notification_new - (_("Temperature alert"), name, NULL); + notif = notify_notification_new(summary, body, PSENSOR_ICON); #else - notif = notify_notification_new(_("Temperature alert"), - name, - NULL, + notif = notify_notification_new(summary, + body, + PSENSOR_ICON, GTK_WIDGET(ui->main_window)); #endif - log_debug("notif_notification_new %s", sensor->name); + log_debug("notif_notification_new %s", body); notify_notification_show(notif, NULL); g_object_unref(notif); } else { - log_printf(LOG_ERR, "notify not initted"); + log_err("notify not initialized"); } } diff --git a/src/ui_notify.h b/src/ui_notify.h index 807b053..f68fac8 100644 --- a/src/ui_notify.h +++ b/src/ui_notify.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 jeanfi@gmail.com + * Copyright (C) 2010-2013 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as diff --git a/src/ui_pref.c b/src/ui_pref.c index b9bc3c4..b66748e 100644 --- a/src/ui_pref.c +++ b/src/ui_pref.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 jeanfi@gmail.com + * Copyright (C) 2010-2013 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -23,7 +23,6 @@ #include "cfg.h" #include "ui_pref.h" #include "ui_color.h" -#include "compat.h" GdkColor *color_to_gdkcolor(struct color *color) { @@ -46,13 +45,16 @@ void ui_pref_dialog_run(struct ui_psensor *ui) GError *error = NULL; GdkColor *color_fg, *color_bg; GtkColorButton *w_color_fg, *w_color_bg; - GtkHScale *w_bg_opacity; + GtkScale *w_bg_opacity; GtkSpinButton *w_update_interval, *w_monitoring_duration, - *w_s_update_interval; + *w_s_update_interval, *w_slog_interval; GtkComboBox *w_sensorlist_pos; GtkToggleButton *w_hide_window_decoration, *w_keep_window_below, *w_enable_menu, *w_enable_launcher_counter, *w_hide_on_startup, - *w_win_restore; + *w_win_restore, *w_slog_enabled; + GtkComboBoxText *w_temp_unit; + GtkEntry *w_notif_script; + char *notif_script; cfg = ui->config; @@ -71,6 +73,14 @@ void ui_pref_dialog_run(struct ui_psensor *ui) diag = GTK_DIALOG(gtk_builder_get_object(builder, "dialog1")); + w_notif_script = GTK_ENTRY(gtk_builder_get_object(builder, + "notif_script")); + notif_script = config_get_notif_script(); + if (notif_script) { + gtk_entry_set_text(GTK_ENTRY(w_notif_script), notif_script); + free(notif_script); + } + color_fg = color_to_gdkcolor(cfg->graph_fgcolor); w_color_fg = GTK_COLOR_BUTTON(gtk_builder_get_object(builder, "color_fg")); @@ -81,8 +91,8 @@ void ui_pref_dialog_run(struct ui_psensor *ui) "color_bg")); gtk_color_button_set_color(w_color_bg, color_bg); - w_bg_opacity = GTK_HSCALE(gtk_builder_get_object(builder, - "bg_opacity")); + w_bg_opacity = GTK_SCALE(gtk_builder_get_object(builder, + "bg_opacity")); gtk_range_set_value(GTK_RANGE(w_bg_opacity), cfg->graph_bg_alpha); w_update_interval = GTK_SPIN_BUTTON(gtk_builder_get_object @@ -125,6 +135,14 @@ void ui_pref_dialog_run(struct ui_psensor *ui) gtk_toggle_button_set_active(w_enable_launcher_counter, !cfg->unity_launcher_count_disabled); + w_slog_enabled = GTK_TOGGLE_BUTTON + (gtk_builder_get_object(builder, "enable_slog")); + gtk_toggle_button_set_active(w_slog_enabled, cfg->slog_enabled); + + w_slog_interval = GTK_SPIN_BUTTON + (gtk_builder_get_object(builder, "slog_interval")); + gtk_spin_button_set_value(w_slog_interval, cfg->slog_interval); + w_hide_on_startup = GTK_TOGGLE_BUTTON(gtk_builder_get_object(builder, "hide_on_startup")); @@ -136,13 +154,22 @@ void ui_pref_dialog_run(struct ui_psensor *ui) gtk_toggle_button_set_active(w_win_restore, cfg->window_restore_enabled); + w_temp_unit + = GTK_COMBO_BOX_TEXT(gtk_builder_get_object + (builder, "temperature_unit")); + gtk_combo_box_set_active(GTK_COMBO_BOX(w_temp_unit), + cfg->temperature_unit); + result = gtk_dialog_run(diag); if (result == GTK_RESPONSE_ACCEPT) { double value; GdkColor color; - g_mutex_lock(ui->sensors_mutex); + pthread_mutex_lock(&ui->sensors_mutex); + + config_set_notif_script + (gtk_entry_get_text(GTK_ENTRY(w_notif_script))); gtk_color_button_get_color(w_color_fg, &color); color_set(cfg->graph_fgcolor, @@ -202,9 +229,18 @@ void ui_pref_dialog_run(struct ui_psensor *ui) cfg->window_restore_enabled = gtk_toggle_button_get_active(w_win_restore); + cfg->slog_enabled + = gtk_toggle_button_get_active(w_slog_enabled); + + cfg->slog_interval + = gtk_spin_button_get_value_as_int(w_slog_interval); + + cfg->temperature_unit + = gtk_combo_box_get_active(GTK_COMBO_BOX(w_temp_unit)); + config_save(cfg); - g_mutex_unlock(ui->sensors_mutex); + pthread_mutex_unlock(&ui->sensors_mutex); ui_window_update(ui); } diff --git a/src/ui_pref.h b/src/ui_pref.h index 13ae3ed..42c886f 100644 --- a/src/ui_pref.h +++ b/src/ui_pref.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 jeanfi@gmail.com + * Copyright (C) 2010-2013 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as diff --git a/src/ui_sensorlist.c b/src/ui_sensorlist.c index d5a0240..1c3ffb1 100644 --- a/src/ui_sensorlist.c +++ b/src/ui_sensorlist.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 jeanfi@gmail.com + * Copyright (C) 2010-2013 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -25,7 +25,6 @@ #include "ui_sensorpref.h" #include "cfg.h" #include "ui_color.h" -#include "compat.h" enum { COL_NAME = 0, @@ -36,7 +35,7 @@ enum { COL_COLOR_STR, COL_ENABLED, COL_EMPTY, - COLS_COUNT + COL_SENSOR, }; struct cb_data { @@ -54,40 +53,79 @@ static int col_index_to_col(int idx) return idx; } -void ui_sensorlist_update(struct ui_psensor *ui) +static void populate(struct ui_psensor *ui) { GtkTreeIter iter; - struct ui_sensorlist *ui_sl = ui->ui_sensorlist; - GtkTreeModel *model - = gtk_tree_view_get_model(ui_sl->treeview); - gboolean valid = gtk_tree_model_get_iter_first(model, &iter); - struct psensor **sensor = ui->sensors; + GtkListStore *store; + GdkColor color; + char *scolor; + struct psensor **ordered_sensors, **s_cur, *s; + + ordered_sensors = ui_get_sensors_ordered_by_position(ui); + store = ui->sensors_store; - while (valid && *sensor) { - struct psensor *s = *sensor; + gtk_list_store_clear(store); - char *str; + for (s_cur = ordered_sensors; *s_cur; s_cur++) { + s = *s_cur; - str = psensor_value_to_string(s->type, - s->measures[s->values_max_length - - 1].value.d_num); + gtk_list_store_append(store, &iter); - gtk_list_store_set(GTK_LIST_STORE(model), &iter, COL_TEMP, str, + color.red = s->color->red; + color.green = s->color->green; + color.blue = s->color->blue; + + scolor = gdk_color_to_string(&color); + + gtk_list_store_set(store, &iter, + COL_NAME, s->name, + COL_COLOR_STR, scolor, + COL_ENABLED, s->graph_enabled, + COL_SENSOR, s, -1); - free(str); + free(scolor); + } + free(ordered_sensors); +} + +void ui_sensorlist_update(struct ui_psensor *ui, bool complete) +{ + char *value, *min, *max; + struct psensor *s; + GtkTreeIter iter; + GtkTreeModel *model; + gboolean valid; + int use_celcius; + GtkListStore *store; + + if (complete) + populate(ui); + + model = gtk_tree_view_get_model(ui->sensors_tree); + store = ui->sensors_store; - str = psensor_value_to_string(s->type, s->min); - gtk_list_store_set(GTK_LIST_STORE(model), &iter, - COL_TEMP_MIN, str, -1); - free(str); + use_celcius = ui->config->temperature_unit == CELCIUS; - str = psensor_value_to_string(s->type, s->max); - gtk_list_store_set(GTK_LIST_STORE(model), &iter, - COL_TEMP_MAX, str, -1); - free(str); + valid = gtk_tree_model_get_iter_first(model, &iter); + while (valid) { + gtk_tree_model_get(model, &iter, COL_SENSOR, &s, -1); + + value = psensor_value_to_str(s->type, + psensor_get_current_value(s), + use_celcius); + min = psensor_value_to_str(s->type, s->min, use_celcius); + max = psensor_value_to_str(s->type, s->max, use_celcius); + + gtk_list_store_set(store, &iter, + COL_TEMP, value, + COL_TEMP_MIN, min, + COL_TEMP_MAX, max, + -1); + free(value); + free(min); + free(max); valid = gtk_tree_model_iter_next(model, &iter); - sensor++; } } @@ -98,16 +136,21 @@ void ui_sensorlist_update(struct ui_psensor *ui) * if none. */ static struct psensor * -get_sensor_at_pos(GtkTreeView *view, int x, int y, struct psensor **sensors) +get_sensor_at_pos(GtkTreeView *view, int x, int y, struct ui_psensor *ui) { GtkTreePath *path; + GtkTreeModel *model; + GtkTreeIter iter; + struct psensor *s; gtk_tree_view_get_path_at_pos(view, x, y, &path, NULL, NULL, NULL); + model = gtk_tree_view_get_model(ui->sensors_tree); if (path) { - gint *i = gtk_tree_path_get_indices(path); - if (i) - return *(sensors + *i); + if (gtk_tree_model_get_iter(model, &iter, path)) { + gtk_tree_model_get(model, &iter, COL_SENSOR, &s, -1); + return s; + } } return NULL; } @@ -120,16 +163,18 @@ get_sensor_at_pos(GtkTreeView *view, int x, int y, struct psensor **sensors) */ static int get_col_index_at_pos(GtkTreeView *view, int x) { - GList *columns = gtk_tree_view_get_columns(view); - GList *node; - int colx = 0; - int coli = 0; - - for (node = columns; node; node = node->next) { - GtkTreeViewColumn *checkcol = (GtkTreeViewColumn *) node->data; - - if (x >= colx && - x < (colx + gtk_tree_view_column_get_width(checkcol))) + GList *cols, *node; + int colx, coli; + GtkTreeViewColumn *checkcol; + + cols = gtk_tree_view_get_columns(view); + colx = 0; + coli = 0; + for (node = cols; node; node = node->next) { + checkcol = (GtkTreeViewColumn *)node->data; + + if (x >= colx + && x < (colx + gtk_tree_view_column_get_width(checkcol))) return coli; else colx += gtk_tree_view_column_get_width(checkcol); @@ -140,53 +185,17 @@ static int get_col_index_at_pos(GtkTreeView *view, int x) return -1; } -void ui_sensorlist_update_sensors_preferences(struct ui_psensor *ui) -{ - GtkTreeIter iter; - GtkTreeModel *model - = gtk_tree_view_get_model(ui->ui_sensorlist->treeview); - gboolean valid = gtk_tree_model_get_iter_first(model, &iter); - struct psensor **sensor = ui->ui_sensorlist->sensors; - - while (valid && *sensor) { - GdkColor color; - gchar *scolor; - - color.red = (*sensor)->color->red; - color.green = (*sensor)->color->green; - color.blue = (*sensor)->color->blue; - - scolor = gdk_color_to_string(&color); - - gtk_list_store_set(GTK_LIST_STORE(model), - &iter, COL_NAME, (*sensor)->name, -1); - - gtk_list_store_set(GTK_LIST_STORE(model), - &iter, COL_COLOR_STR, scolor, -1); - - gtk_list_store_set(GTK_LIST_STORE(model), - &iter, COL_ENABLED, (*sensor)->enabled, -1); - - free(scolor); - - valid = gtk_tree_model_iter_next(model, &iter); - sensor++; - } -} - -static void on_preferences_activated(GtkWidget *menu_item, gpointer data) +static void preferences_activated_cbk(GtkWidget *menu_item, gpointer data) { struct cb_data *cb_data = data; ui_sensorpref_dialog_run(cb_data->sensor, cb_data->ui); } -static GtkWidget *create_sensor_popup(struct ui_psensor *ui, - struct psensor *sensor) +static GtkWidget * +create_sensor_popup(struct ui_psensor *ui, struct psensor *sensor) { - GtkWidget *menu; - GtkWidget *item; - GtkWidget *separator; + GtkWidget *menu, *item, *separator; struct cb_data *data; menu = gtk_menu_new(); @@ -206,129 +215,109 @@ static GtkWidget *create_sensor_popup(struct ui_psensor *ui, g_signal_connect(item, "activate", - G_CALLBACK(on_preferences_activated), data); + G_CALLBACK(preferences_activated_cbk), data); gtk_widget_show_all(menu); return menu; } -static int on_clicked(GtkWidget *widget, GdkEventButton *event, gpointer data) +static int clicked_cbk(GtkWidget *widget, GdkEventButton *event, gpointer data) { - struct ui_psensor *ui = (struct ui_psensor *)data; - GtkTreeView *view = ui->ui_sensorlist->treeview; + GtkWidget *menu; + struct ui_psensor *ui; + GtkTreeView *view; + struct psensor *s; + int coli; + + if (event->button != 3) + return FALSE; + + ui = (struct ui_psensor *)data; + view = ui->sensors_tree; - struct psensor *sensor = get_sensor_at_pos(view, - event->x, - event->y, - ui->sensors); + s = get_sensor_at_pos(view, event->x, event->y, ui); - if (sensor) { - int coli = col_index_to_col(get_col_index_at_pos(view, - event->x)); + if (s) { + coli = col_index_to_col(get_col_index_at_pos(view, event->x)); if (coli == COL_COLOR) { if (ui_change_color(_("Select foreground color"), - sensor->color)) { - ui_sensorlist_update_sensors_preferences(ui); - config_set_sensor_color(sensor->id, - sensor->color); + s->color, + GTK_WINDOW(ui->main_window))) { + ui_sensorlist_update(ui, 1); + config_set_sensor_color(s->id, s->color); } } else if (coli >= 0 && coli != COL_ENABLED) { - GtkWidget *menu = create_sensor_popup(ui, - sensor); + menu = create_sensor_popup(ui, s); gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, event->button, event->time); - } } - return FALSE; + return TRUE; } static void -on_toggled(GtkCellRendererToggle *cell, gchar *path_str, gpointer data) +toggled_cbk(GtkCellRendererToggle *cell, gchar *path_str, gpointer data) { - struct ui_sensorlist *list = (struct ui_sensorlist *)data; - GtkTreeModel *model - = gtk_tree_view_get_model(list->treeview); + struct ui_psensor *ui; + GtkTreeModel *model; GtkTreeIter iter; - GtkTreePath *path = gtk_tree_path_new_from_string(path_str); - gboolean fixed; - gint *i; + GtkTreePath *path; + struct psensor *s; + + ui = (struct ui_psensor *)data; + model = gtk_tree_view_get_model(ui->sensors_tree); + path = gtk_tree_path_new_from_string(path_str); gtk_tree_model_get_iter(model, &iter, path); - gtk_tree_model_get(model, &iter, COL_ENABLED, &fixed, -1); - - fixed ^= 1; - - i = gtk_tree_path_get_indices(path); - if (i) { - int n = *i; - struct psensor **sensor = list->sensors; - while (n--) - sensor++; - (*sensor)->enabled = fixed; - config_set_sensor_enabled((*sensor)->id, (*sensor)->enabled); - } - gtk_list_store_set(GTK_LIST_STORE(model), - &iter, COL_ENABLED, fixed, -1); + gtk_tree_model_get(model, &iter, COL_SENSOR, &s, -1); + + s->graph_enabled ^= 1; + config_set_sensor_enabled(s->id, s->graph_enabled); + + gtk_list_store_set(GTK_LIST_STORE(model), &iter, + COL_ENABLED, s->graph_enabled, -1); gtk_tree_path_free(path); } -static void create_widget(struct ui_psensor *ui) +void ui_sensorlist_create(struct ui_psensor *ui) { - GtkListStore *store; GtkCellRenderer *renderer; - struct psensor **s_cur = ui->sensors; - struct ui_sensorlist *ui_sl = ui->ui_sensorlist; - - store = gtk_list_store_new(COLS_COUNT, - G_TYPE_STRING, - G_TYPE_STRING, - G_TYPE_STRING, - G_TYPE_STRING, - G_TYPE_STRING, - G_TYPE_STRING, - G_TYPE_BOOLEAN, G_TYPE_STRING); - ui_sl->treeview = GTK_TREE_VIEW - (gtk_tree_view_new_with_model(GTK_TREE_MODEL(store))); - - gtk_tree_selection_set_mode - (gtk_tree_view_get_selection(ui_sl->treeview), - GTK_SELECTION_NONE); + log_debug("ui_sensorlist_create()"); renderer = gtk_cell_renderer_text_new(); - gtk_tree_view_insert_column_with_attributes(ui_sl->treeview, + gtk_tree_view_insert_column_with_attributes(ui->sensors_tree, -1, _("Sensor"), renderer, "text", COL_NAME, NULL); - gtk_tree_view_insert_column_with_attributes(ui_sl->treeview, + gtk_tree_view_insert_column_with_attributes(ui->sensors_tree, -1, _("Value"), renderer, "text", COL_TEMP, NULL); - gtk_tree_view_insert_column_with_attributes(ui_sl->treeview, + gtk_tree_view_insert_column_with_attributes(ui->sensors_tree, -1, _("Min"), renderer, "text", COL_TEMP_MIN, NULL); - gtk_tree_view_insert_column_with_attributes(ui_sl->treeview, + gtk_tree_view_insert_column_with_attributes(ui->sensors_tree, -1, _("Max"), renderer, "text", COL_TEMP_MAX, NULL); renderer = gtk_cell_renderer_text_new(); - gtk_tree_view_insert_column_with_attributes(ui_sl->treeview, + gtk_tree_view_insert_column_with_attributes(ui->sensors_tree, -1, _("Color"), renderer, @@ -336,63 +325,25 @@ static void create_widget(struct ui_psensor *ui) "background", COL_COLOR_STR, NULL); - g_signal_connect(ui_sl->treeview, - "button-press-event", (GCallback) on_clicked, ui); + g_signal_connect(ui->sensors_tree, + "button-press-event", (GCallback)clicked_cbk, ui); renderer = gtk_cell_renderer_toggle_new(); - gtk_tree_view_insert_column_with_attributes(ui_sl->treeview, + gtk_tree_view_insert_column_with_attributes(ui->sensors_tree, -1, - _("Enabled"), + _("Graph"), renderer, "active", COL_ENABLED, NULL); g_signal_connect(G_OBJECT(renderer), - "toggled", (GCallback) on_toggled, ui_sl); + "toggled", (GCallback) toggled_cbk, ui); renderer = gtk_cell_renderer_text_new(); - gtk_tree_view_insert_column_with_attributes(ui_sl->treeview, + gtk_tree_view_insert_column_with_attributes(ui->sensors_tree, -1, "", renderer, "text", COL_EMPTY, NULL); - while (*s_cur) { - GtkTreeIter iter; - GdkColor color; - gchar *scolor; - struct psensor *s = *s_cur; - - color.red = s->color->red; - color.green = s->color->green; - color.blue = s->color->blue; - - scolor = gdk_color_to_string(&color); - - gtk_list_store_append(store, &iter); - gtk_list_store_set(store, &iter, - COL_NAME, s->name, - COL_TEMP, _("N/A"), - COL_TEMP_MIN, _("N/A"), - COL_TEMP_MAX, _("N/A"), - COL_COLOR_STR, scolor, - COL_ENABLED, s->enabled, -1); - - free(scolor); - - s_cur++; - } - - ui_sl->widget = gtk_scrolled_window_new(NULL, NULL); - gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(ui_sl->widget), - GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); - gtk_container_add(GTK_CONTAINER(ui_sl->widget), - GTK_WIDGET(ui_sl->treeview)); -} - -void ui_sensorlist_create(struct ui_psensor *ui) -{ - ui->ui_sensorlist = malloc(sizeof(struct ui_sensorlist)); - ui->ui_sensorlist->sensors = ui->sensors; - - create_widget(ui); + ui_sensorlist_update(ui, 1); } diff --git a/src/ui_sensorlist.h b/src/ui_sensorlist.h index 841de3d..b565ecc 100644 --- a/src/ui_sensorlist.h +++ b/src/ui_sensorlist.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 jeanfi@gmail.com + * Copyright (C) 2010-2013 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -23,21 +23,9 @@ #include "psensor.h" -struct ui_sensorlist { - /* The GtkTreeView widget containing the list of sensors */ - GtkTreeView *treeview; - - /* Scrolled widget containing the GtkTreeView */ - GtkWidget *widget; - - struct psensor **sensors; -}; - void ui_sensorlist_create(struct ui_psensor *); /* Update values current/min/max */ -void ui_sensorlist_update(struct ui_psensor *ui); - -void ui_sensorlist_update_sensors_preferences(struct ui_psensor *); +void ui_sensorlist_update(struct ui_psensor *ui, bool complete); #endif diff --git a/src/ui_sensorpref.c b/src/ui_sensorpref.c index cf399d3..ecf2655 100644 --- a/src/ui_sensorpref.c +++ b/src/ui_sensorpref.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 jeanfi@gmail.com + * Copyright (C) 2010-2013 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -26,33 +26,56 @@ #include "ui_sensorpref.h" #include "ui_color.h" +#if defined(HAVE_APPINDICATOR) || defined(HAVE_APPINDICATOR_029) +#include "ui_appindicator.h" +#endif + +enum { + COL_NAME = 0, + COL_SENSOR_PREF +}; + struct sensor_pref { struct psensor *sensor; char *name; int enabled; struct color *color; int alarm_enabled; - double alarm_limit; + int alarm_high_threshold; + int alarm_low_threshold; + unsigned int appindicator_enabled; }; struct cb_data { struct ui_psensor *ui; GtkBuilder *builder; - struct sensor_pref **prefs; }; -static struct sensor_pref *sensor_pref_new(struct psensor *s) +static struct sensor_pref * +sensor_pref_new(struct psensor *s, struct config *cfg) { - struct sensor_pref *p = malloc(sizeof(struct sensor_pref)); + struct sensor_pref *p; - p->sensor = s; + p = malloc(sizeof(struct sensor_pref)); + p->sensor = s; p->name = strdup(s->name); - p->enabled = s->enabled; + p->enabled = s->graph_enabled; p->alarm_enabled = s->alarm_enabled; - p->alarm_limit = s->alarm_limit; p->color = color_dup(s->color); + if (cfg->temperature_unit == CELCIUS) { + p->alarm_high_threshold = s->alarm_high_threshold; + p->alarm_low_threshold = s->alarm_low_threshold; + } else { + p->alarm_high_threshold + = celcius_to_fahrenheit(s->alarm_high_threshold); + p->alarm_low_threshold + = celcius_to_fahrenheit(s->alarm_low_threshold); + } + + p->appindicator_enabled = s->appindicator_enabled; + return p; } @@ -67,87 +90,30 @@ static void sensor_pref_free(struct sensor_pref *p) free(p); } -static struct sensor_pref **sensor_pref_list_new(struct psensor **sensors) -{ - int n, i; - struct sensor_pref **pref_list; - - n = psensor_list_size(sensors); - pref_list = malloc(sizeof(struct sensor_pref *) * (n+1)); - - for (i = 0; i < n; i++) - pref_list[i] = sensor_pref_new(sensors[i]); - - pref_list[n] = NULL; - - return pref_list; -} - -static void sensor_pref_list_free(struct sensor_pref **list) -{ - struct sensor_pref **cur = list; - - while (*cur) { - sensor_pref_free(*cur); - - cur++; - } - - free(list); -} - -static struct sensor_pref * -sensor_pref_get(struct sensor_pref **ps, struct psensor *s) -{ - struct sensor_pref **p_cur = ps; - - while (*p_cur) { - struct sensor_pref *p = *p_cur; - - if (p->sensor == s) - return p; - - p_cur++; - } - - return NULL; -} - -static struct sensor_pref * -get_seleted_sensor_pref(GtkBuilder *builder, struct sensor_pref **ps) +static struct sensor_pref *get_selected_sensor_pref(GtkTreeView *tree) { GtkTreeModel *model; GtkTreeIter iter; - struct sensor_pref *pref = NULL; + struct sensor_pref *pref; GtkTreeSelection *selection; - GtkTreeView *tree; - - tree = GTK_TREE_VIEW(gtk_builder_get_object(builder, - "sensors_list")); selection = gtk_tree_view_get_selection(tree); - if (gtk_tree_selection_get_selected(selection, &model, &iter)) { - GtkTreePath *p = gtk_tree_model_get_path(model, &iter); - gint *indices = gtk_tree_path_get_indices(p); - - pref = ps[*indices]; - - gtk_tree_path_free(p); - } + pref = NULL; + if (gtk_tree_selection_get_selected(selection, &model, &iter)) + gtk_tree_model_get(model, &iter, COL_SENSOR_PREF, &pref, -1); return pref; } static void on_name_changed(GtkEntry *entry, gpointer data) { - struct cb_data *cbdata = data; struct sensor_pref *p; const char *str; str = gtk_entry_get_text(entry); - p = get_seleted_sensor_pref(cbdata->builder, cbdata->prefs); + p = get_selected_sensor_pref(GTK_TREE_VIEW(data)); if (p && strcmp(p->name, str)) { free(p->name); @@ -155,37 +121,42 @@ static void on_name_changed(GtkEntry *entry, gpointer data) } } -static void -on_drawed_toggled(GtkToggleButton *btn, gpointer data) +static void on_drawed_toggled(GtkToggleButton *btn, gpointer data) { - struct cb_data *cbdata = data; struct sensor_pref *p; - p = get_seleted_sensor_pref(cbdata->builder, cbdata->prefs); + p = get_selected_sensor_pref(GTK_TREE_VIEW(data)); if (p) p->enabled = gtk_toggle_button_get_active(btn); } -static void -on_alarm_toggled(GtkToggleButton *btn, gpointer data) +static void on_alarm_toggled(GtkToggleButton *btn, gpointer data) { - struct cb_data *cbdata = data; struct sensor_pref *p; - p = get_seleted_sensor_pref(cbdata->builder, cbdata->prefs); + p = get_selected_sensor_pref(GTK_TREE_VIEW(data)); if (p) p->alarm_enabled = gtk_toggle_button_get_active(btn); } +static void on_appindicator_toggled(GtkToggleButton *btn, gpointer data) +{ + struct sensor_pref *p; + + p = get_selected_sensor_pref(GTK_TREE_VIEW(data)); + + if (p) + p->appindicator_enabled = gtk_toggle_button_get_active(btn); +} + static void on_color_set(GtkColorButton *widget, gpointer data) { - struct cb_data *cbdata = data; struct sensor_pref *p; GdkColor color; - p = get_seleted_sensor_pref(cbdata->builder, cbdata->prefs); + p = get_selected_sensor_pref(GTK_TREE_VIEW(data)); if (p) { gtk_color_button_get_color(widget, &color); @@ -193,46 +164,73 @@ static void on_color_set(GtkColorButton *widget, gpointer data) } } -static void on_temp_limit_changed(GtkSpinButton *btn, gpointer data) +static void on_alarm_high_threshold_changed(GtkSpinButton *btn, gpointer data) +{ + struct sensor_pref *p; + + p = get_selected_sensor_pref(GTK_TREE_VIEW(data)); + + if (p) + p->alarm_high_threshold = gtk_spin_button_get_value(btn); +} + +static void on_alarm_low_threshold_changed(GtkSpinButton *btn, gpointer data) { - struct cb_data *cbdata = data; struct sensor_pref *p; - p = get_seleted_sensor_pref(cbdata->builder, cbdata->prefs); + p = get_selected_sensor_pref(GTK_TREE_VIEW(data)); if (p) - p->alarm_limit = gtk_spin_button_get_value(btn); + p->alarm_low_threshold = gtk_spin_button_get_value(btn); } -static void connect_signals(GtkBuilder *builder, struct cb_data *cbdata) +static void connect_signals(GtkBuilder *builder, GtkTreeView *tree) { g_signal_connect(gtk_builder_get_object(builder, "sensor_name"), - "changed", G_CALLBACK(on_name_changed), cbdata); + "changed", G_CALLBACK(on_name_changed), tree); g_signal_connect(gtk_builder_get_object(builder, "sensor_draw"), - "toggled", G_CALLBACK(on_drawed_toggled), cbdata); + "toggled", G_CALLBACK(on_drawed_toggled), tree); g_signal_connect(gtk_builder_get_object(builder, "sensor_color"), - "color-set", G_CALLBACK(on_color_set), cbdata); + "color-set", G_CALLBACK(on_color_set), tree); g_signal_connect(gtk_builder_get_object(builder, "sensor_alarm"), - "toggled", G_CALLBACK(on_alarm_toggled), cbdata); - - g_signal_connect(gtk_builder_get_object(builder, "sensor_temp_limit"), - "value-changed", G_CALLBACK(on_temp_limit_changed), - cbdata); + "toggled", G_CALLBACK(on_alarm_toggled), tree); + + g_signal_connect(gtk_builder_get_object(builder, + "sensor_alarm_high_threshold"), + "value-changed", + G_CALLBACK(on_alarm_high_threshold_changed), + tree); + + g_signal_connect(gtk_builder_get_object(builder, + "sensor_alarm_low_threshold"), + "value-changed", + G_CALLBACK(on_alarm_low_threshold_changed), + tree); + + g_signal_connect(gtk_builder_get_object(builder, + "indicator_checkbox"), + "toggled", + G_CALLBACK(on_appindicator_toggled), + tree); } static void -update_pref(struct psensor *s, struct sensor_pref **prefs, GtkBuilder *builder) +update_pref(struct sensor_pref *p, struct config *cfg, GtkBuilder *builder) { - GtkLabel *w_id, *w_type; + GtkLabel *w_id, *w_type, *w_high_threshold_unit, *w_low_threshold_unit, + *w_chipname; GtkEntry *w_name; - GtkToggleButton *w_draw, *w_alarm; + GtkToggleButton *w_draw, *w_alarm, *w_appindicator_enabled; GtkColorButton *w_color; - GtkSpinButton *w_temp_limit; + GtkSpinButton *w_high_threshold, *w_low_threshold; GdkColor *color; - struct sensor_pref *p = sensor_pref_get(prefs, s); + struct psensor *s; + int use_celcius; + + s = p->sensor; w_id = GTK_LABEL(gtk_builder_get_object(builder, "sensor_id")); gtk_label_set_text(w_id, s->id); @@ -243,6 +241,12 @@ update_pref(struct psensor *s, struct sensor_pref **prefs, GtkBuilder *builder) w_name = GTK_ENTRY(gtk_builder_get_object(builder, "sensor_name")); gtk_entry_set_text(w_name, p->name); + w_chipname = GTK_LABEL(gtk_builder_get_object(builder, "chip_name")); + if (s->chip) + gtk_label_set_text(w_chipname, s->chip); + else + gtk_label_set_text(w_chipname, _("Unknown")); + w_draw = GTK_TOGGLE_BUTTON(gtk_builder_get_object(builder, "sensor_draw")); gtk_toggle_button_set_active(w_draw, p->enabled); @@ -254,58 +258,80 @@ update_pref(struct psensor *s, struct sensor_pref **prefs, GtkBuilder *builder) w_alarm = GTK_TOGGLE_BUTTON(gtk_builder_get_object(builder, "sensor_alarm")); - w_temp_limit - = GTK_SPIN_BUTTON(gtk_builder_get_object(builder, - "sensor_temp_limit")); - - if (is_temp_type(s->type)) { + w_high_threshold = GTK_SPIN_BUTTON(gtk_builder_get_object + (builder, + "sensor_alarm_high_threshold")); + w_low_threshold = GTK_SPIN_BUTTON(gtk_builder_get_object + (builder, + "sensor_alarm_low_threshold")); + + w_high_threshold_unit = GTK_LABEL(gtk_builder_get_object + (builder, + "sensor_alarm_high_threshold_unit")); + w_low_threshold_unit = GTK_LABEL(gtk_builder_get_object + (builder, + "sensor_alarm_low_threshold_unit")); + + use_celcius = cfg->temperature_unit == CELCIUS ? 1 : 0; + gtk_label_set_text(w_high_threshold_unit, + psensor_type_to_unit_str(s->type, + use_celcius)); + gtk_label_set_text(w_low_threshold_unit, + psensor_type_to_unit_str(s->type, + use_celcius)); + + w_appindicator_enabled = GTK_TOGGLE_BUTTON + (gtk_builder_get_object(builder, "indicator_checkbox")); + + if (is_temp_type(s->type) || is_fan_type(s->type)) { gtk_toggle_button_set_active(w_alarm, p->alarm_enabled); - gtk_spin_button_set_value(w_temp_limit, p->alarm_limit); + gtk_spin_button_set_value(w_high_threshold, + p->alarm_high_threshold); + gtk_spin_button_set_value(w_low_threshold, + p->alarm_low_threshold); gtk_widget_set_sensitive(GTK_WIDGET(w_alarm), TRUE); - gtk_widget_set_sensitive(GTK_WIDGET(w_temp_limit), TRUE); + gtk_widget_set_sensitive(GTK_WIDGET(w_high_threshold), TRUE); + gtk_widget_set_sensitive(GTK_WIDGET(w_low_threshold), TRUE); } else { gtk_toggle_button_set_active(w_alarm, 0); - gtk_spin_button_set_value(w_temp_limit, 0); + gtk_spin_button_set_value(w_high_threshold, 0); + gtk_spin_button_set_value(w_low_threshold, 0); gtk_widget_set_sensitive(GTK_WIDGET(w_alarm), FALSE); - gtk_widget_set_sensitive(GTK_WIDGET(w_temp_limit), FALSE); + gtk_widget_set_sensitive(GTK_WIDGET(w_high_threshold), FALSE); + gtk_widget_set_sensitive(GTK_WIDGET(w_low_threshold), FALSE); } + + gtk_toggle_button_set_active(w_appindicator_enabled, + p->appindicator_enabled); } static void on_changed(GtkTreeSelection *selection, gpointer data) { - GtkTreeModel *model; - GtkTreeIter iter; struct cb_data *cbdata = data; struct ui_psensor *ui = cbdata->ui; + struct sensor_pref *p; + GtkTreeView *tree; - if (gtk_tree_selection_get_selected(selection, &model, &iter)) { - GtkTreePath *p = gtk_tree_model_get_path(model, &iter); - gint *indices = gtk_tree_path_get_indices(p); - struct psensor *s = *(ui->sensors + *indices); - - update_pref(s, cbdata->prefs, cbdata->builder); - - gtk_tree_path_free(p); - } + tree = GTK_TREE_VIEW(gtk_builder_get_object(cbdata->builder, + "sensors_list")); + p = get_selected_sensor_pref(tree); + update_pref(p, ui->config, cbdata->builder); } static void select_sensor(struct psensor *s, struct psensor **sensors, GtkTreeView *tree) { - struct psensor **s_cur = sensors; - int i = 0; - GtkTreePath *p = NULL; + struct psensor **s_cur; + int i; + GtkTreePath *p; - while (*s_cur) { + p = NULL; + for (s_cur = sensors, i = 0; *s_cur; s_cur++, i++) if (s == *s_cur) { p = gtk_tree_path_new_from_indices(i, -1); break; } - i++; - s_cur++; - } - if (p) { GtkTreeSelection *s = gtk_tree_view_get_selection(tree); @@ -314,42 +340,66 @@ select_sensor(struct psensor *s, struct psensor **sensors, GtkTreeView *tree) } } -static void -apply_prefs(struct sensor_pref **prefs, struct psensor **sensors) +static void apply_pref(struct sensor_pref *p, int pos, struct config *cfg) { - int n = psensor_list_size(sensors); - int i; + struct psensor *s; - for (i = 0; i < n; i++) { - struct psensor *s = sensors[i]; - struct sensor_pref *p = prefs[i]; + s = p->sensor; - if (strcmp(p->name, s->name)) { - free(s->name); - s->name = strdup(p->name); - config_set_sensor_name(s->id, s->name); - } + if (strcmp(p->name, s->name)) { + free(s->name); + s->name = strdup(p->name); + config_set_sensor_name(s->id, s->name); + } - if (s->enabled != p->enabled) { - s->enabled = p->enabled; - config_set_sensor_enabled(s->id, s->enabled); - } + if (s->graph_enabled != p->enabled) { + s->graph_enabled = p->enabled; + config_set_sensor_enabled(s->id, s->graph_enabled); + } - if (s->alarm_limit != p->alarm_limit) { - s->alarm_limit = p->alarm_limit; - config_set_sensor_alarm_limit(s->id, - s->alarm_limit); - } + if (is_temp_type(s->type) && cfg->temperature_unit == FAHRENHEIT) { + s->alarm_high_threshold + = fahrenheit_to_celcius(p->alarm_high_threshold); + s->alarm_low_threshold + = fahrenheit_to_celcius(p->alarm_low_threshold); + } else { + s->alarm_high_threshold = p->alarm_high_threshold; + s->alarm_low_threshold = p->alarm_low_threshold; + } - if (s->alarm_enabled != p->alarm_enabled) { - s->alarm_enabled = p->alarm_enabled; - config_set_sensor_alarm_enabled(s->id, - s->alarm_enabled); - } + config_set_sensor_alarm_high_threshold(s->id, s->alarm_high_threshold); + config_set_sensor_alarm_low_threshold(s->id, s->alarm_low_threshold); + + if (s->alarm_enabled != p->alarm_enabled) { + s->alarm_enabled = p->alarm_enabled; + config_set_sensor_alarm_enabled(s->id, s->alarm_enabled); + } + + color_set(s->color, p->color->red, p->color->green, p->color->blue); + config_set_sensor_color(s->id, s->color); + + if (s->appindicator_enabled != p->appindicator_enabled) { + s->appindicator_enabled = p->appindicator_enabled; + config_set_appindicator_enabled(s->id, s->appindicator_enabled); + } - color_set(s->color, - p->color->red, p->color->green, p->color->blue); - config_set_sensor_color(s->id, s->color); + config_set_sensor_position(s->id, pos); +} + +static void apply_prefs(GtkTreeModel *model, struct config *cfg) +{ + gboolean valid; + struct sensor_pref *spref; + GtkTreeIter iter; + int i; + + valid = gtk_tree_model_get_iter_first(model, &iter); + i = 0; + while (valid) { + gtk_tree_model_get(model, &iter, COL_SENSOR_PREF, &spref, -1); + apply_pref(spref, i, cfg); + valid = gtk_tree_model_iter_next(model, &iter); + i++; } } @@ -357,22 +407,25 @@ void ui_sensorpref_dialog_run(struct psensor *sensor, struct ui_psensor *ui) { GtkDialog *diag; gint result; + guint ok; GtkBuilder *builder; - GError *error = NULL; + GError *error; GtkTreeView *w_sensors_list; - guint ok; - GtkCellRenderer *renderer; GtkListStore *store; - struct psensor **s_cur; + struct psensor **s_cur, *s, **ordered_sensors; GtkTreeSelection *selection; struct cb_data cbdata; + GtkTreeIter iter; + struct sensor_pref *spref; + gboolean valid; + GtkTreeModel *model; cbdata.ui = ui; - cbdata.prefs = sensor_pref_list_new(ui->sensors); builder = gtk_builder_new(); cbdata.builder = builder; + error = NULL; ok = gtk_builder_add_from_file (builder, PACKAGE_DATA_DIR G_DIR_SEPARATOR_S "sensor-edit.glade", @@ -384,48 +437,56 @@ void ui_sensorpref_dialog_run(struct psensor *sensor, struct ui_psensor *ui) return ; } - update_pref(sensor, cbdata.prefs, builder); - connect_signals(builder, &cbdata); - w_sensors_list = GTK_TREE_VIEW(gtk_builder_get_object(builder, "sensors_list")); + connect_signals(builder, w_sensors_list); - renderer = gtk_cell_renderer_text_new(); - gtk_tree_view_insert_column_with_attributes(w_sensors_list, - -1, - _("Sensor Name"), - renderer, - "text", 0, NULL); - - store = GTK_LIST_STORE(gtk_tree_view_get_model(w_sensors_list)); - - s_cur = ui->sensors; - while (*s_cur) { - GtkTreeIter iter; - struct psensor *s = *s_cur; + store = GTK_LIST_STORE(gtk_builder_get_object(builder, + "sensors_liststore")); + ordered_sensors = ui_get_sensors_ordered_by_position(ui); + for (s_cur = ordered_sensors; *s_cur; s_cur++) { + s = *s_cur; gtk_list_store_append(store, &iter); - gtk_list_store_set(store, &iter, 0, s->name, -1); - s_cur++; + spref = sensor_pref_new(s, ui->config); + gtk_list_store_set(store, &iter, + COL_NAME, s->name, + COL_SENSOR_PREF, spref, + -1); + + if (s == sensor) + update_pref(spref, ui->config, builder); } selection = gtk_tree_view_get_selection(w_sensors_list); g_signal_connect(selection, "changed", G_CALLBACK(on_changed), &cbdata); - select_sensor(sensor, ui->sensors, w_sensors_list); + select_sensor(sensor, ordered_sensors, w_sensors_list); + + free(ordered_sensors); diag = GTK_DIALOG(gtk_builder_get_object(builder, "dialog1")); result = gtk_dialog_run(diag); + model = gtk_tree_view_get_model(w_sensors_list); + if (result == GTK_RESPONSE_ACCEPT) { - apply_prefs(cbdata.prefs, ui->sensors); - ui_sensorlist_update_sensors_preferences(ui); + apply_prefs(model, ui->config); + ui_sensorlist_update(ui, 1); +#if defined(HAVE_APPINDICATOR) || defined(HAVE_APPINDICATOR_029) + ui_appindicator_update_menu(ui); +#endif + } + + valid = gtk_tree_model_get_iter_first(model, &iter); + while (valid) { + gtk_tree_model_get(model, &iter, COL_SENSOR_PREF, &spref, -1); + sensor_pref_free(spref); + valid = gtk_tree_model_iter_next(model, &iter); } g_object_unref(G_OBJECT(builder)); gtk_widget_destroy(GTK_WIDGET(diag)); - - sensor_pref_list_free(cbdata.prefs); } diff --git a/src/ui_sensorpref.h b/src/ui_sensorpref.h index 3ea5761..e46b8d2 100644 --- a/src/ui_sensorpref.h +++ b/src/ui_sensorpref.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 jeanfi@gmail.com + * Copyright (C) 2010-2013 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as diff --git a/src/ui_status.c b/src/ui_status.c index 90f6f7a..d39284b 100644 --- a/src/ui_status.c +++ b/src/ui_status.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 jeanfi@gmail.com + * Copyright (C) 2010-2013 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -29,7 +29,6 @@ static void cb_activate(GtkStatusIcon *icon, gpointer data) { log_debug("cb_activate()"); - ui_window_show((struct ui_psensor *)data); } @@ -50,7 +49,7 @@ void ui_status_init(struct ui_psensor *ui) status = gtk_status_icon_new(); gtk_status_icon_set_from_icon_name(status, ICON); - gtk_status_icon_set_visible(status, TRUE); + ui_status_set_visible(0); g_signal_connect(G_OBJECT(status), "popup-menu", @@ -97,3 +96,15 @@ GtkStatusIcon *ui_status_get_icon(struct ui_psensor *ui) return status; } + +void ui_status_set_visible(unsigned int visible) +{ + log_debug("ui_status_set_visible(%d)", visible); + + if (status) { + if (visible) + gtk_status_icon_set_visible(status, TRUE); + else + gtk_status_icon_set_visible(status, FALSE); + } +} diff --git a/src/ui_status.h b/src/ui_status.h index b812038..d215f0f 100644 --- a/src/ui_status.h +++ b/src/ui_status.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 jeanfi@gmail.com + * Copyright (C) 2010-2013 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -29,5 +29,7 @@ void ui_status_update(struct ui_psensor *ui, unsigned int attention); /* Whether status icon is supported i.e. visible. */ int is_status_supported(); GtkStatusIcon *ui_status_get_icon(struct ui_psensor *ui); +/* Whether the statuc icon should be visible.*/ +void ui_status_set_visible(unsigned int visible); #endif diff --git a/src/ui_unity.c b/src/ui_unity.c index 9e74002..b9461d1 100644 --- a/src/ui_unity.c +++ b/src/ui_unity.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 jeanfi@gmail.com + * Copyright (C) 2010-2013 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -25,8 +25,12 @@ static UnityLauncherEntry *psensor_entry; static unsigned int last_visible = -1; void ui_unity_launcher_entry_update(struct psensor **sensors, - unsigned int show) + unsigned int show, + int use_celcius) { + double v; + + if (!initialized) { psensor_entry = unity_launcher_entry_get_for_desktop_file ("psensor.desktop"); @@ -46,10 +50,11 @@ void ui_unity_launcher_entry_update(struct psensor **sensors, } if (sensors && *sensors) { - double v; - v = psensor_get_max_current_value(sensors, SENSOR_TYPE_TEMP); + if (!use_celcius) + v = celcius_to_fahrenheit(v); + unity_launcher_entry_set_count(psensor_entry, v); } } diff --git a/src/ui_unity.h b/src/ui_unity.h index 9926c1d..4a40b1b 100644 --- a/src/ui_unity.h +++ b/src/ui_unity.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 jeanfi@gmail.com + * Copyright (C) 2010-2013 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -22,6 +22,7 @@ #include "psensor.h" void ui_unity_launcher_entry_update(struct psensor **sensors, - unsigned int show); + unsigned int show, + int use_celcius); #endif diff --git a/tests/Makefile.am b/tests/Makefile.am index 1acf104..554305d 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,5 +1,44 @@ check-local: checkpatch.pl - find $(top_srcdir)/src -name \*.c -exec $(srcdir)/checkpatch.pl -q --no-tree -emacs -f {} \; - find $(top_srcdir)/src -name \*.h -exec $(srcdir)/checkpatch.pl -q --no-tree -emacs -f {} \; + find $(top_srcdir)/src -name \*.c -exec $(srcdir)/checkpatch.pl --ignore SPLIT_STRING --show-types -q --no-tree -emacs -f {} \; + find $(top_srcdir)/src -name \*.h -exec $(srcdir)/checkpatch.pl --ignore SPLIT_STRING --show-types -q --no-tree -emacs -f {} \; -EXTRA_DIST = checkpatch.pl \ No newline at end of file +DEFS = -DPACKAGE_DATA_DIR=\"$(pkgdatadir)\" -DLOCALEDIR=\"$(localedir)\" @DEFS@ + +EXTRA_DIST = checkpatch.pl \ + test-cppcheck.sh \ + test-io-dir-list.sh + +check_PROGRAMS = test-io-dir-list \ + test-psensor-type-to-unit-str \ + test-psensor-value-to-str \ + test-url-encode \ + test-url-normalize + +AM_CPPFLAGS = -Wall -Werror + +LIBS += ../src/lib/libpsensor.a \ + $(SENSORS_LIBS) + +if ATASMART +LIBS += $(ATASMART_LIBS) +endif + +if GTOP +LIBS += $(GTOP_LIBS) +endif + +test_io_dir_list_SOURCES = test_io_dir_list.c +test_psensor_type_to_unit_str_SOURCES = test_psensor_type_to_unit_str.c +test_psensor_value_to_str_SOURCES = test_psensor_value_to_str.c +test_url_encode_SOURCES = test_url_encode.c +test_url_normalize_SOURCES = test_url_normalize.c + +TESTS = test-io-dir-list.sh \ + test-psensor-type-to-unit-str \ + test-psensor-value-to-str \ + test-url-encode \ + test-url-normalize + +if CPPCHECK +TESTS += test-cppcheck.sh +endif \ No newline at end of file diff --git a/tests/Makefile.in b/tests/Makefile.in index 992e7a5..fa88ff7 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -15,6 +15,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -33,6 +50,16 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +check_PROGRAMS = test-io-dir-list$(EXEEXT) \ + test-psensor-type-to-unit-str$(EXEEXT) \ + test-psensor-value-to-str$(EXEEXT) test-url-encode$(EXEEXT) \ + test-url-normalize$(EXEEXT) +@ATASMART_TRUE@am__append_1 = $(ATASMART_LIBS) +@GTOP_TRUE@am__append_2 = $(GTOP_LIBS) +TESTS = test-io-dir-list.sh test-psensor-type-to-unit-str$(EXEEXT) \ + test-psensor-value-to-str$(EXEEXT) test-url-encode$(EXEEXT) \ + test-url-normalize$(EXEEXT) $(am__append_3) +@CPPCHECK_TRUE@am__append_3 = test-cppcheck.sh subdir = tests DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -43,13 +70,58 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -SOURCES = -DIST_SOURCES = +am_test_io_dir_list_OBJECTS = test_io_dir_list.$(OBJEXT) +test_io_dir_list_OBJECTS = $(am_test_io_dir_list_OBJECTS) +test_io_dir_list_LDADD = $(LDADD) +am_test_psensor_type_to_unit_str_OBJECTS = \ + test_psensor_type_to_unit_str.$(OBJEXT) +test_psensor_type_to_unit_str_OBJECTS = \ + $(am_test_psensor_type_to_unit_str_OBJECTS) +test_psensor_type_to_unit_str_LDADD = $(LDADD) +am_test_psensor_value_to_str_OBJECTS = \ + test_psensor_value_to_str.$(OBJEXT) +test_psensor_value_to_str_OBJECTS = \ + $(am_test_psensor_value_to_str_OBJECTS) +test_psensor_value_to_str_LDADD = $(LDADD) +am_test_url_encode_OBJECTS = test_url_encode.$(OBJEXT) +test_url_encode_OBJECTS = $(am_test_url_encode_OBJECTS) +test_url_encode_LDADD = $(LDADD) +am_test_url_normalize_OBJECTS = test_url_normalize.$(OBJEXT) +test_url_normalize_OBJECTS = $(am_test_url_normalize_OBJECTS) +test_url_normalize_LDADD = $(LDADD) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +SOURCES = $(test_io_dir_list_SOURCES) \ + $(test_psensor_type_to_unit_str_SOURCES) \ + $(test_psensor_value_to_str_SOURCES) \ + $(test_url_encode_SOURCES) $(test_url_normalize_SOURCES) +DIST_SOURCES = $(test_io_dir_list_SOURCES) \ + $(test_psensor_type_to_unit_str_SOURCES) \ + $(test_psensor_value_to_str_SOURCES) \ + $(test_url_encode_SOURCES) $(test_url_normalize_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ APPINDICATOR_CFLAGS = @APPINDICATOR_CFLAGS@ APPINDICATOR_LIBS = @APPINDICATOR_LIBS@ +AR = @AR@ +ATASMART_CFLAGS = @ATASMART_CFLAGS@ +ATASMART_LIBS = @ATASMART_LIBS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -62,15 +134,18 @@ CPPFLAGS = @CPPFLAGS@ CURL_CFLAGS = @CURL_CFLAGS@ CURL_LIBS = @CURL_LIBS@ CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ +DEFS = -DPACKAGE_DATA_DIR=\"$(pkgdatadir)\" -DLOCALEDIR=\"$(localedir)\" @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +GCONFTOOL = @GCONFTOOL@ GCONF_CFLAGS = @GCONF_CFLAGS@ GCONF_LIBS = @GCONF_LIBS@ +GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ +GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ @@ -79,6 +154,7 @@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ GTOP_CFLAGS = @GTOP_CFLAGS@ GTOP_LIBS = @GTOP_LIBS@ +HAVE_CPPCHECK = @HAVE_CPPCHECK@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -99,7 +175,8 @@ LIBMICROHTTPD_LIBS = @LIBMICROHTTPD_LIBS@ LIBNOTIFY_CFLAGS = @LIBNOTIFY_CFLAGS@ LIBNOTIFY_LIBS = @LIBNOTIFY_LIBS@ LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ +LIBS = @LIBS@ ../src/lib/libpsensor.a $(SENSORS_LIBS) $(am__append_1) \ + $(am__append_2) LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ @@ -123,6 +200,7 @@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ +PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SENSORS_LIBS = @SENSORS_LIBS@ SET_MAKE = @SET_MAKE@ @@ -144,6 +222,7 @@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ @@ -190,10 +269,20 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -EXTRA_DIST = checkpatch.pl +EXTRA_DIST = checkpatch.pl \ + test-cppcheck.sh \ + test-io-dir-list.sh + +AM_CPPFLAGS = -Wall -Werror +test_io_dir_list_SOURCES = test_io_dir_list.c +test_psensor_type_to_unit_str_SOURCES = test_psensor_type_to_unit_str.c +test_psensor_value_to_str_SOURCES = test_psensor_value_to_str.c +test_url_encode_SOURCES = test_url_encode.c +test_url_normalize_SOURCES = test_url_normalize.c all: all-am .SUFFIXES: +.SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ @@ -224,12 +313,195 @@ $(top_srcdir)/configure: $(am__configure_deps) $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): + +clean-checkPROGRAMS: + -test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS) +test-io-dir-list$(EXEEXT): $(test_io_dir_list_OBJECTS) $(test_io_dir_list_DEPENDENCIES) $(EXTRA_test_io_dir_list_DEPENDENCIES) + @rm -f test-io-dir-list$(EXEEXT) + $(LINK) $(test_io_dir_list_OBJECTS) $(test_io_dir_list_LDADD) $(LIBS) +test-psensor-type-to-unit-str$(EXEEXT): $(test_psensor_type_to_unit_str_OBJECTS) $(test_psensor_type_to_unit_str_DEPENDENCIES) $(EXTRA_test_psensor_type_to_unit_str_DEPENDENCIES) + @rm -f test-psensor-type-to-unit-str$(EXEEXT) + $(LINK) $(test_psensor_type_to_unit_str_OBJECTS) $(test_psensor_type_to_unit_str_LDADD) $(LIBS) +test-psensor-value-to-str$(EXEEXT): $(test_psensor_value_to_str_OBJECTS) $(test_psensor_value_to_str_DEPENDENCIES) $(EXTRA_test_psensor_value_to_str_DEPENDENCIES) + @rm -f test-psensor-value-to-str$(EXEEXT) + $(LINK) $(test_psensor_value_to_str_OBJECTS) $(test_psensor_value_to_str_LDADD) $(LIBS) +test-url-encode$(EXEEXT): $(test_url_encode_OBJECTS) $(test_url_encode_DEPENDENCIES) $(EXTRA_test_url_encode_DEPENDENCIES) + @rm -f test-url-encode$(EXEEXT) + $(LINK) $(test_url_encode_OBJECTS) $(test_url_encode_LDADD) $(LIBS) +test-url-normalize$(EXEEXT): $(test_url_normalize_OBJECTS) $(test_url_normalize_DEPENDENCIES) $(EXTRA_test_url_normalize_DEPENDENCIES) + @rm -f test-url-normalize$(EXEEXT) + $(LINK) $(test_url_normalize_OBJECTS) $(test_url_normalize_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_io_dir_list.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_psensor_type_to_unit_str.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_psensor_value_to_str.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_url_encode.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_url_normalize.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique tags: TAGS -TAGS: +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi ctags: CTAGS -CTAGS: - +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + fi; \ + echo "$${col}$$dashes$${std}"; \ + echo "$${col}$$banner$${std}"; \ + test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ + test -z "$$report" || echo "$${col}$$report$${std}"; \ + echo "$${col}$$dashes$${std}"; \ + test "$$failed" -eq 0; \ + else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ @@ -262,7 +534,8 @@ distdir: $(DISTFILES) fi; \ done check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) check-local + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS check-local check: check-am all-am: Makefile installdirs: @@ -276,10 +549,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -293,11 +571,13 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-generic mostlyclean-am +clean-am: clean-checkPROGRAMS clean-generic mostlyclean-am distclean: distclean-am + -rm -rf ./$(DEPDIR) -rm -f Makefile -distclean-am: clean-am distclean-generic +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags dvi: dvi-am @@ -340,12 +620,13 @@ install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am -mostlyclean-am: mostlyclean-generic +mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am @@ -359,20 +640,22 @@ uninstall-am: .MAKE: check-am install-am install-strip -.PHONY: all all-am check check-am check-local clean clean-generic \ - distclean distclean-generic distdir dvi dvi-am html html-am \ - info info-am install install-am install-data install-data-am \ - install-dvi install-dvi-am install-exec install-exec-am \ - install-html install-html-am install-info install-info-am \ - install-man install-pdf install-pdf-am install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \ +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am check-local \ + clean clean-checkPROGRAMS clean-generic ctags distclean \ + distclean-compile distclean-generic distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am check-local: checkpatch.pl - find $(top_srcdir)/src -name \*.c -exec $(srcdir)/checkpatch.pl -q --no-tree -emacs -f {} \; - find $(top_srcdir)/src -name \*.h -exec $(srcdir)/checkpatch.pl -q --no-tree -emacs -f {} \; + find $(top_srcdir)/src -name \*.c -exec $(srcdir)/checkpatch.pl --ignore SPLIT_STRING --show-types -q --no-tree -emacs -f {} \; + find $(top_srcdir)/src -name \*.h -exec $(srcdir)/checkpatch.pl --ignore SPLIT_STRING --show-types -q --no-tree -emacs -f {} \; # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/tests/checkpatch.pl b/tests/checkpatch.pl index df24d22..faea0ec 100755 --- a/tests/checkpatch.pl +++ b/tests/checkpatch.pl @@ -1,7 +1,4 @@ #!/usr/bin/perl -w - -# This script has been copied from Linux Kernel sources. -# # (c) 2001, Dave Jones. (the file handling bit) # (c) 2005, Joel Schopp (the ugly bit) # (c) 2007,2008, Andy Whitcroft (new conditions, test suite) @@ -230,7 +227,7 @@ our $Inline = qr{inline|__always_inline|noinline}; our $Member = qr{->$Ident|\.$Ident|\[[^]]*\]}; our $Lval = qr{$Ident(?:$Member)*}; -our $Constant = qr{(?:[0-9]+|0x[0-9a-fA-F]+)[UL]*}; +our $Constant = qr{(?i:(?:[0-9]+|0x[0-9a-f]+)[ul]*)}; our $Assignment = qr{(?:\*\=|/=|%=|\+=|-=|<<=|>>=|&=|\^=|\|=|=)}; our $Compare = qr{<=|>=|==|!=|<|>}; our $Operators = qr{ @@ -318,7 +315,7 @@ sub build_types { $NonptrType = qr{ (?:$Modifier\s+|const\s+)* (?: - (?:typeof|__typeof__)\s*\(\s*\**\s*$Ident\s*\)| + (?:typeof|__typeof__)\s*\([^\)]*\)| (?:$typeTypedefs\b)| (?:${all}\b) ) @@ -326,17 +323,23 @@ sub build_types { }x; $Type = qr{ $NonptrType - (?:[\s\*]+\s*const|[\s\*]+|(?:\s*\[\s*\])+)? + (?:(?:\s|\*|\[\])+\s*const|(?:\s|\*|\[\])+|(?:\s*\[\s*\])+)? (?:\s+$Inline|\s+$Modifier)* }x; $Declare = qr{(?:$Storage\s+)?$Type}; } build_types(); -our $match_balanced_parentheses = qr/(\((?:[^\(\)]+|(-1))*\))/; our $Typecast = qr{\s*(\(\s*$NonptrType\s*\)){0,1}\s*}; -our $LvalOrFunc = qr{($Lval)\s*($match_balanced_parentheses{0,1})\s*}; + +# Using $balanced_parens, $LvalOrFunc, or $FuncArg +# requires at least perl version v5.10.0 +# Any use must be runtime checked with $^V + +our $balanced_parens = qr/(\((?:[^\(\)]++|(?-1))*\))/; +our $LvalOrFunc = qr{($Lval)\s*($balanced_parens{0,1})\s*}; +our $FuncArg = qr{$Typecast{0,1}($LvalOrFunc|$Constant)}; sub deparenthesize { my ($string) = @_; @@ -679,6 +682,10 @@ sub ctx_statement_block { if ($off >= $len) { last; } + if ($level == 0 && substr($blk, $off) =~ /^.\s*#\s*define/) { + $level++; + $type = '#'; + } } $p = $c; $c = substr($blk, $off, 1); @@ -741,6 +748,13 @@ sub ctx_statement_block { last; } } + # Preprocessor commands end at the newline unless escaped. + if ($type eq '#' && $c eq "\n" && $p ne "\\") { + $level--; + $type = ''; + $off++; + last; + } $off++; } # We are truly at the end, so shuffle to the next line. @@ -1023,7 +1037,7 @@ sub annotate_values { } elsif ($cur =~ /^(\(\s*$Type\s*)\)/ && $av_pending eq '_') { print "CAST($1)\n" if ($dbg_values > 1); push(@av_paren_type, $type); - $type = 'C'; + $type = 'c'; } elsif ($cur =~ /^($Type)\s*(?:$Ident|,|\)|\(|\s*$)/) { print "DECLARE($1)\n" if ($dbg_values > 1); @@ -1215,7 +1229,9 @@ sub possible { case| else| asm|__asm__| - do + do| + \#| + \#\#| )(?:\s|$)| ^(?:typedef|struct|enum)\b )}x; @@ -1319,6 +1335,36 @@ sub check_absolute_file { } } +sub pos_last_openparen { + my ($line) = @_; + + my $pos = 0; + + my $opens = $line =~ tr/\(/\(/; + my $closes = $line =~ tr/\)/\)/; + + my $last_openparen = 0; + + if (($opens == 0) || ($closes >= $opens)) { + return -1; + } + + my $len = length($line); + + for ($pos = 0; $pos < $len; $pos++) { + my $string = substr($line, $pos); + if ($string =~ /^($FuncArg|$balanced_parens)/) { + $pos += length($1) - 1; + } elsif (substr($line, $pos, 1) eq '(') { + $last_openparen = $pos; + } elsif (index($string, '(') == -1) { + last; + } + } + + return $last_openparen + 1; +} + sub process { my $filename = shift; @@ -1362,6 +1408,7 @@ sub process { my %suppress_ifbraces; my %suppress_whiletrailers; my %suppress_export; + my $suppress_statement = 0; # Pre-scan the patch sanitizing the lines. # Pre-scan the patch looking for any __setup documentation. @@ -1471,6 +1518,7 @@ sub process { %suppress_ifbraces = (); %suppress_whiletrailers = (); %suppress_export = (); + $suppress_statement = 0; next; # track the line number as we move through the hunk, note that @@ -1507,9 +1555,11 @@ sub process { if ($line =~ /^diff --git.*?(\S+)$/) { $realfile = $1; $realfile =~ s@^([^/]*)/@@; + $in_commit_log = 0; } elsif ($line =~ /^\+\+\+\s+(\S+)/) { $realfile = $1; $realfile =~ s@^([^/]*)/@@; + $in_commit_log = 0; $p1_prefix = $1; if (!$file && $tree && $p1_prefix ne '' && @@ -1549,7 +1599,8 @@ sub process { } # Check signature styles - if ($line =~ /^(\s*)($signature_tags)(\s*)(.*)/) { + if (!$in_header_lines && + $line =~ /^(\s*)($signature_tags)(\s*)(.*)/) { my $space_before = $1; my $sign_off = $2; my $space_after = $3; @@ -1626,7 +1677,7 @@ sub process { # Check if it's the start of a commit log # (not a header line and we haven't seen the patch filename) if ($in_header_lines && $realfile =~ /^$/ && - $rawline !~ /^(commit\b|from\b|\w+:).+$/i) { + $rawline !~ /^(commit\b|from\b|[\w-]+:).+$/i) { $in_header_lines = 0; $in_commit_log = 1; } @@ -1658,19 +1709,26 @@ sub process { # Only applies when adding the entry originally, after that we do not have # sufficient context to determine whether it is indeed long enough. if ($realfile =~ /Kconfig/ && - $line =~ /\+\s*(?:---)?help(?:---)?$/) { + $line =~ /.\s*config\s+/) { my $length = 0; my $cnt = $realcnt; my $ln = $linenr + 1; my $f; + my $is_start = 0; my $is_end = 0; - while ($cnt > 0 && defined $lines[$ln - 1]) { + for (; $cnt > 0 && defined $lines[$ln - 1]; $ln++) { $f = $lines[$ln - 1]; $cnt-- if ($lines[$ln - 1] !~ /^-/); $is_end = $lines[$ln - 1] =~ /^\+/; - $ln++; next if ($f =~ /^-/); + + if ($lines[$ln - 1] =~ /.\s*(?:bool|tristate)\s*\"/) { + $is_start = 1; + } elsif ($lines[$ln - 1] =~ /.\s*(?:---)?help(?:---)?$/) { + $length = -1; + } + $f =~ s/^.//; $f =~ s/#.*//; $f =~ s/^\s+//; @@ -1682,8 +1740,8 @@ sub process { $length++; } WARN("CONFIG_DESCRIPTION", - "please write a paragraph that describes the config symbol fully\n" . $herecurr) if ($is_end && $length < 4); - #print "is_end<$is_end> length<$length>\n"; + "please write a paragraph that describes the config symbol fully\n" . $herecurr) if ($is_start && $is_end && $length < 4); + #print "is_start<$is_start> is_end<$is_end> length<$length>\n"; } if (($realfile =~ /Makefile.*/ || $realfile =~ /Kbuild.*/) && @@ -1714,6 +1772,21 @@ sub process { "line over 80 characters\n" . $herecurr); } +# Check for user-visible strings broken across lines, which breaks the ability +# to grep for the string. Limited to strings used as parameters (those +# following an open parenthesis), which almost completely eliminates false +# positives, as well as warning only once per parameter rather than once per +# line of the string. Make an exception when the previous string ends in a +# newline (multiple lines in one string constant) or \n\t (common in inline +# assembly to indent the instruction on the following line). + if ($line =~ /^\+\s*"/ && + $prevline =~ /"\s*$/ && + $prevline =~ /\(/ && + $prevrawline !~ /\\n(?:\\t)*"\s*$/) { + WARN("SPLIT_STRING", + "quoted string split across lines\n" . $hereprev); + } + # check for spaces before a quoted newline if ($rawline =~ /^.*\".*\s\\n/) { WARN("QUOTED_WHITESPACE_BEFORE_NEWLINE", @@ -1760,6 +1833,42 @@ sub process { "please, no space before tabs\n" . $herevet); } +# check for && or || at the start of a line + if ($rawline =~ /^\+\s*(&&|\|\|)/) { + CHK("LOGICAL_CONTINUATIONS", + "Logical continuations should be on the previous line\n" . $hereprev); + } + +# check multi-line statement indentation matches previous line + if ($^V && $^V ge 5.10.0 && + $prevline =~ /^\+(\t*)(if \(|$Ident\().*(\&\&|\|\||,)\s*$/) { + $prevline =~ /^\+(\t*)(.*)$/; + my $oldindent = $1; + my $rest = $2; + + my $pos = pos_last_openparen($rest); + if ($pos >= 0) { + $line =~ /^\+([ \t]*)/; + my $newindent = $1; + + my $goodtabindent = $oldindent . + "\t" x ($pos / 8) . + " " x ($pos % 8); + my $goodspaceindent = $oldindent . " " x $pos; + + if ($newindent ne $goodtabindent && + $newindent ne $goodspaceindent) { + CHK("PARENTHESIS_ALIGNMENT", + "Alignment should match open parenthesis\n" . $hereprev); + } + } + } + + if ($line =~ /^\+.*\*[ \t]*\)[ \t]+/) { + CHK("SPACING", + "No space is necessary after a cast\n" . $hereprev); + } + # check for spaces at the beginning of a line. # Exceptions: # 1) within comments @@ -1795,12 +1904,24 @@ sub process { # Check for potential 'bare' types my ($stat, $cond, $line_nr_next, $remain_next, $off_next, $realline_next); - if ($realcnt && $line =~ /.\s*\S/) { +#print "LINE<$line>\n"; + if ($linenr >= $suppress_statement && + $realcnt && $line =~ /.\s*\S/) { ($stat, $cond, $line_nr_next, $remain_next, $off_next) = ctx_statement_block($linenr, $realcnt, 0); $stat =~ s/\n./\n /g; $cond =~ s/\n./\n /g; +#print "linenr<$linenr> <$stat>\n"; + # If this statement has no statement boundaries within + # it there is no point in retrying a statement scan + # until we hit end of it. + my $frag = $stat; $frag =~ s/;+\s*$//; + if ($frag !~ /(?:{|;)/) { +#print "skip<$line_nr_next>\n"; + $suppress_statement = $line_nr_next; + } + # Find the real next line. $realline_next = $line_nr_next; if (defined $realline_next && @@ -1889,6 +2010,12 @@ sub process { my $pre_ctx = "$1$2"; my ($level, @ctx) = ctx_statement_level($linenr, $realcnt, 0); + + if ($line =~ /^\+\t{6,}/) { + WARN("DEEP_INDENTATION", + "Too many leading tabs - consider code refactoring\n" . $herecurr); + } + my $ctx_cnt = $realcnt - $#ctx - 1; my $ctx = join("\n", @ctx); @@ -1926,6 +2053,9 @@ sub process { # Check relative indent for conditionals and blocks. if ($line =~ /\b(?:(?:if|while|for)\s*\(|do\b)/ && $line !~ /^.\s*#/ && $line !~ /\}\s*while\s*/) { + ($stat, $cond, $line_nr_next, $remain_next, $off_next) = + ctx_statement_block($linenr, $realcnt, 0) + if (!defined $stat); my ($s, $c) = ($stat, $cond); substr($s, 0, length($c), ''); @@ -2093,7 +2223,7 @@ sub process { # XXX(foo); # EXPORT_SYMBOL(something_foo); my $name = $1; - if ($stat =~ /^.([A-Z_]+)\s*\(\s*($Ident)/ && + if ($stat =~ /^(?:.\s*}\s*\n)?.([A-Z_]+)\s*\(\s*($Ident)/ && $name =~ /^${Ident}_$2/) { #print "FOO C name<$name>\n"; $suppress_export{$realline_next} = 1; @@ -2171,8 +2301,9 @@ sub process { # * goes on variable not on type # (char*[ const]) - if ($line =~ m{\($NonptrType(\s*(?:$Modifier\b\s*|\*\s*)+)\)}) { - my ($from, $to) = ($1, $1); + while ($line =~ m{(\($NonptrType(\s*(?:$Modifier\b\s*|\*\s*)+)\))}g) { + #print "AA<$1>\n"; + my ($from, $to) = ($2, $2); # Should start with a space. $to =~ s/^(\S)/ $1/; @@ -2187,8 +2318,10 @@ sub process { ERROR("POINTER_LOCATION", "\"(foo$from)\" should be \"(foo$to)\"\n" . $herecurr); } - } elsif ($line =~ m{\b$NonptrType(\s*(?:$Modifier\b\s*|\*\s*)+)($Ident)}) { - my ($from, $to, $ident) = ($1, $1, $2); + } + while ($line =~ m{(\b$NonptrType(\s*(?:$Modifier\b\s*|\*\s*)+)($Ident))}g) { + #print "BB<$1>\n"; + my ($from, $to, $ident) = ($2, $2, $3); # Should start with a space. $to =~ s/^(\S)/ $1/; @@ -2278,7 +2411,7 @@ sub process { my ($where, $prefix) = ($-[1], $1); if ($prefix !~ /$Type\s+$/ && ($where != 0 || $prefix !~ /^.\s+$/) && - $prefix !~ /{\s+$/) { + $prefix !~ /[{,]\s+$/) { ERROR("BRACKET_SPACE", "space prohibited before open square bracket '['\n" . $herecurr); } @@ -2571,7 +2704,7 @@ sub process { # Flatten any parentheses $value =~ s/\(/ \(/g; $value =~ s/\)/\) /g; - while ($value =~ s/\[[^\{\}]*\]/1/ || + while ($value =~ s/\[[^\[\]]*\]/1/ || $value !~ /(?:$Ident|-?$Constant)\s* $Compare\s* (?:$Ident|-?$Constant)/x && @@ -2596,28 +2729,6 @@ sub process { } } -# typecasts on min/max could be min_t/max_t - if ($line =~ /^\+(?:.*?)\b(min|max)\s*\($Typecast{0,1}($LvalOrFunc)\s*,\s*$Typecast{0,1}($LvalOrFunc)\s*\)/) { - if (defined $2 || defined $8) { - my $call = $1; - my $cast1 = deparenthesize($2); - my $arg1 = $3; - my $cast2 = deparenthesize($8); - my $arg2 = $9; - my $cast; - - if ($cast1 ne "" && $cast2 ne "") { - $cast = "$cast1 or $cast2"; - } elsif ($cast1 ne "") { - $cast = $cast1; - } else { - $cast = $cast2; - } - WARN("MINMAX", - "$call() should probably be ${call}_t($cast, $arg1, $arg2)\n" . $herecurr); - } - } - # Need a space before open parenthesis after if, while etc if ($line=~/\b(if|while|for|switch)\(/) { ERROR("SPACING", "space required before the open parenthesis '('\n" . $herecurr); @@ -2626,6 +2737,9 @@ sub process { # Check for illegal assignment in if conditional -- and check for trailing # statements after the conditional. if ($line =~ /do\s*(?!{)/) { + ($stat, $cond, $line_nr_next, $remain_next, $off_next) = + ctx_statement_block($linenr, $realcnt, 0) + if (!defined $stat); my ($stat_next) = ctx_statement_block($line_nr_next, $remain_next, $off_next); $stat_next =~ s/\n./\n /g; @@ -2781,47 +2895,13 @@ sub process { my $cnt = $realcnt; my ($off, $dstat, $dcond, $rest); my $ctx = ''; - - my $args = defined($1); - - # Find the end of the macro and limit our statement - # search to that. - while ($cnt > 0 && defined $lines[$ln - 1] && - $lines[$ln - 1] =~ /^(?:-|..*\\$)/) - { - $ctx .= $rawlines[$ln - 1] . "\n"; - $cnt-- if ($lines[$ln - 1] !~ /^-/); - $ln++; - } - $ctx .= $rawlines[$ln - 1]; - ($dstat, $dcond, $ln, $cnt, $off) = - ctx_statement_block($linenr, $ln - $linenr + 1, 0); + ctx_statement_block($linenr, $realcnt, 0); + $ctx = $dstat; #print "dstat<$dstat> dcond<$dcond> cnt<$cnt> off<$off>\n"; #print "LINE<$lines[$ln-1]> len<" . length($lines[$ln-1]) . "\n"; - # Extract the remainder of the define (if any) and - # rip off surrounding spaces, and trailing \'s. - $rest = ''; - while ($off != 0 || ($cnt > 0 && $rest =~ /\\\s*$/)) { - #print "ADDING cnt<$cnt> $off <" . substr($lines[$ln - 1], $off) . "> rest<$rest>\n"; - if ($off != 0 || $lines[$ln - 1] !~ /^-/) { - $rest .= substr($lines[$ln - 1], $off) . "\n"; - $cnt--; - } - $ln++; - $off = 0; - } - $rest =~ s/\\\n.//g; - $rest =~ s/^\s*//s; - $rest =~ s/\s*$//s; - - # Clean up the original statement. - if ($args) { - substr($dstat, 0, length($dcond), ''); - } else { - $dstat =~ s/^.\s*\#\s*define\s+$Ident\s*//; - } + $dstat =~ s/^.\s*\#\s*define\s+$Ident(?:\([^\)]*\))?\s*//; $dstat =~ s/$;//g; $dstat =~ s/\\\n.//g; $dstat =~ s/^\s*//s; @@ -2830,7 +2910,13 @@ sub process { # Flatten any parentheses and braces while ($dstat =~ s/\([^\(\)]*\)/1/ || $dstat =~ s/\{[^\{\}]*\}/1/ || - $dstat =~ s/\[[^\{\}]*\]/1/) + $dstat =~ s/\[[^\[\]]*\]/1/) + { + } + + # Flatten any obvious string concatentation. + while ($dstat =~ s/("X*")\s*$Ident/$1/ || + $dstat =~ s/$Ident\s*("X*")/$1/) { } @@ -2847,23 +2933,33 @@ sub process { ^\"|\"$ }x; #print "REST<$rest> dstat<$dstat> ctx<$ctx>\n"; - if ($rest ne '' && $rest ne ',') { - if ($rest !~ /while\s*\(/ && - $dstat !~ /$exceptions/) - { - ERROR("MULTISTATEMENT_MACRO_USE_DO_WHILE", - "Macros with multiple statements should be enclosed in a do - while loop\n" . "$here\n$ctx\n"); + if ($dstat ne '' && + $dstat !~ /^(?:$Ident|-?$Constant),$/ && # 10, // foo(), + $dstat !~ /^(?:$Ident|-?$Constant);$/ && # foo(); + $dstat !~ /^[!~-]?(?:$Ident|$Constant)$/ && # 10 // foo() // !foo // ~foo // -foo + $dstat !~ /^'X'$/ && # character constants + $dstat !~ /$exceptions/ && + $dstat !~ /^\.$Ident\s*=/ && # .foo = + $dstat !~ /^do\s*$Constant\s*while\s*$Constant;?$/ && # do {...} while (...); // do {...} while (...) + $dstat !~ /^for\s*$Constant$/ && # for (...) + $dstat !~ /^for\s*$Constant\s+(?:$Ident|-?$Constant)$/ && # for (...) bar() + $dstat !~ /^do\s*{/ && # do {... + $dstat !~ /^\({/) # ({... + { + $ctx =~ s/\n*$//; + my $herectx = $here . "\n"; + my $cnt = statement_rawlines($ctx); + + for (my $n = 0; $n < $cnt; $n++) { + $herectx .= raw_line($linenr, $n) . "\n"; } - } elsif ($ctx !~ /;/) { - if ($dstat ne '' && - $dstat !~ /^(?:$Ident|-?$Constant)$/ && - $dstat !~ /$exceptions/ && - $dstat !~ /^\.$Ident\s*=/ && - $dstat =~ /$Operators/) - { + if ($dstat =~ /;/) { + ERROR("MULTISTATEMENT_MACRO_USE_DO_WHILE", + "Macros with multiple statements should be enclosed in a do - while loop\n" . "$herectx"); + } else { ERROR("COMPLEX_MACRO", - "Macros with complex values should be enclosed in parenthesis\n" . "$here\n$ctx\n"); + "Macros with complex values should be enclosed in parenthesis\n" . "$herectx"); } } } @@ -2885,7 +2981,8 @@ sub process { #print "chunks<$#chunks> linenr<$linenr> endln<$endln> level<$level>\n"; #print "APW: <<$chunks[1][0]>><<$chunks[1][1]>>\n"; if ($#chunks > 0 && $level == 0) { - my $allowed = 0; + my @allowed = (); + my $allow = 0; my $seen = 0; my $herectx = $here . "\n"; my $ln = $linenr - 1; @@ -2896,6 +2993,7 @@ sub process { my ($whitespace) = ($cond =~ /^((?:\s*\n[+-])*\s*)/s); my $offset = statement_rawlines($whitespace) - 1; + $allowed[$allow] = 0; #print "COND<$cond> whitespace<$whitespace> offset<$offset>\n"; # We have looked at and allowed this specific line. @@ -2908,23 +3006,34 @@ sub process { $seen++ if ($block =~ /^\s*{/); - #print "cond<$cond> block<$block> allowed<$allowed>\n"; + #print "cond<$cond> block<$block> allowed<$allowed[$allow]>\n"; if (statement_lines($cond) > 1) { #print "APW: ALLOWED: cond<$cond>\n"; - $allowed = 1; + $allowed[$allow] = 1; } if ($block =~/\b(?:if|for|while)\b/) { #print "APW: ALLOWED: block<$block>\n"; - $allowed = 1; + $allowed[$allow] = 1; } if (statement_block_size($block) > 1) { #print "APW: ALLOWED: lines block<$block>\n"; - $allowed = 1; + $allowed[$allow] = 1; } + $allow++; } - if ($seen && !$allowed) { - WARN("BRACES", - "braces {} are not necessary for any arm of this statement\n" . $herectx); + if ($seen) { + my $sum_allowed = 0; + foreach (@allowed) { + $sum_allowed += $_; + } + if ($sum_allowed == 0) { + WARN("BRACES", + "braces {} are not necessary for any arm of this statement\n" . $herectx); + } elsif ($sum_allowed != $allow && + $seen != $allow) { + CHK("BRACES", + "braces {} should be used on all arms of this statement\n" . $herectx); + } } } } @@ -3114,6 +3223,18 @@ sub process { "__aligned(size) is preferred over __attribute__((aligned(size)))\n" . $herecurr); } +# Check for __attribute__ format(printf, prefer __printf + if ($line =~ /\b__attribute__\s*\(\s*\(\s*format\s*\(\s*printf/) { + WARN("PREFER_PRINTF", + "__printf(string-index, first-to-check) is preferred over __attribute__((format(printf, string-index, first-to-check)))\n" . $herecurr); + } + +# Check for __attribute__ format(scanf, prefer __scanf + if ($line =~ /\b__attribute__\s*\(\s*\(\s*format\s*\(\s*scanf\b/) { + WARN("PREFER_SCANF", + "__scanf(string-index, first-to-check) is preferred over __attribute__((format(scanf, string-index, first-to-check)))\n" . $herecurr); + } + # check for sizeof(&) if ($line =~ /\bsizeof\s*\(\s*\&/) { WARN("SIZEOF_ADDRESS", @@ -3126,6 +3247,48 @@ sub process { "Avoid line continuations in quoted strings\n" . $herecurr); } +# Check for misused memsets + if ($^V && $^V ge 5.10.0 && + defined $stat && + $stat =~ /^\+(?:.*?)\bmemset\s*\(\s*$FuncArg\s*,\s*$FuncArg\s*\,\s*$FuncArg\s*\)/s) { + + my $ms_addr = $2; + my $ms_val = $7; + my $ms_size = $12; + + if ($ms_size =~ /^(0x|)0$/i) { + ERROR("MEMSET", + "memset to 0's uses 0 as the 2nd argument, not the 3rd\n" . "$here\n$stat\n"); + } elsif ($ms_size =~ /^(0x|)1$/i) { + WARN("MEMSET", + "single byte memset is suspicious. Swapped 2nd/3rd argument?\n" . "$here\n$stat\n"); + } + } + +# typecasts on min/max could be min_t/max_t + if ($^V && $^V ge 5.10.0 && + defined $stat && + $stat =~ /^\+(?:.*?)\b(min|max)\s*\(\s*$FuncArg\s*,\s*$FuncArg\s*\)/) { + if (defined $2 || defined $7) { + my $call = $1; + my $cast1 = deparenthesize($2); + my $arg1 = $3; + my $cast2 = deparenthesize($7); + my $arg2 = $8; + my $cast; + + if ($cast1 ne "" && $cast2 ne "" && $cast1 ne $cast2) { + $cast = "$cast1 or $cast2"; + } elsif ($cast1 ne "") { + $cast = $cast1; + } else { + $cast = $cast2; + } + WARN("MINMAX", + "$call() should probably be ${call}_t($cast, $arg1, $arg2)\n" . "$here\n$stat\n"); + } + } + # check for new externs in .c files. if ($realfile =~ /\.c$/ && defined $stat && $stat =~ /^.\s*(?:extern\s+)?$Type\s+($Ident)(\s*)\(/s) @@ -3184,22 +3347,30 @@ sub process { "__func__ should be used instead of gcc specific __FUNCTION__\n" . $herecurr); } +# check for use of yield() + if ($line =~ /\byield\s*\(\s*\)/) { + WARN("YIELD", + "Using yield() is generally wrong. See yield() kernel-doc (sched/core.c)\n" . $herecurr); + } + # check for semaphores initialized locked if ($line =~ /^.\s*sema_init.+,\W?0\W?\)/) { WARN("CONSIDER_COMPLETION", "consider using a completion\n" . $herecurr); - } + # recommend kstrto* over simple_strto* and strict_strto* if ($line =~ /\b((simple|strict)_(strto(l|ll|ul|ull)))\s*\(/) { WARN("CONSIDER_KSTRTO", "$1 is obsolete, use k$3 instead\n" . $herecurr); } + # check for __initcall(), use device_initcall() explicitly please if ($line =~ /^.\s*__initcall\s*\(/) { WARN("USE_DEVICE_INITCALL", "please use device_initcall() instead of __initcall()\n" . $herecurr); } + # check for various ops structs, ensure they are const. my $struct_ops = qr{acpi_dock_ops| address_space_operations| @@ -3297,12 +3468,6 @@ sub process { WARN("EXPORTED_WORLD_WRITABLE", "Exporting world writable files is usually an error. Consider more restrictive permissions.\n" . $herecurr); } - - # Check for memset with swapped arguments - if ($line =~ /memset.*\,(\ |)(0x|)0(\ |0|)\);/) { - ERROR("MEMSET", - "memset size is 3rd argument, not the second.\n" . $herecurr); - } } # If we have no input at all, then there is nothing to report on @@ -3342,6 +3507,12 @@ sub process { } if ($quiet == 0) { + + if ($^V lt 5.10.0) { + print("NOTE: perl $^V is not modern enough to detect all possible issues.\n"); + print("An upgrade to at least perl v5.10.0 is suggested.\n\n"); + } + # If there were whitespace errors which cleanpatch can fix # then suggest that. if ($rpt_cleaners) { @@ -3351,13 +3522,12 @@ sub process { } } - if (keys %ignore_type) { + if ($quiet == 0 && keys %ignore_type) { print "NOTE: Ignored message types:"; foreach my $ignore (sort keys %ignore_type) { print " $ignore"; } - print "\n"; - print "\n" if ($quiet == 0); + print "\n\n"; } if ($clean == 1 && $quiet == 0) { diff --git a/tests/test-cppcheck.sh b/tests/test-cppcheck.sh new file mode 100755 index 0000000..74f6eab --- /dev/null +++ b/tests/test-cppcheck.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +EIDS=performance,portability +ROOTDIR="$srcdir/.." +INCLUDE_OPTS="-q -f -I$ROOTDIR/src/lib -I$ROOTDIR/src -I$ROOTDIR -I$ROOTDIR/.." + +cppcheck $ROOTDIR/src $INCLUDE_OPTS --enable=$EIDS --quiet --error-exitcode=1 || exit 1 diff --git a/tests/test-io-dir-list.sh b/tests/test-io-dir-list.sh new file mode 100755 index 0000000..a490473 --- /dev/null +++ b/tests/test-io-dir-list.sh @@ -0,0 +1,11 @@ +#/bin/sh + +mkdir -p data/empty_dir +mkdir -p data/2files_dir +touch data/2files_dir/one +touch data/2files_dir/two + +./test-io-dir-list || exit 1 + +rm data/2files_dir/one data/2files_dir/two +rmdir data/empty_dir data/2files_dir \ No newline at end of file diff --git a/tests/test_io_dir_list.c b/tests/test_io_dir_list.c new file mode 100644 index 0000000..29a9c31 --- /dev/null +++ b/tests/test_io_dir_list.c @@ -0,0 +1,105 @@ +/* + * Copyright (C) 2010-2011 jeanfi@gmail.com + * + * This program 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 program 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 program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA + */ + +#include +#include +#include + +#include "../src/lib/pio.h" + +static int test_empty_dir() +{ + int ret; + char **paths; + + paths = dir_list("data/empty_dir", NULL); + + ret = 0; + if (paths) { + if (*paths) { + ret = 1; + fprintf(stderr, "ERROR: list not empty %s\n", *paths); + } + + paths_free(paths); + } + + return ret; +} + +static int test_2files_dir() +{ + int ret, one, two; + char **paths, **cur; + + paths = dir_list("data/2files_dir", NULL); + + one = two = ret = 0; + + if (!paths) { + fprintf(stderr, "ERROR: list is NULL\n"); + return 1; + } + + cur = paths; + while(*cur) { + if (!strcmp(*cur, "data/2files_dir/one")) { + one++; + } else if (!strcmp(*cur, "data/2files_dir/two")) { + two++; + } else { + fprintf(stderr, "ERROR: wrong item: %s\n", *cur); + + ret = 1; + } + + cur++; + } + + if (!ret && one == 1 && two == 1) + ret = 0; + else + ret = 1; + + paths_free(paths); + + return ret; +} + +static int tests_dir_list() { + int failures; + + failures = test_empty_dir(); + + failures += test_2files_dir(); + + return failures; +} + +int main(int argc, char **argv) +{ + int failures; + + failures = tests_dir_list(); + + if (failures) + exit(EXIT_FAILURE); + else + exit(EXIT_SUCCESS); +} diff --git a/tests/test_psensor_type_to_unit_str.c b/tests/test_psensor_type_to_unit_str.c new file mode 100644 index 0000000..ddd2abe --- /dev/null +++ b/tests/test_psensor_type_to_unit_str.c @@ -0,0 +1,82 @@ +/* + * Copyright (C) 2010-2011 jeanfi@gmail.com + * + * This program 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 program 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 program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA + */ + +#include +#include +#include +#include + +#include +#include +#define _(str) gettext(str) + +#include "../src/lib/psensor.h" + +static int +test_fct(unsigned int type, int use_celcius, const char *ref) +{ + const char *u; + + u = psensor_type_to_unit_str(type, use_celcius); + if (strcmp(ref, u)) { + fprintf(stderr, "returns: %s expected: %s\n", u, ref); + return 0; + } + + return 1; +} + +static int test() { + int failures; + + failures = 0; + + if (!test_fct(SENSOR_TYPE_TEMP, 1, "\302\260C")) + failures++; + + if (!test_fct(SENSOR_TYPE_TEMP, 0, "\302\260F")) + failures++; + + if (!test_fct(SENSOR_TYPE_LMSENSOR | SENSOR_TYPE_TEMP, 1, "\302\260C")) + failures++; + + if (!test_fct(SENSOR_TYPE_LMSENSOR | SENSOR_TYPE_TEMP, 0, "\302\260F")) + failures++; + + if (!test_fct(SENSOR_TYPE_FAN, 0, _("RPM"))) + failures++; + + return failures; +} + +int main(int argc, char **argv) +{ + int failures; + + setlocale(LC_ALL, ""); + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); + + failures = test(); + + if (failures) + exit(EXIT_FAILURE); + else + exit(EXIT_SUCCESS); +} diff --git a/tests/test_psensor_value_to_str.c b/tests/test_psensor_value_to_str.c new file mode 100644 index 0000000..780c815 --- /dev/null +++ b/tests/test_psensor_value_to_str.c @@ -0,0 +1,64 @@ +/* + * Copyright (C) 2010-2011 jeanfi@gmail.com + * + * This program 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 program 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 program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA + */ + +#include +#include +#include +#include + +#include "../src/lib/psensor.h" + +#define CELCIUS "\302\260C" +#define FAHRENHEIT "\302\260F" + +static int +test_psensor_value_to_str(unsigned int type, + double value, + int celcius, + const char *ref) +{ + char *str; + + str = psensor_value_to_str(type, value, celcius); + if (strcmp(ref, str)) { + fprintf(stderr, "returns: %s expected: %s\n", str, ref); + return 1; + } else { + return 0; + } +} + +int main(int argc, char **argv) +{ + int errs; + + errs = test_psensor_value_to_str(SENSOR_TYPE_TEMP, 13, 1, + "13"CELCIUS); + errs += test_psensor_value_to_str(SENSOR_TYPE_TEMP, 13, 0, + "55"FAHRENHEIT); + errs += test_psensor_value_to_str(SENSOR_TYPE_TEMP, 13.4, 1, + "13"CELCIUS); + errs += test_psensor_value_to_str(SENSOR_TYPE_TEMP, 13.5, 1, + "14"CELCIUS); + + if (errs) + exit(EXIT_FAILURE); + else + exit(EXIT_SUCCESS); +} diff --git a/tests/test_url_encode.c b/tests/test_url_encode.c new file mode 100644 index 0000000..0b64aef --- /dev/null +++ b/tests/test_url_encode.c @@ -0,0 +1,79 @@ +/* + * Copyright (C) 2010-2011 jeanfi@gmail.com + * + * This program 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 program 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 program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA + */ + +#include +#include +#include +#include + +#include "../src/lib/url.h" + +int test_url_encode(char *url, char *ref_url) +{ + char *res_url; + int ret; + + res_url = url_encode(url); + + if (strcmp(ref_url, res_url)) { + fprintf(stderr, + "FAILURE: url_encode(%s) returns %s instead of %s\n", + url, res_url, ref_url); + ret = 0; + } else { + ret = 1; + } + + free(res_url); + + return ret; +} + +int tests_url_encode() +{ + int failures; + + failures = 0; + + if (!test_url_encode("abcdef12345", "abcdef12345")) + failures++; + + if (!test_url_encode("a b", "a%20b")) + failures++; + + if (!test_url_encode("ab-_.~", "ab-_.~")) + failures++; + + return failures; +} + + +int main(int argc, char **argv) +{ + int failures; + + failures = 0; + + failures += tests_url_encode(); + + if (failures) + exit(EXIT_FAILURE); + else + exit(EXIT_SUCCESS); +} diff --git a/tests/test_url_normalize.c b/tests/test_url_normalize.c new file mode 100644 index 0000000..ef48203 --- /dev/null +++ b/tests/test_url_normalize.c @@ -0,0 +1,76 @@ +/* + * Copyright (C) 2010-2011 jeanfi@gmail.com + * + * This program 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 program 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 program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA + */ + +#include +#include +#include +#include + +#include "../src/lib/url.h" + +int test_url_normalize(const char *url, const char *ref_url) +{ + int ret; + char *tmp = url_normalize(url); + + if (!strcmp(tmp, ref_url)) { + ret = 1; + } else { + fprintf(stderr, + "FAILURE: " + "url_normalize(%s) returns %s instead of %s\n", + url, + tmp, + ref_url); + ret = 0; + } + + free(tmp); + + return ret; +} + +int tests_url_normalize() +{ + int failures; + + failures = 0; + + if (!test_url_normalize("http://test/test", "http://test/test")) + failures++; + + if (!test_url_normalize("http://test/test/", "http://test/test")) + failures++; + + return failures; +} + +int main(int argc, char **argv) +{ + int failures; + + failures = 0; + + failures += tests_url_normalize(); + + if (failures) + exit(EXIT_FAILURE); + else + exit(EXIT_SUCCESS); +} diff --git a/www/Makefile.in b/www/Makefile.in index ecf8913..ce82eb6 100644 --- a/www/Makefile.in +++ b/www/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +16,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -46,6 +63,11 @@ CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -67,6 +89,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(defaultwwwdir)" DATA = $(defaultwww_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -74,6 +102,9 @@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ APPINDICATOR_CFLAGS = @APPINDICATOR_CFLAGS@ APPINDICATOR_LIBS = @APPINDICATOR_LIBS@ +AR = @AR@ +ATASMART_CFLAGS = @ATASMART_CFLAGS@ +ATASMART_LIBS = @ATASMART_LIBS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -93,8 +124,11 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +GCONFTOOL = @GCONFTOOL@ GCONF_CFLAGS = @GCONF_CFLAGS@ GCONF_LIBS = @GCONF_LIBS@ +GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ +GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ @@ -103,6 +137,7 @@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ GTOP_CFLAGS = @GTOP_CFLAGS@ GTOP_LIBS = @GTOP_LIBS@ +HAVE_CPPCHECK = @HAVE_CPPCHECK@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -147,6 +182,7 @@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ +PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SENSORS_LIBS = @SENSORS_LIBS@ SET_MAKE = @SET_MAKE@ @@ -168,6 +204,7 @@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ @@ -264,8 +301,11 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): install-defaultwwwDATA: $(defaultwww_DATA) @$(NORMAL_INSTALL) - test -z "$(defaultwwwdir)" || $(MKDIR_P) "$(DESTDIR)$(defaultwwwdir)" @list='$(defaultwww_DATA)'; test -n "$(defaultwwwdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(defaultwwwdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(defaultwwwdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -279,9 +319,7 @@ uninstall-defaultwwwDATA: @$(NORMAL_UNINSTALL) @list='$(defaultwww_DATA)'; test -n "$(defaultwwwdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(defaultwwwdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(defaultwwwdir)" && rm -f $$files + dir='$(DESTDIR)$(defaultwwwdir)'; $(am__uninstall_files_from_dir) tags: TAGS TAGS: @@ -336,10 +374,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/www/psensor.js b/www/psensor.js index 5870b2b..6f4ef7e 100644 --- a/www/psensor.js +++ b/www/psensor.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 jeanfi@gmail.com + * Copyright (C) 2010-2011 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -46,23 +46,28 @@ function format_mem_size(s) { function type_to_str(stype) { var stype_str; - stype_str = "N/A"; - - if (stype & 0x0100) - stype_str = "Sensor"; - else if (stype & 0x0200) - stype_str = "NVidia"; - else if (stype & 0x0400) - stype_str = "HDD"; + if (stype & 0x0200) + stype_str = "NVidia "; else if (stype & 0x0800) - stype_str = "CPU Usage Percentage"; - else if (stype & 0x1000) - stype_str = "AMD"; + stype_str = "ATI/AMD "; + else + stype_str = ""; - if (stype & 0x0001) - stype_str += " Temperature"; + if (stype & 0x04000) + stype_str += "HDD "; + else if (stype & 0x08000) + stype_str += "CPU "; + else if (stype & 0x10000) + stype_str += "GPU "; + else if (stype & 0x20000) + stype_str += "Fan "; + + if (stype & 0x0001) + stype_str += "Temperature"; else if (stype & 0x0002) - stype_str += " Fan"; + stype_str += "RPM"; + else if (stype & 0x0004) + stype_str += "Load"; return stype_str; } @@ -163,19 +168,19 @@ function update_menu() { str = ""; - $.getJSON("/api/1.0/sensors", function(data) { + $.getJSON("/api/1.1/sensors", function(data) { str += "
  • Sensors\n
      "; $.each(data, function(i, item) { name = item["name"]; - url = "details.html?id="+escape("/api/1.0/sensors/"+item["id"]); + url = "details.html?id="+escape("/api/1.1/sensors/"+item["id"]); link = ""+name+""; str += "
    • "+link+"
    • "; }); str += "
    "; str += "
  • CPU
      "; - url = "details.html?id="+escape("/api/1.0/cpu/usage"); + url = "details.html?id="+escape("/api/1.1/cpu/usage"); link = "usage"; str += "
    • "+link+"
    • "; @@ -190,7 +195,7 @@ function update_menu() { function update_summary_sensors() { var name, value_str, min_str, max_str, type, type_str, url; - $.getJSON("/api/1.0/sensors", function(data) { + $.getJSON("/api/1.1/sensors", function(data) { $("#sensors tbody").html(""); $.each(data, function(i, item) { @@ -200,7 +205,7 @@ function update_summary_sensors() { min_str = value_to_str(item["min"], type); max_str = value_to_str(item["max"], type); type_str = type_to_str(type); - url = "details.html?id="+escape("/api/1.0/sensors/"+item["id"]); + url = "details.html?id="+escape("/api/1.1/sensors/"+item["id"]); $("#sensors tbody").append("" +""+name+"" @@ -214,7 +219,7 @@ function update_summary_sensors() { } function update_summary_sysinfo() { - $.getJSON("/api/1.0/sysinfo", function(data) { + $.getJSON("/api/1.1/sysinfo", function(data) { $("#uptime").html(""); $("#cpu tbody").html(""); $("#memory").html(""); @@ -231,7 +236,7 @@ function update_summary_sysinfo() { var uptime_h = Math.floor((uptime / (60*60)) % 24); var uptime_d = Math.floor(uptime / (60*60*24)); - $("#cpu").append(""+load+"%" + $("#cpu").append(""+load+"%" +load_1+"" +load_5+"" +load_15+""); diff --git a/www/style.css b/www/style.css index 3fbf003..456a739 100644 --- a/www/style.css +++ b/www/style.css @@ -29,7 +29,7 @@ h1 { } -h2 { +h2, #toctitle{ font-size: 110%; font-style: normal; font-weight: bold; @@ -87,14 +87,13 @@ td { height: 300px; } -ul { +ul#menu-list li { list-style: none; - padding: 0 0 0 0; - margin: 0 0 0 0; } -ul li ul li { - padding-left: 1em; +#menu-list { + padding: 0 0 0 0; + margin: 0 0 0 0; } #menu { @@ -129,6 +128,6 @@ em { } #menu-list ul li { - padding: 0 0 0 1em; + padding: 0 0 0 0em; }