diff options
author | Matthias Clasen <mclasen@redhat.com> | 2005-03-01 06:25:55 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2005-03-01 06:25:55 +0000 |
commit | 6da29b43a6bd8ddc8fd69cc316013c8ce64a2ef3 (patch) | |
tree | 20858afbdb6c86363b39ebf6f123fb74ae380ae4 /gtk | |
parent | d16ad30f403a1823f8cb813415a3aa1030f5a37e (diff) | |
download | gtk+-6da29b43a6bd8ddc8fd69cc316013c8ce64a2ef3.tar.gz |
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.
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/gtkaction.c | 2 | ||||
-rw-r--r-- | gtk/gtkbindings.c | 2 | ||||
-rw-r--r-- | gtk/gtkcolorbutton.c | 2 | ||||
-rw-r--r-- | gtk/gtkcombo.c | 2 | ||||
-rw-r--r-- | gtk/gtkcontainer.c | 4 | ||||
-rw-r--r-- | gtk/gtkfilechooserdefault.c | 6 | ||||
-rw-r--r-- | gtk/gtkfilesel.c | 6 | ||||
-rw-r--r-- | gtk/gtkgamma.c | 2 | ||||
-rw-r--r-- | gtk/gtkiconview.c | 6 | ||||
-rw-r--r-- | gtk/gtkinputdialog.c | 2 | ||||
-rw-r--r-- | gtk/gtkitemfactory.c | 2 | ||||
-rw-r--r-- | gtk/gtkmenu.c | 2 | ||||
-rw-r--r-- | gtk/gtktextview.c | 2 | ||||
-rw-r--r-- | gtk/gtktooltips.c | 4 | ||||
-rw-r--r-- | gtk/gtktreedatalist.c | 2 | ||||
-rw-r--r-- | gtk/gtkuimanager.c | 4 | ||||
-rw-r--r-- | gtk/tree_minus.xpm | 2 | ||||
-rw-r--r-- | gtk/tree_plus.xpm | 2 | ||||
-rw-r--r-- | gtk/xdgmime/xdgmime.c | 2 | ||||
-rw-r--r-- | gtk/xdgmime/xdgmime.h | 2 |
20 files changed, 29 insertions, 29 deletions
diff --git a/gtk/gtkaction.c b/gtk/gtkaction.c index c33f915bf5..1a2d25d7e7 100644 --- a/gtk/gtkaction.c +++ b/gtk/gtkaction.c @@ -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) diff --git a/gtk/gtkbindings.c b/gtk/gtkbindings.c index dc061d4fce..e866964c1b 100644 --- a/gtk/gtkbindings.c +++ b/gtk/gtkbindings.c @@ -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; diff --git a/gtk/gtkcolorbutton.c b/gtk/gtkcolorbutton.c index 096e1b7863..59ba32f69c 100644 --- a/gtk/gtkcolorbutton.c +++ b/gtk/gtkcolorbutton.c @@ -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) diff --git a/gtk/gtkcombo.c b/gtk/gtkcombo.c index a6b5e0714d..c788e94369 100644 --- a/gtk/gtkcombo.c +++ b/gtk/gtkcombo.c @@ -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) diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c index 51ae7e3b38..e2b205967f 100644 --- a/gtk/gtkcontainer.c +++ b/gtk/gtkcontainer.c @@ -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 }; diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c index fe08be7e84..b0fa607e1d 100644 --- a/gtk/gtkfilechooserdefault.c +++ b/gtk/gtkfilechooserdefault.c @@ -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 } }; diff --git a/gtk/gtkfilesel.c b/gtk/gtkfilesel.c index 4b62d2b0f7..a36aa4484b 100644 --- a/gtk/gtkfilesel.c +++ b/gtk/gtkfilesel.c @@ -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[] = { diff --git a/gtk/gtkgamma.c b/gtk/gtkgamma.c index a142e07f99..5da172a5bf 100644 --- a/gtk/gtkgamma.c +++ b/gtk/gtkgamma.c @@ -69,7 +69,7 @@ enum NUM_XPMS }; -static const char *xpm[][27] = +static const char *const xpm[][27] = { /* spline: */ { diff --git a/gtk/gtkiconview.c b/gtk/gtkiconview.c index 5017367679..3cde871395 100644 --- a/gtk/gtkiconview.c +++ b/gtk/gtkiconview.c @@ -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, diff --git a/gtk/gtkinputdialog.c b/gtk/gtkinputdialog.c index 4cd91a6dfd..6651303f81 100644 --- a/gtk/gtkinputdialog.c +++ b/gtk/gtkinputdialog.c @@ -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"), diff --git a/gtk/gtkitemfactory.c b/gtk/gtkitemfactory.c index d63dddf566..bec6ab6739 100644 --- a/gtk/gtkitemfactory.c +++ b/gtk/gtkitemfactory.c @@ -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; diff --git a/gtk/gtkmenu.c b/gtk/gtkmenu.c index c34a408f76..7d4950b6bc 100644 --- a/gtk/gtkmenu.c +++ b/gtk/gtkmenu.c @@ -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 }; diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c index 9790c2b376..4452c95f87 100644 --- a/gtk/gtktextview.c +++ b/gtk/gtktextview.c @@ -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 }, }; diff --git a/gtk/gtktooltips.c b/gtk/gtktooltips.c index 8f5255e68d..bb5b345de1 100644 --- a/gtk/gtktooltips.c +++ b/gtk/gtktooltips.c @@ -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) diff --git a/gtk/gtktreedatalist.c b/gtk/gtktreedatalist.c index ad3c1eccc2..5f9629487e 100644 --- a/gtk/gtktreedatalist.c +++ b/gtk/gtktreedatalist.c @@ -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, diff --git a/gtk/gtkuimanager.c b/gtk/gtkuimanager.c index 015bbfac92..66bf74cdaa 100644 --- a/gtk/gtkuimanager.c +++ b/gtk/gtkuimanager.c @@ -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", diff --git a/gtk/tree_minus.xpm b/gtk/tree_minus.xpm index 9e9aeaa62b..399dbca88d 100644 --- a/gtk/tree_minus.xpm +++ b/gtk/tree_minus.xpm @@ -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 */ diff --git a/gtk/tree_plus.xpm b/gtk/tree_plus.xpm index 93bf3bfb33..0120e36854 100644 --- a/gtk/tree_plus.xpm +++ b/gtk/tree_plus.xpm @@ -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 */ diff --git a/gtk/xdgmime/xdgmime.c b/gtk/xdgmime/xdgmime.c index 46798aea33..a63791b251 100644 --- a/gtk/xdgmime/xdgmime.c +++ b/gtk/xdgmime/xdgmime.c @@ -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 diff --git a/gtk/xdgmime/xdgmime.h b/gtk/xdgmime/xdgmime.h index db69b1243f..4bd14ee38f 100644 --- a/gtk/xdgmime/xdgmime.h +++ b/gtk/xdgmime/xdgmime.h @@ -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, |