I think a checkbox is not needed. In a log viewer, adresses of poeple
without a log make no sense, while logs of ppl you deleted still make
sense. So, no checkbox but just populate the combobox with ppl who have a
log. Great coding! Thanks for this great improvement (it really makes the
log viewer a lot better).
Karel.
2007/3/15, Gabriel Gambetta <[EMAIL PROTECTED]>:
Here's a patch which does the following. In the View History window
there's a checkbox next to the user combobox which says "All users with
logs" and it's initially unchecked.
When this checkbox is unchecked, you get the current behavior of AMSN -
the combobox is populated with addresses from the current profile's
contact list.
When the checkbox is checked, however, the combobox is populated with
the addresses of all the users for whom there are logs in the log
folder. This includes people no longer in the user's contact list.
I did this because I made a script that converted my old GAIM log files
to AMSN log files since I've migrated to AMSN a few months ago.
The patch touches loging.tcl (I also added the English and Spanish
versions of the "All users with logs" text).
GetUsersWithLogs() scans the log directory and finds all the users for
whom there are log files. Returns an unordered list of such names.
GetContactList() returns either the original contact list (ie the old
behavior) or the list of users with logs - in both cases it appends the
eventlog file, as it was done before. The desired behavior is chosen by
the bListAllUsers variable, which the checkbox bounds to.
LoadUsersCombo() refreshes the combo box with usernames and optionally
selects an email. This was done in OpenLogWin() but it is now called
when the state of the checkbox changes.
The changes in OpenLogWin() just use the new functions. No new behavior
is introduced here except for adding the checkbox to the dialog.
This is my first Tcl/Tk code ever so it probably violates every piece of
conventional wisdom and good programming practices you may imagine :)
Hope this is useful,
--Gabriel
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Amsn-devel mailing list
Amsn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amsn-devel
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Amsn-devel mailing list
Amsn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amsn-devel