Imported Upstream version 2.7.3

This commit is contained in:
Arnaud Quette 2015-04-30 15:53:36 +02:00
parent a356b56d11
commit fd413a3168
283 changed files with 14978 additions and 6511 deletions

View file

@ -23,12 +23,16 @@
#
# 2010-10-06 David Goncalves - Version 1.3
# Added localisation support
#
# 2015-02-14 Michal Fincham - Version 1.3.1
# Corrected unsafe permissions on ~/.nut-monitor (Debian #777706)
import gtk, gtk.glade, gobject
import sys
import base64
import os, os.path
import stat
import platform
import time
import threading
@ -44,21 +48,23 @@ gobject.threads_init()
class interface :
__widgets = {}
__callbacks = {}
__favorites = {}
__favorites_file = None
__favorites_path = ""
__fav_menu_items = list()
__window_visible = True
__glade_file = None
__connected = False
__ups_handler = None
__ups_commands = None
__ups_vars = None
__ups_rw_vars = None
__gui_thread = None
__current_ups = None
DESIRED_FAVORITES_DIRECTORY_MODE = 0700
__widgets = {}
__callbacks = {}
__favorites = {}
__favorites_file = None
__favorites_path = ""
__fav_menu_items = list()
__window_visible = True
__glade_file = None
__connected = False
__ups_handler = None
__ups_commands = None
__ups_vars = None
__ups_rw_vars = None
__gui_thread = None
__current_ups = None
def __init__( self ) :
@ -528,6 +534,9 @@ class interface :
return
try :
if ( not stat.S_IMODE( os.stat( self.__favorites_path ).st_mode ) == self.DESIRED_FAVORITES_DIRECTORY_MODE ) : # unsafe pre-1.2 directory found
os.chmod( self.__favorites_path, self.DESIRED_FAVORITES_DIRECTORY_MODE )
conf = ConfigParser.ConfigParser()
conf.read( self.__favorites_file )
for current in conf.sections() :
@ -573,7 +582,7 @@ class interface :
# If path does not exists, try to create it
if ( not os.path.exists( self.__favorites_file ) ) :
try :
os.makedirs( self.__favorites_path, mode=0700 )
os.makedirs( self.__favorites_path, mode=self.DESIRED_FAVORITES_DIRECTORY_MODE )
except :
self.gui_status_message( _("Error while creating configuration folder (%s)") % sys.exc_info()[1] )

View file

@ -1021,7 +1021,7 @@ want to delete from list...
<property name="window_position">center-always</property>
<property name="type_hint">normal</property>
<property name="program_name">NUT-Monitor</property>
<property name="version">1.3</property>
<property name="version">1.3.1</property>
<property name="copyright" translatable="yes">Copyright (c) 2010 David Goncalves</property>
<property name="comments" translatable="yes">GUI to manage devices connected a NUT server.

View file

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2014 Arnaud Quette <arnaud.quette@free.fr> -->
<application>
<id type="desktop">nut-monitor.desktop</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-3.0+</project_license>
<name>NUT Monitor</name>
<summary>GUI application to monitor UPS status</summary>
<description>
<p>
NUT Monitor is a GUI application to monitor UPS status, through NUT -
Network UPS Tools.
NUT is a client/server monitoring system that allows computers to
share uninterruptible power supply (UPS) and power distribution unit
(PDU) hardware. Clients access the hardware through the server, and
are notified whenever the power status changes.
</p>
<p>NUT Monitor provides the following features:</p>
<ul>
<li>Automatically connects to local UPS if there is only one managed</li>
<li>Command line options to start hidden, load a favorite, ...</li>
<li>System tray (notification area) integration, including notifications</li>
<li>Favorites, to store different devices</li>
<li>Display all device variables</li>
<li>Modify writable variables on UPS and devices</li>
<li>Support English and French</li>
</ul>
<p>
NUT Monitor requires that you have a running NUT system, that you can
connect to, either locally or remotely.
For more information on NUT: http://www.networkupstools.org/
</p>
</description>
<screenshots>
<screenshot type="default" width="620" height="349">http://www.lestat.st/_media/informatique/projets/nut-monitor/nut-monitor-1.png</screenshot>
<screenshot width="620" height="349">http://www.lestat.st/_media/informatique/projets/nut-monitor/nut-monitor-2.png</screenshot>
<screenshot width="620" height="349">http://www.lestat.st/_media/informatique/projets/nut-monitor/nut-monitor-3.png</screenshot>
</screenshots>
<url type="homepage">http://www.lestat.st/en/informatique/projets/nut-monitor</url>
<updatecontact>david@lestat.st</updatecontact>
<!-- project_group>GNOME</project_group -->
</application>