From d594064dc2b64afc6a289703e4285129a664cd8b Mon Sep 17 00:00:00 2001 From: Søren Sandmann Pedersen Date: Sun, 14 Sep 2008 09:28:16 -0400 Subject: Add icons from Mike Langlie --- Makefile.am | 18 +++++++++++++++++- icons/16x16/siv.png | Bin 0 -> 929 bytes icons/22x22/siv.png | Bin 0 -> 1212 bytes icons/24x24/siv.png | Bin 0 -> 1247 bytes icons/32x32/siv.png | Bin 0 -> 2472 bytes icons/48x48/siv.png | Bin 0 -> 4597 bytes icons/64x64/siv.png | Bin 0 -> 7081 bytes icons/96x96/siv.png | Bin 0 -> 13571 bytes window.c | 24 ++++++++++++++++++++++++ 9 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 icons/16x16/siv.png create mode 100644 icons/22x22/siv.png create mode 100644 icons/24x24/siv.png create mode 100644 icons/32x32/siv.png create mode 100644 icons/48x48/siv.png create mode 100644 icons/64x64/siv.png create mode 100644 icons/96x96/siv.png 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 Binary files /dev/null and b/icons/16x16/siv.png differ diff --git a/icons/22x22/siv.png b/icons/22x22/siv.png new file mode 100644 index 0000000..f71386d Binary files /dev/null and b/icons/22x22/siv.png differ diff --git a/icons/24x24/siv.png b/icons/24x24/siv.png new file mode 100644 index 0000000..45950db Binary files /dev/null and b/icons/24x24/siv.png differ diff --git a/icons/32x32/siv.png b/icons/32x32/siv.png new file mode 100644 index 0000000..099f76d Binary files /dev/null and b/icons/32x32/siv.png differ diff --git a/icons/48x48/siv.png b/icons/48x48/siv.png new file mode 100644 index 0000000..f16bfcd Binary files /dev/null and b/icons/48x48/siv.png differ diff --git a/icons/64x64/siv.png b/icons/64x64/siv.png new file mode 100644 index 0000000..15332da Binary files /dev/null and b/icons/64x64/siv.png differ diff --git a/icons/96x96/siv.png b/icons/96x96/siv.png new file mode 100644 index 0000000..2e0cece Binary files /dev/null and b/icons/96x96/siv.png 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); } -- cgit v1.2.3