Re: [Gimp-developer] Dog-bone

2020-08-19 Thread John Tapsell via gimp-developer-list
...Wow, I'm way too tired.  Really sorry.

On Wed, 19 Aug 2020 at 19:38, Simon Budig  wrote:

> Hi John.
>
> John Tapsell via gimp-developer-list (gimp-developer-list@gnome.org)
> wrote:
> > I love the path effects, and there's a particularly useful path effect
> that
> > I use all the time:
> >
> > Corners (Fillet/Chamfer)
>
> Are you sure you're reaching out to the right mailing list? I am unaware
> of having "path effects" in GIMP...
>
> Possibly you wanted to reach out to the inkscape developers?
>
> Bye,
> Simon
>
> --
>   si...@budig.de  http://simon.budig.de/
> ___
> gimp-developer-list mailing list
> List address:gimp-developer-list@gnome.org
> List membership:
> https://mail.gnome.org/mailman/listinfo/gimp-developer-list
> List archives:   https://mail.gnome.org/archives/gimp-developer-list
>
___
gimp-developer-list mailing list
List address:gimp-developer-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list


[Gimp-developer] Dog-bone

2020-08-19 Thread John Tapsell via gimp-developer-list
I love the path effects, and there's a particularly useful path effect that
I use all the time:

Corners (Fillet/Chamfer)

I'd love for it to have one extra feature - a dog-bone effect.  This is
essential when laser cutting slots in acrylic, because acrylic doesn't like
sharp 90 degree corners.

Also for wood CNC, when you literally can't cut a 90 degree corner:

https://fablab.ruc.dk/content/images/2017/03/dogbones.jpg

I'm happy to code this myself, but I want to check:

1. Where is the code for this?  Are these in the main git repo?
2. Would a contribution for this feature be accepted? (Assuming sufficient
code quality of course)

Thank you,

John
___
gimp-developer-list mailing list
List address:gimp-developer-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list


[ksysguard] [Bug 384515] [ksysguardd]: Internal buffer too small to read '/proc/cpuinfo'

2020-02-13 Thread John Tapsell
https://bugs.kde.org/show_bug.cgi?id=384515

--- Comment #8 from John Tapsell  ---
I'm happy for someone to commit this (I'm the maintainer, but can't do it
myself currently sorry)

On Thu, Feb 13, 2020, 20:23 Jakob Kummerow  wrote:

> https://bugs.kde.org/show_bug.cgi?id=384515
>
> --- Comment #7 from Jakob Kummerow  ---
> I've created a pull request: https://phabricator.kde.org/D27362
>
> --
> You are receiving this mail because:
> You are watching the assignee of the bug.

-- 
You are receiving this mail because:
You are watching all bug changes.

Re: FSF leadership

2019-09-19 Thread John Tapsell
Now using the term "race" is "copying racists"? Wtf?



On Thu, 19 Sep 2019, 21:37 Friedrich W. H. Kossebau, 
wrote:

> Am Donnerstag, 19. September 2019, 10:31:38 CEST schrieb Christian Loosli:
> > I think that people should be elected into positions based on their
> > suitability for that position, which means that things like sex, gender,
> > race, cultural background, sexual orientation etc. pp.
>
> Race? Sounds like people are proposing there are human races?
>
> You might be reusing phrases here by people you think are out there for a
> more
> humanist world, but please reflect a bit on this very term, and if it
> makes
> sense to copycat that phrase and if it really represent what you are
> thinking.
> And if you are not actually copying terms and ideas of racists, when you
> might
> not be one.
>
> Cheers
> Friedrich
>
>
>


Re: FSF leadership

2019-09-19 Thread John Tapsell
I also agree with us insisting on only preapproved skin color and
genitals.


On Thu, 19 Sep 2019, 11:59 Valorie Zimmerman, 
wrote:

> As many of you know, Richard Stallman has stepped down from the FSF.
> However, his supporters on the FSF Board remain. The FSF is on our Advisory
> Board, according to https://ev.kde.org/advisoryboard.php
>
> Accordingly, I would like us (the KDE Community) to advise them to
> diversify their Board, as RedHat has done here:
> https://www.redhat.com/en/blog/open-letter-free-software-foundation-board-directors.
> If we cannot do this as a community, I would like to ask the Board to do
> this on our behalf.
>
> All the best,
>
> Valorie
>
> --
> http://about.me/valoriez - pronouns: she/her
>
>
>


Re: Code of Conduct questions

2018-10-21 Thread John Tapsell
Or could we use an alternative?

On Mon, 22 Oct 2018, 08:36 Jacob Lifshay,  wrote:

> Hi, we were thinking of asking if freedesktop would host Kazan (
> https://github.com/kazan-3d/kazan) for us, however some of our community
> members have objections with how freedesktop's Code of Conduct is currently
> written. Would it be acceptable for a project on freedesktop to have a
> different code of conduct as long as it has similar intent? The code of
> conduct that we would like to use is similar to
> https://libre-riscv.org/charter/
>
> Thanks,
> Jacob Lifshay
> ___
> xdg mailing list
> xdg@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/xdg
>
___
xdg mailing list
xdg@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/xdg


[Gimp-developer] Using gimp in a script

2018-02-22 Thread John Tapsell
Can I improve this somehow?

I have a gimp plugin as myplugin.py.  I want to run this from the command
line on given file(s).  I wrote this script which works, but I'm wondering
if I can improve it at all.   I have this script in a folder, and the
plugin in a subfolder  gimpplugin/



FILENAME="$1"
if [ ! -f "$FILENAME" ]; then
echo File not found - you must pass the psd file to be converted
with gimp
exit 1
fi
BASE="${FILENAME%.*}"
mkdir "$BASE"
DIR_OF_THIS_SCRIPT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
echo "(plug-in-path
\"\${gimp_dir}/plug-ins:\${gimp_plug_in_dir}/plug-ins:$DIR_OF_THIS_SCRIPT/gimpplugin\")"
> gimprc

gimp -i -g gimprc -b "
(let* ((image (car (gimp-file-load RUN-NONINTERACTIVE \"$FILENAME\"
\"$FILENAME\")))
   (drawable (car (gimp-image-get-active-layer image
   (python-fu-myplugin RUN-NONINTERACTIVE image drawable)
   (gimp-image-delete image))"  -b '(gimp-quit 0)'

rm gimprc
echo $BASE done
___
gimp-developer-list mailing list
List address:gimp-developer-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list


Re: [Gimp-developer] How to get color tag of layer in python plugin script?

2018-02-22 Thread John Tapsell
On 23 Feb 2018 10:57, "Carol Spears" <carol.spe...@gmail.com> wrote:



On Thu, Feb 22, 2018 at 7:37 PM, John Tapsell <johnf...@gmail.com> wrote:

> Thanks! It would be cool if it was a property on the layer itself in
> python, and if there was a version that returned the actual colour name
> instead of a number. (there isn't, right?)
>
> /Filers/Python Fu/Console has a browser button that gives a
searchable list of what can be done.  I suggest that you search for "tag".

Thanks - I don't see anything other than the get and set function, so I
think this confirms that there is no method for getting the color tag as a
string.  This is something that needs to be converted manually I think.
___
gimp-developer-list mailing list
List address:gimp-developer-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list


Re: [Gimp-developer] How to get color tag of layer in python plugin script?

2018-02-22 Thread John Tapsell
Thanks! It would be cool if it was a property on the layer itself in
python, and if there was a version that returned the actual colour name
instead of a number. (there isn't, right?)

On 22 Feb 2018 12:18, "Carol Spears"  wrote:

>
>
> On Wed, Feb 21, 2018 at 9:53 PM, Partha Bagchi  wrote:
>
>> According to ./libgimp/gimpitem_pdb.c:879, gimp_item_get_color_tag gets
>> the color tag of the specified item.
>>
>> Does that help?
>>
>
>  color_tag = pdb.gimp_item_get_color_tag(item)
>
> I noticed that the layers dialog got really large.  Thanks for the pointer!
>
> carol
>
> ___
>>> gimp-developer-list mailing list
>>> List address:gimp-developer-list@gnome.org
>>> List membership: https://mail.gnome.org/mailman
>>> /listinfo/gimp-developer-list
>>> List archives:   https://mail.gnome.org/archives/gimp-developer-list
>>>
>>
>>
>
___
gimp-developer-list mailing list
List address:gimp-developer-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list


Re: [Gimp-developer] How to get color tag of layer in python plugin script?

2018-02-21 Thread John Tapsell
Here's a screenshot :

https://goo.gl/images/FE4f5M

On 22 Feb 2018 11:32 am, "Carol Spears" <carol.spe...@gmail.com> wrote:

>
>
> On Wed, Feb 21, 2018 at 9:16 PM, John Tapsell <johnf...@gmail.com> wrote:
>
>> Hi,
>>
>>   How can I get the color tag of a layer in a python plugin script please?
>>
>>
> Not sure what you mean by "color tag" but the color picker can be invoked
> with:
> color = pdb.gimp_image_pick_color(image, drawable, x, y, sample_merged,
> sample_average, average_radius)
>
> carol
>
___
gimp-developer-list mailing list
List address:gimp-developer-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list


[issue968063] Add fileinput.islastline()

2017-04-29 Thread John Tapsell

John Tapsell added the comment:

> If you need islastline() you can use a wrapper:

This doesn't work because fileinput.filename()  and fileinput.filelineno()  are 
going to be wrong and pointing to the next file.

--
nosy: +John Tapsell

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue968063>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[Gimp-developer] Search box for layers

2017-04-18 Thread John Tapsell
Hi,

  I have around a hundred layers, and it's really cumbersome to navigate.
I was wondering:

What do you think of a having a filter/search box for the layers?  To let
you jump to a layer quickly

John
___
gimp-developer-list mailing list
List address:gimp-developer-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list


Re: [Gimp-developer] Proposal for erasing background from an image

2017-03-06 Thread John Tapsell
On 5 March 2017 at 08:43, Ell via gimp-developer-list <
gimp-developer-list@gnome.org> wrote:

>
>
> On 03/02/2017 02:24 AM, John Tapsell wrote:
>
>> Hi all,
>>
>>
>>   I'm guessing this is frowned on but I've written this up on my blog
>> here:
>>
>
> Absolutely not frowned upon :)
>
> ...
>>
>
> Hate to be a buzzkill, but it's already doable: clone tool + color erase
> mode + registered alignment.
>

Awesome!

I tested it out, and it actually worked really well for my specific use
case.  I wanted to erase the color from a shadow, leaving just the shadow,
and it did that beautifully.

In the example with the lion, it works really well when you have a yellow
mane against a blue sky.  But completely wrong for a yellow body against
yellow wheat.

I updated the blog post with pictures if you're interested:

https://johnflux.com/2017/03/02/erasing-background-from-an-image/
___
gimp-developer-list mailing list
List address:gimp-developer-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list


Re: [Gimp-developer] Proposal for erasing background from an image

2017-03-04 Thread John Tapsell
On 3 March 2017 at 07:22, Ofnuts <ofn...@gmx.com> wrote:

> On 02/03/17 10:05, Simon Budig wrote:
>
>> John Tapsell (johnf...@gmail.com) wrote:
>>
>>> So to restate this again - I want to know how to change the top layer
>>> $latex src$ so that I can have the maximum possible alpha without
>>> changing
>>> the final visual image at all.  I.e. remove as much of the background as
>>> possible from our foreground+background image.
>>>
>> This is what color-to-alpha does. Except that it uses a constant color
>> for the whole image. It might be interesting to convert this to a gegl
>> op that takes two input drawable and picks the "background color" from
>> each corresponding pixel in the background image.
>>
>> Should be an easy fun hack. Who wants to take it?
>>
>> Bye,
>>  Simon
>>
>> Fun hack, but would it be useful in practice? Do we want the lion to be
> partially transparent because its hair is more or less the color of the dry
> grass (with some help from Darwin). Try the two pictures in difference
> mode, and check all the places that are near black.


This is why I was suggesting that we do it with an option for the eraser.
So that the user can have that manual control over it.   How hard would it
be to do this with the erasure tool?

Thanks,

John



> ___
> gimp-developer-list mailing list
> List address:gimp-developer-list@gnome.org
> List membership: https://mail.gnome.org/mailman
> /listinfo/gimp-developer-list
> List archives:   https://mail.gnome.org/archives/gimp-developer-list
>
___
gimp-developer-list mailing list
List address:gimp-developer-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list


[Gimp-developer] Proposal for erasing background from an image

2017-03-01 Thread John Tapsell
Hi all,


  I'm guessing this is frowned on but I've written this up on my blog here:

https://johnflux.com/2017/03/02/erasing-background-from-an-image/

  It's mostly images and latex equations, so it's much better to read it
there.  I've pasted it below anyway.

Is anyone interested in this?


I have two opaque images -  one with an object and a background, and
another with just the background.

I want to subtract the background from the image so that the alpha blended
result is visually identical, but the foreground is as transparent as
possible.

I'm sure that this must have been, but I couldn't find a single correct way
of doing this!

I asked a developer from the image editor gimp team, and they replied that
the standard way is to create an alpha mask on the front image from the
difference between the two images.  i.e. for each pixel in both layers,
subtract the rgb values, average that difference between the three
channels, and then use that as an alpha.

But this is clearly not correct.  Imagine the foreground has a green piece
of semi-transparent glass against a red background.  Just using an alpha
mask is clearly not going to subtract the background because you need to
actually modify the rgb values in the top layer image to remove all the red.

So what is the correct solution?  Let's do the calculations.

If we have a solution, the for a solid background with a semi-transparent
foreground layer that is alpha blended on top, the final visual color is:

$latex out_{rgb} = src_{rgb} * src_{alpha} + dst_{rgb} \cdot
(1-src_{alpha})$

We want the visual result to be the same, so we know the value of $latex
out_{rgb}$ - that's our original foreground+background image.  And we know
$latex dst_{rgb}$ - that's our background image.  We want to now create a
new foreground image, $latex src_{rgb}$, with the maximum value of $latex
src_{alpha}$.

So to restate this again - I want to know how to change the top layer
$latex src$ so that I can have the maximum possible alpha without changing
the final visual image at all.  I.e. remove as much of the background as
possible from our foreground+background image.

Note that we also have the constraint that for each color channel, that
$latex src_{rgb} \le 1$ since each rgb pixel value is between 0 and 1.  So:

$latex src_{alpha} \le (out_{rgb} - dst_{rgb})/(1-dst_{rgb})$

So:

$latex
src_{alpha} = Min((out_r - dst_r)/(1-dst_r), out_g - dst_g)/(1-dst_g),
out_b - dst_b)/(1-dst_b))\\
src_{rgb} = (dst_{rgb} \cdot (1-src_{alpha}) - out_{rgb})/src_{alpha}
$

Proposal

Add an option for the gimp eraser tool to 'remove layers underneath', which
grabs the rgb value of the layer underneath and applies the formula using
the alpha in the brush as a normal erasure would, but bounding the alpha to
be no more than the equation above, and modifying the rgb values
accordingly.
___
gimp-developer-list mailing list
List address:gimp-developer-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list


Re: USB 2.0 device has 8ms latency

2015-10-22 Thread John Tapsell
On 22 October 2015 at 18:00, Greg KH <gre...@linuxfoundation.org> wrote:
> On Thu, Oct 22, 2015 at 05:15:50PM +0100, John Tapsell wrote:
>> On 15 October 2015 at 15:37, Alan Stern <st...@rowland.harvard.edu> wrote:
>> > On Thu, 15 Oct 2015, John Tapsell wrote:
>> >
>> >> I did have one wacky idea.  I'm sure it's stupid, but here it is:  Is
>> >> it at all possible that there's a bug in the linux usb code where a
>> >> bInterval value of 1ms is being converted into microframes (8
>> >> microframes)  but then because it's a full speed device it's then
>> >> incorrectly read as an 8ms delay?  I did have a look into the code,
>> >> but got thoroughly lost.  Any pointers on how I could check my wacky
>> >> theory?
>> >
>> > There is no such bug.  Such a thing would have been spotted long, long
>> > ago.
>> >
>> >> I'm just wondering where this 8ms delay comes from.
>> >
>> > Multiple places: time to submit the request, time to reserve
>> > bandwidth for the previously unused interrupt endpoint, time to
>> > complete the transfer, all multiplied by 2.
>> >
>> > You can get more information from usbmon (see
>> > Documentation/usb/usbmon.txt in the kernel source).  But Greg is right;
>> > the protocol you described is terrible.  There's no need for a multiple
>> > ping-pong interchange like that; all you should need to do is wait for
>> > the device to send the next bit (or whatever) of data as soon as it
>> > becomes available.
>> >
>> > Alan Stern
>>
>>
>> I had a look at the windows driver, and found that it is implemented
>> in pretty much exactly the same way as the linux driver, but it
>> operates at twice the speed.  And that's for a user-space USB driver.
>>
>> Any ideas why?
>
> "pretty much"?  What exactly is the difference?

Well, just that one uses the windows API and one uses the linux API :-)

>  And you should be able
> to try out a userspace driver in Linux as well, libusb works on Windows
> and Linux so you can do a good comparison.

Interesting - I'll give it a try, thanks.

John
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: USB 2.0 device has 8ms latency

2015-10-22 Thread John Tapsell
On 15 October 2015 at 15:37, Alan Stern <st...@rowland.harvard.edu> wrote:
> On Thu, 15 Oct 2015, John Tapsell wrote:
>
>> I did have one wacky idea.  I'm sure it's stupid, but here it is:  Is
>> it at all possible that there's a bug in the linux usb code where a
>> bInterval value of 1ms is being converted into microframes (8
>> microframes)  but then because it's a full speed device it's then
>> incorrectly read as an 8ms delay?  I did have a look into the code,
>> but got thoroughly lost.  Any pointers on how I could check my wacky
>> theory?
>
> There is no such bug.  Such a thing would have been spotted long, long
> ago.
>
>> I'm just wondering where this 8ms delay comes from.
>
> Multiple places: time to submit the request, time to reserve
> bandwidth for the previously unused interrupt endpoint, time to
> complete the transfer, all multiplied by 2.
>
> You can get more information from usbmon (see
> Documentation/usb/usbmon.txt in the kernel source).  But Greg is right;
> the protocol you described is terrible.  There's no need for a multiple
> ping-pong interchange like that; all you should need to do is wait for
> the device to send the next bit (or whatever) of data as soon as it
> becomes available.
>
> Alan Stern


I had a look at the windows driver, and found that it is implemented
in pretty much exactly the same way as the linux driver, but it
operates at twice the speed.  And that's for a user-space USB driver.

Any ideas why?

Thanks,

John Tapsell
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


USB 2.0 device has 8ms latency

2015-10-15 Thread John Tapsell
Hi,

  I'm working on a linux driver for a usb to i2c chip (the MCP2221).
The USB chip is USB 2.0  Full Speed, and the driver that I'm working
on is here:

http://ww1.microchip.com/downloads/en/DeviceDoc/mcp2221_0_1.tar.gz

  The driver uses HID Interrupt for communication, and both the in and
out endpoints have a bInterval of 1.

  The problem is that the following function (from the above .tar.gz)
takes 8ms to complete, when I'm expecting 1 or 2ms maximum. It simply
sends a USB packet, then gets the reply.


static int mcp2221_ll_cmd(struct i2c_mcp2221 *dev)
{
   int rv;

   /* tell everybody to leave the URB alone */
   dev->ongoing_usb_ll_op = 1;

   /* submit the interrupt out ep packet */
   if (usb_submit_urb(dev->interrupt_out_urb, GFP_KERNEL)) {
   dev_err(>interface->dev,
   "mcp2221(ll): usb_submit_urb intr out failed\n");
   dev->ongoing_usb_ll_op = 0;
   return -EIO;
   }

   /* wait for its completion */
   rv = wait_event_interruptible(dev->usb_urb_completion_wait,
   (!dev->ongoing_usb_ll_op));
   if (rv < 0) {
   dev_err(>interface->dev, "mcp2221(ll): wait interrupted\n");
   goto ll_exit_clear_flag;
   }

   /* tell everybody to leave the URB alone */
   dev->ongoing_usb_ll_op = 1;

   /* submit the interrupt in ep packet */
   if (usb_submit_urb(dev->interrupt_in_urb, GFP_KERNEL)) {
   dev_err(>interface->dev, "mcp2221(ll):
usb_submit_urb intr in failed\n");
   dev->ongoing_usb_ll_op = 0;
   return -EIO;
   }

   /* wait for its completion */
   rv = wait_event_interruptible(dev->usb_urb_completion_wait,
   (!dev->ongoing_usb_ll_op));
   if (rv < 0) {
   dev_err(>interface->dev, "mcp2221(ll): wait interrupted\n");
   goto ll_exit_clear_flag;
   }

ll_exit_clear_flag:
   dev->ongoing_usb_ll_op = 0;
   return rv;
}

(Please let me know what information to provide.  I have oscilloscope
outputs, lsusb outputs, more information about mcp2221, etc.  I just
didn't want to make this a huge dump of irrelevant information)

John Tapsell
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: USB 2.0 device has 8ms latency

2015-10-15 Thread John Tapsell
On 15 October 2015 at 15:37, Alan Stern <st...@rowland.harvard.edu> wrote:
> On Thu, 15 Oct 2015, John Tapsell wrote:
>
>> I did have one wacky idea.  I'm sure it's stupid, but here it is:  Is
>> it at all possible that there's a bug in the linux usb code where a
>> bInterval value of 1ms is being converted into microframes (8
>> microframes)  but then because it's a full speed device it's then
>> incorrectly read as an 8ms delay?  I did have a look into the code,
>> but got thoroughly lost.  Any pointers on how I could check my wacky
>> theory?
>
> There is no such bug.  Such a thing would have been spotted long, long
> ago.
>
>> I'm just wondering where this 8ms delay comes from.
>
> Multiple places: time to submit the request, time to reserve
> bandwidth for the previously unused interrupt endpoint, time to
> complete the transfer, all multiplied by 2.
>
> You can get more information from usbmon (see
> Documentation/usb/usbmon.txt in the kernel source).  But Greg is right;
> the protocol you described is terrible.  There's no need for a multiple
> ping-pong interchange like that; all you should need to do is wait for
> the device to send the next bit (or whatever) of data as soon as it
> becomes available.

Thanks.  FWIW, the datasheet is here:
http://ww1.microchip.com/downloads/en/DeviceDoc/20005292B.pdf

I don't see any way around this awful protocol.

Time to change chips :)

John Tapsell
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: USB 2.0 device has 8ms latency

2015-10-15 Thread John Tapsell
Hi Greg,

  I'm trying to write a driver for this specific usb-to-i2c chip
(mcp2221).  It only offers an In and Out Interrupt Endpoint.  To do a
single i2c read I need to:

1. Send a packet saying "I want to read from i2c"
2. Wait for a reply saying 'okay'.
3. Send another packet saying "Please now send me the data that you read"
4. Wait for that reply.

This means a delay of 2x8ms = 16ms  to get a single bit of data.  For
the specific case that I want to use the chip for, this means I'm
reading from my i2c sensor at 62 hz.  I'd really like to do better if
it at all possible.

Any suggestions?

Thanks,

John

On 15 October 2015 at 14:46, Greg KH <gre...@linuxfoundation.org> wrote:
> On Thu, Oct 15, 2015 at 12:05:52PM +0100, John Tapsell wrote:
>> Hi,
>>
>>   I'm working on a linux driver for a usb to i2c chip (the MCP2221).
>> The USB chip is USB 2.0  Full Speed, and the driver that I'm working
>> on is here:
>>
>> http://ww1.microchip.com/downloads/en/DeviceDoc/mcp2221_0_1.tar.gz
>>
>>   The driver uses HID Interrupt for communication, and both the in and
>> out endpoints have a bInterval of 1.
>>
>>   The problem is that the following function (from the above .tar.gz)
>> takes 8ms to complete, when I'm expecting 1 or 2ms maximum. It simply
>> sends a USB packet, then gets the reply.
>>
>>
>> static int mcp2221_ll_cmd(struct i2c_mcp2221 *dev)
>> {
>>int rv;
>>
>>/* tell everybody to leave the URB alone */
>>dev->ongoing_usb_ll_op = 1;
>>
>>/* submit the interrupt out ep packet */
>>if (usb_submit_urb(dev->interrupt_out_urb, GFP_KERNEL)) {
>>dev_err(>interface->dev,
>>"mcp2221(ll): usb_submit_urb intr out 
>> failed\n");
>>dev->ongoing_usb_ll_op = 0;
>>return -EIO;
>>}
>>
>>/* wait for its completion */
>>rv = wait_event_interruptible(dev->usb_urb_completion_wait,
>>(!dev->ongoing_usb_ll_op));
>>if (rv < 0) {
>>dev_err(>interface->dev, "mcp2221(ll): wait 
>> interrupted\n");
>>goto ll_exit_clear_flag;
>>}
>>
>>/* tell everybody to leave the URB alone */
>>dev->ongoing_usb_ll_op = 1;
>>
>>/* submit the interrupt in ep packet */
>>if (usb_submit_urb(dev->interrupt_in_urb, GFP_KERNEL)) {
>>dev_err(>interface->dev, "mcp2221(ll):
>> usb_submit_urb intr in failed\n");
>>dev->ongoing_usb_ll_op = 0;
>>return -EIO;
>>}
>>
>>/* wait for its completion */
>>rv = wait_event_interruptible(dev->usb_urb_completion_wait,
>>(!dev->ongoing_usb_ll_op));
>>if (rv < 0) {
>>dev_err(>interface->dev, "mcp2221(ll): wait 
>> interrupted\n");
>>goto ll_exit_clear_flag;
>>}
>>
>> ll_exit_clear_flag:
>>dev->ongoing_usb_ll_op = 0;
>>return rv;
>> }
>>
>> (Please let me know what information to provide.  I have oscilloscope
>> outputs, lsusb outputs, more information about mcp2221, etc.  I just
>> didn't want to make this a huge dump of irrelevant information)
>
> I don't see anything wrong here, USB isn't guaranteed to have any
> specific latency, what you are doing here is the worst-possible-case for
> a USB system (i.e. send a packet, wait for it to complete, send another
> one, etc.)  There are lots of ways to get much better throughput if that
> is what you are wanting to do.
>
> In fact, what exactly are you trying to do?
>
> thanks,
>
> greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: USB 2.0 device has 8ms latency

2015-10-15 Thread John Tapsell
On 15 October 2015 at 15:00, Greg KH <gre...@linuxfoundation.org> wrote:
> A: No.
> Q: Should I include quotations after my reply?
>
> http://daringfireball.net/2007/07/on_top
>
> On Thu, Oct 15, 2015 at 02:56:48PM +0100, John Tapsell wrote:
>> Hi Greg,
>>
>>   I'm trying to write a driver for this specific usb-to-i2c chip
>> (mcp2221).  It only offers an In and Out Interrupt Endpoint.  To do a
>> single i2c read I need to:
>>
>> 1. Send a packet saying "I want to read from i2c"
>> 2. Wait for a reply saying 'okay'.
>> 3. Send another packet saying "Please now send me the data that you read"
>> 4. Wait for that reply.
>>
>> This means a delay of 2x8ms = 16ms  to get a single bit of data.  For
>> the specific case that I want to use the chip for, this means I'm
>> reading from my i2c sensor at 62 hz.  I'd really like to do better if
>> it at all possible.
>>
>> Any suggestions?
>
> For a horrid protocol like this, no, there isn't any way to make it go
> faster, sorry.  That is designed in such a way to make it the worst
> possible thing for a USB system, go kick the person who designed such a
> thing (hint, they have no idea how USB works...)
>
> I strongly suggest going and getting a different sensor chip, don't
> encourage such behaviour by actually buying their hardware.
>
> sorry,
>
> greg k-h

Thank you very much.

I did have one wacky idea.  I'm sure it's stupid, but here it is:  Is
it at all possible that there's a bug in the linux usb code where a
bInterval value of 1ms is being converted into microframes (8
microframes)  but then because it's a full speed device it's then
incorrectly read as an 8ms delay?  I did have a look into the code,
but got thoroughly lost.  Any pointers on how I could check my wacky
theory?

I'm just wondering where this 8ms delay comes from.

Thanks,

John
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [HarfBuzz] Dotted circles in harfbuzz

2015-06-24 Thread John Tapsell
I suggested to Vignesh off the mailing list to apply the following patch:
http://pastebin.com/e3tJRYMP

i.e just adding:

 glyphString[slen++] = C_DOTTED_CIRCLE;
+   item-attributes[slen-1].dontPrint = true; // FIXME this
will hide all dotted circle

However he found that this causes a crash.  I wasn't sure of the correct
fix for this.

John

On 24 June 2015 at 13:19, Vignesh Raman rvignesh.ra...@gmail.com wrote:

 Hi All,

 I was checking a thai webpage which has a virtual keyboard,
 https://www.branah.com/thai

 When I open this website in chrome, I do not see the dotted circles in
 keyboard and
 when top level thai characters are typed  nothing appears in text area.

 Using a sample application (facybroswer) dotted circle is seen in the
 keyboard and when the top level thai characters are typed, it is seen
 in the text area along with dotted circle.

 The Qt version used is Qt 4.7.4. I see the dotted circle was added in
 harbuzz (harfbuzz old) bundled with Qt with the below patch,

 From 44f415aafaf7eec56b31468a58e0ca768bbc082d Mon Sep 17 00:00:00 2001
 From: Jiang Jiang jiang.ji...@nokia.com
 Date: Mon, 16 Jan 2012 15:39:56 +0100
 Subject: [PATCH] Fix isolated Thai SARA AM handling

 If I remove this patch the dotted circle is not seen. But when the
 first level vocal is entered nothing
 appears in the text area and the application crashes.

 So my questions are,
 1) Is this dotted circle a standard feature in harbuzz or any qt web
 browsers.
 2) Is it possbile to make the behaviour similar to chrome? Dotted
 circle hidden and no characters should be seen when top level thai
 characters are pressed.

 Thanks for any pointers.

 Regards,
 Vignesh.
 ___
 HarfBuzz mailing list
 HarfBuzz@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/harfbuzz

___
HarfBuzz mailing list
HarfBuzz@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/harfbuzz


Improving git branch

2014-12-17 Thread John Tapsell
Hi all,

  I'm interested in putting in some time and effort into improving the
output of git branch.

  What I'm thinking is an output like this:

$ git branch

2014-12-17 * (detached from origin/master) deaba04 Do stuff
2014-12-15   john.ta/add_timing_info6edbcfa  Add timing stuff
2014-12-14   master  8537316
[origin/master: ahead 1, behind 16] Some stuff
2014-12-12   john.ta/new_reduce_memory   99d84db Reintroduce: memory stuff
2014-12-05   john.ta/bugfixese15c95e Add stuff
2014-12-03   john.ta/container   e9fd4e5 This
branch is a test bed for containers


(These columns are supposed to be all aligned nicely..)

So, features:

1. Show the date of the last commit
2. Sort by date.  Most recently used branches at the top
3. Show the branch name, including your current branch, with a * to
indicate that it's checked out.
4. Show the sha
5. Show the branch DESCRIPTION - and if that's not available, show the
short-line of the most recent commit.

There is also a small amount of color here that I can't paste here, to
follow the coloring in the current git branch.

Before I start making patches etc, what do people think?  Would I have
a chance of getting this in?  Should I change some aspects etc?

Thanks,

John Tapsell
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Improving git branch

2014-12-17 Thread John Tapsell
I don't fully understand - if I did that, then what difference would
an average user actually see?

On 17 December 2014 at 11:28, Michael J Gruber g...@drmicha.warpmail.net 
wrote:
 John Tapsell schrieb am 17.12.2014 um 12:10:
 Hi all,

   I'm interested in putting in some time and effort into improving the
 output of git branch.

   What I'm thinking is an output like this:

 $ git branch

 2014-12-17 * (detached from origin/master) deaba04 Do stuff
 2014-12-15   john.ta/add_timing_info6edbcfa  Add timing stuff
 2014-12-14   master  8537316
 [origin/master: ahead 1, behind 16] Some stuff
 2014-12-12   john.ta/new_reduce_memory   99d84db Reintroduce: memory 
 stuff
 2014-12-05   john.ta/bugfixese15c95e Add stuff
 2014-12-03   john.ta/container   e9fd4e5 This
 branch is a test bed for containers


 (These columns are supposed to be all aligned nicely..)

 So, features:

 1. Show the date of the last commit
 2. Sort by date.  Most recently used branches at the top
 3. Show the branch name, including your current branch, with a * to
 indicate that it's checked out.
 4. Show the sha
 5. Show the branch DESCRIPTION - and if that's not available, show the
 short-line of the most recent commit.

 There is also a small amount of color here that I can't paste here, to
 follow the coloring in the current git branch.

 Before I start making patches etc, what do people think?  Would I have
 a chance of getting this in?  Should I change some aspects etc?

 Thanks,

 John Tapsell


 I support the general goal, we have quite some way to go there.

 As to the method: git branch in list mode, git tag in list mode and
 git for-each-ref all do similar things and are in turn not dissimilar
 from git log --no-walk with appropriate formatting and rev options.

 Rather than extending git branch any further[*], I suggest a bolder
 strategy:

 - unify/merge for-each-ref and pretty formats (and code) as far as possible
 - leverage that for the list modes of branch and tag

 That would allow everyone to get their favourite listing, just like for
 logs. Otherwise it would be very difficult to agree on *the* proper
 format for an extended branch or tag list.

 Michael


 [*] I know I'm a sinner, too.
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


git reflog --date

2014-10-21 Thread John Tapsell
Hi all,

  Could we add a default to --date so that:

git reflog --date

just works?  (Currently you need to do:   git reflog --date=iso)  It
should probably obey the default in log.date?

Also, could we add this --date option to the man page please?  It's
an extremely useful option to know.  At the moment you have to notice
the comment that all normal log options are there, and then try to
work it out from there etc.

Thank you,

John

John
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: git reflog --date

2014-10-21 Thread John Tapsell
For me, writing git reflog @{now}  is a lot less intuitive than git
reflog --date

Currently the top google search for this question is here:

http://stackoverflow.com/questions/17369254/is-there-a-way-to-cause-git-reflog-to-show-a-date-alongside-each-entry

Which doesn't mention @{now}   at all.

My opinion:

1. Add --date   as an option to reflog.  Perhaps using the log.date
format as the default.
2. Document --date in the man page for git reflog
3. Document @{now}  in the man page for git reflog

Sound good?

John

On 21 October 2014 18:24, Junio C Hamano gits...@pobox.com wrote:
 John Tapsell johnf...@gmail.com writes:

 Hi all,

   Could we add a default to --date so that:

 git reflog --date

 just works?  (Currently you need to do:   git reflog --date=iso)  It
 should probably obey the default in log.date?

 Hmph.  --date=style is not the way to choose between timed and
 counted output in the first place, though.

 In a similar way that git log -g @{now} and git log -g @{0}
 switch between two, git reflog @{now} and git reflog @{0} have
 been the primary way to choose between them.  Only because it is
 clear that you want the timed format when you specify any date style
 e.g. git reflog --date=relative, we give timed output without
 @{time/number} but that is just icing on the cake.

 That at least is why things are the way they are.  And once you
 understand the above, you would understand why --date=style is
 not singled out as a useful option in the documentation, because
 that is not a primary way to choose between timed and counted
 output, but because it is merely a way to influence how times are
 shown once you chose timed output.

 Having said all that, I have a few comments:

  - Perhaps use of @{time} vs @{count} as _the_ way to choose
between timed and counted output is not documented clearly enough
to lead to such a misunderstanding?

  - Perhaps use of @{time} vs @{count} is a less intuitive than
ideal way to choose between them in the first place?

  - Perhaps adding --date with no date-style specification as another
way to trigger You said 'date' so you must mean you want timed
output heuristics just like existing --date=style does may
let us get away without answering the above two questions,
sidestepping the issues?

 I dunno.
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: git reflog --date

2014-10-21 Thread John Tapsell
Great - now I just need to persuade someone very nice nicely.. :-)

On 21 October 2014 19:06, Junio C Hamano gits...@pobox.com wrote:
 John Tapsell johnf...@gmail.com writes:

 For me, writing git reflog @{now}  is a lot less intuitive than git
 reflog --date

 Currently the top google search for this question is here:

 http://stackoverflow.com/questions/17369254/is-there-a-way-to-cause-git-reflog-to-show-a-date-alongside-each-entry

 Which doesn't mention @{now}   at all.

 I would say that a site where cluelesses attempt to lead other
 cluelesses is not the best source of information ;-), but that tells
 us that either our docs are not read by people or they do not give
 necessary information to them clearly enough.

 My opinion:

 1. Add --date   as an option to reflog.  Perhaps using the log.date
 format as the default.
 2. Document --date in the man page for git reflog
 3. Document @{now}  in the man page for git reflog

 Sound good?

 The order of changes is questionable, but other than that, I think
 that would be a good way forward.
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Code changes in merge commits

2014-09-29 Thread John Tapsell
Hi,

  Our team just struggled with this problem, and I've created a
simple, 3 commit large, example git repository to demonstrate the
problem:

https://github.com/johnflux/ExampleEvilness2

The code:   Adds a file, adds a security fix commit, then removes the
fix during a merge.

This happened by accident in our code during a merge, but nobody
noticed, and it was not easy to track down.

In this example, you can see that the security fix was removed by doing:

$ git log -m -p

However the following do NOT show that the security fix was removed:

$ git log -m -p .
$ git log -m -p tmp.c
$ git log -c -p tmp.c

And so on. In a large code base, this a problem.

John
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Code changes in merge commits

2014-09-29 Thread John Tapsell
Rereading what I wrote, I came across as unintentionally harsh and
rude.  Sorry about that - I was trying to be concise and terse, and it
went a bit wrong :)


What I was thinking to improve this is two short-term fixes:

1. Can we get   git log -m -p . in the top level directory to show
the same commits as just git log -m -p ?
2. Can we get   git log -m -p somefile   to show all the
changes to that file?  Including when lines are added and then removed
by the merge somehow?

But in the longer term, I was thinking about how this could be improved...

What if merge commits were forced into being always trivial?   i.e.
prevent merges with conflicts or code changes?
Then conflict resolution and code changes are pushed into a second
ordinary commit.  That way you can always see what changes have been
made to the code.

E.g.  If you have branch master  and branch A, and there are
conflicts when you merge, you could end up with:

merge commit
   |  \
   |  preparation changes to fix conflicts with oldmaster
oldmaster   |
  A


I know this isn't great, but maybe something along these lines?
Ideally I'd like to see all the code changes to a code base just with
git log -p.

Any thoughts?

Thanks,

John Tapsell
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Code changes in merge commits

2014-09-29 Thread John Tapsell
 What I'd love to see with git log -p is the diff between a trivial
 merge (possibly including conflict markers) and the actual merge commit.
 That would imply that git log would redo the merge before computing
 the diff (rather heavyweight :-( ), but an empty diff would mean no
 change other than merge, and if any, we would see the conflict
 resolution or additional changes in the diff.

This would be wonderful.  And I'd rather have git do the heavyweight
work than doing it myself :-/

I don't know the git internals at all - would it be possible to save
the results of the diff?  This is what I was aiming for in my idea of
making the merge and conflict-resolution as separate commits.

 --
 Matthieu Moy
 http://www-verimag.imag.fr/~moy/
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Torvalds says he has no strong opinions on systemd

2014-09-17 Thread John Tapsell
Oh, so that's why it's so difficult to use bibtex.  Hmm, I think then
you've just convinced me that systemd's approach is better :-)

On 17 September 2014 15:42, Richard Heck rgh...@lyx.org wrote:
 On 09/15/2014 12:39 PM, José Matos wrote:

 While the above piece

 http://www.itwire.com/business-it-news/open-source/65402-torvalds-says-he-has-no-strong-opinions-on-systemd

 I noticed that Linus refers to LyX in the context of the unix way:

 And systemd is in no way the piece that breaks with old UNIX legacy.
 Graphical applications seldom worked that way (there are certainly _echoes_
 of it in things like LyX, but I think it's the exception rather than the
 rule)...

 Funny and interesting to read at the same time. :-)


 Nice to see that we are on his radar somehow. And of course he's right. This
 value gets invoked here from time to time. No BibTeX editor as part of LyX,
 e.g.

 Richard



Re: Torvalds says he has no strong opinions on systemd

2014-09-17 Thread John Tapsell
Oh, so that's why it's so difficult to use bibtex.  Hmm, I think then
you've just convinced me that systemd's approach is better :-)

On 17 September 2014 15:42, Richard Heck  wrote:
> On 09/15/2014 12:39 PM, José Matos wrote:
>>
>> While the above piece
>>
>> http://www.itwire.com/business-it-news/open-source/65402-torvalds-says-he-has-no-strong-opinions-on-systemd
>>
>> I noticed that Linus refers to LyX in the context of the unix way:
>>
>> "And systemd is in no way the piece that breaks with old UNIX legacy.
>> Graphical applications seldom worked that way (there are certainly _echoes_
>> of it in things like "LyX", but I think it's the exception rather than the
>> rule)..."
>>
>> Funny and interesting to read at the same time. :-)
>
>
> Nice to see that we are on his radar somehow. And of course he's right. This
> value gets invoked here from time to time. No BibTeX editor as part of LyX,
> e.g.
>
> Richard
>


Re: Help KDE-Edu: WYSIWYG editor for math expressions

2014-02-03 Thread John Tapsell
Have you had a look at the koffice equation editor?


On 3 February 2014 08:02, Percy Camilo Triveño Aucahuasi 
percy.camilo...@gmail.com wrote:

 Dear LyX developers, I'm Percy Camilo Triveño Aucahuasi, I contribute to
 KDE-Edu[1] (mainly to math applications) and, of course I'm a enthusiastic
 LyX user too.

 I would like to request your advice and help: Currently our math
 applications lacks a good (LaTeX based) WYSIWYG editor for math
 expressions, I think this feature is a must for our users, however the only
 good implementation I know is in LyX. Our goal is to have a library (C++/Qt
 based) that can provide us with that functionality, so many KDE-Edu (and
 even KDE) applications can use it.

 In order to do that, I would like to know:

 What chances we have to reuse your code?
 Which parts of LyX code are relevant for this feature?
 How hard do you think (in terms of knowledge, time) can be this? We are
 currently 2 developers for this task.

 A quick view to the LyX code tells me that src/mathed and src/frontends/
 is where we need to focus, but I'm sure you can give us  more insights
 about how to achieve this goal, we are new with LyX code, so any advice
 will help us. Also, we are fine with LyX license, since KDE applications
 are free software too.

 Thanks,
 Percy (aucahuasi)

 [1] http://edu.kde.org/



Re: Help KDE-Edu: WYSIWYG editor for math expressions

2014-02-03 Thread John Tapsell
Have you had a look at the koffice equation editor?


On 3 February 2014 08:02, Percy Camilo Triveño Aucahuasi <
percy.camilo...@gmail.com> wrote:

> Dear LyX developers, I'm Percy Camilo Triveño Aucahuasi, I contribute to
> KDE-Edu[1] (mainly to math applications) and, of course I'm a enthusiastic
> LyX user too.
>
> I would like to request your advice and help: Currently our math
> applications lacks a good (LaTeX based) WYSIWYG editor for math
> expressions, I think this feature is a must for our users, however the only
> good implementation I know is in LyX. Our goal is to have a library (C++/Qt
> based) that can provide us with that functionality, so many KDE-Edu (and
> even KDE) applications can use it.
>
> In order to do that, I would like to know:
>
> What chances we have to reuse your code?
> Which parts of LyX code are relevant for this feature?
> How hard do you think (in terms of knowledge, time) can be this? We are
> currently 2 developers for this task.
>
> A quick view to the LyX code tells me that src/mathed and src/frontends/
> is where we need to focus, but I'm sure you can give us  more insights
> about how to achieve this goal, we are new with LyX code, so any advice
> will help us. Also, we are fine with LyX license, since KDE applications
> are free software too.
>
> Thanks,
> Percy (aucahuasi)
>
> [1] http://edu.kde.org/
>


Re: git help!

2013-10-16 Thread John Tapsell
Like it says, that commit is a merge..

You can just checkout that commit:  git checkout HEAD@{27}

or reset to that commit:   git reset HEAD@{27}

or view the commits that are in that merge:  gitk HEAD@{27}


Re: git help!

2013-10-16 Thread John Tapsell
Like it says, that commit is a merge..

You can just checkout that commit:  git checkout HEAD@{27}

or reset to that commit:   git reset HEAD@{27}

or view the commits that are in that merge:  gitk HEAD@{27}


[PATCH] fbcon: fix deadlock in fbcon_generic_blank()

2013-09-17 Thread John Tapsell
Do not lock fb_info when calling sending the FB_EVENT_CONBLANK
event.

In fbmem.c, the semantics are that we acquire the lock_fb_info first,
and then console_lock.  However when fbcon.c fbcon_generic_blank() is
called, the console lock could already be held.  Locking fb_info can
thus cause a deadlock.

fbmem.c sends the FB_EVENT_BLANK without locking lock_fb_info first, so
this change introduces similar behaviour.

Signed-off-by: John Tapsell 

---
 drivers/video/console/fbcon.c | 4 
 1 file changed, 4 deletions(-)

diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
index 6b4fb5c..8546441 100644
--- a/drivers/video/console/fbcon.c
+++ b/drivers/video/console/fbcon.c
@@ -2333,13 +2333,9 @@ static void fbcon_generic_blank(struct vc_data
*vc, struct fb_info *info,
 vc->vc_video_erase_char = oldc;
 }

-
-if (!lock_fb_info(info))
-return;
 event.info = info;
 event.data = 
 fb_notifier_call_chain(FB_EVENT_CONBLANK, );
-unlock_fb_info(info);
 }

 static int fbcon_blank(struct vc_data *vc, int blank, int mode_switch)
-- 
1.8.1.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] fbcon: fix deadlock in fbcon_generic_blank()

2013-09-17 Thread John Tapsell
Do not lock fb_info when calling sending the FB_EVENT_CONBLANK
event.

In fbmem.c, the semantics are that we acquire the lock_fb_info first,
and then console_lock.  However when fbcon.c fbcon_generic_blank() is
called, the console lock could already be held.  Locking fb_info can
thus cause a deadlock.

fbmem.c sends the FB_EVENT_BLANK without locking lock_fb_info first, so
this change introduces similar behaviour.

Signed-off-by: John Tapsell johnf...@gmail.com

---
 drivers/video/console/fbcon.c | 4 
 1 file changed, 4 deletions(-)

diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
index 6b4fb5c..8546441 100644
--- a/drivers/video/console/fbcon.c
+++ b/drivers/video/console/fbcon.c
@@ -2333,13 +2333,9 @@ static void fbcon_generic_blank(struct vc_data
*vc, struct fb_info *info,
 vc-vc_video_erase_char = oldc;
 }

-
-if (!lock_fb_info(info))
-return;
 event.info = info;
 event.data = blank;
 fb_notifier_call_chain(FB_EVENT_CONBLANK, event);
-unlock_fb_info(info);
 }

 static int fbcon_blank(struct vc_data *vc, int blank, int mode_switch)
-- 
1.8.1.2
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Deadlock in fb and tty

2013-09-11 Thread John Tapsell
Hi,
  I'm consistently and constantly hitting a deadlock.

console_callback in drivers/tty/vt/vt.c does:  console_lock()  and then calls:
  do_blank_screen, which calls:
vc->vc_sw->con_blank(..)  which can be a pointer to the function:
  fbcon_blank in video/console/fbcon.c.  This is missing a
WARN_CONSOLE_UNLOCKED.  This calls:
fbcon_generic_blank which does lock_fb_info(info)

So we have a console_lock() followed by a lock_fb_info(info).

Now if while that is running, we have an ioctl call:

do_fb_ioctl in drivers/video/fbmem.c which does:
   if (!lock_fb_info(info))
return -ENODEV;
console_lock();


So it tries to acquire the same locks in the reverse order.  This
deadlocks consistently for me.

(I'm also curious why I'm hitting this continually, when everyone else
seems to be okay.)

I understand that this is really difficult to fix, but if anyone has
even a suggestion on how to hack it to make it work for me, I'd be
very grateful.

Thank you,

John Tapsell
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Deadlock in fb and tty

2013-09-11 Thread John Tapsell
Hi,
  I'm consistently and constantly hitting a deadlock.

console_callback in drivers/tty/vt/vt.c does:  console_lock()  and then calls:
  do_blank_screen, which calls:
vc-vc_sw-con_blank(..)  which can be a pointer to the function:
  fbcon_blank in video/console/fbcon.c.  This is missing a
WARN_CONSOLE_UNLOCKED.  This calls:
fbcon_generic_blank which does lock_fb_info(info)

So we have a console_lock() followed by a lock_fb_info(info).

Now if while that is running, we have an ioctl call:

do_fb_ioctl in drivers/video/fbmem.c which does:
   if (!lock_fb_info(info))
return -ENODEV;
console_lock();


So it tries to acquire the same locks in the reverse order.  This
deadlocks consistently for me.

(I'm also curious why I'm hitting this continually, when everyone else
seems to be okay.)

I understand that this is really difficult to fix, but if anyone has
even a suggestion on how to hack it to make it work for me, I'd be
very grateful.

Thank you,

John Tapsell
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: git log -p unexpected behaviour - security risk?

2013-04-30 Thread John Tapsell
On 30 April 2013 18:58, John Szakmeister j...@szakmeister.net wrote:
 On Tue, Apr 30, 2013 at 1:05 PM, Matthieu Moy
 matthieu@grenoble-inp.fr wrote:
 Junio C Hamano gits...@pobox.com writes:

 By the way, these options are _not_ about showing merge commits
 that introduce code, and they do not help your kind of security.
 As I repeatedly said, you would need -p -m for that.

 Actually, while defaulting to --cc may be convenient, it would indeed
 increase the security risk: currently, git log -p shows nothing for
 merges, so it's rather clear that _everything_ is omitted. With --cc,
 the user would see a diff, and could hardly guess that not everything is
 shown without reading the doc very carefully.

 I don't believe it's that clear.  I bet people assume there's nothing
 to show, and unless you dig in and discover that `-p` doesn't include
 merges.  In git 1.8.2, `git help log` doesn't seem to make any mention
 of `-p` not showing a diff for merges.

 Just to see, I asked several people around here whether they knew `-p`
 didn't show diffs for merges, and they were all surprised that diffs
 were being omitted for merge commits.

Is there no way to fix --cc to work even in the edge cases?

John
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: git log -p unexpected behaviour

2013-04-30 Thread John Tapsell
On 30 April 2013 20:44, Junio C Hamano gits...@pobox.com wrote:
 John Tapsell johnf...@gmail.com writes:

 Is there no way to fix --cc to work even in the edge cases?

 Can you clarify what you mean by fix and edge cases?

My understanding is that even with -cc there will be changes that
won't be seen - and hence why --cc could be even more of a security
risk, no?

John
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: git log -p unexpected behaviour - security risk?

2013-04-21 Thread John Tapsell
On 21 April 2013 08:26, Junio C Hamano gits...@pobox.com wrote:
 Simon Ruderich si...@ruderich.org writes:

 diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
 index 104579d..cd35ec7 100644
 --- a/Documentation/diff-options.txt
 +++ b/Documentation/diff-options.txt
 @@ -24,6 +24,10 @@ ifndef::git-format-patch[]
  --patch::
   Generate patch (see section on generating patches).
   {git-diff? This is the default.}
 +ifdef::git-log[]
 + Changes introduced in merge commits are not displayed. Use `-c`,
 + `--cc` or `-m` to include them.
 +endif::git-log[]

 It probably is a better change to drop Use `-c`... and refer to
 the Diff formatting section.

 And then add '-p' and the fact that by default it will not show
 pairwise diff for merge commits to the Diff Formatting section.
 That is where -c/--cc/-m are already described.

Why not have it in both places?  This is really important.

I'm concerned that noone is taking this security risk seriously.  Just
because it doesn't show up in certain workflows doesn't make the risk
go away.

What about all the people who use git internally?  They aren't using
github and almost certainly aren't using a mail based system.

It's bad that we can't even set the right behaviour as a default.

John
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: git log -p unexpected behaviour - security risk?

2013-04-21 Thread John Tapsell
On 21 April 2013 11:21, Jonathan Nieder jrnie...@gmail.com wrote:
 John Tapsell wrote:

 I'm concerned that noone is taking this security risk seriously.

 If anyone relies on git log -p or git log -p --cc output to make
 sure that the untrusted code they use doesn't introduce unwanted
 behavior, they are making a serious mistake.

Which is exactly my problem.

Go and ask the average person using git this very question, and I bet
you the vast majority will not know about -cc etc.

You can't just push all the blame on the user for bad defaults.
Hiding code changes is a bad default.

 A merge can completely
 undo important changes made in a side branch and -c and --cc will
 not show it.

Wait, what?  This is getting even worse then!  Can you expand on this please?

And then how do I show all of these important changes with a git log -p ?
Or is it impossible to get a sane output?

  The lack of -c cannot be a security issue here,
 because in normal life adding -c isn't a secure deployment strategy.

So, is it impossible to make git log -p a secure deployment strategy ?

 That's why if you want to review the code you are pulling in as a
 whole, it is worthwhile to do

 git diff HEAD...FETCH_HEAD

Which basically means that you're asking the review the same code
twice.  Once that way, and once using git log -p (to check for the
exact reason that you said).

  Unfortunately that doesn't protect you from
 maliciously written commits that will be encountered when bisecting.
 At some point you have to be able to trust people.

Seriously?  Your reasoning for awful defaults is that you should just
trust people?

This is getting worse and worse!

John
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


git log -p unexpected behaviour - security risk?

2013-04-11 Thread John Tapsell
Hi,

  I noticed that code that you put in merge will not be visible by
default.  This seems like a pretty horrible security problem, no?

I made the following test tree, with just 3 commits:

https://github.com/johnflux/ExampleEvilness.git

Doing git log -p  shows all very innocent commits.  Completely
hidden is the change to add EVIL CODE MUWHAHAHA.

This seems really dangerous!

The evil code only shows up with the non-default  --cc or -m  option.

Is there a way to make --cc default?

John
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RFC: Very useful script to SVG graph the git commits from a file orientated view

2013-04-04 Thread John Tapsell
Hi,
  I made this script to help me see the logical connections between
commits.  It produces a .svg graph showing the commits that affected a
file.

For example, say you have the commits:

commit1 - modify hello.c
commit2 - modify goodbye.c
commit3 - modify hello.c and goodbye.c

It will draw a graph showing the first two commits as siblings, and
commit3 as a child of commit1 and commit2.

I have found this very useful when squashing and rebasing development
branches that have got a lot of fix typo and fix  type commit
messages.  From the graph you can quickly see which commit they were
fixing (the parent, in the graph).

Here is an example output, running it on kwin for the last 100 commits:

$ graph_git.pl --nofiles -100

http://imagebin.org/252754

And again with files for the last 10 commits:

$ graph_git.pl -10

http://imagebin.org/252756

(Note that it has tooltips)

JohnFlux
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: RFC: Very useful script to SVG graph the git commits from a file orientated view

2013-04-04 Thread John Tapsell
Opps, somehow I forgot to actually attach it.

It's now attached


graph_git.pl
Description: Binary data


Re: Hindi typing in ubuntu 12.10

2013-01-28 Thread John Tapsell
Hi,
  Qt uses harfbuzz to get the information.  You can do the same.

John

On 28 January 2013 10:45, Jürgen Spitzmüller sp...@lyx.org wrote:
 Jean-Marc Lasgouttes wrote:
 What I had in mind is the helper functions isHebrewComposeChar or
 isArabicComposeChar in Encoding.cpp. Actually, I am not sure why these
 could not just  be 'isComposeChar'. What does the language has to do
 with it? Is there a reason for testing the language as well as the code
 point?

 I understand that a compose char is a compose char. But how many compose chars
 are there over the whole unicode range? My point is: If Qt already knows this,
 and if we can catch this information, why should we hardcode a list of code
 points ourselves? (Note that I do not know whether Qt _really_ provides this
 information).

 Also, can you remember me why we paint char by char at all? If I set
 \force_paint_single_char to false, the ligatures automatically get painted
 correctly.

 Jürgen


Re: Hindi typing in ubuntu 12.10

2013-01-28 Thread John Tapsell
Hi,
  Qt uses harfbuzz to get the information.  You can do the same.

John

On 28 January 2013 10:45, Jürgen Spitzmüller  wrote:
> Jean-Marc Lasgouttes wrote:
>> What I had in mind is the helper functions isHebrewComposeChar or
>> isArabicComposeChar in Encoding.cpp. Actually, I am not sure why these
>> could not just  be 'isComposeChar'. What does the language has to do
>> with it? Is there a reason for testing the language as well as the code
>> point?
>
> I understand that a compose char is a compose char. But how many compose chars
> are there over the whole unicode range? My point is: If Qt already knows this,
> and if we can catch this information, why should we hardcode a list of code
> points ourselves? (Note that I do not know whether Qt _really_ provides this
> information).
>
> Also, can you remember me why we paint char by char at all? If I set
> \force_paint_single_char to false, the ligatures automatically get painted
> correctly.
>
> Jürgen


Re: [Intel-gfx] Regression due to: drm/i915: no lvds quirk for Zotac ZDBOX SD ID12/ID13

2013-01-10 Thread John Tapsell
Hi Daniel,

Attached is the dmidecode_output.txt

Just let me know if there is anything else that I can do to help.

John Tapsell

On 6 January 2013 21:13, Daniel Vetter daniel.vet...@ffwll.ch wrote:
 Now with the intel-gfx m-l address fixed ...
 -Daniel

 On Sun, Jan 6, 2013 at 10:13 PM, Daniel Vetter daniel.vet...@ffwll.ch wrote:
 Hi all,

 Looks ugly, and the original commit doesn't have any link to the
 dmidecode information. SjoerdJohn, can you both please attach the
 output of dmidecode? If we're lucky, we can differentiate the two
 models somehow, if not we need to revert this patch, since regressions
 win over simple bugs.

 Yours, Daniel

 On Tue, Dec 25, 2012 at 12:39 PM, John Tapsell johnf...@gmail.com wrote:
 I have a Zotac ZDBOX SD ID12  and the following commit means that I no
 longer have HDMI output.

 I've been told that I have a lvds-to-hdmi bridge, so this commit broke that.

 Commit:

 drm/i915: no lvds quirk for Zotac ZDBOX SD ID12/ID13

 BugLink: https://bugs.launchpad.net/bugs/1064924

 This box claims to have an LVDS interface but doesn't
 actually have one.

 Signed-off-by: Sjoerd Simons sjoerd.sim...@collabora.co.uk
 Signed-off-by: Daniel Vetter daniel.vet...@ffwll.ch
 (cherry picked from commit 9756fe38d10b2bf90c81dc4d2f17d5632e135364)

 Signed-off-by: Joseph Salisbury joseph.salisb...@canonical.com
 Signed-off-by: Tim Gardner tim.gard...@canonical.com



 --
 Daniel Vetter
 Software Engineer, Intel Corporation
 +41 (0) 79 365 57 48 - http://blog.ffwll.ch



 --
 Daniel Vetter
 Software Engineer, Intel Corporation
 +41 (0) 79 365 57 48 - http://blog.ffwll.ch
# dmidecode 2.11
SMBIOS 2.6 present.
22 structures occupying 1061 bytes.
Table at 0x000FB9E0.

Handle 0x, DMI type 0, 24 bytes
BIOS Information
Vendor: American Megatrends Inc.
Version: 080016 
Release Date: 12/23/2010
Address: 0xF
Runtime Size: 64 kB
ROM Size: 1024 kB
Characteristics:
ISA is supported
PCI is supported
PNP is supported
BIOS is upgradeable
BIOS shadowing is allowed
ESCD support is available
Boot from CD is supported
Selectable boot is supported
BIOS ROM is socketed
EDD is supported
5.25/1.2 MB floppy services are supported (int 13h)
3.5/720 kB floppy services are supported (int 13h)
3.5/2.88 MB floppy services are supported (int 13h)
Print screen service is supported (int 5h)
8042 keyboard services are supported (int 9h)
Serial services are supported (int 14h)
Printer services are supported (int 17h)
CGA/mono video services are supported (int 10h)
ACPI is supported
USB legacy is supported
LS-120 boot is supported
ATAPI Zip drive boot is supported
BIOS boot specification is supported
Targeted content distribution is supported
BIOS Revision: 8.16

Handle 0x0001, DMI type 1, 27 bytes
System Information
Manufacturer: ZOTAC
Product Name: ZBOXSD-ID12/ID13
Version: XX
Serial Number: G160X
UUID: 03000200-0400-0500-0006-000700080009
Wake-up Type: Power Switch
SKU Number: NA
Family: NA

Handle 0x0002, DMI type 2, 15 bytes
Base Board Information
Manufacturer: ZOTAC
Product Name: ZBOXSD-ID12/ID13
Version: XX
Serial Number: /sku
Asset Tag: NA
Features:
Board is a hosting board
Board is replaceable
Location In Chassis: NA
Chassis Handle: 0x0003
Type: Motherboard
Contained Object Handles: 0

Handle 0x0003, DMI type 3, 21 bytes
Chassis Information
Manufacturer: To Be Filled By O.E.M.
Type: Desktop
Lock: Not Present
Version: To Be Filled By O.E.M.
Serial Number: To Be Filled By O.E.M.
Asset Tag: To Be Filled By O.E.M.
Boot-up State: Safe
Power Supply State: Safe
Thermal State: Safe
Security Status: None
OEM Information: 0x
Height: Unspecified
Number Of Power Cords: 1
Contained Elements: 0

Handle 0x0004, DMI type 4, 42 bytes
Processor Information
Socket Designation: CPU 1
Type: Central Processor
Family: Atom
Manufacturer: Intel
ID: CA 06 01 00 FF FB EB BF
Signature: Type 0, Family 6, Model 28, Stepping 10
Flags:
FPU (Floating-point unit on-chip)
VME (Virtual mode extension)
DE (Debugging extension)
PSE (Page size extension)
TSC (Time stamp counter)
MSR (Model specific registers

Invitation to connect on LinkedIn

2013-01-07 Thread John Tapsell
LinkedIn




I'd like to add you to my professional network on LinkedIn.

- John

John Tapsell
Computer Programmer for Nokia
Brighton, United Kingdom

Confirm that you know John Tapsell:
https://www.linkedin.com/e/-abnzmn-hbnkozff-3b/isd/10339121136/WwQSGc6I/?hs=falsetok=0AsO8DlCfufBA1

--
You are receiving Invitation to Connect emails. Click to unsubscribe:
http://www.linkedin.com/e/-abnzmn-hbnkozff-3b/IXDnpZHn-CDwzobjOGDUaNuUFP5rIlT/goo/xdg%40freedesktop%2Eorg/20061/I3437833516_1/?hs=falsetok=2jUbaylYvufBA1

(c) 2012 LinkedIn Corporation. 2029 Stierlin Ct, Mountain View, CA 94043, USA.


  
___
xdg mailing list
xdg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xdg


Re: Review Request: ksysguard - Add rowspan/colspan support for displays

2013-01-05 Thread John Tapsell

---
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/107970/#review24696
---

Ship it!


Ship It!

- John Tapsell


On Dec. 28, 2012, 3:50 a.m., Arnav Singh wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 http://git.reviewboard.kde.org/r/107970/
 ---
 
 (Updated Dec. 28, 2012, 3:50 a.m.)
 
 
 Review request for kde-workspace.
 
 
 Description
 ---
 
 I've added support for sensor displays in KSysGuard to have row spans and 
 column spans.
 
 Apart from adding rowSpan and columnSpan arguments to the method signatures, 
 I've also removed the internal list (WorkSheet::mDisplayList) used to contain 
 all the sensor displays. This list used to be used to derived the row and 
 column of the displays based on their index in the list. Since I now need to 
 maintain rowSpan and columnSpan information as well, I just removed the list 
 entirely and get all my data from mGridLayout. As a result, another change in 
 the method signatures is the replacement of the index parameter with row 
 and column parameters.
 
 An extra advantage of doing it this way is that widgets don't shift around 
 when resizing the grid. Another advantage is that blank spaces between the 
 widgets are now possible. Not to mention, not maintaining the layout 
 information outside of the actual layout component (mGridLayout) seems a 
 clearer design to me.
 
 
 This addresses bug 311925.
 http://bugs.kde.org/show_bug.cgi?id=311925
 
 
 Diffs
 -
 
   ksysguard/gui/WorkSheet.h 9f4806d 
   ksysguard/gui/WorkSheet.cpp b20f077 
 
 Diff: http://git.reviewboard.kde.org/r/107970/diff/
 
 
 Testing
 ---
 
 Works on 4.9.4
 
 
 Screenshots
 ---
 
 Example
   http://git.reviewboard.kde.org/r/107970/s/936/
 
 
 Thanks,
 
 Arnav Singh
 




Re: Review Request: ksysguard - Add rowspan/colspan support for displays

2013-01-04 Thread John Tapsell
Hi,
  I'm the maintainer.  The review gets my approval, but I'm a bit busy.

  Can someone else apply this please?

Thank you very much,

John

On 4 January 2013 19:44, Arnavion arnav...@gmail.com wrote:

 Hi,
 I don't see this review request e-mail on the mailman archives, so I'm not
 sure it ever made it to the mailing list. Apologies if it did.
  I did get an e-mail that the message is being held until the list
 moderator can review it for approval, but I didn't receive any follow-up
 e-mails about that.
  Arnav Singh



 On Thu, Dec 27, 2012 at 7:50 PM, Arnav Singh arnav...@gmail.com wrote:

This is an automatically generated e-mail. To reply, visit:
 http://git.reviewboard.kde.org/r/107970/
   Review request for kde-workspace.
 By Arnav Singh.
 Description

 I've added support for sensor displays in KSysGuard to have row spans and 
 column spans.

 Apart from adding rowSpan and columnSpan arguments to the method signatures, 
 I've also removed the internal list (WorkSheet::mDisplayList) used to 
 contain all the sensor displays. This list used to be used to derived the 
 row and column of the displays based on their index in the list. Since I now 
 need to maintain rowSpan and columnSpan information as well, I just removed 
 the list entirely and get all my data from mGridLayout. As a result, another 
 change in the method signatures is the replacement of the index parameter 
 with row and column parameters.

 An extra advantage of doing it this way is that widgets don't shift around 
 when resizing the grid. Another advantage is that blank spaces between the 
 widgets are now possible. Not to mention, not maintaining the layout 
 information outside of the actual layout component (mGridLayout) seems a 
 clearer design to me.

   Testing

 Works on 4.9.4

   *Bugs: * 311925 http://bugs.kde.org/show_bug.cgi?id=311925
 Diffs

- ksysguard/gui/WorkSheet.h (9f4806d)
- ksysguard/gui/WorkSheet.cpp (b20f077)

 View Diff http://git.reviewboard.kde.org/r/107970/diff/
 Screenshots
 [image: Example] http://git.reviewboard.kde.org/r/107970/s/936/





[android-porting] CGroups with MULTIPLE_APPLICATION_UIDS

2012-10-11 Thread John Tapsell
Hi all,

  I have a fundamental problem understanding how CGroups and 
MULTIPLE_APPLICATION_UIDS  work together.

  The CGroups code doesn't allow you to move a process into a cgroup if the 
process doing the moving has a different UID than the target process.

  But in android, most processes have a different application uid.

  How is this supposed to work conceptually please?

(I'm still trying to solve the problem that system_server generates 
permission denied errors)

John

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-porting


[android-kernel] Re: Kernel porting ERRORs Failed setting process group of NNN to 0/1; add_tid_to_cgroup failed

2012-10-08 Thread John Tapsell
Thanks for the help Glenn - I now have more details.

The process triggering the warning is system_server, and this is running as 
user system.

It is trying to write the pid of various other processes 
(com.android.inputmethod.latin, com.android.phone. com.android.launcher, 
etc) into /dev/inputctl/tasks

But these other processes have a different uid (they run as user app_16, 
app_20, radio, etc)

So the kernel/cgroups.c  file does:

if (cred-euid 
cred-euid != tcred-uid 
cred-euid != tcred-suid) {
rcu_read_unlock();
cgroup_unlock();
return -EACCES;
}

It fails on the uid check, and returns an error.  (I put a printk here to 
confirm this, and confirm the difference in euid and uid)

Is system_server supposed to be running as user system, and is it 
supposed to be trying to change the cgroup of process owned by another user?

Thanks,

John

On Friday, 5 October 2012 17:14:25 UTC+1, Glenn Kasten wrote:

 I suggest getting a stack trace at the time of log, to see what is 
 happening.
 For example at that ALOGE also log the tid and fd, and then do an abort() 
 or *(char*) 0 = 0;
 This will prevent the system from running of course, but a logcat during 
 bootup should show why it's failing.


 On Wednesday, October 3, 2012 2:10:48 PM UTC-7, John Tapsell wrote:

 Hi Glenn,

   Can you give any more hints about what to look for in init.rc ?  The 
 cgroups code is exactly the same in my init.rc

   I have:

  ls -l /dev/cpuctl/tasks

 -rwxrwxrwx system   system  0 2000-01-01 00:23 tasks

 Yet I still get:

 W/SchedPolicy(  189): add_tid_to_cgroup failed to write '435' (Permission 
 denied); background=0

 etc.

 Any ideas please?

 John



 On Monday, 13 August 2012 17:44:35 UTC+1, Glenn Kasten wrote:

 Sometimes this is caused by incorrect init.rc.  Make sure your init.rc 
 has all of the latest changes from system/core/rootdir/init.rc especially 
 if you have forked it.

 You mentioned a lot of people have seen this .. were these on other 
 external postings or bug reports? if so can you please supply a link to 
 these, it will help diagnose to see the other reports. 

 On Friday, August 10, 2012 2:46:18 AM UTC-7, failuch wrote:

 Hello all,

 I saw that a lot of people encountered these error :

 W/ActivityManager(  349): Failed setting process group of 4911 to 0
 W/SchedPolicy(  349): add_tid_to_cgroup failed to write '4911' 
 (Permission denie
 d); background=1



 And I was unable to find explanation/solution  for this problem, 
 although 

 I have checked  cgroups are mounted and /dev/cpuctl/tasks exist

 Can you please to comment ?


 ThX



-- 
unsubscribe: android-kernel+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-kernel

[android-porting] CGroups - add_tid_to_cgroup failed to write

2012-10-04 Thread John Tapsell
 I've enabled cgroups on my android system, and now get lots of errors like:

W/SchedPolicy(  195): add_tid_to_cgroup failed to write '432'
(Permission denied); background=0

(For both background=0 and background=1, and for many different pids).
 I can't understand why I get this error though.

If I do su app_20 (for example), then echo 432  /dev/cpuctl/tasks
then this does not give any errors (although it's not added to the
list either).

I can't understand why I would be getting permission denied.  The mode
of /dev/cpuctl/tasks is 0777:

-rwxrwxrwx system   system  0 2000-01-01 13:21 tasks

Any ideas please?

John

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-porting


[android-kernel] Re: Kernel porting ERRORs Failed setting process group of NNN to 0/1; add_tid_to_cgroup failed

2012-10-04 Thread John Tapsell
Hi Glenn,

  Can you give any more hints about what to look for in init.rc ?  The 
cgroups code is exactly the same in my init.rc

  I have:

 ls -l /dev/cpuctl/tasks

-rwxrwxrwx system   system  0 2000-01-01 00:23 tasks

Yet I still get:

W/SchedPolicy(  189): add_tid_to_cgroup failed to write '435' (Permission 
denied); background=0

etc.

Any ideas please?

John



On Monday, 13 August 2012 17:44:35 UTC+1, Glenn Kasten wrote:

 Sometimes this is caused by incorrect init.rc.  Make sure your init.rc has 
 all of the latest changes from system/core/rootdir/init.rc especially if 
 you have forked it.

 You mentioned a lot of people have seen this .. were these on other 
 external postings or bug reports? if so can you please supply a link to 
 these, it will help diagnose to see the other reports. 

 On Friday, August 10, 2012 2:46:18 AM UTC-7, failuch wrote:

 Hello all,

 I saw that a lot of people encountered these error :

 W/ActivityManager(  349): Failed setting process group of 4911 to 0
 W/SchedPolicy(  349): add_tid_to_cgroup failed to write '4911' 
 (Permission denie
 d); background=1



 And I was unable to find explanation/solution  for this problem, although 

 I have checked  cgroups are mounted and /dev/cpuctl/tasks exist

 Can you please to comment ?


 ThX



-- 
unsubscribe: android-kernel+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-kernel

Re: systemd user session units for KDE

2012-06-24 Thread John Tapsell
On 24 June 2012 09:05, Thiago Macieira thi...@kde.org wrote:
 Hello

 One of my colleagues at Intel has begun working on a project to have systemd
 launch and manage the user session. He's asking for help in getting KDE
 supported, since it's not his area of expertise.

 Is there anyone interested in helping him?

Would there be any value in having System Activity (ctrl+esc thing)
understand systemd ?

It has been a dream of mine to end up with a task manager like
Windows, where you can shut down services nicely as well as kill the
processes.

JohnFlux


System Activity (ksysguard) bug fix

2012-06-06 Thread John Tapsell
Hi,

  Could you please include the System Activity fix for 290687 in the release?

  I have committed it to the KDE/4.8 branch.

Thanks,

John
___
release-team mailing list
release-team@kde.org
https://mail.kde.org/mailman/listinfo/release-team


Re: insert bibtex bibliography GUI proposal

2012-06-01 Thread John Tapsell
On 1 June 2012 07:56, Scott Kostyshak skost...@princeton.edu wrote:
 I find that the GUI for adding a bibtex bibliography is not optimized for
 the most common use: adding your own bibliography. Is it very common to use
 one of the example bibliographies? I also find that it's unintuitive if
 you're not used to it and want to add your own .bib. I remember thinking I
 was in the wrong place when I went to Add and was presented a list that I
 did not recognize. It took me a little while to realize that I had to go to
 Add and then Browse.

 I think that when you go to Add, it should have the same function as what is
 currently Add  Browse. I would propose putting a second Add button below
 the current Add button for the example .bibs.

Hi Scott,

  A week ago I posted a list of bugs that I would pay to get fixed.

  If you get anywhere with this, I'll send you $100.  I know it's
pittance, sorry.

John


Re: insert bibtex bibliography GUI proposal

2012-06-01 Thread John Tapsell
On 1 June 2012 09:40, Jürgen Spitzmüller sp...@lyx.org wrote:
 Liviu Andronic wrote:
 Definitely not. When I started using LyX, it took me several months to
 get to the bottom of how to use BibTeX bibliography. I even wrote a
 step-by-step procedure in the LyX Essentials [1] (see Section 12). I
 do not have any specific ideas GUI-wise, but I do think that it would
 be nice if the entire process of inserting your own citations could be
 rendered more intuitive.

 I think we need to improve the documentation.

If you need people to read documentation, the GUI is too complicated.

It should be so simple that you don't need documentation.

John


Re: "insert bibtex bibliography" GUI proposal

2012-06-01 Thread John Tapsell
On 1 June 2012 07:56, Scott Kostyshak  wrote:
> I find that the GUI for adding a bibtex bibliography is not optimized for
> the most common use: adding your own bibliography. Is it very common to use
> one of the example bibliographies? I also find that it's unintuitive if
> you're not used to it and want to add your own .bib. I remember thinking I
> was in the wrong place when I went to Add and was presented a list that I
> did not recognize. It took me a little while to realize that I had to go to
> Add and then Browse.
>
> I think that when you go to Add, it should have the same function as what is
> currently Add > Browse. I would propose putting a second "Add" button below
> the current "Add" button for the example .bibs.

Hi Scott,

  A week ago I posted a list of bugs that I would pay to get fixed.

  If you get anywhere with this, I'll send you $100.  I know it's
pittance, sorry.

John


Re: "insert bibtex bibliography" GUI proposal

2012-06-01 Thread John Tapsell
On 1 June 2012 09:40, Jürgen Spitzmüller  wrote:
> Liviu Andronic wrote:
>> Definitely not. When I started using LyX, it took me several months to
>> get to the bottom of how to use BibTeX bibliography. I even wrote a
>> step-by-step procedure in the LyX Essentials [1] (see Section 12). I
>> do not have any specific ideas GUI-wise, but I do think that it would
>> be nice if the entire process of inserting your own citations could be
>> rendered more intuitive.
>
> I think we need to improve the documentation.

If you need people to read documentation, the GUI is too complicated.

It should be so simple that you don't need documentation.

John


Re: Minor bug fixes

2012-05-09 Thread John Tapsell
On 9 May 2012 08:38, Pavel Sanda sa...@lyx.org wrote:
 John Tapsell wrote:
 Hi all,

   Here's some minor bug fixes for bugs that I've come across.

   The first moves the Latex Argument option for tables into the column
 property section in the dialog.  It got moved fairly recently by
 accidently I think.

 I would let this one for tabular guys, I have no idea where latex arg
 plays role. Anyway, please don't use any html inside .ui files,
 it does not fit well with translation machinery.

In the second patch I cleaned up the html and made it fairly minimal.
It shouldn't cause any problems with the translation machinery.  I've
personally worked on some of the i18n code in linux, adding better
support for vietnamese, thai and arabic.  If there are any actual bugs
here I'd like to know and would try to fix them upstream.

   The second fixes buddies in the same dialog (the connection between
 the labels and the widgets.  Important for accelerator)

 Shouldn't be the buddies for degrees empty? (There is no accel).

It's common to pass mouse clicks for a label through to the buddy to
focus it.  Particularly when you use voice commands or touchscreens.
Accessibility is a big topic.

John


Re: Minor bug fixes

2012-05-09 Thread John Tapsell
Here's another small patch.

It fixes the Page break on current row checkbox.  Currently if you
set it for a row in a table, you cannot unset it again.

I tested this and it seems to work, but I'm not sure if I'm doing the
right thing.

John
From 912f0dfbe62e07f3996a4e2dbc7fcd8899ac478d Mon Sep 17 00:00:00 2001
From: John Tapsell john.tapsell@basyskom.com
Date: Wed, 9 May 2012 10:49:03 +0100
Subject: [PATCH] Fix toggling the Page break on current row checkbox in the tabular dialog box

---
 src/frontends/qt4/GuiTabular.cpp |2 ++
 src/insets/InsetTabular.cpp  |8 +++-
 src/insets/InsetTabular.h|1 +
 3 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/src/frontends/qt4/GuiTabular.cpp b/src/frontends/qt4/GuiTabular.cpp
index 8a14cb7..79706d4 100644
--- a/src/frontends/qt4/GuiTabular.cpp
+++ b/src/frontends/qt4/GuiTabular.cpp
@@ -580,6 +580,8 @@ docstring GuiTabular::dialogToParams() const
 	//
 	if (newpageCB-isChecked())
 		setParam(param_str, Tabular::SET_LTNEWPAGE);
+else
+		setParam(param_str, Tabular::UNSET_LTNEWPAGE);
 	//
 	if (captionStatusCB-isChecked())
 		setParam(param_str, Tabular::SET_LTCAPTION);
diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp
index 00ee719..8e796db 100644
--- a/src/insets/InsetTabular.cpp
+++ b/src/insets/InsetTabular.cpp
@@ -165,6 +165,7 @@ TabularFeature tabularFeature[] =
 	{ Tabular::SET_LTLASTFOOT, set-ltlastfoot, true },
 	{ Tabular::UNSET_LTLASTFOOT, unset-ltlastfoot, true },
 	{ Tabular::SET_LTNEWPAGE, set-ltnewpage, false },
+	{ Tabular::UNSET_LTNEWPAGE, unset-ltnewpage, false },
 	{ Tabular::TOGGLE_LTCAPTION, toggle-ltcaption, false },
 	{ Tabular::SET_LTCAPTION, set-ltcaption, false },
 	{ Tabular::UNSET_LTCAPTION, unset-ltcaption, false },
@@ -4640,6 +4641,9 @@ bool InsetTabular::getStatus(Cursor  cur, FuncRequest const  cmd,
 		case Tabular::SET_LTNEWPAGE:
 			status.setOnOff(tabular.getLTNewPage(sel_row_start));
 			break;
+		case Tabular::UNSET_LTNEWPAGE:
+			status.setOnOff(!tabular.getLTNewPage(sel_row_start));
+			break;
 
 		// only one row in head/firsthead/foot/lasthead can be the caption
 		// and a multirow cannot be set as caption
@@ -5657,8 +5661,10 @@ void InsetTabular::tabularFeatures(Cursor  cur,
 		tabular.setLTFoot(row, flag, ltt, true);
 		break;
 
+	case Tabular::UNSET_LTNEWPAGE:
+		flag = false;
 	case Tabular::SET_LTNEWPAGE:
-		tabular.setLTNewPage(row, !tabular.getLTNewPage(row));
+		tabular.setLTNewPage(row, flag);
 		break;
 
 	case Tabular::SET_LTCAPTION: {
diff --git a/src/insets/InsetTabular.h b/src/insets/InsetTabular.h
index e765000..80958cc 100644
--- a/src/insets/InsetTabular.h
+++ b/src/insets/InsetTabular.h
@@ -233,6 +233,7 @@ public:
 		UNSET_LTLASTFOOT,
 		///
 		SET_LTNEWPAGE,
+		UNSET_LTNEWPAGE,
 		///
 		TOGGLE_LTCAPTION,
 		///
-- 
1.7.4.1



Re: Minor bug fixes

2012-05-09 Thread John Tapsell
On 9 May 2012 08:38, Pavel Sanda <sa...@lyx.org> wrote:
> John Tapsell wrote:
>> Hi all,
>>
>>   Here's some minor bug fixes for bugs that I've come across.
>>
>>   The first moves the Latex Argument option for tables into the column
>> property section in the dialog.  It got moved fairly recently by
>> accidently I think.
>
> I would let this one for tabular guys, I have no idea where latex arg
> plays role. Anyway, please don't use any html inside .ui files,
> it does not fit well with translation machinery.

In the second patch I cleaned up the html and made it fairly minimal.
It shouldn't cause any problems with the translation machinery.  I've
personally worked on some of the i18n code in linux, adding better
support for vietnamese, thai and arabic.  If there are any actual bugs
here I'd like to know and would try to fix them upstream.

>>   The second fixes buddies in the same dialog (the connection between
>> the labels and the widgets.  Important for accelerator)
>
> Shouldn't be the buddies for degrees empty? (There is no accel).

It's common to pass mouse clicks for a label through to the buddy to
focus it.  Particularly when you use voice commands or touchscreens.
Accessibility is a big topic.

John


Re: Minor bug fixes

2012-05-09 Thread John Tapsell
Here's another small patch.

It fixes the "Page break on current row" checkbox.  Currently if you
set it for a row in a table, you cannot unset it again.

I tested this and it seems to work, but I'm not sure if I'm doing the
right thing.

John
From 912f0dfbe62e07f3996a4e2dbc7fcd8899ac478d Mon Sep 17 00:00:00 2001
From: John Tapsell <john.tapsell@basyskom.com>
Date: Wed, 9 May 2012 10:49:03 +0100
Subject: [PATCH] Fix toggling the "Page break on current row" checkbox in the tabular dialog box

---
 src/frontends/qt4/GuiTabular.cpp |2 ++
 src/insets/InsetTabular.cpp  |8 +++-
 src/insets/InsetTabular.h|1 +
 3 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/src/frontends/qt4/GuiTabular.cpp b/src/frontends/qt4/GuiTabular.cpp
index 8a14cb7..79706d4 100644
--- a/src/frontends/qt4/GuiTabular.cpp
+++ b/src/frontends/qt4/GuiTabular.cpp
@@ -580,6 +580,8 @@ docstring GuiTabular::dialogToParams() const
 	//
 	if (newpageCB->isChecked())
 		setParam(param_str, Tabular::SET_LTNEWPAGE);
+else
+		setParam(param_str, Tabular::UNSET_LTNEWPAGE);
 	//
 	if (captionStatusCB->isChecked())
 		setParam(param_str, Tabular::SET_LTCAPTION);
diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp
index 00ee719..8e796db 100644
--- a/src/insets/InsetTabular.cpp
+++ b/src/insets/InsetTabular.cpp
@@ -165,6 +165,7 @@ TabularFeature tabularFeature[] =
 	{ Tabular::SET_LTLASTFOOT, "set-ltlastfoot", true },
 	{ Tabular::UNSET_LTLASTFOOT, "unset-ltlastfoot", true },
 	{ Tabular::SET_LTNEWPAGE, "set-ltnewpage", false },
+	{ Tabular::UNSET_LTNEWPAGE, "unset-ltnewpage", false },
 	{ Tabular::TOGGLE_LTCAPTION, "toggle-ltcaption", false },
 	{ Tabular::SET_LTCAPTION, "set-ltcaption", false },
 	{ Tabular::UNSET_LTCAPTION, "unset-ltcaption", false },
@@ -4640,6 +4641,9 @@ bool InsetTabular::getStatus(Cursor & cur, FuncRequest const & cmd,
 		case Tabular::SET_LTNEWPAGE:
 			status.setOnOff(tabular.getLTNewPage(sel_row_start));
 			break;
+		case Tabular::UNSET_LTNEWPAGE:
+			status.setOnOff(!tabular.getLTNewPage(sel_row_start));
+			break;
 
 		// only one row in head/firsthead/foot/lasthead can be the caption
 		// and a multirow cannot be set as caption
@@ -5657,8 +5661,10 @@ void InsetTabular::tabularFeatures(Cursor & cur,
 		tabular.setLTFoot(row, flag, ltt, true);
 		break;
 
+	case Tabular::UNSET_LTNEWPAGE:
+		flag = false;
 	case Tabular::SET_LTNEWPAGE:
-		tabular.setLTNewPage(row, !tabular.getLTNewPage(row));
+		tabular.setLTNewPage(row, flag);
 		break;
 
 	case Tabular::SET_LTCAPTION: {
diff --git a/src/insets/InsetTabular.h b/src/insets/InsetTabular.h
index e765000..80958cc 100644
--- a/src/insets/InsetTabular.h
+++ b/src/insets/InsetTabular.h
@@ -233,6 +233,7 @@ public:
 		UNSET_LTLASTFOOT,
 		///
 		SET_LTNEWPAGE,
+		UNSET_LTNEWPAGE,
 		///
 		TOGGLE_LTCAPTION,
 		///
-- 
1.7.4.1



Longtable captions

2012-05-08 Thread John Tapsell
Hi,

  At the moment adding captions to longtables requires manually adding lyx code.

  If someone makes this easier to do through the GUI without requiring
adding lyx code, I'll send them $50.  Any takers?

  I have a lot of requests like this, and could pay $50 for each
request that is done, if that is okay?  I know it's not much, and I
hope that it's not insulting.

John


Features Requested

2012-05-08 Thread John Tapsell
Hi,

  Could you please advise on the following features before I make bug
reports for them, and check whether they are already doable please?

  I will sponsor $50 towards any of the features that I listed,
possibly $100 for the more involved features.

1. Have the file-import filters work for snippets - so that we can
run the filters on clipboard data.  E.g. imagine being able to copy
from a webpage as html or a table from Excel and paste straight into
lyx.
2. When pasting into a table, automatically add new rows and columns
as needed.  Currently you have to make sure that you create the table
with exactly the right number of rows and columns.
3. Have a GUI way to set the padding between rows and columns in a
table.  I often have two rows like: 2.3% (+/- 3)   and want to
have 0 padding between those columns.
4. Have a way to collapse longtables in the same way that you can
collapse floats, just to hide them from the GUI.
5. Improve the preview for citations in the format Author (year).
Currently the preview doesn't match what you'll actually get at all.
6. Add a GUI way to change the natnib citation style from square
brackets to round brackets.  ( this seems to be a bug - see:
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg154523.html ).
Even better would be to add a GUI for all 6 of the \bibpunct
parameters.
7. Auto-reload when the bibliography .bib file is updated.  Add
ability to add/edit citations from the Insert-Citation gui.  This
could be as simple as loading the bib file in the default external
editor etc.

And minor bugs, with a $10 sponsorship for:

1. Please fix this crash when pasting into tables:
http://www.lyx.org/trac/ticket/7956  I tested out the proposed
solution but it means I can no longer paste into a table with that
fix.
2. If you make a table, make it a long table, then cut and paste it
into a float, then the GUI still thinks it is a longtable even though
it can't be.
3.


Minor bug fixes

2012-05-08 Thread John Tapsell
Hi all,

  Here's some minor bug fixes for bugs that I've come across.

  The first moves the Latex Argument option for tables into the column
property section in the dialog.  It got moved fairly recently by
accidently I think.

  The second fixes buddies in the same dialog (the connection between
the labels and the widgets.  Important for accelerator)

  The third fixes a null-pointer crash if a backend is missing when
viewing the source.

JohnFlux
From bf20c2c5db2284338489f003eb0e1b98d507dad4 Mon Sep 17 00:00:00 2001
From: John Tapsell john.tapsell@basyskom.com
Date: Tue, 8 May 2012 21:51:32 +0100
Subject: [PATCH 1/3] Latex Argument is a column property, move it in the UI.  Also add WhatsThis help

---
 src/frontends/qt4/ui/TabularUi.ui |  499 +
 1 files changed, 281 insertions(+), 218 deletions(-)

diff --git a/src/frontends/qt4/ui/TabularUi.ui b/src/frontends/qt4/ui/TabularUi.ui
index 39c0922..b636912 100644
--- a/src/frontends/qt4/ui/TabularUi.ui
+++ b/src/frontends/qt4/ui/TabularUi.ui
@@ -7,7 +7,7 @@
 x0/x
 y0/y
 width497/width
-height402/height
+height411/height
/rect
   /property
   property name=windowTitle
@@ -107,206 +107,6 @@
stringamp;Table Settings/string
   /attribute
   layout class=QGridLayout name=gridLayout_10
-   item row=0 column=0 colspan=2
-widget class=QGroupBox name=GroupBox12
- property name=title
-  stringColumn settings/string
- /property
- layout class=QGridLayout name=gridLayout
-  item row=0 column=0
-   widget class=QLabel name=hAlignLA
-property name=text
- stringamp;Horizontal alignment:/string
-/property
-property name=buddy
- cstringhAlignCO/cstring
-/property
-   /widget
-  /item
-  item row=0 column=1
-   widget class=QComboBox name=hAlignCO
-property name=toolTip
- stringHorizontal alignment in column/string
-/property
-property name=sizeAdjustPolicy
- enumQComboBox::AdjustToContents/enum
-/property
-item
- property name=text
-  stringJustified/string
- /property
-/item
-item
- property name=text
-  stringLeft/string
- /property
-/item
-item
- property name=text
-  stringCenter/string
- /property
-/item
-item
- property name=text
-  stringRight/string
- /property
-/item
-item
- property name=text
-  stringAt Decimal Separator/string
- /property
-/item
-   /widget
-  /item
-  item row=0 column=2
-   spacer name=horizontalSpacer
-property name=orientation
- enumQt::Horizontal/enum
-/property
-property name=sizeHint stdset=0
- size
-  width4/width
-  height20/height
- /size
-/property
-   /spacer
-  /item
-  item row=0 column=3 colspan=2
-   layout class=QHBoxLayout name=horizontalLayout
-item
- widget class=QLabel name=decimalLA
-  property name=enabled
-   boolfalse/bool
-  /property
-  property name=text
-   stringamp;Decimal separator:/string
-  /property
-  property name=buddy
-   cstringdecimalPointED/cstring
-  /property
- /widget
-/item
-item
- widget class=QLineEdit name=decimalPointED
-  property name=enabled
-   boolfalse/bool
-  /property
-  property name=sizePolicy
-   sizepolicy hsizetype=Minimum vsizetype=Fixed
-horstretch0/horstretch
-verstretch0/verstretch
-   /sizepolicy
-  /property
-  property name=maximumSize
-   size
-width20/width
-height16777215/height
-   /size
-  /property
-  property name=inputMask
-   string/
-  /property
-  property name=text
-   string/
-  /property
-  property name=maxLength
-   number32767/number
-  /property
-  property name=alignment
-   setQt::AlignCenter/set
-  /property
- /widget
-/item
-   /layout
-  /item
-  item row=1 column=0
-   widget class=QLabel name=columnWidthLA
-property name=text
- stringamp;Width:/string
-/property

Disabled by set options

2012-05-08 Thread John Tapsell
If you:

Create a Table.
Set it to be a longtable
Cut and paste it into a float

You end up in the situation of having a longtable inside a float.
Tabular::SET_LONGTABULAR is set to false but tabular.is_long_tabular
is true.

I'm not sure where exactly to fix this.  I couldn't see any precedence
in having setEnabled also toggling setOnOff.  Could someone advise me
which way they want this fixed please?

John


Re: Minor bug fixes

2012-05-08 Thread John Tapsell
Sorry, this patch updates the
0001-Latex-Argument-is-a-column-property-move-it-in-the-U.patch to
change a smart quote and clean up the html.

John
From 7147346b24b876b01ae72661fa8e866ea4bc588e Mon Sep 17 00:00:00 2001
From: John Tapsell john.tapsell@basyskom.com
Date: Tue, 8 May 2012 21:51:32 +0100
Subject: [PATCH 1/3] Latex Argument is a column property, move it in the UI.  Also add WhatsThis help

---
 src/frontends/qt4/ui/TabularUi.ui |  472 -
 1 files changed, 254 insertions(+), 218 deletions(-)

diff --git a/src/frontends/qt4/ui/TabularUi.ui b/src/frontends/qt4/ui/TabularUi.ui
index 39c0922..29f9155 100644
--- a/src/frontends/qt4/ui/TabularUi.ui
+++ b/src/frontends/qt4/ui/TabularUi.ui
@@ -7,7 +7,7 @@
 x0/x
 y0/y
 width497/width
-height402/height
+height411/height
/rect
   /property
   property name=windowTitle
@@ -107,206 +107,6 @@
stringamp;Table Settings/string
   /attribute
   layout class=QGridLayout name=gridLayout_10
-   item row=0 column=0 colspan=2
-widget class=QGroupBox name=GroupBox12
- property name=title
-  stringColumn settings/string
- /property
- layout class=QGridLayout name=gridLayout
-  item row=0 column=0
-   widget class=QLabel name=hAlignLA
-property name=text
- stringamp;Horizontal alignment:/string
-/property
-property name=buddy
- cstringhAlignCO/cstring
-/property
-   /widget
-  /item
-  item row=0 column=1
-   widget class=QComboBox name=hAlignCO
-property name=toolTip
- stringHorizontal alignment in column/string
-/property
-property name=sizeAdjustPolicy
- enumQComboBox::AdjustToContents/enum
-/property
-item
- property name=text
-  stringJustified/string
- /property
-/item
-item
- property name=text
-  stringLeft/string
- /property
-/item
-item
- property name=text
-  stringCenter/string
- /property
-/item
-item
- property name=text
-  stringRight/string
- /property
-/item
-item
- property name=text
-  stringAt Decimal Separator/string
- /property
-/item
-   /widget
-  /item
-  item row=0 column=2
-   spacer name=horizontalSpacer
-property name=orientation
- enumQt::Horizontal/enum
-/property
-property name=sizeHint stdset=0
- size
-  width4/width
-  height20/height
- /size
-/property
-   /spacer
-  /item
-  item row=0 column=3 colspan=2
-   layout class=QHBoxLayout name=horizontalLayout
-item
- widget class=QLabel name=decimalLA
-  property name=enabled
-   boolfalse/bool
-  /property
-  property name=text
-   stringamp;Decimal separator:/string
-  /property
-  property name=buddy
-   cstringdecimalPointED/cstring
-  /property
- /widget
-/item
-item
- widget class=QLineEdit name=decimalPointED
-  property name=enabled
-   boolfalse/bool
-  /property
-  property name=sizePolicy
-   sizepolicy hsizetype=Minimum vsizetype=Fixed
-horstretch0/horstretch
-verstretch0/verstretch
-   /sizepolicy
-  /property
-  property name=maximumSize
-   size
-width20/width
-height16777215/height
-   /size
-  /property
-  property name=inputMask
-   string/
-  /property
-  property name=text
-   string/
-  /property
-  property name=maxLength
-   number32767/number
-  /property
-  property name=alignment
-   setQt::AlignCenter/set
-  /property
- /widget
-/item
-   /layout
-  /item
-  item row=1 column=0
-   widget class=QLabel name=columnWidthLA
-property name=text
- stringamp;Width:/string
-/property
-property name=buddy
- cstringcolumnWidthED/cstring
-/property
-   /widget
-  /item
-  item row=1 column=1 colspan=3
-   layout class=QHBoxLayout name=horizontalLayout_2
-item
- widget class=QLineEdit name=columnWidthED

Longtable captions

2012-05-08 Thread John Tapsell
Hi,

  At the moment adding captions to longtables requires manually adding lyx code.

  If someone makes this easier to do through the GUI without requiring
adding lyx code, I'll send them $50.  Any takers?

  I have a lot of requests like this, and could pay $50 for each
request that is done, if that is okay?  I know it's not much, and I
hope that it's not insulting.

John


Features Requested

2012-05-08 Thread John Tapsell
Hi,

  Could you please advise on the following features before I make bug
reports for them, and check whether they are already doable please?

  I will sponsor $50 towards any of the features that I listed,
possibly $100 for the more involved features.

1. Have the file->import filters work for snippets - so that we can
run the filters on clipboard data.  E.g. imagine being able to copy
from a webpage as html or a table from Excel and paste straight into
lyx.
2. When pasting into a table, automatically add new rows and columns
as needed.  Currently you have to make sure that you create the table
with exactly the right number of rows and columns.
3. Have a GUI way to set the padding between rows and columns in a
table.  I often have two rows like: "2.3%" "(+/- 3)"   and want to
have 0 padding between those columns.
4. Have a way to collapse longtables in the same way that you can
collapse floats, just to hide them from the GUI.
5. Improve the "preview" for citations in the format Author (year).
Currently the preview doesn't match what you'll actually get at all.
6. Add a GUI way to change the natnib citation style from square
brackets to round brackets.  ( this seems to be a bug - see:
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg154523.html ).
Even better would be to add a GUI for all 6 of the \bibpunct
parameters.
7. Auto-reload when the bibliography .bib file is updated.  Add
ability to add/edit citations from the Insert->Citation gui.  This
could be as simple as loading the bib file in the default external
editor etc.

And minor bugs, with a $10 sponsorship for:

1. Please fix this crash when pasting into tables:
http://www.lyx.org/trac/ticket/7956  I tested out the proposed
solution but it means I can no longer paste into a table with that
fix.
2. If you make a table, make it a long table, then cut and paste it
into a float, then the GUI still thinks it is a longtable even though
it can't be.
3.


Minor bug fixes

2012-05-08 Thread John Tapsell
Hi all,

  Here's some minor bug fixes for bugs that I've come across.

  The first moves the Latex Argument option for tables into the column
property section in the dialog.  It got moved fairly recently by
accidently I think.

  The second fixes buddies in the same dialog (the connection between
the labels and the widgets.  Important for accelerator)

  The third fixes a null-pointer crash if a backend is missing when
viewing the source.

JohnFlux
From bf20c2c5db2284338489f003eb0e1b98d507dad4 Mon Sep 17 00:00:00 2001
From: John Tapsell <john.tapsell@basyskom.com>
Date: Tue, 8 May 2012 21:51:32 +0100
Subject: [PATCH 1/3] Latex Argument is a column property, move it in the UI.  Also add WhatsThis help

---
 src/frontends/qt4/ui/TabularUi.ui |  499 +
 1 files changed, 281 insertions(+), 218 deletions(-)

diff --git a/src/frontends/qt4/ui/TabularUi.ui b/src/frontends/qt4/ui/TabularUi.ui
index 39c0922..b636912 100644
--- a/src/frontends/qt4/ui/TabularUi.ui
+++ b/src/frontends/qt4/ui/TabularUi.ui
@@ -7,7 +7,7 @@
 0
 0
 497
-402
+411

   
   
@@ -107,206 +107,6 @@
Table Settings
   
   
-   
-
- 
-  Column settings
- 
- 
-  
-   
-
- Horizontal alignment:
-
-
- hAlignCO
-
-   
-  
-  
-   
-
- Horizontal alignment in column
-
-
- QComboBox::AdjustToContents
-
-
- 
-  Justified
- 
-
-
- 
-  Left
- 
-
-
- 
-  Center
- 
-
-
- 
-  Right
- 
-
-
- 
-  At Decimal Separator
- 
-
-   
-  
-  
-   
-
- Qt::Horizontal
-
-
- 
-  4
-  20
- 
-
-   
-  
-  
-   
-
- 
-  
-   false
-  
-  
-   Decimal separator:
-  
-  
-   decimalPointED
-  
- 
-
-
- 
-  
-   false
-  
-  
-   
-0
-0
-   
-  
-  
-   
-20
-16777215
-   
-  
-  
-   
-  
-  
-   
-  
-  
-   32767
-  
-  
-   Qt::AlignCenter
-  
- 
-
-   
-  
-  
-   
-
- Width:
-
-
- columnWidthED
-
-   
-  
-  
-   
-
- 
-  
-   true
-  
-  
-   Fixed width of the column
-  
-  
-   
-  
- 
-
-
- 
-
-   
-  
-  
-   
-
- Qt::Horizontal
-
-
- 
-  109
-  20
- 
-
-   
-  
-  
-   
-
- Vertical alignment in row:
-
-
- vAlignCO
-
-   
-  
-  
-   
-
- Specifies the vertical alignment of this cell in relation to the baseline of the row.
-
-
- 
-  Top
- 
-
-
- 
-  Middle
- 
-
-
- 
-  Bottom
- 
-
-   
-  
-  
-   
-
- Merge cells of different columns
-
-
- Multicolumn
-
-   
-  
- 
-
-   

 
  
@@ -561,21 +361,283 @@
  
 

-   
-
- 
-  LaTeX argument:
- 
- 
-  specialAlignmentED
- 
-
-   
-   
-
- 
-  Custom column format (LaTeX)
+   
+
+ 
+  Column settings
  
+ 
+  
+   
+
+ Horizontal ali

Disabled by set options

2012-05-08 Thread John Tapsell
If you:

Create a Table.
Set it to be a longtable
Cut and paste it into a float

You end up in the situation of having a longtable inside a float.
Tabular::SET_LONGTABULAR is set to false but tabular.is_long_tabular
is true.

I'm not sure where exactly to fix this.  I couldn't see any precedence
in having setEnabled also toggling setOnOff.  Could someone advise me
which way they want this fixed please?

John


Re: Minor bug fixes

2012-05-08 Thread John Tapsell
Sorry, this patch updates the
0001-Latex-Argument-is-a-column-property-move-it-in-the-U.patch to
change a smart quote and clean up the html.

John
From 7147346b24b876b01ae72661fa8e866ea4bc588e Mon Sep 17 00:00:00 2001
From: John Tapsell <john.tapsell@basyskom.com>
Date: Tue, 8 May 2012 21:51:32 +0100
Subject: [PATCH 1/3] Latex Argument is a column property, move it in the UI.  Also add WhatsThis help

---
 src/frontends/qt4/ui/TabularUi.ui |  472 -
 1 files changed, 254 insertions(+), 218 deletions(-)

diff --git a/src/frontends/qt4/ui/TabularUi.ui b/src/frontends/qt4/ui/TabularUi.ui
index 39c0922..29f9155 100644
--- a/src/frontends/qt4/ui/TabularUi.ui
+++ b/src/frontends/qt4/ui/TabularUi.ui
@@ -7,7 +7,7 @@
 0
 0
 497
-402
+411

   
   
@@ -107,206 +107,6 @@
Table Settings
   
   
-   
-
- 
-  Column settings
- 
- 
-  
-   
-
- Horizontal alignment:
-
-
- hAlignCO
-
-   
-  
-  
-   
-
- Horizontal alignment in column
-
-
- QComboBox::AdjustToContents
-
-
- 
-  Justified
- 
-
-
- 
-  Left
- 
-
-
- 
-  Center
- 
-
-
- 
-  Right
- 
-
-
- 
-  At Decimal Separator
- 
-
-   
-  
-  
-   
-
- Qt::Horizontal
-
-
- 
-  4
-  20
- 
-
-   
-  
-  
-   
-
- 
-  
-   false
-  
-  
-   Decimal separator:
-  
-  
-   decimalPointED
-  
- 
-
-
- 
-  
-   false
-  
-  
-   
-0
-0
-   
-  
-  
-   
-20
-16777215
-   
-  
-  
-   
-  
-  
-   
-  
-  
-   32767
-  
-  
-   Qt::AlignCenter
-  
- 
-
-   
-  
-  
-   
-
- Width:
-
-
- columnWidthED
-
-   
-  
-  
-   
-
- 
-  
-   true
-  
-  
-   Fixed width of the column
-  
-  
-   
-  
- 
-
-
- 
-
-   
-  
-  
-   
-
- Qt::Horizontal
-
-
- 
-  109
-  20
- 
-
-   
-  
-  
-   
-
- Vertical alignment in row:
-
-
- vAlignCO
-
-   
-  
-  
-   
-
- Specifies the vertical alignment of this cell in relation to the baseline of the row.
-
-
- 
-  Top
- 
-
-
- 
-  Middle
- 
-
-
- 
-  Bottom
- 
-
-   
-  
-  
-   
-
- Merge cells of different columns
-
-
- Multicolumn
-
-   
-  
- 
-
-   

 
  
@@ -561,21 +361,256 @@
  
 

-   
-
- 
-  LaTeX argument:
- 
- 
-  specialAlignmentED
- 
-
-   
-   
-
- 
-  Custom column format (LaTeX)
+   
+
+ 
+  Column settings
  
+ 
+  
+   
+
+ Horizontal alignment:
+
+
+ hAlignCO
+
+   
+  
+  
+   
+
+ Horizontal alignment in column
+
+
+ QComboBox::AdjustToContents
+
+
+ 
+  Jus

Re: [HarfBuzz] Thai Patches

2012-01-23 Thread John Tapsell
On 23 January 2012 00:13, Behdad Esfahbod beh...@behdad.org wrote:
 On 01/19/2012 03:48 AM, John Tapsell wrote:
 Thanks - it's already merged now in Qt :-)

 Same patch exactly?  In that case I'll push it upstream.


Hmm, no.  Hold off, and I'll get round to preparing a diff for you.  I
have a bunch more patches to apply first though.
___
HarfBuzz mailing list
HarfBuzz@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/harfbuzz


Re: [HarfBuzz] ZWJ/ZWNJ and harfbuzz

2012-01-22 Thread John Tapsell
Please check ZWJ characters mixed in with thai when testing these
patches.  I have some patches to deal with this case for Qt but they
haven't been merged yet.  (I only wrote them yesterday).

On 22 January 2012 11:15, Harshula harsh...@gmail.com wrote:
 Hi Behdad,

 Just wondering if you've come across these bugs and whether harfbuzz is
 the only remaining obstacle in order for this to work correctly?

 https://bugs.webkit.org/show_bug.cgi?id=72984

 https://code.google.com/p/chromium/issues/detail?id=45840

 cya,
 #

 ___
 HarfBuzz mailing list
 HarfBuzz@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/harfbuzz
___
HarfBuzz mailing list
HarfBuzz@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/harfbuzz


Re: [HarfBuzz] Thai Patches

2012-01-19 Thread John Tapsell
Thanks - it's already merged now in Qt :-)

John

On 19 January 2012 04:01, Behdad Esfahbod beh...@behdad.org wrote:
 On 11/03/2011 04:33 AM, John Tapsell wrote:
 Hi all,
   Could someone review this bug fix please?

 Not really.  Old HarfBuzz is unmaintained and I don't have the bandwidth to go
 through this.

 If you can tell me what the code is supposed to do, I can try to make sure
 it's implemented in the new HarfBuzz.

 behdad


 We need it urgently for
 thai support:

   
 http://linux.thai.net/websvn/wsvn/software.qt/trunk/qt-everywhere-opensource-4.7.0/qt-4.7.0-harfbuzz_thai.patch

 Thanks,

 JohnFlux
 ___
 HarfBuzz mailing list
 HarfBuzz@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/harfbuzz

___
HarfBuzz mailing list
HarfBuzz@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/harfbuzz


Re: [HarfBuzz] Rendering Thai

2011-11-10 Thread John Tapsell
The harfbuzz-thai patch at:

http://linux.thai.net/websvn/wsvn/software.qt/trunk/qt-everywhere-opensource-4.7.0/?#ad73b806583aa98bb601f6b456fa92491

Along with installing libthai solves the rendering problem.

Could someone have a look and tell me what they think please?

John


On 10 November 2011 14:24, John Tapsell johnf...@gmail.com wrote:
 Hi,

  With harfbuzz.old (Qt's version), when I render the string: ซ้ำ I
 get the output:

 http://imageupload.org/download.php?id=132574type=2

 W = Waree font
 T = Tahoma font
 N = Nokia Pure Text AS font

 The first one is rendered correctly.  The o thingy is rendered in
 the right place.  The second and third ones are incorrectly rendered.

 I get the same, incorrect, result with harfbuzz-ng, using the command:

 ./hb-view --annotate tahoma.ttf ซ้ำ  thai.png

 It renders incorrectly in openoffice and correctly in gedit, using
 Tahoma for both.

 John

___
HarfBuzz mailing list
HarfBuzz@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/harfbuzz


[HarfBuzz] Thai Patches

2011-11-03 Thread John Tapsell
Hi all,
  Could someone review this bug fix please?  We need it urgently for
thai support:

  
http://linux.thai.net/websvn/wsvn/software.qt/trunk/qt-everywhere-opensource-4.7.0/qt-4.7.0-harfbuzz_thai.patch

Thanks,

JohnFlux
___
HarfBuzz mailing list
HarfBuzz@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/harfbuzz


Re: [HarfBuzz] Patch for harfbuzz

2011-10-26 Thread John Tapsell
On 26 October 2011 10:14, John Tapsell johnf...@gmail.com wrote:
 Khaled,

  Oh well.  I am very pleased to see that you came up with the exact same 
 patch.
  Hopefully together we can now get this fixed.

 John

What happens next?

I found a post from January 13th from Jjgod Jiang saying that he will
integrate the patch:

http://lists.freedesktop.org/archives/harfbuzz/2011-January/001069.html

John
___
HarfBuzz mailing list
HarfBuzz@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/harfbuzz


Re: SensorLogger in ksysguard is not writing on disk file

2011-10-11 Thread John Tapsell
Hi Francesco,

  I'm the maintainer of the ksysguard app.  I haven't looked at the
sensor logging code for years - I wouldn't be surprised at all if it
has stopped working (bit rot).  You're welcome to hire me to fix it,
file a bug report on kde.bugs.org, or fix it yourselves if you can.  I
welcome patches.



Sorry for the bugs,

John Tapsell

On 11 October 2011 13:13, Francesco Lazzarotto
francesco.lazzaro...@iasf-roma.inaf.it wrote:
 Hi everybody, please apologise me if this is not the suitable mailing list,
 but I haven't found a more specific list ... i'd like to ask for some help in
 troubleshooting a ksysguard app. feature, to use it in my work at our lab
 data-centre, to monitor some server resources.
 I'm using ksysguard on kde 4.4.x and 4.6.y, and all seems to go fine, except
 for the SensorLogger function ... I'm trying to make ksysguard write sensor
 values on a text log file, as provided by the specific sensor type and 
 following
 the user manual instructions.
 But I can't succeed in starting the file logging right clicking on the sensor
 pad, because when I right click I can't get this option, and  the red cross
 icon remains at the beginning of the file loggin line ... please can you help
 me? Do you know how to start loggin in any other way? Have I a bug in my
 ksysguard version??
 Thank you very much for your answer.

 Francesco.
 --
 Francesco Lazzarotto, PhD.
 Istituto di Astrofisica Spaziale
 e Fisica Cosmica (IASF) - INAF.
 [National Institute for Space Astrophysics]
 http://www.iasf-roma.inaf.it/indexen.htm
 c/o Consiglio Nazionale delle Ricerche (CNR)
 Area di Ricerca di Tor Vergata,
 via Fosso del Cavaliere, 100.
 00133 - Roma
 tel +39 06 49934430
 fax +39 06 45488188
 mobile +39 335 7126078
 email 1: francesco.lazzaro...@iasf-roma.inaf.it
 email 2: flazzarot...@alice.it
 http://www.linkedin.com/in/francescolazzarotto

 Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe 


 Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe 


Re: SensorLogger in ksysguard is not writing on disk file

2011-10-11 Thread John Tapsell
Good to hear!

If you have ubuntu, the fastest way to get developing is to do something like:

sudo apt-get install project-neon-utils project-neon-kdelibs

git clone kde:kde-workspace.git

neon-env

cd kde-workspace

neonmake



or something like that, off the top of my head.  The code is in the
folder  ksysguard/gui/

John


On 11 October 2011 13:39, Francesco Lazzarotto
francesco.lazzaro...@iasf-roma.inaf.it wrote:
 Hello John,
 thank you very much for your answer, now I'm going to download the source
 code for ksysguard, and compiling it, to check if also the version compiled
 from source have the same bug. I reported yet what I'm experiencing with
 ksysguard adding a post on the related bug item at bugs.kde.org
 https://bugs.kde.org/show_bug.cgi?id=223094
 If it's really a bug I believe that the sensor logging feature is not used
 very much, so not many people are complaining for this problem ...
 As soon I will have some more news about this problem I will report it to you.
 Thank you again,
 Francesco.

 In data martedì 11 ottobre 2011 14:19:14, John Tapsell ha scritto:
 Hi Francesco,

   I'm the maintainer of the ksysguard app.  I haven't looked at the
 sensor logging code for years - I wouldn't be surprised at all if it
 has stopped working (bit rot).  You're welcome to hire me to fix it,
 file a bug report on kde.bugs.org, or fix it yourselves if you can.  I
 welcome patches.



 Sorry for the bugs,

 John Tapsell

 On 11 October 2011 13:13, Francesco Lazzarotto

 francesco.lazzaro...@iasf-roma.inaf.it wrote:
  Hi everybody, please apologise me if this is not the suitable mailing
  list, but I haven't found a more specific list ... i'd like to ask for
  some help in troubleshooting a ksysguard app. feature, to use it in my
  work at our lab data-centre, to monitor some server resources.
  I'm using ksysguard on kde 4.4.x and 4.6.y, and all seems to go fine,
  except for the SensorLogger function ... I'm trying to make ksysguard
  write sensor values on a text log file, as provided by the specific
  sensor type and following the user manual instructions.
  But I can't succeed in starting the file logging right clicking on the
  sensor pad, because when I right click I can't get this option, and  the
  red cross icon remains at the beginning of the file loggin line ...
  please can you help me? Do you know how to start loggin in any other
  way? Have I a bug in my ksysguard version??
  Thank you very much for your answer.
 


 --
 Francesco Lazzarotto, PhD.
 Istituto di Astrofisica Spaziale
 e Fisica Cosmica (IASF) - INAF.
 [National Institute for Space Astrophysics]
 http://www.iasf-roma.inaf.it/indexen.htm
 c/o Consiglio Nazionale delle Ricerche (CNR)
 Area di Ricerca di Tor Vergata,
 via Fosso del Cavaliere, 100.
 00133 - Roma
 tel +39 06 49934430
 fax +39 06 45488188
 mobile +39 335 7126078
 email 1: francesco.lazzaro...@iasf-roma.inaf.it
 email 2: flazzarot...@alice.it
 http://www.linkedin.com/in/francescolazzarotto



 Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe 


Allow users to donate money towards bugs

2011-09-22 Thread John Tapsell
Hi all,

  I think it would really help with bug reports if we let people
donate money towards getting bugs fixed.  If there are lots of users
annoyed by a bug, and there's no longer a maintainer for that code,
then it makes a lot of sense to let those users contribute money
towards the bug fix until the financial incentive is large enough for
someone to step up and fix it.

John

 Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe 


Re: invest money in free software?

2011-09-22 Thread John Tapsell
On 22 September 2011 10:04, Robert Klotzner robert.klotz...@gmx.at wrote:
 As I am thinking about creating a platform for exactly this purpose, you made
 me curious. Could you point me to the thread where this was discussed or maybe
 some could highlight the basic reasons why this idea was shot down?

Have a google around for old threads, but the objections are usually
along the lines of that:

1. It might de-motivate the developers that code for free.
2. What to do if someone commits a bad fix that another developer then
has to go in and fix.  Who then gets the money?
3. It might create a situation where someone writes a feature for
money but won't maintain it.  Do we want more unmaintained half-broken
features?
4. What to do when a bug fix requires changes done by lots of people,
who gets the actual money?  Will it cause resentment to those who
helped but didn't get the money?

This has been tried before.  An ubuntu brainstorm on it:
http://brainstorm.ubuntu.com/item/1295/

Read the comments there and duplicates for more info and a list of
existing websites:

http://www.cofundos.org/
http://bountycounty.org/
http://www.opensourcexperts.com/bountylist.html
https://www.bountysource.com/


John

 Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe 


Re: systemd and KDE (was: Re: kdeinit)

2011-09-14 Thread John Tapsell
Regarding integration - for a long time I've been interested in adding
support to System Activity (ctrl+esc thingy).  In Windows, the task
manager has a tab for both processes and for services, and you can
switch between the two.  So you can right click on a process and jump
to its service, and vice versa.  This integration makes a lot of sense
since its often better to stop the service than to just kill the
process.

I've been somewhat waiting for the fight between upstart and systemd
to be resolved, and also it would be good to have the following DBUS
calls available to non-root users:

1) Return a list of currently running / stopped / runnable / etc  services
2) Provide user-friendly information about each service.  (Short
description that I can show to the user)
3) Provide a list of PIDs for a given service
4) Return the service for a given PID

Can these calls be added if necessary please?

JohnFlux


Re: KDE build Virtual Machines

2011-04-19 Thread John Tapsell
 It would be useful for me too. Thank you!

For all those saying that it would be useful, could you say whether
you've seen Project Neon, and if so why it doesn't already do what you
need?

John
 
 Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe 


KLocalizedString regression

2011-03-25 Thread John Tapsell
Hi all,

 ki18ncp(Units, %1 second, %1 seconds).subs(1.1, 0, 'f', 1).toString()

used to work  (return 1.1 seconds)  but now it returns (1.1
seconds(I18N_PLURAL_ARGUMENT_MISSING))  which screws up my graphing
widget.

This causes my unit tests to fail.

Can someone fix this pretty please?  I can't work around this.

John


Re: KLocalizedString regression

2011-03-25 Thread John Tapsell
On 25 March 2011 12:45, Chusslove Illich caslav.i...@gmx.net wrote:
 [: John Tapsel :]
   ki18ncp(Units, %1 second, %1 seconds).subs(1.1, 0, 'f', 1).toString()

 used to work (return 1.1 seconds) but now it returns (1.1
 seconds(I18N_PLURAL_ARGUMENT_MISSING)) which screws up my graphing
 widget.

 This is the way it (should have) always worked. The plural call expects to
 get an integer, and if does not, it shows this warning (in debug build, not
 in release build).

That's not good :-(

If the number is small, I want to show   2 seconds   but if it's
large I want like 2.2e4 seconds.

You're saying that my API needs to require the user to now pass *two*
strings for that?

 On the language level, plural declination kicks in only on integer values,
 while real values always get plural form. This seems to hold for all
 languages currently known in KDE. In English, all of 1.0 seconds,
 1.1 seconds, 1.3 seconds, and 2.3 seconds, are (?) both correct and
 expected forms, as opposed to 1 second and 2 seconds.


And that's fine.  So do that.  But don't stick a big warning there!

If I specify a precision of 0, then it should be   1 second.  If the
precision is 1 then 1.0 seconds is fine.

John


Re: KLocalizedString regression

2011-03-25 Thread John Tapsell
On 25 March 2011 13:19, Chusslove Illich caslav.i...@gmx.net wrote:
 [: John Tapsell :]
 If the number is small, I want to show 2 seconds but if it's large I
 want like 2.2e4 seconds.

 You're saying that my API needs to require the user to now pass *two*
 strings for that?

 Well, yes. Two grammar-wise different text fragments (enumerable vs.
 measurable quantities) are being used in alternation, so each should be
 represented by its own string. The author of KUnitConversion wanted the same
 feature, so there too we ended up defining two strings, e.g:

      setDefaultUnit(UP(Meter, 1,
        ...
        ki18nc(amount in units (real), %1 meters),
        ki18ncp(amount in units (integer), %1 meter, %1 meters)
      ));

Except that in my case, I'm forcing this on the users of my API.  Just
to get around this!

Can't you see how crazy this is?

 In my opinion, however, this alternation is bad style-wise. The display
 should use either the measurable form throughout (2.0 seconds; 2.2e4
 seconds), or the enumerable form throughout (2 seconds; 6 hours 6 minutes).

But what if I want to allow both?  This is for labelling the axis of a
graph.  I now have to have an API and forces the users to give the
same string twice.


Re: KLocalizedString regression

2011-03-25 Thread John Tapsell
On 25 March 2011 13:59, John Tapsell johnf...@gmail.com wrote:
 On 25 March 2011 13:19, Chusslove Illich caslav.i...@gmx.net wrote:
 [: John Tapsell :]
 If the number is small, I want to show 2 seconds but if it's large I
 want like 2.2e4 seconds.

 You're saying that my API needs to require the user to now pass *two*
 strings for that?

 Well, yes. Two grammar-wise different text fragments (enumerable vs.
 measurable quantities) are being used in alternation, so each should be
 represented by its own string. The author of KUnitConversion wanted the same
 feature, so there too we ended up defining two strings, e.g:

      setDefaultUnit(UP(Meter, 1,
        ...
        ki18nc(amount in units (real), %1 meters),
        ki18ncp(amount in units (integer), %1 meter, %1 meters)
      ));

 Except that in my case, I'm forcing this on the users of my API.  Just
 to get around this!

 Can't you see how crazy this is?

 In my opinion, however, this alternation is bad style-wise. The display
 should use either the measurable form throughout (2.0 seconds; 2.2e4
 seconds), or the enumerable form throughout (2 seconds; 6 hours 6 minutes).

 But what if I want to allow both?  This is for labelling the axis of a
 graph.  I now have to have an API and forces the users to give the
 same string twice.


Chusslove, I just had an idea - so okay, if I'm forced to work around
this feature, could I do:

string.remove((I18N_PLURAL_ARGUMENT_MISSING));

This string won't change, and isn't translated right?

John


Re: KLocalizedString regression

2011-03-25 Thread John Tapsell
On 25 March 2011 14:20, Thiago Macieira thi...@kde.org wrote:
 Em sexta-feira, 25 de março de 2011, às 13:59:11, John Tapsell escreveu:
  Well, yes. Two grammar-wise different text fragments (enumerable vs.
  measurable quantities) are being used in alternation, so each should be
  represented by its own string. The author of KUnitConversion wanted the
  same feature, so there too we ended up defining two strings, e.g:
 
       setDefaultUnit(UP(Meter, 1,
         ...
         ki18nc(amount in units (real), %1 meters),
         ki18ncp(amount in units (integer), %1 meter, %1 meters)
       ));

 Except that in my case, I'm forcing this on the users of my API.  Just
 to get around this!

 Can't you see how crazy this is?

 No. You haven't said anything about your API yet.

 Maybe the problem is in the API. But we don't know, because you haven't
 included a link to what API you're talking about.

I have a widget, KSignalPlotter, which plots data points.

The usage is:

KSignalPlotter plotter;
plotter.setUnit( ki18ncp(Units, %1 second, %1 seconds) );
plotter.addBeam(Qt::red);
plotter.addSample( QListqreal()  2 );

For example.

The axis will then be labelled using the unit string.  The precision
will be calculated automatically.

 Huh? Why do you want to show 1.0 seconds in the axis? Shouldn't you have
 1.0 in the axis and then seconds in the axis label?

Because typically we have a lot more horizontal space than vertical
space.  Adding room for axis labels would take up valuable vertical
space.

John


Re: KLocalizedString regression

2011-03-25 Thread John Tapsell
On 25 March 2011 21:42, Chusslove Illich caslav.i...@gmx.net wrote:
 [: John Tapsell :]
 Except that in my case, I'm forcing this on the users of my API. Just to
 get around this!

 Can't you see how crazy this is?

 An integer is mandatory to decide the plural form, a float cannot be used,
 due to the following. Suppose there are m plural forms for a given language.
 The plural call pushes the integer through a formula, defined by that
 language (by each PO file to be precise), which maps it to 0 through m - 1.
 If the plural call would get a float instead, how should it decide which of
 the m forms to map to? For example, in my language forms are 0 through 3,
 and the correct one for a floating value is 2 -- not 0, 1, or 3.

 On the implementation level, what happens now when you do not supply an
 integer, is that non-plural call is simply passed down to non-plural
 gettext() from libc. It is a fluke that for English it silently returns the
 plural, and not the singular string. For all I know, if the libc were built
 in develop/debug mode (I use distribution package), it could do something
 else.

 Therefore two independent KLocalizedString parameters are indeed necessary
 for the API, if you want to keep the integer/real alternation. Since it is
 about graph plotting, I suggest that you make the API such that the real-
 value string is mandatory, and the integer-value string optional. I.e. let
 the client choose if he wants alternation or not.

Thank you very much your explanation - it makes a lot more sense to me now :-)

 Furthermore, I would suggest that the axis tick labels be pure numbers, and
 the axis name and unit shown separate in one place, e.g:

  --
  0     1     2     3     4     5     6
              time [seconds]

As an published engineer myself, I fully understand.  But there's a
few practical problems - we do not have much vertical space, for
example.  Putting on such an axis would pretty much halve the height
available for the graph itself.

If you were thinking of this for the vertical axis, then you are
either asking for vertical text, which is evil, or a huge amount of
wasted on the left hand side.

John


Re: 4.6 branches created in git again

2011-03-20 Thread John Tapsell
Why do we let people create branches on the main git server anyway?


Re: 4.6 branches created in git again

2011-03-20 Thread John Tapsell
On 20 March 2011 15:01, Albert Astals Cid aa...@kde.org wrote:
 A Diumenge, 20 de març de 2011, John Tapsell va escriure:
 Why do we let people create branches on the main git server anyway?

 How are you supposed to work on a feature-branch otherwise?

By having it in your own git repository.  This is how Qt does it.
Anyone can clone the Qt repository on the server and create branches
in their own clone.
For example, here is mine:  http://qt.gitorious.org/~johnflux- and
other people can (and do) work on it.

John


How to know if I'm showing a tooltip?

2011-03-18 Thread John Tapsell
Hi all,

  When the user hovers over an item, it shows a tooltip.  I update
that tooltip once a second using the following code:

if(QToolTip::isVisible()) {
QWidget *w = d-mUi-treeView-viewport();
if(w-geometry().contains(d-mUi-treeView-mapFromGlobal(
QCursor::pos() ))) {
QHelpEvent event(QEvent::ToolTip, w-mapFromGlobal(
QCursor::pos() ), QCursor::pos());
qApp-notify(w, event);
}
}

This works, but the trouble is is that the tooltip could be visible
due to a dialog window.  So if I open a dialog box, then hover over an
item in that dialog box, it shows the correct tooltip for a moment,
then changes to the tooltip for the main window underneath, due to
that code I pasted above.

I've tried   window()-isActiveWindow()  which partially solves the
problem, but it's possible to have a dialog box on top, but have the
main window have the focus..

Any ideas?

JohnFlux


Re: How to know if I'm showing a tooltip?

2011-03-18 Thread John Tapsell
On 18 March 2011 11:24, John Tapsell johnf...@gmail.com wrote:
 I've tried   window()-isActiveWindow()  which partially solves the
 problem, but it's possible to have a dialog box on top, but have the
 main window have the focus..


I figured it out - I just need:

if (QToolTip::isVisible()  qApp-topLevelAt(QCursor::pos())
== window()) {

JohnFlux


Re: Future of KSysguard - removing remote monitoring

2011-03-10 Thread John Tapsell
On 10 March 2011 14:43, Cristian Tibirna tibi...@kde.org wrote:
 On March 8, 2011, John Tapsell wrote:
 Hi all,

   For the past 13 years or so, ksysguard has been in KDE under various
 names.  Right from the beginning it was designed to monitor remote
 systems as well as local ones.

 John, thanks a lot for taking care of ksysguard. I consider it one of the best
 applications of the KDE basic workspace. I push it energetically on all sys-
 admins I find (and usually they're easily convinced).

 I believe the most important feature of ksysguard is its remote capability. I
 must acknowledge that I know very little of the mechanics of this feature (yet
 I know it is developed in-house, since at the time (long ago...), Chris
 Schlaeger didn't really have much choice in terms of monitoring libraries).

 I dare to ask you consider to not remove this feature. Perhaps your
 observation is rather an occasion to look at some redesign (and reuse of
 better (?) technologies in remote monitoring).


Thanks - you guys have already changed my mind :-)

John


  1   2   3   >