plug-ins: port lighting from stock icons to using a resource
and icons names. Also fix two more warnings so it's now completely undeprecated.
|
@ -30,6 +30,8 @@ libexec_PROGRAMS = lighting
|
||||||
lighting_SOURCES = \
|
lighting_SOURCES = \
|
||||||
lighting-apply.c \
|
lighting-apply.c \
|
||||||
lighting-apply.h \
|
lighting-apply.h \
|
||||||
|
lighting-icons.c \
|
||||||
|
lighting-icons.h \
|
||||||
lighting-image.c \
|
lighting-image.c \
|
||||||
lighting-image.h \
|
lighting-image.h \
|
||||||
lighting-main.c \
|
lighting-main.c \
|
||||||
|
@ -38,8 +40,6 @@ lighting_SOURCES = \
|
||||||
lighting-preview.h \
|
lighting-preview.h \
|
||||||
lighting-shade.c \
|
lighting-shade.c \
|
||||||
lighting-shade.h \
|
lighting-shade.h \
|
||||||
lighting-stock.c \
|
|
||||||
lighting-stock.h \
|
|
||||||
lighting-ui.c \
|
lighting-ui.c \
|
||||||
lighting-ui.h
|
lighting-ui.h
|
||||||
|
|
||||||
|
|
6
plug-ins/lighting/images/.gitignore
vendored
|
@ -1,6 +1,4 @@
|
||||||
/Makefile
|
/Makefile
|
||||||
/Makefile.in
|
/Makefile.in
|
||||||
/.xvpics
|
/lighting-icon-images.c
|
||||||
/.thumbnails
|
/lighting-icon-images.h
|
||||||
/stock-icons.list
|
|
||||||
/stock-pixbufs.h
|
|
||||||
|
|
|
@ -1,29 +1,33 @@
|
||||||
## Process this file with automake to produce Makefile.in
|
## Process this file with automake to produce Makefile.in
|
||||||
|
|
||||||
STOCK_IMAGES = \
|
STOCK_IMAGES = \
|
||||||
stock-intensity-ambient-high.png \
|
lighting-intensity-ambient-high.png \
|
||||||
stock-intensity-ambient-low.png \
|
lighting-intensity-ambient-low.png \
|
||||||
stock-intensity-diffuse-high.png \
|
lighting-intensity-diffuse-high.png \
|
||||||
stock-intensity-diffuse-low.png \
|
lighting-intensity-diffuse-low.png \
|
||||||
stock-reflectivity-diffuse-high.png \
|
lighting-reflectivity-diffuse-high.png \
|
||||||
stock-reflectivity-diffuse-low.png \
|
lighting-reflectivity-diffuse-low.png \
|
||||||
stock-reflectivity-specular-high.png \
|
lighting-reflectivity-specular-high.png \
|
||||||
stock-reflectivity-specular-low.png \
|
lighting-reflectivity-specular-low.png \
|
||||||
stock-reflectivity-highlight-high.png \
|
lighting-reflectivity-highlight-high.png \
|
||||||
stock-reflectivity-highlight-low.png
|
lighting-reflectivity-highlight-low.png
|
||||||
|
|
||||||
EXTRA_DIST = $(STOCK_IMAGES)
|
EXTRA_DIST =
|
||||||
|
$(STOCK_IMAGES) \
|
||||||
|
lighting-icon-images.gresource.xml
|
||||||
|
|
||||||
noinst_DATA = stock-pixbufs.h
|
noinst_DATA = \
|
||||||
CLEANFILES = $(noinst_DATA) stock-icons.list
|
lighting-icon-images.c \
|
||||||
|
lighting-icon-images.h
|
||||||
|
|
||||||
stock-icons.list: $(STOCK_IMAGES) Makefile.am
|
CLEANFILES = $(noinst_DATA)
|
||||||
( rm -f $@; \
|
|
||||||
for image in $(STOCK_IMAGES); do \
|
|
||||||
echo $$image | \
|
|
||||||
sed -e 's|.*/||' -e 's|-|_|g' -e 's|\.png$$||' >> $@; \
|
|
||||||
echo " $(srcdir)/$$image" >> $@; \
|
|
||||||
done )
|
|
||||||
|
|
||||||
$(srcdir)/stock-pixbufs.h: stock-icons.list
|
lighting-icon-images.h: lighting-icon-images.gresource.xml
|
||||||
$(GDK_PIXBUF_CSOURCE) --raw --build-list `cat stock-icons.list` > $(@F)
|
$(AM_V_GEN) $(HOST_GLIB_COMPILE_RESOURCES) \
|
||||||
|
--sourcedir=$(srcdir) --generate-header \
|
||||||
|
--target=$@ lighting-icon-images.gresource.xml
|
||||||
|
|
||||||
|
lighting-icon-images.c: lighting-icon-images.h
|
||||||
|
$(AM_V_GEN) $(HOST_GLIB_COMPILE_RESOURCES) \
|
||||||
|
--sourcedir=$(srcdir) --generate-source \
|
||||||
|
--target=$@ lighting-icon-images.gresource.xml
|
||||||
|
|
15
plug-ins/lighting/images/lighting-icon-images.gresource.xml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<gresources>
|
||||||
|
<gresource prefix="/org/gimp/lighting/icons">
|
||||||
|
<file preprocess="to-pixdata">lighting-intensity-ambient-high.png</file>
|
||||||
|
<file preprocess="to-pixdata">lighting-intensity-ambient-low.png</file>
|
||||||
|
<file preprocess="to-pixdata">lighting-intensity-diffuse-high.png</file>
|
||||||
|
<file preprocess="to-pixdata">lighting-intensity-diffuse-low.png</file>
|
||||||
|
<file preprocess="to-pixdata">lighting-reflectivity-diffuse-high.png</file>
|
||||||
|
<file preprocess="to-pixdata">lighting-reflectivity-diffuse-low.png</file>
|
||||||
|
<file preprocess="to-pixdata">lighting-reflectivity-specular-high.png</file>
|
||||||
|
<file preprocess="to-pixdata">lighting-reflectivity-specular-low.png</file>
|
||||||
|
<file preprocess="to-pixdata">lighting-reflectivity-highlight-high.png</file>
|
||||||
|
<file preprocess="to-pixdata">lighting-reflectivity-highlight-low.png</file>
|
||||||
|
</gresource>
|
||||||
|
</gresources>
|
Before Width: | Height: | Size: 725 B After Width: | Height: | Size: 725 B |
Before Width: | Height: | Size: 918 B After Width: | Height: | Size: 918 B |
Before Width: | Height: | Size: 829 B After Width: | Height: | Size: 829 B |
Before Width: | Height: | Size: 504 B After Width: | Height: | Size: 504 B |
Before Width: | Height: | Size: 805 B After Width: | Height: | Size: 805 B |
Before Width: | Height: | Size: 441 B After Width: | Height: | Size: 441 B |
Before Width: | Height: | Size: 822 B After Width: | Height: | Size: 822 B |
Before Width: | Height: | Size: 805 B After Width: | Height: | Size: 805 B |
Before Width: | Height: | Size: 842 B After Width: | Height: | Size: 842 B |
Before Width: | Height: | Size: 800 B After Width: | Height: | Size: 800 B |
43
plug-ins/lighting/lighting-icons.c
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
|
#include "lighting-icons.h"
|
||||||
|
|
||||||
|
#include "images/lighting-icon-images.h"
|
||||||
|
#include "images/lighting-icon-images.c"
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
lighting_icons_init (void)
|
||||||
|
{
|
||||||
|
static gboolean initialized = FALSE;
|
||||||
|
|
||||||
|
GtkIconTheme *icon_theme;
|
||||||
|
|
||||||
|
if (initialized)
|
||||||
|
return;
|
||||||
|
|
||||||
|
initialized = TRUE;
|
||||||
|
|
||||||
|
icon_theme = gtk_icon_theme_get_default ();
|
||||||
|
|
||||||
|
gtk_icon_theme_add_resource_path (icon_theme, "/org/gimp/lighting/icons");
|
||||||
|
}
|
37
plug-ins/lighting/lighting-icons.h
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __LIGHTING_ICONS_H__
|
||||||
|
#define __LIGHTING_ICONS_H__
|
||||||
|
|
||||||
|
|
||||||
|
#define LIGHTING_INTENSITY_AMBIENT_LOW "lighting-intensity-ambient-low"
|
||||||
|
#define LIGHTING_INTENSITY_AMBIENT_HIGH "lighting-intensity-ambient-high"
|
||||||
|
#define LIGHTING_INTENSITY_DIFFUSE_LOW "lighting-intensity-diffuse-low"
|
||||||
|
#define LIGHTING_INTENSITY_DIFFUSE_HIGH "lighting-intensity-diffuse-high"
|
||||||
|
#define LIGHTING_REFLECTIVITY_DIFFUSE_LOW "lighting-reflectivity-diffuse-low"
|
||||||
|
#define LIGHTING_REFLECTIVITY_DIFFUSE_HIGH "lighting-reflectivity-diffuse-high"
|
||||||
|
#define LIGHTING_REFLECTIVITY_SPECULAR_LOW "lighting-reflectivity-specular-low"
|
||||||
|
#define LIGHTING_REFLECTIVITY_SPECULAR_HIGH "lighting-reflectivity-specular-high"
|
||||||
|
#define LIGHTING_REFLECTIVITY_HIGHLIGHT_LOW "lighting-reflectivity-highlight-low"
|
||||||
|
#define LIGHTING_REFLECTIVITY_HIGHLIGHT_HIGH "lighting-reflectivity-highlight-high"
|
||||||
|
|
||||||
|
|
||||||
|
void lighting_icons_init (void);
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* __LIGHTING_ICONs_H__ */
|
|
@ -246,7 +246,7 @@ check_handle_hit (gint xpos, gint ypos)
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
draw_handles (void)
|
draw_handles (cairo_t *cr)
|
||||||
{
|
{
|
||||||
gdouble dxpos, dypos;
|
gdouble dxpos, dypos;
|
||||||
gint startx, starty, pw, ph;
|
gint startx, starty, pw, ph;
|
||||||
|
@ -291,16 +291,15 @@ draw_handles (void)
|
||||||
|
|
||||||
if (mapvals.lightsource[k].type != NO_LIGHT)
|
if (mapvals.lightsource[k].type != NO_LIGHT)
|
||||||
{
|
{
|
||||||
GdkColor color;
|
GdkRGBA color;
|
||||||
cairo_t *cr;
|
|
||||||
cr = gdk_cairo_create (gtk_widget_get_window (previewarea));
|
|
||||||
|
|
||||||
cairo_set_line_width (cr, 1.0);
|
cairo_set_line_width (cr, 1.0);
|
||||||
|
|
||||||
color.red = 0x0;
|
color.red = 0.0;
|
||||||
color.green = 0x4000;
|
color.green = 0.2;
|
||||||
color.blue = 0xFFFF;
|
color.blue = 1.0;
|
||||||
gdk_cairo_set_source_color (cr, &color);
|
color.alpha = 1.0;
|
||||||
|
gdk_cairo_set_source_rgba (cr, &color);
|
||||||
|
|
||||||
/* draw circle at light position */
|
/* draw circle at light position */
|
||||||
switch (mapvals.lightsource[k].type)
|
switch (mapvals.lightsource[k].type)
|
||||||
|
@ -322,7 +321,6 @@ draw_handles (void)
|
||||||
case NO_LIGHT:
|
case NO_LIGHT:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
cairo_destroy (cr);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -440,7 +438,7 @@ preview_draw (GtkWidget *area,
|
||||||
/* draw symbols if enabled in UI */
|
/* draw symbols if enabled in UI */
|
||||||
if (mapvals.interactive_preview)
|
if (mapvals.interactive_preview)
|
||||||
{
|
{
|
||||||
draw_handles ();
|
draw_handles (cr);
|
||||||
}
|
}
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
|
@ -1,110 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
|
|
||||||
#include <gtk/gtk.h>
|
|
||||||
|
|
||||||
#include "lighting-stock.h"
|
|
||||||
|
|
||||||
#include "images/stock-pixbufs.h"
|
|
||||||
|
|
||||||
|
|
||||||
static GtkIconFactory *lighting_icon_factory = NULL;
|
|
||||||
|
|
||||||
static GtkStockItem lighting_stock_items[] =
|
|
||||||
{
|
|
||||||
{ STOCK_INTENSITY_AMBIENT_LOW, NULL, 0, 0, NULL },
|
|
||||||
{ STOCK_INTENSITY_AMBIENT_HIGH, NULL, 0, 0, NULL },
|
|
||||||
{ STOCK_INTENSITY_DIFFUSE_LOW, NULL, 0, 0, NULL },
|
|
||||||
{ STOCK_INTENSITY_DIFFUSE_HIGH, NULL, 0, 0, NULL },
|
|
||||||
{ STOCK_REFLECTIVITY_DIFFUSE_LOW, NULL, 0, 0, NULL },
|
|
||||||
{ STOCK_REFLECTIVITY_DIFFUSE_HIGH, NULL, 0, 0, NULL },
|
|
||||||
{ STOCK_REFLECTIVITY_SPECULAR_LOW, NULL, 0, 0, NULL },
|
|
||||||
{ STOCK_REFLECTIVITY_SPECULAR_HIGH, NULL, 0, 0, NULL },
|
|
||||||
{ STOCK_REFLECTIVITY_HIGHLIGHT_LOW, NULL, 0, 0, NULL },
|
|
||||||
{ STOCK_REFLECTIVITY_HIGHLIGHT_HIGH, NULL, 0, 0, NULL }
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
add_stock_icon (const gchar *stock_id,
|
|
||||||
GtkIconSize size,
|
|
||||||
const guint8 *inline_data)
|
|
||||||
{
|
|
||||||
GtkIconSource *source;
|
|
||||||
GtkIconSet *set;
|
|
||||||
GdkPixbuf *pixbuf;
|
|
||||||
|
|
||||||
source = gtk_icon_source_new ();
|
|
||||||
|
|
||||||
gtk_icon_source_set_size (source, size);
|
|
||||||
gtk_icon_source_set_size_wildcarded (source, FALSE);
|
|
||||||
|
|
||||||
pixbuf = gdk_pixbuf_new_from_inline (-1, inline_data, FALSE, NULL);
|
|
||||||
|
|
||||||
gtk_icon_source_set_pixbuf (source, pixbuf);
|
|
||||||
g_object_unref (pixbuf);
|
|
||||||
|
|
||||||
set = gtk_icon_set_new ();
|
|
||||||
|
|
||||||
gtk_icon_set_add_source (set, source);
|
|
||||||
gtk_icon_source_free (source);
|
|
||||||
|
|
||||||
gtk_icon_factory_add (lighting_icon_factory, stock_id, set);
|
|
||||||
|
|
||||||
gtk_icon_set_unref (set);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
lighting_stock_init (void)
|
|
||||||
{
|
|
||||||
static gboolean initialized = FALSE;
|
|
||||||
|
|
||||||
if (initialized)
|
|
||||||
return;
|
|
||||||
|
|
||||||
lighting_icon_factory = gtk_icon_factory_new ();
|
|
||||||
|
|
||||||
add_stock_icon (STOCK_INTENSITY_AMBIENT_LOW, GTK_ICON_SIZE_BUTTON,
|
|
||||||
stock_intensity_ambient_low);
|
|
||||||
add_stock_icon (STOCK_INTENSITY_AMBIENT_HIGH, GTK_ICON_SIZE_BUTTON,
|
|
||||||
stock_intensity_ambient_high);
|
|
||||||
add_stock_icon (STOCK_INTENSITY_DIFFUSE_LOW, GTK_ICON_SIZE_BUTTON,
|
|
||||||
stock_intensity_diffuse_low);
|
|
||||||
add_stock_icon (STOCK_INTENSITY_DIFFUSE_HIGH, GTK_ICON_SIZE_BUTTON,
|
|
||||||
stock_intensity_diffuse_high);
|
|
||||||
add_stock_icon (STOCK_REFLECTIVITY_DIFFUSE_LOW, GTK_ICON_SIZE_BUTTON,
|
|
||||||
stock_reflectivity_diffuse_low);
|
|
||||||
add_stock_icon (STOCK_REFLECTIVITY_DIFFUSE_HIGH, GTK_ICON_SIZE_BUTTON,
|
|
||||||
stock_reflectivity_diffuse_high);
|
|
||||||
add_stock_icon (STOCK_REFLECTIVITY_SPECULAR_LOW, GTK_ICON_SIZE_BUTTON,
|
|
||||||
stock_reflectivity_specular_low);
|
|
||||||
add_stock_icon (STOCK_REFLECTIVITY_SPECULAR_HIGH, GTK_ICON_SIZE_BUTTON,
|
|
||||||
stock_reflectivity_specular_high);
|
|
||||||
add_stock_icon (STOCK_REFLECTIVITY_HIGHLIGHT_LOW, GTK_ICON_SIZE_BUTTON,
|
|
||||||
stock_reflectivity_highlight_low);
|
|
||||||
add_stock_icon (STOCK_REFLECTIVITY_HIGHLIGHT_HIGH, GTK_ICON_SIZE_BUTTON,
|
|
||||||
stock_reflectivity_highlight_high);
|
|
||||||
|
|
||||||
gtk_icon_factory_add_default (lighting_icon_factory);
|
|
||||||
|
|
||||||
gtk_stock_add_static (lighting_stock_items,
|
|
||||||
G_N_ELEMENTS (lighting_stock_items));
|
|
||||||
|
|
||||||
initialized = TRUE;
|
|
||||||
}
|
|
|
@ -1,37 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __LIGHTING_STOCK_H__
|
|
||||||
#define __LIGHTING_STOCK_H__
|
|
||||||
|
|
||||||
|
|
||||||
#define STOCK_INTENSITY_AMBIENT_LOW "intensity-ambient-low"
|
|
||||||
#define STOCK_INTENSITY_AMBIENT_HIGH "intensity-ambient-high"
|
|
||||||
#define STOCK_INTENSITY_DIFFUSE_LOW "intensity-diffuse-low"
|
|
||||||
#define STOCK_INTENSITY_DIFFUSE_HIGH "intensity-diffuse-high"
|
|
||||||
#define STOCK_REFLECTIVITY_DIFFUSE_LOW "reflectivity-diffuse-low"
|
|
||||||
#define STOCK_REFLECTIVITY_DIFFUSE_HIGH "reflectivity-diffuse-high"
|
|
||||||
#define STOCK_REFLECTIVITY_SPECULAR_LOW "reflectivity-specular-low"
|
|
||||||
#define STOCK_REFLECTIVITY_SPECULAR_HIGH "reflectivity-specular-high"
|
|
||||||
#define STOCK_REFLECTIVITY_HIGHLIGHT_LOW "reflectivity-highlight-low"
|
|
||||||
#define STOCK_REFLECTIVITY_HIGHLIGHT_HIGH "reflectivity-highlight-high"
|
|
||||||
|
|
||||||
|
|
||||||
void lighting_stock_init (void);
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* __LIGHTING_STOCK_H__ */
|
|
|
@ -28,10 +28,10 @@
|
||||||
|
|
||||||
#include "lighting-ui.h"
|
#include "lighting-ui.h"
|
||||||
#include "lighting-main.h"
|
#include "lighting-main.h"
|
||||||
|
#include "lighting-icons.h"
|
||||||
#include "lighting-image.h"
|
#include "lighting-image.h"
|
||||||
#include "lighting-apply.h"
|
#include "lighting-apply.h"
|
||||||
#include "lighting-preview.h"
|
#include "lighting-preview.h"
|
||||||
#include "lighting-stock.h"
|
|
||||||
|
|
||||||
#include "libgimp/stdplugins-intl.h"
|
#include "libgimp/stdplugins-intl.h"
|
||||||
|
|
||||||
|
@ -654,8 +654,8 @@ create_material_page (void)
|
||||||
|
|
||||||
/* Ambient intensity */
|
/* Ambient intensity */
|
||||||
|
|
||||||
image = gtk_image_new_from_stock (STOCK_INTENSITY_AMBIENT_LOW,
|
image = gtk_image_new_from_icon_name (LIGHTING_INTENSITY_AMBIENT_LOW,
|
||||||
GTK_ICON_SIZE_BUTTON);
|
GTK_ICON_SIZE_BUTTON);
|
||||||
label = gimp_grid_attach_aligned (GTK_GRID (grid), 0, 0,
|
label = gimp_grid_attach_aligned (GTK_GRID (grid), 0, 0,
|
||||||
_("_Glowing:"), 0.0, 0.5,
|
_("_Glowing:"), 0.0, 0.5,
|
||||||
image, 1);
|
image, 1);
|
||||||
|
@ -678,15 +678,15 @@ create_material_page (void)
|
||||||
_("Amount of original color to show where no "
|
_("Amount of original color to show where no "
|
||||||
"direct light falls"), NULL);
|
"direct light falls"), NULL);
|
||||||
|
|
||||||
image = gtk_image_new_from_stock (STOCK_INTENSITY_AMBIENT_HIGH,
|
image = gtk_image_new_from_icon_name (LIGHTING_INTENSITY_AMBIENT_HIGH,
|
||||||
GTK_ICON_SIZE_BUTTON);
|
GTK_ICON_SIZE_BUTTON);
|
||||||
gtk_grid_attach (GTK_GRID (grid), image, 3, 0, 1, 1);
|
gtk_grid_attach (GTK_GRID (grid), image, 3, 0, 1, 1);
|
||||||
gtk_widget_show (image);
|
gtk_widget_show (image);
|
||||||
|
|
||||||
/* Diffuse intensity */
|
/* Diffuse intensity */
|
||||||
|
|
||||||
image = gtk_image_new_from_stock (STOCK_INTENSITY_DIFFUSE_LOW,
|
image = gtk_image_new_from_icon_name (LIGHTING_INTENSITY_DIFFUSE_LOW,
|
||||||
GTK_ICON_SIZE_BUTTON);
|
GTK_ICON_SIZE_BUTTON);
|
||||||
label = gimp_grid_attach_aligned (GTK_GRID (grid), 0, 1,
|
label = gimp_grid_attach_aligned (GTK_GRID (grid), 0, 1,
|
||||||
_("_Bright:"), 0.0, 0.5,
|
_("_Bright:"), 0.0, 0.5,
|
||||||
image, 1);
|
image, 1);
|
||||||
|
@ -709,15 +709,15 @@ create_material_page (void)
|
||||||
_("Intensity of original color when lit by a light "
|
_("Intensity of original color when lit by a light "
|
||||||
"source"), NULL);
|
"source"), NULL);
|
||||||
|
|
||||||
image = gtk_image_new_from_stock (STOCK_INTENSITY_DIFFUSE_HIGH,
|
image = gtk_image_new_from_icon_name (LIGHTING_INTENSITY_DIFFUSE_HIGH,
|
||||||
GTK_ICON_SIZE_BUTTON);
|
GTK_ICON_SIZE_BUTTON);
|
||||||
gtk_grid_attach (GTK_GRID (grid), image, 3, 1, 1, 1);
|
gtk_grid_attach (GTK_GRID (grid), image, 3, 1, 1, 1);
|
||||||
gtk_widget_show (image);
|
gtk_widget_show (image);
|
||||||
|
|
||||||
/* Specular reflection */
|
/* Specular reflection */
|
||||||
|
|
||||||
image = gtk_image_new_from_stock (STOCK_REFLECTIVITY_SPECULAR_LOW,
|
image = gtk_image_new_from_icon_name (LIGHTING_REFLECTIVITY_SPECULAR_LOW,
|
||||||
GTK_ICON_SIZE_BUTTON);
|
GTK_ICON_SIZE_BUTTON);
|
||||||
label = gimp_grid_attach_aligned (GTK_GRID (grid), 0, 2,
|
label = gimp_grid_attach_aligned (GTK_GRID (grid), 0, 2,
|
||||||
_("_Shiny:"), 0.0, 0.5,
|
_("_Shiny:"), 0.0, 0.5,
|
||||||
image, 1);
|
image, 1);
|
||||||
|
@ -740,14 +740,14 @@ create_material_page (void)
|
||||||
_("Controls how intense the highlights will be"),
|
_("Controls how intense the highlights will be"),
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
image = gtk_image_new_from_stock (STOCK_REFLECTIVITY_SPECULAR_HIGH,
|
image = gtk_image_new_from_icon_name (LIGHTING_REFLECTIVITY_SPECULAR_HIGH,
|
||||||
GTK_ICON_SIZE_BUTTON);
|
GTK_ICON_SIZE_BUTTON);
|
||||||
gtk_grid_attach (GTK_GRID (grid), image, 3, 2, 1, 1);
|
gtk_grid_attach (GTK_GRID (grid), image, 3, 2, 1, 1);
|
||||||
gtk_widget_show (image);
|
gtk_widget_show (image);
|
||||||
|
|
||||||
/* Highlight */
|
/* Highlight */
|
||||||
image = gtk_image_new_from_stock (STOCK_REFLECTIVITY_HIGHLIGHT_LOW,
|
image = gtk_image_new_from_icon_name (LIGHTING_REFLECTIVITY_HIGHLIGHT_LOW,
|
||||||
GTK_ICON_SIZE_BUTTON);
|
GTK_ICON_SIZE_BUTTON);
|
||||||
label = gimp_grid_attach_aligned (GTK_GRID (grid), 0, 3,
|
label = gimp_grid_attach_aligned (GTK_GRID (grid), 0, 3,
|
||||||
_("_Polished:"), 0.0, 0.5,
|
_("_Polished:"), 0.0, 0.5,
|
||||||
image, 1);
|
image, 1);
|
||||||
|
@ -770,8 +770,8 @@ create_material_page (void)
|
||||||
_("Higher values makes the highlights more focused"),
|
_("Higher values makes the highlights more focused"),
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
image = gtk_image_new_from_stock (STOCK_REFLECTIVITY_HIGHLIGHT_HIGH,
|
image = gtk_image_new_from_icon_name (LIGHTING_REFLECTIVITY_HIGHLIGHT_HIGH,
|
||||||
GTK_ICON_SIZE_BUTTON);
|
GTK_ICON_SIZE_BUTTON);
|
||||||
gtk_grid_attach (GTK_GRID (grid), image, 3, 3, 1, 1);
|
gtk_grid_attach (GTK_GRID (grid), image, 3, 3, 1, 1);
|
||||||
gtk_widget_show (image);
|
gtk_widget_show (image);
|
||||||
|
|
||||||
|
@ -1029,7 +1029,7 @@ main_dialog (gint32 drawable_id)
|
||||||
g_free (path);
|
g_free (path);
|
||||||
}
|
}
|
||||||
|
|
||||||
lighting_stock_init ();
|
lighting_icons_init ();
|
||||||
|
|
||||||
appwin = gimp_dialog_new (_("Lighting Effects"), PLUG_IN_ROLE,
|
appwin = gimp_dialog_new (_("Lighting Effects"), PLUG_IN_ROLE,
|
||||||
NULL, 0,
|
NULL, 0,
|
||||||
|
|