[issue37693] IDLE/Tkinter: File names are hidden in "Open" menu (Linux)

2019-07-27 Thread Kyle Stanley


Kyle Stanley  added the comment:

> What is a 'DE'?

DE stands for Desktop Environment, usually they come with a number of packages 
(mainly GUI) such as window managers, login managers, toolbars, theming, etc. 
Some of the popular ones include Gnome, Plasma, Mate and LXDE. Usually anything 
related to appearance and GUI behavior is more closely tied to the DE than the 
Linux distro itself. Optionally, users can also create their own cocktail of a 
desktop environment, but in my experience that usually leads to more 
compatibility issues.

> If so, this should be closed as 3rd party.  If you want to test first, bypass 
> IDLE and most of 
> tkinter with the following, run directly in Python.

Hmm, it looks like setting the path object to codecontext.py didn't fix the 
issue, but either way, it looks like the issue is directly tied with 
tk_getOpenFile as you suspected and not the IDLE. I'm not overly familiar with 
tk in general since most of my experience with Python has not involving 
building GUIs. I'll probably spend some time messing around with tk to see if I 
can fix the issue.

Thanks for looking into it. Should I leave it open to get feedback from the 
tkinter devs since the bypass didn't fix the issue? I'll add gpolo to the nosy 
list since he's listed as a tkinter expert and remove IDLE from the title.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37693] IDLE/Tkinter: File names are hidden in "Open" menu (Linux)

2019-07-27 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
keywords: +patch
pull_requests: +14750
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/14983

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37693] IDLE/Tkinter: File names are hidden in "Open" menu (Linux)

2019-07-27 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

This is definitely not an IDLE issue. To open files, IDLE calls 
tkinter.filedialog.Open(parent, filetypes).show(initial_dir, initial_file).  
Open is a subclass of filedialog._Dialog(commondialog.Dialog).  It sets command 
= "tk_getOpenFile".  Dialog.show calls the command with root.tk.call after 
fixing passed in options.  It then fixes the result and returns it.  I believe 
this command calls the native file dialog.  Since tkinter's option processing, 
converting python object to strings suitable for tk.call, is OS independent, I 
presume the problem is in tk_getOpenFile.  I suspect tcl/tk developers have 
trouble keeping up with the parade linuxes and window managers.  (What is a 
'DE?)

If so, this should be closed as 3rd party.  If you want to test first, bypass 
IDLE and most of tkinter with the following, run directly in Python.

>>> import tkinter as tk
>>> r = tk.Tk()
>>> r.tk.call("tk_getOpenFile")  # select codecontext.py, hit 'Open'
'C:/Programs/Python38/Lib/idlelib/codecontext.py'
>>> r.tk.call("tk_getOpenFile")  # hit 'Cancel'
''

--
assignee: terry.reedy -> 
components: +Tkinter -IDLE
nosy: +serhiy.storchaka
title: IDLE: File names are hidden in "Open" menu (Linux) -> IDLE/Tkinter: File 
names are hidden in "Open" menu (Linux)

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com