gdk/gdkkeyuni.c gdk/gdkpixbuf-drawable.c gdk/gdkrgb.c gdk/x11/gdkdnd-x11.c

2005-03-01  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkkeyuni.c
	* gdk/gdkpixbuf-drawable.c
	* gdk/gdkrgb.c
	* gdk/x11/gdkdnd-x11.c
	* gdk/x11/gdkevents-x11.c
	* gdk/x11/gdkproperty-x11.c
	* gdk/x11/gdkvisual-x11.c
	* gdk-pixbuf/gdk-pixbuf.c
	* gtk/gtkaction.c
	* gtk/gtkbindings.c
	* gtk/gtkcolorbutton.c
	* gtk/gtkcombo.c
	* gtk/gtkcontainer.c
	* gtk/gtkfilechooserdefault.c
	* gtk/gtkfilesel.c
	* gtk/gtkgamma.c
	* gtk/gtkiconview.c
	* gtk/gtkinputdialog.c
	* gtk/gtkitemfactory.c
	* gtk/gtkmenu.c
	* gtk/gtktextview.c
	* gtk/gtktooltips.c
	* gtk/gtktreedatalist.c
	* gtk/gtkuimanager.c
	* gtk/tree_minus.xpm
	* gtk/tree_plus.xpm
	* gtk/xdgmime/xdgmime.c
	* gtk/xdgmime/xdgmime.h:
	Move constant data to .rodata.
This commit is contained in:
Matthias Clasen 2005-03-01 06:25:55 +00:00 committed by Matthias Clasen
parent d16ad30f40
commit 6da29b43a6
31 changed files with 138 additions and 42 deletions

View File

@ -1,3 +1,35 @@
2005-03-01 Matthias Clasen <mclasen@redhat.com>
* gdk/gdkkeyuni.c
* gdk/gdkpixbuf-drawable.c
* gdk/gdkrgb.c
* gdk/x11/gdkdnd-x11.c
* gdk/x11/gdkevents-x11.c
* gdk/x11/gdkproperty-x11.c
* gdk/x11/gdkvisual-x11.c
* gdk-pixbuf/gdk-pixbuf.c
* gtk/gtkaction.c
* gtk/gtkbindings.c
* gtk/gtkcolorbutton.c
* gtk/gtkcombo.c
* gtk/gtkcontainer.c
* gtk/gtkfilechooserdefault.c
* gtk/gtkfilesel.c
* gtk/gtkgamma.c
* gtk/gtkiconview.c
* gtk/gtkinputdialog.c
* gtk/gtkitemfactory.c
* gtk/gtkmenu.c
* gtk/gtktextview.c
* gtk/gtktooltips.c
* gtk/gtktreedatalist.c
* gtk/gtkuimanager.c
* gtk/tree_minus.xpm
* gtk/tree_plus.xpm
* gtk/xdgmime/xdgmime.c
* gtk/xdgmime/xdgmime.h:
Move constant data to .rodata.
2005-02-27 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkaction.c (connect_proxy): Improve the handling

View File

@ -1,3 +1,35 @@
2005-03-01 Matthias Clasen <mclasen@redhat.com>
* gdk/gdkkeyuni.c
* gdk/gdkpixbuf-drawable.c
* gdk/gdkrgb.c
* gdk/x11/gdkdnd-x11.c
* gdk/x11/gdkevents-x11.c
* gdk/x11/gdkproperty-x11.c
* gdk/x11/gdkvisual-x11.c
* gdk-pixbuf/gdk-pixbuf.c
* gtk/gtkaction.c
* gtk/gtkbindings.c
* gtk/gtkcolorbutton.c
* gtk/gtkcombo.c
* gtk/gtkcontainer.c
* gtk/gtkfilechooserdefault.c
* gtk/gtkfilesel.c
* gtk/gtkgamma.c
* gtk/gtkiconview.c
* gtk/gtkinputdialog.c
* gtk/gtkitemfactory.c
* gtk/gtkmenu.c
* gtk/gtktextview.c
* gtk/gtktooltips.c
* gtk/gtktreedatalist.c
* gtk/gtkuimanager.c
* gtk/tree_minus.xpm
* gtk/tree_plus.xpm
* gtk/xdgmime/xdgmime.c
* gtk/xdgmime/xdgmime.h:
Move constant data to .rodata.
2005-02-27 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkaction.c (connect_proxy): Improve the handling

View File

@ -1,3 +1,35 @@
2005-03-01 Matthias Clasen <mclasen@redhat.com>
* gdk/gdkkeyuni.c
* gdk/gdkpixbuf-drawable.c
* gdk/gdkrgb.c
* gdk/x11/gdkdnd-x11.c
* gdk/x11/gdkevents-x11.c
* gdk/x11/gdkproperty-x11.c
* gdk/x11/gdkvisual-x11.c
* gdk-pixbuf/gdk-pixbuf.c
* gtk/gtkaction.c
* gtk/gtkbindings.c
* gtk/gtkcolorbutton.c
* gtk/gtkcombo.c
* gtk/gtkcontainer.c
* gtk/gtkfilechooserdefault.c
* gtk/gtkfilesel.c
* gtk/gtkgamma.c
* gtk/gtkiconview.c
* gtk/gtkinputdialog.c
* gtk/gtkitemfactory.c
* gtk/gtkmenu.c
* gtk/gtktextview.c
* gtk/gtktooltips.c
* gtk/gtktreedatalist.c
* gtk/gtkuimanager.c
* gtk/tree_minus.xpm
* gtk/tree_plus.xpm
* gtk/xdgmime/xdgmime.c
* gtk/xdgmime/xdgmime.h:
Move constant data to .rodata.
2005-02-27 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkaction.c (connect_proxy): Improve the handling

View File

@ -543,7 +543,7 @@ GDK_PIXBUF_VAR const guint gdk_pixbuf_major_version = GDK_PIXBUF_MAJOR;
GDK_PIXBUF_VAR const guint gdk_pixbuf_minor_version = GDK_PIXBUF_MINOR;
GDK_PIXBUF_VAR const guint gdk_pixbuf_micro_version = GDK_PIXBUF_MICRO;
GDK_PIXBUF_VAR const char *gdk_pixbuf_version = GDK_PIXBUF_VERSION;
GDK_PIXBUF_VAR const char gdk_pixbuf_version[] = GDK_PIXBUF_VERSION;
/* Error quark */
GQuark

View File

@ -10,7 +10,7 @@
* is smallish. It would save about ~1000 bytes total.
*/
static struct {
static const struct {
unsigned short keysym;
unsigned short ucs;
} gdk_keysym_to_unicode_tab[] = {
@ -872,7 +872,7 @@ gdk_keyval_to_unicode (guint keyval)
return 0;
}
static struct {
static const struct {
unsigned short keysym;
unsigned short ucs;
} gdk_unicode_to_keysym_tab[] = {

View File

@ -50,7 +50,7 @@
static guint32 mask_table[] = {
static const guint32 mask_table[] = {
0x00000000, 0x00000001, 0x00000003, 0x00000007,
0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f,
0x000000ff, 0x000001ff, 0x000003ff, 0x000007ff,
@ -1006,7 +1006,7 @@ typedef void (* cfunc) (GdkImage *image,
int y2,
GdkColormap *cmap);
static cfunc convert_map[] = {
static const cfunc convert_map[] = {
rgb1,rgb1,rgb1a,rgb1a,
rgb8,rgb8,rgb8a,rgb8a,
rgb555lsb,rgb555msb,rgb555alsb,rgb555amsb,

View File

@ -54,7 +54,7 @@ typedef void (*GdkRgbConvFunc) (GdkRgbInfo *image_info, GdkImage *image,
gint x_align, gint y_align,
GdkRgbCmap *cmap);
static const gchar* visual_names[] =
static const gchar *const visual_names[] =
{
"static gray",
"grayscale",
@ -127,7 +127,7 @@ struct _GdkRgbCmapInfo
static GdkRgbCmapInfo *gdk_rgb_cmap_get_info (GdkRgbCmap *cmap, GdkRgbInfo *image_info);
static const char *gdk_rgb_key = "gdk-rgb-info";
static const char gdk_rgb_key[] = "gdk-rgb-info";
static GQuark gdk_rgb_quark = 0;
static gboolean gdk_rgb_install_cmap = FALSE;

View File

@ -136,7 +136,7 @@ static GList *contexts;
const static struct {
const char *atom_name;
GdkFilterFunc func;
} xdnd_filters[] = {
} const xdnd_filters[] = {
{ "XdndEnter", xdnd_enter_filter },
{ "XdndLeave", xdnd_leave_filter },
{ "XdndPosition", xdnd_position_filter },
@ -1892,7 +1892,7 @@ motif_dnd_filter (GdkXEvent *xev,
/* Utility functions */
static struct {
gchar *name;
const gchar *name;
GdkAtom atom;
GdkDragAction action;
} xdnd_actions_table[] = {
@ -3720,7 +3720,7 @@ gdk_drop_finish (GdkDragContext *context,
void
gdk_window_register_dnd (GdkWindow *window)
{
static gulong xdnd_version = 5;
static const gulong xdnd_version = 5;
MotifDragReceiverInfo info;
Atom motif_drag_receiver_info_atom;
GdkDisplay *display = gdk_drawable_get_display (window);

View File

@ -2698,7 +2698,7 @@ gdk_net_wm_supports (GdkAtom property)
return gdk_x11_screen_supports_net_wm_hint (gdk_screen_get_default (), property);
}
static struct
static const struct
{
const char *xsettings_name;
const char *gdk_name;

View File

@ -42,7 +42,7 @@
static GPtrArray *virtual_atom_array;
static GHashTable *virtual_atom_hash;
static gchar *XAtomsStrings[] = {
static const gchar *const XAtomsStrings[] = {
/* These are all the standard predefined X atoms */
"NONE",
"PRIMARY",

View File

@ -50,7 +50,7 @@ static gboolean gdk_visual_equal (Visual *a,
#ifdef G_ENABLE_DEBUG
static const gchar* visual_names[] =
static const gchar *const visual_names[] =
{
"static gray",
"grayscale",

View File

@ -107,7 +107,7 @@ static void gtk_action_init (GtkAction *action);
static void gtk_action_class_init (GtkActionClass *class);
static GQuark accel_path_id = 0;
static const gchar *accel_path_key = "GtkAction::accel_path";
static const gchar accel_path_key[] = "GtkAction::accel_path";
GType
gtk_action_get_type (void)

View File

@ -54,7 +54,7 @@ typedef struct {
static GHashTable *binding_entry_hash_table = NULL;
static GSList *binding_key_hashes = NULL;
static GSList *binding_set_list = NULL;
static const gchar *key_class_binding_set = "gtk-class-binding-set";
static const gchar key_class_binding_set[] = "gtk-class-binding-set";
static GQuark key_id_class_binding_set = 0;

View File

@ -135,7 +135,7 @@ static void gtk_color_button_drag_data_received (GtkWidget *widget,
static gpointer parent_class = NULL;
static guint color_button_signals[LAST_SIGNAL] = { 0 };
static GtkTargetEntry drop_types[] = { { "application/x-color", 0, 0 } };
static const GtkTargetEntry drop_types[] = { { "application/x-color", 0, 0 } };
GType
gtk_color_button_get_type (void)

View File

@ -49,7 +49,7 @@
#include "gtkframe.h"
#include "gtkintl.h"
const gchar *gtk_combo_string_key = "gtk-combo-string-value";
const gchar gtk_combo_string_key[] = "gtk-combo-string-value";
#define COMBO_LIST_MAX_HEIGHT (400)
#define EMPTY_LIST_HEIGHT (15)

View File

@ -101,9 +101,9 @@ static gchar* gtk_container_child_default_composite_name (GtkContainer *containe
/* --- variables --- */
static const gchar *vadjustment_key = "gtk-vadjustment";
static const gchar vadjustment_key[] = "gtk-vadjustment";
static guint vadjustment_key_id = 0;
static const gchar *hadjustment_key = "gtk-hadjustment";
static const gchar hadjustment_key[] = "gtk-hadjustment";
static guint hadjustment_key_id = 0;
static GSList *container_resize_queue = NULL;
static guint container_signals[LAST_SIGNAL] = { 0 };

View File

@ -236,7 +236,7 @@ enum {
};
/* Target types for dragging from the shortcuts list */
static GtkTargetEntry shortcuts_source_targets[] = {
static const GtkTargetEntry shortcuts_source_targets[] = {
{ "GTK_TREE_MODEL_ROW", GTK_TARGET_SAME_WIDGET, GTK_TREE_MODEL_ROW }
};
@ -244,7 +244,7 @@ static const int num_shortcuts_source_targets = (sizeof (shortcuts_source_target
/ sizeof (shortcuts_source_targets[0]));
/* Target types for dropping into the shortcuts list */
static GtkTargetEntry shortcuts_dest_targets[] = {
static const GtkTargetEntry shortcuts_dest_targets[] = {
{ "GTK_TREE_MODEL_ROW", GTK_TARGET_SAME_WIDGET, GTK_TREE_MODEL_ROW },
{ "text/uri-list", 0, TEXT_URI_LIST }
};
@ -253,7 +253,7 @@ static const int num_shortcuts_dest_targets = (sizeof (shortcuts_dest_targets)
/ sizeof (shortcuts_dest_targets[0]));
/* Target types for DnD from the file list */
static GtkTargetEntry file_list_source_targets[] = {
static const GtkTargetEntry file_list_source_targets[] = {
{ "text/uri-list", 0, TEXT_URI_LIST }
};

View File

@ -1068,7 +1068,7 @@ file_selection_setup_dnd (GtkFileSelection *filesel)
static const GtkTargetEntry drop_types[] = {
{ "text/uri-list", 0, TARGET_URILIST}
};
static gint n_drop_types = sizeof(drop_types)/sizeof(drop_types[0]);
static const gint n_drop_types = sizeof(drop_types)/sizeof(drop_types[0]);
static const GtkTargetEntry drag_types[] = {
{ "text/uri-list", 0, TARGET_URILIST},
{ "UTF8_STRING", 0, TARGET_UTF8_STRING },
@ -1076,7 +1076,7 @@ file_selection_setup_dnd (GtkFileSelection *filesel)
{ "TEXT", 0, 0 },
{ "COMPOUND_TEXT", 0, 0 }
};
static gint n_drag_types = sizeof(drag_types)/sizeof(drag_types[0]);
static const gint n_drag_types = sizeof(drag_types)/sizeof(drag_types[0]);
gtk_drag_dest_set (GTK_WIDGET (filesel),
GTK_DEST_DEFAULT_ALL,
@ -3207,7 +3207,7 @@ check_dir (gchar *dir_name,
*/
static struct {
gchar *name;
const gchar *name;
gboolean present;
struct stat statbuf;
} no_stat_dirs[] = {

View File

@ -69,7 +69,7 @@ enum
NUM_XPMS
};
static const char *xpm[][27] =
static const char *const xpm[][27] =
{
/* spline: */
{

View File

@ -3895,13 +3895,13 @@ typedef struct
guint action_idle_handler;
} GtkIconViewItemAccessible;
static const gchar *gtk_icon_view_item_accessible_action_names[] =
static const gchar *const gtk_icon_view_item_accessible_action_names[] =
{
"activate",
NULL
};
static const gchar *gtk_icon_view_item_accessible_action_descriptions[] =
static const gchar *const gtk_icon_view_item_accessible_action_descriptions[] =
{
"Activate item",
NULL
@ -5977,7 +5977,7 @@ gtk_icon_view_accessible_get_type (void)
(GInterfaceFinalizeFunc) NULL,
NULL
};
static GInterfaceInfo atk_selection_info =
static const GInterfaceInfo atk_selection_info =
{
(GInterfaceInitFunc) gtk_icon_view_accessible_selection_interface_init,
(GInterfaceFinalizeFunc) NULL,

View File

@ -556,7 +556,7 @@ gtk_input_dialog_set_axis (GtkWidget *w,
static void
gtk_input_dialog_fill_axes(GtkInputDialog *inputd, GdkDevice *info)
{
static const char *axis_use_strings[GDK_AXIS_LAST] =
static const char *const axis_use_strings[GDK_AXIS_LAST] =
{
"",
N_("X"),

View File

@ -82,7 +82,7 @@ static void gtk_item_factory_finalize (GObject *object);
/* --- static variables --- */
static GtkItemFactoryClass *gtk_item_factory_class = NULL;
static gpointer parent_class = NULL;
static const gchar *item_factory_string = "Gtk-<ItemFactory>";
static const gchar item_factory_string[] = "Gtk-<ItemFactory>";
static GMemChunk *ifactory_item_chunks = NULL;
static GMemChunk *ifactory_cb_data_chunks = NULL;
static GQuark quark_popup_data = 0;

View File

@ -234,7 +234,7 @@ static void _gtk_menu_refresh_accel_paths (GtkMenu *menu,
gboolean group_changed);
static GtkMenuShellClass *parent_class = NULL;
static const gchar *attach_data_key = "gtk-menu-attach-data";
static const gchar attach_data_key[] = "gtk-menu-attach-data";
static guint menu_signals[LAST_SIGNAL] = { 0 };

View File

@ -413,7 +413,7 @@ static gint text_window_get_width (GtkTextWindow *win);
static gint text_window_get_height (GtkTextWindow *win);
static GtkTargetEntry target_table[] = {
static const GtkTargetEntry target_table[] = {
{ "GTK_TEXT_BUFFER_CONTENTS", GTK_TARGET_SAME_APP, 0 },
};

View File

@ -69,8 +69,8 @@ static void gtk_tooltips_unset_tip_window (GtkTooltips *tooltips);
static gboolean get_keyboard_mode (GtkWidget *widget);
static GtkObjectClass *parent_class;
static const gchar *tooltips_data_key = "_GtkTooltipsData";
static const gchar *tooltips_info_key = "_GtkTooltipsInfo";
static const gchar tooltips_data_key[] = "_GtkTooltipsData";
static const gchar tooltips_info_key[] = "_GtkTooltipsInfo";
GType
gtk_tooltips_get_type (void)

View File

@ -75,7 +75,7 @@ gboolean
_gtk_tree_data_list_check_type (GType type)
{
gint i = 0;
static GType type_list[] =
static const GType type_list[] =
{
G_TYPE_BOOLEAN,
G_TYPE_CHAR,

View File

@ -2686,7 +2686,7 @@ mark_node_dirty (GNode *node)
NODE_INFO (p)->dirty = TRUE;
}
static const gchar *open_tag_format[] = {
static const gchar *const open_tag_format[] = {
"%*s<UNDECIDED",
"%*s<ui",
"%*s<menubar",
@ -2701,7 +2701,7 @@ static const gchar *open_tag_format[] = {
"%*s<accelerator"
};
static const gchar *close_tag_format[] = {
static const gchar *const close_tag_format[] = {
"%*s</UNDECIDED>\n",
"%*s</ui>\n",
"%*s</menubar>\n",

View File

@ -1,5 +1,5 @@
/* XPM */
static const char *tree_minus[] = {
static const char *const tree_minus[] = {
/* width height num_colors chars_per_pixel */
" 9 9 2 1",
/* colors */

View File

@ -1,5 +1,5 @@
/* XPM */
static const char *tree_plus[] = {
static const char *const tree_plus[] = {
/* width height num_colors chars_per_pixel */
" 9 9 2 1",
/* colors */

View File

@ -55,7 +55,7 @@ static XdgAliasList *alias_list = NULL;
static XdgParentList *parent_list = NULL;
static XdgDirTimeList *dir_time_list = NULL;
static XdgCallbackList *callback_list = NULL;
const char *xdg_mime_type_unknown = "application/octet-stream";
const char xdg_mime_type_unknown[] = "application/octet-stream";
enum

View File

@ -63,7 +63,7 @@ typedef void (*XdgMimeDestroy) (void *user_data);
#define xdg_mime_dump XDG_ENTRY(dump)
#endif
extern const char *xdg_mime_type_unknown;
extern const char xdg_mime_type_unknown[];
#define XDG_MIME_TYPE_UNKNOWN xdg_mime_type_unknown
const char *xdg_mime_get_mime_type_for_data (const void *data,