![]() |
2010-04-17
, 13:48
|
|
Posts: 422 |
Thanked: 320 times |
Joined on Oct 2009
@ Israel
|
#11
|
![]() |
2010-04-17
, 13:58
|
Posts: 729 |
Thanked: 155 times |
Joined on Dec 2009
|
#12
|
You can not use the power button menu two change between the
profiles if the current profile is not one of the two predefined
![]() |
2010-04-17
, 16:40
|
|
Posts: 4,274 |
Thanked: 5,358 times |
Joined on Sep 2007
@ Looking at y'all and sighing
|
#13
|
Sounds playing in Silent profile (w/out modifying policy file which won't work in this case) require voodoo with PulseAudio and properties... If I figure it out, I'll post something up...
#include <gst/gst.h>
#include <pulse/pulseaudio.h>
#include <pulse/glib-mainloop.h>
#define FDFDFDF "/home/user/MyDocs/.sounds/three 6 mafia - sippin on syrup pt 2 + camron, bun b, diplomats (hosted by bubba sparxxx).mp3"
static GMainLoop *loop;
static GstElement *sound_player, *pulsesink;
int main (void)
{
gst_init(NULL, NULL);
loop = g_main_loop_new (NULL, FALSE);
//pa_glib_mainloop *pa_mainloop = pa_glib_mainloop_new (g_main_context_default ());
//pa_mainloop_api *pa_api = pa_glib_mainloop_get_api (pa_mainloop);
pa_proplist *proplist = pa_proplist_new ();
/* pa_proplist_sets (proplist,
PA_PROP_APPLICATION_NAME,
"maemo-applet-profiles");
pa_proplist_sets (proplist,
PA_PROP_APPLICATION_ID,
"org.maemo.HildonNotify");
pa_proplist_sets (proplist,
PA_PROP_APPLICATION_VERSION,
"0.50"); */
pa_proplist_sets (proplist,
PA_PROP_EVENT_ID,
"ringtone-preview");
pa_proplist_sets (proplist,
"module-stream-restore.id",
"x-maemo-applet-profiles");
//pa_context *pa_context = pa_context_new_with_proplist (pa_api, NULL, proplist);
//pa_context_connect (pa_context, NULL, (pa_context_flags_t) PA_CONTEXT_NOFAIL, NULL);
sound_player = gst_element_factory_make("playbin2", "Media Player");
pulsesink = gst_element_factory_make ("pulsesink", NULL);
g_object_set (G_OBJECT (pulsesink), "proplist", proplist, NULL);
g_printerr ("%s\n", G_STRLOC);
//pa_proplist_free (proplist);
g_object_set(sound_player, "audio-sink", pulsesink, "uri", g_filename_to_uri(FDFDFDF, NULL, NULL), NULL);
gst_element_set_state(sound_player, GST_STATE_NULL);
gst_element_set_state(sound_player, GST_STATE_PLAYING);
g_timeout_add_seconds (10, (GSourceFunc) g_main_loop_quit, loop);
g_main_loop_run (loop);
return 0;
}
![]() |
2010-04-17
, 21:37
|
|
Posts: 1,637 |
Thanked: 4,424 times |
Joined on Apr 2009
@ Germany
|
#15
|
![]() |
2010-04-17
, 22:53
|
|
Posts: 4,274 |
Thanked: 5,358 times |
Joined on Sep 2007
@ Looking at y'all and sighing
|
#16
|
This is great, qwerty12. Any chance you can explain what are
these properties and why do you know this :-)
[stream]
property = event.id@equals:"ringtone-preview"
group = player
[group]
name = player
flags = limit_volume, cork_stream
sink = sink.music
source = source.voice.raw
btw, I just realized the status-menu icons aren't there until
you reboot your device.
I call gtk-update-iconcache in the install script, but it doesn't work.
Is there another way to make new icons visible without reboot?
The Following 6 Users Say Thank You to qwerty12 For This Useful Post: | ||
![]() |
2010-04-18
, 00:39
|
Posts: 18 |
Thanked: 1 time |
Joined on Apr 2010
@ Romania
|
#17
|
Hello,
I made a replacement for the built-in profile control panel and status menu plugin.
This one let you add and manage more than two profiles.
Unlike tweaker these additional profiles are "real" profiles and not only different settings for the general profile.
That means this profiles are handled by the libprofile and profiled-dbus (com.nokia.profiled) just like the silent and general
profile. For example, they can be selected and changed from other applications through dbus-calls.
It is called profilesx and you can find in in extras-devel.
It is in beta state, all planned features are working, but I have
to cleanup the code.
I am not a gtk-programmer, some parts realy took an amount of time.
I struggled with the ui-design to let it look like the built-in profiles ui.
Feel free to laugh about my silly status menu icons :-)
Any improvements are welcome.
As I am not a native english speaker, maybe someone can help me with the program /package
description.
Some notes:
You can not use the power button menu two change between the
profiles if the current profile is not one of the two predefined.
Sound preview doesn't work if the active profile is the silent profile,
don't know how the built-in settings dialog plays the preview.
regards nicolai
![]() |
2010-04-18
, 13:00
|
Posts: 124 |
Thanked: 10 times |
Joined on Jan 2007
@ Italy
|
#18
|
![]() |
2010-04-18
, 13:42
|
Posts: 18 |
Thanked: 1 time |
Joined on Apr 2010
@ Romania
|
#19
|
when i try to add new profile which name has a " "(blank space) it doen't work
The Following User Says Thank You to Foxer For This Useful Post: | ||
![]() |
2010-04-18
, 14:24
|
Posts: 124 |
Thanked: 10 times |
Joined on Jan 2007
@ Italy
|
#20
|