#tde-devs < 2024/05/23 >
[02:05]micheleC has joined
[09:06]SlavekB has quit (Quit: Kopete 0.12.7 : http://trinitydesktop.org)
[09:59]akh: I've got a question about `Exec` lines in `,desktop` files
[10:00]SlavekB has joined
[10:00]akh: I've got a question about `Exec` lines in `,desktop` files
[10:00]akh: Specifically about escaping characters
[10:01]akh: it looks like `$` must always be escaped as `$$`
[10:01]akh: but `%` does not seem to always need escaping
[10:03]akh: e.g. this line works as intended: Exec=convert %f "$$( ' "%d/%y" ' )"
[10:03]akh: (most text omitted for clarity)
[10:04]micheleC: perhaps. You would have to check in tdelibs in the code that takes care of that. I don't remember the filename out of my head, but it is definitely in tdelibs
[10:04]akh: only the top-level `%f` seems to be treated as a format specifier
[10:05]akh: this is the behaviour that I want but I don't what the full rules are for when escaping is needed
[10:08]akh: micheleC: ok, i'll poke around under that repo. thnx
[10:11]micheleC: (y)
[10:13]micheleC: look at tdeio/tdeio/krun.h and tdeio/DESKTOP_ENTRY_STANDARD as a start
[10:20]akh: thnx, that helps a lot
[10:44]micheleC: (y)
[11:05]akh: For the record, it appears that KMacroExpanderBase::expandMacrosShellQuote (tdelibs/tdecore/kmacroexpander.cpp) performs the expansion with KRunMX1::expandEscapedMacro and KRunMX2::expandEscapedMacro (both in tdelibs/tdeio/tdeio/krun.cpp) performing the actual substitutions. In the context of desktop file Exec=... lines, the actual call that performs the expansion is expandMacrosShellQuote in KRun::processDesktopExec (also in krun.cpp)
[11:05]akh: thnx again for the pointers
[12:02]micheleC: np
[15:01]micheleC has left (Kopete 0.12.7 : http://trinitydesktop.org)
[19:12]SlavekB has quit (Quit: Kopete : https://trinitydesktop.org)
[23:06]SlavekB has joined

#tde-devs < 2024/05/23 >