Notices


Reply
Thread Tools
coderus's Avatar
Posts: 6,139 | Thanked: 11,595 times | Joined on Nov 2011 @ Open Mobile Platform, Innopolis, Russia
#11
Or you can contribute to nemo-dbus plugin
__________________
Twitter | Openrepos | GitHub | PayPal.Me
 

The Following 3 Users Say Thank You to coderus For This Useful Post:
Posts: 86 | Thanked: 155 times | Joined on Jan 2012
#12
Originally Posted by coderus View Post
Or you can contribute to nemo-dbus plugin
Agree that this would be the best thing to do. Unfortunately that is not possible for me at the moment as all my development is done on the phone. It's why I am using qml and python instead of c++.

For those that are interested, this works using dbus python. It requires dbus-python3 package to be installed. Here is the python code:

import dbus
def setFavorite():

bus = dbus.SessionBus()
ambD = bus.get_object('com.jolla.ambienced','/com/jolla/ambienced')
ind = ambD.createAmbience('file:///usr/share/ambience/harmony/harmony.ambience',dbus_interface='com.jolla.ambien ced')
a_dict = {"favorite": True}
works = ambD.saveAttributes(1, ind, a_dict, dbus_interface='com.jolla.ambienced')
 

The Following 3 Users Say Thank You to anig For This Useful Post:
Reply

Tags
ambience, dbus-qml

Thread Tools

 
Forum Jump


All times are GMT. The time now is 20:31.