From 411afe574f24645511099fc70c8e00f4508511ff Mon Sep 17 00:00:00 2001 From: joncruz Date: Tue, 24 Mar 2009 07:33:07 +0000 Subject: [PATCH] Cleaning up PIXMAP_DIR usage. --- src/ui/dialog/filter-effects-dialog.cpp | 33 +++++++++++++------------ 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/src/ui/dialog/filter-effects-dialog.cpp b/src/ui/dialog/filter-effects-dialog.cpp index fc5eb81f7..1732b34a3 100644 --- a/src/ui/dialog/filter-effects-dialog.cpp +++ b/src/ui/dialog/filter-effects-dialog.cpp @@ -2273,73 +2273,74 @@ void FilterEffectsDialog::update_primitive_infobox() } switch(_add_primitive_type.get_active_data()->id){ case(NR_FILTER_BLEND): - _infobox_icon.set(g_strdup_printf("%s/feBlend-icon.png", INKSCAPE_PIXMAPDIR)); + _infobox_icon.set_from_icon_name("feBlend-icon", Gtk::ICON_SIZE_DIALOG); _infobox_desc.set_markup(_("The feBlend filter primitive provides 4 image blending modes: screen, multiply, darken and lighten.")); break; case(NR_FILTER_COLORMATRIX): - _infobox_icon.set(g_strdup_printf("%s/feColorMatrix-icon.png", INKSCAPE_PIXMAPDIR)); + _infobox_icon.set_from_icon_name("feColorMatrix-icon", Gtk::ICON_SIZE_DIALOG); _infobox_desc.set_markup(_("The feColorMatrix filter primitive applies a matrix transformation to colour of each rendered pixel. This allows for effects like turning object to grayscale, modifying colour saturation and changing colour hue.")); break; case(NR_FILTER_COMPONENTTRANSFER): - _infobox_icon.set(g_strdup_printf("%s/feComponentTransfer-icon.png", INKSCAPE_PIXMAPDIR)); + _infobox_icon.set_from_icon_name("feComponentTransfer-icon", Gtk::ICON_SIZE_DIALOG); _infobox_desc.set_markup(_("The feComponentTransfer filter primitive manipulates the input's color components (red, green, blue, and alpha) according to particular transfer functions, allowing operations like brightness and contrast adjustment, color balance, and thresholding.")); break; case(NR_FILTER_COMPOSITE): - _infobox_icon.set(g_strdup_printf("%s/feComposite-icon.png", INKSCAPE_PIXMAPDIR)); + _infobox_icon.set_from_icon_name("feComposite-icon", Gtk::ICON_SIZE_DIALOG); _infobox_desc.set_markup(_("The feComposite filter primitive composites two images using one of the Porter-Duff blending modes or the aritmetic mode described in SVG standard. Porter-Duff blending modes are essentially logical operations between the corresponding pixel values of the images.")); break; case(NR_FILTER_CONVOLVEMATRIX): - _infobox_icon.set(g_strdup_printf("%s/feConvolveMatrix-icon.png", INKSCAPE_PIXMAPDIR)); + _infobox_icon.set_from_icon_name("feConvolveMatrix-icon", Gtk::ICON_SIZE_DIALOG); _infobox_desc.set_markup(_("The feConvolveMatrix lets you specify a Convolution to be applied on the image. Common effects created using convolution matrices are blur, sharpening, embossing and edge detection. Note that while gaussian blur can be created using this filter primitive, the special gaussian blur primitive is faster and resolution-independent.")); break; case(NR_FILTER_DIFFUSELIGHTING): - _infobox_icon.set(g_strdup_printf("%s/feDiffuseLighting-icon.png", INKSCAPE_PIXMAPDIR)); + _infobox_icon.set_from_icon_name("feDiffuseLighting-icon", Gtk::ICON_SIZE_DIALOG); _infobox_desc.set_markup(_("The feDiffuseLighting and feSpecularLighting filter primitives create \"embossed\" shadings. The input's alpha channel is used to provide depth information: higher opacity areas are raised toward the viewer and lower opacity areas recede away from the viewer.")); break; case(NR_FILTER_DISPLACEMENTMAP): - _infobox_icon.set(g_strdup_printf("%s/feDisplacementMap-icon.png", INKSCAPE_PIXMAPDIR)); + _infobox_icon.set_from_icon_name("feDisplacementMap-icon", Gtk::ICON_SIZE_DIALOG); _infobox_desc.set_markup(_("The feDisplacementMap filter primitive displaces the pixels in the first input using the second input as a displacement map, that shows from how far the pixel should come from. Classical examples are whirl and pinch effects.")); break; case(NR_FILTER_FLOOD): - _infobox_icon.set(g_strdup_printf("%s/feFlood-icon.png", INKSCAPE_PIXMAPDIR)); + _infobox_icon.set_from_icon_name("feFlood-icon", Gtk::ICON_SIZE_DIALOG); _infobox_desc.set_markup(_("The feFlood filter primitive fills the region with a given color and opacity. It is usually used as an input to other filters to apply color to a graphic.")); break; case(NR_FILTER_GAUSSIANBLUR): - _infobox_icon.set(g_strdup_printf("%s/feGaussianBlur-icon.png", INKSCAPE_PIXMAPDIR)); + _infobox_icon.set_from_icon_name("feGaussianBlur-icon", Gtk::ICON_SIZE_DIALOG); _infobox_desc.set_markup(_("The feGaussianBlur filter primitive uniformly blurs its input. It is commonly used together with feOffset to create a drop shadow effect.")); break; case(NR_FILTER_IMAGE): - _infobox_icon.set(g_strdup_printf("%s/feImage-icon.png", INKSCAPE_PIXMAPDIR)); + _infobox_icon.set_from_icon_name("feImage-icon", Gtk::ICON_SIZE_DIALOG); _infobox_desc.set_markup(_("The feImage filter primitive fills the region with an external image or another part of the document.")); break; case(NR_FILTER_MERGE): - _infobox_icon.set(g_strdup_printf("%s/feMerge-icon.png", INKSCAPE_PIXMAPDIR)); + _infobox_icon.set_from_icon_name("feMerge-icon", Gtk::ICON_SIZE_DIALOG); _infobox_desc.set_markup(_("The feMerge filter primitive composites several temporary images inside the filter primitive to a single image. It uses normal alpha compositing for this. This is equivalent to using several feBlend primitives in 'normal' mode or several feComposite primitives in 'over' mode.")); break; case(NR_FILTER_MORPHOLOGY): - _infobox_icon.set(g_strdup_printf("%s/feMorphology-icon.png", INKSCAPE_PIXMAPDIR)); + _infobox_icon.set_from_icon_name("feMorphology-icon", Gtk::ICON_SIZE_DIALOG); _infobox_desc.set_markup(_("The feMorphology filter primitive provides erode and dilate effects. For single-colour objects erode makes the object thinner and dilate makes it thicker.")); break; case(NR_FILTER_OFFSET): - _infobox_icon.set(g_strdup_printf("%s/feOffset-icon.png", INKSCAPE_PIXMAPDIR)); + _infobox_icon.set_from_icon_name("feOffset-icon", Gtk::ICON_SIZE_DIALOG); _infobox_desc.set_markup(_("The feOffset filter primitive offsets the image by an user-defined amount. For example, this is useful for drop shadows, where the shadow is in a slightly different position than the actual object.")); break; case(NR_FILTER_SPECULARLIGHTING): - _infobox_icon.set(g_strdup_printf("%s/feSpecularLighting-icon.png", INKSCAPE_PIXMAPDIR)); + _infobox_icon.set_from_icon_name("feSpecularLighting-icon", Gtk::ICON_SIZE_DIALOG); _infobox_desc.set_markup(_("The feDiffuseLighting and feSpecularLighting filter primitives create \"embossed\" shadings. The input's alpha channel is used to provide depth information: higher opacity areas are raised toward the viewer and lower opacity areas recede away from the viewer.")); break; case(NR_FILTER_TILE): - _infobox_icon.set(g_strdup_printf("%s/feTile-icon.png", INKSCAPE_PIXMAPDIR)); + _infobox_icon.set_from_icon_name("feTile-icon", Gtk::ICON_SIZE_DIALOG); _infobox_desc.set_markup(_("The feTile filter primitive tiles a region with its input graphic")); break; case(NR_FILTER_TURBULENCE): - _infobox_icon.set(g_strdup_printf("%s/feTurbulence-icon.png", INKSCAPE_PIXMAPDIR)); + _infobox_icon.set_from_icon_name("feTurbulence-icon", Gtk::ICON_SIZE_DIALOG); _infobox_desc.set_markup(_("The feTurbulence filter primitive renders Perlin noise. This kind of noise is useful in simulating several nature phenomena like clouds, fire and smoke and in generating complex textures like marble or granite.")); break; default: g_assert(false); break; } + _infobox_icon.set_pixel_size(96); } void FilterEffectsDialog::duplicate_primitive() -- 2.30.2