This is a prepare commit for the following refactor of
dde-application-manager.
I remove almost all files in this git repository.
We will start the refactor in later commits.
Signed-off-by: black-desk <me@black-desk.cn>
Recognized args should be removed from exec args when there are no
actual contents. instead of being replaced by "".
Log: fix error handling recognized args
* fix: set GIO_LAUNCHED_DESKTOP_FILE_PID
To set GIO_LAUNCHED_DESKTOP_FILE_PID, we have to manually fork and
exec, as QT determined the environ use to execvp, before running
childModifyer.
After use bare fork and exec, we have to wait for dead child processes.
Otherwise there will be zombies.
Signed-off-by: black-desk <me@black-desk.cn>
* fix: X-Deepin-CreatedBy is key not value
-
Signed-off-by: black-desk <me@black-desk.cn>
---------
Signed-off-by: black-desk <me@black-desk.cn>
AM will emit a signal which named UninstallSuccess when we
click launcher to uninstall the app of linglong. Then launcher
request item data after listen this signal and it will call AM
to refresh the data map. This make AM think the desktop item has
been removed when the fs notify event arrive, which cause AM
won't remove the desktop file.
So we just do removeDesktop() before emit the signal.
Log:
AM used try to get the real path when the desktop file is a symbolic
link and save the path to a map, but it use the path
where symbolic link locate to check this desktop file is in that map or not.
This mistake make removeDesktop() not to be executed
when handling the event DFChanged.
This "get realpath" behavior is useless, we have test these two cases:
There is a symlink in /usr/share/applications/xxx.desktop pointer to /tmp/xxx.desktop
1. we remove the symlink;
2. we remove the real desktop file.
whether we change the code or not, AM behavior in the same way:
1. it make launcher remove the item;
2. it cannot make launcher remove the item.
case 2 is a bug. but we do not change that behavior in this commit.
Log:
KeyFile::saveToFile not guaranteed section order, which is not the right
behavior of desktop file. XDG requires the first section of desktop file
always to be "Desktop Entry".
So I write a new DesktopFile class, which override the saveToFile method
of KeyFile, to make it work.
closelinuxdeepin/developer-center#3807
Signed-off-by: black-desk <me@black-desk.cn>
* fix get a longer name then it actually is
* fix abnormal icon display in the dock
* set fullscreen launcher by default
* fix default application resets after relogin
* fix crash when get windowicon
* fix app proxy invalid
* fix invalid appid