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 84220 - Find mailbox by name
Find mailbox by name
Status: VERIFIED FIXED
Product: balsa
Classification: Other
Component: general
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: Balsa Maintainers
Balsa Maintainers
Depends on:
Blocks:
 
 
Reported: 2002-06-05 09:53 UTC by PeterBloomfield
Modified: 2009-08-15 18:40 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
Patch for the HEAD branch (29.29 KB, patch)
2002-06-05 09:54 UTC, PeterBloomfield
none Details | Review
Patch for the BALSA_2 branch (32.28 KB, patch)
2002-06-05 09:54 UTC, PeterBloomfield
none Details | Review
Patch for BALSA_2 cvs branch (41.47 KB, patch)
2002-06-07 03:03 UTC, PeterBloomfield
none Details | Review
Patch for BALSA_2 branch on cvs. (42.64 KB, patch)
2002-06-11 14:02 UTC, PeterBloomfield
none Details | Review
Patch for HEAD branch of cvs. (40.08 KB, patch)
2002-06-11 14:03 UTC, PeterBloomfield
none Details | Review
Replacement BALSA_2 patch. (42.67 KB, patch)
2002-06-11 14:21 UTC, PeterBloomfield
none Details | Review
Bug-free patch for HEAD branch :-) (41.00 KB, patch)
2002-06-12 03:17 UTC, PeterBloomfield
none Details | Review
Bug-free patch for BALSA_2 branch ;-) (45.86 KB, patch)
2002-06-12 03:18 UTC, PeterBloomfield
none Details | Review
Patch for the HEAD cvs branch (6.38 KB, patch)
2002-06-19 12:55 UTC, PeterBloomfield
none Details | Review

Description PeterBloomfield 2002-06-05 09:53:22 UTC
See http://mail.gnome.org/archives/balsa-list/2002-June/msg00005.html and
its followups. The following attachments are proposed patches for the HEAD
and BALSA_2 cvs branches, respectively. They centalize Balsa's `find by
...' functions in src/balsa-app.c, and replace `find by name' with `find by
url' where it was easy to do so. They also simplify the `most recently
used' code by using the new search functions.
Comment 1 PeterBloomfield 2002-06-05 09:54:15 UTC
Created attachment 8994 [details] [review]
Patch for the HEAD branch
Comment 2 PeterBloomfield 2002-06-05 09:54:59 UTC
Created attachment 8995 [details] [review]
Patch for the BALSA_2 branch
Comment 3 Pawel Salek 2002-06-05 20:36:58 UTC
Both patches in. Thanks!
Comment 4 PeterBloomfield 2002-06-07 03:01:58 UTC
Next step: the following patch (for the BALSA_2 cvs branch)
consolidates the `most recently used folders' code from balsa-index.c
and balsa-message.c into balsa-mblist.c (without changing the
functionality). It also defines a new widget like that described at:

http://mail.gnome.org/archives/balsa-list/2002-June/msg00018.html

and replaces the GtkCombo widget used to select the fcc_box in
sendmsg-window.c with an instance of it. This eliminates the potential
failure of the current code when more than one mailbox has a given
name, and provides a convenient UI for selecting an fcc_box anywhere
in the mailbox tree.

I'll back-port this to the HEAD cvs branch in a few days and post it here.
Comment 5 PeterBloomfield 2002-06-07 03:03:12 UTC
Created attachment 9037 [details] [review]
Patch for BALSA_2 cvs branch
Comment 6 PeterBloomfield 2002-06-07 03:15:35 UTC
Oops--that should have been:

Next step: the following patch (for the BALSA_2 cvs branch)
consolidates the `most recently used folders' code from balsa-index.c
and message-window.c into balsa-mblist.c (without changing the
    ^^^^^^^^^^^^^^^^
functionality).
Comment 7 Pawel Salek 2002-06-07 08:15:09 UTC
My first impression is that GtkOption list is not easy to use with
keyboard only. If others share this impression, this can be reported
to gtk+ team.

Other comments:
1. When I select "other" from the list, the new window does not get
focus (parent improperly defined?).

2. When I cancel the selection and select "other" second time, balsa
crashes.


  • #1 validate_row
    at gtktreeview.c line 3633
  • #2 do_validate_rows
    at gtktreeview.c line 4001
  • #3 gtk_tree_view_size_request
    at gtktreeview.c line 1499
  • #4 g_cclosure_marshal_VOID__BOXED
    at gmarshal.c line 566
  • #5 g_type_class_meta_marshal
    at gclosure.c line 514
  • #6 g_closure_invoke
    at gclosure.c line 437
  • #7 signal_emit_unlocked_R
    at gsignal.c line 2271
  • #32 g_main_dispatch
    at gmain.c line 1617
  • #33 g_main_context_dispatch
    at gmain.c line 2161
  • #34 g_main_context_iterate
    at gmain.c line 2242
  • #35 g_main_loop_run
    at gmain.c line 2462
  • #36 gtk_main
    at gtkmain.c line 912

Can you reproduce this?
Comment 8 PeterBloomfield 2002-06-07 09:17:53 UTC
No, I can't reproduce the crash--looks like a gtk problem. However,
the widget is left showing `Other...' each time I cancel, which isn't
pretty--that needs fixing.

The focus problem can presumably be fixed with gtk_widget_grab_focus.
What was the keyboard problem with GtkOptionMenu? I can focus it with
the tab key, drop down the list with space-bar, navigate the list with
cursor up and down, and select an item with the space-bar. Was some
part of that not working for you?
Comment 9 Pawel Salek 2002-06-07 09:19:13 UTC
I could not figure the spacebar part.
Comment 10 PeterBloomfield 2002-06-07 11:00:18 UTC
You're right, the focus is a parent-window problem.

I'm also bothered by the widget's memory--the initial fcc-box is the
last one used. Perhaps it should be:

if balsa_app.copy_to_sentbox, the first item should be Sentbox, the
second should be null, and the history should follow;

else the first item should be null, with the history following.
Comment 11 PeterBloomfield 2002-06-11 14:01:16 UTC
A better patch for BALSA_2 follows. It fixes the focus problem that
Pawel pointed out, better respects GtkOptionMenu, and leaves the menu
in a better state after cancelling a tree display (i.e., showing the
current selection instead of "Folder...").

A backport for HEAD follows that patch. In the same way, it
consolidates the `most recently used folders' code from balsa-index.c
and message-window.c into balsa-mblist.c, establishes the option menu
widget, and uses it in sendmsg-window.c in place of the combo box for
fcc folder.

The functionality of the BalsaIndex context menu is, afaict,
preserved. I'm finding that having an option menu for the fcc-box is
an amazing convenience--after an hour or two of testing, I'd hate to
go back to just having Sentbox--I never used the Combo box because it
was too much trouble to type in the name. 

There is one wrinkle in the HEAD code: if you drop down the menu, move
the pointer over the  "Folder" item to show the tree, then move the
pointer away and click something else, the menu goes away as it
should, but it shows "Folder" as the selected item. The fix is to
invoke the setup callback as in bmbl_mru_transferred_cb, but I can't
find a signal that tells us when that happens. The BALSA_2 code uses
different mechanisms, and this wrinkle doesn't appear.
Comment 12 PeterBloomfield 2002-06-11 14:02:33 UTC
Created attachment 9130 [details] [review]
Patch for BALSA_2 branch on cvs.
Comment 13 PeterBloomfield 2002-06-11 14:03:36 UTC
Created attachment 9131 [details] [review]
Patch for HEAD branch of cvs.
Comment 14 PeterBloomfield 2002-06-11 14:20:41 UTC
Oops--tiny oversight in the BALSA_2 code: always check that a callback
is there before calling it! Replacement patch follows.
Comment 15 PeterBloomfield 2002-06-11 14:21:27 UTC
Created attachment 9132 [details] [review]
Replacement BALSA_2 patch.
Comment 16 PeterBloomfield 2002-06-11 15:07:37 UTC
The patches are still broken--more later.
Comment 17 PeterBloomfield 2002-06-12 03:17:13 UTC
Created attachment 9149 [details] [review]
Bug-free patch for HEAD branch :-)
Comment 18 PeterBloomfield 2002-06-12 03:18:15 UTC
Created attachment 9150 [details] [review]
Bug-free patch for BALSA_2 branch ;-)
Comment 19 PeterBloomfield 2002-06-13 00:58:06 UTC
Files:

src/balsa-index.c, src/balsa-mblist.[ch], src/message-window.[ch]:
 - consolidate the mru code into balsa-mblist.c;
 - define a new GtkOptionMenu mru widget. 

libbalsa/message.[ch], src/print.c, src/balsa-message.c:
 - replace fcc_mailbox with fcc_url.

libbalsa/send.c:
 - eliminate mqi->fcc.

src/balsa-app.[ch], src/save-restore.c:
 - add and manage balsa_app.fcc_url.

src/sendmsg-window.[ch]:
 - use the mru option menu for the fcc-box.
Comment 20 Pawel Salek 2002-06-13 08:51:08 UTC
(bug-free is a bold statement! :-))
Patches commited to HEAD and BALSA_2 branches. Thanks!
Comment 21 PeterBloomfield 2002-06-19 12:54:05 UTC
The API for the option menu isn't a good fit with the filter code,
which needs to manage the menu after it's been created. The following
patch for the HEAD branch of cvs introduces a new API, and changes the
fcc-box code to use it.

src/balsa-mblist.[ch]:
 - new API for balsa_mblist_mru_option_menu.

src/sendmsg-window.c:
 - use the new API for the fcc-box widget.
Comment 22 PeterBloomfield 2002-06-19 12:55:08 UTC
Created attachment 9323 [details] [review]
Patch for the HEAD cvs branch
Comment 23 Pawel Salek 2002-12-27 22:35:52 UTC
This was resolved long time ago!
Comment 24 PeterBloomfield 2002-12-28 14:56:12 UTC
Sorry for the delay!