don't redefine the GimpParasite struct, just use it.

2007-04-12  Sven Neumann  <sven@gimp.org>

	* libgimpbase/gimpprotocol.[ch] (struct _GPParam): don't redefine
	the GimpParasite struct, just use it.

	* libgimp/gimp.c: include gimpparasite.h.

	* libgimp/gimpitemcombobox.c (gimp_item_combo_box_new): initialize
	combo_box_type to suppress a compiler warning.

	* libgimpwidgets/gimpmemsizeentry.c (gimp_memsize_entry_new):
	avoid dereferencing a type-punned pointer.


svn path=/trunk/; revision=22237
This commit is contained in:
Sven Neumann 2007-04-12 14:32:44 +00:00 committed by Sven Neumann
parent 98af3d8c0e
commit fb095cf281
6 changed files with 43 additions and 33 deletions

View File

@ -1,3 +1,16 @@
2007-04-12 Sven Neumann <sven@gimp.org>
* libgimpbase/gimpprotocol.[ch] (struct _GPParam): don't redefine
the GimpParasite struct, just use it.
* libgimp/gimp.c: include gimpparasite.h.
* libgimp/gimpitemcombobox.c (gimp_item_combo_box_new): initialize
combo_box_type to suppress a compiler warning.
* libgimpwidgets/gimpmemsizeentry.c (gimp_memsize_entry_new):
avoid dereferencing a type-punned pointer.
2007-04-11 Jakub Steiner <jimmac@ximian.com>
* themes/Default/images/stock-display-filter-contrast-24.svg
@ -16,8 +29,8 @@
* themes/Default/images/stock-display-filter-gamma-24.png
* themes/Default/images/stock-display-filter-gamma-16.svg
* themes/Default/images/stock-display-filter-gamma-16.png: how
could I have gone to LGM with a straight face without finishing
these?
could I have gone to LGM with a straight face without finishing
these?
2007-04-11 Sven Neumann <sven@gimp.org>

View File

@ -97,6 +97,7 @@
#include "libgimpbase/gimpbase-private.h"
#include "libgimpbase/gimpenv.h"
#include "libgimpbase/gimpparasite.h"
#include "libgimpbase/gimpprotocol.h"
#include "libgimpbase/gimpwire.h"

View File

@ -315,7 +315,7 @@ gimp_item_combo_box_new (GimpComboBoxType type,
GimpItemConstraintFunc constraint,
gpointer data)
{
GType combo_box_type;
GType combo_box_type = G_TYPE_NONE;
GtkWidget *combo_box;
GtkTreeModel *model;
GtkTreeIter iter;

View File

@ -1680,7 +1680,7 @@ _gp_params_write (GIOChannel *channel,
case GIMP_PDB_PARASITE:
{
GimpParasite *p = (GimpParasite *) &params[i].data.d_parasite;
GimpParasite *p = &params[i].data.d_parasite;
if (p->name == NULL)
{

View File

@ -109,17 +109,17 @@ struct _GPParam
union
{
gint32 d_int32;
gint16 d_int16;
guint8 d_int8;
gdouble d_float;
gchar *d_string;
gint32 *d_int32array;
gint16 *d_int16array;
guint8 *d_int8array;
gdouble *d_floatarray;
gchar **d_stringarray;
GimpRGB d_color;
gint32 d_int32;
gint16 d_int16;
guint8 d_int8;
gdouble d_float;
gchar *d_string;
gint32 *d_int32array;
gint16 *d_int16array;
guint8 *d_int8array;
gdouble *d_floatarray;
gchar **d_stringarray;
GimpRGB d_color;
struct
{
gint32 x;
@ -127,23 +127,17 @@ struct _GPParam
gint32 width;
gint32 height;
} d_region;
gint32 d_display;
gint32 d_image;
gint32 d_layer;
gint32 d_channel;
gint32 d_drawable;
gint32 d_selection;
gint32 d_boundary;
gint32 d_path; /* deprecated */
gint32 d_vectors;
struct
{
gchar *name;
guint32 flags;
guint32 size;
gpointer data;
} d_parasite;
gint32 d_status;
gint32 d_display;
gint32 d_image;
gint32 d_layer;
gint32 d_channel;
gint32 d_drawable;
gint32 d_selection;
gint32 d_boundary;
gint32 d_path; /* deprecated */
gint32 d_vectors;
gint32 d_status;
GimpParasite d_parasite;
} data;
};

View File

@ -157,6 +157,7 @@ gimp_memsize_entry_new (guint64 value,
guint64 upper)
{
GimpMemsizeEntry *entry;
GtkObject *adj;
guint shift;
#if _MSC_VER < 1300
@ -181,7 +182,7 @@ gimp_memsize_entry_new (guint64 value,
entry->upper = upper;
entry->shift = shift;
entry->spinbutton = gimp_spin_button_new ((GtkObject **) &entry->adjustment,
entry->spinbutton = gimp_spin_button_new (&adj,
CAST (value >> shift),
CAST (lower >> shift),
CAST (upper >> shift),
@ -189,6 +190,7 @@ gimp_memsize_entry_new (guint64 value,
#undef CAST
entry->adjustment = GTK_ADJUSTMENT (adj);
g_object_ref_sink (entry->adjustment);
gtk_entry_set_width_chars (GTK_ENTRY (entry->spinbutton), 10);