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 377164 - Strange numbers in GtkRecentChooserMenu
Strange numbers in GtkRecentChooserMenu
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Class: GtkRecent
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
Emmanuele Bassi (:ebassi)
Depends on:
Blocks:
 
 
Reported: 2006-11-19 21:52 UTC by Jan Arne Petersen
Modified: 2007-02-10 13:25 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18


Attachments
screen shot (23.81 KB, image/png)
2006-11-19 21:52 UTC, Jan Arne Petersen
Details
A screenshot (27.38 KB, image/png)
2007-02-10 12:34 UTC, Vincent Geddes
Details

Description Jan Arne Petersen 2006-11-19 21:52:16 UTC
The GtkRecentChooserMenu should not use pdata->loaded_items as a count to number the items but the count of really shown items. See attached screen shot.
Comment 1 Jan Arne Petersen 2006-11-19 21:52:58 UTC
Created attachment 76869 [details]
screen shot
Comment 2 Emmanuele Bassi (:ebassi) 2007-02-08 14:25:31 UTC
2007-02-08  Emmanuele Bassi  <ebassi@gnome.org>

        * gtk/gtkrecentchoosermenu.c (idle_populate_func): Keep count
        of the displayed items to build the menu items mnemonic instead
        of the overall item count. (#377164)

        (idle_populate_clean_up): Append a menu item if all the items
        got filtered in the idle populate function. (#405696)

        * tests/Makefile.am:
        * tests/testrecentchoosermenu.c: Add a test for the
        GtkRecentChooserMenu widget.
Comment 3 Wouter Bolsterlee (uws) 2007-02-09 08:37:15 UTC
Please consider backporting this fix to the gtk-2-10 branch.
Comment 4 Emmanuele Bassi (:ebassi) 2007-02-09 16:04:57 UTC
if someone gives it more testing in the unstable branch and verifies that the
bugs are indeed closed, I will.
Comment 5 Vincent Geddes 2007-02-10 12:28:40 UTC
I have tested the bug fix and can verify that it works.

Glade uses GtkRecentChooserMenu and suffers from this bug. After testing Glade with gtk+ trunk, the bug disappeared.

I tested GtkRecentChooserMenu under a variety of cases:
 
  * An empty recents list
  * Clearing the recents list
  * Adding an item to the recents list
  * Removing old items off the list by adding new items from another application
Comment 6 Vincent Geddes 2007-02-10 12:34:23 UTC
Created attachment 82272 [details]
A screenshot

Shows proper numbering in GtkRecentChooserMenu.
Comment 7 Emmanuele Bassi (:ebassi) 2007-02-10 13:25:31 UTC
many thanks vincent, I've backported the fixes from trunk to the gtk-2-10 branch.