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 59579 - Scroll menus should remember last position
Scroll menus should remember last position
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Widget: GtkMenu
1.3.x
Other All
: Normal normal
: Small feature
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2001-08-26 19:05 UTC by Havoc Pennington
Modified: 2018-02-10 03:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (555 bytes, patch)
2001-11-24 14:28 UTC, Kristian Rietveld
needs-work Details | Review
Another proposed patch (2.22 KB, patch)
2005-03-21 16:02 UTC, Nickolay V. Shmyrev
none Details | Review

Description Havoc Pennington 2001-08-26 19:05:19 UTC
On the Mac, if I pop up a scroll menu, it will always have the
last-selected item in the visible area, so I don't have to scroll to it again.

We could keep a history of the last menu item that was activated. Perhaps
ideally we'd also have API for applications to set the last-active item,
but for now just automagically remembering the last activated item would be
nice.
Comment 1 Owen Taylor 2001-09-19 16:36:13 UTC
We actually do keep a history of the last activated menu
item -- that's how GtkOptionMenu works.
Comment 2 Kristian Rietveld 2001-11-24 14:27:23 UTC
I hacked up a small patch for this issue some weeks ago, but the
accessibility people weren't happy with it, see:

http://mail.gnome.org/archives/gtk-devel-list/2001-October/msg00129.html

The bug is still open, I'll attach my patch so it won't get lost :)

ChangeLog:

Fri Oct  5 18:33:43 2001  Kristian Rietveld  <kristian@planet.nl>

        * gtk/gtkmenu.c (gtk_menu_popup): add a call to
        gtk_menu_shell_select_item() to activate the last activated item.

        Fixes bug #59579

Comment 3 Kristian Rietveld 2001-11-24 14:28:20 UTC
Created attachment 6081 [details] [review]
proposed patch
Comment 4 Owen Taylor 2001-11-25 23:37:50 UTC
I don't think _selecting_ the last active item is really right.
The ideal GUI behavior is probably:

 - If the menu is activated from the keyboard, always comes up
   scrolled to the top.

 - If the menu is activated from the mouse, comes up scrolled
   so that the last selected item is visible (but nothing
   is selected)

This is what Mozilla does, Windows (IE5 favorites menu) always
comes up scrolled to the last position, either from the 
keyboard or mouse; and you get the annoying behavior of 
a sudden jump in scroll location when you keyboard navigate
into the scrolled section; it's a little less annoying than
it could be because there is the neat touch that only the
actual favorites scroll, not the top fixed menu items (add
to favorites, organize favorites.)
Comment 5 Nickolay V. Shmyrev 2005-03-21 16:02:02 UTC
Created attachment 39013 [details] [review]
Another proposed patch

This problem is nicely pops in GtkComboBox using menus. Combobox should scroll
popup to current item and probably highlight it somehow. If not highligh, but
just make last element prelighted.
Comment 6 Philip Withnall 2007-05-26 16:41:26 UTC
Patch 39013 applies cleanly. Reviewing it would take a little while.

(Working on http://mail.gnome.org/archives/gtk-devel-list/2007-March/msg00148.html)
Comment 7 Matthias Clasen 2018-02-10 03:30:53 UTC
We're moving to gitlab! As part of this move, we are closing bugs that haven't seen activity in more than 5 years. If this issue is still imporant to you and
still relevant with GTK+ 3.22 or master, please consider creating a gitlab issue
for it.