Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/rhythmbox/ChangeLog,v
retrieving revision 1.415
diff -r1.415 ChangeLog
0a1,9
> 2003-01-31  Mark Humphreys <marquee@users.sourceforge.net>
> 
> 	* shell/rb-player.c: (rb_player_get_right_part),
> 	(rb_pause_or_play), (rb_player_action_handle_key):
> 	* shell/rb-player.h:
> 	* shell/rb.c: (rb_construct), (rb_set_title),
> 	(rb_window_key_press_cb):
> 	Addition of basic ACME support - prev / next / pause / play
> 
Index: shell/rb-player.c
===================================================================
RCS file: /cvs/gnome/rhythmbox/shell/rb-player.c,v
retrieving revision 1.30
diff -r1.30 rb-player.c
45a46
> #include <X11/XF86keysym.h>
1313a1315,1357
> }
> 
> static void
> rb_pause_or_play (RBPlayer *player)
> {
> 	if (player != NULL)
> 	{
> 		switch (rb_player_get_state (player)) {
> 		case RB_PLAYER_PLAYING:
> 			rb_play (player);
> 			break;
> 		case RB_PLAYER_STOPPED:
> 		case RB_PLAYER_PAUSED:
> 			rb_pause (player);
> 			break;
> 		default:
> 			g_assert_not_reached ();
> 			break;
> 		}
> 	}
> }
> 
> gboolean
> rb_player_action_handle_key (RBPlayer *player, guint keyval)
> {
> 	gboolean retval = TRUE;
> 
> 	switch (keyval) {
> 	case XF86XK_AudioPlay:
> 	case XF86XK_AudioPause:
> 		rb_pause_or_play (player);
> 		break;
> 	case XF86XK_AudioPrev:
> 		rb_previous (player);
> 		break;
> 	case XF86XK_AudioNext:
> 		rb_next (player);
> 		break;
> 	default:
> 		retval = FALSE;
> 	}
> 
> 	return retval;
Index: shell/rb-player.h
===================================================================
RCS file: /cvs/gnome/rhythmbox/shell/rb-player.h,v
retrieving revision 1.8
diff -r1.8 rb-player.h
87a88,90
> gboolean rb_player_action_handle_key (RBPlayer *player, guint keyval);
> 
> 
Index: shell/rb.c
===================================================================
RCS file: /cvs/gnome/rhythmbox/shell/rb.c,v
retrieving revision 1.6
diff -r1.6 rb.c
83a84,85
> static int rb_window_key_press_cb (GtkWidget *win, GdkEventKey *event,
> 		                gpointer user_data);
310a313,317
> 	/* Connect the keys */
> 	gtk_widget_add_events (rb->priv->window, GDK_KEY_PRESS_MASK);
> 	g_signal_connect (G_OBJECT(win), "key_press_event",
> 			G_CALLBACK (rb_window_key_press_cb), rb);
> 
570a578,596
> }
> 
> static int
> rb_window_key_press_cb (GtkWidget *win, GdkEventKey *event,
> 		                gpointer user_data)
> {
> 	RBPlayer *player;
>  
> 	player = RB_PLAYER (RB (user_data)->priv->player);
> 
> //	if ((event->state | GDK_SHIFT_MASK) != event->state
> //			&& (event->state | GDK_LOCK_MASK) != event->state
> //			&& (event->state | GDK_SHIFT_MASK | GDK_LOCK_MASK)
> //			!= event->state)
> //	{
> //		return FALSE;	
> //	}
> 
> 	return rb_player_action_handle_key (player, event->keyval);
