summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Dywan <christian@twotoasts.de>2019-07-09 23:33:09 +0200
committerGitHub <noreply@github.com>2019-07-09 23:33:09 +0200
commit2cffa5560c470892d53475985f6d60f89ccfe42e (patch)
tree6a662bd32d2ff65a518a3f5481bdb07ea21674d7
parentb411a64be82d70d26531e8023f791519b960c60d (diff)
downloadmidori-git-2cffa5560c470892d53475985f6d60f89ccfe42e.tar.gz
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.
-rw-r--r--CMakeLists.txt3
-rw-r--r--config.h.in1
-rw-r--r--core/app.vala4
-rw-r--r--data/org.midori_browser.Midori.appdata.xml.in (renamed from data/midori.appdata.xml.in)0
-rw-r--r--data/org.midori_browser.Midori.desktop.in2
-rw-r--r--gresource.xml6
-rw-r--r--icons/16x16/apps/org.midori_browser.Midori.png (renamed from icons/16x16/apps/midori.png)bin937 -> 937 bytes
-rw-r--r--icons/22x22/apps/org.midori_browser.Midori.png (renamed from icons/22x22/apps/midori.png)bin1400 -> 1400 bytes
-rw-r--r--icons/CMakeLists.txt2
-rw-r--r--icons/index.theme2
-rw-r--r--icons/scalable/apps/org.midori_browser.Midori.svg (renamed from icons/scalable/apps/midori.svg)0
-rw-r--r--snap/snapcraft.yaml4
-rw-r--r--vapi/config.vapi1
13 files changed, 14 insertions, 11 deletions
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/org.midori_browser.Midori.appdata.xml.in
index d318894d..d318894d 100644
--- a/data/midori.appdata.xml.in
+++ b/data/org.midori_browser.Midori.appdata.xml.in
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 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/org/midori_browser/Midori">
- <file>icons/16x16/apps/midori.png</file>
- <file>icons/22x22/apps/midori.png</file>
- <file>icons/scalable/apps/midori.svg</file>
+ <file>icons/16x16/apps/org.midori_browser.Midori.png</file>
+ <file>icons/22x22/apps/org.midori_browser.Midori.png</file>
+ <file>icons/scalable/apps/org.midori_browser.Midori.svg</file>
<file>icons/index.theme</file>
</gresource>
<gresource prefix="/org/midori_browser/Midori/gtk">
diff --git a/icons/16x16/apps/midori.png b/icons/16x16/apps/org.midori_browser.Midori.png
index 578f6cb5..578f6cb5 100644
--- a/icons/16x16/apps/midori.png
+++ b/icons/16x16/apps/org.midori_browser.Midori.png
Binary files differ
diff --git a/icons/22x22/apps/midori.png b/icons/22x22/apps/org.midori_browser.Midori.png
index 85523e8f..85523e8f 100644
--- a/icons/22x22/apps/midori.png
+++ b/icons/22x22/apps/org.midori_browser.Midori.png
Binary files 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/org.midori_browser.Midori.svg
index db86d245..db86d245 100644
--- a/icons/scalable/apps/midori.svg
+++ b/icons/scalable/apps/org.midori_browser.Midori.svg
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;