]> git.datanom.net - lensdb.git/commitdiff
Add desktop integration
authorMichael Rasmussen <mir@datanom.net>
Sat, 26 Oct 2024 01:19:32 +0000 (03:19 +0200)
committerMichael Rasmussen <mir@datanom.net>
Sat, 26 Oct 2024 01:19:32 +0000 (03:19 +0200)
Signed-off-by: Michael Rasmussen <mir@datanom.net>
Makefile.am
configure.ac
lensdb-128x128.png [new file with mode: 0644]
lensdb-64x64.png [new file with mode: 0644]
lensdb.desktop [new file with mode: 0644]
lensdb.png [new file with mode: 0644]

index c8300b392c0b4e718fac46d485b0593520d0423a..1509a0f2994605f5974f3f73e0d64c4f764a80dc 100644 (file)
@@ -11,5 +11,54 @@ EXTRA_DIST = \
             ChangeLog \
             NEWS \
             README \
-            autogen.sh
+            autogen.sh \
+            lensdb.desktop \
+            lensdb.png \
+            lensdb-64x64.png \
+            lensdb-128x128.png
+
+pixmapdir=$(datadir)/icons/hicolor/48x48/apps
+pixmap_DATA=lensdb.png
+
+pixmap64dir=$(datadir)/icons/hicolor/64x64/apps
+pixmap64_DATA=lensdb-64x64.png
+
+pixmap128dir=$(datadir)/icons/hicolor/128x128/apps
+pixmap128_DATA=lensdb-128x128.png
+
+desktopdir = $(datadir)/applications
+dist_desktop_DATA = lensdb.desktop
+
+rename-icons:
+       @cd $(DESTDIR)$(datadir)/icons/hicolor/64x64/apps && \
+            mv lensdb-64x64.png lensdb.png
+       @cd $(DESTDIR)$(datadir)/icons/hicolor/128x128/apps && \
+            mv lensdb-128x128.png lensdb.png
+
+remove-icons:
+       rm -f $(DESTDIR)$(datadir)/icons/hicolor/64x64/apps/lensdb.png
+       rm -f $(DESTDIR)$(datadir)/icons/hicolor/128x128/apps/lensdb.png
+
+if UPDATE_GTK_ICON_CACHE
+gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
+
+install-data-hook: rename-icons update-icon-cache
+uninstall-hook: remove-icons update-icon-cache
+
+update-icon-cache:
+       @-if test -z "$(DESTDIR)"; then                                 \
+                echo "Updating Gtk icon cache.";                       \
+                $(gtk_update_icon_cache);                              \
+        else                                                           \
+                echo "*** Icon cache not updated. Remember to run:";   \
+               echo "***";                                             \
+                echo "***   $(gtk_update_icon_cache)";                 \
+               echo "***";                                             \
+        fi
+else
+
+install-data-hook: rename-icons
+uninstall-hook: remove-icons
+
+endif
 
index 0ce4f80c613be01e63ae90cf9e8bd17d2afc8024..0de5819ca8cb935dbae6cccbc5a5bb76002e11f3 100644 (file)
@@ -55,6 +55,9 @@ fi
 
 AC_SYS_LARGEFILE
 
+AC_CHECK_PROG(HAVE_GTK_ICON_CACHE, gtk-update-icon-cache, yes, no)
+AM_CONDITIONAL(UPDATE_GTK_ICON_CACHE, test x"$HAVE_GTK_ICON_CACHE" = xyes)
+
 enable_exif_scanner=yes
 AC_MSG_CHECKING([whether to build EXIF scanner])
 if test x"$HAVE_CXX" = xno; then
diff --git a/lensdb-128x128.png b/lensdb-128x128.png
new file mode 100644 (file)
index 0000000..ccb82d3
Binary files /dev/null and b/lensdb-128x128.png differ
diff --git a/lensdb-64x64.png b/lensdb-64x64.png
new file mode 100644 (file)
index 0000000..b8466ca
Binary files /dev/null and b/lensdb-64x64.png differ
diff --git a/lensdb.desktop b/lensdb.desktop
new file mode 100644 (file)
index 0000000..1b83d23
--- /dev/null
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Type=Application
+Name=Lens Database
+Comment=Small application to catalog your camera lenses
+Icon=lensdb
+Exec=lensdb
+Terminal=false
+Categories=Graphics;Photography;
+StartupNotify=true
diff --git a/lensdb.png b/lensdb.png
new file mode 100644 (file)
index 0000000..f18004e
Binary files /dev/null and b/lensdb.png differ
This page took 0.417212 seconds and 5 git commands to generate.