Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 144891 Details for
Bug 195030
net-misc/ups-monitor fails to install
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for mustek and co
ups-monitor-0.8.3.diff (text/plain), 3.06 KB, created by
Jimmy.Jazz
on 2008-02-28 19:14:14 UTC
(
hide
)
Description:
patch for mustek and co
Filename:
MIME Type:
Creator:
Jimmy.Jazz
Created:
2008-02-28 19:14:14 UTC
Size:
3.06 KB
patch
obsolete
>--- ups-monitor 2005-12-02 23:18:52.000000000 +0100 >+++ /usr/bin/ups-monitor 2008-02-28 16:45:08.000000000 +0100 >@@ -306,9 +306,9 @@ > debug_print( "Disconnected") > self.disconnect() > if self.failure_callback: >- gtk.threads_enter() >+ gtk.gdk.threads_enter() > self.failure_callback() >- gtk.threads_leave() >+ gtk.gdk.threads_leave() > return > > except Exception, e: >@@ -316,9 +316,9 @@ > debug_print( "Timed out while sending or receiving data") > self.disconnect() > if self.failure_callback: >- gtk.threads_enter() >+ gtk.gdk.threads_enter() > self.failure_callback() >- gtk.threads_leave() >+ gtk.gdk.threads_leave() > return > > if find(response,"ERR UNKNOWN-UPS") != -1: >@@ -346,9 +346,9 @@ > > if self.poll_callback: > debug_print( "Calling callback thread") >- gtk.threads_enter() >+ gtk.gdk.threads_enter() > self.poll_callback() >- gtk.threads_leave() >+ gtk.gdk.threads_leave() > > def parse_input(self,linelist): > >@@ -370,7 +370,7 @@ > > for line in linelist: > key, value = line >- value = value.replace(".",radixchar) >+ #value = value.replace(".",radixchar) > if key == "battery.charge": > self.battery_charge = float(value) / 100 > if key == "battery.runtime": >@@ -419,6 +419,17 @@ > debug_print( "Unknown status value " + value) > > >+ #if self.battery_charge is not None and self.battery_voltage is not None: >+ if self.battery_charge is not None and self.battery_voltage is not None: >+ value = 23 * 60 * self.battery_voltage / 12 >+ self.max_remaining_time = round(value) >+ debug_print( "max_remaining_time " + str(self.max_remaining_time)) >+ self.remaining_time = self.max_remaining_time * self.battery_charge / (self.ups_load + 1) >+ self.remaining_time = int(self.remaining_time) >+ debug_print( "remaining_time " + str(self.remaining_time)) >+ if self.remaining_time > self.max_remaining_time: >+ self.max_remaining_time = self.remaining_time >+ > def get_address(self): > return self.address > def get_host(self): >@@ -1002,14 +1013,14 @@ > > combobox = self.get_widget("hbox_local_upses").get_data("combo") > if not combobox: >- combobox = gtk.Combo() >+ combobox = gtk.ComboBoxEntry() > combobox.set_sensitive(False) > self.get_widget("hbox_local_upses").pack_end(combobox) > self.get_widget("hbox_local_upses").set_data("combo",combobox) > combobox.show() > > try: >- localupses = read_ups_config("/etc/ups/ups.conf").keys() >+ localupses = read_ups_config("/etc/nut/ups.conf").keys() > combobox.set_popdown_strings(localupses) > self.get_widget("radio_local_upses").set_sensitive(True) > combobox.set_sensitive(True) >@@ -1146,7 +1157,7 @@ > app.monitor_last_ups() > except NoLastUPSError, e: > try: >- localupses = read_ups_config("/etc/ups/ups.conf").keys() >+ localupses = read_ups_config("/etc/nut/ups.conf").keys() > if len(localupses) == 1: > app.monitor(localupses[0] + "@localhost",None,None) > except OSError, e: >@@ -1154,7 +1165,7 @@ > except IOError, e: > debug_print("No ups.conf") > >- gtk.threads_init() >+ gtk.gdk.threads_init() > > gtk.main() >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 195030
:
135015
| 144891 |
144892
|
144893