Fix a lot of warnings all over the place
Deprecated stuff, unused variables. Includes parts of a patch from Shlomi Fish from bug #768855.
This commit is contained in:
@ -1243,6 +1243,7 @@ void
|
||||
context_actions_update (GimpActionGroup *group,
|
||||
gpointer data)
|
||||
{
|
||||
#if 0
|
||||
GimpContext *context = action_data_get_context (data);
|
||||
gboolean generated = FALSE;
|
||||
gdouble radius = 0.0;
|
||||
@ -1272,7 +1273,6 @@ context_actions_update (GimpActionGroup *group,
|
||||
#define SET_SENSITIVE(action,condition) \
|
||||
gimp_action_group_set_action_sensitive (group, "context-" action, (condition) != 0)
|
||||
|
||||
#if 0
|
||||
SET_SENSITIVE ("brush-radius-minimum", generated && radius > 1.0);
|
||||
SET_SENSITIVE ("brush-radius-decrease", generated && radius > 1.0);
|
||||
SET_SENSITIVE ("brush-radius-decrease-skip", generated && radius > 1.0);
|
||||
@ -1288,7 +1288,7 @@ context_actions_update (GimpActionGroup *group,
|
||||
SET_SENSITIVE ("brush-angle-maximum", generated);
|
||||
SET_SENSITIVE ("brush-angle-increase", generated);
|
||||
SET_SENSITIVE ("brush-angle-increase-skip", generated);
|
||||
#endif
|
||||
|
||||
#undef SET_SENSITIVE
|
||||
|
||||
#endif
|
||||
}
|
||||
|
@ -82,8 +82,6 @@ G_DEFINE_TYPE (GimpMotionBuffer, gimp_motion_buffer, GIMP_TYPE_OBJECT)
|
||||
|
||||
static guint motion_buffer_signals[LAST_SIGNAL] = { 0 };
|
||||
|
||||
static const GimpCoords default_coords = GIMP_COORDS_DEFAULT_VALUES;
|
||||
|
||||
|
||||
static void
|
||||
gimp_motion_buffer_class_init (GimpMotionBufferClass *klass)
|
||||
|
@ -23,6 +23,9 @@
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
/* we use our own deprecated API here */
|
||||
#define GIMP_DISABLE_DEPRECATION_WARNINGS
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "gimpuitypes.h"
|
||||
|
@ -24,6 +24,9 @@
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
/* we use our own deprecated API here */
|
||||
#define GIMP_DISABLE_DEPRECATION_WARNINGS
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "gimpuitypes.h"
|
||||
|
@ -48,13 +48,17 @@
|
||||
/*************************/
|
||||
|
||||
static const GimpVector2 gimp_vector2_zero = { 0.0, 0.0 };
|
||||
#if 0
|
||||
static const GimpVector2 gimp_vector2_unit_x = { 1.0, 0.0 };
|
||||
static const GimpVector2 gimp_vector2_unit_y = { 0.0, 1.0 };
|
||||
#endif
|
||||
|
||||
static const GimpVector3 gimp_vector3_zero = { 0.0, 0.0, 0.0 };
|
||||
#if 0
|
||||
static const GimpVector3 gimp_vector3_unit_x = { 1.0, 0.0, 0.0 };
|
||||
static const GimpVector3 gimp_vector3_unit_y = { 0.0, 1.0, 0.0 };
|
||||
static const GimpVector3 gimp_vector3_unit_z = { 0.0, 0.0, 1.0 };
|
||||
#endif
|
||||
|
||||
/**************************************/
|
||||
/* Two dimensional vector functions */
|
||||
|
@ -132,7 +132,7 @@ static void cdisplay_colorblind_set_deficiency (CdisplayColorblind *c
|
||||
ColorblindDeficiency value);
|
||||
|
||||
|
||||
/* The RGB<->LMS transforms above are computed from the human cone
|
||||
/* The RGB<->LMS transforms above are computed from the human cone
|
||||
* photo-pigment absorption spectra and the monitor phosphor
|
||||
* emission spectra. These parameters are fairly constant for most
|
||||
* humans and most monitors (at least for modern CRTs). However,
|
||||
@ -146,16 +146,18 @@ static void cdisplay_colorblind_set_deficiency (CdisplayColorblind *c
|
||||
* indistinguishable).
|
||||
*/
|
||||
|
||||
#if 0
|
||||
/* Gamma conversion is now handled by simply asking for a linear buffer */
|
||||
static const gfloat gammaRGB = 2.1;
|
||||
#endif
|
||||
|
||||
|
||||
/* For most modern Cathode-Ray Tube monitors (CRTs), the following
|
||||
* are good estimates of the RGB->LMS and LMS->RGB transform
|
||||
* matrices. They are based on spectra measured on a typical CRT
|
||||
* with a PhotoResearch PR650 spectral photometer and the Stockman
|
||||
* human cone fundamentals. NOTE: these estimates will NOT work well
|
||||
* for LCDs!
|
||||
*/
|
||||
/* For most modern Cathode-Ray Tube monitors (CRTs), the following
|
||||
* are good estimates of the RGB->LMS and LMS->RGB transform
|
||||
* matrices. They are based on spectra measured on a typical CRT
|
||||
* with a PhotoResearch PR650 spectral photometer and the Stockman
|
||||
* human cone fundamentals. NOTE: these estimates will NOT work well
|
||||
* for LCDs!
|
||||
*/
|
||||
static const gfloat rgb2lms[9] =
|
||||
{
|
||||
0.05059983,
|
||||
|
@ -381,7 +381,7 @@ load_image (const gchar *filename,
|
||||
guint16 ctx_us;
|
||||
guint8 *value;
|
||||
guint32 tag;
|
||||
gboolean do_toggle_endian = FALSE;
|
||||
gboolean __attribute__((unused))do_toggle_endian = FALSE;
|
||||
gboolean implicit_encoding = FALSE;
|
||||
|
||||
if (fread (&group_word, 1, 2, DICOM) == 0)
|
||||
|
@ -824,9 +824,9 @@ mng_save_image (const gchar *filename,
|
||||
const Babl *layer_format;
|
||||
volatile gint layer_bpp;
|
||||
|
||||
guint8 layer_mng_colortype;
|
||||
guint8 layer_mng_compression_type;
|
||||
guint8 layer_mng_interlace_type;
|
||||
guint8 __attribute__((unused))layer_mng_colortype;
|
||||
guint8 __attribute__((unused))layer_mng_compression_type;
|
||||
guint8 __attribute__((unused))layer_mng_interlace_type;
|
||||
gboolean layer_has_unique_palette;
|
||||
|
||||
gchar frame_mode;
|
||||
|
@ -854,7 +854,10 @@ read_creator_block (FILE *f,
|
||||
gchar *string;
|
||||
gchar *title = NULL, *artist = NULL, *copyright = NULL, *description = NULL;
|
||||
guint32 dword;
|
||||
guint32 cdate = 0, mdate = 0, appid, appver;
|
||||
guint32 __attribute__((unused))cdate = 0;
|
||||
guint32 __attribute__((unused))mdate = 0;
|
||||
guint32 __attribute__((unused))appid;
|
||||
guint32 __attribute__((unused))appver;
|
||||
GString *comment;
|
||||
GimpParasite *comment_parasite;
|
||||
|
||||
|
@ -450,7 +450,7 @@ load_image (const gchar *filename,
|
||||
return -1;
|
||||
}
|
||||
|
||||
if ((sunhdr.l_ras_type < 0) || (sunhdr.l_ras_type > 5))
|
||||
if (sunhdr.l_ras_type > 5)
|
||||
{
|
||||
g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
|
||||
"%s",
|
||||
@ -459,7 +459,7 @@ load_image (const gchar *filename,
|
||||
return -1;
|
||||
}
|
||||
|
||||
if ((sunhdr.l_ras_maplength < 0) || (sunhdr.l_ras_maplength > (256 * 3)))
|
||||
if (sunhdr.l_ras_maplength > (256 * 3))
|
||||
{
|
||||
g_message ("Map lengths greater than 256 entries are unsupported by GIMP.");
|
||||
gimp_quit ();
|
||||
|
@ -22,10 +22,7 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimp/gimp.h"
|
||||
|
||||
#include <libgimp/gimp.h>
|
||||
#include <libgimp/gimpui.h>
|
||||
|
||||
#include "imap_commands.h"
|
||||
|
@ -22,7 +22,8 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <libgimp/gimp.h>
|
||||
#include <libgimp/gimpui.h>
|
||||
|
||||
#include "imap_table.h"
|
||||
|
||||
|
@ -90,6 +90,15 @@ static void apply_settings (GtkWidget *widget,
|
||||
static void isolate_selected_light (GtkWidget *widget,
|
||||
gpointer data);
|
||||
|
||||
static GtkWidget * spin_button_new (GtkAdjustment **adjustment, /* return value */
|
||||
gdouble value,
|
||||
gdouble lower,
|
||||
gdouble upper,
|
||||
gdouble step_increment,
|
||||
gdouble page_increment,
|
||||
gdouble page_size,
|
||||
gdouble climb_rate,
|
||||
guint digits);
|
||||
|
||||
/**********************/
|
||||
/* Std. toggle update */
|
||||
@ -287,7 +296,7 @@ create_options_page (void)
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *toggle;
|
||||
GtkWidget *table;
|
||||
GtkObject *adj;
|
||||
GtkAdjustment *adj;
|
||||
|
||||
page = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (page), 12);
|
||||
@ -343,7 +352,8 @@ create_options_page (void)
|
||||
gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 12);
|
||||
gtk_widget_show (table);
|
||||
|
||||
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
|
||||
adj = (GtkAdjustment *)
|
||||
gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
|
||||
_("Distance:"), 100, 6,
|
||||
mapvals.viewpoint.z,
|
||||
0.0, 2.0, 0.01, 0.05,
|
||||
@ -370,7 +380,7 @@ create_light_page (void)
|
||||
GtkWidget *frame;
|
||||
GtkWidget *table;
|
||||
GtkWidget *button;
|
||||
GtkObject *adj;
|
||||
GtkAdjustment *adj;
|
||||
GtkWidget *label;
|
||||
gint k = mapvals.light_selected;
|
||||
|
||||
@ -450,7 +460,7 @@ create_light_page (void)
|
||||
_("Set light source color"), NULL);
|
||||
|
||||
|
||||
spin_intensity = gimp_spin_button_new (&adj,
|
||||
spin_intensity = spin_button_new (&adj,
|
||||
mapvals.lightsource[k].intensity,
|
||||
0.0, 100.0,
|
||||
0.01, 0.1, 0.0, 0.0, 2);
|
||||
@ -471,7 +481,7 @@ create_light_page (void)
|
||||
gtk_table_attach_defaults (GTK_TABLE (table), label, 3, 4, 0, 1);
|
||||
gtk_widget_show (label);
|
||||
|
||||
spin_pos_x = gimp_spin_button_new (&adj,
|
||||
spin_pos_x = spin_button_new (&adj,
|
||||
mapvals.lightsource[k].position.x,
|
||||
-100.0, 100.0,
|
||||
0.1, 1.0, 0.0, 0.0, 2);
|
||||
@ -486,7 +496,7 @@ create_light_page (void)
|
||||
gimp_help_set_help_data (spin_pos_x,
|
||||
_("Light source X position in XYZ space"), NULL);
|
||||
|
||||
spin_pos_y = gimp_spin_button_new (&adj,
|
||||
spin_pos_y = spin_button_new (&adj,
|
||||
mapvals.lightsource[k].position.y,
|
||||
-100.0, 100.0,
|
||||
0.1, 1.0, 0.0, 0.0, 2);
|
||||
@ -501,7 +511,7 @@ create_light_page (void)
|
||||
gimp_help_set_help_data (spin_pos_y,
|
||||
_("Light source Y position in XYZ space"), NULL);
|
||||
|
||||
spin_pos_z = gimp_spin_button_new (&adj,
|
||||
spin_pos_z = spin_button_new (&adj,
|
||||
mapvals.lightsource[k].position.z,
|
||||
-100.0, 100.0,
|
||||
0.1, 1.0, 0.0, 0.0, 2);
|
||||
@ -522,7 +532,7 @@ create_light_page (void)
|
||||
gtk_table_attach_defaults (GTK_TABLE (table), label, 5, 6, 0, 1);
|
||||
gtk_widget_show (label);
|
||||
|
||||
spin_dir_x = gimp_spin_button_new (&adj,
|
||||
spin_dir_x = spin_button_new (&adj,
|
||||
mapvals.lightsource[k].direction.x,
|
||||
-100.0, 100.0, 0.1, 1.0, 0.0, 0.0, 2);
|
||||
gimp_table_attach_aligned (GTK_TABLE (table), 4, 1,
|
||||
@ -536,7 +546,7 @@ create_light_page (void)
|
||||
gimp_help_set_help_data (spin_dir_x,
|
||||
_("Light source X direction in XYZ space"), NULL);
|
||||
|
||||
spin_dir_y = gimp_spin_button_new (&adj,
|
||||
spin_dir_y = spin_button_new (&adj,
|
||||
mapvals.lightsource[k].direction.y,
|
||||
-100.0, 100.0, 0.1, 1.0, 0.0, 0.0, 2);
|
||||
gimp_table_attach_aligned (GTK_TABLE (table), 4, 2,
|
||||
@ -550,7 +560,7 @@ create_light_page (void)
|
||||
gimp_help_set_help_data (spin_dir_y,
|
||||
_("Light source Y direction in XYZ space"), NULL);
|
||||
|
||||
spin_dir_z = gimp_spin_button_new (&adj,
|
||||
spin_dir_z = spin_button_new (&adj,
|
||||
mapvals.lightsource[k].direction.z,
|
||||
-100.0, 100.0, 0.1, 1.0, 0.0, 0.0, 2);
|
||||
gimp_table_attach_aligned (GTK_TABLE (table), 4, 3,
|
||||
@ -615,7 +625,7 @@ create_material_page (void)
|
||||
GtkWidget *spinbutton;
|
||||
GtkWidget *image;
|
||||
GtkWidget *button;
|
||||
GtkObject *adj;
|
||||
GtkAdjustment *adj;
|
||||
|
||||
page = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (page), 12);
|
||||
@ -642,7 +652,7 @@ create_material_page (void)
|
||||
image, 1, FALSE);
|
||||
gtk_size_group_add_widget (group, label);
|
||||
|
||||
spinbutton = gimp_spin_button_new (&adj, mapvals.material.ambient_int,
|
||||
spinbutton = spin_button_new (&adj, mapvals.material.ambient_int,
|
||||
0, G_MAXFLOAT, 0.01, 0.1, 0.0, 0.0, 2);
|
||||
gtk_table_attach (GTK_TABLE (table), spinbutton, 2, 3, 0, 1,
|
||||
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
|
||||
@ -675,7 +685,7 @@ create_material_page (void)
|
||||
image, 1, FALSE);
|
||||
gtk_size_group_add_widget (group, label);
|
||||
|
||||
spinbutton = gimp_spin_button_new (&adj, mapvals.material.diffuse_int,
|
||||
spinbutton = spin_button_new (&adj, mapvals.material.diffuse_int,
|
||||
0, G_MAXFLOAT, 0.01, 0.1, 0.0, 0.0, 2);
|
||||
gtk_table_attach (GTK_TABLE (table), spinbutton, 2, 3, 1, 2,
|
||||
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
|
||||
@ -708,7 +718,7 @@ create_material_page (void)
|
||||
image, 1, FALSE);
|
||||
gtk_size_group_add_widget (group, label);
|
||||
|
||||
spinbutton = gimp_spin_button_new (&adj, mapvals.material.specular_ref,
|
||||
spinbutton = spin_button_new (&adj, mapvals.material.specular_ref,
|
||||
0, G_MAXFLOAT, 0.01, 0.1, 0.0, 0.0, 2);
|
||||
gtk_table_attach (GTK_TABLE (table), spinbutton, 2, 3, 2, 3,
|
||||
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
|
||||
@ -740,7 +750,7 @@ create_material_page (void)
|
||||
image, 1, FALSE);
|
||||
gtk_size_group_add_widget (group, label);
|
||||
|
||||
spinbutton = gimp_spin_button_new (&adj, mapvals.material.highlight,
|
||||
spinbutton = spin_button_new (&adj, mapvals.material.highlight,
|
||||
0, G_MAXFLOAT, 0.01, 0.1, 0.0, 0.0, 2);
|
||||
gtk_table_attach (GTK_TABLE (table), spinbutton, 2, 3, 3, 4,
|
||||
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
|
||||
@ -793,7 +803,7 @@ create_bump_page (void)
|
||||
GtkWidget *table;
|
||||
GtkWidget *combo;
|
||||
GtkWidget *spinbutton;
|
||||
GtkObject *adj;
|
||||
GtkAdjustment *adj;
|
||||
|
||||
page = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (page), 12);
|
||||
@ -857,7 +867,7 @@ create_bump_page (void)
|
||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
|
||||
_("Cu_rve:"), 0.0, 0.5, combo, 1, FALSE);
|
||||
|
||||
spinbutton = gimp_spin_button_new (&adj, mapvals.bumpmax,
|
||||
spinbutton = spin_button_new (&adj, mapvals.bumpmax,
|
||||
0, G_MAXFLOAT, 0.01, 0.1, 0.0, 0.0, 2);
|
||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 2,
|
||||
_("Ma_ximum height:"), 0.0, 0.5,
|
||||
@ -1520,3 +1530,28 @@ isolate_selected_light (GtkWidget *widget,
|
||||
|
||||
interactive_preview_callback (NULL);
|
||||
}
|
||||
|
||||
static GtkWidget *
|
||||
spin_button_new (GtkAdjustment **adjustment, /* return value */
|
||||
gdouble value,
|
||||
gdouble lower,
|
||||
gdouble upper,
|
||||
gdouble step_increment,
|
||||
gdouble page_increment,
|
||||
gdouble page_size,
|
||||
gdouble climb_rate,
|
||||
guint digits)
|
||||
{
|
||||
GtkWidget *spinbutton;
|
||||
|
||||
*adjustment = (GtkAdjustment *)
|
||||
gtk_adjustment_new (value, lower, upper,
|
||||
step_increment, page_increment, 0);
|
||||
|
||||
spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (*adjustment),
|
||||
climb_rate, digits);
|
||||
|
||||
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
|
||||
|
||||
return spinbutton;
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ static GtkNotebook *options_note_book = NULL;
|
||||
static GtkWidget *pointlightwid;
|
||||
static GtkWidget *dirlightwid;
|
||||
|
||||
static GtkObject *xadj, *yadj, *zadj;
|
||||
static GtkAdjustment *xadj, *yadj, *zadj;
|
||||
|
||||
static GtkWidget *box_page = NULL;
|
||||
static GtkWidget *cylinder_page = NULL;
|
||||
@ -299,7 +299,7 @@ static gint
|
||||
preview_events (GtkWidget *area,
|
||||
GdkEvent *event)
|
||||
{
|
||||
HVect pos;
|
||||
HVect __attribute__((unused))pos;
|
||||
/* HMatrix RotMat;
|
||||
gdouble a,b,c; */
|
||||
|
||||
@ -386,6 +386,32 @@ preview_events (GtkWidget *area,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
static GtkWidget *
|
||||
spin_button_new (GtkAdjustment **adjustment, /* return value */
|
||||
gdouble value,
|
||||
gdouble lower,
|
||||
gdouble upper,
|
||||
gdouble step_increment,
|
||||
gdouble page_increment,
|
||||
gdouble page_size,
|
||||
gdouble climb_rate,
|
||||
guint digits)
|
||||
{
|
||||
GtkWidget *spinbutton;
|
||||
|
||||
*adjustment = (GtkAdjustment *)
|
||||
gtk_adjustment_new (value, lower, upper,
|
||||
step_increment, page_increment, 0);
|
||||
|
||||
spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (*adjustment),
|
||||
climb_rate, digits);
|
||||
|
||||
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
|
||||
|
||||
return spinbutton;
|
||||
}
|
||||
|
||||
/*******************************/
|
||||
/* Create general options page */
|
||||
/*******************************/
|
||||
@ -402,7 +428,7 @@ create_options_page (void)
|
||||
GtkWidget *toggle;
|
||||
GtkWidget *table;
|
||||
GtkWidget *spinbutton;
|
||||
GtkObject *adj;
|
||||
GtkAdjustment *adj;
|
||||
|
||||
page = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (page), 12);
|
||||
@ -523,7 +549,8 @@ create_options_page (void)
|
||||
table, "sensitive",
|
||||
G_BINDING_SYNC_CREATE);
|
||||
|
||||
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
|
||||
adj = (GtkAdjustment *)
|
||||
gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
|
||||
_("_Depth:"), 0, 0,
|
||||
mapvals.maxdepth, 1.0, 5.0, 0.1, 1.0,
|
||||
1, TRUE, 0, 0,
|
||||
@ -533,7 +560,7 @@ create_options_page (void)
|
||||
G_CALLBACK (gimp_double_adjustment_update),
|
||||
&mapvals.maxdepth);
|
||||
|
||||
spinbutton = gimp_spin_button_new (&adj, mapvals.pixeltreshold,
|
||||
spinbutton = spin_button_new (&adj, mapvals.pixeltreshold,
|
||||
0.001, 1000, 0.1, 1, 0, 0, 3);
|
||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
|
||||
_("_Threshold:"), 0.0, 0.5,
|
||||
@ -565,7 +592,7 @@ create_light_page (void)
|
||||
GtkWidget *combo;
|
||||
GtkWidget *colorbutton;
|
||||
GtkWidget *spinbutton;
|
||||
GtkObject *adj;
|
||||
GtkAdjustment *adj;
|
||||
|
||||
page = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (page), 12);
|
||||
@ -622,7 +649,7 @@ create_light_page (void)
|
||||
gtk_container_add (GTK_CONTAINER (pointlightwid), table);
|
||||
gtk_widget_show (table);
|
||||
|
||||
spinbutton = gimp_spin_button_new (&xadj, mapvals.lightsource.position.x,
|
||||
spinbutton = spin_button_new (&xadj, mapvals.lightsource.position.x,
|
||||
-G_MAXFLOAT, G_MAXFLOAT,
|
||||
0.1, 1.0, 0.0, 0.0, 2);
|
||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
|
||||
@ -636,7 +663,7 @@ create_light_page (void)
|
||||
gimp_help_set_help_data (spinbutton,
|
||||
_("Light source X position in XYZ space"), NULL);
|
||||
|
||||
spinbutton = gimp_spin_button_new (&yadj, mapvals.lightsource.position.y,
|
||||
spinbutton = spin_button_new (&yadj, mapvals.lightsource.position.y,
|
||||
-G_MAXFLOAT, G_MAXFLOAT,
|
||||
0.1, 1.0, 0.0, 0.0, 2);
|
||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
|
||||
@ -650,7 +677,7 @@ create_light_page (void)
|
||||
gimp_help_set_help_data (spinbutton,
|
||||
_("Light source Y position in XYZ space"), NULL);
|
||||
|
||||
spinbutton = gimp_spin_button_new (&zadj, mapvals.lightsource.position.z,
|
||||
spinbutton = spin_button_new (&zadj, mapvals.lightsource.position.z,
|
||||
-G_MAXFLOAT, G_MAXFLOAT,
|
||||
0.1, 1.0, 0.0, 0.0, 2);
|
||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 2,
|
||||
@ -677,7 +704,7 @@ create_light_page (void)
|
||||
gtk_container_add (GTK_CONTAINER (dirlightwid), table);
|
||||
gtk_widget_show (table);
|
||||
|
||||
spinbutton = gimp_spin_button_new (&adj, mapvals.lightsource.direction.x,
|
||||
spinbutton = spin_button_new (&adj, mapvals.lightsource.direction.x,
|
||||
-1.0, 1.0, 0.01, 0.1, 0.0, 0.0, 2);
|
||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
|
||||
_("X:"), 0.0, 0.5,
|
||||
@ -690,7 +717,7 @@ create_light_page (void)
|
||||
gimp_help_set_help_data (spinbutton,
|
||||
_("Light source X direction in XYZ space"), NULL);
|
||||
|
||||
spinbutton = gimp_spin_button_new (&adj, mapvals.lightsource.direction.y,
|
||||
spinbutton = spin_button_new (&adj, mapvals.lightsource.direction.y,
|
||||
-1.0, 1.0, 0.01, 0.1, 0.0, 0.0, 2);
|
||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
|
||||
_("Y:"), 0.0, 0.5,
|
||||
@ -703,7 +730,7 @@ create_light_page (void)
|
||||
gimp_help_set_help_data (spinbutton,
|
||||
_("Light source Y direction in XYZ space"), NULL);
|
||||
|
||||
spinbutton = gimp_spin_button_new (&adj, mapvals.lightsource.direction.z,
|
||||
spinbutton = spin_button_new (&adj, mapvals.lightsource.direction.z,
|
||||
-1.0, 1.0, 0.01, 0.1, 0.0, 0.0, 2);
|
||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 2,
|
||||
_("Z:"), 0.0, 0.5,
|
||||
@ -736,7 +763,7 @@ create_material_page (void)
|
||||
GtkWidget *hbox;
|
||||
GtkWidget *spinbutton;
|
||||
GtkWidget *image;
|
||||
GtkObject *adj;
|
||||
GtkAdjustment *adj;
|
||||
|
||||
page = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (page), 12);
|
||||
@ -764,7 +791,7 @@ create_material_page (void)
|
||||
image, 1, FALSE);
|
||||
gtk_size_group_add_widget (group, label);
|
||||
|
||||
spinbutton = gimp_spin_button_new (&adj, mapvals.material.ambient_int,
|
||||
spinbutton = spin_button_new (&adj, mapvals.material.ambient_int,
|
||||
0, G_MAXFLOAT, 0.1, 1.0, 0.0, 0.0, 2);
|
||||
gtk_table_attach (GTK_TABLE (table), spinbutton, 2, 3, 0, 1,
|
||||
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
|
||||
@ -793,7 +820,7 @@ create_material_page (void)
|
||||
image, 1, FALSE);
|
||||
gtk_size_group_add_widget (group, label);
|
||||
|
||||
spinbutton = gimp_spin_button_new (&adj, mapvals.material.diffuse_int,
|
||||
spinbutton = spin_button_new (&adj, mapvals.material.diffuse_int,
|
||||
0, G_MAXFLOAT, 0.1, 1.0, 0.0, 0.0, 2);
|
||||
gtk_table_attach (GTK_TABLE (table), spinbutton, 2, 3, 1, 2,
|
||||
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
|
||||
@ -836,7 +863,7 @@ create_material_page (void)
|
||||
image, 1, FALSE);
|
||||
gtk_size_group_add_widget (group, label);
|
||||
|
||||
spinbutton = gimp_spin_button_new (&adj, mapvals.material.diffuse_ref,
|
||||
spinbutton = spin_button_new (&adj, mapvals.material.diffuse_ref,
|
||||
0, G_MAXFLOAT, 0.1, 1.0, 0.0, 0.0, 2);
|
||||
gtk_table_attach (GTK_TABLE (table), spinbutton, 2, 3, 0, 1,
|
||||
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
|
||||
@ -865,7 +892,7 @@ create_material_page (void)
|
||||
image, 1, FALSE);
|
||||
gtk_size_group_add_widget (group, label);
|
||||
|
||||
spinbutton = gimp_spin_button_new (&adj, mapvals.material.specular_ref,
|
||||
spinbutton = spin_button_new (&adj, mapvals.material.specular_ref,
|
||||
0, G_MAXFLOAT, 0.1, 1.0, 0.0, 0.0, 2);
|
||||
gtk_table_attach (GTK_TABLE (table), spinbutton, 2, 3, 1, 2,
|
||||
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
|
||||
@ -894,7 +921,7 @@ create_material_page (void)
|
||||
image, 1, FALSE);
|
||||
gtk_size_group_add_widget (group, label);
|
||||
|
||||
spinbutton = gimp_spin_button_new (&adj, mapvals.material.highlight,
|
||||
spinbutton = spin_button_new (&adj, mapvals.material.highlight,
|
||||
0, G_MAXFLOAT, 0.1, 1.0, 0.0, 0.0, 2);
|
||||
gtk_table_attach (GTK_TABLE (table), spinbutton, 2, 3, 2, 3,
|
||||
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
|
||||
@ -932,7 +959,7 @@ create_orientation_page (void)
|
||||
GtkWidget *page;
|
||||
GtkWidget *frame;
|
||||
GtkWidget *table;
|
||||
GtkObject *adj;
|
||||
GtkAdjustment *adj;
|
||||
|
||||
page = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (page), 12);
|
||||
@ -947,7 +974,8 @@ create_orientation_page (void)
|
||||
gtk_container_add (GTK_CONTAINER (frame), table);
|
||||
gtk_widget_show (table);
|
||||
|
||||
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
|
||||
adj = (GtkAdjustment *)
|
||||
gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
|
||||
_("X:"), 0, 0,
|
||||
mapvals.position.x, -1.0, 2.0, 0.01, 0.1, 5,
|
||||
TRUE, 0, 0,
|
||||
@ -960,7 +988,8 @@ create_orientation_page (void)
|
||||
G_CALLBACK (double_adjustment_update),
|
||||
&mapvals.position.x);
|
||||
|
||||
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
|
||||
adj = (GtkAdjustment *)
|
||||
gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
|
||||
_("Y:"), 0, 0,
|
||||
mapvals.position.y, -1.0, 2.0, 0.01, 0.1, 5,
|
||||
TRUE, 0, 0,
|
||||
@ -973,7 +1002,8 @@ create_orientation_page (void)
|
||||
G_CALLBACK (double_adjustment_update),
|
||||
&mapvals.position.y);
|
||||
|
||||
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 2,
|
||||
adj = (GtkAdjustment *)
|
||||
gimp_scale_entry_new (GTK_TABLE (table), 0, 2,
|
||||
_("Z:"), 0, 0,
|
||||
mapvals.position.z, -1.0, 2.0, 0.01, 0.1, 5,
|
||||
TRUE, 0, 0,
|
||||
@ -996,7 +1026,8 @@ create_orientation_page (void)
|
||||
gtk_container_add (GTK_CONTAINER (frame), table);
|
||||
gtk_widget_show (table);
|
||||
|
||||
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
|
||||
adj = (GtkAdjustment *)
|
||||
gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
|
||||
_("X:"), 0, 0,
|
||||
mapvals.alpha, -180.0, 180.0, 1.0, 15.0, 1,
|
||||
TRUE, 0, 0,
|
||||
@ -1007,7 +1038,8 @@ create_orientation_page (void)
|
||||
G_CALLBACK (double_adjustment_update),
|
||||
&mapvals.alpha);
|
||||
|
||||
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
|
||||
adj = (GtkAdjustment *)
|
||||
gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
|
||||
_("Y:"), 0, 0,
|
||||
mapvals.beta, -180.0, 180.0, 1.0, 15.0, 1,
|
||||
TRUE, 0, 0,
|
||||
@ -1018,7 +1050,8 @@ create_orientation_page (void)
|
||||
G_CALLBACK (double_adjustment_update),
|
||||
&mapvals.beta);
|
||||
|
||||
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 2,
|
||||
adj = (GtkAdjustment *)
|
||||
gimp_scale_entry_new (GTK_TABLE (table), 0, 2,
|
||||
_("Z:"), 0, 0,
|
||||
mapvals.gamma, -180.0, 180.0, 1.0, 15.0, 1,
|
||||
TRUE, 0, 0,
|
||||
@ -1043,7 +1076,7 @@ create_box_page (void)
|
||||
GtkWidget *frame;
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *table;
|
||||
GtkObject *adj;
|
||||
GtkAdjustment *adj;
|
||||
gint i;
|
||||
|
||||
static gchar *labels[] =
|
||||
@ -1093,7 +1126,8 @@ create_box_page (void)
|
||||
gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
|
||||
gtk_widget_show (table);
|
||||
|
||||
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
|
||||
adj = (GtkAdjustment *)
|
||||
gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
|
||||
_("Scale X:"), 0, 0,
|
||||
mapvals.scale.x, 0.0, 5.0, 0.01, 0.1, 2,
|
||||
TRUE, 0, 0,
|
||||
@ -1105,7 +1139,8 @@ create_box_page (void)
|
||||
G_CALLBACK (double_adjustment_update),
|
||||
&mapvals.scale.x);
|
||||
|
||||
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
|
||||
adj = (GtkAdjustment *)
|
||||
gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
|
||||
_("Y:"), 0, 0,
|
||||
mapvals.scale.y, 0.0, 5.0, 0.01, 0.1, 2,
|
||||
TRUE, 0, 0,
|
||||
@ -1117,7 +1152,8 @@ create_box_page (void)
|
||||
G_CALLBACK (double_adjustment_update),
|
||||
&mapvals.scale.y);
|
||||
|
||||
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 2,
|
||||
adj = (GtkAdjustment *)
|
||||
gimp_scale_entry_new (GTK_TABLE (table), 0, 2,
|
||||
_("Z:"), 0, 0,
|
||||
mapvals.scale.z, 0.0, 5.0, 0.01, 0.1, 2,
|
||||
TRUE, 0, 0,
|
||||
@ -1141,7 +1177,7 @@ create_cylinder_page (void)
|
||||
GtkWidget *page;
|
||||
GtkWidget *frame;
|
||||
GtkWidget *table;
|
||||
GtkObject *adj;
|
||||
GtkAdjustment *adj;
|
||||
gint i;
|
||||
|
||||
static const gchar *labels[] = { N_("_Top:"), N_("_Bottom:") };
|
||||
@ -1188,7 +1224,8 @@ create_cylinder_page (void)
|
||||
gtk_container_add (GTK_CONTAINER (frame), table);
|
||||
gtk_widget_show (table);
|
||||
|
||||
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
|
||||
adj = (GtkAdjustment *)
|
||||
gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
|
||||
_("R_adius:"), 0, 0,
|
||||
mapvals.cylinder_radius,
|
||||
0.0, 2.0, 0.01, 0.1, 2,
|
||||
@ -1202,7 +1239,8 @@ create_cylinder_page (void)
|
||||
G_CALLBACK (double_adjustment_update),
|
||||
&mapvals.cylinder_radius);
|
||||
|
||||
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
|
||||
adj = (GtkAdjustment *)
|
||||
gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
|
||||
_("L_ength:"), 0, 0,
|
||||
mapvals.cylinder_length,
|
||||
0.0, 2.0, 0.01, 0.1, 2,
|
||||
|
Reference in New Issue
Block a user