| 191 | namespace AppImageIntegration { |
| 192 | |
| 193 | bool ShouldPrompt() |
| 194 | { |
| 195 | #ifdef __WXGTK__ |
| 196 | if (GetAppImagePath().IsEmpty()) { |
| 197 | // Not running from an AppImage — distro install or dev build. |
| 198 | return false; |
| 199 | } |
| 200 | if (thePrefs::IsAppImageIntegrationDeclined()) { |
| 201 | // User picked "Don't ask again" on a previous launch. |
| 202 | return false; |
| 203 | } |
| 204 | if (DesktopFileAlreadyInstalled()) { |
| 205 | // Already installed — most likely from a previous "Yes" click. |
| 206 | return false; |
| 207 | } |
| 208 | return true; |
| 209 | #else |
| 210 | return false; |
| 211 | #endif |
| 212 | } |
| 213 | |
| 214 | void PromptAndInstall(wxWindow* parent) |
| 215 | { |
no test coverage detected