GNOME Bugzilla – Bug 92645
"Server -> Select Server" shows "Folders"
Last modified: 2004-12-22 21:47:04 UTC
Since a few days Pan has the following bad behavior: I have 4 different news servers, which all are shown in the "Server -> Select Server" submenu. When I select one of the 3rd or 4th it automagically selects the 3rd but shows the "folders" list. No way to get the subscribed or all groups for the real servers. Today I tried a bit around and found out when this happens and I select the "Get List of all Groups..." menu item, a task is generated which tries to query the group list from the server named "folders". Strange. The odd thing is that this only happens approximately each 2nd restart of Pan.
I find this happens when I start pan, contact one server, and then try to use another server. So you can only access one server per session -- after that it'll just say "folders" with pan.sentlater and another pan folder in the group list. This doesn't always happen. Exiting and restarting pan, then selecting the server I want always works.
Fume, I can't make this happen. I'll scan through the code and try to figure out what could make it happen though. hmm, what are the short names of your servers, the ones that appear in your menu?
Yes, they are. In the menu "Servers - Select Server" there are the same 4 names as in the "Edit - Preferences... " dialog under "Server - News". The behaviour of my Pan is different to that of ywwg@usa.net's. It only happens sometimes. About every 2nd time. When I start Pan, it shows the first server's group list. The first server in the "Servers - Select Server" menu (which is alphabetically sorted, the preferences dialog is sorted in the opposite direction). When I choose the 2nd Server from the menu, no problem. When I choose the 3rd, it only shows "Pan.sent" and "Pan.outbox" (or so).
d'oh, this was a really dumb one. To atone, I'll explain what I did... Both the menu click handler, and the menu builder, get an array of servers from serverlist_get_servers(). The index in this array was passed to the click listener so that the code could find which server the user clicked on. The problem is, the array is sorted alphabetically before being put into the menu, so that it will look nice in the menu. The array that the click handler has doesn't sort, so the indicies are out of sync. :P This problem affects any groups of Servers, not just the Folders. Folders gets dragged into this mess because, internally, Folders are newsgroups inside a mock `Folders' news server. This is fixed now in CVS, as the menu buttons remember the server names so that the click handler can look the server up by name: http://cvs.gnome.org/bonsai/cvsview2.cgi?diff_mode=context&whitespace_mode=show&subdir=pan/pan&command=DIFF_FRAMESET&file=server-menu-ui.c&rev1=1.1&rev2=1.2&root=/cvs/gnome http://cvs.gnome.org/bonsai/cvsview2.cgi?diff_mode=context&whitespace_mode=show&subdir=pan&command=DIFF_FRAMESET&file=ChangeLog&rev1=1.1525&rev2=1.1526&root=/cvs/gnome
*** Bug 91348 has been marked as a duplicate of this bug. ***
*** Bug 91212 has been marked as a duplicate of this bug. ***