aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2010-08-18 11:57:27 +0100
committerConor Curran <conor.curran@canonical.com>2010-08-18 11:57:27 +0100
commit4897f3ce524e6d91ecd0c70142556be0f29367b7 (patch)
tree5aa8c8001b5ea2f7417dd2bf962347e527581425 /src
parent75ba919b383a4da5d2634e4f9b85a3cdcbaa907d (diff)
downloadayatana-indicator-sound-4897f3ce524e6d91ecd0c70142556be0f29367b7.tar.gz
ayatana-indicator-sound-4897f3ce524e6d91ecd0c70142556be0f29367b7.tar.bz2
ayatana-indicator-sound-4897f3ce524e6d91ecd0c70142556be0f29367b7.zip
ready for the merge
Diffstat (limited to 'src')
-rw-r--r--src/mpris2-controller.vala13
-rw-r--r--src/sound-service.c5
2 files changed, 9 insertions, 9 deletions
diff --git a/src/mpris2-controller.vala b/src/mpris2-controller.vala
index 8b937b7..65d881a 100644
--- a/src/mpris2-controller.vala
+++ b/src/mpris2-controller.vala
@@ -208,10 +208,11 @@ public class Mpris2Controller : GLib.Object
warning("Can't fetch the duration of the track therefore cant set the position");
return;
}
- uint32 total_time = time_value.get_uint();
+ // work in microseconds (scale up by 10 TTP-of 3)
+ uint32 total_time = time_value.get_uint() * 1000;
debug("total time of track = %i", (int)total_time);
double new_time_position = total_time * position/100.0;
- debug("new position = %f", (new_time_position * 1000));
+ debug("new position = %f", (new_time_position));
Value? v = this.player.Metadata.lookup("trackid");
if(v != null){
@@ -219,11 +220,11 @@ public class Mpris2Controller : GLib.Object
debug("the trackid = %s", v.get_string());
DBus.ObjectPath path = new ObjectPath(v.get_string());
try{
- this.player.SetPosition(path, (int64)(new_time_position * 1000));
+ //this.player.SetPosition(path, (int64)(new_time_position));
}
- catch(DBus.Error error){
- warning("DBus Error calling the player objects SetPosition method %s",
- error.message);
+ catch(DBus.Error e){
+ error("DBus Error calling the player objects SetPosition method %s",
+ e.message);
}
}
}
diff --git a/src/sound-service.c b/src/sound-service.c
index 16fa87c..12f067e 100644
--- a/src/sound-service.c
+++ b/src/sound-service.c
@@ -25,7 +25,6 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
static GMainLoop *mainloop = NULL;
-
/**********************************************************************************************************************/
// Init and exit functions
/**********************************************************************************************************************/
@@ -42,8 +41,8 @@ service_shutdown (IndicatorService *service, gpointer user_data)
if (mainloop != NULL) {
g_debug("Service shutdown !");
// TODO: uncomment for release !!
- //close_pulse_activites();
- //g_main_loop_quit(mainloop);
+ close_pulse_activites();
+ g_main_loop_quit(mainloop);
}
return;
}