~ubuntu-branches/ubuntu/wily/freeguide/wily

« back to all changes in this revision

Viewing changes to zurich.patch

  • Committer: Bazaar Package Importer
  • Author(s): Shaun Jackman
  • Date: 2007-09-11 16:52:59 UTC
  • mfrom: (1.2.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070911165259-4r32oke21i1ezbmv
Tags: 0.10.5-1
* New upstream release.
* Update the watch file.
* Change Debian policy to version 3.7.2.2. No changes necessary.
* Add ant-optional to build dependencies. Closes: #441762.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Index: src/freeguide/plugins/reminder/alarm/AlarmReminder.java
2
 
===================================================================
3
 
--- src/freeguide/plugins/reminder/alarm/AlarmReminder.java     (revision 1455)
4
 
+++ src/freeguide/plugins/reminder/alarm/AlarmReminder.java     (working copy)
5
 
@@ -39,10 +39,14 @@
6
 
     /** Config object. */
7
 
     protected final ConfigAlarm config = new ConfigAlarm(  );
8
 
     protected TVProgramme scheduledProgramme;
9
 
+    protected TVProgramme recordingProgramme;
10
 
     protected JDialog scheduledDialog;
11
 
     protected long timeForClose;
12
 
     protected long timeForDisplay;
13
 
     protected long scheduledDialogDisplayTime;
14
 
+    protected long timeForRecordStart;
15
 
+    protected long timeForRecordStop;
16
 
+    protected boolean recording = false;
17
 
     protected MListsner mouseListener = new MListsner(  );
18
 
 
19
 
     /**
20
 
@@ -76,6 +80,44 @@
21
 
     public void addItemsToPopupMenu( 
22
 
         final TVProgramme programme, final JPopupMenu menu )
23
 
     {
24
 
+       
25
 
+       /**
26
 
+        * menu item for highlighting
27
 
+        *
28
 
+        * @author Patrick Huber, Annetta Schaad (aschaad at hotmail.com)
29
 
+        */
30
 
+        final JMenuItem hil = new JMenuItem(  ); 
31
 
+        
32
 
+        // is highlighted?
33
 
+        if( !isHighlighted( programme ) )
34
 
+        {
35
 
+            hil.setText( i18n.getLocalizedMessage( "popup.highlight.add" ) );
36
 
+            hil.addActionListener( 
37
 
+                new ActionListener(  )
38
 
+                {
39
 
+                    public void actionPerformed( ActionEvent e )
40
 
+                    {
41
 
+                        setProgrammeSelection( programme, isSelected(programme) , true);
42
 
+                        favSelectionChanged( true );
43
 
+                    }
44
 
+                } );
45
 
+        }
46
 
+        else
47
 
+        {
48
 
+            hil.setText( i18n.getLocalizedMessage( "popup.highlight.del" ) );
49
 
+            hil.addActionListener( 
50
 
+                new ActionListener(  )
51
 
+                {
52
 
+                    public void actionPerformed( ActionEvent e )
53
 
+                    {
54
 
+                       setProgrammeSelection( programme, isSelected(programme), false);
55
 
+                        favSelectionChanged( true );
56
 
+                    }
57
 
+                } );
58
 
+        }
59
 
+
60
 
+        menu.add( hil );
61
 
+       
62
 
         final JMenuItem sel = new JMenuItem(  );
63
 
 
64
 
         if( !isSelected( programme ) )
65
 
@@ -86,7 +128,7 @@
66
 
                 {
67
 
                     public void actionPerformed( ActionEvent e )
68
 
                     {
69
 
-                        setProgrammeSelection( programme, true );
70
 
+                        setProgrammeSelection( programme, true, true);
71
 
                         favSelectionChanged( true );
72
 
                     }
73
 
                 } );
74
 
@@ -99,7 +141,7 @@
75
 
                 {
76
 
                     public void actionPerformed( ActionEvent e )
77
 
                     {
78
 
-                        setProgrammeSelection( programme, false );
79
 
+                        setProgrammeSelection( programme, false, false);
80
 
                         favSelectionChanged( true );
81
 
                     }
82
 
                 } );
83
 
@@ -107,9 +149,71 @@
84
 
 
85
 
         menu.add( sel );
86
 
 
87
 
+        final JMenuItem rec = new JMenuItem(  );
88
 
+
89
 
+        Favourite favourite = getFavourite( programme );
90
 
+
91
 
+        if( favourite == null || !favourite.getRecord() )
92
 
+        {
93
 
+            rec.setText( i18n.getLocalizedMessage( "popup.record.add" ) );
94
 
+            if( favourite == null )
95
 
+            { // not yet in favourites, hence add.
96
 
+              rec.addActionListener( 
97
 
+                  new ActionListener(  )
98
 
+                  {
99
 
+                      public void actionPerformed( ActionEvent e )
100
 
+                      {
101
 
+                          Favourite fav = new Favourite(  );
102
 
+
103
 
+                          fav.setTitleString( programme.getTitle(  ) );
104
 
+                          fav.setName( programme.getTitle(  ) );
105
 
+                          fav.setRecord( true );
106
 
+
107
 
+                          addFavourite( fav );
108
 
+                          favSelectionChanged( false );
109
 
+                      }
110
 
+                  } );
111
 
+           }
112
 
+           else // if( !f.getRecord() )
113
 
+           { // is in favourites but not yet as recorded.
114
 
+              rec.addActionListener( 
115
 
+                  new ActionListener(  )
116
 
+                  {
117
 
+                      public void actionPerformed( ActionEvent e )
118
 
+                      {
119
 
+                          Favourite fav = getFavourite( programme );
120
 
+                          if( fav != null )
121
 
+                          {
122
 
+                            fav.setRecord( true );
123
 
+                            favSelectionChanged( false );
124
 
+                          }
125
 
+                      }
126
 
+                  } );
127
 
+           }
128
 
+        }
129
 
+        else
130
 
+        {
131
 
+            rec.setText( i18n.getLocalizedMessage( "popup.record.del" ) );
132
 
+            rec.addActionListener( 
133
 
+                new ActionListener(  )
134
 
+                {
135
 
+                    public void actionPerformed( ActionEvent e )
136
 
+                    {
137
 
+                        Favourite fav = getFavourite( programme );
138
 
+                        if( fav != null )
139
 
+                        {
140
 
+                          fav.setRecord( false );
141
 
+                          favSelectionChanged( false );
142
 
+                        }
143
 
+                    }
144
 
+                } );
145
 
+        }
146
 
+
147
 
+        menu.add( rec );
148
 
+
149
 
         final JMenuItem fav = new JMenuItem(  );
150
 
 
151
 
-        if( getFavourite( programme ) == null )
152
 
+        if( favourite == null )
153
 
         {
154
 
             fav.setText( i18n.getLocalizedMessage( "popup.favourite.add" ) );
155
 
             fav.addActionListener( 
156
 
@@ -220,6 +324,8 @@
157
 
     {
158
 
         timeForClose = Long.MAX_VALUE;
159
 
         timeForDisplay = Long.MAX_VALUE;
160
 
+        timeForRecordStart = Long.MAX_VALUE;
161
 
+        timeForRecordStop = Long.MAX_VALUE;
162
 
 
163
 
         synchronized( this )
164
 
         {
165
 
@@ -231,7 +337,7 @@
166
 
 
167
 
             scheduledProgramme = null;
168
 
 
169
 
-            if( config.reminderOn )
170
 
+            if( config.reminderOn)
171
 
             {
172
 
                 try
173
 
                 {
174
 
@@ -253,6 +359,7 @@
175
 
                         timeForDisplay = scheduledProgramme.getStart(  )
176
 
                             - config.reminderWarning;
177
 
                     }
178
 
+
179
 
                 }
180
 
 
181
 
                 catch( Exception ex )
182
 
@@ -262,9 +369,42 @@
183
 
                         Level.WARNING, "Error find next programme", ex );
184
 
                 }
185
 
             }
186
 
+            if( config.recordOn)
187
 
+            {
188
 
+                try
189
 
+                {
190
 
+                   if( !recording )
191
 
+                   { 
192
 
+                      recordingProgramme = 
193
 
+                        Application.getInstance(  ).getDataStorage(  ).findEarliest( 
194
 
+                            System.currentTimeMillis(  )
195
 
+                            + 0, // 1min before actual start.
196
 
+                            new IModuleStorage.EarliestCheckAllow(  )
197
 
+                            {
198
 
+                                public boolean isAllow( TVProgramme programme )
199
 
+                                {
200
 
+                                    return isRecord( programme );
201
 
+                                }
202
 
+                            } );
203
 
+                   }
204
 
+                   if( recordingProgramme != null )
205
 
+                   {
206
 
+                     if( !recording )
207
 
+                        timeForRecordStart = recordingProgramme.getStart(  ) - 0;
208
 
+                      timeForRecordStop = recordingProgramme.getEnd( ) + 0;
209
 
+                   }
210
 
+                }
211
 
 
212
 
+                catch( Exception ex )
213
 
+                {
214
 
+                    Application.getInstance(  ).getLogger(  )
215
 
+                               .log( 
216
 
+                        Level.WARNING, "Error find next programme", ex );
217
 
+                }
218
 
+            }
219
 
+
220
 
             return Math.min( 
221
 
-                Math.min( timeForClose, timeForDisplay ),
222
 
+                Math.min( Math.min( Math.min( timeForClose, timeForDisplay ), timeForRecordStart ), timeForRecordStop ),
223
 
                 System.currentTimeMillis(  ) + 300000 );
224
 
         }
225
 
     }
226
 
@@ -305,9 +445,76 @@
227
 
                 scheduledDialog.setVisible( true );
228
 
                 scheduledDialogDisplayTime = System.currentTimeMillis(  );
229
 
             }
230
 
+            // check for recording start
231
 
+            if( recordingProgramme != null )
232
 
+            {
233
 
+              if( !recording && timeForRecordStart <= System.currentTimeMillis(  ) )
234
 
+              {
235
 
+                startRecording();
236
 
+                recording = true;
237
 
+              }
238
 
+              if( recording && timeForRecordStop <= System.currentTimeMillis(  ) )
239
 
+              {
240
 
+                stopRecording();
241
 
+                recordingProgramme = null;
242
 
+                recording = false;
243
 
+              }
244
 
         }
245
 
     }
246
 
 
247
 
+    }
248
 
+
249
 
+    /**
250
 
+     * Is called when a recording should be started.
251
 
+     * 
252
 
+     * The programme to record is stored in recrdingProgramme.
253
 
+     * 
254
 
+     * @return true if command execution was successfull
255
 
+     * @see onTime()
256
 
+     */
257
 
+    protected boolean startRecording(  )
258
 
+    {
259
 
+      JOptionPane optionPane =
260
 
+          new JOptionPane( recordingProgramme.getTitle(  ), JOptionPane.INFORMATION_MESSAGE );
261
 
+      JDialog dlg = optionPane.createDialog( 
262
 
+              Application.getInstance(  ).getApplicationFrame(  ),
263
 
+              "Start Recording..." );
264
 
+                dlg.setModal( false );
265
 
+
266
 
+                dlg.setVisible( true );
267
 
+
268
 
+      return true;
269
 
+
270
 
+    }
271
 
+
272
 
+    /**
273
 
+     * Is called when a recording should be sopped.
274
 
+     * 
275
 
+     * The programme we are currently recording is stored in recrdingProgramme.
276
 
+     * 
277
 
+     * @return true if command execution was successfull
278
 
+     * @see onTime()
279
 
+     */
280
 
+    protected boolean stopRecording(  )
281
 
+    {
282
 
+      JOptionPane optionPane =
283
 
+          new JOptionPane( recordingProgramme.getTitle(  ), JOptionPane.INFORMATION_MESSAGE );
284
 
+      JDialog dlg = optionPane.createDialog( 
285
 
+              Application.getInstance(  ).getApplicationFrame(  ),
286
 
+              "Stop Recording..." );
287
 
+                dlg.setModal( false );
288
 
+
289
 
+                dlg.setVisible( true );
290
 
+      return true;
291
 
+    }
292
 
+
293
 
+    
294
 
+       /**
295
 
+        * setProgrammSelection: set highlighting according to the selection
296
 
+        *
297
 
+        * @author Patrick Huber, Annetta Schaad (aschaad at hotmail.com)
298
 
+        */
299
 
+
300
 
     protected class MListsner implements MouseListener
301
 
     {
302
 
         TVProgramme programme;
303
 
@@ -316,6 +523,9 @@
304
 
          * DOCUMENT_ME!
305
 
          *
306
 
          * @param e DOCUMENT_ME!
307
 
+         * 
308
 
+            * @author Patrick Huber, Annetta Schaad (aschaad at hotmail.com)
309
 
+            * add parameter for highlight
310
 
          */
311
 
         public void mouseClicked( MouseEvent e )
312
 
         {
313
 
@@ -326,11 +536,11 @@
314
 
 
315
 
             if( !isSelected( programme ) )
316
 
             {
317
 
-                setProgrammeSelection( programme, true );
318
 
+                setProgrammeSelection( programme, true, true);
319
 
             }
320
 
             else
321
 
             {
322
 
-                setProgrammeSelection( programme, false );
323
 
+                setProgrammeSelection( programme, false, false);
324
 
             }
325
 
 
326
 
             favSelectionChanged( true );
327
 
@@ -393,5 +603,14 @@
328
 
 
329
 
         /** Time in milliseconds. */
330
 
         public long reminderWarning = 300000L;
331
 
+
332
 
+        /** Do we record. */
333
 
+        public boolean recordOn = false;
334
 
+
335
 
+        /** Command to issue when a programme starts. */
336
 
+        public String recordStartCommand = "";
337
 
+
338
 
+        /** Command to issue when a programme stops. */
339
 
+        public String recordStopCommand = "";
340
 
     }
341
 
 }
342
 
Index: src/freeguide/plugins/reminder/alarm/AlarmUIPanel.java
343
 
===================================================================
344
 
--- src/freeguide/plugins/reminder/alarm/AlarmUIPanel.java      (revision 1455)
345
 
+++ src/freeguide/plugins/reminder/alarm/AlarmUIPanel.java      (working copy)
346
 
@@ -23,6 +23,11 @@
347
 
     private JTextField textWarning = null;
348
 
     private JLabel jLabel1 = null;
349
 
     private JTextField textGiveup = null;
350
 
+    private JCheckBox cbRecord = null;
351
 
+    private JLabel labelStart = null;
352
 
+    private JTextField textStart = null;
353
 
+    private JLabel labelStop = null;
354
 
+    private JTextField textStop = null;
355
 
     private ILocalizer localizer;
356
 
 
357
 
 /**
358
 
@@ -97,6 +102,55 @@
359
 
         gridBagConstraints1.fill = java.awt.GridBagConstraints.HORIZONTAL;
360
 
         gridBagConstraints1.gridwidth = 2;
361
 
         gridBagConstraints1.insets = new java.awt.Insets( 5, 5, 0, 5 );
362
 
+
363
 
+        // record
364
 
+        GridBagConstraints gridBagConstraintsRecord = new GridBagConstraints(  );
365
 
+        gridBagConstraintsRecord.gridx = 0;
366
 
+        gridBagConstraintsRecord.gridy = 6;
367
 
+        gridBagConstraintsRecord.fill = java.awt.GridBagConstraints.HORIZONTAL;
368
 
+        gridBagConstraintsRecord.gridwidth = 2;
369
 
+        gridBagConstraintsRecord.insets = new java.awt.Insets( 5, 5, 0, 5 );
370
 
+
371
 
+        // startcommand
372
 
+        GridBagConstraints gridBagConstraintsStart = new GridBagConstraints(  );
373
 
+        gridBagConstraintsStart.gridx = 0;
374
 
+        gridBagConstraintsStart.gridy = 7;
375
 
+        gridBagConstraintsStart.insets = new java.awt.Insets( 5, 5, 0, 0 );
376
 
+        gridBagConstraintsStart.anchor = java.awt.GridBagConstraints.WEST;
377
 
+        labelStart = new JLabel( );
378
 
+        labelStart.setText(
379
 
+            localizer.getLocalizedMessage( "options.execute_on_start" ) );
380
 
+        labelStart.setDisplayedMnemonic( java.awt.event.KeyEvent.VK_S );
381
 
+        labelStart.setLabelFor( getTextStart(  ) );
382
 
+
383
 
+        GridBagConstraints gridBagConstraintsTextStart = new GridBagConstraints(  );
384
 
+        gridBagConstraintsTextStart.fill = java.awt.GridBagConstraints.HORIZONTAL;
385
 
+        gridBagConstraintsTextStart.gridx = 1;
386
 
+        gridBagConstraintsTextStart.gridy = 7;
387
 
+        gridBagConstraintsTextStart.weightx = 1.0;
388
 
+        gridBagConstraintsTextStart.insets = new java.awt.Insets( 5, 5, 0, 5 );
389
 
+
390
 
+        // stopcommand
391
 
+        GridBagConstraints gridBagConstraintsStop = new GridBagConstraints(  );
392
 
+        gridBagConstraintsStop.gridx = 0;
393
 
+        gridBagConstraintsStop.gridy = 8;
394
 
+        gridBagConstraintsStop.insets = new java.awt.Insets( 5, 5, 0, 0 );
395
 
+        gridBagConstraintsStop.anchor = java.awt.GridBagConstraints.WEST;
396
 
+        labelStop = new JLabel( );
397
 
+        labelStop.setText(
398
 
+            localizer.getLocalizedMessage( "options.execute_on_stop" ) );
399
 
+        labelStop.setDisplayedMnemonic( java.awt.event.KeyEvent.VK_T );
400
 
+        labelStop.setLabelFor( getTextStop(  ) );
401
 
+
402
 
+        GridBagConstraints gridBagConstraintsTextStop = new GridBagConstraints(  );
403
 
+        gridBagConstraintsTextStop.fill = java.awt.GridBagConstraints.HORIZONTAL;
404
 
+        gridBagConstraintsTextStop.gridx = 1;
405
 
+        gridBagConstraintsTextStop.gridy = 8;
406
 
+        gridBagConstraintsTextStop.weightx = 1.0;
407
 
+        gridBagConstraintsTextStop.insets = new java.awt.Insets( 5, 5, 0, 5 );
408
 
+
409
 
+
410
 
+
411
 
         this.setLayout( new GridBagLayout(  ) );
412
 
         this.setSize( 300, 200 );
413
 
         this.add( getCbRemind(  ), gridBagConstraints1 );
414
 
@@ -104,6 +158,12 @@
415
 
         this.add( getTextWarning(  ), gridBagConstraints3 );
416
 
         this.add( jLabel1, gridBagConstraints4 );
417
 
         this.add( getTextGiveup(  ), gridBagConstraints5 );
418
 
+
419
 
+        this.add( getCbRecord(  ), gridBagConstraintsRecord );
420
 
+        this.add( labelStart, gridBagConstraintsStart );
421
 
+        this.add( getTextStart(  ), gridBagConstraintsTextStart );
422
 
+        this.add( labelStop, gridBagConstraintsStop );
423
 
+        this.add( getTextStop(  ), gridBagConstraintsTextStop );
424
 
     }
425
 
 
426
 
     /**
427
 
@@ -154,4 +214,52 @@
428
 
 
429
 
         return textGiveup;
430
 
     }
431
 
+
432
 
+    /**
433
 
+     * This method initializes cbRecord
434
 
+     *
435
 
+     * @return javax.swing.JCheckBox
436
 
+     */
437
 
+    public JCheckBox getCbRecord(  )
438
 
+    {
439
 
+        if( cbRecord == null )
440
 
+        {
441
 
+            cbRecord = new JCheckBox(  );
442
 
+            cbRecord.setText( 
443
 
+                localizer.getLocalizedMessage( "options.record_progs" ) );
444
 
+            cbRecord.setMnemonic( java.awt.event.KeyEvent.VK_E );
445
 
+        }
446
 
+
447
 
+        return cbRecord;
448
 
+    }
449
 
+
450
 
+    /**
451
 
+     * This method initializes textStart
452
 
+     *
453
 
+     * @return javax.swing.JTextField
454
 
+     */
455
 
+    public JTextField getTextStart(  )
456
 
+    {
457
 
+        if( textStart == null )
458
 
+        {
459
 
+            textStart = new JTextField(  );
460
 
+        }
461
 
+
462
 
+        return textStart;
463
 
+    }
464
 
+
465
 
+    /**
466
 
+     * This method initializes textStop
467
 
+     *
468
 
+     * @return javax.swing.JTextField
469
 
+     */
470
 
+    public JTextField getTextStop(  )
471
 
+    {
472
 
+        if( textStop == null )
473
 
+        {
474
 
+            textStop = new JTextField(  );
475
 
+        }
476
 
+
477
 
+        return textStop;
478
 
+    }
479
 
 }
480
 
Index: src/freeguide/plugins/reminder/alarm/AlarmUIController.java
481
 
===================================================================
482
 
--- src/freeguide/plugins/reminder/alarm/AlarmUIController.java (revision 1455)
483
 
+++ src/freeguide/plugins/reminder/alarm/AlarmUIController.java (working copy)
484
 
@@ -50,9 +50,14 @@
485
 
         panel.getCbRemind(  ).setSelected( parent.config.reminderOn );
486
 
         panel.getTextWarning(  )
487
 
              .setText( String.valueOf( parent.config.reminderWarning / 1000 ) );
488
 
-
489
 
         panel.getTextGiveup(  )
490
 
              .setText( String.valueOf( parent.config.reminderGiveUp / 1000 ) );
491
 
+
492
 
+        panel.getCbRecord(  ).setSelected( parent.config.recordOn );
493
 
+        panel.getTextStart(  )
494
 
+            .setText( parent.config.recordStartCommand );
495
 
+        panel.getTextStop(  )
496
 
+            .setText( parent.config.recordStopCommand );
497
 
     }
498
 
 
499
 
     /**
500
 
@@ -91,5 +96,10 @@
501
 
                 panel.getTextWarning(  ).getText(  ) ) * 1000L;
502
 
         parent.config.reminderGiveUp = Long.parseLong( 
503
 
                 panel.getTextGiveup(  ).getText(  ) ) * 1000L;
504
 
+        parent.config.recordOn = panel.getCbRecord(  ).isSelected(  );
505
 
+        parent.config.recordStartCommand = panel.getTextStart(  )
506
 
+            .getText(  );
507
 
+        parent.config.recordStopCommand = panel.getTextStop(  )
508
 
+            .getText(  );
509
 
     }
510
 
 }
511
 
Index: src/freeguide/plugins/ui/horizontal/manylabels/ConfigureUIPanel.java
512
 
===================================================================
513
 
--- src/freeguide/plugins/ui/horizontal/manylabels/ConfigureUIPanel.java        (revision 1455)
514
 
+++ src/freeguide/plugins/ui/horizontal/manylabels/ConfigureUIPanel.java        (working copy)
515
 
@@ -39,12 +39,36 @@
516
 
     private JLabel labelColorMovie;
517
 
     private JLabel labelColorChannel;
518
 
     private JLabel labelColorSelected;
519
 
+    
520
 
+       /**
521
 
+        * new entries for favourite colour and guide colour
522
 
+        *
523
 
+        * @author Patrick Huber, Annetta Schaad (aschaad at hotmail.com)
524
 
+        */
525
 
+    private JLabel labelColorFavourite;
526
 
+    private JLabel labelColorGuide;
527
 
     private JPanel panelColorMovie;
528
 
     private JPanel panelColorSelected;
529
 
     private JPanel panelColorChannel;
530
 
+    
531
 
+       /**
532
 
+        * new entries for favourite colour and guide colour
533
 
+        *
534
 
+        * @author Patrick Huber, Annetta Schaad (aschaad at hotmail.com)
535
 
+        */
536
 
+    private JPanel panelColorFavourite;
537
 
+    private JPanel panelColorGuide;
538
 
     private JButton btnColorMovie;
539
 
     private JButton btnColorChannel;
540
 
     private JButton btnColorSelected;
541
 
+    
542
 
+       /**
543
 
+        * new entries for favourite colour and guide colour
544
 
+        *
545
 
+        * @author Patrick Huber, Annetta Schaad (aschaad at hotmail.com)
546
 
+        */
547
 
+    private JButton btnColorFavourite;
548
 
+    private JButton btnColorGuide;
549
 
     protected ILocalizer localizer;
550
 
     private JTextField dayStart;
551
 
     private JLabel jLabel;
552
 
@@ -94,23 +118,59 @@
553
 
         GridBagConstraints gridBagConstraints61 = new GridBagConstraints(  );
554
 
         GridBagConstraints gridBagConstraints72 = new GridBagConstraints(  );
555
 
         GridBagConstraints gridBagConstraints92 = new GridBagConstraints(  );
556
 
+        GridBagConstraints gridBagConstraints21 = new GridBagConstraints(  ); // add
557
 
 
558
 
         labelColorNormal = new JLabel(  );
559
 
         labelColorChannel = new JLabel(  );
560
 
         labelColorSelected = new JLabel(  );
561
 
+        
562
 
+       /**
563
 
+        * new entries for favourite colour and guide colour
564
 
+        *
565
 
+        * @author Patrick Huber, Annetta Schaad (aschaad at hotmail.com)
566
 
+        */
567
 
+        labelColorFavourite = new JLabel(  );
568
 
+        labelColorGuide = new JLabel(  );
569
 
+        
570
 
         labelColorMovie = new JLabel(  );
571
 
 
572
 
         GridBagConstraints gridBagConstraints19 = new GridBagConstraints(  );
573
 
         GridBagConstraints gridBagConstraints20 = new GridBagConstraints(  );
574
 
+        
575
 
+       /**
576
 
+        * new entries for favourite colour and guide colour
577
 
+        *
578
 
+        * @author Patrick Huber, Annetta Schaad (aschaad at hotmail.com)
579
 
+        */
580
 
+        GridBagConstraints gridBagConstraints22 = new GridBagConstraints(  );
581
 
+        GridBagConstraints gridBagConstraints23 = new GridBagConstraints(  );
582
 
+        
583
 
         GridBagConstraints gridBagConstraints18 = new GridBagConstraints(  );
584
 
         GridBagConstraints gridBagConstraints15 = new GridBagConstraints(  );
585
 
         GridBagConstraints gridBagConstraints14 = new GridBagConstraints(  );
586
 
         GridBagConstraints gridBagConstraints16 = new GridBagConstraints(  );
587
 
+        
588
 
+       /**
589
 
+        * new entries for favourite colour and guide colour
590
 
+        *
591
 
+        * @author Patrick Huber, Annetta Schaad (aschaad at hotmail.com)
592
 
+        */
593
 
+        GridBagConstraints gridBagConstraints17 = new GridBagConstraints(  );
594
 
+        GridBagConstraints gridBagConstraints118 = new GridBagConstraints(  );
595
 
+        
596
 
         GridBagConstraints gridBagConstraints81 = new GridBagConstraints(  );
597
 
         GridBagConstraints gridBagConstraints71 = new GridBagConstraints(  );
598
 
         GridBagConstraints gridBagConstraints6 = new GridBagConstraints(  );
599
 
         GridBagConstraints gridBagConstraints101 = new GridBagConstraints(  );
600
 
         GridBagConstraints gridBagConstraints111 = new GridBagConstraints(  );
601
 
+       /**
602
 
+        * new entries for favourite colour and guide colour
603
 
+        *
604
 
+        * @author Patrick Huber, Annetta Schaad (aschaad at hotmail.com)
605
 
+        */
606
 
+        GridBagConstraints gridBagConstraints112 = new GridBagConstraints(  );
607
 
+        GridBagConstraints gridBagConstraints113 = new GridBagConstraints(  );
608
 
+        
609
 
         GridBagConstraints gridBagConstraints50 = new GridBagConstraints(  );
610
 
         GridBagConstraints gridBagConstraints5 = new GridBagConstraints(  );
611
 
         GridBagConstraints gridBagConstraints41 = new GridBagConstraints(  );
612
 
@@ -192,15 +252,51 @@
613
 
         labelColorSelected.setText( 
614
 
             localizer.getLocalizedMessage( "selected_colour" ) );
615
 
 
616
 
+       /**
617
 
+        * new entries for favourite colour and guide colour
618
 
+        *
619
 
+        * @author Patrick Huber, Annetta Schaad (aschaad at hotmail.com)
620
 
+        */
621
 
+        gridBagConstraints112.gridx = 0;
622
 
+        gridBagConstraints112.gridy = 8;
623
 
+        labelColorFavourite.setLabelFor( getBtnColorFavourite(  ) );
624
 
+        labelColorFavourite.setDisplayedMnemonic( java.awt.event.KeyEvent.VK_F );
625
 
+        labelColorFavourite.setText( 
626
 
+            localizer.getLocalizedMessage( "favourite_colour" ) );    
627
 
+        
628
 
+        gridBagConstraints113.gridx = 0;
629
 
+        gridBagConstraints113.gridy = 9;
630
 
+        labelColorGuide.setLabelFor( getBtnColorGuide(  ) );
631
 
+        labelColorGuide.setDisplayedMnemonic( java.awt.event.KeyEvent.VK_G );
632
 
+        labelColorGuide.setText( 
633
 
+            localizer.getLocalizedMessage( "guide_colour" ) );    
634
 
+        
635
 
+
636
 
         gridBagConstraints101.anchor = java.awt.GridBagConstraints.WEST;
637
 
 
638
 
         gridBagConstraints101.insets = new java.awt.Insets( 5, 5, 0, 0 );
639
 
         gridBagConstraints111.anchor = java.awt.GridBagConstraints.WEST;
640
 
         gridBagConstraints50.anchor = java.awt.GridBagConstraints.WEST;
641
 
 
642
 
+       /**
643
 
+        * new entries for favourite colour and guide colour
644
 
+        *
645
 
+        * @author Patrick Huber, Annetta Schaad (aschaad at hotmail.com)
646
 
+        */
647
 
+        gridBagConstraints112.anchor = java.awt.GridBagConstraints.WEST;
648
 
+        gridBagConstraints113.anchor = java.awt.GridBagConstraints.WEST;
649
 
+
650
 
         gridBagConstraints111.insets = new java.awt.Insets( 5, 5, 0, 0 );
651
 
         gridBagConstraints50.insets = new java.awt.Insets( 5, 5, 0, 0 );
652
 
 
653
 
+       /**
654
 
+        * new entries for favourite colour and guide colour
655
 
+        *
656
 
+        * @author Patrick Huber, Annetta Schaad (aschaad at hotmail.com)
657
 
+        */
658
 
+        gridBagConstraints112.insets = new java.awt.Insets( 5, 5, 0, 0 );
659
 
+        gridBagConstraints113.insets = new java.awt.Insets( 5, 5, 0, 0 );
660
 
+
661
 
         gridBagConstraints14.gridx = 1;
662
 
         gridBagConstraints14.gridy = 6;
663
 
         gridBagConstraints14.fill = java.awt.GridBagConstraints.BOTH;
664
 
@@ -213,6 +309,23 @@
665
 
         gridBagConstraints16.gridwidth = 2;
666
 
         gridBagConstraints16.insets = new java.awt.Insets( 5, 5, 0, 0 );
667
 
 
668
 
+       /**
669
 
+        * new entries for favourite colour and guide colour
670
 
+        *
671
 
+        * @author Patrick Huber, Annetta Schaad (aschaad at hotmail.com)
672
 
+        */
673
 
+        gridBagConstraints17.gridx = 1;
674
 
+        gridBagConstraints17.gridy = 8;
675
 
+        gridBagConstraints17.fill = java.awt.GridBagConstraints.BOTH;
676
 
+        gridBagConstraints17.gridwidth = 2;
677
 
+        gridBagConstraints17.insets = new java.awt.Insets( 5, 5, 0, 0 );
678
 
+        
679
 
+        gridBagConstraints118.gridx = 1;
680
 
+        gridBagConstraints118.gridy = 9;
681
 
+        gridBagConstraints118.fill = java.awt.GridBagConstraints.BOTH;
682
 
+        gridBagConstraints118.gridwidth = 2;
683
 
+        gridBagConstraints118.insets = new java.awt.Insets( 5, 5, 0, 0 );
684
 
+
685
 
         gridBagConstraints15.gridx = 1;
686
 
         gridBagConstraints15.gridy = 7;
687
 
         gridBagConstraints15.fill = java.awt.GridBagConstraints.BOTH;
688
 
@@ -231,6 +344,19 @@
689
 
         gridBagConstraints20.gridy = 5;
690
 
         gridBagConstraints20.insets = new java.awt.Insets( 5, 5, 0, 5 );
691
 
 
692
 
+       /**
693
 
+        * new entries for favourite colour and guide colour
694
 
+        *
695
 
+        * @author Patrick Huber, Annetta Schaad (aschaad at hotmail.com)
696
 
+        */
697
 
+        gridBagConstraints22.gridx = 3;
698
 
+        gridBagConstraints22.gridy = 8;
699
 
+        gridBagConstraints22.insets = new java.awt.Insets( 5, 5, 0, 5 );
700
 
+        
701
 
+        gridBagConstraints23.gridx = 3;
702
 
+        gridBagConstraints23.gridy = 9;
703
 
+        gridBagConstraints23.insets = new java.awt.Insets( 5, 5, 0, 5 );
704
 
+
705
 
         gridBagConstraints4.gridx = 0;
706
 
         gridBagConstraints4.gridy = 1;
707
 
         gridBagConstraints4.anchor = java.awt.GridBagConstraints.WEST;
708
 
@@ -268,7 +394,7 @@
709
 
         gridBagConstraints9.insets = new java.awt.Insets( 5, 5, 0, 5 );
710
 
         gridBagConstraints13.gridx = 2;
711
 
 
712
 
-        gridBagConstraints13.gridy = 9;
713
 
+        gridBagConstraints13.gridy = 10;
714
 
 
715
 
         gridBagConstraints13.weightx = 1.0D;
716
 
 
717
 
@@ -308,14 +434,14 @@
718
 
         gridBagConstraints5.insets = new java.awt.Insets( 5, 5, 0, 5 );
719
 
         gridBagConstraints42.gridx = 1;
720
 
 
721
 
-        gridBagConstraints42.gridy = 10;
722
 
+        gridBagConstraints42.gridy = 11;
723
 
 
724
 
         gridBagConstraints42.fill = java.awt.GridBagConstraints.HORIZONTAL;
725
 
 
726
 
         gridBagConstraints42.insets = new java.awt.Insets( 5, 5, 0, 5 );
727
 
         gridBagConstraints51.gridx = 0;
728
 
 
729
 
-        gridBagConstraints51.gridy = 10;
730
 
+        gridBagConstraints51.gridy = 11;
731
 
 
732
 
         gridBagConstraints51.anchor = java.awt.GridBagConstraints.WEST;
733
 
 
734
 
@@ -328,7 +454,7 @@
735
 
 
736
 
         gridBagConstraints61.gridx = 1;
737
 
 
738
 
-        gridBagConstraints61.gridy = 11;
739
 
+        gridBagConstraints61.gridy = 12;
740
 
 
741
 
         gridBagConstraints61.fill = java.awt.GridBagConstraints.BOTH;
742
 
 
743
 
@@ -337,7 +463,7 @@
744
 
         gridBagConstraints61.insets = new java.awt.Insets( 5, 5, 0, 5 );
745
 
         gridBagConstraints72.gridx = 0;
746
 
 
747
 
-        gridBagConstraints72.gridy = 11;
748
 
+        gridBagConstraints72.gridy = 12;
749
 
 
750
 
         gridBagConstraints72.anchor = java.awt.GridBagConstraints.WEST;
751
 
 
752
 
@@ -349,7 +475,7 @@
753
 
 
754
 
         gridBagConstraints92.gridx = 0;
755
 
 
756
 
-        gridBagConstraints92.gridy = 12;
757
 
+        gridBagConstraints92.gridy = 13;
758
 
 
759
 
         gridBagConstraints92.gridwidth = 4;
760
 
 
761
 
@@ -358,7 +484,7 @@
762
 
         gridBagConstraints92.insets = new java.awt.Insets( 5, 5, 0, 5 );
763
 
         gridBagConstraints11.gridx = 0;
764
 
 
765
 
-        gridBagConstraints11.gridy = 13;
766
 
+        gridBagConstraints11.gridy = 14;
767
 
 
768
 
         gridBagConstraints11.anchor = java.awt.GridBagConstraints.WEST;
769
 
 
770
 
@@ -366,9 +492,16 @@
771
 
 
772
 
         gridBagConstraints11.insets = new java.awt.Insets( 5, 5, 0, 5 );
773
 
 
774
 
+        gridBagConstraints21.gridy = 15;
775
 
+
776
 
+        gridBagConstraints21.anchor = java.awt.GridBagConstraints.WEST;
777
 
+
778
 
+        gridBagConstraints21.gridwidth = 4;
779
 
+
780
 
+        gridBagConstraints21.insets = new java.awt.Insets( 5, 5, 0, 5 );
781
 
         gridBagConstraints31.gridx = 0;
782
 
 
783
 
-        gridBagConstraints31.gridy = 14;
784
 
+        gridBagConstraints31.gridy = 16;
785
 
 
786
 
         gridBagConstraints31.gridwidth = 4;
787
 
 
788
 
@@ -395,6 +528,17 @@
789
 
         this.add( getBtnColorMovie(  ), gridBagConstraints18 );
790
 
         this.add( getPanelColorMovie(  ), gridBagConstraints14 );
791
 
         this.add( getPanelColorSelected(  ), gridBagConstraints16 );
792
 
+        
793
 
+       /**
794
 
+        * new entries for favourite colour and guide colour
795
 
+        *
796
 
+        * @author Patrick Huber, Annetta Schaad (aschaad at hotmail.com)
797
 
+        */
798
 
+        this.add( getPanelColorFavourite(  ), gridBagConstraints17 );
799
 
+        this.add( getBtnColorFavourite(  ), gridBagConstraints22 );
800
 
+        this.add( getPanelColorGuide(  ), gridBagConstraints118 );
801
 
+        this.add( getBtnColorGuide(  ), gridBagConstraints23 );
802
 
+        
803
 
         this.add( getBtnColorNormal(  ), gridBagConstraints81 );
804
 
         this.add( getPanelColorNormal(  ), gridBagConstraints71 );
805
 
         this.add( labelColorNormal, gridBagConstraints6 );
806
 
@@ -402,6 +546,17 @@
807
 
         this.add( getBtnColorSelected(  ), gridBagConstraints20 );
808
 
         this.add( labelColorChannel, gridBagConstraints111 );
809
 
         this.add( labelColorSelected, gridBagConstraints50 );
810
 
+        
811
 
+       /**
812
 
+        * new entries for favourite colour and guide colour
813
 
+        *
814
 
+        * @author Patrick Huber, Annetta Schaad (aschaad at hotmail.com)
815
 
+        */        
816
 
+        this.add( labelColorFavourite, gridBagConstraints112 );
817
 
+        this.add( getBtnColorFavourite(  ), gridBagConstraints22);
818
 
+        this.add( labelColorGuide, gridBagConstraints113 );
819
 
+        this.add( getBtnColorGuide(  ), gridBagConstraints23);
820
 
+        
821
 
         this.add( labelColorMovie, gridBagConstraints101 );
822
 
         this.add( getPanelSpacer(  ), gridBagConstraints13 );
823
 
         this.add( getJPanel(  ), gridBagConstraints110 );
824
 
@@ -624,6 +779,41 @@
825
 
         return panelColorSelected;
826
 
     }
827
 
 
828
 
+    
829
 
+       /**
830
 
+        * Return the favourite colout box
831
 
+        *
832
 
+        * @author Patrick Huber, Annetta Schaad (aschaad at hotmail.com)
833
 
+        * 
834
 
+        * @return javax.swing.JPanel
835
 
+        */
836
 
+    protected JPanel getPanelColorFavourite(  )
837
 
+    {
838
 
+        if( panelColorFavourite == null )
839
 
+        {
840
 
+            panelColorFavourite = new JPanel(  );
841
 
+        }
842
 
+
843
 
+        return panelColorFavourite;
844
 
+    }
845
 
+    
846
 
+       /**
847
 
+        * Return the guide colout box
848
 
+        *
849
 
+        * @author Patrick Huber, Annetta Schaad (aschaad at hotmail.com)
850
 
+        * 
851
 
+        * @return javax.swing.JPanel
852
 
+        */
853
 
+    protected JPanel getPanelColorGuide(  )
854
 
+    {
855
 
+        if( panelColorGuide == null )
856
 
+        {
857
 
+            panelColorGuide = new JPanel(  );
858
 
+        }
859
 
+
860
 
+        return panelColorGuide;
861
 
+    }
862
 
+
863
 
     /**
864
 
      * This method initializes jPanel5
865
 
      *
866
 
@@ -691,8 +881,44 @@
867
 
 
868
 
         return btnColorSelected;
869
 
     }
870
 
+    
871
 
+    /**
872
 
+     * Returns the "..." button to change favourite colour
873
 
+     *
874
 
+     * @author Patrick Huber, Annetta Schaad (aschaad at hotmail.com)
875
 
+     *
876
 
+     * @return javax.swing.JButton
877
 
+     */
878
 
+    protected JButton getBtnColorFavourite(  )
879
 
+    {
880
 
+        if( btnColorFavourite == null )
881
 
+        {
882
 
+            btnColorFavourite = new JButton(  );
883
 
+            btnColorFavourite.setText( "..." );
884
 
+        }
885
 
 
886
 
+        return btnColorFavourite;
887
 
+    }
888
 
+    
889
 
     /**
890
 
+     * Returns the "..." button to change favourite colour
891
 
+     *
892
 
+     * @author Patrick Huber, Annetta Schaad (aschaad at hotmail.com)
893
 
+     *
894
 
+     * @return javax.swing.JButton
895
 
+     */
896
 
+    protected JButton getBtnColorGuide(  )
897
 
+    {
898
 
+        if( btnColorGuide == null )
899
 
+        {
900
 
+            btnColorGuide = new JButton(  );
901
 
+            btnColorGuide.setText( "..." );
902
 
+        }
903
 
+
904
 
+        return btnColorGuide;
905
 
+    }
906
 
+
907
 
+    /**
908
 
      * This method initializes jTextField
909
 
      *
910
 
      * @return javax.swing.JTextField
911
 
Index: src/freeguide/plugins/ui/horizontal/manylabels/HorizontalViewerConfig.java
912
 
===================================================================
913
 
--- src/freeguide/plugins/ui/horizontal/manylabels/HorizontalViewerConfig.java  (revision 1455)
914
 
+++ src/freeguide/plugins/ui/horizontal/manylabels/HorizontalViewerConfig.java  (working copy)
915
 
@@ -49,6 +49,15 @@
916
 
 
917
 
     /** Default colour of a ticked programme */
918
 
     public Color colorTicked = new Color( 204, 255, 204 );
919
 
+    
920
 
+       /**
921
 
+        * new entries for favourite colour and guide colour
922
 
+        *
923
 
+        * @author Patrick Huber, Annetta Schaad (aschaad at hotmail.com)
924
 
+        */
925
 
+    /** Default colour of a favourite and guide programme */
926
 
+    public Color colorFavourite = new Color( 204, 204, 255 );
927
 
+    public Color colorGuide = new Color( 255, 223, 181 );
928
 
 
929
 
     /** DOCUMENT ME! */
930
 
     public boolean displayAlignToLeft = true;
931
 
Index: src/freeguide/plugins/ui/horizontal/manylabels/JLabelProgramme.java
932
 
===================================================================
933
 
--- src/freeguide/plugins/ui/horizontal/manylabels/JLabelProgramme.java (revision 1455)
934
 
+++ src/freeguide/plugins/ui/horizontal/manylabels/JLabelProgramme.java (working copy)
935
 
@@ -43,6 +43,15 @@
936
 
     protected static Border MOVIE_BORDER;
937
 
     protected static Border INGUIDE_BORDER;
938
 
     protected static Border FOCUSED_BORDER;
939
 
+    /**
940
 
+     * Setup border colors
941
 
+     * 
942
 
+     *  @author Patrick Huber, Annetta Schaad (aschaad at hotmail.com)
943
 
+     *  
944
 
+     *  inserted: borders for favourite and selected 
945
 
+     */
946
 
+    protected static Border FAVOURITE_BORDER;
947
 
+    protected static Border GUIDE_BORDER;
948
 
 
949
 
     /** Standard reminder. */
950
 
     protected static IModuleReminder REMINDER;
951
 
@@ -66,15 +75,21 @@
952
 
 
953
 
     }
954
 
 
955
 
+    /** Square shape. */
956
 
+    protected final static Rectangle SQUARE_SHAPE = new Rectangle( 125, 650, 350, 350 );
957
 
+
958
 
     /** Programme for current label. */
959
 
     final protected TVProgramme programme;
960
 
 
961
 
     /** Parent controller. */
962
 
     final protected HorizontalViewer controller;
963
 
 
964
 
-    /** Need to draw heart. */
965
 
+    /** Need to draw heart symbol. */
966
 
     protected boolean isDrawHeart;
967
 
 
968
 
+    /** Need to draw square symbol (=record). */
969
 
+    protected boolean isDrawSquare;
970
 
+
971
 
     /** Cached tooltip text. */
972
 
     private String tooltip;
973
 
     protected final boolean moveNames;
974
 
@@ -98,7 +113,7 @@
975
 
         this.moveNames = moveNames;
976
 
         setText( getTitle( programme ) );
977
 
         setupColors(  );
978
 
-        setupHeart(  );
979
 
+        setupSymbols(  );
980
 
         setOpaque( true );
981
 
         setFocusable( true );
982
 
         addMouseListener( main.handlers.labelProgrammeMouseListener );
983
 
@@ -184,10 +199,24 @@
984
 
 
985
 
     /**
986
 
      * Setup colors for current label.
987
 
+     * 
988
 
+     *  @author Patrick Huber, Annetta Schaad (aschaad at hotmail.com)
989
 
+     *  changed: is Highlighted instead of selected 
990
 
      */
991
 
     public void setupColors(  )
992
 
+    {                                                                          // is favourite?
993
 
+        if( ( REMINDER != null ) && REMINDER.getFavourite( programme ) != null && REMINDER.isHighlighted( programme ))
994
 
     {
995
 
-        if( ( REMINDER != null ) && REMINDER.isSelected( programme ) )
996
 
+            setBackground( controller.config.colorFavourite );
997
 
+            setBorder( FAVOURITE_BORDER );
998
 
+
999
 
+        }
1000
 
+        else if( ( REMINDER != null) && REMINDER.isSelected( programme ) && REMINDER.isHighlighted( programme ))  // is selected??
1001
 
+    {
1002
 
+            setBackground( controller.config.colorGuide );
1003
 
+            setBorder( GUIDE_BORDER );
1004
 
+        }
1005
 
+        else if( ( REMINDER != null ) && REMINDER.isHighlighted( programme ) )  // is highlighted?
1006
 
         {
1007
 
             setBackground( controller.config.colorTicked );
1008
 
             setBorder( INGUIDE_BORDER );
1009
 
@@ -241,21 +270,36 @@
1010
 
         FOCUSED_BORDER = BorderFactory.createCompoundBorder( 
1011
 
                 BorderFactory.createLineBorder( Color.BLUE, 2 ),
1012
 
                 BorderFactory.createLineBorder( main.config.colorNonTicked, 1 ) );
1013
 
+        /**
1014
 
+         * Setup border colors
1015
 
+         * 
1016
 
+         *  @author Patrick Huber, Annetta Schaad (aschaad at hotmail.com)
1017
 
+         *  
1018
 
+         *  inserted: borders for favourite and selected 
1019
 
+         */
1020
 
+        GUIDE_BORDER = BorderFactory.createCompoundBorder( 
1021
 
+                BorderFactory.createLineBorder( Color.BLACK, 1 ),
1022
 
+                BorderFactory.createLineBorder( main.config.colorGuide, 2 ) );
1023
 
+        FAVOURITE_BORDER = BorderFactory.createCompoundBorder( 
1024
 
+                BorderFactory.createLineBorder( Color.BLACK, 1 ),
1025
 
+                BorderFactory.createLineBorder( main.config.colorFavourite, 2 ) );
1026
 
     }
1027
 
 
1028
 
     /**
1029
 
      * Setup need to draw heart for current label.
1030
 
      */
1031
 
-    protected void setupHeart(  )
1032
 
+    protected void setupSymbols(  )
1033
 
     {
1034
 
         if( REMINDER == null )
1035
 
         {
1036
 
             isDrawHeart = false;
1037
 
+            isDrawSquare = false; // for recording.
1038
 
         }
1039
 
         else
1040
 
         {
1041
 
-            isDrawHeart = ( (BaseModuleReminder)REMINDER ).getFavourite( 
1042
 
-                    programme ) != null;
1043
 
+            freeguide.common.lib.fgspecific.selection.Favourite f = ( (BaseModuleReminder)REMINDER ).getFavourite( programme );
1044
 
+            isDrawHeart = (f != null);
1045
 
+            isDrawSquare = (f != null && f.getRecord( ) );
1046
 
         }
1047
 
     }
1048
 
 
1049
 
@@ -338,8 +382,15 @@
1050
 
 
1051
 
             graphics.fill( HEART_SHAPE );
1052
 
 
1053
 
+            if( isDrawSquare )
1054
 
+            {
1055
 
+              graphics.setColor( new Color( 175, 0, 0 ) );
1056
 
+              graphics.fill( SQUARE_SHAPE );
1057
 
+            }
1058
 
+
1059
 
             graphics.setTransform( originalTransform );
1060
 
         }
1061
 
+
1062
 
     }
1063
 
 
1064
 
     /**
1065
 
Index: src/freeguide/plugins/ui/horizontal/manylabels/ConfigureUIController.java
1066
 
===================================================================
1067
 
--- src/freeguide/plugins/ui/horizontal/manylabels/ConfigureUIController.java   (revision 1455)
1068
 
+++ src/freeguide/plugins/ui/horizontal/manylabels/ConfigureUIController.java   (working copy)
1069
 
@@ -79,6 +79,20 @@
1070
 
                 {
1071
 
                     panelColor = panel.getPanelColorSelected(  );
1072
 
                 }
1073
 
+                
1074
 
+               /**
1075
 
+                * new entries for favourite colour and guide colour
1076
 
+                *
1077
 
+                * @author Patrick Huber, Annetta Schaad (aschaad at hotmail.com)
1078
 
+                */
1079
 
+                else if( e.getSource(  ) == panel.getBtnColorFavourite(  ) )
1080
 
+                {
1081
 
+                    panelColor = panel.getPanelColorFavourite(  );
1082
 
+                }
1083
 
+                else if( e.getSource(  ) == panel.getBtnColorGuide(  ) )
1084
 
+                {
1085
 
+                    panelColor = panel.getPanelColorGuide(  );
1086
 
+                }
1087
 
                 else if( e.getSource(  ) == panel.getBtnColorNormal(  ) )
1088
 
                 {
1089
 
                     panelColor = panel.getPanelColorNormal(  );
1090
 
@@ -139,6 +153,15 @@
1091
 
         config.colorChannel = panel.getPanelColorChannel(  ).getBackground(  );
1092
 
         config.colorMovie = panel.getPanelColorMovie(  ).getBackground(  );
1093
 
         config.colorTicked = panel.getPanelColorSelected(  ).getBackground(  );
1094
 
+        
1095
 
+       /**
1096
 
+        * new entries for favourite colour and guide colour
1097
 
+        *
1098
 
+        * @author Patrick Huber, Annetta Schaad (aschaad at hotmail.com)
1099
 
+        */
1100
 
+        config.colorFavourite = panel.getPanelColorFavourite(  ).getBackground(  );
1101
 
+        config.colorGuide = panel.getPanelColorGuide(  ).getBackground(  );
1102
 
+        
1103
 
         config.colorNonTicked = panel.getPanelColorNormal(  ).getBackground(  );
1104
 
         config.displayTooltips = panel.getCbDisplayTooltips(  ).isSelected(  );
1105
 
         config.displayTime = panel.getCbDrawTime(  ).isSelected(  );
1106
 
@@ -183,6 +206,15 @@
1107
 
         panel.getPanelColorChannel(  ).setBackground( config.colorChannel );
1108
 
         panel.getPanelColorMovie(  ).setBackground( config.colorMovie );
1109
 
         panel.getPanelColorSelected(  ).setBackground( config.colorTicked );
1110
 
+        
1111
 
+       /**
1112
 
+        * new entries for favourite colour and guide colour
1113
 
+        *
1114
 
+        * @author Patrick Huber, Annetta Schaad (aschaad at hotmail.com)
1115
 
+        */
1116
 
+        panel.getPanelColorFavourite(  ).setBackground( config.colorFavourite );
1117
 
+        panel.getPanelColorGuide(  ).setBackground( config.colorGuide );
1118
 
+        
1119
 
         panel.getPanelColorNormal(  ).setBackground( config.colorNonTicked );
1120
 
 
1121
 
         panel.getBtnFont(  ).addActionListener( 
1122
 
@@ -215,6 +247,15 @@
1123
 
             } );
1124
 
         panel.getBtnColorChannel(  ).addActionListener( colorBtnAction );
1125
 
         panel.getBtnColorSelected(  ).addActionListener( colorBtnAction );
1126
 
+        
1127
 
+        /**
1128
 
+        * new entries for favourite colour and guide colour
1129
 
+        *
1130
 
+        * @author Patrick Huber, Annetta Schaad (aschaad at hotmail.com)
1131
 
+        */
1132
 
+        panel.getBtnColorFavourite(  ).addActionListener( colorBtnAction );
1133
 
+        panel.getBtnColorGuide(  ).addActionListener( colorBtnAction );
1134
 
+        
1135
 
         panel.getBtnColorMovie(  ).addActionListener( colorBtnAction );
1136
 
         panel.getBtnColorNormal(  ).addActionListener( colorBtnAction );
1137
 
         panel.getSliderHeight(  ).addChangeListener( sliderChange );
1138
 
Index: src/freeguide/plugins/ui/horizontal/manylabels/HorizontalViewerHandlers.java
1139
 
===================================================================
1140
 
--- src/freeguide/plugins/ui/horizontal/manylabels/HorizontalViewerHandlers.java        (revision 1455)
1141
 
+++ src/freeguide/plugins/ui/horizontal/manylabels/HorizontalViewerHandlers.java        (working copy)
1142
 
@@ -240,8 +240,12 @@
1143
 
      */
1144
 
     public static class LabelProgrammeActionMap extends ActionMap
1145
 
     {
1146
 
-/**
1147
 
+        /**
1148
 
          * Creates a new LabelProgrammeActionMap object.
1149
 
+         * 
1150
 
+        * set highlighting according to the favourite selection
1151
 
+        *
1152
 
+        * @author Patrick Huber, Annetta Schaad (aschaad at hotmail.com)
1153
 
          */
1154
 
         public LabelProgrammeActionMap(  )
1155
 
         {
1156
 
@@ -315,8 +319,18 @@
1157
 
 
1158
 
                         final boolean isSelected =
1159
 
                             reminder.isSelected( label.getProgramme(  ) );
1160
 
+                        final boolean isHighlighted =
1161
 
+                            reminder.isHighlighted( label.getProgramme(  ) );
1162
 
+                        if (isSelected && !isHighlighted) {
1163
 
                         reminder.setProgrammeSelection( 
1164
 
-                            label.getProgramme(  ), !isSelected );
1165
 
+                                    label.getProgramme(  ), !isSelected , false);
1166
 
+                        } else if (!isSelected && isHighlighted) {
1167
 
+                               reminder.setProgrammeSelection( 
1168
 
+                                    label.getProgramme(  ), !isSelected , true);
1169
 
+                        } else {
1170
 
+                               reminder.setProgrammeSelection( 
1171
 
+                                 label.getProgramme(  ), !isSelected , !isHighlighted);
1172
 
+                        }
1173
 
                         label.controller.redrawCurrentProgramme(  );
1174
 
                     }
1175
 
                     ;
1176
 
Index: src/freeguide/common/plugininterfaces/BaseModuleReminder.java
1177
 
===================================================================
1178
 
--- src/freeguide/common/plugininterfaces/BaseModuleReminder.java       (revision 1455)
1179
 
+++ src/freeguide/common/plugininterfaces/BaseModuleReminder.java       (working copy)
1180
 
@@ -145,7 +145,40 @@
1181
 
         return null;
1182
 
     }
1183
 
 
1184
 
+
1185
 
     /**
1186
 
+     * Check if programme is highlighted.
1187
 
+     *
1188
 
+     * @param programme programme
1189
 
+     *
1190
 
+     * @return true if programme highlighted
1191
 
+     * 
1192
 
+        * @author Patrick Huber, Annetta Schaad (aschaad at hotmail.com)
1193
 
+     */
1194
 
+    public boolean isHighlighted( TVProgramme programme )
1195
 
+    {
1196
 
+        synchronized( getReminderConfig(  ) )
1197
 
+        {
1198
 
+            ManualSelection sel = getManualSelection( programme );
1199
 
+
1200
 
+            if( sel != null )
1201
 
+            {
1202
 
+                return sel.isHighlighted(  );
1203
 
+
1204
 
+            }
1205
 
+
1206
 
+            else
1207
 
+            {
1208
 
+                Favourite fav = getFavourite( programme );
1209
 
+
1210
 
+                return fav != null;
1211
 
+
1212
 
+            }
1213
 
+        }
1214
 
+    }
1215
 
+
1216
 
+    
1217
 
+    /**
1218
 
      * Check if programme in the favourites or manual selection list.
1219
 
      *
1220
 
      * @param programme programme
1221
 
@@ -175,29 +208,51 @@
1222
 
     }
1223
 
 
1224
 
     /**
1225
 
+     * Check if programme wants to be recorded.
1226
 
+     *
1227
 
+     * @param programme programme
1228
 
+     *
1229
 
+     * @return true if programme selected
1230
 
+     */
1231
 
+    public boolean isRecord( TVProgramme programme )
1232
 
+    {
1233
 
+        synchronized( getReminderConfig(  ) )
1234
 
+        {
1235
 
+            Favourite fav = getFavourite( programme );
1236
 
+            return ( fav != null && fav.getRecord() );
1237
 
+        }
1238
 
+    }
1239
 
+
1240
 
+
1241
 
+    /**
1242
 
      * Add/remove programme to selection list.
1243
 
      *
1244
 
      * @param programme programme
1245
 
      * @param newSelection DOCUMENT ME!
1246
 
+     * 
1247
 
+        * new entries for favourite colour and guide colour
1248
 
+        *
1249
 
+        * @author Patrick Huber, Annetta Schaad (aschaad at hotmail.com)
1250
 
      */
1251
 
     public void setProgrammeSelection( 
1252
 
-        final TVProgramme programme, final boolean newSelection )
1253
 
+        final TVProgramme programme, final boolean newSelection, final boolean newHighlight)
1254
 
     {
1255
 
         synchronized( getReminderConfig(  ) )
1256
 
         {
1257
 
             ManualSelection sel = getManualSelection( programme );
1258
 
 
1259
 
+            
1260
 
             if( sel != null )
1261
 
             {
1262
 
                 sel.setSelected( newSelection );
1263
 
+                sel.setHighlighted(newHighlight);
1264
 
 
1265
 
             }
1266
 
 
1267
 
             else
1268
 
             {
1269
 
                 getReminderConfig(  ).manualSelectionList.add( 
1270
 
-                    new ManualSelection( programme, newSelection ) );
1271
 
-
1272
 
+                    new ManualSelection( programme, newSelection , newHighlight) );
1273
 
             }
1274
 
         }
1275
 
     }
1276
 
Index: src/freeguide/common/plugininterfaces/IModuleReminder.java
1277
 
===================================================================
1278
 
--- src/freeguide/common/plugininterfaces/IModuleReminder.java  (revision 1455)
1279
 
+++ src/freeguide/common/plugininterfaces/IModuleReminder.java  (working copy)
1280
 
@@ -36,6 +36,18 @@
1281
 
     public void stop(  );
1282
 
 
1283
 
     /**
1284
 
+     * Check if programme is highlighted.
1285
 
+     *
1286
 
+     * @author Patrick Huber, Annetta Schaad (aschaad at hotmail.com)
1287
 
+     *
1288
 
+     * @param programme programme
1289
 
+     *
1290
 
+     * @return true if highlighted
1291
 
+     */
1292
 
+    public boolean isHighlighted( TVProgramme programme );
1293
 
+
1294
 
+
1295
 
+    /**
1296
 
      * Check if programme is selected.
1297
 
      *
1298
 
      * @param programme programme
1299
 
@@ -49,9 +61,12 @@
1300
 
      *
1301
 
      * @param programme programme
1302
 
      * @param newSelection DOCUMENT ME!
1303
 
+     *
1304
 
+     * @author Patrick Huber, Annetta Schaad (aschaad at hotmail.com)
1305
 
+     * add parameter for highlight
1306
 
      */
1307
 
     public void setProgrammeSelection( 
1308
 
-        final TVProgramme programme, final boolean newSelection );
1309
 
+        final TVProgramme programme, final boolean newSelection, final boolean newHighlight);
1310
 
 
1311
 
     /**
1312
 
      * Add items to main frame menu.
1313
 
Index: src/freeguide/common/gui/FavouriteEditorDialog.java
1314
 
===================================================================
1315
 
--- src/freeguide/common/gui/FavouriteEditorDialog.java (revision 1455)
1316
 
+++ src/freeguide/common/gui/FavouriteEditorDialog.java (working copy)
1317
 
@@ -64,6 +64,7 @@
1318
 
     private javax.swing.JLabel labDayOfWeek;
1319
 
     private javax.swing.JLabel labName;
1320
 
     private javax.swing.JLabel labTimeFormat;
1321
 
+    private javax.swing.JCheckBox chkRecord;
1322
 
 
1323
 
     //    private javax.swing.JLabel labTimeFormat1;
1324
 
     private javax.swing.JLabel labTitle;
1325
 
@@ -150,6 +151,8 @@
1326
 
             cmbDayOfWeek.setSelectedIndex( favourite.getDayOfWeek(  ) );
1327
 
         }
1328
 
 
1329
 
+        chkRecord.setSelected( favourite.getRecord() );
1330
 
+
1331
 
         calcTxtName(  );
1332
 
     }
1333
 
 
1334
 
@@ -333,6 +336,8 @@
1335
 
         {
1336
 
             favourite.setDayOfWeek( -1 );
1337
 
         }
1338
 
+        // set the record flag
1339
 
+        favourite.setRecord( chkRecord.isSelected() );
1340
 
 
1341
 
         setSave(  );
1342
 
     }
1343
 
@@ -497,6 +502,14 @@
1344
 
                     cmbDayOfWeekActionPerformed( evt );
1345
 
                 }
1346
 
             } );
1347
 
+        chkRecord.addActionListener( 
1348
 
+            new java.awt.event.ActionListener(  )
1349
 
+            {
1350
 
+                public void actionPerformed( java.awt.event.ActionEvent evt )
1351
 
+                {
1352
 
+                    chkRecordActionPerformed( evt );
1353
 
+                }
1354
 
+            } );
1355
 
         butOK.addActionListener( 
1356
 
             new java.awt.event.ActionListener(  )
1357
 
             {
1358
 
@@ -678,6 +691,20 @@
1359
 
         gridBagConstraints.insets = new java.awt.Insets( 5, 5, 5, 5 );
1360
 
         gridBagConstraints.weightx = 0.9;
1361
 
         getContentPane(  ).add( txtName, gridBagConstraints );
1362
 
+
1363
 
+        chkRecord = new javax.swing.JCheckBox( 
1364
 
+                Application.getInstance(  )
1365
 
+                           .getLocalizedMessage( "record" ) );
1366
 
+        gridBagConstraints = new java.awt.GridBagConstraints( );
1367
 
+        gridBagConstraints.gridx = 1;
1368
 
+        gridBagConstraints.gridy = 8;
1369
 
+        gridBagConstraints.gridwidth = 3;
1370
 
+        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1371
 
+        gridBagConstraints.insets = new java.awt.Insets( 5, 5, 5, 5 ); // TODO what's this, correct?
1372
 
+        gridBagConstraints.weightx = 0.9;
1373
 
+        getContentPane(  ).add( chkRecord, gridBagConstraints );
1374
 
+
1375
 
+
1376
 
         jPanel1 = new javax.swing.JPanel( new java.awt.GridBagLayout(  ) );
1377
 
         butOK = new javax.swing.JButton( 
1378
 
                 Application.getInstance(  ).getLocalizedMessage( "ok" ) );
1379
 
@@ -695,7 +722,7 @@
1380
 
         jPanel1.add( butCancel, gridBagConstraints );
1381
 
         gridBagConstraints = new java.awt.GridBagConstraints(  );
1382
 
         gridBagConstraints.gridx = 0;
1383
 
-        gridBagConstraints.gridy = 8;
1384
 
+        gridBagConstraints.gridy = 9;
1385
 
         gridBagConstraints.gridwidth = 4;
1386
 
         gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
1387
 
         getContentPane(  ).add( jPanel1, gridBagConstraints );
1388
 
@@ -780,6 +807,10 @@
1389
 
         calcTxtName(  );
1390
 
     }
1391
 
 
1392
 
+    private void chkRecordActionPerformed( java.awt.event.ActionEvent evt )
1393
 
+    {
1394
 
+    }
1395
 
+
1396
 
     /**
1397
 
      * Description of the Method
1398
 
      *
1399
 
Index: src/freeguide/common/lib/fgspecific/selection/SelectionManager.java
1400
 
===================================================================
1401
 
--- src/freeguide/common/lib/fgspecific/selection/SelectionManager.java (revision 1455)
1402
 
+++ src/freeguide/common/lib/fgspecific/selection/SelectionManager.java (working copy)
1403
 
@@ -97,7 +97,7 @@
1404
 
             else
1405
 
             {
1406
 
                 storage.manualSelectionList.add( 
1407
 
-                    new ManualSelection( programme, true ) );
1408
 
+                    new ManualSelection( programme, true , true) );
1409
 
 
1410
 
             }
1411
 
         }
1412
 
@@ -123,7 +123,7 @@
1413
 
             else
1414
 
             {
1415
 
                 storage.manualSelectionList.add( 
1416
 
-                    new ManualSelection( programme, false ) );
1417
 
+                    new ManualSelection( programme, false, false) );
1418
 
 
1419
 
             }
1420
 
         }
1421
 
Index: src/freeguide/common/lib/fgspecific/selection/ManualSelection.java
1422
 
===================================================================
1423
 
--- src/freeguide/common/lib/fgspecific/selection/ManualSelection.java  (revision 1455)
1424
 
+++ src/freeguide/common/lib/fgspecific/selection/ManualSelection.java  (working copy)
1425
 
@@ -18,6 +18,9 @@
1426
 
     /** DOCUMENT ME! */
1427
 
     public boolean selected;
1428
 
 
1429
 
+    /** PROGRAMM IS HIGHLIGHTED */
1430
 
+    public boolean highlighted;
1431
 
+
1432
 
 /**
1433
 
      * Creates a new ManualSelection object.
1434
 
      */
1435
 
@@ -32,7 +35,7 @@
1436
 
      * @param selected DOCUMENT ME!
1437
 
      */
1438
 
     public ManualSelection( 
1439
 
-        final TVProgramme programme, final boolean selected )
1440
 
+        final TVProgramme programme, final boolean selected, final boolean highlighted )
1441
 
     {
1442
 
         this.channelID = programme.getChannel(  ).getID(  );
1443
 
 
1444
 
@@ -40,6 +43,7 @@
1445
 
 
1446
 
         this.selected = selected;
1447
 
 
1448
 
+        this.highlighted = highlighted || selected;
1449
 
     }
1450
 
 
1451
 
     /**
1452
 
@@ -64,6 +68,32 @@
1453
 
     }
1454
 
 
1455
 
     /**
1456
 
+     * Get Highlight
1457
 
+     * 
1458
 
+     * @author Patrick Huber, Annetta Schaad (aschaad at hotmail.com)
1459
 
+     *
1460
 
+     * @return Returns the highlighted status.
1461
 
+     */
1462
 
+    public boolean isHighlighted(  )
1463
 
+    {
1464
 
+        return highlighted;
1465
 
+
1466
 
+    }
1467
 
+
1468
 
+    /**
1469
 
+     * Set Highlight
1470
 
+     * 
1471
 
+     * @author Patrick Huber, Annetta Schaad (aschaad at hotmail.com)
1472
 
+     *
1473
 
+     * @param highlighted the highlighted to set.
1474
 
+     */
1475
 
+    public void setHighlighted( final boolean highlighted )
1476
 
+    {
1477
 
+        this.highlighted = highlighted;
1478
 
+
1479
 
+    }    
1480
 
+    
1481
 
+    /**
1482
 
      * DOCUMENT ME!
1483
 
      *
1484
 
      * @return Returns the selected status.
1485
 
Index: src/freeguide/common/lib/fgspecific/selection/Favourite.java
1486
 
===================================================================
1487
 
--- src/freeguide/common/lib/fgspecific/selection/Favourite.java        (revision 1455)
1488
 
+++ src/freeguide/common/lib/fgspecific/selection/Favourite.java        (working copy)
1489
 
@@ -56,6 +56,9 @@
1490
 
     /** Day of week, or -1 if any. */
1491
 
     public int dayOfWeek = -1;
1492
 
 
1493
 
+    /** Do we want to record it or not. */
1494
 
+    public boolean doRecord = false;
1495
 
+
1496
 
 /**
1497
 
      * Constructor for the Favourite object
1498
 
      */
1499
 
@@ -79,6 +82,7 @@
1500
 
         result.afterTime = afterTime;
1501
 
         result.beforeTime = beforeTime;
1502
 
         result.dayOfWeek = dayOfWeek;
1503
 
+        result.doRecord = doRecord;
1504
 
 
1505
 
         return result;
1506
 
     }
1507
 
@@ -248,6 +252,16 @@
1508
 
     }
1509
 
 
1510
 
     /**
1511
 
+     * Getst he doRecord attribute of the Favourite object
1512
 
+     *
1513
 
+     * @return The doRecord value
1514
 
+     */
1515
 
+    public boolean getRecord( )
1516
 
+    {
1517
 
+      return doRecord;
1518
 
+    }
1519
 
+
1520
 
+    /**
1521
 
      * Sets the name attribute of the Favourite object
1522
 
      *
1523
 
      * @param name The new name value
1524
 
@@ -328,5 +342,16 @@
1525
 
         this.dayOfWeek = dayOfWeek;
1526
 
     }
1527
 
 
1528
 
+
1529
 
+    /**
1530
 
+     * Sets the record flag.
1531
 
+     *
1532
 
+     * @param doRecord If we want it to have the record flag or not.
1533
 
+     */
1534
 
+    public void setRecord( boolean doRecord )
1535
 
+    {
1536
 
+      this.doRecord = doRecord;
1537
 
+    }
1538
 
+
1539
 
     // The day of the week it's on
1540
 
 }
1541
 
Index: src/resources/i18n/reminder_alarm.en.properties
1542
 
===================================================================
1543
 
--- src/resources/i18n/reminder_alarm.en.properties     (revision 1455)
1544
 
+++ src/resources/i18n/reminder_alarm.en.properties     (working copy)
1545
 
@@ -3,8 +3,18 @@
1546
 
 
1547
 
 menu.label=Favourites...
1548
 
 
1549
 
+/**
1550
 
+ * new entries for favourite system
1551
 
+ *
1552
 
+ * @author Patrick Huber, Annetta Schaad (aschaad at hotmail.com)
1553
 
+ */
1554
 
+popup.highlight.add=Highlight
1555
 
+popup.highlight.del=Remove Highlight
1556
 
+
1557
 
 popup.selection.add=Add to guide
1558
 
 popup.selection.del=Remove from guide
1559
 
+popup.record.add=Record
1560
 
+popup.record.del=Do not record
1561
 
 popup.favourite.add=Add to favourites
1562
 
 popup.favourite.del=Remove from favourites
1563
 
 popup.favourite.del.title=Remove favourite?
1564
 
@@ -17,3 +27,8 @@
1565
 
 options.remind_me_of_progs=Remind me of progs
1566
 
 options.seconds_warning=Seconds warning
1567
 
 options.give_up_after_secs=Give up after (secs)
1568
 
+
1569
 
+options.record_progs=Record progs
1570
 
+options.execute_on_start=Execute on start
1571
 
+options.execute_on_stop=Execute on stop
1572
 
+
1573
 
Index: src/resources/i18n/ui_horizontal_manylabels.en.properties
1574
 
===================================================================
1575
 
--- src/resources/i18n/ui_horizontal_manylabels.en.properties   (revision 1455)
1576
 
+++ src/resources/i18n/ui_horizontal_manylabels.en.properties   (working copy)
1577
 
@@ -22,6 +22,9 @@
1578
 
 movie_colour=Movie colour
1579
 
 channel_colour=Channel colour
1580
 
 selected_colour=Selected prog. colour
1581
 
+favourite_colour=Favourite colour
1582
 
+guide_colour=Guide colour
1583
 
+
1584
 
 # freeguide/gui/options/TimeOptionPanel.java
1585
 
 #
1586
 
 day_starts_at=Day starts at
1587
 
Index: src/resources/i18n/MessagesBundle.en.properties
1588
 
===================================================================
1589
 
--- src/resources/i18n/MessagesBundle.en.properties     (revision 1455)
1590
 
+++ src/resources/i18n/MessagesBundle.en.properties     (working copy)
1591
 
@@ -71,6 +71,7 @@
1592
 
 times_should_be_entered_as_hhmm=(Times should be entered as "hh:mm")
1593
 
 on_day_label=On day
1594
 
 name=Name
1595
 
+record=Record
1596
 
 #
1597
 
 # freeguide/gui/dialogs/FavouritesListDialog.java
1598
 
 #