[sip-comm-dev] [PATCH] fix for Account settings dialog


#1

Hi,

here is my patch
It prevent a NPE from happening when trying to delete or edit an account if
none is selected.
It also disable those two buttons.
And the AccountList now use a single selection model

Matthieu

account_settings_patch.txt (2.6 KB)

···

2009/9/30 Lubomir Marinov <lubomir.marinov@gmail.com>

Hello Matthieu,

Thank your for the bug report! Your patch will be welcome.

I personally think that the buttons should be disabled when they
cannot be applied to the current selection i.e. the button to modify
an account should be enabled when there is only one account selected
and the button to delete accounts should be enabled when there's at
least one selected account.

Regards,
Lubomir

On Wed, Sep 30, 2009 at 6:20 PM, Matthieu Casanova > <chocolat.mou@gmail.com> wrote:
> Hi,
>
> it is my first attempt to report a bug on Sip communicator and I was
unable
> to look at the issue tracker because I had timeout on the web server so I
> post that here :
>
> in the Parameters dialog, on the Account page,
> if no account are selected clicking on Edit or Delete buttons does NPE,
I
> use the latest trunk version.
> I could submit a small patch for that but it is very easy to fix, another
> idea would be to disable those buttons when no selection is available, I
> could also submit a patch if you want
>
> Matthieu

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#2

Hi Matthieu,

Thank you for the contribution!

In order to accept a patch, we'd like it to follow our coding convention published at http://www.sip-communicator.org/index.php/Documentation/CodeConvention. In the case of your patch, it would at least be necessary to change the class imports to a star import.

More importantly though, I'm not sure why we'd want to change the selection mode of the account list to single. For what it's worth, I still find it useful to select multiple accounts and delete them by once clicking the respective button. Could you please elaborate on the reasoning behind this change?

Thank you,
Lubomir

···

On 1.10.2009 18:43, Matthieu Casanova wrote:

Hi,

here is my patch
It prevent a NPE from happening when trying to delete or edit an account if none is selected.
It also disable those two buttons.
And the AccountList now use a single selection model

Matthieu

2009/9/30 Lubomir Marinov <lubomir.marinov@gmail.com <mailto:lubomir.marinov@gmail.com>>

    Hello Matthieu,

    Thank your for the bug report! Your patch will be welcome.

    I personally think that the buttons should be disabled when they
    cannot be applied to the current selection i.e. the button to modify
    an account should be enabled when there is only one account selected
    and the button to delete accounts should be enabled when there's at
    least one selected account.

    Regards,
    Lubomir

    On Wed, Sep 30, 2009 at 6:20 PM, Matthieu Casanova > <chocolat.mou@gmail.com <mailto:chocolat.mou@gmail.com>> wrote:
    > Hi,
    >
    > it is my first attempt to report a bug on Sip communicator and I
    was unable
    > to look at the issue tracker because I had timeout on the web
    server so I
    > post that here :
    >
    > in the Parameters dialog, on the Account page,
    > if no account are selected clicking on Edit or Delete buttons
    does NPE, I
    > use the latest trunk version.
    > I could submit a small patch for that but it is very easy to
    fix, another
    > idea would be to disable those buttons when no selection is
    available, I
    > could also submit a patch if you want
    >
    > Matthieu

    ---------------------------------------------------------------------
    To unsubscribe, e-mail:
    dev-unsubscribe@sip-communicator.dev.java.net
    <mailto:dev-unsubscribe@sip-communicator.dev.java.net>
    For additional commands, e-mail:
    dev-help@sip-communicator.dev.java.net
    <mailto:dev-help@sip-communicator.dev.java.net>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#3

oh sorry I'll check those code convention, ok for the selection model, in
fact I changed it because when I tried to remove several account at the same
time, only one was removed, I'll try to submit another patch tomorow
Matthieu

···

2009/10/1 Lubomir Marinov <lubo@sip-communicator.org>

Hi Matthieu,

Thank you for the contribution!

In order to accept a patch, we'd like it to follow our coding convention
published at
http://www.sip-communicator.org/index.php/Documentation/CodeConvention. In
the case of your patch, it would at least be necessary to change the class
imports to a star import.

More importantly though, I'm not sure why we'd want to change the selection
mode of the account list to single. For what it's worth, I still find it
useful to select multiple accounts and delete them by once clicking the
respective button. Could you please elaborate on the reasoning behind this
change?

Thank you,
Lubomir

On 1.10.2009 18:43, Matthieu Casanova wrote:

Hi,

here is my patch
It prevent a NPE from happening when trying to delete or edit an account
if none is selected.
It also disable those two buttons.
And the AccountList now use a single selection model

Matthieu

2009/9/30 Lubomir Marinov <lubomir.marinov@gmail.com <mailto:
lubomir.marinov@gmail.com>>

   Hello Matthieu,

   Thank your for the bug report! Your patch will be welcome.

   I personally think that the buttons should be disabled when they
   cannot be applied to the current selection i.e. the button to modify
   an account should be enabled when there is only one account selected
   and the button to delete accounts should be enabled when there's at
   least one selected account.

   Regards,
   Lubomir

   On Wed, Sep 30, 2009 at 6:20 PM, Matthieu Casanova >> <chocolat.mou@gmail.com <mailto:chocolat.mou@gmail.com>> wrote:
   > Hi,
   >
   > it is my first attempt to report a bug on Sip communicator and I
   was unable
   > to look at the issue tracker because I had timeout on the web
   server so I
   > post that here :
   >
   > in the Parameters dialog, on the Account page,
   > if no account are selected clicking on Edit or Delete buttons
   does NPE, I
   > use the latest trunk version.
   > I could submit a small patch for that but it is very easy to
   fix, another
   > idea would be to disable those buttons when no selection is
   available, I
   > could also submit a patch if you want
   >
   > Matthieu

   ---------------------------------------------------------------------
   To unsubscribe, e-mail:
   dev-unsubscribe@sip-communicator.dev.java.net
   <mailto:dev-unsubscribe@sip-communicator.dev.java.net>
   For additional commands, e-mail:
   dev-help@sip-communicator.dev.java.net
   <mailto:dev-help@sip-communicator.dev.java.net>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#4

Hi,
here is an updated patch, I removed the single selection model and used *
import

Matthieu

account_settings_patch2.txt (1.95 KB)

···

2009/10/1 Lubomir Marinov <lubo@sip-communicator.org>

Hi Matthieu,

Thank you for the contribution!

In order to accept a patch, we'd like it to follow our coding convention
published at
http://www.sip-communicator.org/index.php/Documentation/CodeConvention. In
the case of your patch, it would at least be necessary to change the class
imports to a star import.

More importantly though, I'm not sure why we'd want to change the selection
mode of the account list to single. For what it's worth, I still find it
useful to select multiple accounts and delete them by once clicking the
respective button. Could you please elaborate on the reasoning behind this
change?

Thank you,
Lubomir

On 1.10.2009 18:43, Matthieu Casanova wrote:

Hi,

here is my patch
It prevent a NPE from happening when trying to delete or edit an account
if none is selected.
It also disable those two buttons.
And the AccountList now use a single selection model

Matthieu

2009/9/30 Lubomir Marinov <lubomir.marinov@gmail.com <mailto:
lubomir.marinov@gmail.com>>

   Hello Matthieu,

   Thank your for the bug report! Your patch will be welcome.

   I personally think that the buttons should be disabled when they
   cannot be applied to the current selection i.e. the button to modify
   an account should be enabled when there is only one account selected
   and the button to delete accounts should be enabled when there's at
   least one selected account.

   Regards,
   Lubomir

   On Wed, Sep 30, 2009 at 6:20 PM, Matthieu Casanova >> <chocolat.mou@gmail.com <mailto:chocolat.mou@gmail.com>> wrote:
   > Hi,
   >
   > it is my first attempt to report a bug on Sip communicator and I
   was unable
   > to look at the issue tracker because I had timeout on the web
   server so I
   > post that here :
   >
   > in the Parameters dialog, on the Account page,
   > if no account are selected clicking on Edit or Delete buttons
   does NPE, I
   > use the latest trunk version.
   > I could submit a small patch for that but it is very easy to
   fix, another
   > idea would be to disable those buttons when no selection is
   available, I
   > could also submit a patch if you want
   >
   > Matthieu

   ---------------------------------------------------------------------
   To unsubscribe, e-mail:
   dev-unsubscribe@sip-communicator.dev.java.net
   <mailto:dev-unsubscribe@sip-communicator.dev.java.net>
   For additional commands, e-mail:
   dev-help@sip-communicator.dev.java.net
   <mailto:dev-help@sip-communicator.dev.java.net>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#5

Hi Matthieu,

Thank you again for the contribution! I committed it into trunk as
r6091 and acknowledged it on our Team and Contributors page at
http://www.sip-communicator.org/index.php/Development/TeamAndContributors.

I went with the single selection mode because the confirmation dialog
which gets displayed on attempting to delete an account asks for a
single account, not multiple.

Regards,
Lubomir

···

On Fri, Oct 2, 2009 at 11:15 AM, Matthieu Casanova <chocolat.mou@gmail.com> wrote:

Hi,
here is an updated patch, I removed the single selection model and used *
import

Matthieu

2009/10/1 Lubomir Marinov <lubo@sip-communicator.org>

Hi Matthieu,

Thank you for the contribution!

In order to accept a patch, we'd like it to follow our coding convention
published at
http://www.sip-communicator.org/index.php/Documentation/CodeConvention. In
the case of your patch, it would at least be necessary to change the class
imports to a star import.

More importantly though, I'm not sure why we'd want to change the
selection mode of the account list to single. For what it's worth, I still
find it useful to select multiple accounts and delete them by once clicking
the respective button. Could you please elaborate on the reasoning behind
this change?

Thank you,
Lubomir

On 1.10.2009 18:43, Matthieu Casanova wrote:

Hi,

here is my patch
It prevent a NPE from happening when trying to delete or edit an account
if none is selected.
It also disable those two buttons.
And the AccountList now use a single selection model

Matthieu

2009/9/30 Lubomir Marinov <lubomir.marinov@gmail.com
<mailto:lubomir.marinov@gmail.com>>

Hello Matthieu,

Thank your for the bug report! Your patch will be welcome.

I personally think that the buttons should be disabled when they
cannot be applied to the current selection i.e. the button to modify
an account should be enabled when there is only one account selected
and the button to delete accounts should be enabled when there's at
least one selected account.

Regards,
Lubomir

On Wed, Sep 30, 2009 at 6:20 PM, Matthieu Casanova >>> <chocolat.mou@gmail.com <mailto:chocolat.mou@gmail.com>> wrote:
> Hi,
>
> it is my first attempt to report a bug on Sip communicator and I
was unable
> to look at the issue tracker because I had timeout on the web
server so I
> post that here :
>
> in the Parameters dialog, on the Account page,
> if no account are selected clicking on Edit or Delete buttons
does NPE, I
> use the latest trunk version.
> I could submit a small patch for that but it is very easy to
fix, another
> idea would be to disable those buttons when no selection is
available, I
> could also submit a patch if you want
>
> Matthieu

---------------------------------------------------------------------
To unsubscribe, e-mail:
dev-unsubscribe@sip-communicator.dev.java.net
<mailto:dev-unsubscribe@sip-communicator.dev.java.net>
For additional commands, e-mail:
dev-help@sip-communicator.dev.java.net
<mailto:dev-help@sip-communicator.dev.java.net>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net