presently gcalctool not supporting indic numerals, but i think it will nice if we enable it for indic digit also, so if someone entered indic numerals for calculating it should do a calculations and display a result in indic numerals.
I googled for this but didn't found any topic related this.
now i dont know complexity involve in doing this, but as far as i think it will just require conversion from Indic numerals to Latin numerals and vice versa. When somebody enters any expression and if it contains indic numerals it will convert it to latin, then processing as usual and then while display result it will do same thing back.
Task:
1) understading gcalctool code
2) utf-8 to unicode conversion
3) validation for indic numerals
4) converting to latin before processing
5) converting result back to indic after processing
6) unciode to utf-8
thats it
hope so there is no any standard not allowing doing this thing :), i will talk with upstream for this lets see
Thursday, May 28, 2009
Wednesday, May 20, 2009
facing problem while using Policykit for user authentication
I am trying to use policykit in system-config-language for authentication, so thought lets try with some test application
while doing so i am following steps given in murrayc
everything is going well
****************************************************
def write_file():
fp = open('/etc/fonts/fonts.conf', 'a')
fp.write("i have wrote")
fp.close
if __name__ == "__main__":
print "calling wrtie file"
#Call the D-Bus method to request PolicyKit authorization:
session_bus = dbus.SessionBus()
policykit = session_bus.get_object('org.freedesktop.PolicyKit.AuthenticationAgent', '/')
if(policykit == None):
print("Error: Could not get PolicyKit D-Bus Interface\n")
granted = policykit.ObtainAuthorization("test.org.gnome.lirc-properties.mechanism.configure", (dbus.UInt32)(0), (dbus.UInt32)(os.getpid()))
print granted
if granted:
write_file()
else:
print "no access"
****************************************************
in my code after calling
granted = policykit.ObtainAuthorization("test.org.gnome.lirc-properties.mechanism.configure", (dbus.UInt32)(0), (dbus.UInt32)(os.getpid()))
it is asking me for root password as per i stated in .policy file, but after entering root password, in next line when i am trying to update /etc/fonts/conf.d, it is not allowing me to do that :(
i dont know even after entering root password from policykit why my code is not able to edit above file
my all file are here
policykit
still trying for this, thought lets share it
while doing so i am following steps given in murrayc
everything is going well
****************************************************
def write_file():
fp = open('/etc/fonts/fonts.conf', 'a')
fp.write("i have wrote")
fp.close
if __name__ == "__main__":
print "calling wrtie file"
#Call the D-Bus method to request PolicyKit authorization:
session_bus = dbus.SessionBus()
policykit = session_bus.get_object('org.freedesktop.PolicyKit.AuthenticationAgent', '/')
if(policykit == None):
print("Error: Could not get PolicyKit D-Bus Interface\n")
granted = policykit.ObtainAuthorization("test.org.gnome.lirc-properties.mechanism.configure", (dbus.UInt32)(0), (dbus.UInt32)(os.getpid()))
print granted
if granted:
write_file()
else:
print "no access"
****************************************************
in my code after calling
granted = policykit.ObtainAuthorization("test.org.gnome.lirc-properties.mechanism.configure", (dbus.UInt32)(0), (dbus.UInt32)(os.getpid()))
it is asking me for root password as per i stated in .policy file, but after entering root password, in next line when i am trying to update /etc/fonts/conf.d, it is not allowing me to do that :(
i dont know even after entering root password from policykit why my code is not able to edit above file
my all file are here
policykit
still trying for this, thought lets share it
Subscribe to:
Posts (Atom)