aMSN Forums
February 20, 2018, 04:42:07 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: New forum for aMSN !!
 
   Home   Help Search Login Register  
Pages: [1] 2 3 4
  Print  
Author Topic: AvatarAutoChange plugin 2.0 beta  (Read 919158 times)
Sethnakht
Newbie

Offline Offline

Posts: 36


View Profile
« on: June 11, 2007, 10:15:56 pm »

Hello,

I've made a new plugin : AvatarAutoChange

http://www.savefile.com/files/1322192

The goal if to change to display image (Avatar) when the status change (manually or automatically) to set a more accurate DP for your contacts .

(It's functional, but could be, of course, improved. first of all the config window.)

I would know if it's possible to add new Post Events:
 - MyDisplayPictureChange : to notify the modification of the DP (in gui.tcl, proc pictureBrowser)
 - BeforeChangeMyState : to notify plugins of the imminent state change (to let plugin save old state, change state message, ...)  (in automsg.tcl before ::MSN::changeStatus $new_state, and in gui.tcl before ::MSN::changeStatus XXX (3 times))

Thanks for your suggestions !  Cheesy
Logged
square87
Super Power User
**
Offline Offline

Posts: 427


View Profile
« Reply #1 on: June 12, 2007, 07:21:03 am »

Hello Sethnakht Smiley
It's nice and useful for someone. Thanks.

About BeforeChangeMyState. Save initial status in a var (var1), then when ChangeMyState Event is called you save the new status in a var2. Then... when the user will change again his/her status:
set var1 $var2
set var2 NewStatus
So var1 will always have the penultimate status.

About MyDisplayPictureChange: what do you what to do with this Event? Do you save the last avatar used? If yes you can write a solution like for BeforeChangeMyState. When DP is changed ContactListColourBarDrawn Event is called (in general it's called when we change something in topCL)

TODO/Suggestion:
* Auto-resize avatars (it's important, see how aMSN works about that)
* You can add tk_getOpenFile command ( http://www.tcl.tk/man/tcl8.4/TkCmd/getOpenFile.htm ) to open a search window, then select a file and path of file will be returned.

Thanks, it was in my TODO list Smiley
Sorry for my English.
Are you Italian? Tongue

Have a nice day.
Logged
Phil
Administrator
Super Power User
*****
Offline Offline

Posts: 653


View Profile
« Reply #2 on: June 12, 2007, 10:38:48 pm »

He is french....
Logged

Phil

AMsn is great, and it will be greater :wink:
Sethnakht
Newbie

Offline Offline

Posts: 36


View Profile
« Reply #3 on: June 12, 2007, 10:43:43 pm »

Hi square87,
Thanks for your reply,

The event ContactListColourBarDrawn is interesting but, after some tests, it's not called after a manual change of the display picture Sad

The BeforeChangeMyState would be usefull to change the DP before sending the status to MSN server/contact, currently, i'm sending a second time the status+display picture (using ::MSN::WriteSB) while it's done just before my the ::MSN::changeStatus

Thanks for your todo list, i'm getting some problem to make a config windows with button but I should be able to do it...  :wink:

(not Italian, I'm French)
Logged
square87
Super Power User
**
Offline Offline

Posts: 427


View Profile
« Reply #4 on: June 13, 2007, 07:58:17 am »

Quote from: "Sethnakht"
Hi square87,
Thanks for your reply,

Hi Sethnakht
Quote
The event ContactListColourBarDrawn is interesting but, after some tests, it's not called after a manual change of the display picture Sad

right Undecided

Quote
The BeforeChangeMyState would be usefull to change the DP before sending the status to MSN server/contact, currently, i'm sending a second time the status+display picture (using ::MSN::WriteSB) while it's done just before my the ::MSN::changeStatus

Is it necessary? The plugin works only if an user change a status... why do you set again the same status?
If an user change status, check if there is a default avatar for that status, if yes load default avatar else do nothing.
I think that you can clean your proc in this way:
Code:
proc setAvatar { file new_state } {
if { $file != "" } {
::config::setKey displaypic $file
load_my_pic
return 1
} else {
return -1
}
}

btw it's only my opinion Smiley

Quote
Thanks for your todo list, i'm getting some problem to make a config windows with button but I should be able to do it...  :wink:

you are welcome Smiley
Bye ^___^
Logged
Sethnakht
Newbie

Offline Offline

Posts: 36


View Profile
« Reply #5 on: June 13, 2007, 06:45:44 pm »

Hi,

Thanks for taking time in looking my code,
Quote from: "square87"
I think that you can clean your proc in this way:
Code:
proc setAvatar { file new_state } {
if { $file != "" } {
::config::setKey displaypic $file
load_my_pic
return 1
} else {
return -1
}
}

If the code is this one, the display picture is only set in local config (and shown on the GUI) but it's not sent to contacts... it will be only send at the next status change...  Sad so.. for the time being, i re-send the status+DP (But a new Beforechangestate event could avoid this.. the DP will be send in the same time than the new status)
Logged
square87
Super Power User
**
Offline Offline

Posts: 427


View Profile
« Reply #6 on: June 14, 2007, 07:18:53 am »

Hi Sethnakht Smiley
I don't know, i think that's a protocol thing. Maybe in that case "status change" is only a signal.
But anyway you'll save few seconds. If you want you can send a diff to ML.
About setAvatar you can change "load_my_pic" in "after 500 set_displaypic $file", and it will work, but, anyway, it calls change status proc.
Byez
Logged
vivia
Administrator
Super Power User
*****
Offline Offline

Posts: 2464


View Profile
« Reply #7 on: June 14, 2007, 10:01:08 am »

It is normal, you must change status in order to notify the server.
Logged
Sethnakht
Newbie

Offline Offline

Posts: 36


View Profile
« Reply #8 on: June 19, 2007, 10:27:16 pm »

I have submit a new version, it's include :
 - new config panel (image preview, file browser
 - resize avatar to 96x96 option

I have changed the name to make is shorter : AvatarAutoChange

here it is : AvatarAutoChange.zip

Thanks for your comments and suggestions, and if I can submit it...
Logged
joaquimcr
Newbie

Offline Offline

Posts: 7



View Profile
« Reply #9 on: June 21, 2007, 05:20:14 pm »

lang pt_BR

Code:
amsn_lang_version 2
selectimage Selecionar uma imagem para cada estado :
resizeimage Converter imagens para o tamanho padrão (96px)


bye!
Logged
Sethnakht
Newbie

Offline Offline

Posts: 36


View Profile
« Reply #10 on: June 22, 2007, 06:54:29 pm »

Quote from: "joaquimcr"
lang pt_BR

Code:
amsn_lang_version 2
selectimage Selecionar uma imagem para cada estado :
resizeimage Converter imagens para o tamanho padrão (96px)


bye!
Thanks joaquimcr !  Cheesy
Logged
lucianolev
Power user
*
Offline Offline

Posts: 56


View Profile
« Reply #11 on: June 26, 2007, 03:22:28 am »

lang es_AR

Code:

amsn_lang_version 2
selectimage Seleccionar una imagen para cada estado :
resizeimage Redimensionar imágenes al tamaño predeterminado (96px)


Thanks for the plugin!   Cheesy
Logged
Sethnakht
Newbie

Offline Offline

Posts: 36


View Profile
« Reply #12 on: July 01, 2007, 03:15:09 pm »

Update : AvatarAutoChange.1.0beta3

Add "no avatar" button to supress the avatar for a state
Add controls to avoid errors if the image has been deleted...
Add es_AR and pt_BR languages (thanks to lucianolev and joaquimcr)

AvatarAutoChange.1.0.zip

Seth.
Logged
Sethnakht
Newbie

Offline Offline

Posts: 36


View Profile
« Reply #13 on: July 01, 2007, 09:34:25 pm »

Update: AvatarAutoChange.1.0beta4

The avatar changed with the classic change display picture is kept in the plug-in settings.

This version contains all the needed stuff, it should be the final release.

AvatarAutoChange.1.0beta4.zip

Seth.
Logged
Sethnakht
Newbie

Offline Offline

Posts: 36


View Profile
« Reply #14 on: July 15, 2007, 12:52:49 pm »

Update for a better interaction between the classic change display picture window and the plugin configuration pannel.
Also fix a error with the chamelon plugin.

AvatarAutoChange1.1

I also have a question : Is it possible to be notified if the user SAVE or CANCEL the plugin options window :?:

Thanks,

Seth.
Logged
Pages: [1] 2 3 4
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!