From 2cffa5560c470892d53475985f6d60f89ccfe42e Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Tue, 9 Jul 2019 23:33:09 +0200 Subject: Use project domain for appdata and icon (#343) As per the [AppStream spec](https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html) the ID should be the reverse domain name. Midori already uses it for resource namespaces and the `.desktop` file. The `appdata.xml` and icon name should follow suit. --- CMakeLists.txt | 3 +- config.h.in | 1 + core/app.vala | 4 +- data/midori.appdata.xml.in | 56 ----- data/org.midori_browser.Midori.appdata.xml.in | 56 +++++ data/org.midori_browser.Midori.desktop.in | 2 +- gresource.xml | 6 +- icons/16x16/apps/midori.png | Bin 937 -> 0 bytes icons/16x16/apps/org.midori_browser.Midori.png | Bin 0 -> 937 bytes icons/22x22/apps/midori.png | Bin 1400 -> 0 bytes icons/22x22/apps/org.midori_browser.Midori.png | Bin 0 -> 1400 bytes icons/CMakeLists.txt | 2 +- icons/index.theme | 2 +- icons/scalable/apps/midori.svg | 237 ---------------------- icons/scalable/apps/org.midori_browser.Midori.svg | 237 ++++++++++++++++++++++ snap/snapcraft.yaml | 4 +- vapi/config.vapi | 1 + 17 files changed, 307 insertions(+), 304 deletions(-) delete mode 100644 data/midori.appdata.xml.in create mode 100644 data/org.midori_browser.Midori.appdata.xml.in delete mode 100644 icons/16x16/apps/midori.png create mode 100644 icons/16x16/apps/org.midori_browser.Midori.png delete mode 100644 icons/22x22/apps/midori.png create mode 100644 icons/22x22/apps/org.midori_browser.Midori.png delete mode 100644 icons/scalable/apps/midori.svg create mode 100644 icons/scalable/apps/org.midori_browser.Midori.svg diff --git a/CMakeLists.txt b/CMakeLists.txt index 3ec9eb35..fb051c33 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,6 +6,7 @@ cmake_minimum_required(VERSION 3.2) set (GETTEXT_PACKAGE "midori") add_definitions("-DGETTEXT_PACKAGE=\"${GETTEXT_PACKAGE}\"") project(${GETTEXT_PACKAGE} C) +set(PROJECT_DOMAIN org.midori_browser.Midori) set(PROJECT_BUGS https://github.com/midori-browser/core/issues) set(PROJECT_WEBSITE https://www.midori-browser.org) set(CORE_VERSION 8.0) @@ -81,7 +82,7 @@ add_custom_target (uninstall install(FILES COPYING README.md DESTINATION ${CMAKE_INSTALL_DOCDIR}) -set(DESKTOP_ICON "${CMAKE_PROJECT_NAME}" CACHE STRING "The Icon value to be used in the .desktop file") +set(DESKTOP_ICON "${PROJECT_DOMAIN}" CACHE STRING "The Icon value to be used in the .desktop file") add_subdirectory (core) add_subdirectory (web) diff --git a/config.h.in b/config.h.in index 77b341ca..b72489bc 100644 --- a/config.h.in +++ b/config.h.in @@ -12,6 +12,7 @@ #cmakedefine CORE_VERSION "@CORE_VERSION@" #cmakedefine CORE_USER_AGENT_VERSION "@CORE_USER_AGENT_VERSION@" #cmakedefine PROJECT_NAME "@CMAKE_PROJECT_NAME@" +#cmakedefine PROJECT_DOMAIN "@PROJECT_DOMAIN@" #cmakedefine PROJECT_BUGS "@PROJECT_BUGS@" #cmakedefine PROJECT_WEBSITE "@PROJECT_WEBSITE@" diff --git a/core/app.vala b/core/app.vala index aa6b0bc0..76f79518 100644 --- a/core/app.vala +++ b/core/app.vala @@ -40,7 +40,7 @@ namespace Midori { }; public App () { - Object (application_id: "org.midori_browser.Midori", + Object (application_id: Config.PROJECT_DOMAIN, flags: ApplicationFlags.HANDLES_OPEN | ApplicationFlags.HANDLES_COMMAND_LINE); @@ -72,7 +72,7 @@ namespace Midori { base.startup (); - Gtk.Window.set_default_icon_name (Config.PROJECT_NAME); + Gtk.Window.set_default_icon_name (Config.PROJECT_DOMAIN); var context = WebKit.WebContext.get_default (); context.register_uri_scheme ("internal", (request) => { diff --git a/data/midori.appdata.xml.in b/data/midori.appdata.xml.in deleted file mode 100644 index d318894d..00000000 --- a/data/midori.appdata.xml.in +++ /dev/null @@ -1,56 +0,0 @@ - - - - org.midori_browser.Midori - org.midori_browser.Midori.desktop - CC0-1.0 - LGPL-2.1-or-later - <_name>Midori Web Browser - - Network - WebBrowser - - - AppMenu - HiDpiIcon - ModernToolkit - Notifications - UserDocs - - A fast and lightweight web browser - -

- Midori is a lightweight yet powerful web browser which runs just as well on little embedded computers named for delicious pastries as it does on beefy machines with a core temperature exceeding that of planet earth. And it looks good doing that, too. Oh, and of course it's free software. -

-

Privacy out of the box

-
    -
  • Adblock filter list support.
  • -
  • Private browsing.
  • -
  • Manage cookies and scripts.
  • -
-

-
    -
  • Open a 1000 tabs instantly.
  • -
  • Easy web apps creation.
  • -
  • Customizable side panels.
  • -
  • User scripts and styles a la Greasemonkey.
  • -
  • Web developer tools powered by WebKit.
  • -
-
- https://www.midori-browser.org/ - - - https://www.midori-browser.org/images/screenshots/rdio.png - - - christian@twotoasts.de - Christian Dywan - https://github.com/midori-browser/core/issues - https://www.midori-browser.org/faq - https://www.midori-browser.org/donate - midori - - - - -
diff --git a/data/org.midori_browser.Midori.appdata.xml.in b/data/org.midori_browser.Midori.appdata.xml.in new file mode 100644 index 00000000..d318894d --- /dev/null +++ b/data/org.midori_browser.Midori.appdata.xml.in @@ -0,0 +1,56 @@ + + + + org.midori_browser.Midori + org.midori_browser.Midori.desktop + CC0-1.0 + LGPL-2.1-or-later + <_name>Midori Web Browser + + Network + WebBrowser + + + AppMenu + HiDpiIcon + ModernToolkit + Notifications + UserDocs + + A fast and lightweight web browser + +

+ Midori is a lightweight yet powerful web browser which runs just as well on little embedded computers named for delicious pastries as it does on beefy machines with a core temperature exceeding that of planet earth. And it looks good doing that, too. Oh, and of course it's free software. +

+

Privacy out of the box

+
    +
  • Adblock filter list support.
  • +
  • Private browsing.
  • +
  • Manage cookies and scripts.
  • +
+

+
    +
  • Open a 1000 tabs instantly.
  • +
  • Easy web apps creation.
  • +
  • Customizable side panels.
  • +
  • User scripts and styles a la Greasemonkey.
  • +
  • Web developer tools powered by WebKit.
  • +
+
+ https://www.midori-browser.org/ + + + https://www.midori-browser.org/images/screenshots/rdio.png + + + christian@twotoasts.de + Christian Dywan + https://github.com/midori-browser/core/issues + https://www.midori-browser.org/faq + https://www.midori-browser.org/donate + midori + + + + +
diff --git a/data/org.midori_browser.Midori.desktop.in b/data/org.midori_browser.Midori.desktop.in index ffd1df70..3e79caa9 100644 --- a/data/org.midori_browser.Midori.desktop.in +++ b/data/org.midori_browser.Midori.desktop.in @@ -10,7 +10,7 @@ _X-AppInstall-Keywords=Internet;WWW;Explorer Categories=GTK;Network;WebBrowser; MimeType=text/html;application/xhtml+xml;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/geo;image/svg+xml; Exec=midori %U -Icon=midori +Icon=org.midori_browser.Midori Terminal=false StartupNotify=true X-GNOME-UsesNotifications=true diff --git a/gresource.xml b/gresource.xml index 596f524c..239fa140 100644 --- a/gresource.xml +++ b/gresource.xml @@ -1,9 +1,9 @@ - icons/16x16/apps/midori.png - icons/22x22/apps/midori.png - icons/scalable/apps/midori.svg + icons/16x16/apps/org.midori_browser.Midori.png + icons/22x22/apps/org.midori_browser.Midori.png + icons/scalable/apps/org.midori_browser.Midori.svg icons/index.theme diff --git a/icons/16x16/apps/midori.png b/icons/16x16/apps/midori.png deleted file mode 100644 index 578f6cb5..00000000 Binary files a/icons/16x16/apps/midori.png and /dev/null differ diff --git a/icons/16x16/apps/org.midori_browser.Midori.png b/icons/16x16/apps/org.midori_browser.Midori.png new file mode 100644 index 00000000..578f6cb5 Binary files /dev/null and b/icons/16x16/apps/org.midori_browser.Midori.png differ diff --git a/icons/22x22/apps/midori.png b/icons/22x22/apps/midori.png deleted file mode 100644 index 85523e8f..00000000 Binary files a/icons/22x22/apps/midori.png and /dev/null differ diff --git a/icons/22x22/apps/org.midori_browser.Midori.png b/icons/22x22/apps/org.midori_browser.Midori.png new file mode 100644 index 00000000..85523e8f Binary files /dev/null and b/icons/22x22/apps/org.midori_browser.Midori.png differ diff --git a/icons/CMakeLists.txt b/icons/CMakeLists.txt index 6fa17719..0786f2f1 100644 --- a/icons/CMakeLists.txt +++ b/icons/CMakeLists.txt @@ -6,6 +6,6 @@ macro(install_icon name cat size) endmacro() foreach(SIZE 16x16 22x22 scalable) - install_icon(midori apps ${SIZE}) + install_icon(${PROJECT_DOMAIN} apps ${SIZE}) endforeach() diff --git a/icons/index.theme b/icons/index.theme index 7e8354f2..56675c96 100644 --- a/icons/index.theme +++ b/icons/index.theme @@ -2,7 +2,7 @@ Name=Midori Comment=Fallback Icons shipped with Midori Inherits=hicolor -Example=midori +Example=org.midori_browser.Midori Directories=16/apps,22/apps,scalable/apps [16/apps] diff --git a/icons/scalable/apps/midori.svg b/icons/scalable/apps/midori.svg deleted file mode 100644 index db86d245..00000000 --- a/icons/scalable/apps/midori.svg +++ /dev/null @@ -1,237 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/icons/scalable/apps/org.midori_browser.Midori.svg b/icons/scalable/apps/org.midori_browser.Midori.svg new file mode 100644 index 00000000..db86d245 --- /dev/null +++ b/icons/scalable/apps/org.midori_browser.Midori.svg @@ -0,0 +1,237 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 5761ce88..3b310101 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -24,7 +24,7 @@ description: | grade: stable confinement: strict -icon: icons/scalable/apps/midori.svg +icon: icons/scalable/apps/org.midori_browser.Midori.svg apps: midori: @@ -63,7 +63,7 @@ parts: plugin: cmake configflags: - -DCMAKE_INSTALL_DATADIR=/usr/share - - -DDESKTOP_ICON=/usr/share/icons/hicolor/scalable/apps/midori.svg + - -DDESKTOP_ICON=/usr/share/icons/hicolor/scalable/apps/org.midori_browser.Midori.svg build-packages: - git - valac diff --git a/vapi/config.vapi b/vapi/config.vapi index be2fb47f..4a90097d 100644 --- a/vapi/config.vapi +++ b/vapi/config.vapi @@ -3,6 +3,7 @@ namespace Config { public const string CORE_VERSION; public const string CORE_USER_AGENT_VERSION; public const string PROJECT_NAME; + public const string PROJECT_DOMAIN; public const string PROJECT_BUGS; public const string PROJECT_WEBSITE; public const string PLUGINDIR; -- cgit v1.2.1