aboutsummaryrefslogtreecommitdiff
path: root/src/play-button.c
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2010-07-08 17:47:28 +0100
committerConor Curran <conor.curran@canonical.com>2010-07-08 17:47:28 +0100
commit0f2a6b2736713951fb4b88848e79849a8f1dc72a (patch)
tree100e2d6235254bad950ca2262f3b72f815f1f152 /src/play-button.c
parente4f900efd1e48814a70e4351cc3d878312daef37 (diff)
downloadayatana-indicator-sound-0f2a6b2736713951fb4b88848e79849a8f1dc72a.tar.gz
ayatana-indicator-sound-0f2a6b2736713951fb4b88848e79849a8f1dc72a.tar.bz2
ayatana-indicator-sound-0f2a6b2736713951fb4b88848e79849a8f1dc72a.zip
constants replaced and enums and title image now fetched from the mono theme
Diffstat (limited to 'src/play-button.c')
-rw-r--r--src/play-button.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/play-button.c b/src/play-button.c
index afb46d8..2fddbcf 100644
--- a/src/play-button.c
+++ b/src/play-button.c
@@ -53,6 +53,13 @@ Uses code from ctk
#define PAUSE_X 62.0f
#define PAUSE_Y 15.0f
+// Transport events
+enum {
+ PREVIOUS,
+ PLAY_PAUSE,
+ NEXT
+};
+
typedef struct _PlayButtonPrivate PlayButtonPrivate;
struct _PlayButtonPrivate
@@ -358,15 +365,15 @@ determine_button_event(GtkWidget* button, GdkEventButton* event)
// For now very simple rectangular collision detection
if(event->x > 40 && event->x < 80
&& event->y > 22 && event->y < 46){
- result = 1;
+ result = PREVIOUS;
}
else if(event->x > 86 && event->x < 118
&& event->y > 20 && event->y < 47){
- result = 2;
+ result = PLAY_PAUSE;
}
else if(event->x > 122 && event->x < 164
&& event->y > 22 && event->y < 46){
- result = 3;
+ result = NEXT;
}
return result;