{"thread":{"id":"6726","subject":"[PATCH] qgit: Default the log window to wider than the file list and set monospaced font","startedAt":"2007-02-07T21:38:36Z","lastAt":"2007-02-09T09:19:23Z","messageCount":21,"participants":["Andy Parkins","Marco Costalba","Jakub Narebski","Shawn O. Pearce","Junio C Hamano","Linus Torvalds","Johannes Schindelin","Michael S. Tsirkin"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"33855","messageId":"200702072138.36787.andyparkins@gmail.com","threadId":"6726","inReplyTo":null,"subject":"[PATCH] qgit: Default the log window to wider than the file list and set monospaced font","fromName":"Andy Parkins","fromEmail":"andyparkins@gmail.com","sentAt":"2007-02-07T21:38:36Z","receivedAt":"2007-02-07T21:38:36Z","isPatch":true,"sender":{"key":"andyparkins@gmail.com","avatar":null},"body":"The log window and changed files list would start at equal sizes.  This\npatch gives them each a horizontal stretch factor making them have a 3:1\nratio.\n\nThe font for the log viewer is set to \"Monospace\", but this should\nreally be done in software and given a config setting (perhaps use the\npatch view font)\n\nSigned-off-by: Andy Parkins <andyparkins@gmail.com>\n---\n src/revsview.ui |   31 ++++++++++++++++++++++++++-----\n 1 files changed, 26 insertions(+), 5 deletions(-)\n\ndiff --git a/src/revsview.ui b/src/revsview.ui\nindex 3fb02ee..ad16200 100644\n--- a/src/revsview.ui\n+++ b/src/revsview.ui\n@@ -55,11 +55,32 @@\n        <enum>Qt::Horizontal</enum>\n       </property>\n       <widget class=\"RevDesc\" name=\"textBrowserDesc\" >\n+       <property name=\"sizePolicy\" >\n+        <sizepolicy>\n+         <hsizetype>5</hsizetype>\n+         <vsizetype>13</vsizetype>\n+         <horstretch>3</horstretch>\n+         <verstretch>0</verstretch>\n+        </sizepolicy>\n+       </property>\n+       <property name=\"font\" >\n+        <font>\n+         <family>Monospace</family>\n+        </font>\n+       </property>\n        <property name=\"lineWrapMode\" >\n         <enum>QTextEdit::NoWrap</enum>\n        </property>\n       </widget>\n       <widget class=\"FileList\" name=\"fileList\" >\n+       <property name=\"sizePolicy\" >\n+        <sizepolicy>\n+         <hsizetype>5</hsizetype>\n+         <vsizetype>13</vsizetype>\n+         <horstretch>1</horstretch>\n+         <verstretch>0</verstretch>\n+        </sizepolicy>\n+       </property>\n        <property name=\"contextMenuPolicy\" >\n         <enum>Qt::CustomContextMenu</enum>\n        </property>\n@@ -72,16 +93,16 @@\n  <layoutdefault spacing=\"6\" margin=\"11\" />\n  <customwidgets>\n   <customwidget>\n-   <class>ListView</class>\n-   <extends>QTreeView</extends>\n-   <header>listview.h</header>\n-  </customwidget>\n-  <customwidget>\n    <class>FileList</class>\n    <extends>QListWidget</extends>\n    <header>filelist.h</header>\n   </customwidget>\n   <customwidget>\n+   <class>ListView</class>\n+   <extends>QTreeView</extends>\n+   <header>listview.h</header>\n+  </customwidget>\n+  <customwidget>\n    <class>RevDesc</class>\n    <extends>QTextBrowser</extends>\n    <header>revdesc.h</header>\n-- \n1.5.0.rc1.gf4b6c\n"},{"id":"33930","messageId":"e5bfff550702080039l236b1f69o6765b8e2dff3e3c4@mail.gmail.com","threadId":"6726","inReplyTo":"200702072138.36787.andyparkins@gmail.com","subject":"Re: [PATCH] qgit: Default the log window to wider than the file list and set monospaced font","fromName":"Marco Costalba","fromEmail":"mcostalba@gmail.com","sentAt":"2007-02-08T08:39:50Z","receivedAt":"2007-02-08T08:39:50Z","isPatch":true,"sender":{"key":"mcostalba@gmail.com","avatar":null},"body":">\n> The font for the log viewer is set to \"Monospace\", but this should\n> really be done in software and given a config setting (perhaps use the\n> patch view font)\n>\n\nThanks Andy for patches, I will apply as soon as I have access to my\nbox, probably this evening.\n\nRegarding \"Monospace\" it should be changeable with Settings menu and\nshould apply _only_ to fixed space font viewers, in our case only\npatch viewer and file content viewer.\n\nOther fonts used in qgit are derived from system wide settings and are\nchangeable with qtconfig tool.\n\nIf you see Monospace applied to list view or any other widget apart\nfrom the above mentioned ones then it's a bug.\n\nThanks\nMarco\n"},{"id":"33932","messageId":"eqerfk$tr7$1@sea.gmane.org","threadId":"6726","inReplyTo":"e5bfff550702080039l236b1f69o6765b8e2dff3e3c4@mail.gmail.com","subject":"Re: [PATCH] qgit: Default the log window to wider than the file list and set monospaced font","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2007-02-08T09:46:59Z","receivedAt":"2007-02-08T09:46:59Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Marco Costalba wrote:\n\n>> The font for the log viewer is set to \"Monospace\", but this should\n>> really be done in software and given a config setting (perhaps use the\n>> patch view font)\n>>\n> \n> Thanks Andy for patches, I will apply as soon as I have access to my\n> box, probably this evening.\n> \n> Regarding \"Monospace\" it should be changeable with Settings menu and\n> should apply _only_ to fixed space font viewers, in our case only\n> patch viewer and file content viewer.\n\nShouldn't commit message be also in fixed-width (monospace) font?\nSometimes there is ASCII-art used (mainly for diagrams) in commit\nmessages; gitweb uses monospace font for commit messages.\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"},{"id":"33934","messageId":"200702081020.44202.andyparkins@gmail.com","threadId":"6726","inReplyTo":"e5bfff550702080039l236b1f69o6765b8e2dff3e3c4@mail.gmail.com","subject":"Re: [PATCH] qgit: Default the log window to wider than the file list and set monospaced font","fromName":"Andy Parkins","fromEmail":"andyparkins@gmail.com","sentAt":"2007-02-08T10:20:41Z","receivedAt":"2007-02-08T10:20:41Z","isPatch":true,"sender":{"key":"andyparkins@gmail.com","avatar":null},"body":"On Thursday 2007 February 08 08:39, Marco Costalba wrote:\n\n> Regarding \"Monospace\" it should be changeable with Settings menu and\n> should apply _only_ to fixed space font viewers, in our case only\n> patch viewer and file content viewer.\n\nThe log message was the one I changed.  Having the log message in variable \nwidth breaks any ascii-art in the message.\n\nI completely agree about pulling the setting from the config.  I'll see if I \ncan find that and post a further patch.\n\n> If you see Monospace applied to list view or any other widget apart\n> from the above mentioned ones then it's a bug.\n\nTrue.  I used \"Monospaced\" as the font as that defaults to the system-wide \nmonospaced font; however it's pretty poor form.  I raise my hand - shoot \nme :-)  As I say, I'll try and do better and send a new patch.\n\n\nAndy\n-- \nDr Andy Parkins, M Eng (hons), MIEE\nandyparkins@gmail.com\n"},{"id":"33935","messageId":"200702081022.26423.andyparkins@gmail.com","threadId":"6726","inReplyTo":"e5bfff550702080039l236b1f69o6765b8e2dff3e3c4@mail.gmail.com","subject":"Re: [PATCH] qgit: Default the log window to wider than the file list and set monospaced font","fromName":"Andy Parkins","fromEmail":"andyparkins@gmail.com","sentAt":"2007-02-08T10:22:24Z","receivedAt":"2007-02-08T10:22:24Z","isPatch":true,"sender":{"key":"andyparkins@gmail.com","avatar":null},"body":"On Thursday 2007 February 08 08:39, Marco Costalba wrote:\n\n> Regarding \"Monospace\" it should be changeable with Settings menu and\n> should apply _only_ to fixed space font viewers, in our case only\n> patch viewer and file content viewer.\n\nIncidentally, regarding monospaced fonts and Qt.  While developing these \npatches I noticed that Qt::convertFromPlainText() swallows leading white \nspace from the lines.  I dropped it and used a style sheet to set the font \ninstead; but in case you use it elsewhere I thought you might be interested.\n\n\nAndy\n\n-- \nDr Andy Parkins, M Eng (hons), MIEE\nandyparkins@gmail.com\n"},{"id":"33953","messageId":"e5bfff550702081106u1e02f371g3a91c7462ff5e442@mail.gmail.com","threadId":"6726","inReplyTo":"200702081020.44202.andyparkins@gmail.com","subject":"Re: [PATCH] qgit: Default the log window to wider than the file list and set monospaced font","fromName":"Marco Costalba","fromEmail":"mcostalba@gmail.com","sentAt":"2007-02-08T19:06:51Z","receivedAt":"2007-02-08T19:06:51Z","isPatch":true,"sender":{"key":"mcostalba@gmail.com","avatar":null},"body":"On 2/8/07, Andy Parkins <andyparkins@gmail.com> wrote:\n> On Thursday 2007 February 08 08:39, Marco Costalba wrote:\n>\n> > Regarding \"Monospace\" it should be changeable with Settings menu and\n> > should apply _only_ to fixed space font viewers, in our case only\n> > patch viewer and file content viewer.\n>\n> The log message was the one I changed.  Having the log message in variable\n> width breaks any ascii-art in the message.\n>\n> I completely agree about pulling the setting from the config.  I'll see if I\n> can find that and post a further patch.\n>\n> > If you see Monospace applied to list view or any other widget apart\n> > from the above mentioned ones then it's a bug.\n>\n> True.  I used \"Monospaced\" as the font as that defaults to the system-wide\n> monospaced font; however it's pretty poor form.  I raise my hand - shoot\n> me :-)  As I say, I'll try and do better and send a new patch.\n>\n>\n\nI have applied and pushed all your patches. BTW you are referring to\nqgit4 at Pasky http://repo.or.cz/ site, not the stable qgit in\nkernel.org repo!\n\nI didn't got it unti I tried to apply the patches :-)\n\nHint: Regarding application 'fixed width' font please refer to\nTYPE_WRITER_FONT variable defined in common.h in your new patch,  this\nis where user choosen font is stored.\n\nNot-fixed-width font is set with qtconfig tool.\n\nMarco\n\nP.S: Yes, I have noted this Qt::convertFromPlainText() misbehaviour,\nbut I don't know if are the spaces that are not escaped correctly by\nthe function or the QTextEdit rendering engine that eats the (escaped)\nspaces anyway.\n\nP.P.S: Give a try to Bitstream Vera Sans Mono as fixed width font,\nit's muuuuuch better then Monospace IMHO ;-)\n"},{"id":"33955","messageId":"200702081913.09952.andyparkins@gmail.com","threadId":"6726","inReplyTo":"e5bfff550702081106u1e02f371g3a91c7462ff5e442@mail.gmail.com","subject":"Re: [PATCH] qgit: Default the log window to wider than the file list and set monospaced font","fromName":"Andy Parkins","fromEmail":"andyparkins@gmail.com","sentAt":"2007-02-08T19:12:56Z","receivedAt":"2007-02-08T19:12:56Z","isPatch":true,"sender":{"key":"andyparkins@gmail.com","avatar":null},"body":"On Thursday 2007, February 08 19:06, Marco Costalba wrote:\n\n> I have applied and pushed all your patches. BTW you are referring to\n> qgit4 at Pasky http://repo.or.cz/ site, not the stable qgit in\n> kernel.org repo!\n\nMy apologies - that was the first one I found when I typed qgit4 \nrepository.\n\n> Hint: Regarding application 'fixed width' font please refer to\n> TYPE_WRITER_FONT variable defined in common.h in your new patch, \n> this is where user choosen font is stored.\n\nExcellent; I'll use that then.  More patches coming soon.  I hope the \ngit list is the right place for these patches.\n\n> P.S: Yes, I have noted this Qt::convertFromPlainText() misbehaviour,\n> but I don't know if are the spaces that are not escaped correctly by\n> the function or the QTextEdit rendering engine that eats the\n> (escaped) spaces anyway.\n\nI definitely think this is a bug in Qt; QTextBrowser will show the \nspaces in HTML mode if <pre> is used, so I don't think it's a fault in \nQTextBrowser.\n\n> P.P.S: Give a try to Bitstream Vera Sans Mono as fixed width font,\n> it's muuuuuch better then Monospace IMHO ;-)\n\nNo need to persuade me; that's what I already use.  Monospace isn't a \nfont on most systems - it's an alias to the default monospaced font - \nand for me it's aliased to Bitstream Mono :-)\n\nIt seems to be done by the following in /etc/fonts/\n\n    <alias>\n        <family>Bitstream Vera Sans Mono</family>\n        <family>DejaVu Sans Mono</family>\n        <family>Courier</family>\n        <family>Courier New</family>\n        <family>Andale Mono</family>\n        <family>Luxi Mono</family>\n        <family>Cumberland AMT</family>\n        <family>Nimbus Mono L</family>\n        <family>NSimSun</family>\n        <family>FreeMono</family>\n        <default><family>monospace</family></default>\n    </alias>\n\nIn case that helps you.\n\n\nAndy\n-- \nDr Andrew Parkins, M Eng (Hons), AMIEE\nandyparkins@gmail.com\n"},{"id":"33957","messageId":"e5bfff550702081129x6c94eaa4p40cf09e70c4e09cd@mail.gmail.com","threadId":"6726","inReplyTo":"200702081913.09952.andyparkins@gmail.com","subject":"Re: [PATCH] qgit: Default the log window to wider than the file list and set monospaced font","fromName":"Marco Costalba","fromEmail":"mcostalba@gmail.com","sentAt":"2007-02-08T19:29:42Z","receivedAt":"2007-02-08T19:29:42Z","isPatch":true,"sender":{"key":"mcostalba@gmail.com","avatar":null},"body":"On 2/8/07, Andy Parkins <andyparkins@gmail.com> wrote:\n> On Thursday 2007, February 08 19:06, Marco Costalba wrote:\n>\n> > I have applied and pushed all your patches. BTW you are referring to\n> > qgit4 at Pasky http://repo.or.cz/ site, not the stable qgit in\n> > kernel.org repo!\n>\n> My apologies - that was the first one I found when I typed qgit4\n> repository.\n>\n\nNo problem, stable qgit has less layout problems, probably the only\npatch I will back port is the fixed font in log viewer.\n\nqgit4 seems to have more layout weirdeness also in patch and file\ntabs. I didn't fixed it until because I'm still wondering if it is\nenough fixing the layout using stretch factors or bite the bullet and\nimplement a geometry persistent saving with QSettings (Qt4 is quite\npowerful in this regard), of course saved geometry should work both\nwith maximized and not-maximized window, so perhaps saving\npanes/splitters factors is better then save absolute value at least\nfor 'internal' widget, and use absolute window geometry only for qgit\nmain window.\n\n>\n> > P.S: Yes, I have noted this Qt::convertFromPlainText() misbehaviour,\n> > but I don't know if are the spaces that are not escaped correctly by\n> > the function or the QTextEdit rendering engine that eats the\n> > (escaped) spaces anyway.\n>\n> I definitely think this is a bug in Qt; QTextBrowser will show the\n> spaces in HTML mode if <pre> is used, so I don't think it's a fault in\n> QTextBrowser.\n>\n\nPlease add dbg(text) line in git.cpp, just below\nQt::convertFromPlainText(text) call\n\n\t\ttext.append(\"\\n\\n    \" + colorMatch(c->shortLog(), shortLogRE) +\n\t\t            '\\n' + colorMatch(c->longLog(), longLogRE));\n\t}\n\ttext = Qt::convertFromPlainText(text);\ndbg(text);\n\t// highlight SHA's\n\t//\n\t// added to commit logs, we avoid to call git rev-parse for a\npossible abbreviated\n\t// sha if there isn't a leading trailing space or an open parenthesis and,\n\n\n\nThis will print the converted text as plain string, as you can see\nthere is 'something' instead of spaces but I cannot guess what.\n\n> > P.P.S: Give a try to Bitstream Vera Sans Mono as fixed width font,\n> > it's muuuuuch better then Monospace IMHO ;-)\n>\n> No need to persuade me; that's what I already use.  Monospace isn't a\n> font on most systems - it's an alias to the default monospaced font -\n> and for me it's aliased to Bitstream Mono :-)\n>\n> It seems to be done by the following in /etc/fonts/\n>\n>     <alias>\n>         <family>Bitstream Vera Sans Mono</family>\n>         <family>DejaVu Sans Mono</family>\n>         <family>Courier</family>\n>         <family>Courier New</family>\n>         <family>Andale Mono</family>\n>         <family>Luxi Mono</family>\n>         <family>Cumberland AMT</family>\n>         <family>Nimbus Mono L</family>\n>         <family>NSimSun</family>\n>         <family>FreeMono</family>\n>         <default><family>monospace</family></default>\n>     </alias>\n>\n> In case that helps you.\n>\n\nThanks\n"},{"id":"33962","messageId":"e5bfff550702081151q5536b547p34728cafa9a7dee@mail.gmail.com","threadId":"6726","inReplyTo":"e5bfff550702081129x6c94eaa4p40cf09e70c4e09cd@mail.gmail.com","subject":"Re: [PATCH] qgit: Default the log window to wider than the file list and set monospaced font","fromName":"Marco Costalba","fromEmail":"mcostalba@gmail.com","sentAt":"2007-02-08T19:51:43Z","receivedAt":"2007-02-08T19:51:43Z","isPatch":true,"sender":{"key":"mcostalba@gmail.com","avatar":null},"body":"On 2/8/07, Marco Costalba <mcostalba@gmail.com> wrote:\n> On 2/8/07, Andy Parkins <andyparkins@gmail.com> wrote:\n> > On Thursday 2007, February 08 19:06, Marco Costalba wrote:\n> >\n> > > I have applied and pushed all your patches. BTW you are referring to\n> > > qgit4 at Pasky http://repo.or.cz/ site, not the stable qgit in\n> > > kernel.org repo!\n> >\n> > My apologies - that was the first one I found when I typed qgit4\n> > repository.\n> >\n>\n> No problem, stable qgit has less layout problems, probably the only\n> patch I will back port is the fixed font in log viewer.\n>\n\nAnd also the short log resize mode one, sorry, I forget to mention.\n\nBTW it's a little bit funny when you try to resize with mouse the\nauthor column and see short log column moving instead :-)\n\n\nMarco\n"},{"id":"33981","messageId":"200702082158.56463.andyparkins@gmail.com","threadId":"6726","inReplyTo":"e5bfff550702081151q5536b547p34728cafa9a7dee@mail.gmail.com","subject":"Re: [PATCH] qgit: Default the log window to wider than the file list and set monospaced font","fromName":"Andy Parkins","fromEmail":"andyparkins@gmail.com","sentAt":"2007-02-08T21:58:55Z","receivedAt":"2007-02-08T21:58:55Z","isPatch":true,"sender":{"key":"andyparkins@gmail.com","avatar":null},"body":"On Thursday 2007, February 08 19:51, Marco Costalba wrote:\n\n> BTW it's a little bit funny when you try to resize with mouse the\n> author column and see short log column moving instead :-)\n\nYeah, I'm not entirely sure I like it.  What I really want, but Qt won't \ndo it is\n * all columns resizable\n * default date width to fit contents\n * columns always take up whole width of view, never introducing a \n   horizontal scrollbar\n\nIf you want to drop it, I won't be upset.  It is very disconcerting, the \nonly thing in that patches favour is that the view starts out basically \ncorrect.\n\n\nAndy\n\n-- \nDr Andrew Parkins, M Eng (Hons), AMIEE\nandyparkins@gmail.com\n"},{"id":"33997","messageId":"200702082304.17775.andyparkins@gmail.com","threadId":"6726","inReplyTo":"e5bfff550702081129x6c94eaa4p40cf09e70c4e09cd@mail.gmail.com","subject":"Re: [PATCH] qgit: Default the log window to wider than the file list and set monospaced font","fromName":"Andy Parkins","fromEmail":"andyparkins@gmail.com","sentAt":"2007-02-08T23:04:16Z","receivedAt":"2007-02-08T23:04:16Z","isPatch":true,"sender":{"key":"andyparkins@gmail.com","avatar":null},"body":"On Thursday 2007, February 08 19:29, Marco Costalba wrote:\n\n> qgit4 seems to have more layout weirdeness also in patch and file\n> tabs. I didn't fixed it until because I'm still wondering if it is\n> enough fixing the layout using stretch factors or bite the bullet and\n> implement a geometry persistent saving with QSettings (Qt4 is quite\n> powerful in this regard), of course saved geometry should work both\n> with maximized and not-maximized window, so perhaps saving\n> panes/splitters factors is better then save absolute value at least\n> for 'internal' widget, and use absolute window geometry only for qgit\n> main window.\n\nSaving factors is definitely the way to go; and then you may as well use \nthe stretch factors as that's all they are in essence.  Setting a 3:1 \nstretch ratio would be the same as setting 75% and 25% factors.  The \nideal solution is really to set one of them based on the contents, \nprobably the file list; but that's difficult to do as you don't want \nexcessively deep trees to make the thing stupidly wide.  In the end, I \nthink making layouts that work in all situations in near impossible, so \nI usually just go for stretch factors that make it look reasonable in \nmost situations.\n\n> Please add dbg(text) line in git.cpp, just below\n> Qt::convertFromPlainText(text) call\n>\n> \t\ttext.append(\"\\n\\n    \" + colorMatch(c->shortLog(), shortLogRE) +\n> \t\t            '\\n' + colorMatch(c->longLog(), longLogRE));\n> \t}\n> \ttext = Qt::convertFromPlainText(text);\n> dbg(text);\n\nGood idea.  I tried it and the problem would seem to be that \nconvertFromPlainText() doesn't do the conversion as completely as it \nshould.  The spaces are being left as spaces, but of course when those \nget passed to the HTML-ish parser of QTextBrowser, the spaces are being \nswallowed - as with all HTML parsers.  I believe it should actually be \nreplacing all the spaces with \"&nbsp;\" to /really/ do the plain->HTML \nconversion.  However, the point is moot now anyway because I've dropped \nit in favour of a div with \"white-space: pre\" set, which does the job.\n\n\nAndy\n-- \nDr Andrew Parkins, M Eng (Hons), AMIEE\nandyparkins@gmail.com\n"},{"id":"34007","messageId":"200702082331.13095.andyparkins@gmail.com","threadId":"6726","inReplyTo":"200702082158.56463.andyparkins@gmail.com","subject":"[PATCH] qgit4: Add a header and set the font family appropriately to the log message","fromName":"Andy Parkins","fromEmail":"andyparkins@gmail.com","sentAt":"2007-02-08T23:31:12Z","receivedAt":"2007-02-08T23:31:12Z","isPatch":true,"sender":{"key":"andyparkins@gmail.com","avatar":null},"body":"I've moved the short log to be the first header row, and highlighted it\nmore strongly.  I've also set the font family of the log div based on\nTYPE_WRITER_FONT as suggested by Marco.\n\nSigned-off-by: Andy Parkins <andyparkins@gmail.com>\n---\n src/git.cpp |   23 ++++++++++++++++-------\n 1 files changed, 16 insertions(+), 7 deletions(-)\n\ndiff --git a/src/git.cpp b/src/git.cpp\nindex 1fa4479..a0873b6 100644\n--- a/src/git.cpp\n+++ b/src/git.cpp\n@@ -979,15 +979,25 @@ const QString Git::getDesc(SCRef sha, QRegExp& shortLogRE, QRegExp& longLogRE) {\n \t\ttext = Qt::convertFromPlainText( c->longLog() );\n \telse {\n \t\ttext = \"<html><head><style type=\\\"text/css\\\">\"\n+\t\t\t\t\"tr.head { background-color: #a0a0e0 }\\n\"\n \t\t\t\t\"td.h { font-weight: bold; }\\n\"\n \t\t\t\t\"table { background-color: #e0e0f0; }\\n\"\n-\t\t\t\t\"div.l { white-space: pre; font-family: Monospace; }\\n\"\n-\t\t\t\t\"</style></head><body>\\n\";\n-\t\ttext.append( \"<div class='t'><table>\\n\" );\n-\t\ttext.append( QString(\"<tr><td class='h'>Author</th> <td>\" + c->author()\n-\t\t\t\t\t+ \"</td></tr>\\n<tr><td class='h'>Date</th><td>\") );\n+\t\t\t\t\"span.h { font-weight: bold; font-size: medium; }\\n\"\n+\t\t\t\t\"div.l { white-space: pre; font-family: \";\n+\t\ttext.append( TYPE_WRITER_FONT.family() );\n+\t\ttext.append( \"; }\\n\"\n+\t\t\t\t\"</style></head><body>\\n\" );\n+\n+\t\ttext.append( \"<div class='t'><table border=0 cellspacing=0 cellpadding=2>\\n\" );\n+\t\ttext.append(\"<tr class='head'> <th colspan=2> <span class='h'>\" );\n+\t\ttext.append(colorMatch(c->shortLog(), shortLogRE));\n+\t\ttext.append(\"</span></th></tr>\\n\");\n+\n+\t\ttext.append( QString(\"<tr><td class='h'>Author</td> <td>\" + c->author()\n+\t\t\t\t\t+ \"</td></tr>\\n<tr><td class='h'>Date</td><td>\") );\n \t\ttext.append(getLocalDate(c->authorDate()));\n \t\ttext.append(\"</td></tr>\\n\");\n+\n \t\tif (!c->isUnApplied && !c->isApplied) {\n \t\t\ttext.append(\"<tr><td class='h'>Parent</td> <td>\").append(c->parents()\n \t\t\t\t\t.join(\"</td></tr>\\n<tr><td class='h'>Parent</td> <td>\"));\n@@ -1016,8 +1026,7 @@ const QString Git::getDesc(SCRef sha, QRegExp& shortLogRE, QRegExp& longLogRE) {\n \t\t\ttext.append(\"</td></tr>\\n\");\n \t\t}\n \t\ttext.append( \"</table></div>\\n\" );\n-\t\ttext.append(\"\\n\\n<div class='l'>    \" + colorMatch(c->shortLog(), shortLogRE) +\n-\t\t            '\\n' + colorMatch(c->longLog(), longLogRE));\n+\t\ttext.append(\"\\n\\n<div class='l'>\" + colorMatch(c->longLog(), longLogRE));\n \t\ttext.append( \"</div></body></html>\\n\" );\n \t}\n //\ttext = Qt::convertFromPlainText(text);\n-- \n1.5.0.rc1.gf4b6c\n"},{"id":"34005","messageId":"200702082331.28249.andyparkins@gmail.com","threadId":"6726","inReplyTo":"200702082158.56463.andyparkins@gmail.com","subject":"[PATCH] qgit4: Removed the monospace font override from the log viewer box","fromName":"Andy Parkins","fromEmail":"andyparkins@gmail.com","sentAt":"2007-02-08T23:31:28Z","receivedAt":"2007-02-08T23:31:28Z","isPatch":true,"sender":{"key":"andyparkins@gmail.com","avatar":null},"body":"The font is now set in software and is made up of both variable and\nmonospaced fonts, therefore this override is no longer appropriate.\n\nSigned-off-by: Andy Parkins <andyparkins@gmail.com>\n---\n src/revsview.ui |    5 -----\n 1 files changed, 0 insertions(+), 5 deletions(-)\n\ndiff --git a/src/revsview.ui b/src/revsview.ui\nindex ad16200..870110e 100644\n--- a/src/revsview.ui\n+++ b/src/revsview.ui\n@@ -63,11 +63,6 @@\n          <verstretch>0</verstretch>\n         </sizepolicy>\n        </property>\n-       <property name=\"font\" >\n-        <font>\n-         <family>Monospace</family>\n-        </font>\n-       </property>\n        <property name=\"lineWrapMode\" >\n         <enum>QTextEdit::NoWrap</enum>\n        </property>\n-- \n1.5.0.rc1.gf4b6c\n"},{"id":"34006","messageId":"200702082331.43424.andyparkins@gmail.com","threadId":"6726","inReplyTo":"200702082158.56463.andyparkins@gmail.com","subject":"[PATCH] qgit4: Set a 5:1 stretch ratio on the left and right halves of the patch viewer","fromName":"Andy Parkins","fromEmail":"andyparkins@gmail.com","sentAt":"2007-02-08T23:31:43Z","receivedAt":"2007-02-08T23:31:43Z","isPatch":true,"sender":{"key":"andyparkins@gmail.com","avatar":null},"body":"This stops the file list taking up half the screen by default.  The\nexact ratio is probably not to important, as long as it's not 1:1.\n\nSigned-off-by: Andy Parkins <andyparkins@gmail.com>\n---\n src/patchview.ui |   16 ++++++++++++++++\n 1 files changed, 16 insertions(+), 0 deletions(-)\n\ndiff --git a/src/patchview.ui b/src/patchview.ui\nindex bd723e8..4537dd7 100644\n--- a/src/patchview.ui\n+++ b/src/patchview.ui\n@@ -132,6 +132,14 @@\n         <enum>Qt::Horizontal</enum>\n        </property>\n        <widget class=\"QSplitter\" name=\"splitter\" >\n+        <property name=\"sizePolicy\" >\n+         <sizepolicy>\n+          <hsizetype>5</hsizetype>\n+          <vsizetype>7</vsizetype>\n+          <horstretch>5</horstretch>\n+          <verstretch>0</verstretch>\n+         </sizepolicy>\n+        </property>\n         <property name=\"orientation\" >\n          <enum>Qt::Vertical</enum>\n         </property>\n@@ -156,6 +164,14 @@\n         </widget>\n        </widget>\n        <widget class=\"FileList\" name=\"fileList\" >\n+        <property name=\"sizePolicy\" >\n+         <sizepolicy>\n+          <hsizetype>13</hsizetype>\n+          <vsizetype>13</vsizetype>\n+          <horstretch>1</horstretch>\n+          <verstretch>0</verstretch>\n+         </sizepolicy>\n+        </property>\n         <property name=\"contextMenuPolicy\" >\n          <enum>Qt::CustomContextMenu</enum>\n         </property>\n-- \n1.5.0.rc1.gf4b6c\n"},{"id":"34010","messageId":"20070208234153.GB1556@spearce.org","threadId":"6726","inReplyTo":"200702082331.13095.andyparkins@gmail.com","subject":"Re: [PATCH] qgit4: Add a header and set the font family appropriately to the log message","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2007-02-08T23:41:53Z","receivedAt":"2007-02-08T23:41:53Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"In case you did not already know, --numbered is a wonderful option\nto git-format-patch.  It automatically numbers the commits by placing\na sequence into the subject header (e.g. [PATCH 1/3]), making it\neasier for everyone to know how many patches are in your series.\n\n-- \nShawn.\n"},{"id":"34013","messageId":"7vk5ysw6a3.fsf@assigned-by-dhcp.cox.net","threadId":"6726","inReplyTo":"20070208234153.GB1556@spearce.org","subject":"Re: [PATCH] qgit4: Add a header and set the font family appropriately to the log message","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-02-08T23:58:44Z","receivedAt":"2007-02-08T23:58:44Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Shawn O. Pearce\" <spearce@spearce.org> writes:\n\n> In case you did not already know, --numbered is a wonderful option\n> to git-format-patch.  It automatically numbers the commits by placing\n> a sequence into the subject header (e.g. [PATCH 1/3]), making it\n> easier for everyone to know how many patches are in your series.\n\nThis came up before, but when you have more than 9 in your\nseries, we _could_ do [PATCH 01/12] ... [PATCH 12/12] to line\nthem up in e-mail client of the recipients better.  Currently I\nthink we do [PATCH 1/12] ... [PATCH 12/12].\n"},{"id":"34022","messageId":"Pine.LNX.4.64.0702081623460.8424@woody.linux-foundation.org","threadId":"6726","inReplyTo":"7vk5ysw6a3.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] qgit4: Add a header and set the font family appropriately to the log message","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2007-02-09T00:29:17Z","receivedAt":"2007-02-09T00:29:17Z","isPatch":true,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Thu, 8 Feb 2007, Junio C Hamano wrote:\n> \n> This came up before, but when you have more than 9 in your\n> series, we _could_ do [PATCH 01/12] ... [PATCH 12/12] to line\n> them up in e-mail client of the recipients better.\n\nNot just \"line them up\". It's more than just a visual thing.\n\nSo I long ago I asked Andrew to do that for me in his scripts, because \nwhen he sends me 150+ patches in one go, and I want to sort them to be in \norder, I can't depend on arrival order (because it won't be reliable) and \nI can't necessarily depend on date order (because he can send more than \none patch a second), so what do I do? I sort by subject.\n\nBut I don't know of a _single_ email reader (and certainly not the one I \nuse) that can \"sort numerically by subject, using field #2\". So it's a lot \neasier if the numbering is sorted _alphabetically_ rather than \nnumerically.\n\nOtherwise I tend to see things like\n\n\t[PATCH 1/89]\n\t[PATCH 10/89]\n\t[PATCH 11/89]\n\t...\n\t[PATCH 2/89]\n\t[PATCH 20/89]\n\t[PATCH 21/89]\n\t...\n\n(note that this was mostly a problem just when syncing with Andrew: if the \npatch series is just in the teens or something, it may not sort easily, \nbut you can just pick out the individual emails in order. When you have \nhundreds of patches, suddenly you realize that computers sorting them for \nyou is really convenient).\n\n\t\t\tLinus\n"},{"id":"34023","messageId":"Pine.LNX.4.63.0702090142100.22628@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"6726","inReplyTo":"Pine.LNX.4.64.0702081623460.8424@woody.linux-foundation.org","subject":"[PATCH] format-patch -n: make sorting easier by padding number","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-02-09T00:43:54Z","receivedAt":"2007-02-09T00:43:54Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"\nNow, when format-patch outputs more than 9 patches, the numbers\nare padded accordingly. Example:\n\n\t[PATCH 009/167] The 9th patch of a series of 167\n\nSigned-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>\n\n---\n\n\tOn Thu, 8 Feb 2007, Linus Torvalds wrote:\n\t\n\t> On Thu, 8 Feb 2007, Junio C Hamano wrote:\n\t> > \n\t> > This came up before, but when you have more than 9 in your\n\t> > series, we _could_ do [PATCH 01/12] ... [PATCH 12/12] to line\n\t> > them up in e-mail client of the recipients better.\n\t> \n\t> Not just \"line them up\". It's more than just a visual thing.\n\n\tHow about this?\n\n\tYes, it calculates the width over and over again, but it's not\n\tlike it's a really performance critical part.\n\n log-tree.c |   13 ++++++++++++-\n 1 files changed, 12 insertions(+), 1 deletions(-)\n\ndiff --git a/log-tree.c b/log-tree.c\nindex 85acd66..89c29e2 100644\n--- a/log-tree.c\n+++ b/log-tree.c\n@@ -102,6 +102,16 @@ static int append_signoff(char *buf, int buf_sz, int at, const char *signoff)\n \treturn at;\n }\n \n+static unsigned int log10(unsigned int number)\n+{\n+\tunsigned int i = 10, result = 1;\n+\twhile (i < number) {\n+\t\ti *= 10;\n+\t\tresult++;\n+\t}\n+\treturn result;\n+}\n+\n void show_log(struct rev_info *opt, const char *sep)\n {\n \tstatic char this_header[16384];\n@@ -155,7 +165,8 @@ void show_log(struct rev_info *opt, const char *sep)\n \t\tif (opt->total > 0) {\n \t\t\tstatic char buffer[64];\n \t\t\tsnprintf(buffer, sizeof(buffer),\n-\t\t\t\t\t\"Subject: [PATCH %d/%d] \",\n+\t\t\t\t\t\"Subject: [PATCH %0*d/%d] \",\n+\t\t\t\t\tlog10(opt->total),\n \t\t\t\t\topt->nr, opt->total);\n \t\t\tsubject = buffer;\n \t\t} else if (opt->total == 0)\n"},{"id":"34025","messageId":"Pine.LNX.4.63.0702090147050.22628@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"6726","inReplyTo":"Pine.LNX.4.63.0702090142100.22628@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: [PATCH] format-patch -n: make sorting easier by padding number","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-02-09T00:47:53Z","receivedAt":"2007-02-09T00:47:53Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Fri, 9 Feb 2007, Johannes Schindelin wrote:\n\n> +static unsigned int log10(unsigned int number)\n> +{\n> +\tunsigned int i = 10, result = 1;\n> +\twhile (i < number) {\n\nD'oh. Make that \"<=\", please.\n\n> +\t\ti *= 10;\n> +\t\tresult++;\n> +\t}\n> +\treturn result;\n> +}\n\nCiao,\nDscho\n"},{"id":"34036","messageId":"e5bfff550702082144h7ae6de5ai23853f43fb27f345@mail.gmail.com","threadId":"6726","inReplyTo":"200702082331.13095.andyparkins@gmail.com","subject":"Re: [PATCH] qgit4: Add a header and set the font family appropriately to the log message","fromName":"Marco Costalba","fromEmail":"mcostalba@gmail.com","sentAt":"2007-02-09T05:44:35Z","receivedAt":"2007-02-09T05:44:35Z","isPatch":true,"sender":{"key":"mcostalba@gmail.com","avatar":null},"body":"On 2/9/07, Andy Parkins <andyparkins@gmail.com> wrote:\n> I've moved the short log to be the first header row, and highlighted it\n> more strongly.  I've also set the font family of the log div based on\n> TYPE_WRITER_FONT as suggested by Marco.\n>\n> Signed-off-by: Andy Parkins <andyparkins@gmail.com>\n> ---\n\nThis patch does not apply on my qgit4 repo, it seems it is on the top\nof a your not published previous patch. Could you please rebase\nagainst current public qgi4 repo (git://repo.or.cz/qgit4.git)\n\nOther two patches has been applied and pushed.\n\nThanks\nMarco\n"},{"id":"34049","messageId":"20070209091923.GT6560@mellanox.co.il","threadId":"6726","inReplyTo":"7vk5ysw6a3.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] qgit4: Add a header and set the font family appropriately to the log message","fromName":"Michael S. Tsirkin","fromEmail":"mst@mellanox.co.il","sentAt":"2007-02-09T09:19:23Z","receivedAt":"2007-02-09T09:19:23Z","isPatch":true,"sender":{"key":"mst@kernel.org","avatar":null},"body":"> Quoting Junio C Hamano <junkio@cox.net>:\n> Subject: Re: [PATCH] qgit4: Add a header and set the font family appropriately to the log message\n> \n> \"Shawn O. Pearce\" <spearce@spearce.org> writes:\n> \n> > In case you did not already know, --numbered is a wonderful option\n> > to git-format-patch.  It automatically numbers the commits by placing\n> > a sequence into the subject header (e.g. [PATCH 1/3]), making it\n> > easier for everyone to know how many patches are in your series.\n> \n> This came up before, but when you have more than 9 in your\n> series, we _could_ do [PATCH 01/12] ... [PATCH 12/12] to line\n> them up in e-mail client of the recipients better.  Currently I\n> think we do [PATCH 1/12] ... [PATCH 12/12].\n\nLike this (lightly tested)?\n\nSigned-off-by: Michael S. Tsirkin <mst@mellanox.co.il>\n\n---\n\ndiff --git a/log-tree.c b/log-tree.c\nindex 85acd66..6f6aa5a 100644\n--- a/log-tree.c\n+++ b/log-tree.c\n@@ -102,6 +102,14 @@ static int append_signoff(char *buf, int buf_sz, int at, const char *signoff)\n \treturn at;\n }\n \n+static int get_width(unsigned nr)\n+{\n+\tint i;\n+        for (i = 1; nr > 10; ++i)\n+\t\tnr = nr / 10;\n+\treturn i;\n+}\n+\n void show_log(struct rev_info *opt, const char *sep)\n {\n \tstatic char this_header[16384];\n@@ -155,8 +163,8 @@ void show_log(struct rev_info *opt, const char *sep)\n \t\tif (opt->total > 0) {\n \t\t\tstatic char buffer[64];\n \t\t\tsnprintf(buffer, sizeof(buffer),\n-\t\t\t\t\t\"Subject: [PATCH %d/%d] \",\n-\t\t\t\t\topt->nr, opt->total);\n+\t\t\t\t\t\"Subject: [PATCH %0*d/%d] \",\n+\t\t\t\t\tget_width(opt->total), opt->nr, opt->total);\n \t\t\tsubject = buffer;\n \t\t} else if (opt->total == 0)\n \t\t\tsubject = \"Subject: [PATCH] \";\n-- \nMST\n"}]}