rpms/rhythmbox/devel rb-default-lirc-setup.patch, NONE, 1.1 rhythmbox.spec, 1.200, 1.201
Bastien Nocera (hadess)
fedora-extras-commits at redhat.com
Thu Aug 14 15:32:29 UTC 2008
Author: hadess
Update of /cvs/pkgs/rpms/rhythmbox/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv31238
Modified Files:
rhythmbox.spec
Added Files:
rb-default-lirc-setup.patch
Log Message:
* Thu Aug 14 2008 - Bastien Nocera <bnocera at redhat.com> 0.11.6-5
- Add a default LIRC configuration, so it works out-of-the-box
rb-default-lirc-setup.patch:
--- NEW FILE rb-default-lirc-setup.patch ---
Index: lib/rb-util.h
===================================================================
--- lib/rb-util.h (revision 5858)
+++ lib/rb-util.h (working copy)
@@ -38,6 +38,10 @@
G_BEGIN_DECLS
+/* Offsets for seeking forward, and rewinding in seconds */
+#define FFWD_OFFSET 20
+#define RWD_OFFSET 10
+
gboolean rb_true_function (gpointer dummy);
gboolean rb_false_function (gpointer dummy);
gpointer rb_null_function (gpointer dummy);
Index: plugins/lirc/rhythmbox_lirc_default
===================================================================
--- plugins/lirc/rhythmbox_lirc_default (revision 0)
+++ plugins/lirc/rhythmbox_lirc_default (revision 0)
@@ -0,0 +1,116 @@
+# edit the "button =" part for each entry according to your remote, and stick
+# this stuff in ~/.lircrc
+
+begin
+ prog = Rhythmbox
+ remote = *
+ button = KEY_PLAY
+ repeat = 1
+ config = play
+end
+
+begin
+ prog = Rhythmbox
+ remote = *
+ button = KEY_PAUSE
+ repeat = 0
+ config = pause
+end
+
+begin
+ prog = Rhythmbox
+ remote = *
+ button = KEY_PLAYPAUSE
+ repeat = 1
+ config = playpause
+end
+
+begin
+ prog = Rhythmbox
+ remote = *
+ button = KEY_STOP
+ repeat = 1
+ config = stop
+end
+
+#FIXME
+#begin
+# prog = Rhythmbox
+# remote = *
+# button =
+# repeat = 1
+# config = shuffle
+#end
+
+#FIXME
+#begin
+# prog = Rhythmbox
+# remote = *
+# button =
+# repeat = 1
+# config = repeat
+#end
+
+begin
+ prog = Rhythmbox
+ remote = *
+ button = KEY_NEXT
+ repeat = 1
+ config = next
+end
+
+begin
+ prog = Rhythmbox
+ remote = *
+ button = previous
+ repeat = 1
+ config = KEY_PREVIOUS
+end
+
+begin
+ prog = Rhythmbox
+ remote = *
+ button = KEY_FASTFORWARD
+ repeat = 1
+ config = seek_forward
+end
+
+begin
+ prog = Rhythmbox
+ remote = *
+ button = KEY_REWIND
+ repeat = 1
+ config = seek_backward
+end
+
+begin
+ prog = Rhythmbox
+ remote = *
+ button = KEY_VOLUMEUP
+ repeat = 1
+ config = volume_up
+end
+
+begin
+ prog = Rhythmbox
+ remote = *
+ button = KEY_VOLUMEDOWN
+ repeat = 1
+ config = volume_down
+end
+
+begin
+ prog = Rhythmbox
+ remote = *
+ button = KEY_MUTE
+ repeat = 1
+ config = mute
+end
+
+begin
+ prog = Rhythmbox
+ remote = *
+ button = KEY_EXIT
+ repeat = 1
+ config = quit
+end
Index: plugins/lirc/rb-lirc-plugin.c
===================================================================
--- plugins/lirc/rb-lirc-plugin.c (revision 5858)
+++ plugins/lirc/rb-lirc-plugin.c (working copy)
@@ -42,6 +42,7 @@
#include "rb-plugin.h"
#include "rb-shell.h"
#include "rb-debug.h"
+#include "rb-util.h"
#include "rb-shell-player.h"
#define RB_TYPE_LIRC_PLUGIN (rb_lirc_plugin_get_type ())
@@ -162,9 +163,9 @@
} else if (strcmp (str, RB_IR_COMMAND_PREVIOUS) == 0) {
rb_shell_player_do_previous (plugin->shell_player, NULL);
} else if (strcmp (str, RB_IR_COMMAND_SEEK_FORWARD) == 0) {
- rb_shell_player_seek (plugin->shell_player, 10);
+ rb_shell_player_seek (plugin->shell_player, FFWD_OFFSET);
} else if (strcmp (str, RB_IR_COMMAND_SEEK_BACKWARD) == 0) {
- rb_shell_player_seek (plugin->shell_player, -10);
+ rb_shell_player_seek (plugin->shell_player, -RWD_OFFSET);
} else if (strcmp (str, RB_IR_COMMAND_VOLUME_UP) == 0) {
rb_shell_player_set_volume_relative (plugin->shell_player, 0.1, NULL);
} else if (strcmp (str, RB_IR_COMMAND_VOLUME_DOWN) == 0) {
@@ -191,6 +192,7 @@
RBShell *shell)
{
int fd;
+ char *path;
RBLircPlugin *plugin = RB_LIRC_PLUGIN (rbplugin);
plugin->shell = g_object_ref (shell);
@@ -205,12 +207,18 @@
return;
}
- if (lirc_readconfig (NULL, &plugin->lirc_config, NULL) == -1) {
+ /* Load the default Rhythmbox setup */
+ path = rb_plugin_find_file (rbplugin, "rhythmbox_lirc_default");
+ if (path == NULL || lirc_readconfig (path, &plugin->lirc_config, NULL) == -1) {
+ g_free (path);
close (fd);
rb_debug ("Couldn't read lirc configuration");
return;
}
+ g_free (path);
+ lirc_readconfig (NULL, &plugin->lirc_config, NULL);
+
plugin->lirc_channel = g_io_channel_unix_new (fd);
g_io_channel_set_encoding (plugin->lirc_channel, NULL, NULL);
g_io_channel_set_buffered (plugin->lirc_channel, FALSE);
Index: plugins/lirc/Makefile.am
===================================================================
--- plugins/lirc/Makefile.am (revision 5858)
+++ plugins/lirc/Makefile.am (working copy)
@@ -6,6 +6,9 @@
librblirc_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS) -llirc_client
+configdir = $(PLUGINDIR)/lirc
+config_DATA = rhythmbox_lirc_default
+
INCLUDES = \
-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
-DG_LOG_DOMAIN=\"Rhythmbox\" \
@@ -32,7 +35,7 @@
plugin_DATA = $(plugin_in_files:.rb-plugin.in=.rb-plugin)
-EXTRA_DIST = $(plugin_in_files)
+EXTRA_DIST = $(plugin_in_files) $(config_DATA)
CLEANFILES = $(plugin_DATA)
DISTCLEANFILES = $(plugin_DATA)
Index: rhythmbox.spec
===================================================================
RCS file: /cvs/pkgs/rpms/rhythmbox/devel/rhythmbox.spec,v
retrieving revision 1.200
retrieving revision 1.201
diff -u -r1.200 -r1.201
--- rhythmbox.spec 12 Aug 2008 15:49:40 -0000 1.200
+++ rhythmbox.spec 14 Aug 2008 15:31:58 -0000 1.201
@@ -61,6 +61,8 @@
# http://bugzilla.gnome.org/show_bug.cgi?id=546962
# https://bugzilla.redhat.com/show_bug.cgi?id=458388
Patch2: rhythmbox-0.11.6-libmtp-0.3.patch
+# http://bugzilla.gnome.org/show_bug.cgi?id=545555
+Patch3: rb-default-lirc-setup.patch
Patch10: rhythmbox-0.11.5-xfade-buffering.patch
@@ -97,6 +99,7 @@
%patch0 -p0 -b .dont-disable-suspend
%patch1 -p0 -b .ipod-vfat
%patch2 -p1 -b .mtp
+%patch3 -p0 -b .lirc
%patch10 -p1 -b .xfade
%patch23 -p1 -b .icon-names
@@ -216,6 +219,9 @@
%{_libdir}/rhythmbox/plugins/upnp_coherence
%changelog
+* Thu Aug 14 2008 - Bastien Nocera <bnocera at redhat.com> 0.11.6-5
+- Add a default LIRC configuration, so it works out-of-the-box
+
* Tue Aug 12 2008 - Bastien Nocera <bnocera at redhat.com> 0.11.6-4
- Add patch for libmtp 0.3 support (#458388)
More information about the fedora-extras-commits
mailing list