aMSN Forums
February 10, 2012, 11:11:05 pm *
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]
  Print  
Author Topic: A few improvements (diff)  (Read 4586 times)
MurDoK
Newbie

Offline Offline

Posts: 43



View Profile
« on: March 31, 2007, 05:21:55 pm »

Hello. I attach my 'svn diff' with some improvements and modifications I have been making from time to time. They are not big changes but I consider them better to be committed before 0.97 release.

+ Show a warning when your psm/nickname is too long
+ Added new language keys: es, en
+ Ensure smileys popup is always destroyed
+ Sometimes right-click on CL popup was shown out of screen
+ amsn won't reload current skin
+ Focus entry when renaming a group
+ Avoid renaming mobile and "nogroup" groups
+ Minor fix usersInChat()

Note: langkeys longnick, longpsm and longp4c need to be updated
I hope it's useful

See you!


http://www.savefile.com/files/595836
Logged

-MurDoK
billiob
Administrator
Super Power User
*****
Offline Offline

Posts: 1352


View Profile
« Reply #1 on: March 31, 2007, 10:20:30 pm »

Code:
--- lang/langen (revisión: 8340)
+++ lang/langen (copia de trabajo)
@@ -484,9 +484,9 @@
 logsmileys Displays Emoticons and Smileys in aMSN's history windows
 logsout has just logged out
 logwebcam Save all webcam sessions to aMSN's History for future viewing
-longnick Your nickname is longer than 130 characters. This is not officially supported by the MSN protocol. Are you sure you want to set it?
-longp4c Your Friendly Name is longer than 130 characters. The Friendly Name that will appear on the official MSN client will be $1. Are you sure you want to set it?
-longpsm Your personal message is too long. This is not officially supported by the MSN protocol. Are you sure you want to set it?
+longnick Your nickname is too long. Maximum supported by the MSN protocol is 130 characters and current characters are $1. Are you sure you want to set it?
+longp4c Your Friendly Name is too long. Maximum supported by the MSN protocol is 130 characters and current characters are $1. Are you sure you want to set it?
+longpsm Your personal message is too long. Maximum supported by the MSN protocol is 130 characters and current characters are $1. Are you sure you want to set it?
 lowrescam Use a low-resolution webcam
 lprivtoconf Private chat turned into Conference with $1
 luclosedwin You have closed the window on $1

First, we shouldn't change lang keys since lang translators won't know that change.
Then, we should add a character counter while writing nick/psm ...

Code:
--- gui.tcl (revisión: 8340)
+++ gui.tcl (copia de trabajo)
@@ -5219,7 +5219,7 @@
 
@@ -5219,7 +5219,7 @@
 
  frame $w.fb
  button $w.fb.ok -text [trans ok] -command change_name_ok
- button $w.fb.cancel -text [trans cancel] -command "destroy $w"
+ button $w.fb.cancel -text [trans cancel] -command "destroy $w; destroy .smile_selector"
  pack $w.fb.cancel -side right -padx [list 5 0 ]
  pack $w.fb.ok -side right
 
@@ -5288,6 +5290,8 @@
  ::config::setKey p4c_name $friendly
 
  destroy .change_name
+ destroy .smile_selector
+
 }
 #///////////////////////////////////////////////////////////////////////

Ok, but better if we withdraw it.

Code:

--- skins.tcl (revisión: 8340)
+++ skins.tcl (copia de trabajo)
@@ -987,7 +987,7 @@
 
  label $w.getmore -text "[trans getmoreskins]" -fg #0000FF -cursor hand2
 
- button $w.ok -text "[trans ok]" -command "::skinsGUI::SelectSkinOk $w"
+ button $w.ok -text "[trans ok]" -command "::skinsGUI::SelectSkinOk $w $select"
  button $w.cancel -text "[trans cancel]" -command "::skinsGUI::SelectSkinCancel $w"
  checkbutton $w.preview -text "[trans preview]" -variable ::skin::preview_skin_change -onvalue 1 -offvalue 0
 
@@ -1025,7 +1025,8 @@
  $w.main.right.box selection set $select
  $w.main.right.box itemconfigure $select -background #AAAAAA
  }
-
+        
+                $w.ok configure -command "::skinsGUI::SelectSkinOk $w $select"
  ::skinsGUI::DoPreview 1
  bind $w <Destroy> "grab release $w"
  bind $w.main.right.box <Button1-ButtonRelease> "::skinsGUI::DoPreview"
@@ -1124,21 +1125,27 @@
  # This procedure is called when OK in skin selector is pressed.
  # Arguments:
  #  - w => Path of the widget skin selector.
- proc SelectSkinOk { w } {
+ proc SelectSkinOk { w select } {
  if { [$w.main.right.box curselection] == "" } {
  $w.status configure -text "[trans selectskin]"
  } else {
  $w.status configure -text ""
  set skinidx [$w.main.right.box curselection]
  set skin [lindex [lindex [::skin::FindSkins] $skinidx] 0]
- status_log "Chose skin No $skinidx : $skin\n"
- config::setGlobalKey skin $skin
- save_config
- ::config::saveGlobal
- unset ::skin::skin_reloaded_needs_reset
- ::skin::reloadSkin $skin
- destroy $w
- ClearPreview
+                        # This avoid reloading current skin
+                        if { $skinidx == $select } {
+                                ::skinsGUI::SelectSkinCancel $w
+                        } else {
+                         status_log "Chose skin No $skinidx : $skin\n"
+        config::setGlobalKey skin $skin
+        save_config
+        ::config::saveGlobal
+        unset ::skin::skin_reloaded_needs_reset
+        ::skin::reloadSkin $skin
+        destroy $w
+        ClearPreview        
+                        }
+
  }
  }

But if you add a new skin, without reloading amsn, and choose the skin at the exactly same position, it'll fail.

Code:

--- groups.tcl (revisión: 8340)
+++ groups.tcl (copia de trabajo)
@@ -196,6 +196,7 @@
 
  pack .dlgthis.data .dlgthis.buttons -side top
  moveinscreen .dlgthis 30
+ focus .dlgthis.data.ent
 
  }
ok

Code:

--- groups.tcl (revisión: 8340)
+++ groups.tcl (copia de trabajo)
@@ -208,7 +209,7 @@
  # The submenu of standard group actions
  menu .group_handler -tearoff 0 -type normal
  .group_handler add command -label "[trans groupadd]..." -command ::groups::dlgAddGroup
- if {$gid != "online" & $gid != "offline"} {
+ if {$gid != "online" && $gid != "offline" && $gid != "mobile" && $gid != "0"} {
  .group_handler add separator
  .group_handler add command -label "[trans delete]" -command "::groups::Delete $gid dlgMsg"
  .group_handler add command -label "[trans rename]..." -command "::groups::dlgRenameThis $gid"

Ok

Code:

--- gui.tcl (revisión: 8340)
+++ gui.tcl (copia de trabajo)
@@ -6061,7 +6065,12 @@
  .user_menu insert $start cascade -label "[trans moreactions]" -menu $actions
  }
 
- tk_popup .user_menu $x $y
+        if {[expr {$y + 300}] > [winfo screenheight .]} {
+         set y [expr {$y - 300}]
+        }
+
+        tk_popup .user_menu $x $y                
+
 }
 
 #///////////////////////////////////////////////////////////////////////

Ok

Code:

--- protocol.tcl (revisión: 8340)
+++ protocol.tcl (copia de trabajo)
@@ -2044,12 +2044,12 @@
 
    }
 
- # Return a list of users in chat, or last user in chat is chat is closed
+ # Return a list of users in chat, or last user in chat if chat is closed
  proc usersInChat { chatid } {
  set sb [SBFor $chatid]
+                # If you are offline but you open a conversation... sb=0
  if { $sb == 0 || [catch {$sb cget -name}] } {
- status_log "usersInChat: no SB for chat $chatid!! (shouldn't happen?)\n" white
- return [list]
+ return $chatid
  }

No, or i don't understant what you want to do.
Logged
kakaroto
Administrator
Super Power User
*****
Offline Offline

Posts: 9424


View Profile WWW
« Reply #2 on: March 31, 2007, 11:57:53 pm »

well done billiob, good review, and thanks for committing...
about the userInChat thing, I don't get it either!
if you say that SBFor returns 0 if we are offline, then it's SBFor that we should fix...
Logged

KaKaRoTo
MurDoK
Newbie

Offline Offline

Posts: 43



View Profile
« Reply #3 on: April 01, 2007, 11:59:03 am »

Hi:

I will explain the last one:
1)Connect offline
2)Open chat with someone
3)Click on avatar and select 'show my pic'
4)You can't go back to see your contact avatar unless you close and open chat again

I was trying to fix it and noticed that if you open chat while you are offline, usersInChat() returns nothing. Ok, maybe returning $chatid it's not the best way to fix it...

I'm sorry about the mistakes  Sad
Logged

-MurDoK
kakaroto
Administrator
Super Power User
*****
Offline Offline

Posts: 9424


View Profile WWW
« Reply #4 on: April 01, 2007, 08:05:54 pm »

Hi,
I can... I completly logged out, but I still can view the other user's DP...
if it's for something such as this, just enable the DualDisplayPicture plugin...
btw.. 2 posts? wow, welcome to the forums then! Smiley
Logged

KaKaRoTo
Fenix-TX
Super Power User
**
Offline Offline

Posts: 660


View Profile
« Reply #5 on: April 01, 2007, 08:16:29 pm »

Quote from: "kakaroto"
Hi,
I can... I completly logged out, but I still can view the other user's DP...
if it's for something such as this, just enable the DualDisplayPicture plugin...
btw.. 2 posts? wow, welcome to the forums then! Smiley

I think that you need to re-read, the problem is not that you can't see the other dp, the problem is, that if you change dp to see your picture you can't change again to see user's picture. I don't know if i you understand. I did the Murdok's steps and i have the same issue.

1) Open a chat window on offline state.
2) On DP, right click and View my image
3) Right click again -> You can't change to show the image of your contact
Logged
kakaroto
Administrator
Super Power User
*****
Offline Offline

Posts: 9424


View Profile WWW
« Reply #6 on: April 01, 2007, 08:21:39 pm »

I read correctly and that's what I meant, I can see the other user's DP again after changing to mine.. I can switch back and forth as much as I like...
Logged

KaKaRoTo
MurDoK
Newbie

Offline Offline

Posts: 43



View Profile
« Reply #7 on: April 01, 2007, 09:22:14 pm »

Quote from: "kakaroto"
I read correctly and that's what I meant, I can see the other user's DP again after changing to mine.. I can switch back and forth as much as I like...


Can anyone else confirm it?? it's weird...

Quote
btw.. 2 posts? wow, welcome to the forums then! Smiley

Thanks! I'm subscribed to amsn-devel and read almost all emails, but I have sent really few. Forums are more... "friendly"
Logged

-MurDoK
Fenix-TX
Super Power User
**
Offline Offline

Posts: 660


View Profile
« Reply #8 on: April 01, 2007, 09:23:43 pm »

Murdok i have that issue too, i can't back to contact's dp
Logged
kakaroto
Administrator
Super Power User
*****
Offline Offline

Posts: 9424


View Profile WWW
« Reply #9 on: April 01, 2007, 10:01:05 pm »

weird...
is the conversation still open (the sb) ? if the user leaves or it's closed for inactivity, it might be the cause...
in any case, your fix is wrong, because "userInChat" should show the users in chat, so if the user leaves, they're not in chat anymore.. that patch would break a LOT of other stuff that depend on usersInChat too..
if you want to fix this, first find the real cause of the issue, why it would work if you're online and the sb is closed and it won't work if you're offline and the sb is closed and fix it there...
Logged

KaKaRoTo
Fenix-TX
Super Power User
**
Offline Offline

Posts: 660


View Profile
« Reply #10 on: April 01, 2007, 10:26:14 pm »

No KKRT, you need to stay OFFLINE, never open a chat window with other state, and stay offline when you do that. So, it will never have inactivity or the other user leave the chat because you are offline when you do that! That's the reason why i said you that need to re-read because is all doing with offline state.

Screenshot 1 Open a chat in state offline (i'm offline), and right click to change to view my own picture.



Screenshot 2 Rigth click again, and i can't change to view user picture.
Logged
kakaroto
Administrator
Super Power User
*****
Offline Offline

Posts: 9424


View Profile WWW
« Reply #11 on: April 02, 2007, 05:56:55 am »

ok, so it's about "appear offline", and the user is never in the conversation, no sb associated with him... so it shouldn't show in usersInChat of course.. if you want to fix this I suggest two things
1 - don't click on 'view my dp' :p lol
2 - find the real source of the issue and any other side effects and fix them there, not in the userInChat API on which many other functions depend on...
Logged

KaKaRoTo
Pages: [1]
  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!