summaryrefslogtreecommitdiff
blob: a1bcd96ddc642405df929dc3f786e6d40dbcdce0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
diff -Naur vdrrip-0.3.0.orig/menu-vdrrip.c vdrrip-0.3.0/menu-vdrrip.c
--- vdrrip-0.3.0.orig/menu-vdrrip.c	Sat Jun 12 13:46:39 2004
+++ vdrrip-0.3.0/menu-vdrrip.c	Sat Jun 12 13:59:53 2004
@@ -4,6 +4,10 @@
 
 #include <vdr/plugin.h>
 #include <vdr/videodir.h>
+#if VDRVERSNUM >= 10307
+#include <vdr/interface.h>
+#include <vdr/status.h>
+#endif
 
 #ifdef VDRRIP_DVD
   #include <dvdnav/ifo_read.h>
@@ -92,14 +96,22 @@
 # ifdef VDRRIP_DVD
 
 cMenuVdrripWarning::cMenuVdrripWarning(const char *Title, const char *Text)
+#if VDRVERSNUM >= 10307
+:cMenuText(Title, "")
+#else
 :cOsdMenu(Title)
+#endif
 {
   bool warning;
   warning = true;
   //warning = false;
 
   if (warning) {
+#if VDRVERSNUM >= 10307
+    SetText(Text);
+#else
     Add(new cMenuTextItem(Text, 1, 2, Setup.OSDwidth - 2, MAXOSDITEMS, clrWhite, clrBackground, fontOsd));
+#endif
     SetHelp(tr("back"), tr("accept"), NULL, NULL);
     hadsubmenu = false;
   } else {
@@ -120,6 +132,22 @@
   if (hadsubmenu) {return osBack;}
   
   switch (Key) {
+#if VDRVERSNUM >= 10307
+    // cMenuText::ProcessKey don't handle submenus
+    case kUp|k_Repeat:
+    case kUp:
+    case kDown|k_Repeat:
+    case kDown:
+    case kLeft|k_Repeat:
+    case kLeft:
+    case kRight|k_Repeat:
+    case kRight:
+      DisplayMenu()->Scroll(NORMALKEY(Key) == kUp || NORMALKEY(Key) == kLeft,
+                            NORMALKEY(Key) == kLeft || NORMALKEY(Key) == kRight);
+      cStatus::MsgOsdTextItem(NULL, NORMALKEY(Key) == kUp);
+      return osContinue;
+#endif
+
     case kRed: return osBack;
 
     case kGreen: {
@@ -138,13 +166,22 @@
   ifo_handle_t *ifo_zero = NULL;
   ifo_handle_t *ifo_tmp = NULL;
 
+#if VDRVERSNUM >= 10307
+  Skins.Message(mtStatus, tr("checking dvd..."));
+  Skins.Flush();
+#else
   Interface->Status(tr("checking dvd..."));
   Interface->Flush();
+#endif
 
   if (access(DVD, R_OK) == -1) {
     char *s = NULL;
     asprintf(&s, "No read privileges on %s !", DVD);
+#if VDRVERSNUM >= 10307
+    Skins.Message(mtError, s);
+#else
     Interface->Error(s);
+#endif
     FREE(s);
     return false;
   }
@@ -160,7 +197,11 @@
 	else {
 	  char *s = NULL;
 	  asprintf(&s, "Can't open ifo %d !", i);
+#if VDRVERSNUM >= 10307
+	  Skins.Message(mtError, s);
+#else
 	  Interface->Error(s);
+#endif
 	  FREE(s);
           DVDClose(dvd);
 	  return false;
@@ -171,14 +212,22 @@
       return true;
     } else {
       DVDClose(dvd);
+#if VDRVERSNUM >= 10307
+      Skins.Message(mtError, "Can't open main ifo from dvd !");
+#else
       Interface->Error("Can't open main ifo from dvd !");
+#endif
       return false;
     }
   }
  
   char *s = NULL;
   asprintf(&s, "Can 't open %s !", DVD);
+#if VDRVERSNUM >= 10307
+  Skins.Message(mtError, s);
+#else
   Interface->Error(s);
+#endif
   FREE(s);
   return false;
 }
@@ -190,8 +239,13 @@
 cMenuVdrripEncode::cMenuVdrripEncode():cOsdMenu(tr("encode vdr-recording")) {
   R = NULL;
   
+#if VDRVERSNUM >= 10307
+  Skins.Message(mtStatus, tr("scanning recordings..."));
+  Skins.Flush();
+#else
   Interface->Status(tr("scanning recordings..."));
   Interface->Flush();
+#endif
 
   R = new cVdrripRecordings;
   Set();
@@ -259,7 +313,13 @@
     FREE(s1);
   }
 
-  if (Q->getLockStat()) {Interface->Error(tr("the queuefile is locked by the queuehandler !"));}
+  if (Q->getLockStat()) {
+#if VDRVERSNUM >= 10307
+    Skins.Message(mtError, tr("the queuefile is locked by the queuehandler !"));
+#else
+    Interface->Error(tr("the queuefile is locked by the queuehandler !"));
+#endif
+  }
 
   SetHelpKeys();
 }
@@ -353,11 +413,13 @@
 }
 
 void cMenuVdrripQueue::AddColItem(cOsdItem *i) {
+#if VDRVERSNUM < 10307
 #ifdef clrScrolLine
    i->SetColor(clrScrolLine, clrBackground);
 #else
    i->SetColor(clrCyan, clrBackground);
 #endif
+#endif
 
   Add(i);
 }
@@ -584,11 +646,13 @@
 }
 
 void cMenuVdrripEditTemplate::AddColItem(cOsdItem *i) {
+#if VDRVERSNUM < 10307
 #ifdef clrScrolLine
    i->SetColor(clrScrolLine, clrBackground);
 #else
    i->SetColor(clrCyan, clrBackground);
 #endif
+#endif
 
   Add(i);
 }
@@ -600,8 +664,13 @@
   MovOSDsaveName = NULL;
   FileSize[0] = MovieData[0] = CropData[0] = ScaleData[0] = NULL;
   
+#if VDRVERSNUM >= 10307
+  Skins.Message(mtStatus, tr("reading movie-data..."));
+  Skins.Flush();
+#else
   Interface->Status(tr("reading movie-data..."));
   Interface->Flush();
+#endif
 
   M = new cMovie(p, n);
   Init(); 
@@ -888,8 +957,13 @@
 
 #ifdef VDRRIP_DVD
   } else if (M->isDVD() && MovOSD.Title != MovOSDsave.Title && MovOSD.Title > 0) {
+#if VDRVERSNUM >= 10307
+    Skins.Message(mtStatus, tr("reading audio-data from dvd..."));
+    Skins.Flush();
+#else
     Interface->Status(tr("reading audio-data from dvd..."));
     Interface->Flush();
+#endif
     M->setDVDTitle(MovOSD.Title, true);
     M->saveMovieData();
     Set();
@@ -1067,7 +1141,13 @@
             FREE(q);
             DELETE(Q);
             return osBack;
-          } else {Interface->Error(tr("the queuefile is locked by the queuehandler !"));}
+          } else {
+#if VDRVERSNUM >= 10307
+	    Skins.Message(mtError, tr("the queuefile is locked by the queuehandler !"));
+#else
+	    Interface->Error(tr("the queuefile is locked by the queuehandler !"));
+#endif
+	  }
 
           FREE(q);
           DELETE(Q);
@@ -1089,11 +1169,20 @@
 	  } else {
 	    if (Interface->Confirm(tr("crop black movie boarders ?"))) {
 	      CropReset = true;
+#if VDRVERSNUM >= 10307
+	      Skins.Message(mtStatus, tr("search for black movie boarders"));
+	      Skins.Flush();
+#else
               Interface->Status(tr("search for black movie boarders"));
 	      Interface->Flush();
+#endif
               if (! M->setCropValues()) {
 		CropReset = false;
+#if VDRVERSNUM >= 10307
+		Skins.Message(mtError, tr("couldn't detect black movie boarders !"));
+#else
 		Interface->Error(tr("couldn't detect black movie boarders !"));
+#endif
 	      }
 	      M->saveMovieData();
             }
@@ -1133,11 +1222,13 @@
 }
 
 void cMenuVdrripMovie::AddColItem(cOsdItem *i) {
+#if VDRVERSNUM < 10307
 #ifdef clrScrolLine
    i->SetColor(clrScrolLine, clrBackground);
 #else
    i->SetColor(clrCyan, clrBackground);
 #endif
+#endif
 
   Add(i);
 }
@@ -1163,8 +1254,13 @@
   eOSState state = cOsdMenu::ProcessKey(Key);
 
   if (Key == kOk) {
+#if VDRVERSNUM >= 10307
+    Skins.Message(mtStatus, tr("reading audio-data from dvd..."));
+    Skins.Flush();
+#else
     Interface->Status(tr("reading audio-data from dvd..."));
     Interface->Flush();
+#endif
     M->setDVDTitle(Current() + 1, true);
     M->saveMovieData();
     return osBack;
diff -Naur vdrrip-0.3.0.orig/menu-vdrrip.h vdrrip-0.3.0/menu-vdrrip.h
--- vdrrip-0.3.0.orig/menu-vdrrip.h	Sat Jun 12 13:46:39 2004
+++ vdrrip-0.3.0/menu-vdrrip.h	Sat Jun 12 13:58:26 2004
@@ -7,6 +7,10 @@
 
 #include <vdr/osd.h>
 #include <vdr/menuitems.h>
+#if VDRVERSNUM >= 10307
+#include <vdr/menu.h>
+#include <vdr/skins.h>
+#endif
 
 #include "movie.h"
 #include "vdrriprecordings.h"
@@ -51,7 +55,12 @@
 
 #ifdef VDRRIP_DVD
 
-class cMenuVdrripWarning : public cOsdMenu {
+class cMenuVdrripWarning
+#if VDRVERSNUM >= 10307
+  : public cMenuText {
+#else
+  : public cOsdMenu {
+#endif
 private:
   bool hadsubmenu;
 
diff -Naur vdrrip-0.3.0.orig/vdrrip.c vdrrip-0.3.0/vdrrip.c
--- vdrrip-0.3.0.orig/vdrrip.c	Sat Jun 12 13:46:39 2004
+++ vdrrip-0.3.0/vdrrip.c	Sat Jun 12 13:47:56 2004
@@ -132,13 +132,21 @@
   if (access(MPlayer, X_OK) == -1) {
     char *s = NULL;
     asprintf(&s, "%s doesn't exist or isn't a executable !", MPlayer);
+#if VDRVERSNUM >= 10307
+    Skins.Message(mtError, s);
+#else
     Interface->Error(s);
+#endif
     FREE(s);
     return NULL;
   } else if (access(MEncoder, X_OK) == -1) {
     char *s = NULL;
     asprintf(&s, "%s doesn't exist or isn't a executable !", MEncoder);
+#if VDRVERSNUM >= 10307
+    Skins.Message(mtError, s);
+#else
     Interface->Error(s);
+#endif
     FREE(s);
     return NULL;
   } else return new cMenuVdrrip();