summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9f86e46)
raw | patch | inline | side by side (parent: 9f86e46)
author | joncruz <joncruz@users.sourceforge.net> | |
Sat, 8 Apr 2006 09:51:35 +0000 (09:51 +0000) | ||
committer | joncruz <joncruz@users.sourceforge.net> | |
Sat, 8 Apr 2006 09:51:35 +0000 (09:51 +0000) |
src/widgets/icon.cpp | patch | blob | history |
diff --git a/src/widgets/icon.cpp b/src/widgets/icon.cpp
index 61c6429895e49a938b328569fe993534a8a06617..5ad93a1b77ba4ce8a5af5fe61754a2897ea32f1f 100644 (file)
--- a/src/widgets/icon.cpp
+++ b/src/widgets/icon.cpp
GTK_ICON_SIZE_MENU
};
for (unsigned i = 0; i < G_N_ELEMENTS(gtkSizes) && init; ++i) {
- unsigned const val_ix(gtkSizes[i]);
+ guint const val_ix = (gtkSizes[i] <= GTK_ICON_SIZE_DIALOG) ? (guint)gtkSizes[i] : (guint)Inkscape::ICON_SIZE_DECORATION;
+
g_assert( val_ix < G_N_ELEMENTS(vals) );
gint width = 0;
GtkWidget *icon = (GtkWidget *)g_object_new(SP_TYPE_ICON, NULL);
for (unsigned i = 0; i < G_N_ELEMENTS(gtkSizes); ++i) {
- unsigned const val_ix(gtkSizes[i]);
+ guint const val_ix = (gtkSizes[i] <= GTK_ICON_SIZE_DIALOG) ? (guint)gtkSizes[i] : (guint)Inkscape::ICON_SIZE_DECORATION;
+
g_assert( val_ix < G_N_ELEMENTS(vals) );
gint width = 0;