summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSøren Sandmann Pedersen <sandmann@redhat.com>2008-09-14 09:28:16 -0400
committerSøren Sandmann Pedersen <sandmann@redhat.com>2008-09-14 09:28:16 -0400
commitd594064dc2b64afc6a289703e4285129a664cd8b (patch)
treec33d81efd5023524e5e08d860fbf36288903b859
parent33c07eaea19ffced5edb6de35cb2497b76d3370d (diff)
Add icons from Mike Langlie
-rw-r--r--Makefile.am18
-rw-r--r--icons/16x16/siv.pngbin0 -> 929 bytes
-rw-r--r--icons/22x22/siv.pngbin0 -> 1212 bytes
-rw-r--r--icons/24x24/siv.pngbin0 -> 1247 bytes
-rw-r--r--icons/32x32/siv.pngbin0 -> 2472 bytes
-rw-r--r--icons/48x48/siv.pngbin0 -> 4597 bytes
-rw-r--r--icons/64x64/siv.pngbin0 -> 7081 bytes
-rw-r--r--icons/96x96/siv.pngbin0 -> 13571 bytes
-rw-r--r--window.c24
9 files changed, 41 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index 4e710f1..9b29dc7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -20,7 +20,7 @@
bin_PROGRAMS = siv
-siv_CFLAGS = $(DEP_CFLAGS) -DDATADIR=\"$(pkgdatadir)\"
+AM_CFLAGS = $(DEP_CFLAGS) -DDATADIR=\"$(pkgdatadir)\"
siv_LDADD = $(DEP_LIBS)
siv_SOURCES = \
@@ -32,3 +32,19 @@ dist_pkgdata_DATA = siv.glade
desktopdir = $(datadir)/applications
desktop_DATA = siv.desktop
+
+pixmaps16dir = $(datadir)/icons/hicolor/16x16/apps/
+pixmaps22dir = $(datadir)/icons/hicolor/22x22/apps/
+pixmaps24dir = $(datadir)/icons/hicolor/24x16/apps/
+pixmaps32dir = $(datadir)/icons/hicolor/32x32/apps/
+pixmaps48dir = $(datadir)/icons/hicolor/48x48/apps/
+pixmaps64dir = $(datadir)/icons/hicolor/64x64/apps/
+pixmaps96dir = $(datadir)/icons/hicolor/96x96/apps/
+
+dist_pixmaps16_DATA = icons/16x16/siv.png
+dist_pixmaps22_DATA = icons/22x22/siv.png
+dist_pixmaps24_DATA = icons/24x24/siv.png
+dist_pixmaps32_DATA = icons/32x32/siv.png
+dist_pixmaps48_DATA = icons/48x48/siv.png
+dist_pixmaps64_DATA = icons/64x64/siv.png
+dist_pixmaps96_DATA = icons/96x96/siv.png
diff --git a/icons/16x16/siv.png b/icons/16x16/siv.png
new file mode 100644
index 0000000..a78d1e1
--- /dev/null
+++ b/icons/16x16/siv.png
Binary files differ
diff --git a/icons/22x22/siv.png b/icons/22x22/siv.png
new file mode 100644
index 0000000..f71386d
--- /dev/null
+++ b/icons/22x22/siv.png
Binary files differ
diff --git a/icons/24x24/siv.png b/icons/24x24/siv.png
new file mode 100644
index 0000000..45950db
--- /dev/null
+++ b/icons/24x24/siv.png
Binary files differ
diff --git a/icons/32x32/siv.png b/icons/32x32/siv.png
new file mode 100644
index 0000000..099f76d
--- /dev/null
+++ b/icons/32x32/siv.png
Binary files differ
diff --git a/icons/48x48/siv.png b/icons/48x48/siv.png
new file mode 100644
index 0000000..f16bfcd
--- /dev/null
+++ b/icons/48x48/siv.png
Binary files differ
diff --git a/icons/64x64/siv.png b/icons/64x64/siv.png
new file mode 100644
index 0000000..15332da
--- /dev/null
+++ b/icons/64x64/siv.png
Binary files differ
diff --git a/icons/96x96/siv.png b/icons/96x96/siv.png
new file mode 100644
index 0000000..2e0cece
--- /dev/null
+++ b/icons/96x96/siv.png
Binary files differ
diff --git a/window.c b/window.c
index 2524966..3cea43d 100644
--- a/window.c
+++ b/window.c
@@ -356,6 +356,7 @@ rebuild (SivWindow *window)
{
int w, h;
GtkAdjustment *vadj, *hadj;
+ GdkPixbuf *scaled;
compute_size (window, &w, &h);
@@ -382,11 +383,33 @@ rebuild (SivWindow *window)
gtk_widget_set_size_request (get_widget (window, "drawing_area"), w, h);
+ /* The documentation for gtk_window_set_icon() says you shouldn't scale
+ * the icon before passing it, but gdk_window_set_icon_list() ends up
+ * issuing g_warnings if the icon is too big.
+ */
+ if (gdk_pixbuf_get_width (window->original) >= 32 ||
+ gdk_pixbuf_get_height (window->original) >= 32)
+ {
+ scaled = gdk_pixbuf_scale_simple (window->original, 32, 32, GDK_INTERP_BILINEAR);
+ }
+ else
+ {
+ scaled = g_object_ref (window->original);
+ }
+
+ gtk_window_set_icon (get_widget (window, "main_window"), scaled);
+
+ g_object_unref (scaled);
+
gtk_widget_show (get_widget (window, "scrolled_window"));
window->width = w;
window->height = h;
}
+ else
+ {
+ gtk_window_set_icon_name (get_widget (window, "main_window"), "siv");
+ }
set_title (window);
set_sensitivity (window);
@@ -830,6 +853,7 @@ on_about (GtkWidget *widget, gpointer data)
gtk_show_about_dialog (get_widget (window, "main_window"),
"program-name", APPLICATION_NAME,
"copyright", "Copyright 2008, S"OSLASH"ren Sandmann",
+ "logo-icon-name", "siv",
"version", PACKAGE_VERSION,
NULL);
}