Richard Sharpe | 21 Jun 2012 06:22
Picon

TCP Graphs and thousands separators ...

Hi folks,

I have noticed some complaining about the lack of thousands separators
on the ticks, especially on the vertical axis. Certainly, I find it a
pain.

The following patch might fix the problem. I don't currently have a
capture that I can check this with. Perhaps tomorrow I will remember
to bring one how that shows more than three digits ...

[rsharpe <at> localhost wireshark]$ svn diff ui/gtk/tcp_graph.c
Index: ui/gtk/tcp_graph.c
===================================================================
--- ui/gtk/tcp_graph.c	(revision 43186)
+++ ui/gtk/tcp_graph.c	(working copy)
 <at>  <at>  -2767,7 +2767,7  <at>  <at> 
 			break;
 		y = y - floor (y);
 	}
-	g_snprintf (str, sizeof(str), "%.*f", rdigits, label);
+	g_snprintf (str, sizeof(str), "%'*f", rdigits, label);
 	switch (dir) {
 	case AXIS_HORIZONTAL:
                 layout = gtk_widget_create_pango_layout(axis->g->drawing_area,

--

-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)
___________________________________________________________________________
(Continue reading)

Richard Sharpe | 21 Jun 2012 06:42
Picon

Re: TCP Graphs and thousands separators ...

On Wed, Jun 20, 2012 at 9:22 PM, Richard Sharpe
<realrichardsharpe <at> gmail.com> wrote:
> Hi folks,
>
> I have noticed some complaining about the lack of thousands separators
> on the ticks, especially on the vertical axis. Certainly, I find it a
> pain.
>
> The following patch might fix the problem. I don't currently have a
> capture that I can check this with. Perhaps tomorrow I will remember
> to bring one how that shows more than three digits ...
>
> [rsharpe <at> localhost wireshark]$ svn diff ui/gtk/tcp_graph.c
> Index: ui/gtk/tcp_graph.c
> ===================================================================
> --- ui/gtk/tcp_graph.c  (revision 43186)
> +++ ui/gtk/tcp_graph.c  (working copy)
>  <at>  <at>  -2767,7 +2767,7  <at>  <at> 
>                        break;
>                y = y - floor (y);
>        }
> -       g_snprintf (str, sizeof(str), "%.*f", rdigits, label);
> +       g_snprintf (str, sizeof(str), "%'*f", rdigits, label);
>        switch (dir) {
>        case AXIS_HORIZONTAL:
>                 layout = gtk_widget_create_pango_layout(axis->g->drawing_area,
>

Nope. I was wrong. This does it. Can someone commit it? Do I have to
create a bug?:
(Continue reading)

Jeff Morriss | 21 Jun 2012 16:02
Picon

Re: TCP Graphs and thousands separators ...

Richard Sharpe wrote:
> On Wed, Jun 20, 2012 at 9:22 PM, Richard Sharpe
> <realrichardsharpe@...> wrote:
>> Hi folks,
>>
>> I have noticed some complaining about the lack of thousands separators
>> on the ticks, especially on the vertical axis. Certainly, I find it a
>> pain.
>>
>> The following patch might fix the problem. I don't currently have a
>> capture that I can check this with. Perhaps tomorrow I will remember
>> to bring one how that shows more than three digits ...
>>
>> [rsharpe <at> localhost wireshark]$ svn diff ui/gtk/tcp_graph.c
>> Index: ui/gtk/tcp_graph.c
>> ===================================================================
>> --- ui/gtk/tcp_graph.c  (revision 43186)
>> +++ ui/gtk/tcp_graph.c  (working copy)
>>  <at>  <at>  -2767,7 +2767,7  <at>  <at> 
>>                        break;
>>                y = y - floor (y);
>>        }
>> -       g_snprintf (str, sizeof(str), "%.*f", rdigits, label);
>> +       g_snprintf (str, sizeof(str), "%'*f", rdigits, label);
>>        switch (dir) {
>>        case AXIS_HORIZONTAL:
>>                 layout = gtk_widget_create_pango_layout(axis->g->drawing_area,
>>
> 
> Nope. I was wrong. This does it. Can someone commit it? Do I have to
(Continue reading)

Richard Sharpe | 21 Jun 2012 16:19
Picon

Re: TCP Graphs and thousands separators ...

On Thu, Jun 21, 2012 at 7:02 AM, Jeff Morriss <jeff.morriss.ws <at> gmail.com> wrote:
> Richard Sharpe wrote:
>> On Wed, Jun 20, 2012 at 9:22 PM, Richard Sharpe
>> <realrichardsharpe <at> gmail.com> wrote:
>>> Hi folks,
>>>
>>> I have noticed some complaining about the lack of thousands separators
>>> on the ticks, especially on the vertical axis. Certainly, I find it a
>>> pain.
>>>
>>> The following patch might fix the problem. I don't currently have a
>>> capture that I can check this with. Perhaps tomorrow I will remember
>>> to bring one how that shows more than three digits ...
>>>
>>> [rsharpe <at> localhost wireshark]$ svn diff ui/gtk/tcp_graph.c
>>> Index: ui/gtk/tcp_graph.c
>>> ===================================================================
>>> --- ui/gtk/tcp_graph.c  (revision 43186)
>>> +++ ui/gtk/tcp_graph.c  (working copy)
>>>  <at>  <at>  -2767,7 +2767,7  <at>  <at> 
>>>                        break;
>>>                y = y - floor (y);
>>>        }
>>> -       g_snprintf (str, sizeof(str), "%.*f", rdigits, label);
>>> +       g_snprintf (str, sizeof(str), "%'*f", rdigits, label);
>>>        switch (dir) {
>>>        case AXIS_HORIZONTAL:
>>>                 layout = gtk_widget_create_pango_layout(axis->g->drawing_area,
>>>
>>
(Continue reading)


Gmane