Move about icon to include file

Getting the about icon to display in various scenarios on MacOSX
was a pain.  Moving the icon to an include file solved the problem.

This commit also fixes the problem Dirk was having when converting
satellite.svg to a png in commit cf3c0266c2.  I couldn't
quite get ImageMagick to preserve transparency and color when
converting subsurface-icon.svg, though, so I used Gimp instead.

Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
This commit is contained in:
Henrik Brautaset Aronsen 2013-02-02 12:45:05 +01:00
parent 459130009b
commit ce87c26c00
4 changed files with 5255 additions and 11 deletions

View file

@ -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

View file

@ -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 */

5242
subsurface-icon.h Normal file

File diff suppressed because it is too large Load diff

BIN
subsurface-icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB