[sip-comm-dev] [GSoC Progress] Changing Avatar through SC


#1

Hi,Sorry for not contacting on the list but these days I was busy
implementing the GUI of the project so it is taking time.
I will be contacting in 4-5 days time for a branch.
My current progress:
*Jabber implementation was already completed.
*MSN implementation was completed but it requires some change in API
protocol. MSN picture is only working when you change picture in SC and the
other account is also running SC. Any picture changed in Windows Live is not
coming in SC and vice versa.
*In ICQ, I was stuck but got some help from Keith which I will try to
implement after few days time.
*I heard from Damian that he has implemented feature of Avatar changing in
Yahoo api so I will have to study it. This I will have to do from the start
caue till now Yahoo api had no such feature therefore i had not gone through
either Yahoo api properly neither the implementation part of Yahoo.

*In GUI I am using the wizard way like that of adding contact. User have
option of choosing from different contacts, Last 6 (will have to make it a
variable later via settings) images used are stored in Local Directory
(using the same avatarcache directory). Most of the features have been
implemented but as I havent worked much with Java GUI, I am getting trouble
in positioning the components. Right now I am not able to adjust their sizes
and stuff.

···

-----
Shashank Tyagi,
Computer Science(IDD),
Part III,
Institute of Technology,
Banaras Hindu University,
India.
+91-9651422932
+91-9235600751
shashank.tyagi.cse06@itbhu.ac.in
shashankt@acm.org


#2

Hi, The GUI part is more or less complete (webcam feature still left and
will leave it for second term only). Just a few more buttons to align up.
Still having some problems of setting size in GridLayout.
Will try to finish work for ICQ api also before this term. Yahoo api, webcam
feature, and any changes in MSN protocol if required will be left for second
term.

···

-----
Shashank Tyagi,
Computer Science(IDD),
Part III,
Institute of Technology,
Banaras Hindu University,
India.
+91-9651422932
+91-9235600751
shashank.tyagi.cse06@itbhu.ac.in
shashankt@acm.org

On Wed, Jun 24, 2009 at 3:37 PM, Shashank Tyagi < shashank.tyagi.cse06@itbhu.ac.in> wrote:

Hi,Sorry for not contacting on the list but these days I was busy
implementing the GUI of the project so it is taking time.
I will be contacting in 4-5 days time for a branch.
My current progress:
*Jabber implementation was already completed.
*MSN implementation was completed but it requires some change in API
protocol. MSN picture is only working when you change picture in SC and the
other account is also running SC. Any picture changed in Windows Live is not
coming in SC and vice versa.
*In ICQ, I was stuck but got some help from Keith which I will try to
implement after few days time.
*I heard from Damian that he has implemented feature of Avatar changing in
Yahoo api so I will have to study it. This I will have to do from the start
caue till now Yahoo api had no such feature therefore i had not gone through
either Yahoo api properly neither the implementation part of Yahoo.

*In GUI I am using the wizard way like that of adding contact. User have
option of choosing from different contacts, Last 6 (will have to make it a
variable later via settings) images used are stored in Local Directory
(using the same avatarcache directory). Most of the features have been
implemented but as I havent worked much with Java GUI, I am getting trouble
in positioning the components. Right now I am not able to adjust their sizes
and stuff.
-----
Shashank Tyagi,
Computer Science(IDD),
Part III,
Institute of Technology,
Banaras Hindu University,
India.
+91-9651422932
+91-9235600751
shashank.tyagi.cse06@itbhu.ac.in
shashankt@acm.org


#3

Hi All,

https://sip-communicator.dev.java.net/svn/sip-communicator/branches/gsoc09/myavatars
Features Implemented:
*GUI with support for storing previously used images. Using Wizard style as
used for adding new contact.
*Supporting Jabber protocol.
*Supporting MSN only if other client also using jml.

Improvements required:
*Unable to adjust width of buttons showing earlier images.
*Getting local path using separate function in
impl.gui.main.presence.image.SelectImagePanel instead of using
FileAccessService.

Features to be implemented by this term:
*ICQ implementation

Features for next term:
*Yahoo implementation
*Support for Webcam
*Providing options for number of previous images to be stored in Settings
Page
*Any other improvements.

Waiting for reviews!

···

-----
Shashank Tyagi,
Computer Science(IDD),
Part III,
Institute of Technology,
Banaras Hindu University,
India.
+91-9651422932
+91-9235600751
shashank.tyagi.cse06@itbhu.ac.in
shashankt@acm.org

On Wed, Jun 24, 2009 at 3:52 PM, Shashank Tyagi < shashank.tyagi.cse06@itbhu.ac.in> wrote:

Hi, The GUI part is more or less complete (webcam feature still left
and will leave it for second term only). Just a few more buttons to align
up. Still having some problems of setting size in GridLayout.
Will try to finish work for ICQ api also before this term. Yahoo api,
webcam feature, and any changes in MSN protocol if required will be left for
second term.

-----
Shashank Tyagi,
Computer Science(IDD),
Part III,
Institute of Technology,
Banaras Hindu University,
India.
+91-9651422932
+91-9235600751
shashank.tyagi.cse06@itbhu.ac.in
shashankt@acm.org

On Wed, Jun 24, 2009 at 3:37 PM, Shashank Tyagi < > shashank.tyagi.cse06@itbhu.ac.in> wrote:

Hi,Sorry for not contacting on the list but these days I was busy
implementing the GUI of the project so it is taking time.
I will be contacting in 4-5 days time for a branch.
My current progress:
*Jabber implementation was already completed.
*MSN implementation was completed but it requires some change in API
protocol. MSN picture is only working when you change picture in SC and the
other account is also running SC. Any picture changed in Windows Live is not
coming in SC and vice versa.
*In ICQ, I was stuck but got some help from Keith which I will try to
implement after few days time.
*I heard from Damian that he has implemented feature of Avatar changing in
Yahoo api so I will have to study it. This I will have to do from the start
caue till now Yahoo api had no such feature therefore i had not gone through
either Yahoo api properly neither the implementation part of Yahoo.

*In GUI I am using the wizard way like that of adding contact. User have
option of choosing from different contacts, Last 6 (will have to make it a
variable later via settings) images used are stored in Local Directory
(using the same avatarcache directory). Most of the features have been
implemented but as I havent worked much with Java GUI, I am getting trouble
in positioning the components. Right now I am not able to adjust their sizes
and stuff.
-----
Shashank Tyagi,
Computer Science(IDD),
Part III,
Institute of Technology,
Banaras Hindu University,
India.
+91-9651422932
+91-9235600751
shashank.tyagi.cse06@itbhu.ac.in
shashankt@acm.org


#4

Hi All,
Have attached screenshots of the wizard panels.

Thanks!

···

-----
Shashank Tyagi,
Computer Science(IDD),
Part III,
Institute of Technology,
Banaras Hindu University,
India.
+91-9651422932
+91-9235600751
shashank.tyagi.cse06@itbhu.ac.in
shashankt@acm.org

On Thu, Jun 25, 2009 at 3:40 PM, Shashank Tyagi < shashank.tyagi.cse06@itbhu.ac.in> wrote:

Hi All,

https://sip-communicator.dev.java.net/svn/sip-communicator/branches/gsoc09/myavatars
Features Implemented:
*GUI with support for storing previously used images. Using Wizard style as
used for adding new contact.
*Supporting Jabber protocol.
*Supporting MSN only if other client also using jml.

Improvements required:
*Unable to adjust width of buttons showing earlier images.
*Getting local path using separate function in
impl.gui.main.presence.image.SelectImagePanel instead of using
FileAccessService.

Features to be implemented by this term:
*ICQ implementation

Features for next term:
*Yahoo implementation
*Support for Webcam
*Providing options for number of previous images to be stored in Settings
Page
*Any other improvements.

Waiting for reviews!
-----
Shashank Tyagi,
Computer Science(IDD),
Part III,
Institute of Technology,
Banaras Hindu University,
India.
+91-9651422932
+91-9235600751
shashank.tyagi.cse06@itbhu.ac.in
shashankt@acm.org

On Wed, Jun 24, 2009 at 3:52 PM, Shashank Tyagi < > shashank.tyagi.cse06@itbhu.ac.in> wrote:

Hi, The GUI part is more or less complete (webcam feature still left
and will leave it for second term only). Just a few more buttons to align
up. Still having some problems of setting size in GridLayout.
Will try to finish work for ICQ api also before this term. Yahoo api,
webcam feature, and any changes in MSN protocol if required will be left for
second term.

-----
Shashank Tyagi,
Computer Science(IDD),
Part III,
Institute of Technology,
Banaras Hindu University,
India.
+91-9651422932
+91-9235600751
shashank.tyagi.cse06@itbhu.ac.in
shashankt@acm.org

On Wed, Jun 24, 2009 at 3:37 PM, Shashank Tyagi < >> shashank.tyagi.cse06@itbhu.ac.in> wrote:

Hi,Sorry for not contacting on the list but these days I was busy
implementing the GUI of the project so it is taking time.
I will be contacting in 4-5 days time for a branch.
My current progress:
*Jabber implementation was already completed.
*MSN implementation was completed but it requires some change in API
protocol. MSN picture is only working when you change picture in SC and the
other account is also running SC. Any picture changed in Windows Live is not
coming in SC and vice versa.
*In ICQ, I was stuck but got some help from Keith which I will try to
implement after few days time.
*I heard from Damian that he has implemented feature of Avatar changing
in Yahoo api so I will have to study it. This I will have to do from the
start caue till now Yahoo api had no such feature therefore i had not gone
through either Yahoo api properly neither the implementation part of Yahoo.

*In GUI I am using the wizard way like that of adding contact. User have
option of choosing from different contacts, Last 6 (will have to make it a
variable later via settings) images used are stored in Local Directory
(using the same avatarcache directory). Most of the features have been
implemented but as I havent worked much with Java GUI, I am getting trouble
in positioning the components. Right now I am not able to adjust their sizes
and stuff.
-----
Shashank Tyagi,
Computer Science(IDD),
Part III,
Institute of Technology,
Banaras Hindu University,
India.
+91-9651422932
+91-9235600751
shashank.tyagi.cse06@itbhu.ac.in
shashankt@acm.org


#5

Hi Shashank,

I tested your work today and here is my review.

The GUI is fine but I think the button on the main window should set
the avatar for all the accounts.
The selection of an avatar for a protocol should be defined in the
account window, but it's not a priority.
For now you should just skip the first page of the wizard.

I tried to change the avatar of my jabber and msn accounts but it
doesn't work. It may come from my virtual machine so I will do some
tests on my laptop tomorrow.
I also get another bug (maybe the first one come from here) : when a
set an avatar, the next time I open the wizard the image isn't in the
last 10.

Concerning the code, I don't have any particular remark except for the
class : impl.gui.main.presence.SelectImagePanel.
The methods getScHomeDirLocation and getScHomeDirName are not necessary.
The properties you want to get are always defined in the Launcher
class (besides those properties are OS-dependants).

I will keep you informed about the future tests

Bye

Damien

···

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


#6

Hi, I rechecked it on another terminal. It is running fine. Though both
the terminals are running Windows.
Test case:
Jabber-tested on gtalk
MSN- tested on SC to SC
Image used: jpg images (two images of single color and one with simple
graphics)

Please send the console output generated after pressing the Upload Image
button. Also for saving of previous images please check whether the images
are saved correctly or not manually at avatarcache/storedimages

···

-----
Shashank Tyagi,
Computer Science(IDD),
Part III,
Institute of Technology,
Banaras Hindu University,
India.
+91-9651422932
+91-9235600751
shashank.tyagi.cse06@itbhu.ac.in
shashankt@acm.org

On Mon, Jun 29, 2009 at 1:23 AM, Damien Roth <damien.roth@gmail.com> wrote:

Hi Shashank,

I tested your work today and here is my review.

The GUI is fine but I think the button on the main window should set
the avatar for all the accounts.
The selection of an avatar for a protocol should be defined in the
account window, but it's not a priority.
For now you should just skip the first page of the wizard.

I tried to change the avatar of my jabber and msn accounts but it
doesn't work. It may come from my virtual machine so I will do some
tests on my laptop tomorrow.
I also get another bug (maybe the first one come from here) : when a
set an avatar, the next time I open the wizard the image isn't in the
last 10.

Concerning the code, I don't have any particular remark except for the
class : impl.gui.main.presence.SelectImagePanel.
The methods getScHomeDirLocation and getScHomeDirName are not necessary.
The properties you want to get are always defined in the Launcher
class (besides those properties are OS-dependants).

I will keep you informed about the future tests

Bye

Damien

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


#7

Hello everyone,

Concerning the project "Replace a web cam with a picture" of GSOC 09

The 2 first points of the first term are soon OK :
Start by adding an extra image-based video data source to the impl of the media service.
Make the new datasource selectable and configuratble through the media configuration form

I'm now working on the third point :
3 . Make the new data source use one of the avatars available with from
existing protocol providers the image that gets streamed should be that
avatar, merged with our logo in one of the corners

I'm waiting a new branch in the svn in order to commit my work.

See you soon,

Camille.

···

_________________________________________________________________
Découvrez toutes les possibilités de communication avec vos proches
http://www.microsoft.com/windows/windowslive/default.aspx


#8

Hi,

Ok I found why I doesn't work.

I checked .sip-communicator/avatarcache/ and no directory named storedimg.
I created manually one and now it works fine.
Maybe you have created the folder in another version of you app' and
forgot to recreate it.

The new avatar is displayed on the main window but only after a
restart of the program.

Now to resume what you need to do before the midterm exam :
1. Automatically create the directory
2. Remove the first page of the wizard
3. ICQ implementation
4. Update the avatar on the mainframe

Good luck

Damien

···

2009/6/29 shashank <aug21st@gmail.com>:

Hi,
I rechecked it on another terminal. It is running fine. Though both the
terminals are running Windows.
Test case:
Jabber-tested on gtalk
MSN- tested on SC to SC
Image used: jpg images (two images of single color and one with simple
graphics)
Please send the console output generated after pressing the Upload Image
button. Also for saving of previous images please check whether the images
are saved correctly or not manually at avatarcache/storedimages
-----
Shashank Tyagi,
Computer Science(IDD),
Part III,
Institute of Technology,
Banaras Hindu University,
India.
+91-9651422932
+91-9235600751
shashank.tyagi.cse06@itbhu.ac.in
shashankt@acm.org

On Mon, Jun 29, 2009 at 1:23 AM, Damien Roth <damien.roth@gmail.com> wrote:

Hi Shashank,

I tested your work today and here is my review.

The GUI is fine but I think the button on the main window should set
the avatar for all the accounts.
The selection of an avatar for a protocol should be defined in the
account window, but it's not a priority.
For now you should just skip the first page of the wizard.

I tried to change the avatar of my jabber and msn accounts but it
doesn't work. It may come from my virtual machine so I will do some
tests on my laptop tomorrow.
I also get another bug (maybe the first one come from here) : when a
set an avatar, the next time I open the wizard the image isn't in the
last 10.

Concerning the code, I don't have any particular remark except for the
class : impl.gui.main.presence.SelectImagePanel.
The methods getScHomeDirLocation and getScHomeDirName are not necessary.
The properties you want to get are always defined in the Launcher
class (besides those properties are OS-dependants).

I will keep you informed about the future tests

Bye

Damien

---------------------------------------------------------------------
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


#9

Hi,
*Sorry about the directory thing. I will do that with my next commit.

*For removing the First Page of the wizard I was thinking maybe we can wait
for more reviews and final looks. Later code can be transferred as just
advanced options link or maybe like it is now for status message. For now I
will comment the code of first page.

*Working on ICQ.

*Need help on how to update picture on mainframe. Do I manually change the
picture of the main window or is there already a EventListener for image
change or do I need to create one? For doing the first way I can do it
otherwise I will need some help to understand EventListeners.

And please give the error messages when pictures are not changing.

···

-----
Shashank Tyagi,
Computer Science(IDD),
Part III,
Institute of Technology,
Banaras Hindu University,
India.
+91-9651422932
+91-9235600751
shashank.tyagi.cse06@itbhu.ac.in
shashankt@acm.org

On Mon, Jun 29, 2009 at 4:16 PM, Damien Roth <damien.roth@gmail.com> wrote:

Hi,

Ok I found why I doesn't work.

I checked .sip-communicator/avatarcache/ and no directory named storedimg.
I created manually one and now it works fine.
Maybe you have created the folder in another version of you app' and
forgot to recreate it.

The new avatar is displayed on the main window but only after a
restart of the program.

Now to resume what you need to do before the midterm exam :
1. Automatically create the directory
2. Remove the first page of the wizard
3. ICQ implementation
4. Update the avatar on the mainframe

Good luck

Damien

2009/6/29 shashank <aug21st@gmail.com>:
> Hi,
> I rechecked it on another terminal. It is running fine. Though both
the
> terminals are running Windows.
> Test case:
> Jabber-tested on gtalk
> MSN- tested on SC to SC
> Image used: jpg images (two images of single color and one with simple
> graphics)
> Please send the console output generated after pressing the Upload Image
> button. Also for saving of previous images please check whether the
images
> are saved correctly or not manually at avatarcache/storedimages
> -----
> Shashank Tyagi,
> Computer Science(IDD),
> Part III,
> Institute of Technology,
> Banaras Hindu University,
> India.
> +91-9651422932
> +91-9235600751
> shashank.tyagi.cse06@itbhu.ac.in
> shashankt@acm.org
>
>
>
>
> On Mon, Jun 29, 2009 at 1:23 AM, Damien Roth <damien.roth@gmail.com> > wrote:
>>
>> Hi Shashank,
>>
>> I tested your work today and here is my review.
>>
>> The GUI is fine but I think the button on the main window should set
>> the avatar for all the accounts.
>> The selection of an avatar for a protocol should be defined in the
>> account window, but it's not a priority.
>> For now you should just skip the first page of the wizard.
>>
>>
>> I tried to change the avatar of my jabber and msn accounts but it
>> doesn't work. It may come from my virtual machine so I will do some
>> tests on my laptop tomorrow.
>> I also get another bug (maybe the first one come from here) : when a
>> set an avatar, the next time I open the wizard the image isn't in the
>> last 10.
>>
>> Concerning the code, I don't have any particular remark except for the
>> class : impl.gui.main.presence.SelectImagePanel.
>> The methods getScHomeDirLocation and getScHomeDirName are not necessary.
>> The properties you want to get are always defined in the Launcher
>> class (besides those properties are OS-dependants).
>>
>> I will keep you informed about the future tests
>>
>> Bye
>>
>> Damien
>>
>> ---------------------------------------------------------------------
>> 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


#10

Hi,

Some comments other comments

Improvements required:
*Unable to adjust width of buttons showing earlier images.

For now it's not a real problem. We aim to place the selector in a
floating panel but don't worry it's an optional part of you GSoC.

*Getting local path using separate function in impl.gui.main.presence.image.SelectImagePanel instead of using FileAccessService.

No, you have to use the FileAccessService. The aim of this service is
to abstract the directory where all files are stored.
To get a File var for a file, you just need to use the method
getPrivatePersistentFile.
To get a File var for a directory : getPrivatePersistentDirectory.
This method automatically create the directory if it doesn't exists.

*Need help on how to update picture on mainframe. Do I manually change the
picture of the main window or is there already a EventListener for image
change or do I need to create one? For doing the first way I can do it
otherwise I will need some help to understand EventListeners.

I agree with Yana. But, you need to use event and listener to change
it (to separate the view from the controller : MVC model). The other
point to do that is other students may need to access the newly
defined image.

So, you have to create a new EventListener for the
OperationSetServerStoredAccountInfo. I will explain you how to in
another mail.

Yes it could and should be implemented. But I was thinking that with another option of Webcam which is to come up wont it make
too many buttons on one page?
Or should I try some text links?

No it should be ok since there is no more wizard. You can remove the
textfield with the path of the selected image and replace it with 4
buttons in a row :
- "Choose an icon ..." -> same action as select file + Upload image
- "Take a photo ..." -> for now disable. Later it will take a photo
with the webcam
- "Clear recent pictures" -> remove the stored images
- "Cancel" -> close the window

Bye

Damien

···

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


#11

Hi Shashank,

First, I should say I was really impatient to see this feature in SIP Communicator and was following your reports with interest:) Now I've finally found some free time and checked out your branch to test:) You've done a pretty good job!

Some more comments below..

shashank wrote:

Hi,
*Sorry about the directory thing. I will do that with my next commit.

*For removing the First Page of the wizard I was thinking maybe we can wait
for more reviews and final looks. Later code can be transferred as just
advanced options link or maybe like it is now for status message. For now I
will comment the code of first page.

I agree with Damian, that it would be better to make this part transparent to the user and change the avatar for all registered accounts. In my opinion having a whole wizard to change the avatar complicates the interface and in most cases the user would like to use the same image on all accounts.

*Working on ICQ.

*Need help on how to update picture on mainframe. Do I manually change the
picture of the main window or is there already a EventListener for image
change or do I need to create one? For doing the first way I can do it
otherwise I will need some help to understand EventListeners.

In my opinion we should change the image in the main frame immediately on user select and if something goes wrong when setting it to a protocol to warn the user that this protocol didn't update the image. This way we keep the gui responsive to user actions and keep the user informed if a problem occurs.

Some more gui comments and suggestions:

- try using SIPCommButton(Image bgImage) instead of JButton to show stored images. This should solve problems with extra space and would remove the "button" look.

- in my opinion "Upload image" sounds a little complicated, why not calling it just "Set". WDYT?

- in the future I think it could be a good idea to add a button "Clear recent pictures" that would allow clearing all used images.

Otherwise, I've experienced the following problem after pressing "Upload image":

[java] File not Found:/Users/yanastamcheva/schome/SIP Communicator/avatarcache/storedimg/null.jpg
      [java] File Not Found:/Users/yanastamcheva/schome/SIP Communicator/avatarcache/storedimg/0.jpg
      [java] File not Found:/Users/yanastamcheva/schome/SIP Communicator/avatarcache/storedimg/null.jpg
      [java] File Not Found:/Users/yanastamcheva/schome/SIP Communicator/avatarcache/storedimg/1.jpg
      [java] File not Found:/Users/yanastamcheva/schome/SIP Communicator/avatarcache/storedimg/null.jpg
      [java] File Not Found:/Users/yanastamcheva/schome/SIP Communicator/avatarcache/storedimg/2.jpg
      [java] File not Found:/Users/yanastamcheva/schome/SIP Communicator/avatarcache/storedimg/null.jpg
      [java] File Not Found:/Users/yanastamcheva/schome/SIP Communicator/avatarcache/storedimg/3.jpg
      [java] File not Found:/Users/yanastamcheva/schome/SIP Communicator/avatarcache/storedimg/null.jpg
      [java] File Not Found:/Users/yanastamcheva/schome/SIP Communicator/avatarcache/storedimg/4.jpg
      [java] File not Found:/Users/yanastamcheva/schome/SIP Communicator/avatarcache/storedimg/null.jpg
      [java] File Not Found:/Users/yanastamcheva/schome/SIP Communicator/avatarcache/storedimg/5.jpg
      [java] File not Found:/Users/yanastamcheva/schome/SIP Communicator/avatarcache/storedimg/null.jpg
      [java] File Not Found:/Users/yanastamcheva/schome/SIP Communicator/avatarcache/storedimg/6.jpg
      [java] File not Found:/Users/yanastamcheva/schome/SIP Communicator/avatarcache/storedimg/null.jpg
      [java] File Not Found:/Users/yanastamcheva/schome/SIP Communicator/avatarcache/storedimg/7.jpg

Hope all this helps and thanks for your efforts!

Cheers,
Yana

···

And please give the error messages when pictures are not changing.

-----
Shashank Tyagi,
Computer Science(IDD),
Part III,
Institute of Technology,
Banaras Hindu University,
India.
+91-9651422932
+91-9235600751
shashank.tyagi.cse06@itbhu.ac.in
shashankt@acm.org

On Mon, Jun 29, 2009 at 4:16 PM, Damien Roth <damien.roth@gmail.com> wrote:

Hi,

Ok I found why I doesn't work.

I checked .sip-communicator/avatarcache/ and no directory named storedimg.
I created manually one and now it works fine.
Maybe you have created the folder in another version of you app' and
forgot to recreate it.

The new avatar is displayed on the main window but only after a
restart of the program.

Now to resume what you need to do before the midterm exam :
1. Automatically create the directory
2. Remove the first page of the wizard
3. ICQ implementation
4. Update the avatar on the mainframe

Good luck

Damien

2009/6/29 shashank <aug21st@gmail.com>:

Hi,
    I rechecked it on another terminal. It is running fine. Though both

the

terminals are running Windows.
Test case:
Jabber-tested on gtalk
MSN- tested on SC to SC
Image used: jpg images (two images of single color and one with simple
graphics)
Please send the console output generated after pressing the Upload Image
button. Also for saving of previous images please check whether the

images

are saved correctly or not manually at avatarcache/storedimages
-----
Shashank Tyagi,
Computer Science(IDD),
Part III,
Institute of Technology,
Banaras Hindu University,
India.
+91-9651422932
+91-9235600751
shashank.tyagi.cse06@itbhu.ac.in
shashankt@acm.org

On Mon, Jun 29, 2009 at 1:23 AM, Damien Roth <damien.roth@gmail.com> >> wrote:

Hi Shashank,

I tested your work today and here is my review.

The GUI is fine but I think the button on the main window should set
the avatar for all the accounts.
The selection of an avatar for a protocol should be defined in the
account window, but it's not a priority.
For now you should just skip the first page of the wizard.

I tried to change the avatar of my jabber and msn accounts but it
doesn't work. It may come from my virtual machine so I will do some
tests on my laptop tomorrow.
I also get another bug (maybe the first one come from here) : when a
set an avatar, the next time I open the wizard the image isn't in the
last 10.

Concerning the code, I don't have any particular remark except for the
class : impl.gui.main.presence.SelectImagePanel.
The methods getScHomeDirLocation and getScHomeDirName are not necessary.
The properties you want to get are always defined in the Launcher
class (besides those properties are OS-dependants).

I will keep you informed about the future tests

Bye

Damien

---------------------------------------------------------------------
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


#12

Hi All,

I agree with Damian, that it would be better to make this part transparent
to the user and change the avatar for all registered accounts. In my opinion
having a whole wizard to change the avatar complicates the interface and in
most cases the user would like to use the same image on all accounts.

Ok then I have no problems in removing it. Will keep a local copy with
myself in case its required later.

In my opinion we should change the image in the main frame immediately on

user select and if something goes wrong when setting it to a protocol to
warn the user that this protocol didn't update the image. This way we keep
the gui responsive to user actions and keep the user informed if a problem
occurs.

Yes I know error reporting is currently working only on console. Need to
bring it to the user. Also havent implement any kind of logging as for now.
How to change the image on main frame?

- try using SIPCommButton(Image bgImage) instead of JButton to show stored

images. This should solve problems with extra space and would remove the
"button" look.

Will try that

- in my opinion "Upload image" sounds a little complicated, why not calling
it just "Set". WDYT?

Am not really good at this (anything which involves creativity). And hence
am open to all suggestions.

- in the future I think it could be a good idea to add a button "Clear
recent pictures" that would allow clearing all used images.

Yes it could and should be implemented. But I was thinking that with another
option of Webcam which is to come up wont it make too many buttons on one
page?
Or should I try some text links?

Otherwise, I've experienced the following problem after pressing "Upload
image":

[java] File not Found:/Users/yanastamcheva/schome/SIP
Communicator/avatarcache/storedimg/null.jpg
    [java] File Not Found:/Users/yanastamcheva/schome/SIP
Communicator/avatarcache/storedimg/0.jpg
    [java] File not Found:/Users/yanastamcheva/schome/SIP
Communicator/avatarcache/storedimg/null.jpg
    [java] File Not Found:/Users/yanastamcheva/schome/SIP
Communicator/avatarcache/storedimg/1.jpg
    [java] File not Found:/Users/yanastamcheva/schome/SIP
Communicator/avatarcache/storedimg/null.jpg
    [java] File Not Found:/Users/yanastamcheva/schome/SIP
Communicator/avatarcache/storedimg/2.jpg
    [java] File not Found:/Users/yanastamcheva/schome/SIP
Communicator/avatarcache/storedimg/null.jpg
    [java] File Not Found:/Users/yanastamcheva/schome/SIP
Communicator/avatarcache/storedimg/3.jpg
    [java] File not Found:/Users/yanastamcheva/schome/SIP
Communicator/avatarcache/storedimg/null.jpg
    [java] File Not Found:/Users/yanastamcheva/schome/SIP
Communicator/avatarcache/storedimg/4.jpg
    [java] File not Found:/Users/yanastamcheva/schome/SIP
Communicator/avatarcache/storedimg/null.jpg
    [java] File Not Found:/Users/yanastamcheva/schome/SIP
Communicator/avatarcache/storedimg/5.jpg
    [java] File not Found:/Users/yanastamcheva/schome/SIP
Communicator/avatarcache/storedimg/null.jpg
    [java] File Not Found:/Users/yanastamcheva/schome/SIP
Communicator/avatarcache/storedimg/6.jpg
    [java] File not Found:/Users/yanastamcheva/schome/SIP
Communicator/avatarcache/storedimg/null.jpg
    [java] File Not Found:/Users/yanastamcheva/schome/SIP
Communicator/avatarcache/storedimg/7.jpg

This will come in any case. But we can remove this console messages as they
dont cause any type of error. I was just using to debug them while getting
the full path.

Hope all this helps and thanks for your efforts!

Thanks!


#13

Hi,

> Improvements required:
> *Unable to adjust width of buttons showing earlier images.

For now it's not a real problem. We aim to place the selector in a
floating panel but don't worry it's an optional part of you GSoC.

Will just try SIPCommButton. Wont spend too much time on it.

> *Getting local path using separate function in
impl.gui.main.presence.image.SelectImagePanel instead of using
FileAccessService.

No, you have to use the FileAccessService. The aim of this service is
to abstract the directory where all files are stored.
To get a File var for a file, you just need to use the method
getPrivatePersistentFile.
To get a File var for a directory : getPrivatePersistentDirectory.
This method automatically create the directory if it doesn't exists.

Had earlier tried using that only and am currently using functions copied
from that. But got error in that process.
Had talk with Damian in this regard but was unable to sort out the problem:

System.out.println(dir);
imageDir =
FileAccessActivator.getFileAccessService().getPrivatePersistentDirectory(dir);

But get the error:

avatarcache
02:14:56.072 SEVERE: util.UtilActivator.uncaughtException().81 An uncaught
exception occurred in thread=Thread[AWT-EventQueue-0,6,main] and message
was: net/java/sip/communicator/impl/fileaccess/FileAccessActivator
java.lang.NoClassDefFoundError:
net/java/sip/communicator/impl/fileaccess/FileAccessActivator
Do you have the imports in the manifest file ?
net.java.sip.communicator.service.fileaccess
like it is in the contact list service impl.

How to configure the manifest file?

> *Need help on how to update picture on mainframe. Do I manually change
the
> picture of the main window or is there already a EventListener for image
> change or do I need to create one? For doing the first way I can do it
> otherwise I will need some help to understand EventListeners.

I agree with Yana. But, you need to use event and listener to change
it (to separate the view from the controller : MVC model). The other
point to do that is other students may need to access the newly
defined image.

So, you have to create a new EventListener for the
OperationSetServerStoredAccountInfo. I will explain you how to in
another mail.

Will need help on that. It would be enough if you can just point to any
working example in the code.

> Yes it could and should be implemented. But I was thinking that with
another option of Webcam which is to come up wont it make
> too many buttons on one page?
> Or should I try some text links?

No it should be ok since there is no more wizard. You can remove the
textfield with the path of the selected image and replace it with 4
buttons in a row :
- "Choose an icon ..." -> same action as select file + Upload image
- "Take a photo ..." -> for now disable. Later it will take a photo
with the webcam
- "Clear recent pictures" -> remove the stored images
- "Cancel" -> close the window

I was trying this:
When a user selects image from a file then all the icons of the button
should be refreshed immediately and that picture selected. This will remove
any need of File path.
But was not able to repaint the screen. Any help!


#14

Hi,

Had earlier tried using that only and am currently using functions copied
from that. But got error in that process.
Had talk with Damian in this regard but was unable to sort out the problem:

System.out.println(dir);
imageDir =
FileAccessActivator.getFileAccessService().getPrivatePersistentDirectory(dir);

But get the error:

avatarcache
02:14:56.072 SEVERE: util.UtilActivator.uncaughtException().81 An uncaught
exception occurred in thread=Thread[AWT-EventQueue-0,6,main] and message
was: net/java/sip/communicator/impl/fileaccess/FileAccessActivator
java.lang.NoClassDefFoundError:
net/java/sip/communicator/impl/fileaccess/FileAccessActivator
Do you have the imports in the manifest file ?
net.java.sip.communicator.service.fileaccess
like it is in the contact list service impl.

How to configure the manifest file?

The error come from the way you get the FileAccessService. You use the
class FileAccessActivator from another bundle.
The correct way to get it is : GuiActivator.getFileAccessService()

I was trying this:
When a user selects image from a file then all the icons of the button
should be refreshed immediately and that picture selected. This will remove
any need of File path.
But was not able to repaint the screen. Any help!

It's too complicated, keep it as simple as possible.

Bye

···

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


#15

Hi Shashank,

Otherwise, I've experienced the following problem after pressing "Upload
image":

[java] File not Found:/Users/yanastamcheva/schome/SIP
Communicator/avatarcache/storedimg/null.jpg
    [java] File Not Found:/Users/yanastamcheva/schome/SIP
Communicator/avatarcache/storedimg/0.jpg
    [java] File not Found:/Users/yanastamcheva/schome/SIP
Communicator/avatarcache/storedimg/null.jpg
    [java] File Not Found:/Users/yanastamcheva/schome/SIP
Communicator/avatarcache/storedimg/1.jpg
    [java] File not Found:/Users/yanastamcheva/schome/SIP
Communicator/avatarcache/storedimg/null.jpg
    [java] File Not Found:/Users/yanastamcheva/schome/SIP
Communicator/avatarcache/storedimg/2.jpg
    [java] File not Found:/Users/yanastamcheva/schome/SIP
Communicator/avatarcache/storedimg/null.jpg
    [java] File Not Found:/Users/yanastamcheva/schome/SIP
Communicator/avatarcache/storedimg/3.jpg
    [java] File not Found:/Users/yanastamcheva/schome/SIP
Communicator/avatarcache/storedimg/null.jpg
    [java] File Not Found:/Users/yanastamcheva/schome/SIP
Communicator/avatarcache/storedimg/4.jpg
    [java] File not Found:/Users/yanastamcheva/schome/SIP
Communicator/avatarcache/storedimg/null.jpg
    [java] File Not Found:/Users/yanastamcheva/schome/SIP
Communicator/avatarcache/storedimg/5.jpg
    [java] File not Found:/Users/yanastamcheva/schome/SIP
Communicator/avatarcache/storedimg/null.jpg
    [java] File Not Found:/Users/yanastamcheva/schome/SIP
Communicator/avatarcache/storedimg/6.jpg
    [java] File not Found:/Users/yanastamcheva/schome/SIP
Communicator/avatarcache/storedimg/null.jpg
    [java] File Not Found:/Users/yanastamcheva/schome/SIP
Communicator/avatarcache/storedimg/7.jpg

This will come in any case. But we can remove this console messages as they
dont cause any type of error. I was just using to debug them while getting
the full path.

I thought it's an error because actually the change of the image didn't work and my choice was not stored. However this was the only "error" message.

Are you sure that these are also normal:
>> [java] File not Found:/Users/yanastamcheva/schome/SIP
>> Communicator/avatarcache/storedimg/null.jpg ?

Yes I know error reporting is currently working only on console. Need to
bring it to the user. Also havent implement any kind of logging as for now.
How to change the image on main frame?

The image is in the AccountStatusPanel, that's where you create the "Change Avatar" dialog, so you can just add a setAvatar method in it. However I also agree with Damien that we should create listeners and notify interested parties about the change.

Cheers,
Yana

···

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


#16

Hi again Shashank,

I had a brief look in the SelectImagePanel, being intrigued by the FileAccessService discussion and here are some remarks and suggestions:

- as Damien explained, you should use the FileAccessService to access both the avatarcache directory (getPrivatePersistentDirectory) and store your files (getPrivatePersistentFile). This should simplify a lot the assignIcons method.

- you don't need to copy files and create temporary files each time a new file is chosen. You can simply create a special button extending SIPCommButton, associate a file with it and when the user selects new image update buttons files and icons. Once the "Set" button is pressed you can then store the new image to the file system through the FileAccessService.

I know you're not yet in the stage of finalizing code, but wanted to make just a quick remind about code formatting. You can have a look to project code conventions here: http://www.sip-communicator.org/index.php/Documentation/CodeConvention (for Eclipse users there's a ready to use formatter that you can import). And don't forget to limit code to column 80:)

Another thing to remind here is that when you change existing files, please make sure to change only code that's related to your work, because otherwise reviewing the code and tracking the exact changes becomes very difficult (like in AccountStatusPanel). I know that's your last problem right now, but for us it's our first one, so don't be mad at me:))

Cheers,
Yana

shashank wrote:

···

Hi,

Improvements required:
*Unable to adjust width of buttons showing earlier images.

For now it's not a real problem. We aim to place the selector in a
floating panel but don't worry it's an optional part of you GSoC.

Will just try SIPCommButton. Wont spend too much time on it.

*Getting local path using separate function in

impl.gui.main.presence.image.SelectImagePanel instead of using
FileAccessService.

No, you have to use the FileAccessService. The aim of this service is
to abstract the directory where all files are stored.
To get a File var for a file, you just need to use the method
getPrivatePersistentFile.
To get a File var for a directory : getPrivatePersistentDirectory.
This method automatically create the directory if it doesn't exists.

Had earlier tried using that only and am currently using functions copied
from that. But got error in that process.
Had talk with Damian in this regard but was unable to sort out the problem:

System.out.println(dir);
imageDir =
FileAccessActivator.getFileAccessService().getPrivatePersistentDirectory(dir);

But get the error:

avatarcache
02:14:56.072 SEVERE: util.UtilActivator.uncaughtException().81 An uncaught
exception occurred in thread=Thread[AWT-EventQueue-0,6,main] and message
was: net/java/sip/communicator/impl/fileaccess/FileAccessActivator
java.lang.NoClassDefFoundError:
net/java/sip/communicator/impl/fileaccess/FileAccessActivator
Do you have the imports in the manifest file ?
net.java.sip.communicator.service.fileaccess
like it is in the contact list service impl.

How to configure the manifest file?

*Need help on how to update picture on mainframe. Do I manually change

the

picture of the main window or is there already a EventListener for image
change or do I need to create one? For doing the first way I can do it
otherwise I will need some help to understand EventListeners.

I agree with Yana. But, you need to use event and listener to change
it (to separate the view from the controller : MVC model). The other
point to do that is other students may need to access the newly
defined image.

So, you have to create a new EventListener for the
OperationSetServerStoredAccountInfo. I will explain you how to in
another mail.

Will need help on that. It would be enough if you can just point to any
working example in the code.

Yes it could and should be implemented. But I was thinking that with

another option of Webcam which is to come up wont it make

too many buttons on one page?
Or should I try some text links?

No it should be ok since there is no more wizard. You can remove the
textfield with the path of the selected image and replace it with 4
buttons in a row :
- "Choose an icon ..." -> same action as select file + Upload image
- "Take a photo ..." -> for now disable. Later it will take a photo
with the webcam
- "Clear recent pictures" -> remove the stored images
- "Cancel" -> close the window

I was trying this:
When a user selects image from a file then all the icons of the button
should be refreshed immediately and that picture selected. This will remove
any need of File path.
But was not able to repaint the screen. Any help!

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


#17

Hi,
Right now trying to implement Eventlisteners for image update.

- as Damien explained, you should use the FileAccessService to access both

the avatarcache directory (getPrivatePersistentDirectory) and store your
files (getPrivatePersistentFile). This should simplify a lot the assignIcons
method.

Will do that using GUIActivator

- you don't need to copy files and create temporary files each time a new
file is chosen. You can simply create a special button extending
SIPCommButton, associate a file with it and when the user selects new image
update buttons files and icons. Once the "Set" button is pressed you can
then store the new image to the file system through the FileAccessService.

This will also require to repaint that button. I tried that earlier (though
not for long) and it wasnt refreshing to left it. Will try it again later
and will ask for help if I face any problems.

I know you're not yet in the stage of finalizing code, but wanted to make
just a quick remind about code formatting. You can have a look to project
code conventions here:
http://www.sip-communicator.org/index.php/Documentation/CodeConvention(for Eclipse users there's a ready to use formatter that you can import).
And don't forget to limit code to column 80:)

I have tried to keep my IDE settings as close to convention but yes 80
column limit isnt one of them. Will soon switch to Eclipse.

Another thing to remind here is that when you change existing files, please
make sure to change only code that's related to your work, because otherwise
reviewing the code and tracking the exact changes becomes very difficult
(like in AccountStatusPanel). I know that's your last problem right now, but
for us it's our first one, so don't be mad at me:))

Sorry I must have pressed the Format Button on Netbeans which changed
everything.

···

-----
Shashank Tyagi,
Computer Science(IDD),
Part III,
Institute of Technology,
Banaras Hindu University,
India.
+91-9651422932
+91-9235600751
shashank.tyagi.cse06@itbhu.ac.in
shashankt@acm.org


#18

Hi all,
https://sip-communicator.dev.java.net/svn/sip-communicator/branches/gsoc09/myavatars

<https://sip-communicator.dev.java.net/svn/sip-communicator/branches/gsoc09/myavatars>I
have added support for ImageDisplayListeners which is used to change the
Display Image in main screen. Currently I have only implemented it for
Jabber. Please take a look and see if I have implemented it in a correct
way. If yes then will do the same for all protocols.

···

-----
Shashank Tyagi,
Computer Science(IDD),
Part IV,
Institute of Technology,
Banaras Hindu University,
India.
+91-9651422932
+91-9235600751
shashank.tyagi.cse06@itbhu.ac.in
shashankt@acm.org