View Single Post
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,358 times | Joined on Sep 2007 @ Looking at y'all and sighing
#614
Apologies for providing a half-assed FMTxFrequency function. I should've known better as I wrote a clone of the status bar applet...

Code:
import gettext #part of standard Python, I believe 

def FMTxFrequency():
	freq = "%.1f" % float(GetProp(FMTxPropertiesInterfaceConnect(), 'frequency') / 1000.0)
	freq_mhz = gettext.dgettext("osso-fm-transmitter", "fmtx_va_frequency")
	if freq_mhz != "fmtx_va_frequency":
		freq_mhz %= freq
		return freq_mhz
	return freq
Oh, it returns a str so no need for manual casts

P.S. You can pass False (introspection=False) as the third argument of your get_object calls to stop it from introspecting the given interface and producing those error messages

Last edited by qwerty12; 2010-06-08 at 00:03.
 

The Following User Says Thank You to qwerty12 For This Useful Post: