![]() |
2011-03-30
, 18:59
|
Posts: 47 |
Thanked: 3 times |
Joined on May 2010
@ Johannesburg, South Africa
|
#192
|
![]() |
2011-03-30
, 19:45
|
|
Posts: 1,637 |
Thanked: 4,424 times |
Joined on Apr 2009
@ Germany
|
#193
|
The Following User Says Thank You to nicolai For This Useful Post: | ||
![]() |
2011-03-31
, 03:31
|
Posts: 24 |
Thanked: 27 times |
Joined on Nov 2010
@ Berkeley, CA
|
#194
|
How did you get your desktop to look like that...icons all orderly aligned vertically... oh is the bottom bar a battery life indicator? and what calendar are you using?
![]() |
2011-05-02
, 00:04
|
|
Posts: 397 |
Thanked: 241 times |
Joined on Mar 2010
@ Melbourne, Australia
|
#195
|
![]() |
2011-05-12
, 22:11
|
Posts: 44 |
Thanked: 34 times |
Joined on May 2010
|
#196
|
![]() |
2011-06-01
, 06:32
|
Posts: 270 |
Thanked: 37 times |
Joined on Sep 2010
|
#197
|
...can we get profile switching when entering a predefined GPS Cell ?
![]() |
2011-06-04
, 22:08
|
Posts: 89 |
Thanked: 31 times |
Joined on Mar 2010
|
#198
|
![]() |
2011-06-06
, 04:45
|
Posts: 64 |
Thanked: 74 times |
Joined on Mar 2011
@ Bim
|
#199
|
No, and the power menu is a totally different thing.
The profile buttons are controlled by the /etc/systemui/systemui.xml
file and it works as follows.
This entry controls the "silent" profile button:
<menuitem priority="300" name="powerup_memainmenu_silent" visible="general">
<keyfile>/home/user/.profiled/current</keyfile> <icon>statusarea_silent</icon> <return>8</return>
<po>osso-powerup-shutdown</po>
<callback service="com.nokia.profiled" path="/com/nokia/profiled" interface="com.nokia.profiled" method="set_profile" bus="session" autostart="true">
<argument type="string">silent</argument>
</callback>
</menuitem>
This button is visible, when the "visible" condition holds.
The value for this visible condition is read from the keyfile
/home/user/.profiled/current. When you change your profile,
the name of the new profile is written in this file.
The action for this button is the dbus call which changes to
silent profile.
So, that means, the "silent" profile button is visible when the
contents of your /home/user/.profiled/current is:
general
And the dbus-command is send when you press this button.
A similiar entry exists for the general profile button.
You can add extra entries for your own profiles,
but this is impractical if you use many profiles.
For example, you have a third profile "home" and you want to
have this in your power menu when the current profile is "silent",
then you need to add this entry:
<menuitem priority="200" name="home" visible="silent">
<keyfile>/home/user/.profiled/current</keyfile>
<icon>general_profile</icon>
<return>9</return>
<po>osso-powerup-shutdown</po>
<callback service="com.nokia.profiled" path="/com/nokia/profiled" interface="com.nokia.profiled" method="set_profile" bus="session" autostart="true">
<argument type="string">home</argument>
</callback>
</menuitem>
And if you want to have a button for your home profile when
the current profile is "general", you need to add another one:
<menuitem priority="200" name="home" visible="general">
<keyfile>/home/user/.profiled/current</keyfile>
<icon>general_profile</icon>
<return>9</return>
<po>osso-powerup-shutdown</po>
<callback service="com.nokia.profiled" path="/com/nokia/profiled" interface="com.nokia.profiled" method="set_profile" bus="session" autostart="true">
<argument type="string">home</argument>
</callback>
</menuitem>
And if you want to have the "silent" profile button when the
current one is "home":
<menuitem priority="200" name="powerup_memainmenu_silent" visible="home">
<keyfile>/home/user/.profiled/current</keyfile>
<icon>statusarea_silent</icon>
<return>9</return>
<po>osso-powerup-shutdown</po>
<callback service="com.nokia.profiled" path="/com/nokia/profiled" interface="com.nokia.profiled" method="set_profile" bus="session" autostart="true">
<argument type="string">silent</argument>
</callback>
</menuitem>
And for the "general" profile button.
<menuitem priority="200" name="powerup_memainmenu_general" visible="home">
<keyfile>/home/user/.profiled/current</keyfile>
<icon>general_profile</icon>
<return>9</return>
<po>osso-powerup-shutdown</po>
<callback service="com.nokia.profiled" path="/com/nokia/profiled" interface="com.nokia.profiled" method="set_profile" bus="session" autostart="true">
<argument type="string">general</argument>
</callback>
</menuitem>
And of course for every additional profile you have to
even more entries, this grows quadratic.
n*(n-1) entries, where n is the number of profiles :-)
Nicolai
![]() |
2011-07-16
, 23:14
|
Posts: 35 |
Thanked: 33 times |
Joined on Feb 2010
@ North America
|
#200
|
But if you want to control the profiles settings from your
app or widget, you can use dbus-commands to
control profiled (the systems profile daemon):
get the list of available profiles:
dbus-send --session --dest=com.nokia.profiled --type=method_call --print-reply /com/nokia/profiled com.nokia.profiled.get_profiles
get the current active profile:
dbus-send --session --dest=com.nokia.profiled --type=method_call --print-reply /com/nokia/profiled com.nokia.profiled.get_profile
activate the "general" profile:
dbus-send --session --dest=com.nokia.profiled --type=method_call --print-reply /com/nokia/profiled com.nokia.profiled.set_profile string:"general"
my contributions:
Desktop Clock Widget|Calendar Home Widget|Lens Cover Reminder|ConnectNow|Scout|App Search Widget|ProfilesX|
Desktop-Switcher|SMS-Messageblocker
-Donate-