After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 92645 - "Server -> Select Server" shows "Folders"
"Server -> Select Server" shows "Folders"
Status: RESOLVED FIXED
Product: Pan
Classification: Other
Component: general
0.13.0
Other Linux
: Normal blocker
: 0.13.1
Assigned To: Charles Kerr
Pan QA Team
: 91212 91348 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2002-09-06 10:10 UTC by Johann Glaser
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Johann Glaser 2002-09-06 10:10:35 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.
Comment 1 owen-bugs 2002-09-07 19:45:39 UTC
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.
Comment 2 Charles Kerr 2002-09-17 04:18:29 UTC
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?
Comment 3 Johann Glaser 2002-09-17 08:59:56 UTC
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).
Comment 4 Charles Kerr 2002-09-17 17:38:23 UTC
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
Comment 5 Charles Kerr 2002-09-17 17:41:06 UTC
*** Bug 91348 has been marked as a duplicate of this bug. ***
Comment 6 Charles Kerr 2002-09-17 17:46:27 UTC
*** Bug 91212 has been marked as a duplicate of this bug. ***