[mythtv] Re: [patch] patch policy question
J. Donavan Stanley
jdonavan at jdonavan.net
Sun Sep 19 22:29:52 EDT 2004
Andrew M. Bishop wrote:
>I am not sure that I know why attachments are better than inlining the
>patch though. Unless someone somewhere is mangling the e-mail it
>should be perfectly readable and I am not the only person sending them
>this way. It has always worked for me before, Isaac has had no
>problem receiving them, so why I want to attach them?
>
>
>
Many helpful mail clients will append the patch to the bottom of the
message as though it had been typed in there to begin with, just like
mine did with yours.
Which would you rather do 1) Cut and past out sections of a message to
create a patch file to apply or 2) Save an attached patch
>Here are all of the patches that I sent at the weekend as attachments:
>
>in the e-mail - Re: Over/Underscan rounding error
>
>
>
>------------------------------------------------------------------------
>
>--- /home/amb/mythtv/v0.14/mythtv/libs/libmythtv/videooutbase.orig.cpp 2004-01-28 20:23:17.000000000 +0000
>+++ /home/amb/mythtv/v0.14/mythtv/libs/libmythtv/videooutbase.cpp 2004-02-01 09:36:00.000000000 +0000
>@@ -273,9 +273,9 @@
>
> if (img_vscanf > 0)
> {
>- // Veritcal overscan. Move the Y start point in original image.
>- imgy = (int)ceil(XJ_height * img_vscanf);
>- imgh = (int)ceil(XJ_height * (1 - 2 * img_vscanf));
>+ // Vertical overscan. Move the Y start point in original image.
>+ imgy = (int)floor(0.5 + XJ_height * img_vscanf);
>+ imgh = (int)floor(0.5 + XJ_height * (1 - 2 * img_vscanf));
>
> // If there is an offset, apply it now that we have a room.
> // To move the image down, move the start point up.
>@@ -299,8 +299,8 @@
> if (img_hscanf > 0)
> {
> // Horizontal overscan. Move the X start point in original image.
>- imgx = (int)ceil(XJ_width * img_hscanf);
>- imgw = (int)ceil(XJ_width * (1 - 2 * img_hscanf));
>+ imgx = (int)floor(0.5 + XJ_width * img_hscanf);
>+ imgw = (int)floor(0.5 + XJ_width * (1 - 2 * img_hscanf));
> if (xoff > 0)
> {
> if (xoff > imgx)
>@@ -318,11 +318,11 @@
> float vscanf, hscanf;
> if (img_vscanf < 0)
> {
>- // Veritcal underscan. Move the starting Y point in the display window.
>+ // Vertical underscan. Move the starting Y point in the display window.
> // Use the abolute value of scan factor.
> vscanf = fabs(img_vscanf);
>- dispyoff = (int)ceil(disph * vscanf);
>- disphoff = (int)ceil(disph * (1 - 2 * vscanf));
>+ dispyoff = (int)floor(0.5 + disph * vscanf);
>+ disphoff = (int)floor(0.5 + disph * (1 - 2 * vscanf));
> // Now offset the image within the extra blank space created by
> // underscanning.
> // To move the image down, increase the Y offset inside the display
>@@ -345,8 +345,8 @@
> if (img_hscanf < 0)
> {
> hscanf = fabs(img_hscanf);
>- dispxoff = (int)ceil(dispw * hscanf);
>- dispwoff = (int)ceil(dispw * (1 - 2 * hscanf));
>+ dispxoff = (int)floor(0.5 + dispw * hscanf);
>+ dispwoff = (int)floor(0.5 + dispw * (1 - 2 * hscanf));
> if (xoff > 0)
> {
> if (xoff > dispxoff)
>@@ -426,6 +426,14 @@
> //printf("After: %dx%d%+d%+d\n", dispwoff, disphoff, dispxoff,
> //dispyoff);
>
>+ VERBOSE(VB_PLAYBACK,
>+ QString("Image size. dispxoff %1, dispxoff: %2, dispwoff: %3, disphoff: %4")
>+ .arg(dispxoff).arg(dispyoff).arg(dispwoff).arg(disphoff));
>+
>+ VERBOSE(VB_PLAYBACK,
>+ QString("Image size. imgx %1, imgy: %2, imgw: %3, imgh: %4")
>+ .arg(imgx).arg(imgy).arg(imgw).arg(imgh));
>+
> DrawUnusedRects();
> }
>
>
>
>------------------------------------------------------------------------
>
>
>in the e-mail - Not displaying channum when option chosen
>
>
>
>------------------------------------------------------------------------
>
>--- /home/amb/mythtv/v0.14/mythtv/libs/libmythtv/progfind.orig.cpp 2004-01-29 03:27:07.000000000 +0000
>+++ /home/amb/mythtv/v0.14/mythtv/libs/libmythtv/progfind.cpp 2004-02-01 09:28:33.000000000 +0000
>@@ -332,7 +332,8 @@
> QString channame = "";
> QString recording = "";
>
>- channum = showData[curShow].channelNum;
>+ if(!gContext->GetNumSetting("DisplayChanNum"))
>+ channum = showData[curShow].channelNum;
> channame = showData[curShow].channelCallsign;
> title = progData[curProgram];
> timedate = showData[curShow].startDisplay + " - " +
>
>
>------------------------------------------------------------------------
>
>--- /home/amb/mythtv/v0.14/mythtv/libs/libmythtv/proglist.orig.cpp 2004-01-30 18:03:54.000000000 +0000
>+++ /home/amb/mythtv/v0.14/mythtv/libs/libmythtv/proglist.cpp 2004-02-01 10:06:03.000000000 +0000
>@@ -569,6 +569,7 @@
> gContext->GetSetting("ChannelOrdering", "channum + 0");
> QString querystr = "SELECT channel.chanid, channel.channum, "
> "channel.callsign FROM channel ORDER BY " + channelOrdering + ";";
>+ int displaychannum = gContext->GetNumSetting("DisplayChanNum");
> QSqlQuery query;
> query.exec(querystr);
> if (query.isActive() && query.numRowsAffected())
>@@ -578,7 +579,9 @@
> QString chanid = query.value(0).toString();
> QString chantext;
> QString channum = query.value(1).toString();
>- if (channum != QString::null && channum != "")
>+ if(displaychannum)
>+ chantext="";
>+ else if (channum != QString::null && channum != "")
> chantext = channum;
> else
> chantext = "???";
>@@ -817,6 +820,7 @@
> ltype->SetUpArrow(skip > 0);
> ltype->SetDownArrow(skip + listsize < itemCount);
>
>+ int displaychannum = gContext->GetNumSetting("DisplayChanNum");
> int i;
> for (i = 0; i < listsize; i++)
> {
>@@ -826,7 +830,10 @@
> ProgramInfo *pi = itemList.at(i+skip);
>
> ltype->SetItemText(i, 1, pi->startts.toString(timeFormat));
>- ltype->SetItemText(i, 2, pi->chanstr + " " + pi->chansign);
>+ if(displaychannum)
>+ ltype->SetItemText(i, 2, pi->chansign);
>+ else
>+ ltype->SetItemText(i, 2, pi->chanstr + " " + pi->chansign);
>
> if (pi->subtitle == "")
> tmptitle = pi->title;
>
>
>------------------------------------------------------------------------
>
>--- /home/amb/mythtv/v0.14/mythtv/programs/mythfrontend/channelrecpriority.orig.cpp 2004-01-28 22:34:59.000000000 +0000
>+++ /home/amb/mythtv/v0.14/mythtv/programs/mythfrontend/channelrecpriority.cpp 2004-02-01 11:29:29.000000000 +0000
>@@ -431,7 +431,7 @@
> }
> }
> else if (!result.isActive())
>- MythContext::DBError("Get channel recording prioritiess query", query);
>+ MythContext::DBError("Get channel recording priorities query", query);
> }
>
> typedef struct RecPriorityInfo
>@@ -555,6 +555,8 @@
> ltype->ResetList();
> ltype->SetActive(true);
>
>+ int displaychannum = gContext->GetNumSetting("DisplayChanNum");
>+
> QMap<QString, ChannelInfo>::Iterator it;
> for (it = channelData.begin(); it != channelData.end(); ++it)
> {
>@@ -572,8 +574,11 @@
> curitem = new ChannelInfo(*chanInfo);
> ltype->SetItemCurrent(cnt);
> }
>-
>- ltype->SetItemText(cnt, 1, chanInfo->chanstr);
>+
>+ if(displaychannum)
>+ ltype->SetItemText(cnt, 1, "");
>+ else
>+ ltype->SetItemText(cnt, 1, chanInfo->chanstr);
> ltype->SetItemText(cnt, 2, chanInfo->callsign);
> if (chanInfo->recpriority.toInt() > 0)
> ltype->SetItemText(cnt, 3, "+");
>
>
>------------------------------------------------------------------------
>
>
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>mythtv-dev mailing list
>mythtv-dev at mythtv.org
>http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
>
>
More information about the mythtv-dev
mailing list