Gentoo Archives: gentoo-commits

From: "Pacho Ramos (pacho)" <pacho@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-misc/nut-monitor/files: nut-monitor-1.3-paths.patch nut-monitor-1.3-glade.patch
Date: Mon, 02 Apr 2012 19:42:20
Message-Id: 20120402194210.D5F402004C@flycatcher.gentoo.org
1 pacho 12/04/02 19:42:10
2
3 Added: nut-monitor-1.3-paths.patch
4 Removed: nut-monitor-1.3-glade.patch
5 Log:
6 Install pixmaps at proper paths, install fr translations when needed, let it work when python3 is main interpreter (bug #408149 by FSW). Remove old.
7
8 (Portage version: 2.1.10.54/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.1 net-misc/nut-monitor/files/nut-monitor-1.3-paths.patch
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/nut-monitor/files/nut-monitor-1.3-paths.patch?rev=1.1&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/nut-monitor/files/nut-monitor-1.3-paths.patch?rev=1.1&content-type=text/plain
15
16 Index: nut-monitor-1.3-paths.patch
17 ===================================================================
18 --- a/scripts/python/app/NUT-Monitor
19 +++ b/scripts/python/app/NUT-Monitor
20 @@ -70,7 +70,7 @@
21 ( cmd_opts, args ) = opt_parser.parse_args()
22
23
24 - self.__glade_file = os.path.join( os.path.dirname( sys.argv[0] ), "gui-1.3.glade" )
25 + self.__glade_file = '/usr/share/nut-monitor/gui-1.3.glade'
26
27 self.__widgets["interface"] = gtk.glade.XML( self.__glade_file, "window1", APP )
28 self.__widgets["main_window"] = self.__widgets["interface"].get_widget("window1")
29 @@ -103,11 +103,11 @@
30
31 # Create the tray icon and connect it to the show/hide method...
32 self.__widgets["status_icon"] = gtk.StatusIcon()
33 - self.__widgets["status_icon"].set_from_file( os.path.join( os.path.dirname( sys.argv[0] ), "pixmaps", "on_line.png" ) )
34 + self.__widgets["status_icon"].set_from_file( "/usr/share/nut-monitor/pixmaps/on_line.png" )
35 self.__widgets["status_icon"].set_visible( True )
36 self.__widgets["status_icon"].connect( "activate", self.tray_activated )
37
38 - self.__widgets["ups_status_image"].set_from_file( os.path.join( os.path.dirname( sys.argv[0] ), "pixmaps", "on_line.png" ) )
39 + self.__widgets["ups_status_image"].set_from_file( "/usr/share/nut-monitor/pixmaps/on_line.png" )
40
41 # Define interface callbacks actions
42 self.__callbacks = { "on_window1_destroy" : self.quit,
43 @@ -265,8 +265,8 @@
44 #-------------------------------------------------------------------
45 # Change the status icon and tray icon
46 def change_status_icon( self, icon="on_line", blink=False ) :
47 - self.__widgets["status_icon"].set_from_file( os.path.join( os.path.dirname( sys.argv[0] ), "pixmaps", "%s.png" % icon ) )
48 - self.__widgets["ups_status_image"].set_from_file( os.path.join( os.path.dirname( sys.argv[0] ), "pixmaps", "%s.png" % icon ) )
49 + self.__widgets["status_icon"].set_from_file( "/usr/share/nut-monitor/pixmaps/%s.png" % icon )
50 + self.__widgets["ups_status_image"].set_from_file( "/usr/share/nut-monitor/pixmaps/%s.png" % icon )
51 self.__widgets["status_icon"].set_blinking( blink )
52
53 #-------------------------------------------------------------------
54 @@ -719,9 +719,9 @@
55
56 for k,v in vars.iteritems() :
57 if ( rwvars.has_key( k ) ) :
58 - icon_file = os.path.join( os.path.dirname( sys.argv[0] ), "pixmaps", "var-rw.png" )
59 + icon_file = "/usr/share/nut-monitor/pixmaps/var-rw.png"
60 else :
61 - icon_file = os.path.join( os.path.dirname( sys.argv[0] ), "pixmaps", "var-ro.png" )
62 + icon_file = "/usr/share/nut-monitor/pixmaps/var-ro.png"
63
64 icon = gtk.gdk.pixbuf_new_from_file( icon_file )
65 self.__widgets["ups_vars_tree_store"].append( [ icon, k, v ] )