mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-01 06:30:26 +00:00
Merge branch 'subsurface-icon' of github.com:henrik242/subsurface
This commit is contained in:
commit
ec1998216f
10 changed files with 5262 additions and 18 deletions
14
Makefile
14
Makefile
|
@ -20,7 +20,7 @@ XSLTDIR = $(DATADIR)/subsurface/xslt
|
|||
gtk_update_icon_cache = gtk-update-icon-cache -f -t $(ICONPATH)
|
||||
|
||||
NAME = subsurface
|
||||
ICONFILE = $(NAME).svg
|
||||
ICONFILE = $(NAME)-icon.svg
|
||||
DESKTOPFILE = $(NAME).desktop
|
||||
MANFILES = $(NAME).1
|
||||
XSLTFILES = xslt/*.xslt
|
||||
|
@ -249,15 +249,17 @@ share/locale/%.UTF-8/LC_MESSAGES/subsurface.mo: po/%.po po/%.aliases
|
|||
done; \
|
||||
fi
|
||||
|
||||
# this should work but it doesn't preserve the transparancy - so I manually converted with gimp
|
||||
# satellite.png: satellite.svg
|
||||
# convert -resize 11x16 -depth 8 satellite.svg satellite.png
|
||||
satellite.png: satellite.svg
|
||||
convert -transparent white -resize 11x16 -depth 8 $< $@
|
||||
|
||||
# This should work, but it doesn't get the colors quite right - so I manually converted with Gimp
|
||||
# convert -colorspace RGB -transparent white -resize 256x256 subsurface-icon.svg subsurface-icon.png
|
||||
#
|
||||
# the following creates the pixbuf data in .h files with the basename followed by '_pixmap'
|
||||
# The following creates the pixbuf data in .h files with the basename followed by '_pixmap'
|
||||
# as name of the data structure
|
||||
%.h: %.png
|
||||
@echo ' gdk-pixbuf-csource' $<
|
||||
@gdk-pixbuf-csource --struct --name $*_pixbuf $< > $@
|
||||
@gdk-pixbuf-csource --struct --name `echo $* | sed 's/-/_/g'`_pixbuf $< > $@
|
||||
|
||||
doc:
|
||||
$(MAKE) -C Documentation doc
|
||||
|
|
12
gtk-gui.c
12
gtk-gui.c
|
@ -25,6 +25,10 @@
|
|||
|
||||
#include "libdivecomputer.h"
|
||||
|
||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||
#include <gdk-pixbuf/gdk-pixdata.h>
|
||||
#include "subsurface-icon.h"
|
||||
|
||||
GtkWidget *main_window;
|
||||
GtkWidget *main_vbox;
|
||||
GtkWidget *error_info_bar;
|
||||
|
@ -1037,12 +1041,8 @@ static void about_dialog(GtkWidget *w, gpointer data)
|
|||
GtkWidget * dialog;
|
||||
|
||||
if (need_icon) {
|
||||
GtkWidget *image = gtk_image_new_from_file(subsurface_icon_name());
|
||||
|
||||
if (gtk_image_get_storage_type(GTK_IMAGE(image)) == GTK_IMAGE_PIXBUF) {
|
||||
logo = gtk_image_get_pixbuf(GTK_IMAGE(image));
|
||||
logo_property = "logo";
|
||||
}
|
||||
logo_property = "logo";
|
||||
logo = gdk_pixbuf_from_pixdata(&subsurface_icon_pixbuf, TRUE, NULL);
|
||||
}
|
||||
dialog = gtk_about_dialog_new();
|
||||
#if !GTK_CHECK_VERSION(2,24,0) /* F*cking gtk */
|
||||
|
|
2
linux.c
2
linux.c
|
@ -128,7 +128,7 @@ int subsurface_fill_device_list(GtkListStore *store)
|
|||
|
||||
const char *subsurface_icon_name()
|
||||
{
|
||||
return "subsurface.svg";
|
||||
return "subsurface-icon.svg";
|
||||
}
|
||||
|
||||
const char *system_default_filename(void)
|
||||
|
|
|
@ -37,7 +37,7 @@ rm %{buildroot}/%{_datadir}/icons/hicolor/icon-theme.cache
|
|||
%defattr(-,root,root)
|
||||
%{_bindir}/subsurface
|
||||
%{_datadir}/applications/subsurface.desktop
|
||||
%{_datadir}/icons/hicolor/scalable/apps/subsurface.svg
|
||||
%{_datadir}/icons/hicolor/scalable/apps/subsurface-icon.svg
|
||||
%{_datadir}/man/man1/subsurface.1.gz
|
||||
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ make CC=%{_mingw32_target}-gcc PKGCONFIG=%{_mingw32_target}-pkg-config XML2CONFI
|
|||
mkdir -p $RPM_BUILD_ROOT/%{_mingw32_bindir}
|
||||
mkdir -p $RPM_BUILD_ROOT/%{_mingw32_datadir}
|
||||
install -m 755 subsurface.exe $RPM_BUILD_ROOT/%{_mingw32_bindir}/subsurface.exe
|
||||
install -m 644 subsurface.svg $RPM_BUILD_ROOT/%{_mingw32_datadir}/subsurface.svg
|
||||
install -m 644 subsurface-icon.svg $RPM_BUILD_ROOT/%{_mingw32_datadir}/subsurface-icon.svg
|
||||
# this seems like a really ugly hack
|
||||
install -m 755 %{_mingw32_bindir}/libdivecomputer-0.dll $RPM_BUILD_ROOT/%{_mingw32_bindir}/libdivecomputer-0.dll
|
||||
install -m 755 %{_mingw32_bindir}/libcairo-2.dll $RPM_BUILD_ROOT/%{_mingw32_bindir}/libcairo-2.dll
|
||||
|
@ -106,7 +106,7 @@ install -m 755 %{_mingw32_bindir}/libatk-1.0-0.dll $RPM_BUILD_ROOT/%{_mingw32_bi
|
|||
%{_mingw32_bindir}/libpangowin32-1.0-0.dll
|
||||
%{_mingw32_bindir}/libatk-1.0-0.dll
|
||||
|
||||
%{_mingw32_datadir}/subsurface.svg
|
||||
%{_mingw32_datadir}/subsurface-icon.svg
|
||||
|
||||
|
||||
%changelog
|
||||
|
|
|
@ -99,7 +99,7 @@ Section
|
|||
|
||||
# Files to include in installer
|
||||
File ..\..\subsurface.exe
|
||||
File ..\..\subsurface.svg
|
||||
File ..\..\subsurface-icon.svg
|
||||
File ..\..\xslt\jdivelog2subsurface.xslt
|
||||
File ..\..\xslt\SuuntoSDM.xslt
|
||||
File dll\iconv.dll
|
||||
|
@ -167,7 +167,7 @@ Section "Uninstall"
|
|||
Delete "$INSTDIR\freetype-config"
|
||||
Delete "$INSTDIR\subsurface.exe"
|
||||
Delete "$INSTDIR\subsurface.ico"
|
||||
Delete "$INSTDIR\subsurface.svg"
|
||||
Delete "$INSTDIR\subsurface-icon.svg"
|
||||
Delete "$INSTDIR\Uninstall.exe"
|
||||
RMDir /r "$INSTDIR\share"
|
||||
RMDir "$INSTDIR"
|
||||
|
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 39 KiB |
5242
subsurface-icon.h
Normal file
5242
subsurface-icon.h
Normal file
File diff suppressed because it is too large
Load diff
BIN
subsurface-icon.png
Normal file
BIN
subsurface-icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Loading…
Reference in a new issue