[mythtv-commits] Ticket #9578: Increase arbitrary MAX_DISPLAY_CHANS in guidegrid.h

MythTV noreply at mythtv.org
Sun Feb 13 08:18:16 UTC 2011


#9578: Increase arbitrary MAX_DISPLAY_CHANS in guidegrid.h
----------------------------------------------+----------------------------
 Reporter:  Andrew Leech <andrew@…>           |          Owner:
     Type:  Patch - Feature                   |         Status:  new
 Priority:  minor                             |      Milestone:  unknown
Component:  MythTV - General                  |        Version:  0.24-fixes
 Severity:  low                               |     Resolution:
 Keywords:                                    |  Ticket locked:  0
----------------------------------------------+----------------------------

Comment (by Andrew Leech <andrew@…>):

 Ok that was very daft on my part, the above patch isn't enough. The
 original figure of 12 is also hard coded in mythuiguidegrid.h[[BR]]
 They should really be both referencing a single common define.

 {{{
 diff --git a/mythtv/libs/libmythui/mythuiguidegrid.cpp
 b/mythtv/libs/libmythui/mythuiguidegrid.cpp
 index 5a85361..2eb57e7 100644
 --- a/mythtv/libs/libmythui/mythuiguidegrid.cpp
 +++ b/mythtv/libs/libmythui/mythuiguidegrid.cpp
 @@ -109,7 +109,7 @@ bool MythUIGuideGrid::ParseElement(
      {
          m_channelCount = getFirstText(element).toInt();
          m_channelCount = max(m_channelCount, 1);
 -        m_channelCount = min(m_channelCount, 12);
 +        m_channelCount = min(m_channelCount, MAX_DISPLAY_CHANS);
      }
      else if (element.tagName() == "timeslots")
      {
 diff --git a/mythtv/libs/libmythui/mythuiguidegrid.h
 b/mythtv/libs/libmythui/mythuiguidegrid.h
 index 1302a9f..fa868d2 100644
 --- a/mythtv/libs/libmythui/mythuiguidegrid.h
 +++ b/mythtv/libs/libmythui/mythuiguidegrid.h
 @@ -12,6 +12,7 @@

  #define ARROWIMAGESIZE 4
  #define RECSTATUSSIZE  8
 +#define MAX_DISPLAY_CHANS 99

  class MythFontProperties;

 diff --git a/mythtv/programs/mythfrontend/guidegrid.h
 b/mythtv/programs/mythfrontend/guidegrid.h
 index 92d71f2..16d836d 100644
 --- a/mythtv/programs/mythfrontend/guidegrid.h
 +++ b/mythtv/programs/mythfrontend/guidegrid.h
 @@ -16,6 +16,7 @@ using namespace std;
  #include "programinfo.h"
  #include "channelgroup.h"
  #include "channelutil.h"
 +#include "mythuiguidegrid.h"

  // mythfrontend
  #include "schedulecommon.h"
 @@ -28,7 +29,7 @@ class QTimer;
  class MythUIButtonList;
  class MythUIGuideGrid;

 -#define MAX_DISPLAY_CHANS 12
 +//#define MAX_DISPLAY_CHANS 99
  #define MAX_DISPLAY_TIMES 36

  typedef vector<PixmapChannel>   pix_chan_list_t;

 }}}

-- 
Ticket URL: <http://code.mythtv.org/trac/ticket/9578#comment:1>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center


More information about the mythtv-commits mailing list