aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2018-06-14 12:45:51 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2018-06-14 12:45:51 +0200
commitc5665c40f923a477b7ec0bcd7f57c92e98634ef6 (patch)
tree44d42621f63f1a476c2971431a9bf2ce99aa2544
parentCompleter: double clicking on an item activates it (diff)
downloadsmolbote-c5665c40f923a477b7ec0bcd7f57c92e98634ef6.tar.xz
Add poi.desktop
-rw-r--r--BUGS.md7
-rw-r--r--linux/makepkg/PKGBUILD4
-rw-r--r--linux/poi.desktop17
-rw-r--r--src/mainwindow/mainwindow.cpp10
4 files changed, 33 insertions, 5 deletions
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<Configuration> &config, QWidget *parent)
m_config = config;
// create UI
- resize(config->value<int>("mainwindow.width").value(), config->value<int>("mainwindow.height").value());
setWindowTitle(QString::fromStdString(config->value<std::string>("mainwindow.title").value()));
- if(config->value<bool>("mainwindow.maximized").value())
- showMaximized();
- else
- show();
+ resize(config->value<int>("mainwindow.width").value(), config->value<int>("mainwindow.height").value());
+ if(config->value<bool>("mainwindow.maximized").value()) {
+ setWindowState(Qt::WindowMaximized);
+ }
+ show();
createMenuBar();