Sunday, May 5, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 468  / 3 Years ago, fri, august 20, 2021, 2:44:04

I am currently very puzzled why something so simple fails so hard:



This is the source code for a very very simple recent chooser menu, but it fails.



My output is this:



Display name: recentchoosermenu.c
File URI: file:///home/wolf/Downloads/recentchoosermenu.c
Last application: gedit
Display name: recentchoosermenu.c
...


for every entry, it's always the first file.



I really have no idea why.



Thanks for any help,



Wolf



EDIT: Well this is embarassing, forgot to append the link: https://gist.github.com/3483363



Sorry.


More From » gtk

 Answers
3

Well, it seems that it's a bug in the global menu somewhere. When adding the Gtk.RecentChooserMenu to a Gtk.MenuToolButton or simply disabling the global menu, the problem doesn't occur.



To test, add these two lines to the very top of your code:



import os
os.environ['UBUNTU_MENUPROXY'] = '0'

[#35919] Saturday, August 21, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
iriousutur

Total Points: 321
Total Questions: 112
Total Answers: 106

Location: Sweden
Member since Mon, Dec 7, 2020
3 Years ago
;