Skip to content

Commit

Permalink
- Moved images from compiled in image dir to data dir 'img'.
Browse files Browse the repository at this point in the history
- Fixed MapUrl entries to the new image location
- Adapted some pages for the new image locations.
- Added a preload functionalty to fill file cache at plugin startup.
  • Loading branch information
Dieter Hametner committed Sep 17, 2007
1 parent 5f3d9f1 commit 721f621
Show file tree
Hide file tree
Showing 65 changed files with 195 additions and 107 deletions.
9 changes: 4 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# Makefile for a Video Disk Recorder plugin
#
# $Id: Makefile,v 1.49 2007/09/02 18:42:07 winni Exp $
# $Id: Makefile,v 1.50 2007/09/17 22:23:40 tadi Exp $

# The official name of this plugin.
# This name will be used in the '-P...' option of VDR to load the plugin.
Expand Down Expand Up @@ -57,16 +57,15 @@ export DEFINES

LIBS += httpd/libhttpd.a

SUBDIRS = httpd pages css images javascript
SUBDIRS = httpd pages css javascript

### The object files (add further files here):

PLUGINOBJS = $(PLUGIN).o thread.o tntconfig.o setup.o i18n.o timers.o \
tools.o recordings.o tasks.o status.o epg_events.o epgsearch.o \
grab.o md5.o filecache.o livefeatures.o
grab.o md5.o filecache.o livefeatures.o preload.o

WEBLIBS = pages/libpages.a css/libcss.a images/libimages.a \
javascript/libjavascript.a
WEBLIBS = pages/libpages.a css/libcss.a javascript/libjavascript.a

### Default rules:

Expand Down
40 changes: 20 additions & 20 deletions css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ div.info-win {
.info-win .info-win-top .info-win-c .info-win-b .close {
width: 16px;
height: 16px;
background: transparent url(close.png) no-repeat top right;
background: transparent url(img/close.png) no-repeat top right;
}

.info-win .info-win-top .info-win-c .info-win-b .close:hover {
Expand Down Expand Up @@ -371,7 +371,7 @@ div.info-win {
*/

div.menu {
background: #000057 url(menu_line_bg.png) repeat-x;
background: #000057 url(img/menu_line_bg.png) repeat-x;
min-height: 27px;
margin: 0;
padding: 0 0 0 10px;
Expand Down Expand Up @@ -408,12 +408,12 @@ div.inhalt {
div.pagemenu {
margin-top: 2px;
padding-top: 6px;
background: #FFFFFF url(bg_line.png) top repeat-x;
background: #FFFFFF url(img/bg_line.png) top repeat-x;
}

div.pagemenu div {
/* padding-bottom: 6px; */
background: #FFFFFF url(bg_line_top.png) bottom repeat-x;
background: #FFFFFF url(img/bg_line_top.png) bottom repeat-x;
}

div.pagemenu div div {
Expand Down Expand Up @@ -501,7 +501,7 @@ div#infobox div.st_header div.caption {
div#infobox div.st_content {
overflow: hidden;
padding: 4px;
background: white url('bg_line_top.png') top left repeat-x;
background: white url(img/bg_line_top.png) top left repeat-x;
}

div#infobox div.st_content div.duration {
Expand Down Expand Up @@ -549,7 +549,7 @@ button.green {
width: 100px;
height: 20px;
background-color: inherit;
background-image: url(button_green.png);
background-image: url(img/button_green.png);
background-repeat: no-repeat;
color: #FFFFFF;
font-size: 11px;
Expand All @@ -564,7 +564,7 @@ button.red {
width: 100px;
height: 20px;
background-color: inherit;
background-image: url(button_red.png);
background-image: url(img/button_red.png);
background-repeat: no-repeat;
color: #FFFFFF;
font-size: 11px;
Expand All @@ -579,7 +579,7 @@ button.blue {
width: 100px;
height: 20px;
background-color: inherit;
background-image: url(button_blue.png);
background-image: url(img/button_blue.png);
background-repeat: no-repeat;
color: #FFFFFF;
font-size: 11px;
Expand Down Expand Up @@ -647,16 +647,16 @@ div.event div.station {
div.station div {
margin: 0;
padding: 0;
background: url(bg_box_l.png) top left no-repeat;
background: url(img/bg_box_l.png) top left no-repeat;
height: 23px;
}

div.station div div {
background: url(bg_box_r.png) top right no-repeat;
background: url(img/bg_box_r.png) top right no-repeat;
}

div.station div div div {
background: url(bg_box_h.png) repeat-x;
background: url(img/bg_box_h.png) repeat-x;
line-height: 20px;
vertical-align: middle;
text-align: left;
Expand Down Expand Up @@ -688,7 +688,7 @@ div.content {
margin: 0;
overflow: hidden;

background: white url(bg_tools.png) top left repeat-y;
background: white url(img/bg_tools.png) top left repeat-y;
border-left: 1px solid #000000;
border-right: 1px solid #000000;
border-bottom: 1px solid #000000;
Expand Down Expand Up @@ -773,7 +773,7 @@ table.listing {
}

table.listing tr td {
background: transparent url(bg_line.png) bottom repeat-x;
background: transparent url(img/bg_line.png) bottom repeat-x;
border-bottom: 1px solid #C0C1DA;
}

Expand Down Expand Up @@ -824,16 +824,16 @@ table.listing a {
div.boxheader {
margin: 0px;
padding: 0px;
background: url(bg_box_l.png) top left no-repeat;
background: url(img/bg_box_l.png) top left no-repeat;
}

div.boxheader div {
margin: 0px;
background: url(bg_box_r.png) top right no-repeat;
background: url(img/bg_box_r.png) top right no-repeat;
}

div.boxheader div div {
background: url(bg_box_h.png) repeat-x;
background: url(img/bg_box_h.png) repeat-x;
vertical-align: middle;
text-align: left;
margin-right: 3px;
Expand Down Expand Up @@ -864,7 +864,7 @@ div.recordings {

div.recording_item {
overflow: hidden;
background: url(bg_line.png) bottom repeat-x;
background: url(img/bg_line.png) bottom repeat-x;
border-bottom: 1px solid #C0C1DA;
}

Expand Down Expand Up @@ -920,7 +920,7 @@ div.recording_item {
*/

div.screenshot {
background-image: url(tv.jpg);
background-image: url(img/tv.jpg);
background-repeat: no-repeat;
height: 240px;
width: 320px;
Expand Down Expand Up @@ -973,7 +973,7 @@ table.formular {
table.formular tr td {
vertical-align: top;
vertical-align: middle;
background: url(bg_line.png) bottom repeat-x;
background: url(img/bg_line.png) bottom repeat-x;
border-bottom: 1px solid #C0C1DA;
}

Expand Down Expand Up @@ -1045,7 +1045,7 @@ table.login tr td {
.info-win div.epg_content {
padding: 0px 0px 7px 0px;
margin: 0px 0px 0px 0px;
background: transparent url(bg_tools.png) top left repeat-y;
background: transparent url(img/bg_tools.png) top left repeat-y;
border: 0px;
overflow: hidden;
}
Expand Down
10 changes: 10 additions & 0 deletions doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
2007-09-18 Dieter Hametner <dh+vdr at gekrumbel dot de>

- Eliminated 'images' directory. The images are now not longer
compiled with ecpp into the executable module of live. With the
content.ecpp part and file cache we have a equally performant
solution to compiled in files.
- Added file cache preload functionality. The file cache is filled
with a list of files defined at compile time on plugin startup
time.

2007-09-09 Dieter Hametner <dh+vdr at gekrumbel dot de>

* tntconfig.cpp: allways give absolute paths to content.ecpp
Expand Down
58 changes: 0 additions & 58 deletions images/Makefile

This file was deleted.

4 changes: 2 additions & 2 deletions javascript/treeview.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,14 @@ function Toggle(node)
if (sibling.style.display == 'none')
{
if (imgChild != null)
setImages(imgChild, "minus.png", "folder_open.png");
setImages(imgChild, "img/minus.png", "img/folder_open.png");
sibling.style.display = 'block';
}
// Collapse the branch if it IS visible
else
{
if (imgChild != null)
setImages(imgChild, "plus.png", "folder_closed.png");
setImages(imgChild, "img/plus.png", "img/folder_closed.png");
sibling.style.display = 'none';
}
}
7 changes: 6 additions & 1 deletion live.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* See the README file for copyright information and how to reach the author.
*
* $Id: live.cpp,v 1.16 2007/08/19 19:48:54 tadi Exp $
* $Id: live.cpp,v 1.17 2007/09/17 22:23:40 tadi Exp $
*/

#include <vdr/plugin.h>
Expand All @@ -14,6 +14,7 @@
#include "tasks.h"
#include "thread.h"
#include "timers.h"
#include "preload.h"

namespace vdrlive {

Expand Down Expand Up @@ -47,6 +48,10 @@ bool Plugin::Start(void)
#endif
// force status monitor startup
LiveStatusMonitor();

// preload files into file Cache
PreLoadFileCache(m_configDirectory);

// XXX error handling
m_thread.reset( new ServerThread );
m_thread->Start();
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
14 changes: 6 additions & 8 deletions live/js/live/pageenhance.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ var PageEnhance = new Class({
actionLinkSelector: 'a[href^="vdr_request/"]',
hintTipSelector: '*[title]',
hintClassName: 'hint',
notifyIdPrefix: 'notify',
infoWinStrings: {
infoWinOptions: {
bodyselect: 'div.epg_content',
loadingMsg: 'loading',
errorMsg: 'an error occured!'
},
notifyIdPrefix: 'notify',
notifyStrings: {
successMsg: '<img src="active.png" alt=""> Success!',
errorMsg: '<img src="del.png" alt=""> failed!'
Expand Down Expand Up @@ -68,12 +69,9 @@ var PageEnhance = new Class({
epgid = found[1];
el.addEvent('click', function(event){
var event = new Event(event);
new InfoWin.Ajax(epgid, href, {
bodyselect: 'div.epg_content',
onDomExtend: this.domExtend.bind(this),
loadingMsg: this.options.infoWinStrings.loadingMsg,
errorMsg: this.options.infoWinStrings.errorMsg
}).show(event);
new InfoWin.Ajax(epgid, href, $merge(this.options.infoWinOptions, {
onDomExtend: this.domExtend.bind(this)
})).show(event);
event.stop();
return false;
}.bind(this));
Expand Down
2 changes: 1 addition & 1 deletion live/js/live/vdr_status.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ var LiveVdrInfo = Ajax.extend({
var img = $('statusReloadBtn');
if (img != null) {
// change image according to state.
img.src = this.reload ? 'stop_update.png' : 'reload.png';
img.src = this.reload ? 'img/stop_update.png' : 'img/reload.png';
}
}
if (this.reload)
Expand Down
3 changes: 2 additions & 1 deletion pages/pageelems.ecpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@ int update_status(1);
<script type="text/javascript" src="js/live/pageenhance.js"></script>
<script type="text/javascript"><!--
var liveEnhanced = new PageEnhance({
infoWinStrings: {
infoWinOptions: {
buttonimg: 'img/transparent.png',
loadingMsg: '<$ tr("loading data") $>',
errorMsg: '<$ tr("an error occured!") $>'
},
Expand Down
6 changes: 3 additions & 3 deletions pages/recordings.ecpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ for (iter = recordingsTree.begin(path); iter != end; ++iter) {
string folderimg = "folder_closed.png";
</%args>
<div class="recording_item" onclick="Toggle(this)">
<div class="recording_imgs"><%cpp> reply.out() << StringRepeat(level, "<img src=\"transparent.png\" alt=\"\" width=\"16px\" height=\"16px\" />"); </%cpp><img class="recording_expander" src="<$ LiveSetup().GetThemedLink("img", collapseimg) $>" alt="" /><img class="recording_folder" src="<$ LiveSetup().GetThemedLink("img", folderimg) $>" alt="" /></div>
<div class="recording_imgs"><%cpp> reply.out() << StringRepeat(level, "<img src=\"/img/transparent.png\" alt=\"\" width=\"16px\" height=\"16px\" />"); </%cpp><img class="recording_expander" src="<$ LiveSetup().GetThemedLink("img", collapseimg) $>" alt="" /><img class="recording_folder" src="<$ LiveSetup().GetThemedLink("img", folderimg) $>" alt="" /></div>
<div class="recording_spec">
<div class="recording_name"><$ name $></div>
</div>
Expand All @@ -156,7 +156,7 @@ for (iter = recordingsTree.begin(path); iter != end; ++iter) {
string archived;
</%args>
<div class="recording_item">
<div class="recording_imgs"><%cpp> reply.out() << StringRepeat(level + 1, "<img src=\"transparent.png\" alt=\"\" width=\"16px\" height=\"16px\" />"); </%cpp><%cpp> if (!archived.empty()) { </%cpp><& archived_disc archived=(archived) &><%cpp> } else { </%cpp><img src="<$ LiveSetup().GetThemedLink("img", "movie.png") $>" alt="movie" /><%cpp> } </%cpp></div>
<div class="recording_imgs"><%cpp> reply.out() << StringRepeat(level + 1, "<img src=\"/img/transparent.png\" alt=\"\" width=\"16px\" height=\"16px\" />"); </%cpp><%cpp> if (!archived.empty()) { </%cpp><& archived_disc archived=(archived) &><%cpp> } else { </%cpp><img src="<$ LiveSetup().GetThemedLink("img", "movie.png") $>" alt="movie" /><%cpp> } </%cpp></div>
<div class="recording_spec">
<div class="recording_day" style="width: <$ dayLen $>"><$ day $></div>
<div class="recording_date"><$ FormatDateTime(tr("%b %d %y"), startTime) $></div>
Expand All @@ -172,7 +172,7 @@ for (iter = recordingsTree.begin(path); iter != end; ++iter) {
}
else {
</%cpp>
<img src="transparent.png" alt="" width="16px" height="16px" />
<img src="/img/transparent.png" alt="" width="16px" height="16px" />
<%cpp>
}
</%cpp>
Expand Down
2 changes: 1 addition & 1 deletion pages/searchtimers.ecpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
</td>
</tr>
<tr class="description">
<td class="action leftcol"><img src="transparent.png" alt="" width="16px" height="16px"/></td>
<td class="action leftcol"><img src="/img/transparent.png" alt="" width="16px" height="16px"/></td>
<td><div class="withmargin"><$ tr("Expression") $></div></td>
<td><div class="withmargin"><$ tr("Channel") $></div></td>
<td><div class="withmargin"><$ tr("Starts between") $></div></td>
Expand Down
Loading

0 comments on commit 721f621

Please sign in to comment.