Opened 3 years ago
Last modified 15 months ago
#6350 new enhancement
Quality of life improvement for the file name path in the replay menu
Reported by: | Langbart | Owned by: | |
---|---|---|---|
Priority: | If Time Permits | Milestone: | Backlog |
Component: | UI & Simulation | Keywords: | |
Cc: | Patch: | Phab:D4296, Phab:D4329 |
Description (last modified by )
Currently the path to the file name is displayed in a readonly input field. This has been introduced with [20075] so that you can select and copy the file path.
(1) Either add an option to disable the blinking cursor in the input field and maybe add some color. Right now the way the filename path is displayed is too merged with the replay list, it should look a bit more differentiated. [25976]
OR/ AND
(2) Turn it back into a text type field and add a "Copy" button and even an "Open" button to it.
Some info about the implementation of the copy/open
button:
[19:04:05] elexis so an idea to make such a button could be that one introduces (A) a GUI accessible JS function in C++ that takes 1 string argument and writes this string into clipboard, then (B) is only adding a conventional button that calls this function
[19:04:29] elexis I find this:
[19:04:29] elexis gui/ObjectTypes/CInput.cpp: SDL_SetClipboardText(text.ToUTF8().c_str());
[19:06:52] elexis and such a function would be added somewhere in source/gui/Scripting/ScriptFunctions.cpp, I guess in source/gui/Scripting/JSInterface_GUIManager.cpp
[19:07:46] elexis there are 3 calls to SDL_SetClipboardText already, so it seems such a C++ patch would be something like 5 lines of code
[18:52:20] elexis (00:53:43) elexis: it calls sys_open_url
[18:52:20] elexis (00:54:44) vladislav: It uses xdg-open
[18:52:44] elexis "If a URL is provided the URL will be opened in the user's preferred web browser. If a file is provided the file will be opened in the preferred application for files of that type."
[18:52:48] elexis https://linux.die.net/man/1/xdg-open
[18:56:13] elexis important to notice that if there is a security concern with OpenURL, then it has been there since years
It would be good if this problem could be fixed before implementing this feature:
Attachments (1)
Change History (10)
by , 3 years ago
Attachment: | buttons_are_great.jpg added |
---|
comment:1 by , 3 years ago
Owner: | set to |
---|---|
Patch: | → Phab:D4296 |
comment:2 by , 3 years ago
comment:4 by , 2 years ago
Description: | modified (diff) |
---|
Adding some additional information to the ticket about the implementation of copy/open
buttons.
comment:5 by , 2 years ago
Patch: | Phab:D4296 → Phab:D4296, Phab:D4329 |
---|
added patch number for copy/open
button
comment:9 by , 15 months ago
Owner: | removed |
---|
This is actually bug, there is supposed to be no blinking cursor if you cant edit the value of the field