diff options
-rw-r--r-- | Makefile.am | 18 | ||||
-rw-r--r-- | icons/16x16/siv.png | bin | 0 -> 929 bytes | |||
-rw-r--r-- | icons/22x22/siv.png | bin | 0 -> 1212 bytes | |||
-rw-r--r-- | icons/24x24/siv.png | bin | 0 -> 1247 bytes | |||
-rw-r--r-- | icons/32x32/siv.png | bin | 0 -> 2472 bytes | |||
-rw-r--r-- | icons/48x48/siv.png | bin | 0 -> 4597 bytes | |||
-rw-r--r-- | icons/64x64/siv.png | bin | 0 -> 7081 bytes | |||
-rw-r--r-- | icons/96x96/siv.png | bin | 0 -> 13571 bytes | |||
-rw-r--r-- | window.c | 24 |
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 Binary files differnew file mode 100644 index 0000000..a78d1e1 --- /dev/null +++ b/icons/16x16/siv.png diff --git a/icons/22x22/siv.png b/icons/22x22/siv.png Binary files differnew file mode 100644 index 0000000..f71386d --- /dev/null +++ b/icons/22x22/siv.png diff --git a/icons/24x24/siv.png b/icons/24x24/siv.png Binary files differnew file mode 100644 index 0000000..45950db --- /dev/null +++ b/icons/24x24/siv.png diff --git a/icons/32x32/siv.png b/icons/32x32/siv.png Binary files differnew file mode 100644 index 0000000..099f76d --- /dev/null +++ b/icons/32x32/siv.png diff --git a/icons/48x48/siv.png b/icons/48x48/siv.png Binary files differnew file mode 100644 index 0000000..f16bfcd --- /dev/null +++ b/icons/48x48/siv.png diff --git a/icons/64x64/siv.png b/icons/64x64/siv.png Binary files differnew file mode 100644 index 0000000..15332da --- /dev/null +++ b/icons/64x64/siv.png diff --git a/icons/96x96/siv.png b/icons/96x96/siv.png Binary files differnew file mode 100644 index 0000000..2e0cece --- /dev/null +++ b/icons/96x96/siv.png @@ -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); } |