summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--ChangeLog.pre-2-08
-rw-r--r--ChangeLog.pre-2-108
-rw-r--r--ChangeLog.pre-2-28
-rw-r--r--ChangeLog.pre-2-48
-rw-r--r--ChangeLog.pre-2-68
-rw-r--r--ChangeLog.pre-2-88
-rw-r--r--gdk/gdk.c6
-rw-r--r--gdk/gdkinput.c4
-rw-r--r--gdk/gdkrgb.c10
-rw-r--r--gdk/gdkvisual.c10
-rw-r--r--gdk/gdkwindow.c4
-rw-r--r--gdk/x11/gdkinput.c4
-rw-r--r--gdk/x11/gdkmain-x11.c6
-rw-r--r--gdk/x11/gdkvisual-x11.c10
-rw-r--r--gdk/x11/gdkwindow-x11.c4
-rw-r--r--gtk/gtkaccelgroup.c4
-rw-r--r--gtk/gtkaccellabel.c2
-rw-r--r--gtk/gtkadjustment.c2
-rw-r--r--gtk/gtkalignment.c2
-rw-r--r--gtk/gtkarrow.c2
-rw-r--r--gtk/gtkaspectframe.c2
-rw-r--r--gtk/gtkbbox.c2
-rw-r--r--gtk/gtkbin.c2
-rw-r--r--gtk/gtkbox.c2
-rw-r--r--gtk/gtkbutton.c2
-rw-r--r--gtk/gtkcalendar.c6
-rw-r--r--gtk/gtkcheckbutton.c2
-rw-r--r--gtk/gtkcheckmenuitem.c2
-rw-r--r--gtk/gtkclist.c2
-rw-r--r--gtk/gtkcolorsel.c6
-rw-r--r--gtk/gtkcombo.c2
-rw-r--r--gtk/gtkcontainer.c2
-rw-r--r--gtk/gtkctree.c2
-rw-r--r--gtk/gtkcurve.c2
-rw-r--r--gtk/gtkdata.c2
-rw-r--r--gtk/gtkdialog.c2
-rw-r--r--gtk/gtkdnd.c4
-rw-r--r--gtk/gtkdrawingarea.c2
-rw-r--r--gtk/gtkdrawwindow.c2
-rw-r--r--gtk/gtkeditable.c6
-rw-r--r--gtk/gtkentry.c6
-rw-r--r--gtk/gtkeventbox.c2
-rw-r--r--gtk/gtkfilesel.c11
-rw-r--r--gtk/gtkfixed.c2
-rw-r--r--gtk/gtkfontsel.c12
-rw-r--r--gtk/gtkframe.c2
-rw-r--r--gtk/gtkgamma.c4
-rw-r--r--gtk/gtkhandlebox.c2
-rw-r--r--gtk/gtkhbbox.c2
-rw-r--r--gtk/gtkhbox.c2
-rw-r--r--gtk/gtkhpaned.c2
-rw-r--r--gtk/gtkhruler.c2
-rw-r--r--gtk/gtkhscale.c2
-rw-r--r--gtk/gtkhscrollbar.c2
-rw-r--r--gtk/gtkhseparator.c2
-rw-r--r--gtk/gtkimage.c2
-rw-r--r--gtk/gtkinputdialog.c4
-rw-r--r--gtk/gtkinvisible.c2
-rw-r--r--gtk/gtkitem.c2
-rw-r--r--gtk/gtkitemfactory.c2
-rw-r--r--gtk/gtklabel.c2
-rw-r--r--gtk/gtklayout.c2
-rw-r--r--gtk/gtklist.c2
-rw-r--r--gtk/gtklistitem.c2
-rw-r--r--gtk/gtkmain.c2
-rw-r--r--gtk/gtkmenu.c2
-rw-r--r--gtk/gtkmenubar.c2
-rw-r--r--gtk/gtkmenuitem.c2
-rw-r--r--gtk/gtkmenushell.c2
-rw-r--r--gtk/gtkmisc.c2
-rw-r--r--gtk/gtknotebook.c2
-rw-r--r--gtk/gtkobject.c4
-rw-r--r--gtk/gtkoptionmenu.c2
-rw-r--r--gtk/gtkpacker.c2
-rw-r--r--gtk/gtkpaned.c2
-rw-r--r--gtk/gtkpixmap.c2
-rw-r--r--gtk/gtkplug.c2
-rw-r--r--gtk/gtkpreview.c2
-rw-r--r--gtk/gtkprogress.c2
-rw-r--r--gtk/gtkprogressbar.c2
-rw-r--r--gtk/gtkradiobutton.c2
-rw-r--r--gtk/gtkradiomenuitem.c2
-rw-r--r--gtk/gtkrange.c2
-rw-r--r--gtk/gtkrc.c6
-rw-r--r--gtk/gtkruler.c4
-rw-r--r--gtk/gtkscale.c2
-rw-r--r--gtk/gtkscrollbar.c2
-rw-r--r--gtk/gtkscrolledwindow.c2
-rw-r--r--gtk/gtkseparator.c2
-rw-r--r--gtk/gtksocket.c2
-rw-r--r--gtk/gtkspinbutton.c2
-rw-r--r--gtk/gtkstatusbar.c2
-rw-r--r--gtk/gtkstyle.c2
-rw-r--r--gtk/gtktable.c2
-rw-r--r--gtk/gtktearoffmenuitem.c2
-rw-r--r--gtk/gtktext.c6
-rw-r--r--gtk/gtktipsquery.c2
-rw-r--r--gtk/gtktogglebutton.c2
-rw-r--r--gtk/gtktoolbar.c2
-rw-r--r--gtk/gtktooltips.c2
-rw-r--r--gtk/gtktree.c2
-rw-r--r--gtk/gtktreeitem.c2
-rw-r--r--gtk/gtktypeutils.c8
-rw-r--r--gtk/gtktypeutils.h4
-rw-r--r--gtk/gtkvbbox.c2
-rw-r--r--gtk/gtkvbox.c2
-rw-r--r--gtk/gtkviewport.c2
-rw-r--r--gtk/gtkvpaned.c2
-rw-r--r--gtk/gtkvruler.c2
-rw-r--r--gtk/gtkvscale.c2
-rw-r--r--gtk/gtkvscrollbar.c2
-rw-r--r--gtk/gtkvseparator.c2
-rw-r--r--gtk/gtkwidget.c2
-rw-r--r--gtk/gtkwindow.c2
-rwxr-xr-xgtk/makeenums.pl2
116 files changed, 217 insertions, 160 deletions
diff --git a/ChangeLog b/ChangeLog
index f1e5b7bb5f..085321de5b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+1998-11-30 Elliot Lee <sopwith@cuc.ml.org>
+
+ * {gdk,gtk}/*.c: Make read-only data structures "static const" to
+ allow them to be shared, mainly including (but not limited to) the
+ GtkTypeInfo structures for each class.
+
+ * gtk/gtkfilesel.c: Add /net to the "leave me alone" directory listing.
+
Mon Nov 30 12:17:10 1998 Jeff Garzik <jgarzik@pobox.com>
* gtk/gtknotebook.c (gtk_notebook_reorder_child):
diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0
index f1e5b7bb5f..085321de5b 100644
--- a/ChangeLog.pre-2-0
+++ b/ChangeLog.pre-2-0
@@ -1,3 +1,11 @@
+1998-11-30 Elliot Lee <sopwith@cuc.ml.org>
+
+ * {gdk,gtk}/*.c: Make read-only data structures "static const" to
+ allow them to be shared, mainly including (but not limited to) the
+ GtkTypeInfo structures for each class.
+
+ * gtk/gtkfilesel.c: Add /net to the "leave me alone" directory listing.
+
Mon Nov 30 12:17:10 1998 Jeff Garzik <jgarzik@pobox.com>
* gtk/gtknotebook.c (gtk_notebook_reorder_child):
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index f1e5b7bb5f..085321de5b 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,11 @@
+1998-11-30 Elliot Lee <sopwith@cuc.ml.org>
+
+ * {gdk,gtk}/*.c: Make read-only data structures "static const" to
+ allow them to be shared, mainly including (but not limited to) the
+ GtkTypeInfo structures for each class.
+
+ * gtk/gtkfilesel.c: Add /net to the "leave me alone" directory listing.
+
Mon Nov 30 12:17:10 1998 Jeff Garzik <jgarzik@pobox.com>
* gtk/gtknotebook.c (gtk_notebook_reorder_child):
diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2
index f1e5b7bb5f..085321de5b 100644
--- a/ChangeLog.pre-2-2
+++ b/ChangeLog.pre-2-2
@@ -1,3 +1,11 @@
+1998-11-30 Elliot Lee <sopwith@cuc.ml.org>
+
+ * {gdk,gtk}/*.c: Make read-only data structures "static const" to
+ allow them to be shared, mainly including (but not limited to) the
+ GtkTypeInfo structures for each class.
+
+ * gtk/gtkfilesel.c: Add /net to the "leave me alone" directory listing.
+
Mon Nov 30 12:17:10 1998 Jeff Garzik <jgarzik@pobox.com>
* gtk/gtknotebook.c (gtk_notebook_reorder_child):
diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4
index f1e5b7bb5f..085321de5b 100644
--- a/ChangeLog.pre-2-4
+++ b/ChangeLog.pre-2-4
@@ -1,3 +1,11 @@
+1998-11-30 Elliot Lee <sopwith@cuc.ml.org>
+
+ * {gdk,gtk}/*.c: Make read-only data structures "static const" to
+ allow them to be shared, mainly including (but not limited to) the
+ GtkTypeInfo structures for each class.
+
+ * gtk/gtkfilesel.c: Add /net to the "leave me alone" directory listing.
+
Mon Nov 30 12:17:10 1998 Jeff Garzik <jgarzik@pobox.com>
* gtk/gtknotebook.c (gtk_notebook_reorder_child):
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index f1e5b7bb5f..085321de5b 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,3 +1,11 @@
+1998-11-30 Elliot Lee <sopwith@cuc.ml.org>
+
+ * {gdk,gtk}/*.c: Make read-only data structures "static const" to
+ allow them to be shared, mainly including (but not limited to) the
+ GtkTypeInfo structures for each class.
+
+ * gtk/gtkfilesel.c: Add /net to the "leave me alone" directory listing.
+
Mon Nov 30 12:17:10 1998 Jeff Garzik <jgarzik@pobox.com>
* gtk/gtknotebook.c (gtk_notebook_reorder_child):
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index f1e5b7bb5f..085321de5b 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,11 @@
+1998-11-30 Elliot Lee <sopwith@cuc.ml.org>
+
+ * {gdk,gtk}/*.c: Make read-only data structures "static const" to
+ allow them to be shared, mainly including (but not limited to) the
+ GtkTypeInfo structures for each class.
+
+ * gtk/gtkfilesel.c: Add /net to the "leave me alone" directory listing.
+
Mon Nov 30 12:17:10 1998 Jeff Garzik <jgarzik@pobox.com>
* gtk/gtknotebook.c (gtk_notebook_reorder_child):
diff --git a/gdk/gdk.c b/gdk/gdk.c
index 36e0fb1438..f504ea313a 100644
--- a/gdk/gdk.c
+++ b/gdk/gdk.c
@@ -229,7 +229,7 @@ static gulong base_id;
static gint autorepeat;
#ifdef G_ENABLE_DEBUG
-static GDebugKey gdk_debug_keys[] = {
+static const GDebugKey gdk_debug_keys[] = {
{"events", GDK_DEBUG_EVENTS},
{"misc", GDK_DEBUG_MISC},
{"dnd", GDK_DEBUG_DND},
@@ -1504,8 +1504,8 @@ gdk_pointer_grab (GdkWindow * window,
guint32 time)
{
/* From gdkwindow.c */
- extern int nevent_masks;
- extern int event_mask_table[];
+ extern const int nevent_masks;
+ extern const int event_mask_table[];
gint return_val;
GdkWindowPrivate *window_private;
diff --git a/gdk/gdkinput.c b/gdk/gdkinput.c
index c0f199fae9..a11da09f22 100644
--- a/gdk/gdkinput.c
+++ b/gdk/gdkinput.c
@@ -38,9 +38,9 @@ static GdkDevicePrivate *gdk_input_find_device (guint32 id);
/* Incorporate the specific routines depending on compilation options */
-static GdkAxisUse gdk_input_core_axes[] = { GDK_AXIS_X, GDK_AXIS_Y };
+static const GdkAxisUse gdk_input_core_axes[] = { GDK_AXIS_X, GDK_AXIS_Y };
-static GdkDeviceInfo gdk_input_core_info =
+static const GdkDeviceInfo gdk_input_core_info =
{
GDK_CORE_POINTER,
"Core Pointer",
diff --git a/gdk/gdkrgb.c b/gdk/gdkrgb.c
index ad124457a8..818b29f3df 100644
--- a/gdk/gdkrgb.c
+++ b/gdk/gdkrgb.c
@@ -304,7 +304,7 @@ gdk_rgb_try_colormap (gint nr, gint ng, gint nb)
static gboolean
gdk_rgb_do_colormaps (void)
{
- const gint sizes[][3] = {
+ static const gint sizes[][3] = {
/* { 6, 7, 6 }, */
{ 6, 6, 6 },
{ 6, 6, 5 },
@@ -316,7 +316,7 @@ gdk_rgb_do_colormaps (void)
{ 3, 3, 3 },
{ 2, 2, 2 }
};
- const gint n_sizes = sizeof(sizes) / (3 * sizeof(gint));
+ static const gint n_sizes = sizeof(sizes) / (3 * sizeof(gint));
gint i;
for (i = 0; i < n_sizes; i++)
@@ -387,7 +387,7 @@ static guint32
gdk_rgb_score_visual (GdkVisual *visual)
{
guint32 quality, speed, sys, pseudo;
- gchar* visual_names[] =
+ static const gchar* visual_names[] =
{
"static gray",
"grayscale",
@@ -535,7 +535,7 @@ void
gdk_rgb_init (void)
{
gint i;
- gint byte_order[1] = { 1 };
+ static const gint byte_order[1] = { 1 };
/* check endian sanity */
#if G_BYTE_ORDER == G_BIG_ENDIAN
@@ -982,7 +982,7 @@ static const guchar DM[128][128] =
#define DM_WIDTH 8
#define DM_WIDTH_SHIFT 3
#define DM_HEIGHT 8
-static guchar DM[8][8] =
+static const guchar DM[8][8] =
{
{ 0, 32, 8, 40, 2, 34, 10, 42 },
{ 48, 16, 56, 24, 50, 18, 58, 26 },
diff --git a/gdk/gdkvisual.c b/gdk/gdkvisual.c
index 693020ef61..ebdcccb127 100644
--- a/gdk/gdkvisual.c
+++ b/gdk/gdkvisual.c
@@ -44,7 +44,7 @@ static gint navailable_types;
#ifdef G_ENABLE_DEBUG
-static gchar* visual_names[] =
+static const gchar* visual_names[] =
{
"static gray",
"grayscale",
@@ -61,8 +61,8 @@ static GHashTable *visual_hash = NULL;
void
gdk_visual_init (void)
{
- static gint possible_depths[7] = { 32, 24, 16, 15, 8, 4, 1 };
- static GdkVisualType possible_types[6] =
+ static const gint possible_depths[7] = { 32, 24, 16, 15, 8, 4, 1 };
+ static const GdkVisualType possible_types[6] =
{
GDK_VISUAL_DIRECT_COLOR,
GDK_VISUAL_TRUE_COLOR,
@@ -72,8 +72,8 @@ gdk_visual_init (void)
GDK_VISUAL_STATIC_GRAY
};
- static gint npossible_depths = 7;
- static gint npossible_types = 6;
+ static const gint npossible_depths = sizeof(possible_depths)/sizeof(gint);
+ static const gint npossible_types = sizeof(possible_types)/sizeof(GdkVisualType);
XVisualInfo *visual_list;
XVisualInfo visual_template;
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 09399dcf1a..c8a42595ed 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -33,8 +33,7 @@
#include <X11/extensions/shape.h>
#endif
-int nevent_masks = 20;
-int event_mask_table[20] =
+const int event_mask_table[20] =
{
ExposureMask,
PointerMotionMask,
@@ -57,6 +56,7 @@ int event_mask_table[20] =
0, /* PROXIMTY_OUT */
SubstructureNotifyMask
};
+const int nevent_masks = sizeof(event_mask_table)/sizeof(int);
static gboolean gdk_window_have_shape_ext (void);
diff --git a/gdk/x11/gdkinput.c b/gdk/x11/gdkinput.c
index c0f199fae9..a11da09f22 100644
--- a/gdk/x11/gdkinput.c
+++ b/gdk/x11/gdkinput.c
@@ -38,9 +38,9 @@ static GdkDevicePrivate *gdk_input_find_device (guint32 id);
/* Incorporate the specific routines depending on compilation options */
-static GdkAxisUse gdk_input_core_axes[] = { GDK_AXIS_X, GDK_AXIS_Y };
+static const GdkAxisUse gdk_input_core_axes[] = { GDK_AXIS_X, GDK_AXIS_Y };
-static GdkDeviceInfo gdk_input_core_info =
+static const GdkDeviceInfo gdk_input_core_info =
{
GDK_CORE_POINTER,
"Core Pointer",
diff --git a/gdk/x11/gdkmain-x11.c b/gdk/x11/gdkmain-x11.c
index 36e0fb1438..f504ea313a 100644
--- a/gdk/x11/gdkmain-x11.c
+++ b/gdk/x11/gdkmain-x11.c
@@ -229,7 +229,7 @@ static gulong base_id;
static gint autorepeat;
#ifdef G_ENABLE_DEBUG
-static GDebugKey gdk_debug_keys[] = {
+static const GDebugKey gdk_debug_keys[] = {
{"events", GDK_DEBUG_EVENTS},
{"misc", GDK_DEBUG_MISC},
{"dnd", GDK_DEBUG_DND},
@@ -1504,8 +1504,8 @@ gdk_pointer_grab (GdkWindow * window,
guint32 time)
{
/* From gdkwindow.c */
- extern int nevent_masks;
- extern int event_mask_table[];
+ extern const int nevent_masks;
+ extern const int event_mask_table[];
gint return_val;
GdkWindowPrivate *window_private;
diff --git a/gdk/x11/gdkvisual-x11.c b/gdk/x11/gdkvisual-x11.c
index 693020ef61..ebdcccb127 100644
--- a/gdk/x11/gdkvisual-x11.c
+++ b/gdk/x11/gdkvisual-x11.c
@@ -44,7 +44,7 @@ static gint navailable_types;
#ifdef G_ENABLE_DEBUG
-static gchar* visual_names[] =
+static const gchar* visual_names[] =
{
"static gray",
"grayscale",
@@ -61,8 +61,8 @@ static GHashTable *visual_hash = NULL;
void
gdk_visual_init (void)
{
- static gint possible_depths[7] = { 32, 24, 16, 15, 8, 4, 1 };
- static GdkVisualType possible_types[6] =
+ static const gint possible_depths[7] = { 32, 24, 16, 15, 8, 4, 1 };
+ static const GdkVisualType possible_types[6] =
{
GDK_VISUAL_DIRECT_COLOR,
GDK_VISUAL_TRUE_COLOR,
@@ -72,8 +72,8 @@ gdk_visual_init (void)
GDK_VISUAL_STATIC_GRAY
};
- static gint npossible_depths = 7;
- static gint npossible_types = 6;
+ static const gint npossible_depths = sizeof(possible_depths)/sizeof(gint);
+ static const gint npossible_types = sizeof(possible_types)/sizeof(GdkVisualType);
XVisualInfo *visual_list;
XVisualInfo visual_template;
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index 09399dcf1a..c8a42595ed 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -33,8 +33,7 @@
#include <X11/extensions/shape.h>
#endif
-int nevent_masks = 20;
-int event_mask_table[20] =
+const int event_mask_table[20] =
{
ExposureMask,
PointerMotionMask,
@@ -57,6 +56,7 @@ int event_mask_table[20] =
0, /* PROXIMTY_OUT */
SubstructureNotifyMask
};
+const int nevent_masks = sizeof(event_mask_table)/sizeof(int);
static gboolean gdk_window_have_shape_ext (void);
diff --git a/gtk/gtkaccelgroup.c b/gtk/gtkaccelgroup.c
index 06d2cc37ff..f929912fbe 100644
--- a/gtk/gtkaccelgroup.c
+++ b/gtk/gtkaccelgroup.c
@@ -702,7 +702,7 @@ gboolean
gtk_accelerator_valid (guint keyval,
GdkModifierType modifiers)
{
- guint invalid_accelerator_vals[] = {
+ static const guint invalid_accelerator_vals[] = {
GDK_BackSpace, GDK_Delete, GDK_KP_Delete,
GDK_Shift_L, GDK_Shift_R, GDK_Shift_Lock, GDK_Caps_Lock, GDK_ISO_Lock,
GDK_Control_L, GDK_Control_R, GDK_Meta_L, GDK_Meta_R,
@@ -880,7 +880,7 @@ gtk_accelerator_parse (const gchar *accelerator,
}
else if (len >= 6 && is_modx (accelerator))
{
- guint mod_vals[] = {
+ static const guint mod_vals[] = {
GDK_MOD1_MASK, GDK_MOD2_MASK, GDK_MOD3_MASK,
GDK_MOD4_MASK, GDK_MOD5_MASK
};
diff --git a/gtk/gtkaccellabel.c b/gtk/gtkaccellabel.c
index 11933d03e5..e546d4c0b6 100644
--- a/gtk/gtkaccellabel.c
+++ b/gtk/gtkaccellabel.c
@@ -57,7 +57,7 @@ gtk_accel_label_get_type (void)
if (!accel_label_type)
{
- GtkTypeInfo accel_label_info =
+ static const GtkTypeInfo accel_label_info =
{
"GtkAccelLabel",
sizeof (GtkAccelLabel),
diff --git a/gtk/gtkadjustment.c b/gtk/gtkadjustment.c
index 03c09c537f..b2c463c2d6 100644
--- a/gtk/gtkadjustment.c
+++ b/gtk/gtkadjustment.c
@@ -41,7 +41,7 @@ gtk_adjustment_get_type (void)
if (!adjustment_type)
{
- GtkTypeInfo adjustment_info =
+ static const GtkTypeInfo adjustment_info =
{
"GtkAdjustment",
sizeof (GtkAdjustment),
diff --git a/gtk/gtkalignment.c b/gtk/gtkalignment.c
index 7f075861bf..77e0656733 100644
--- a/gtk/gtkalignment.c
+++ b/gtk/gtkalignment.c
@@ -50,7 +50,7 @@ gtk_alignment_get_type (void)
if (!alignment_type)
{
- GtkTypeInfo alignment_info =
+ static const GtkTypeInfo alignment_info =
{
"GtkAlignment",
sizeof (GtkAlignment),
diff --git a/gtk/gtkarrow.c b/gtk/gtkarrow.c
index e70f649368..985618b775 100644
--- a/gtk/gtkarrow.c
+++ b/gtk/gtkarrow.c
@@ -47,7 +47,7 @@ gtk_arrow_get_type (void)
if (!arrow_type)
{
- GtkTypeInfo arrow_info =
+ static const GtkTypeInfo arrow_info =
{
"GtkArrow",
sizeof (GtkArrow),
diff --git a/gtk/gtkaspectframe.c b/gtk/gtkaspectframe.c
index 2472e8b2aa..ba017614c7 100644
--- a/gtk/gtkaspectframe.c
+++ b/gtk/gtkaspectframe.c
@@ -44,7 +44,7 @@ gtk_aspect_frame_get_type (void)
if (!aspect_frame_type)
{
- GtkTypeInfo aspect_frame_info =
+ static const GtkTypeInfo aspect_frame_info =
{
"GtkAspectFrame",
sizeof (GtkAspectFrame),
diff --git a/gtk/gtkbbox.c b/gtk/gtkbbox.c
index 0c510095d2..18c8b17ff0 100644
--- a/gtk/gtkbbox.c
+++ b/gtk/gtkbbox.c
@@ -36,7 +36,7 @@ gtk_button_box_get_type (void)
if (!button_box_type)
{
- GtkTypeInfo button_box_info =
+ static const GtkTypeInfo button_box_info =
{
"GtkButtonBox",
sizeof (GtkButtonBox),
diff --git a/gtk/gtkbin.c b/gtk/gtkbin.c
index feff474b68..30d60fbc34 100644
--- a/gtk/gtkbin.c
+++ b/gtk/gtkbin.c
@@ -48,7 +48,7 @@ gtk_bin_get_type (void)
if (!bin_type)
{
- GtkTypeInfo bin_info =
+ static const GtkTypeInfo bin_info =
{
"GtkBin",
sizeof (GtkBin),
diff --git a/gtk/gtkbox.c b/gtk/gtkbox.c
index cfc06220f7..77a5ce4e6e 100644
--- a/gtk/gtkbox.c
+++ b/gtk/gtkbox.c
@@ -76,7 +76,7 @@ gtk_box_get_type (void)
if (!box_type)
{
- GtkTypeInfo box_info =
+ static const GtkTypeInfo box_info =
{
"GtkBox",
sizeof (GtkBox),
diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c
index 7ea658af2c..fcc6cca46a 100644
--- a/gtk/gtkbutton.c
+++ b/gtk/gtkbutton.c
@@ -100,7 +100,7 @@ gtk_button_get_type (void)
if (!button_type)
{
- GtkTypeInfo button_info =
+ static const GtkTypeInfo button_info =
{
"GtkButton",
sizeof (GtkButton),
diff --git a/gtk/gtkcalendar.c b/gtk/gtkcalendar.c
index 078618f53d..33147b3b89 100644
--- a/gtk/gtkcalendar.c
+++ b/gtk/gtkcalendar.c
@@ -43,13 +43,13 @@ typedef enum { false = FALSE , true = TRUE } boolean;
#define and && /* logical (boolean) operators: lower case */
#define or ||
-static N_int month_length[2][13] =
+static const N_int month_length[2][13] =
{
{ 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 },
{ 0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
};
-static N_int days_in_months[2][14] =
+static const N_int days_in_months[2][14] =
{
{ 0, 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 },
{ 0, 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 }
@@ -313,7 +313,7 @@ gtk_calendar_get_type (void)
if (!calendar_type)
{
- GtkTypeInfo calendar_info =
+ static const GtkTypeInfo calendar_info =
{
"GtkCalendar",
sizeof (GtkCalendar),
diff --git a/gtk/gtkcheckbutton.c b/gtk/gtkcheckbutton.c
index 3560b422d5..c064cf0a92 100644
--- a/gtk/gtkcheckbutton.c
+++ b/gtk/gtkcheckbutton.c
@@ -52,7 +52,7 @@ gtk_check_button_get_type (void)
if (!check_button_type)
{
- GtkTypeInfo check_button_info =
+ static const GtkTypeInfo check_button_info =
{
"GtkCheckButton",
sizeof (GtkCheckButton),
diff --git a/gtk/gtkcheckmenuitem.c b/gtk/gtkcheckmenuitem.c
index 6db3c8040f..71feaa59c4 100644
--- a/gtk/gtkcheckmenuitem.c
+++ b/gtk/gtkcheckmenuitem.c
@@ -54,7 +54,7 @@ gtk_check_menu_item_get_type (void)
if (!check_menu_item_type)
{
- GtkTypeInfo check_menu_item_info =
+ static const GtkTypeInfo check_menu_item_info =
{
"GtkCheckMenuItem",
sizeof (GtkCheckMenuItem),
diff --git a/gtk/gtkclist.c b/gtk/gtkclist.c
index d54dc4c412..445964cc4c 100644
--- a/gtk/gtkclist.c
+++ b/gtk/gtkclist.c
@@ -396,7 +396,7 @@ gtk_clist_get_type (void)
if (!clist_type)
{
- GtkTypeInfo clist_info =
+ static const GtkTypeInfo clist_info =
{
"GtkCList",
sizeof (GtkCList),
diff --git a/gtk/gtkcolorsel.c b/gtk/gtkcolorsel.c
index 673a962e28..894f3b86db 100644
--- a/gtk/gtkcolorsel.c
+++ b/gtk/gtkcolorsel.c
@@ -196,7 +196,7 @@ static const gchar *value_index_key = "gtk-value-index";
#define SF GtkSignalFunc
-scale_val_type scale_vals[NUM_CHANNELS] =
+static const scale_val_type scale_vals[NUM_CHANNELS] =
{
{"Hue:", 0.0, 360.0, 1.00, 10.00, (SF) gtk_color_selection_hsv_updater},
{"Saturation:", 0.0, 1.0, 0.01, 0.01, (SF) gtk_color_selection_hsv_updater},
@@ -214,7 +214,7 @@ gtk_color_selection_get_type (void)
if (!color_selection_type)
{
- GtkTypeInfo colorsel_info =
+ static const GtkTypeInfo colorsel_info =
{
"GtkColorSelection",
sizeof (GtkColorSelection),
@@ -517,7 +517,7 @@ gtk_color_selection_realize (GtkWidget *widget)
{
GtkColorSelection *colorsel;
- GtkTargetEntry targets[] = {
+ static const GtkTargetEntry targets[] = {
{ "application/x-color", 0 }
};
diff --git a/gtk/gtkcombo.c b/gtk/gtkcombo.c
index 4bd9604f98..f26f0a59cb 100644
--- a/gtk/gtkcombo.c
+++ b/gtk/gtkcombo.c
@@ -725,7 +725,7 @@ gtk_combo_get_type (void)
if (!combo_type)
{
- GtkTypeInfo combo_info =
+ static const GtkTypeInfo combo_info =
{
"GtkCombo",
sizeof (GtkCombo),
diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c
index 74bbaeca82..b42358b2f9 100644
--- a/gtk/gtkcontainer.c
+++ b/gtk/gtkcontainer.c
@@ -112,7 +112,7 @@ gtk_container_get_type (void)
if (!container_type)
{
- GtkTypeInfo container_info =
+ static const GtkTypeInfo container_info =
{
"GtkContainer",
sizeof (GtkContainer),
diff --git a/gtk/gtkctree.c b/gtk/gtkctree.c
index 6c4d9d9051..6750279aec 100644
--- a/gtk/gtkctree.c
+++ b/gtk/gtkctree.c
@@ -298,7 +298,7 @@ gtk_ctree_get_type (void)
if (!ctree_type)
{
- GtkTypeInfo ctree_info =
+ static const GtkTypeInfo ctree_info =
{
"GtkCTree",
sizeof (GtkCTree),
diff --git a/gtk/gtkcurve.c b/gtk/gtkcurve.c
index 36442e1303..8a760ebb01 100644
--- a/gtk/gtkcurve.c
+++ b/gtk/gtkcurve.c
@@ -58,7 +58,7 @@ gtk_curve_get_type (void)
if (!curve_type)
{
- GtkTypeInfo curve_info =
+ static const GtkTypeInfo curve_info =
{
"GtkCurve",
sizeof (GtkCurve),
diff --git a/gtk/gtkdata.c b/gtk/gtkdata.c
index c268abeb60..b9030ed9ff 100644
--- a/gtk/gtkdata.c
+++ b/gtk/gtkdata.c
@@ -39,7 +39,7 @@ gtk_data_get_type (void)
if (!data_type)
{
- GtkTypeInfo data_info =
+ static const GtkTypeInfo data_info =
{
"GtkData",
sizeof (GtkData),
diff --git a/gtk/gtkdialog.c b/gtk/gtkdialog.c
index 81b3e394c0..f3b8ca8222 100644
--- a/gtk/gtkdialog.c
+++ b/gtk/gtkdialog.c
@@ -34,7 +34,7 @@ gtk_dialog_get_type (void)
if (!dialog_type)
{
- GtkTypeInfo dialog_info =
+ static const GtkTypeInfo dialog_info =
{
"GtkDialog",
sizeof (GtkDialog),
diff --git a/gtk/gtkdnd.c b/gtk/gtkdnd.c
index d4400b3d9c..cecf799ef2 100644
--- a/gtk/gtkdnd.c
+++ b/gtk/gtkdnd.c
@@ -302,10 +302,10 @@ static struct {
{ 0 , action_none_bits, action_none_mask_bits, NULL },
};
-static gint n_drag_cursors = sizeof(drag_cursors) / sizeof(drag_cursors[0]);
+static const gint n_drag_cursors = sizeof(drag_cursors) / sizeof(drag_cursors[0]);
/* XPM */
-static char * drag_default_xpm[] = {
+static const char * drag_default_xpm[] = {
"32 32 3 1",
" c None",
". c #000000",
diff --git a/gtk/gtkdrawingarea.c b/gtk/gtkdrawingarea.c
index 3a67328764..1bdb8560e6 100644
--- a/gtk/gtkdrawingarea.c
+++ b/gtk/gtkdrawingarea.c
@@ -34,7 +34,7 @@ gtk_drawing_area_get_type (void)
if (!drawing_area_type)
{
- GtkTypeInfo drawing_area_info =
+ static const GtkTypeInfo drawing_area_info =
{
"GtkDrawingArea",
sizeof (GtkDrawingArea),
diff --git a/gtk/gtkdrawwindow.c b/gtk/gtkdrawwindow.c
index b8df2a4d56..317aae0cfe 100644
--- a/gtk/gtkdrawwindow.c
+++ b/gtk/gtkdrawwindow.c
@@ -33,7 +33,7 @@ gtk_draw_window_get_type (void)
if (!draw_window_type)
{
- GtkTypeInfo draw_window_info =
+ static const GtkTypeInfo draw_window_info =
{
"GtkDrawWindow",
sizeof (GtkDrawWindow),
diff --git a/gtk/gtkeditable.c b/gtk/gtkeditable.c
index e720395676..5335274876 100644
--- a/gtk/gtkeditable.c
+++ b/gtk/gtkeditable.c
@@ -109,7 +109,7 @@ gtk_editable_get_type (void)
if (!editable_type)
{
- GtkTypeInfo editable_info =
+ static const GtkTypeInfo editable_info =
{
"GtkEditable",
sizeof (GtkEditable),
@@ -371,12 +371,12 @@ gtk_editable_get_arg (GtkObject *object,
static void
gtk_editable_init (GtkEditable *editable)
{
- static GtkTargetEntry targets[] = {
+ static const GtkTargetEntry targets[] = {
{ "STRING", TARGET_STRING },
{ "TEXT", TARGET_TEXT },
{ "COMPOUND_TEXT", TARGET_COMPOUND_TEXT }
};
- static gint n_targets = sizeof(targets) / sizeof(targets[0]);
+ static const gint n_targets = sizeof(targets) / sizeof(targets[0]);
GTK_WIDGET_SET_FLAGS (editable, GTK_CAN_FOCUS);
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index 847fb30378..77079d2ae4 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -153,7 +153,7 @@ static void gtk_entry_set_position_from_editable (GtkEditable *editable,
static GtkWidgetClass *parent_class = NULL;
static GdkAtom ctext_atom = GDK_NONE;
-static GtkTextFunction control_keys[26] =
+static const GtkTextFunction control_keys[26] =
{
(GtkTextFunction)gtk_move_beginning_of_line, /* a */
(GtkTextFunction)gtk_move_backward_character, /* b */
@@ -183,7 +183,7 @@ static GtkTextFunction control_keys[26] =
NULL, /* z */
};
-static GtkTextFunction alt_keys[26] =
+static const GtkTextFunction alt_keys[26] =
{
NULL, /* a */
(GtkTextFunction)gtk_move_backward_word, /* b */
@@ -221,7 +221,7 @@ gtk_entry_get_type (void)
if (!entry_type)
{
- GtkTypeInfo entry_info =
+ static const GtkTypeInfo entry_info =
{
"GtkEntry",
sizeof (GtkEntry),
diff --git a/gtk/gtkeventbox.c b/gtk/gtkeventbox.c
index 8cb5000116..c4dccd925a 100644
--- a/gtk/gtkeventbox.c
+++ b/gtk/gtkeventbox.c
@@ -40,7 +40,7 @@ gtk_event_box_get_type (void)
if (!event_box_type)
{
- GtkTypeInfo event_box_info =
+ static const GtkTypeInfo event_box_info =
{
"GtkEventBox",
sizeof (GtkEventBox),
diff --git a/gtk/gtkfilesel.c b/gtk/gtkfilesel.c
index cd35e14b8d..26bc7da030 100644
--- a/gtk/gtkfilesel.c
+++ b/gtk/gtkfilesel.c
@@ -329,7 +329,7 @@ gtk_file_selection_get_type (void)
if (!file_selection_type)
{
- GtkTypeInfo filesel_info =
+ static const GtkTypeInfo filesel_info =
{
"GtkFileSelection",
sizeof (GtkFileSelection),
@@ -369,8 +369,8 @@ gtk_file_selection_init (GtkFileSelection *filesel)
GtkWidget *pulldown_hbox;
GtkWidget *scrolled_win;
- char *dir_title [] = { "Directories", };
- char *file_title [] = { "Files", };
+ static const char *dir_title [] = { "Directories", NULL };
+ static const char *file_title [] = { "Files", NULL };
filesel->cmpl_state = cmpl_init_state ();
@@ -2026,15 +2026,16 @@ check_dir(gchar *dir_name, struct stat *result, gboolean *stat_subdirs)
* expensive.
*/
- static struct {
+ static const struct {
gchar *name;
gboolean present;
struct stat statbuf;
} no_stat_dirs[] = {
{ "/afs", FALSE, { 0 } },
+ { "/net", FALSE, { 0 } }
};
- static gint n_no_stat_dirs = sizeof(no_stat_dirs) / sizeof(no_stat_dirs[0]);
+ static const gint n_no_stat_dirs = sizeof(no_stat_dirs) / sizeof(no_stat_dirs[0]);
static gboolean initialized = FALSE;
gint i;
diff --git a/gtk/gtkfixed.c b/gtk/gtkfixed.c
index e2b9869292..8e51bb2e62 100644
--- a/gtk/gtkfixed.c
+++ b/gtk/gtkfixed.c
@@ -54,7 +54,7 @@ gtk_fixed_get_type (void)
if (!fixed_type)
{
- GtkTypeInfo fixed_info =
+ static const GtkTypeInfo fixed_info =
{
"GtkFixed",
sizeof (GtkFixed),
diff --git a/gtk/gtkfontsel.c b/gtk/gtkfontsel.c
index 7deff31465..7c193d3538 100644
--- a/gtk/gtkfontsel.c
+++ b/gtk/gtkfontsel.c
@@ -93,7 +93,7 @@
/* These are what we use as the standard font sizes, for the size clist.
Note that when using points we still show these integer point values but
we work internally in decipoints (and decipoint values can be typed in). */
-static guint16 font_sizes[] = {
+static const guint16 font_sizes[] = {
8, 9, 10, 11, 12, 13, 14, 16, 18, 20, 22, 24, 26, 28,
32, 36, 40, 48, 56, 64, 72
};
@@ -198,7 +198,7 @@ typedef enum
} FontField;
/* These are the names of the fields, used on the info & filter page. */
-static gchar* xlfd_field_names[GTK_XLFD_NUM_FIELDS] = {
+static const gchar* xlfd_field_names[GTK_XLFD_NUM_FIELDS] = {
"Foundry:",
"Family:",
"Weight:",
@@ -228,7 +228,7 @@ typedef enum
/* This is used to look up a field in a fontname given one of the above
property indices. */
-static FontField xlfd_index[GTK_NUM_FONT_PROPERTIES] = {
+static const FontField xlfd_index[GTK_NUM_FONT_PROPERTIES] = {
XLFD_WEIGHT,
XLFD_SLANT,
XLFD_SET_WIDTH,
@@ -238,10 +238,10 @@ static FontField xlfd_index[GTK_NUM_FONT_PROPERTIES] = {
};
/* These are the positions of the properties in the filter table - x, y. */
-static gint filter_positions[GTK_NUM_FONT_PROPERTIES][2] = {
+static const gint filter_positions[GTK_NUM_FONT_PROPERTIES][2] = {
{ 1, 0 }, { 0, 2 }, { 1, 2 }, { 2, 2 }, { 2, 0 }, { 0, 0 }
};
-static gint filter_heights[GTK_NUM_FONT_PROPERTIES] = {
+static const gint filter_heights[GTK_NUM_FONT_PROPERTIES] = {
100, 70, 70, 40, 100, 100
};
@@ -396,7 +396,7 @@ gtk_font_selection_get_type()
if(!font_selection_type)
{
- GtkTypeInfo fontsel_type_info =
+ static const GtkTypeInfo fontsel_type_info =
{
"GtkFontSelection",
sizeof (GtkFontSelection),
diff --git a/gtk/gtkframe.c b/gtk/gtkframe.c
index f817e31b44..5831382da6 100644
--- a/gtk/gtkframe.c
+++ b/gtk/gtkframe.c
@@ -61,7 +61,7 @@ gtk_frame_get_type (void)
if (!frame_type)
{
- GtkTypeInfo frame_info =
+ static const GtkTypeInfo frame_info =
{
"GtkFrame",
sizeof (GtkFrame),
diff --git a/gtk/gtkgamma.c b/gtk/gtkgamma.c
index 787de5a428..9a1c62b3af 100644
--- a/gtk/gtkgamma.c
+++ b/gtk/gtkgamma.c
@@ -58,7 +58,7 @@ enum
NUM_XPMS
};
-static char *xpm[][27] =
+static const char *xpm[][27] =
{
/* spline: */
{
@@ -209,7 +209,7 @@ gtk_gamma_curve_get_type (void)
if (!gamma_curve_type)
{
- GtkTypeInfo gamma_curve_info =
+ static const GtkTypeInfo gamma_curve_info =
{
"GtkGammaCurve",
sizeof (GtkGammaCurve),
diff --git a/gtk/gtkhandlebox.c b/gtk/gtkhandlebox.c
index efc4ad6ca9..e39be04d48 100644
--- a/gtk/gtkhandlebox.c
+++ b/gtk/gtkhandlebox.c
@@ -92,7 +92,7 @@ gtk_handle_box_get_type (void)
if (!handle_box_type)
{
- GtkTypeInfo handle_box_info =
+ static const GtkTypeInfo handle_box_info =
{
"GtkHandleBox",
sizeof (GtkHandleBox),
diff --git a/gtk/gtkhbbox.c b/gtk/gtkhbbox.c
index 4b9afe1ad4..a2934de1e9 100644
--- a/gtk/gtkhbbox.c
+++ b/gtk/gtkhbbox.c
@@ -37,7 +37,7 @@ gtk_hbutton_box_get_type (void)
if (!hbutton_box_type)
{
- GtkTypeInfo hbutton_box_info =
+ static const GtkTypeInfo hbutton_box_info =
{
"GtkHButtonBox",
sizeof (GtkHButtonBox),
diff --git a/gtk/gtkhbox.c b/gtk/gtkhbox.c
index 0dbc258019..6c3db74849 100644
--- a/gtk/gtkhbox.c
+++ b/gtk/gtkhbox.c
@@ -34,7 +34,7 @@ gtk_hbox_get_type (void)
if (!hbox_type)
{
- GtkTypeInfo hbox_info =
+ static const GtkTypeInfo hbox_info =
{
"GtkHBox",
sizeof (GtkHBox),
diff --git a/gtk/gtkhpaned.c b/gtk/gtkhpaned.c
index 4312575f82..eec7581627 100644
--- a/gtk/gtkhpaned.c
+++ b/gtk/gtkhpaned.c
@@ -43,7 +43,7 @@ gtk_hpaned_get_type (void)
if (!hpaned_type)
{
- GtkTypeInfo hpaned_info =
+ static const GtkTypeInfo hpaned_info =
{
"GtkHPaned",
sizeof (GtkHPaned),
diff --git a/gtk/gtkhruler.c b/gtk/gtkhruler.c
index 40af247119..5981b8dce9 100644
--- a/gtk/gtkhruler.c
+++ b/gtk/gtkhruler.c
@@ -45,7 +45,7 @@ gtk_hruler_get_type (void)
if (!hruler_type)
{
- GtkTypeInfo hruler_info =
+ static const GtkTypeInfo hruler_info =
{
"GtkHRuler",
sizeof (GtkHRuler),
diff --git a/gtk/gtkhscale.c b/gtk/gtkhscale.c
index 13e82dc862..42b7721c1a 100644
--- a/gtk/gtkhscale.c
+++ b/gtk/gtkhscale.c
@@ -70,7 +70,7 @@ gtk_hscale_get_type (void)
if (!hscale_type)
{
- GtkTypeInfo hscale_info =
+ static const GtkTypeInfo hscale_info =
{
"GtkHScale",
sizeof (GtkHScale),
diff --git a/gtk/gtkhscrollbar.c b/gtk/gtkhscrollbar.c
index 71dac16648..cf7c6650b8 100644
--- a/gtk/gtkhscrollbar.c
+++ b/gtk/gtkhscrollbar.c
@@ -58,7 +58,7 @@ gtk_hscrollbar_get_type (void)
if (!hscrollbar_type)
{
- GtkTypeInfo hscrollbar_info =
+ static const GtkTypeInfo hscrollbar_info =
{
"GtkHScrollbar",
sizeof (GtkHScrollbar),
diff --git a/gtk/gtkhseparator.c b/gtk/gtkhseparator.c
index 16b5908a27..3d0c4fd7f6 100644
--- a/gtk/gtkhseparator.c
+++ b/gtk/gtkhseparator.c
@@ -32,7 +32,7 @@ gtk_hseparator_get_type (void)
if (!hseparator_type)
{
- GtkTypeInfo hseparator_info =
+ static const GtkTypeInfo hseparator_info =
{
"GtkHSeparator",
sizeof (GtkHSeparator),
diff --git a/gtk/gtkimage.c b/gtk/gtkimage.c
index 9b26aafb2f..20b6f49958 100644
--- a/gtk/gtkimage.c
+++ b/gtk/gtkimage.c
@@ -33,7 +33,7 @@ gtk_image_get_type (void)
if (!image_type)
{
- GtkTypeInfo image_info =
+ static const GtkTypeInfo image_info =
{
"GtkImage",
sizeof (GtkImage),
diff --git a/gtk/gtkinputdialog.c b/gtk/gtkinputdialog.c
index bf1aa3d285..0d68b2b1c5 100644
--- a/gtk/gtkinputdialog.c
+++ b/gtk/gtkinputdialog.c
@@ -114,7 +114,7 @@ gtk_input_dialog_get_type (void)
if (!input_dialog_type)
{
- GtkTypeInfo input_dialog_info =
+ static const GtkTypeInfo input_dialog_info =
{
"GtkInputDialog",
sizeof (GtkInputDialog),
@@ -484,7 +484,7 @@ gtk_input_dialog_set_axis(GtkWidget *widget, gpointer data)
static void
gtk_input_dialog_fill_axes(GtkInputDialog *inputd, GdkDeviceInfo *info)
{
- static char *axis_use_strings[GDK_AXIS_LAST] =
+ static const char *axis_use_strings[GDK_AXIS_LAST] =
{
"",
"X",
diff --git a/gtk/gtkinvisible.c b/gtk/gtkinvisible.c
index 8233184e75..e0b6744ce3 100644
--- a/gtk/gtkinvisible.c
+++ b/gtk/gtkinvisible.c
@@ -33,7 +33,7 @@ gtk_invisible_get_type (void)
if (!invisible_type)
{
- GtkTypeInfo invisible_info =
+ static const GtkTypeInfo invisible_info =
{
"GtkInvisible",
sizeof (GtkInvisible),
diff --git a/gtk/gtkitem.c b/gtk/gtkitem.c
index 9613263442..febdff8a77 100644
--- a/gtk/gtkitem.c
+++ b/gtk/gtkitem.c
@@ -49,7 +49,7 @@ gtk_item_get_type (void)
if (!item_type)
{
- GtkTypeInfo item_info =
+ static const GtkTypeInfo item_info =
{
"GtkItem",
sizeof (GtkItem),
diff --git a/gtk/gtkitemfactory.c b/gtk/gtkitemfactory.c
index 60377a4b23..009ec5d3b3 100644
--- a/gtk/gtkitemfactory.c
+++ b/gtk/gtkitemfactory.c
@@ -158,7 +158,7 @@ gtk_item_factory_get_type (void)
if (!item_factory_type)
{
- GtkTypeInfo item_factory_info =
+ static const GtkTypeInfo item_factory_info =
{
"GtkItemFactory",
sizeof (GtkItemFactory),
diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c
index 18a167712e..ff97c508fb 100644
--- a/gtk/gtklabel.c
+++ b/gtk/gtklabel.c
@@ -64,7 +64,7 @@ gtk_label_get_type (void)
if (!label_type)
{
- GtkTypeInfo label_info =
+ static const GtkTypeInfo label_info =
{
"GtkLabel",
sizeof (GtkLabel),
diff --git a/gtk/gtklayout.c b/gtk/gtklayout.c
index 2ca7a12e5c..4702f9b33f 100644
--- a/gtk/gtklayout.c
+++ b/gtk/gtklayout.c
@@ -305,7 +305,7 @@ gtk_layout_get_type (void)
if (!layout_type)
{
- GtkTypeInfo layout_info =
+ static const GtkTypeInfo layout_info =
{
"GtkLayout",
sizeof (GtkLayout),
diff --git a/gtk/gtklist.c b/gtk/gtklist.c
index 8795dbb156..e7a9bc8393 100644
--- a/gtk/gtklist.c
+++ b/gtk/gtklist.c
@@ -154,7 +154,7 @@ gtk_list_get_type (void)
if (!list_type)
{
- GtkTypeInfo list_info =
+ static const GtkTypeInfo list_info =
{
"GtkList",
sizeof (GtkList),
diff --git a/gtk/gtklistitem.c b/gtk/gtklistitem.c
index b583779826..69be352a90 100644
--- a/gtk/gtklistitem.c
+++ b/gtk/gtklistitem.c
@@ -74,7 +74,7 @@ gtk_list_item_get_type (void)
if (!list_item_type)
{
- GtkTypeInfo list_item_info =
+ static const GtkTypeInfo list_item_info =
{
"GtkListItem",
sizeof (GtkListItem),
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index f6245debb7..eb3b5e630c 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -216,7 +216,7 @@ static GdkColormap *gtk_colormap; /* The colormap to be used in creating new
guint gtk_debug_flags = 0; /* Global GTK debug flag */
#ifdef G_ENABLE_DEBUG
-static GDebugKey gtk_debug_keys[] = {
+static const GDebugKey gtk_debug_keys[] = {
{"objects", GTK_DEBUG_OBJECTS},
{"misc", GTK_DEBUG_MISC},
{"signals", GTK_DEBUG_SIGNALS},
diff --git a/gtk/gtkmenu.c b/gtk/gtkmenu.c
index 663c7c7405..72932b17c8 100644
--- a/gtk/gtkmenu.c
+++ b/gtk/gtkmenu.c
@@ -75,7 +75,7 @@ gtk_menu_get_type (void)
if (!menu_type)
{
- GtkTypeInfo menu_info =
+ static const GtkTypeInfo menu_info =
{
"GtkMenu",
sizeof (GtkMenu),
diff --git a/gtk/gtkmenubar.c b/gtk/gtkmenubar.c
index d22ba4fdfe..e79e9ebe17 100644
--- a/gtk/gtkmenubar.c
+++ b/gtk/gtkmenubar.c
@@ -59,7 +59,7 @@ gtk_menu_bar_get_type (void)
if (!menu_bar_type)
{
- GtkTypeInfo menu_bar_info =
+ static const GtkTypeInfo menu_bar_info =
{
"GtkMenuBar",
sizeof (GtkMenuBar),
diff --git a/gtk/gtkmenuitem.c b/gtk/gtkmenuitem.c
index 76611e98ee..cec8e3f147 100644
--- a/gtk/gtkmenuitem.c
+++ b/gtk/gtkmenuitem.c
@@ -77,7 +77,7 @@ gtk_menu_item_get_type (void)
if (!menu_item_type)
{
- GtkTypeInfo menu_item_info =
+ static const GtkTypeInfo menu_item_info =
{
"GtkMenuItem",
sizeof (GtkMenuItem),
diff --git a/gtk/gtkmenushell.c b/gtk/gtkmenushell.c
index ad90966211..e6883aa089 100644
--- a/gtk/gtkmenushell.c
+++ b/gtk/gtkmenushell.c
@@ -147,7 +147,7 @@ gtk_menu_shell_get_type (void)
if (!menu_shell_type)
{
- GtkTypeInfo menu_shell_info =
+ static const GtkTypeInfo menu_shell_info =
{
"GtkMenuShell",
sizeof (GtkMenuShell),
diff --git a/gtk/gtkmisc.c b/gtk/gtkmisc.c
index 6e235df23d..0b984c3ccd 100644
--- a/gtk/gtkmisc.c
+++ b/gtk/gtkmisc.c
@@ -46,7 +46,7 @@ gtk_misc_get_type (void)
if (!misc_type)
{
- GtkTypeInfo misc_info =
+ static const GtkTypeInfo misc_info =
{
"GtkMisc",
sizeof (GtkMisc),
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index 505ab83706..0d566d6fa8 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -210,7 +210,7 @@ gtk_notebook_get_type (void)
if (!notebook_type)
{
- GtkTypeInfo notebook_info =
+ static const GtkTypeInfo notebook_info =
{
"GtkNotebook",
sizeof (GtkNotebook),
diff --git a/gtk/gtkobject.c b/gtk/gtkobject.c
index c8b7274282..aacdbfd12b 100644
--- a/gtk/gtkobject.c
+++ b/gtk/gtkobject.c
@@ -96,8 +96,8 @@ gtk_object_debug (void)
void
gtk_object_init_type (void)
{
- GtkType object_type = 0;
- GtkTypeInfo object_info =
+ static GtkType object_type = 0;
+ static const GtkTypeInfo object_info =
{
"GtkObject",
sizeof (GtkObject),
diff --git a/gtk/gtkoptionmenu.c b/gtk/gtkoptionmenu.c
index 3c6310e169..9db0dfa8ff 100644
--- a/gtk/gtkoptionmenu.c
+++ b/gtk/gtkoptionmenu.c
@@ -74,7 +74,7 @@ gtk_option_menu_get_type (void)
if (!option_menu_type)
{
- GtkTypeInfo option_menu_info =
+ static const GtkTypeInfo option_menu_info =
{
"GtkOptionMenu",
sizeof (GtkOptionMenu),
diff --git a/gtk/gtkpacker.c b/gtk/gtkpacker.c
index 3adc333851..2909f7c288 100644
--- a/gtk/gtkpacker.c
+++ b/gtk/gtkpacker.c
@@ -161,7 +161,7 @@ gtk_packer_get_type (void)
if (!packer_type)
{
- GtkTypeInfo packer_info =
+ static const GtkTypeInfo packer_info =
{
"GtkPacker",
sizeof (GtkPacker),
diff --git a/gtk/gtkpaned.c b/gtk/gtkpaned.c
index dda82a3ca3..d679982b80 100644
--- a/gtk/gtkpaned.c
+++ b/gtk/gtkpaned.c
@@ -48,7 +48,7 @@ gtk_paned_get_type (void)
if (!paned_type)
{
- GtkTypeInfo paned_info =
+ static const GtkTypeInfo paned_info =
{
"GtkPaned",
sizeof (GtkPaned),
diff --git a/gtk/gtkpixmap.c b/gtk/gtkpixmap.c
index e38bd8d807..f1e6625358 100644
--- a/gtk/gtkpixmap.c
+++ b/gtk/gtkpixmap.c
@@ -39,7 +39,7 @@ gtk_pixmap_get_type (void)
if (!pixmap_type)
{
- GtkTypeInfo pixmap_info =
+ static const GtkTypeInfo pixmap_info =
{
"GtkPixmap",
sizeof (GtkPixmap),
diff --git a/gtk/gtkplug.c b/gtk/gtkplug.c
index 69431c82d8..ba2e906486 100644
--- a/gtk/gtkplug.c
+++ b/gtk/gtkplug.c
@@ -44,7 +44,7 @@ gtk_plug_get_type ()
if (!plug_type)
{
- GtkTypeInfo plug_info =
+ static const GtkTypeInfo plug_info =
{
"GtkPlug",
sizeof (GtkPlug),
diff --git a/gtk/gtkpreview.c b/gtk/gtkpreview.c
index c3ebfabf8b..05df6d9836 100644
--- a/gtk/gtkpreview.c
+++ b/gtk/gtkpreview.c
@@ -51,7 +51,7 @@ gtk_preview_get_type (void)
if (!preview_type)
{
- GtkTypeInfo preview_info =
+ static const GtkTypeInfo preview_info =
{
"GtkPreview",
sizeof (GtkPreview),
diff --git a/gtk/gtkprogress.c b/gtk/gtkprogress.c
index ce9267d53e..cfd58957d2 100644
--- a/gtk/gtkprogress.c
+++ b/gtk/gtkprogress.c
@@ -62,7 +62,7 @@ gtk_progress_get_type (void)
if (!progress_type)
{
- GtkTypeInfo progress_info =
+ static const GtkTypeInfo progress_info =
{
"GtkProgress",
sizeof (GtkProgress),
diff --git a/gtk/gtkprogressbar.c b/gtk/gtkprogressbar.c
index 50518adcf9..43ab65c3f2 100644
--- a/gtk/gtkprogressbar.c
+++ b/gtk/gtkprogressbar.c
@@ -61,7 +61,7 @@ gtk_progress_bar_get_type (void)
if (!progress_bar_type)
{
- GtkTypeInfo progress_bar_info =
+ static const GtkTypeInfo progress_bar_info =
{
"GtkProgressBar",
sizeof (GtkProgressBar),
diff --git a/gtk/gtkradiobutton.c b/gtk/gtkradiobutton.c
index 33c78e76ea..9ec83c4a6b 100644
--- a/gtk/gtkradiobutton.c
+++ b/gtk/gtkradiobutton.c
@@ -53,7 +53,7 @@ gtk_radio_button_get_type (void)
if (!radio_button_type)
{
- GtkTypeInfo radio_button_info =
+ static const GtkTypeInfo radio_button_info =
{
"GtkRadioButton",
sizeof (GtkRadioButton),
diff --git a/gtk/gtkradiomenuitem.c b/gtk/gtkradiomenuitem.c
index 482bcdd85d..7741453b03 100644
--- a/gtk/gtkradiomenuitem.c
+++ b/gtk/gtkradiomenuitem.c
@@ -34,7 +34,7 @@ gtk_radio_menu_item_get_type (void)
if (!radio_menu_item_type)
{
- GtkTypeInfo radio_menu_item_info =
+ static const GtkTypeInfo radio_menu_item_info =
{
"GtkRadioMenuItem",
sizeof (GtkRadioMenuItem),
diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c
index 675e76bfe5..73bed02dde 100644
--- a/gtk/gtkrange.c
+++ b/gtk/gtkrange.c
@@ -99,7 +99,7 @@ gtk_range_get_type (void)
if (!range_type)
{
- GtkTypeInfo range_info =
+ static const GtkTypeInfo range_info =
{
"GtkRange",
sizeof (GtkRange),
diff --git a/gtk/gtkrc.c b/gtk/gtkrc.c
index a855ef22c1..3de06c5c2c 100644
--- a/gtk/gtkrc.c
+++ b/gtk/gtkrc.c
@@ -97,7 +97,7 @@ static void gtk_rc_append_default_module_path (void);
static void gtk_rc_append_pixmap_path (gchar *dir);
-static GScannerConfig gtk_rc_scanner_config =
+static const GScannerConfig gtk_rc_scanner_config =
{
(
" \t\n"
@@ -138,7 +138,7 @@ static GScannerConfig gtk_rc_scanner_config =
FALSE /* scope_0_fallback */,
};
-static struct
+static const struct
{
gchar *name;
guint token;
@@ -172,7 +172,7 @@ static struct
{ "module_path", GTK_RC_TOKEN_MODULE_PATH },
};
-static guint n_symbols = sizeof (symbols) / sizeof (symbols[0]);
+static const guint n_symbols = sizeof (symbols) / sizeof (symbols[0]);
static GHashTable *rc_style_ht = NULL;
static GHashTable *realized_style_ht = NULL;
diff --git a/gtk/gtkruler.c b/gtk/gtkruler.c
index 2b25500f04..986e84a035 100644
--- a/gtk/gtkruler.c
+++ b/gtk/gtkruler.c
@@ -32,7 +32,7 @@ static void gtk_ruler_make_pixmap (GtkRuler *ruler);
static GtkWidgetClass *parent_class;
-static GtkRulerMetric ruler_metrics[] =
+static const GtkRulerMetric ruler_metrics[] =
{
{"Pixels", "Pi", 1.0, { 1, 2, 5, 10, 25, 50, 100, 250, 500, 1000 }, { 1, 5, 10, 50, 100 }},
{"Inches", "In", 72.0, { 1, 2, 4, 8, 16, 32, 64, 128, 256, 512 }, { 1, 2, 4, 8, 16 }},
@@ -47,7 +47,7 @@ gtk_ruler_get_type (void)
if (!ruler_type)
{
- GtkTypeInfo ruler_info =
+ static const GtkTypeInfo ruler_info =
{
"GtkRuler",
sizeof (GtkRuler),
diff --git a/gtk/gtkscale.c b/gtk/gtkscale.c
index 31e9468058..ca3dffff77 100644
--- a/gtk/gtkscale.c
+++ b/gtk/gtkscale.c
@@ -42,7 +42,7 @@ gtk_scale_get_type (void)
if (!scale_type)
{
- GtkTypeInfo scale_info =
+ static const GtkTypeInfo scale_info =
{
"GtkScale",
sizeof (GtkScale),
diff --git a/gtk/gtkscrollbar.c b/gtk/gtkscrollbar.c
index 97bc35db05..68db4d988a 100644
--- a/gtk/gtkscrollbar.c
+++ b/gtk/gtkscrollbar.c
@@ -28,7 +28,7 @@ gtk_scrollbar_get_type (void)
if (!scrollbar_type)
{
- GtkTypeInfo scrollbar_info =
+ static const GtkTypeInfo scrollbar_info =
{
"GtkScrollbar",
sizeof (GtkScrollbar),
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index d31b6d86ea..c447aaa9f7 100644
--- a/gtk/gtkscrolledwindow.c
+++ b/gtk/gtkscrolledwindow.c
@@ -74,7 +74,7 @@ gtk_scrolled_window_get_type (void)
if (!scrolled_window_type)
{
- GtkTypeInfo scrolled_window_info =
+ static const GtkTypeInfo scrolled_window_info =
{
"GtkScrolledWindow",
sizeof (GtkScrolledWindow),
diff --git a/gtk/gtkseparator.c b/gtk/gtkseparator.c
index e3bd8fc793..b4d9e643b2 100644
--- a/gtk/gtkseparator.c
+++ b/gtk/gtkseparator.c
@@ -30,7 +30,7 @@ gtk_separator_get_type (void)
if (!separator_type)
{
- GtkTypeInfo separator_info =
+ static const GtkTypeInfo separator_info =
{
"GtkSeparator",
sizeof (GtkSeparator),
diff --git a/gtk/gtksocket.c b/gtk/gtksocket.c
index c8d8e2bca3..b281bf5b5c 100644
--- a/gtk/gtksocket.c
+++ b/gtk/gtksocket.c
@@ -67,7 +67,7 @@ gtk_socket_get_type ()
if (!socket_type)
{
- GtkTypeInfo socket_info =
+ static const GtkTypeInfo socket_info =
{
"GtkSocket",
sizeof (GtkSocket),
diff --git a/gtk/gtkspinbutton.c b/gtk/gtkspinbutton.c
index 08e21678f7..6a129a5e01 100644
--- a/gtk/gtkspinbutton.c
+++ b/gtk/gtkspinbutton.c
@@ -119,7 +119,7 @@ gtk_spin_button_get_type (void)
if (!spin_button_type)
{
- GtkTypeInfo spin_button_info =
+ static const GtkTypeInfo spin_button_info =
{
"GtkSpinButton",
sizeof (GtkSpinButton),
diff --git a/gtk/gtkstatusbar.c b/gtk/gtkstatusbar.c
index cfc3e4c45f..9cca6fd55b 100644
--- a/gtk/gtkstatusbar.c
+++ b/gtk/gtkstatusbar.c
@@ -49,7 +49,7 @@ gtk_statusbar_get_type (void)
if (!statusbar_type)
{
- GtkTypeInfo statusbar_info =
+ static const GtkTypeInfo statusbar_info =
{
"GtkStatusbar",
sizeof (GtkStatusbar),
diff --git a/gtk/gtkstyle.c b/gtk/gtkstyle.c
index 4574cfe8f5..3765fdc460 100644
--- a/gtk/gtkstyle.c
+++ b/gtk/gtkstyle.c
@@ -287,7 +287,7 @@ static void rgb_to_hls (gdouble *r, gdouble *g, gdouble *b);
static void hls_to_rgb (gdouble *h, gdouble *l, gdouble *s);
-GtkStyleClass default_class =
+static const GtkStyleClass default_class =
{
2,
2,
diff --git a/gtk/gtktable.c b/gtk/gtktable.c
index 313dad2243..d47fe498f9 100644
--- a/gtk/gtktable.c
+++ b/gtk/gtktable.c
@@ -100,7 +100,7 @@ gtk_table_get_type (void)
if (!table_type)
{
- GtkTypeInfo table_info =
+ static const GtkTypeInfo table_info =
{
"GtkTable",
sizeof (GtkTable),
diff --git a/gtk/gtktearoffmenuitem.c b/gtk/gtktearoffmenuitem.c
index fb76f1010b..18a53b46e1 100644
--- a/gtk/gtktearoffmenuitem.c
+++ b/gtk/gtktearoffmenuitem.c
@@ -43,7 +43,7 @@ gtk_tearoff_menu_item_get_type (void)
if (!tearoff_menu_item_type)
{
- GtkTypeInfo tearoff_menu_item_info =
+ static const GtkTypeInfo tearoff_menu_item_info =
{
"GtkTearoffMenuItem",
sizeof (GtkTearoffMenuItem),
diff --git a/gtk/gtktext.c b/gtk/gtktext.c
index 0603485e04..ee6833dcaf 100644
--- a/gtk/gtktext.c
+++ b/gtk/gtktext.c
@@ -432,7 +432,7 @@ static GMemChunk *text_property_chunk = NULL;
static GtkWidgetClass *parent_class = NULL;
-static GtkTextFunction control_keys[26] =
+static const GtkTextFunction control_keys[26] =
{
(GtkTextFunction)gtk_text_move_beginning_of_line, /* a */
(GtkTextFunction)gtk_text_move_backward_character, /* b */
@@ -462,7 +462,7 @@ static GtkTextFunction control_keys[26] =
NULL, /* z */
};
-static GtkTextFunction alt_keys[26] =
+static const GtkTextFunction alt_keys[26] =
{
NULL, /* a */
(GtkTextFunction)gtk_text_move_backward_word, /* b */
@@ -504,7 +504,7 @@ gtk_text_get_type (void)
if (!text_type)
{
- GtkTypeInfo text_info =
+ static const GtkTypeInfo text_info =
{
"GtkText",
sizeof (GtkText),
diff --git a/gtk/gtktipsquery.c b/gtk/gtktipsquery.c
index e54cf5a250..2c8b037672 100644
--- a/gtk/gtktipsquery.c
+++ b/gtk/gtktipsquery.c
@@ -79,7 +79,7 @@ gtk_tips_query_get_type (void)
if (!tips_query_type)
{
- GtkTypeInfo tips_query_info =
+ static const GtkTypeInfo tips_query_info =
{
"GtkTipsQuery",
sizeof (GtkTipsQuery),
diff --git a/gtk/gtktogglebutton.c b/gtk/gtktogglebutton.c
index a391e1dc85..cccbc49e8d 100644
--- a/gtk/gtktogglebutton.c
+++ b/gtk/gtktogglebutton.c
@@ -71,7 +71,7 @@ gtk_toggle_button_get_type (void)
if (!toggle_button_type)
{
- GtkTypeInfo toggle_button_info =
+ static const GtkTypeInfo toggle_button_info =
{
"GtkToggleButton",
sizeof (GtkToggleButton),
diff --git a/gtk/gtktoolbar.c b/gtk/gtktoolbar.c
index ab9d2754ac..3db47e656b 100644
--- a/gtk/gtktoolbar.c
+++ b/gtk/gtktoolbar.c
@@ -74,7 +74,7 @@ gtk_toolbar_get_type (void)
if (!toolbar_type)
{
- GtkTypeInfo toolbar_info =
+ static const GtkTypeInfo toolbar_info =
{
"GtkToolbar",
sizeof (GtkToolbar),
diff --git a/gtk/gtktooltips.c b/gtk/gtktooltips.c
index 123c37c857..a1820d742a 100644
--- a/gtk/gtktooltips.c
+++ b/gtk/gtktooltips.c
@@ -58,7 +58,7 @@ gtk_tooltips_get_type (void)
if (!tooltips_type)
{
- GtkTypeInfo tooltips_info =
+ static const GtkTypeInfo tooltips_info =
{
"GtkTooltips",
sizeof (GtkTooltips),
diff --git a/gtk/gtktree.c b/gtk/gtktree.c
index 2f70b4c7f2..e94c35fdff 100644
--- a/gtk/gtktree.c
+++ b/gtk/gtktree.c
@@ -73,7 +73,7 @@ gtk_tree_get_type (void)
if (!tree_type)
{
- GtkTypeInfo tree_info =
+ static const GtkTypeInfo tree_info =
{
"GtkTree",
sizeof (GtkTree),
diff --git a/gtk/gtktreeitem.c b/gtk/gtktreeitem.c
index a4f57e3d5f..53bb5e58a6 100644
--- a/gtk/gtktreeitem.c
+++ b/gtk/gtktreeitem.c
@@ -99,7 +99,7 @@ gtk_tree_item_get_type (void)
if (!tree_item_type)
{
- GtkTypeInfo tree_item_info =
+ static const GtkTypeInfo tree_item_info =
{
"GtkTreeItem",
sizeof (GtkTreeItem),
diff --git a/gtk/gtktypeutils.c b/gtk/gtktypeutils.c
index c9b415ad7e..b7fcf60f5e 100644
--- a/gtk/gtktypeutils.c
+++ b/gtk/gtktypeutils.c
@@ -162,7 +162,7 @@ gtk_type_set_chunk_alloc (GtkType type,
static GtkType
gtk_type_create (GtkType parent_type,
gchar *type_name,
- GtkTypeInfo *type_info)
+ const GtkTypeInfo *type_info)
{
GtkTypeNode *new_node;
GtkTypeNode *parent;
@@ -230,7 +230,7 @@ gtk_type_create (GtkType parent_type,
GtkType
gtk_type_unique (GtkType parent_type,
- GtkTypeInfo *type_info)
+ const GtkTypeInfo *type_info)
{
GtkType new_type;
gchar *type_name;
@@ -915,7 +915,7 @@ gtk_type_init_builtin_types (void)
* gtk_type_unique is 1, which is GTK_TYPE_NONE. And so on.
*/
- struct {
+ static const struct {
GtkType type_id;
gchar *name;
} fundamental_info[] = {
@@ -941,7 +941,7 @@ gtk_type_init_builtin_types (void)
{ GTK_TYPE_C_CALLBACK, "GtkCCallback" },
{ GTK_TYPE_FOREIGN, "GtkForeign" },
};
- struct {
+ static struct {
gchar *type_name;
GtkType *type_id;
GtkType parent;
diff --git a/gtk/gtktypeutils.h b/gtk/gtktypeutils.h
index ae2fe399b8..40e70c2c40 100644
--- a/gtk/gtktypeutils.h
+++ b/gtk/gtktypeutils.h
@@ -311,8 +311,8 @@ struct _GtkEnumValue
void gtk_type_init (void);
-GtkType gtk_type_unique (GtkType parent_type,
- GtkTypeInfo *type_info);
+GtkType gtk_type_unique (GtkType parent_type,
+ const GtkTypeInfo *type_info);
void gtk_type_set_chunk_alloc (GtkType type,
guint n_chunks);
gchar* gtk_type_name (guint type);
diff --git a/gtk/gtkvbbox.c b/gtk/gtkvbbox.c
index 958a1236e0..cc83202517 100644
--- a/gtk/gtkvbbox.c
+++ b/gtk/gtkvbbox.c
@@ -36,7 +36,7 @@ gtk_vbutton_box_get_type (void)
if (!vbutton_box_type)
{
- GtkTypeInfo vbutton_box_info =
+ static const GtkTypeInfo vbutton_box_info =
{
"GtkVButtonBox",
sizeof (GtkVButtonBox),
diff --git a/gtk/gtkvbox.c b/gtk/gtkvbox.c
index be40bdb7ca..486b89706f 100644
--- a/gtk/gtkvbox.c
+++ b/gtk/gtkvbox.c
@@ -34,7 +34,7 @@ gtk_vbox_get_type (void)
if (!vbox_type)
{
- GtkTypeInfo vbox_info =
+ static const GtkTypeInfo vbox_info =
{
"GtkVBox",
sizeof (GtkVBox),
diff --git a/gtk/gtkviewport.c b/gtk/gtkviewport.c
index b88858e868..504b8f092f 100644
--- a/gtk/gtkviewport.c
+++ b/gtk/gtkviewport.c
@@ -72,7 +72,7 @@ gtk_viewport_get_type (void)
if (!viewport_type)
{
- GtkTypeInfo viewport_info =
+ static const GtkTypeInfo viewport_info =
{
"GtkViewport",
sizeof (GtkViewport),
diff --git a/gtk/gtkvpaned.c b/gtk/gtkvpaned.c
index 55cd2b9bf4..3fb5a1a2e8 100644
--- a/gtk/gtkvpaned.c
+++ b/gtk/gtkvpaned.c
@@ -43,7 +43,7 @@ gtk_vpaned_get_type (void)
if (!vpaned_type)
{
- GtkTypeInfo vpaned_info =
+ static const GtkTypeInfo vpaned_info =
{
"GtkVPaned",
sizeof (GtkVPaned),
diff --git a/gtk/gtkvruler.c b/gtk/gtkvruler.c
index 3da583548d..93117fe395 100644
--- a/gtk/gtkvruler.c
+++ b/gtk/gtkvruler.c
@@ -45,7 +45,7 @@ gtk_vruler_get_type (void)
if (!vruler_type)
{
- GtkTypeInfo vruler_info =
+ static const GtkTypeInfo vruler_info =
{
"GtkVRuler",
sizeof (GtkVRuler),
diff --git a/gtk/gtkvscale.c b/gtk/gtkvscale.c
index b60425ce2c..25a453c1b8 100644
--- a/gtk/gtkvscale.c
+++ b/gtk/gtkvscale.c
@@ -70,7 +70,7 @@ gtk_vscale_get_type (void)
if (!vscale_type)
{
- GtkTypeInfo vscale_info =
+ static const GtkTypeInfo vscale_info =
{
"GtkVScale",
sizeof (GtkVScale),
diff --git a/gtk/gtkvscrollbar.c b/gtk/gtkvscrollbar.c
index 3cb8d50051..d4485283ec 100644
--- a/gtk/gtkvscrollbar.c
+++ b/gtk/gtkvscrollbar.c
@@ -58,7 +58,7 @@ gtk_vscrollbar_get_type (void)
if (!vscrollbar_type)
{
- GtkTypeInfo vscrollbar_info =
+ static const GtkTypeInfo vscrollbar_info =
{
"GtkVScrollbar",
sizeof (GtkVScrollbar),
diff --git a/gtk/gtkvseparator.c b/gtk/gtkvseparator.c
index dac67f20c8..bd73d35056 100644
--- a/gtk/gtkvseparator.c
+++ b/gtk/gtkvseparator.c
@@ -32,7 +32,7 @@ gtk_vseparator_get_type (void)
if (!vseparator_type)
{
- GtkTypeInfo vseparator_info =
+ static const GtkTypeInfo vseparator_info =
{
"GtkVSeparator",
sizeof (GtkVSeparator),
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index de9339ec52..92e13f1cc1 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -218,7 +218,7 @@ gtk_widget_get_type (void)
if (!widget_type)
{
- GtkTypeInfo widget_info =
+ static const GtkTypeInfo widget_info =
{
"GtkWidget",
sizeof (GtkWidget),
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index b078b4891d..41e59e8d2e 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -107,7 +107,7 @@ gtk_window_get_type (void)
if (!window_type)
{
- GtkTypeInfo window_info =
+ static const GtkTypeInfo window_info =
{
"GtkWindow",
sizeof (GtkWindow),
diff --git a/gtk/makeenums.pl b/gtk/makeenums.pl
index a6e447057a..62fb6c19a1 100755
--- a/gtk/makeenums.pl
+++ b/gtk/makeenums.pl
@@ -204,7 +204,7 @@ while (<>) {
$valuename =~ s/([A-Z][A-Z])([A-Z][0-9a-z])/$1_$2/g;
$valuename = lc($valuename);
- print "static GtkEnumValue _${valuename}_values[] = {\n";
+ print "static const GtkEnumValue _${valuename}_values[] = {\n";
for (@entries) {
my ($name,$nick) = @{$_};
print qq( { $name, "$name", "$nick" },\n);