diff options
Diffstat (limited to 'plugins/lirc')
-rw-r--r-- | plugins/lirc/CMakeLists.txt | 35 | ||||
-rw-r--r-- | plugins/lirc/dot-lircrc.example | 221 | ||||
-rw-r--r-- | plugins/lirc/lircsupport.cpp | 10 | ||||
-rw-r--r-- | plugins/lirc/lircsupport.h | 2 | ||||
-rw-r--r-- | plugins/lirc/po/CMakeLists.txt | 1 | ||||
-rw-r--r-- | plugins/lirc/po/tderadio-lirc/tderadio-lirc.pot | 22 |
6 files changed, 268 insertions, 23 deletions
diff --git a/plugins/lirc/CMakeLists.txt b/plugins/lirc/CMakeLists.txt new file mode 100644 index 0000000..f0e35a1 --- /dev/null +++ b/plugins/lirc/CMakeLists.txt @@ -0,0 +1,35 @@ +include_directories( + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_SOURCE_DIR} + ${CMAKE_BINARY_DIR} + ${TQT_INCLUDE_DIRS} + ${TDE_INCLUDE_DIR} +) + +link_directories( + ${TQT_LIBRARY_DIRS} + ${TDE_LIB_DIR} +) + + +##### lirc (translations) + +tde_conditional_add_subdirectory( BUILD_TRANSLATIONS po ) + + +##### lirc (plugin) + +tde_add_kpart( liblirc AUTOMOC + SOURCES lircsupport.cpp lirc-configuration-ui.ui lirc-configuration.cpp listviewitem_lirc.cpp + LINK tderadio-shared ${LIRC_LIBRARIES} + DESTINATION ${LIB_INSTALL_DIR}/${PROJECT_NAME}/plugins +) + + +##### other data + +INSTALL( + FILES default-dot-lircrc + DESTINATION ${DATA_INSTALL_DIR}/tderadio +) diff --git a/plugins/lirc/dot-lircrc.example b/plugins/lirc/dot-lircrc.example new file mode 100644 index 0000000..73176c4 --- /dev/null +++ b/plugins/lirc/dot-lircrc.example @@ -0,0 +1,221 @@ +begin + flags = startup_mode + mode = TV-off +end + + +begin TV-off + + begin + button = RESERVED + repeat = 0 + prog = irexec + config = if xset q | grep "DPMS is Enabled" > /dev/null ; then xset -dpms; else xset dpms force off; fi + end + + begin + prog = tderadio + config = eventmap + end + + begin + button = TV + repeat = 0 + prog = irexec + config = xset -dpms && sleep 1 && tvtime & + end + + begin + button = TV + mode = TV-on + flags = quit + end + +end TV-off + + + +begin TV-on + + +# The following defines most of the common buttons found on a remote and +# what commads they would map to inside tvtime. + +begin + prog = irexec + button = SOURCE + config = tvtime-command TOGGLE_INPUT +end + +#begin +# prog = irexec +# button = DISPLAY +# config = tvtime-command DISPLAY_INFO +# repeat = 1 +#end + +begin + prog = irexec + button = FULL_SCREEN + config = tvtime-command TOGGLE_FULLSCREEN +end + +#begin +# prog = irexec +# button = CC +# config = tvtime-command TOGGLE_CC +#end + +begin + prog = irexec + button = MUTE + config = tvtime-command TOGGLE_MUTE +end + +# Menu navigation. +begin + prog = irexec + button = CH+ + config = tvtime-command UP + repeat = 0 +end +begin + prog = irexec + button = CH- + config = tvtime-command DOWN + repeat = 0 +end +begin + prog = irexec + button = VOL+ + config = tvtime-command RIGHT + config = tvtime-command RIGHT + repeat = 1 +end + +begin + prog = irexec + button = VOL- + config = tvtime-command LEFT + config = tvtime-command LEFT + repeat = 1 +end + +#begin +# prog = irexec +# button = RECALL +# config = tvtime-command CHANNEL_JUMP +# repeat = 1 +#end + +begin + prog = irexec + button = 1 + config = tvtime-command CHANNEL_1 +end +begin + prog = irexec + button = 2 + config = tvtime-command CHANNEL_2 +end +begin + prog = irexec + button = 3 + config = tvtime-command CHANNEL_3 +end +begin + prog = irexec + button = 4 + config = tvtime-command CHANNEL_4 +end +begin + prog = irexec + button = 5 + config = tvtime-command CHANNEL_5 +end +begin + prog = irexec + button = 6 + config = tvtime-command CHANNEL_6 +end +begin + prog = irexec + button = 7 + config = tvtime-command CHANNEL_7 +end +begin + prog = irexec + button = 8 + config = tvtime-command CHANNEL_8 +end +begin + prog = irexec + button = 9 + config = tvtime-command CHANNEL_9 +end +begin + prog = irexec + button = 0 + config = tvtime-command CHANNEL_0 +end + +#begin +# prog = irexec +# button = ENTER +# config = tvtime-command ENTER +#end + + + begin + prog = irexec + button = RESERVED + config = tvtime-command QUIT + end + + begin + prog = irexec + button = MINIMIZE + config = tvtime-command QUIT + end + + begin + prog = irexec + button = RADIO + config = tvtime-command QUIT + end + + begin + prog = irexec + button = TV + config = tvtime-command QUIT + end + + begin + button = RESERVED + mode = TV-off + flags = quit + end + + begin + button = TV + mode = TV-off + flags = quit + end + + + begin + button = MINIMIZE + mode = TV-off + flags = quit + end + + + begin + button = RADIO + mode = TV-off + flags = quit + end + + +end TV-on + diff --git a/plugins/lirc/lircsupport.cpp b/plugins/lirc/lircsupport.cpp index 8fef92f..adb4bb1 100644 --- a/plugins/lirc/lircsupport.cpp +++ b/plugins/lirc/lircsupport.cpp @@ -17,9 +17,7 @@ #include "lircsupport.h" -#ifdef HAVE_LIRC #include <lirc/lirc_client.h> -#endif #include <tqsocketnotifier.h> #include <tqtimer.h> @@ -43,9 +41,7 @@ /////////////////////////////////////////////////////////////////////// //// plugin library functions -//#ifdef HAVE_LIRC PLUGIN_LIBRARY_FUNCTIONS(LircSupport, "tderadio-lirc", i18n("Linux Infrared Control (LIRC) Support")); -//#endif ///////////////////////////////////////////////////////////////////////////// @@ -54,7 +50,6 @@ LircSupport::LircSupport(const TQString &name) m_TakeRawLIRC(false) { -#ifdef HAVE_LIRC logDebug(i18n("initializing tderadio lirc plugin")); fprintf (stderr, "%s\n", (const char*)i18n("initializing tderadio lirc plugin").utf8()); char *prg = (char*)"tderadio"; @@ -111,7 +106,6 @@ LircSupport::LircSupport(const TQString &name) logDebug(i18n("Initializing tderadio lirc plugin successful")); fprintf (stderr, "%s\n", (const char*)i18n("Initializing tderadio lirc plugin successful").utf8()); } -#endif m_kbdTimer = new TQTimer (this); TQObject::connect (m_kbdTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotKbdTimedOut())); @@ -122,20 +116,17 @@ LircSupport::LircSupport(const TQString &name) LircSupport::~LircSupport() { -#ifdef HAVE_LIRC if (m_fd_lirc != -1) lirc_deinit(); if (m_lircConfig) lirc_freeconfig(m_lircConfig); m_fd_lirc = -1; m_lircConfig = 0; -#endif } void LircSupport::slotLIRC(int /*socket*/ ) { -#ifdef HAVE_LIRC if (!m_lircConfig || !m_lirc_notify || m_fd_lirc == -1) return; @@ -173,7 +164,6 @@ void LircSupport::slotLIRC(int /*socket*/ ) if (code) free (code); -#endif } diff --git a/plugins/lirc/lircsupport.h b/plugins/lirc/lircsupport.h index bd1ad8a..df6b475 100644 --- a/plugins/lirc/lircsupport.h +++ b/plugins/lirc/lircsupport.h @@ -141,11 +141,9 @@ signals: protected: -#ifdef HAVE_LIRC TQSocketNotifier *m_lirc_notify; int m_fd_lirc; struct lirc_config *m_lircConfig; -#endif TQTimer *m_kbdTimer; int m_addIndex; diff --git a/plugins/lirc/po/CMakeLists.txt b/plugins/lirc/po/CMakeLists.txt new file mode 100644 index 0000000..24e3bd8 --- /dev/null +++ b/plugins/lirc/po/CMakeLists.txt @@ -0,0 +1 @@ +tde_add_project_translations() diff --git a/plugins/lirc/po/tderadio-lirc/tderadio-lirc.pot b/plugins/lirc/po/tderadio-lirc/tderadio-lirc.pot index 9dfef8f..e0e1ccb 100644 --- a/plugins/lirc/po/tderadio-lirc/tderadio-lirc.pot +++ b/plugins/lirc/po/tderadio-lirc/tderadio-lirc.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2020-05-11 04:30+0200\n" +"POT-Creation-Date: 2022-07-09 17:53+0900\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <[email protected]>\n" @@ -129,46 +129,46 @@ msgstr "" msgid "Double Click on the entries to change the assignments" msgstr "" -#: lircsupport.cpp:47 +#: lircsupport.cpp:44 msgid "Linux Infrared Control (LIRC) Support" msgstr "" -#: lircsupport.cpp:53 lircsupport.cpp:332 +#: lircsupport.cpp:49 lircsupport.cpp:322 msgid "LIRC Plugin" msgstr "" -#: lircsupport.cpp:58 lircsupport.cpp:59 +#: lircsupport.cpp:53 lircsupport.cpp:54 msgid "initializing tderadio lirc plugin" msgstr "" -#: lircsupport.cpp:67 +#: lircsupport.cpp:62 msgid "" "%1 does not exist. File was created with TDERadio's default .lircrc proposal" msgstr "" -#: lircsupport.cpp:96 +#: lircsupport.cpp:91 msgid "There is no entry for tderadio in any of your .lircrc files." msgstr "" -#: lircsupport.cpp:97 +#: lircsupport.cpp:92 msgid "Please setup your .lircrc files correctly." msgstr "" -#: lircsupport.cpp:108 lircsupport.cpp:109 +#: lircsupport.cpp:103 lircsupport.cpp:104 msgid "Initializing tderadio lirc plugin failed" msgstr "" -#: lircsupport.cpp:111 lircsupport.cpp:112 +#: lircsupport.cpp:106 lircsupport.cpp:107 msgid "Initializing tderadio lirc plugin successful" msgstr "" -#: lircsupport.cpp:169 +#: lircsupport.cpp:160 msgid "" "Reading from LIRC socket failed. Disabling LIRC Functions till next start of " "tderadio" msgstr "" -#: lircsupport.cpp:331 +#: lircsupport.cpp:321 msgid "LIRC Support" msgstr "" |