| 664 | } |
| 665 | |
| 666 | void MainWindow::on_actionUpdate_triggered() |
| 667 | { |
| 668 | if(!qEnvironmentVariable("SNAP").isEmpty()) { |
| 669 | QDesktopServices::openUrl(QUrl("https://snapcraft.io/rabbitremotecontrol")); |
| 670 | } else if(!qEnvironmentVariable("FLATPAK_ID").isEmpty()) { |
| 671 | QDesktopServices::openUrl(QUrl("https://flathub.org/apps/io.github.KangLin.RabbitRemoteControl")); |
| 672 | } else { |
| 673 | #ifdef HAVE_UPDATE |
| 674 | CFrmUpdater* m_pfrmUpdater = new CFrmUpdater(); |
| 675 | QIcon icon = QIcon::fromTheme("app"); |
| 676 | if(!icon.isNull()) { |
| 677 | auto sizeList = icon.availableSizes(); |
| 678 | if(!sizeList.isEmpty()) { |
| 679 | QPixmap p = icon.pixmap(*sizeList.begin()); |
| 680 | m_pfrmUpdater->SetTitle(p.toImage()); |
| 681 | } |
| 682 | } |
| 683 | m_pfrmUpdater->SetInstallAutoStartup(); |
| 684 | RC_SHOW_WINDOW(m_pfrmUpdater); |
| 685 | #endif |
| 686 | } |
| 687 | } |
| 688 | |
| 689 | void MainWindow::on_actionFull_screen_F_triggered() |
| 690 | { |