Mercurial > audlegacy-plugins
changeset 2278:614f7b9838fb
Automated merge with ssh://hg.atheme.org//hg/audacious-plugins
author | William Pitcock <nenolod@atheme.org> |
---|---|
date | Tue, 01 Jan 2008 16:04:29 -0600 |
parents | 5e54ffc4f46f (diff) d25cd7e7eddb (current diff) |
children | 90d9e13d2e18 |
files | |
diffstat | 3 files changed, 28 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lirc/Makefile Tue Jan 01 23:12:46 2008 +0900 +++ b/src/lirc/Makefile Tue Jan 01 16:04:29 2008 -0600 @@ -1,7 +1,10 @@ PLUGIN = lirc${PLUGIN_SUFFIX} SRCS = about.c \ - lirc.c + lirc.c \ + lirc_cfg.c \ + callbacks.c \ + interface.c include ../../buildsys.mk include ../../extra.mk
--- a/src/lirc/about.c Tue Jan 01 23:12:46 2008 +0900 +++ b/src/lirc/about.c Tue Jan 01 16:04:29 2008 -0600 @@ -96,8 +96,9 @@ "from the XMMS LIRC plugin by:\n" "Carl van Schaik <carl@leg.uct.ac.za>\n" "Christoph Bartelmus <xmms@bartelmus.de>\n" +"Andrew O. Shadoura <bugzilla@tut.by>\n" "You can get LIRC information at:\n" -"http://fsinfo.cs.uni-sb.de/~columbus/lirc/index.html")); +"http://lirc.org")); label=gtk_label_new( logo_text->str ); g_string_free( logo_text, TRUE );
--- a/src/lirc/lirc.c Tue Jan 01 23:12:46 2008 +0900 +++ b/src/lirc/lirc.c Tue Jan 01 16:04:29 2008 -0600 @@ -46,13 +46,15 @@ #include "lirc.h" +#include "common.h" + const char *plugin_name="LIRC Plugin"; GeneralPlugin lirc_plugin = { .description = "LIRC Plugin", .init = init, .about = about, - .configure = NULL, + .configure = configure, .cleanup = cleanup }; @@ -67,7 +69,7 @@ gint input_tag; -void init(void) +void init_lirc(void) { int flags; @@ -98,6 +100,19 @@ fflush(stdout); } +void init(void) +{ + load_cfg(); + init_lirc(); +} + +gboolean reconnect_lirc(gpointer data) +{ + fprintf(stderr,_("%s: trying to reconnect...\n"),plugin_name); + init(); + return (lirc_fd==-1); +} + void lirc_input_callback(gpointer data,gint source, GdkInputCondition condition) { @@ -304,7 +319,11 @@ /* something went badly wrong */ fprintf(stderr,_("%s: disconnected from LIRC\n"),plugin_name); cleanup(); - return; + if(b_enable_reconnect) + { + fprintf(stderr,_("%s: will try reconnect every %d seconds...\n"),plugin_name,reconnect_timeout); + g_timeout_add(1000*reconnect_timeout, reconnect_lirc, NULL); + } } }