From c5665c40f923a477b7ec0bcd7f57c92e98634ef6 Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Thu, 14 Jun 2018 12:45:51 +0200 Subject: Add poi.desktop --- BUGS.md | 7 +++++++ linux/makepkg/PKGBUILD | 4 ++++ linux/poi.desktop | 17 +++++++++++++++++ src/mainwindow/mainwindow.cpp | 10 +++++----- 4 files changed, 33 insertions(+), 5 deletions(-) create mode 100644 linux/poi.desktop diff --git a/BUGS.md b/BUGS.md index b0fedc9..85ad893 100644 --- a/BUGS.md +++ b/BUGS.md @@ -40,3 +40,10 @@ https://bugreports.qt.io/browse/QTBUG-65223 https://bugreports.qt.io/browse/QTBUG-68224 Only affects Qt 5.11.0. Set __QTBUG_68224_WORKAROUND__. + +## Wayland bugs + +### mainwindow.maximized doesn't work +setWindowState(Qt::WindowMaximized) has no effect + +### window icon is not set diff --git a/linux/makepkg/PKGBUILD b/linux/makepkg/PKGBUILD index d631cf7..9783fc8 100644 --- a/linux/makepkg/PKGBUILD +++ b/linux/makepkg/PKGBUILD @@ -86,6 +86,10 @@ package() { # Install ninja install + # icon and .desktop + install -Dm644 "${srcdir}/smolbote-hg/data/poi.svg" "${pkgdir}/usr/share/icons/hicolor/scalable/apps/poi.svg" + install -Dm644 "${srcdir}/smolbote-hg/linux/poi.desktop" "${pkgdir}/usr/share/applications/poi.desktop" + # man page _man_dir="$pkgdir/usr/local/man/man7" test -d $_man_dir || mkdir -p $_man_dir diff --git a/linux/poi.desktop b/linux/poi.desktop new file mode 100644 index 0000000..92fd7f3 --- /dev/null +++ b/linux/poi.desktop @@ -0,0 +1,17 @@ +[Desktop Entry] +Version=1.0 +Name=poi +GenericName=Web Browser +Comment=yet another no-frills browser +Exec=/usr/local/bin/poi %u +Icon=poi +Terminal=false +Type=Application +MimeType=text/html;text/xml;application/xhtml+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https; +Categories=Network;WebBrowser; +Keywords=web;browser;internet; +Actions=configure; + +[Desktop Action configure] +Name=Configure smolbote +Exec=/usr/local/bin/poi-config %u diff --git a/src/mainwindow/mainwindow.cpp b/src/mainwindow/mainwindow.cpp index 0234f13..6558c65 100644 --- a/src/mainwindow/mainwindow.cpp +++ b/src/mainwindow/mainwindow.cpp @@ -38,12 +38,12 @@ MainWindow::MainWindow(std::shared_ptr &config, QWidget *parent) m_config = config; // create UI - resize(config->value("mainwindow.width").value(), config->value("mainwindow.height").value()); setWindowTitle(QString::fromStdString(config->value("mainwindow.title").value())); - if(config->value("mainwindow.maximized").value()) - showMaximized(); - else - show(); + resize(config->value("mainwindow.width").value(), config->value("mainwindow.height").value()); + if(config->value("mainwindow.maximized").value()) { + setWindowState(Qt::WindowMaximized); + } + show(); createMenuBar(); -- cgit v1.2.1