From 17091952e927961c3bf88e177a934f0629645202 Mon Sep 17 00:00:00 2001 From: Steve Zesch Date: Sat, 4 Aug 2012 19:36:44 -0400 Subject: Revert "Micro-optimization." Wrong branch. This reverts commit 91f651c6f6f0ee7fdff1d49e36161d4e76e16e02. --- plugins/media-keys/msd-media-keys-manager.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'plugins') diff --git a/plugins/media-keys/msd-media-keys-manager.c b/plugins/media-keys/msd-media-keys-manager.c index f65596d..d75c031 100644 --- a/plugins/media-keys/msd-media-keys-manager.c +++ b/plugins/media-keys/msd-media-keys-manager.c @@ -979,6 +979,13 @@ msd_media_player_key_pressed (MsdMediaKeysManager *manager, return !have_listeners; } +static gboolean +do_multimedia_player_action (MsdMediaKeysManager *manager, + const char *key) +{ + return msd_media_player_key_pressed (manager, key); +} + static gboolean do_action (MsdMediaKeysManager *manager, int type) @@ -1052,19 +1059,19 @@ do_action (MsdMediaKeysManager *manager, g_free (cmd); break; case PLAY_KEY: - return msd_media_player_key_pressed (manager, "Play"); + return do_multimedia_player_action (manager, "Play"); break; case PAUSE_KEY: - return msd_media_player_key_pressed (manager, "Pause"); + return do_multimedia_player_action (manager, "Pause"); break; case STOP_KEY: - return msd_media_player_key_pressed (manager, "Stop"); + return do_multimedia_player_action (manager, "Stop"); break; case PREVIOUS_KEY: - return msd_media_player_key_pressed (manager, "Previous"); + return do_multimedia_player_action (manager, "Previous"); break; case NEXT_KEY: - return msd_media_player_key_pressed (manager, "Next"); + return do_multimedia_player_action (manager, "Next"); break; default: g_assert_not_reached (); -- cgit v1.2.1