summaryrefslogtreecommitdiff
path: root/PLUGINS
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2006-09-10 14:25:55 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2006-09-10 14:25:55 +0200
commit1b79274fae752076ffa13d4f43a698fefb68b3c6 (patch)
treecc20d086333574c6c08037e9d6155c1d2a85be93 /PLUGINS
parent2aa6df4b7ceaeef5527a46041bb505b0e638904e (diff)
downloadvdr-1b79274fae752076ffa13d4f43a698fefb68b3c6.tar.gz
vdr-1b79274fae752076ffa13d4f43a698fefb68b3c6.tar.bz2
The 'skincurses' plugin now adjusts the size of the OSD to the size of the console window
Diffstat (limited to 'PLUGINS')
-rw-r--r--PLUGINS/src/skincurses/HISTORY4
-rw-r--r--PLUGINS/src/skincurses/skincurses.c17
2 files changed, 15 insertions, 6 deletions
diff --git a/PLUGINS/src/skincurses/HISTORY b/PLUGINS/src/skincurses/HISTORY
index c58423df..96ff93c8 100644
--- a/PLUGINS/src/skincurses/HISTORY
+++ b/PLUGINS/src/skincurses/HISTORY
@@ -35,3 +35,7 @@ VDR Plugin 'skincurses' Revision History
- Fixed handling tabbed item display.
- When the 'skincurses' plugin is loaded, it automatically sets the 'curses'
skin as the current one.
+
+2006-09-10: Version 0.0.8
+
+- The size of the OSD is now adjusted to the size of the console window.
diff --git a/PLUGINS/src/skincurses/skincurses.c b/PLUGINS/src/skincurses/skincurses.c
index a75375b5..243ddcec 100644
--- a/PLUGINS/src/skincurses/skincurses.c
+++ b/PLUGINS/src/skincurses/skincurses.c
@@ -3,7 +3,7 @@
*
* See the README file for copyright information and how to reach the author.
*
- * $Id: skincurses.c 1.10 2006/06/03 14:20:39 kls Exp $
+ * $Id: skincurses.c 1.11 2006/09/10 14:23:55 kls Exp $
*/
#include <ncurses.h>
@@ -11,7 +11,7 @@
#include <vdr/plugin.h>
#include <vdr/skins.h>
-static const char *VERSION = "0.0.7";
+static const char *VERSION = "0.0.8";
static const char *DESCRIPTION = "A text only skin";
static const char *MAINMENUENTRY = NULL;
@@ -53,8 +53,8 @@ static int clrMessage[] = {
clrRed
};
-#define OsdWidth 50//XXX
-#define OsdHeight 20//XXX
+static int OsdWidth = 50;
+static int OsdHeight = 20;
class cCursesOsd : public cOsd {
private:
@@ -780,8 +780,13 @@ bool cPluginSkinCurses::ProcessArgs(int argc, char *argv[])
bool cPluginSkinCurses::Initialize(void)
{
// Initialize any background activities the plugin shall perform.
- initscr();
- return true;
+ WINDOW *w = initscr();
+ if (w) {
+ OsdWidth = w->_maxx - w->_begx + 1;
+ OsdHeight = w->_maxy - w->_begy + 1;
+ return true;
+ }
+ return false;
}
bool cPluginSkinCurses::Start(void)