Commit 94eec042 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen
Browse files

Intern some more strings.

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

        * gdk/*.c: Intern some more strings.
        * gtk/gtkintl.h:
        * gtk/*.c: Define an I_() macro and use it instead of the
        bulky g_intern_static_string().
parent f4bbe8f0
2005-09-01 Matthias Clasen <mclasen@redhat.com>
* gdk/*.c: Intern some more strings.
* gtk/gtkintl.h:
* gtk/*.c: Define an I_() macro and use it instead of the
bulky g_intern_static_string().
2005-08-31 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkbindings.c (binding_signal_new): Intern the signal name
instead of copying it.
* gtk/gtktypeutils.c (gtk_identifier_get_type): Some more string interning.
* gtk/*.c: Also intern static strings passed to
g_object_set_data().
......
2005-09-01 Matthias Clasen <mclasen@redhat.com>
* gdk/*.c: Intern some more strings.
* gtk/gtkintl.h:
* gtk/*.c: Define an I_() macro and use it instead of the
bulky g_intern_static_string().
2005-08-31 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkbindings.c (binding_signal_new): Intern the signal name
instead of copying it.
* gtk/gtktypeutils.c (gtk_identifier_get_type): Some more string interning.
* gtk/*.c: Also intern static strings passed to
g_object_set_data().
......
......@@ -31,7 +31,7 @@ m4_define([gtk_api_version], [2.0])
m4_define([gtk_binary_version], [2.4.0])
# required versions of other packages
m4_define([glib_required_version], [2.7.1])
m4_define([glib_required_version], [2.9.0])
m4_define([pango_required_version], [1.9.0])
m4_define([atk_required_version], [1.0.1])
m4_define([cairo_required_version], [0.9.2])
......
......@@ -134,7 +134,7 @@ gdk_display_class_init (GdkDisplayClass *class)
* Since: 2.2
*/
signals[CLOSED] =
g_signal_new ("closed",
g_signal_new (g_intern_static_string ("closed"),
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GdkDisplayClass, closed),
......
......@@ -113,7 +113,7 @@ gdk_display_manager_class_init (GdkDisplayManagerClass *klass)
* Since: 2.2
*/
signals[DISPLAY_OPENED] =
g_signal_new ("display_opened",
g_signal_new (g_intern_static_string ("display_opened"),
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GdkDisplayManagerClass, display_opened),
......
......@@ -546,7 +546,8 @@ on_renderer_display_closed (GdkDisplay *display,
g_signal_handlers_disconnect_by_func (renderer->priv->screen,
(gpointer)on_renderer_display_closed,
renderer);
g_object_set_data (G_OBJECT (renderer->priv->screen), "gdk-pango-renderer", NULL);
g_object_set_data (G_OBJECT (renderer->priv->screen),
g_intern_static_string ("gdk-pango-renderer"), NULL);
}
/**
......@@ -579,7 +580,8 @@ gdk_pango_renderer_get_default (GdkScreen *screen)
if (!renderer)
{
renderer = gdk_pango_renderer_new (screen);
g_object_set_data_full (G_OBJECT (screen), "gdk-pango-renderer", renderer,
g_object_set_data_full (G_OBJECT (screen),
g_intern_static_string ("gdk-pango-renderer"), renderer,
(GDestroyNotify)g_object_unref);
g_signal_connect (gdk_screen_get_display (screen), "closed",
......
......@@ -103,7 +103,8 @@ gdk_screen_class_init (GdkScreenClass *klass)
g_param_spec_pointer ("font-options",
P_("Font options"),
P_("The default font options for the screen"),
G_PARAM_READWRITE));
G_PARAM_READWRITE|G_PARAM_STATIC_NAME|
G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB));
g_object_class_install_property (object_class,
PROP_RESOLUTION,
......@@ -113,7 +114,8 @@ gdk_screen_class_init (GdkScreenClass *klass)
-G_MAXDOUBLE,
G_MAXDOUBLE,
-1.0,
G_PARAM_READWRITE));
G_PARAM_READWRITE|G_PARAM_STATIC_NAME|
G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB));
/**
* GdkScreen::size-changed:
......@@ -125,7 +127,7 @@ gdk_screen_class_init (GdkScreenClass *klass)
* Since: 2.2
*/
signals[SIZE_CHANGED] =
g_signal_new ("size_changed",
g_signal_new (g_intern_static_string ("size_changed"),
G_OBJECT_CLASS_TYPE (klass),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GdkScreenClass, size_changed),
......
......@@ -97,7 +97,7 @@ gdk_screen_x11_class_init (GdkScreenX11Class *klass)
parent_class = g_type_class_peek_parent (klass);
signals[WINDOW_MANAGER_CHANGED] =
g_signal_new ("window_manager_changed",
g_signal_new (g_intern_static_string ("window_manager_changed"),
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GdkScreenX11Class, window_manager_changed),
......
......@@ -1139,7 +1139,7 @@ gtk_about_dialog_set_website (GtkAboutDialog *about,
if (activate_url_hook != NULL)
{
g_object_set_data_full (G_OBJECT (priv->website_button),
g_intern_static_string ("url"),
I_("url"),
g_strdup (website), g_free);
if (priv->website_label == NULL)
gtk_about_dialog_set_website_label (about, website);
......@@ -1158,7 +1158,7 @@ gtk_about_dialog_set_website (GtkAboutDialog *about,
{
priv->website = NULL;
g_object_set_data (G_OBJECT (priv->website_button),
g_intern_static_string ("url"), NULL);
I_("url"), NULL);
gtk_widget_hide (priv->website_button);
}
g_free (tmp);
......@@ -1696,7 +1696,7 @@ create_link_button (GtkWidget *about,
gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
g_object_set_data_full (G_OBJECT (button),
g_intern_static_string ("url"),
I_("url"),
g_strdup (url), g_free);
set_link_button_text (about, button, text);
......@@ -1991,10 +1991,10 @@ add_credits_page (GtkAboutDialog *about,
{
q1++;
q0++;
link_type = g_intern_static_string ("email");
link_type = I_("email");
}
else
link_type = g_intern_static_string ("url");
link_type = I_("url");
link = g_strndup (q1, q2 - q1);
tag = gtk_text_buffer_create_tag (buffer, NULL,
......@@ -2297,7 +2297,7 @@ gtk_show_about_dialog (GtkWindow *parent,
gtk_window_set_transient_for (GTK_WINDOW (dialog), parent);
gtk_window_set_destroy_with_parent (GTK_WINDOW (dialog), TRUE);
g_object_set_data_full (G_OBJECT (parent),
g_intern_static_string ("gtk-about-dialog"),
I_("gtk-about-dialog"),
dialog, g_object_unref);
}
else
......
......@@ -78,7 +78,7 @@ gtk_accel_group_get_type (void)
(GInstanceInitFunc) gtk_accel_group_init,
};
object_type = g_type_register_static (G_TYPE_OBJECT, g_intern_static_string ("GtkAccelGroup"),
object_type = g_type_register_static (G_TYPE_OBJECT, I_("GtkAccelGroup"),
&object_info, 0);
}
......@@ -111,7 +111,7 @@ gtk_accel_group_class_init (GtkAccelGroupClass *class)
* Returns: %TRUE if the accelerator was activated
*/
signal_accel_activate =
g_signal_new ("accel_activate",
g_signal_new (I_("accel_activate"),
G_OBJECT_CLASS_TYPE (class),
G_SIGNAL_DETAILED,
0,
......@@ -136,7 +136,7 @@ gtk_accel_group_class_init (GtkAccelGroupClass *class)
* their visual representation if the @accel_closure is theirs.
*/
signal_accel_changed =
g_signal_new ("accel_changed",
g_signal_new (I_("accel_changed"),
G_OBJECT_CLASS_TYPE (class),
G_SIGNAL_RUN_FIRST | G_SIGNAL_DETAILED,
G_STRUCT_OFFSET (GtkAccelGroupClass, accel_changed),
......
......@@ -85,7 +85,7 @@ gtk_accel_label_get_type (void)
};
accel_label_type =
g_type_register_static (GTK_TYPE_LABEL, g_intern_static_string ("GtkAccelLabel"),
g_type_register_static (GTK_TYPE_LABEL, I_("GtkAccelLabel"),
&accel_label_info, 0);
}
......
......@@ -23,6 +23,7 @@
#include "gtkmarshalers.h"
#include "gtkwindow.h" /* in lack of GtkAcceleratable */
#include "gtkintl.h"
#include "gtkalias.h"
#include <glib/gstdio.h>
......@@ -953,7 +954,7 @@ gtk_accel_map_class_init (GtkAccelMapClass *accel_map_class)
*
* Since: 2.4
*/
accel_map_signals[CHANGED] = g_signal_new ("changed",
accel_map_signals[CHANGED] = g_signal_new (I_("changed"),
G_TYPE_FROM_CLASS (accel_map_class),
G_SIGNAL_DETAILED|G_SIGNAL_RUN_LAST,
0,
......
......@@ -21,6 +21,7 @@
#include <string.h>
#include "gtkwidget.h"
#include "gtkintl.h"
#include "gtkaccessible.h"
#include "gtkalias.h"
......@@ -49,7 +50,7 @@ gtk_accessible_get_type (void)
};
accessible_type =
g_type_register_static (ATK_TYPE_OBJECT, g_intern_static_string ("GtkAccessible"),
g_type_register_static (ATK_TYPE_OBJECT, I_("GtkAccessible"),
&accessible_info, 0);
}
......
......@@ -132,7 +132,7 @@ gtk_action_get_type (void)
};
type = g_type_register_static (G_TYPE_OBJECT,
g_intern_static_string ("GtkAction"),
I_("GtkAction"),
&type_info, 0);
}
return type;
......@@ -308,7 +308,7 @@ gtk_action_class_init (GtkActionClass *klass)
* Since: 2.4
*/
action_signals[ACTIVATE] =
g_signal_new ("activate",
g_signal_new (I_("activate"),
G_OBJECT_CLASS_TYPE (klass),
G_SIGNAL_RUN_FIRST | G_SIGNAL_NO_RECURSE,
G_STRUCT_OFFSET (GtkActionClass, activate), NULL, NULL,
......@@ -798,7 +798,7 @@ connect_proxy (GtkAction *action,
GtkWidget *proxy)
{
g_object_ref (action);
g_object_set_data_full (G_OBJECT (proxy), g_intern_static_string ("gtk-action"), action,
g_object_set_data_full (G_OBJECT (proxy), I_("gtk-action"), action,
g_object_unref);
/* add this widget to the list of proxies */
......@@ -982,7 +982,7 @@ static void
disconnect_proxy (GtkAction *action,
GtkWidget *proxy)
{
g_object_set_data (G_OBJECT (proxy), g_intern_static_string ("gtk-action"), NULL);
g_object_set_data (G_OBJECT (proxy), I_("gtk-action"), NULL);
/* remove proxy from list of proxies */
g_signal_handlers_disconnect_by_func (proxy,
......
......@@ -106,7 +106,7 @@ gtk_action_group_get_type (void)
(GInstanceInitFunc) gtk_action_group_init,
};
type = g_type_register_static (G_TYPE_OBJECT, g_intern_static_string ("GtkActionGroup"),
type = g_type_register_static (G_TYPE_OBJECT, I_("GtkActionGroup"),
&type_info, 0);
}
......@@ -172,7 +172,7 @@ gtk_action_group_class_init (GtkActionGroupClass *klass)
* Since: 2.4
*/
action_group_signals[CONNECT_PROXY] =
g_signal_new ("connect_proxy",
g_signal_new (I_("connect_proxy"),
G_OBJECT_CLASS_TYPE (klass),
0, 0, NULL, NULL,
_gtk_marshal_VOID__OBJECT_OBJECT,
......@@ -195,7 +195,7 @@ gtk_action_group_class_init (GtkActionGroupClass *klass)
* Since: 2.4
*/
action_group_signals[DISCONNECT_PROXY] =
g_signal_new ("disconnect_proxy",
g_signal_new (I_("disconnect_proxy"),
G_OBJECT_CLASS_TYPE (klass),
0, 0, NULL, NULL,
_gtk_marshal_VOID__OBJECT_OBJECT,
......@@ -216,7 +216,7 @@ gtk_action_group_class_init (GtkActionGroupClass *klass)
* Since: 2.4
*/
action_group_signals[PRE_ACTIVATE] =
g_signal_new ("pre_activate",
g_signal_new (I_("pre_activate"),
G_OBJECT_CLASS_TYPE (klass),
0, 0, NULL, NULL,
_gtk_marshal_VOID__OBJECT,
......@@ -237,7 +237,7 @@ gtk_action_group_class_init (GtkActionGroupClass *klass)
* Since: 2.4
*/
action_group_signals[POST_ACTIVATE] =
g_signal_new ("post_activate",
g_signal_new (I_("post_activate"),
G_OBJECT_CLASS_TYPE (klass),
0, 0, NULL, NULL,
_gtk_marshal_VOID__OBJECT,
......
......@@ -85,7 +85,7 @@ gtk_adjustment_get_type (void)
};
adjustment_type =
g_type_register_static (GTK_TYPE_OBJECT, g_intern_static_string ("GtkAdjustment"),
g_type_register_static (GTK_TYPE_OBJECT, I_("GtkAdjustment"),
&adjustment_info, 0);
}
......@@ -213,7 +213,7 @@ gtk_adjustment_class_init (GtkAdjustmentClass *class)
adjustment_signals[CHANGED] =
g_signal_new ("changed",
g_signal_new (I_("changed"),
G_OBJECT_CLASS_TYPE (class),
G_SIGNAL_RUN_FIRST | G_SIGNAL_NO_RECURSE,
G_STRUCT_OFFSET (GtkAdjustmentClass, changed),
......@@ -221,7 +221,7 @@ gtk_adjustment_class_init (GtkAdjustmentClass *class)
_gtk_marshal_VOID__VOID,
G_TYPE_NONE, 0);
adjustment_signals[VALUE_CHANGED] =
g_signal_new ("value_changed",
g_signal_new (I_("value_changed"),
G_OBJECT_CLASS_TYPE (class),
G_SIGNAL_RUN_FIRST | G_SIGNAL_NO_RECURSE,
G_STRUCT_OFFSET (GtkAdjustmentClass, value_changed),
......
......@@ -91,7 +91,7 @@ gtk_alignment_get_type (void)
(GInstanceInitFunc) gtk_alignment_init,
};
alignment_type = g_type_register_static (GTK_TYPE_BIN, g_intern_static_string ("GtkAlignment"),
alignment_type = g_type_register_static (GTK_TYPE_BIN, I_("GtkAlignment"),
&alignment_info, 0);
}
......
......@@ -76,7 +76,7 @@ gtk_arrow_get_type (void)
(GInstanceInitFunc) gtk_arrow_init,
};
arrow_type = g_type_register_static (GTK_TYPE_MISC, g_intern_static_string ("GtkArrow"),
arrow_type = g_type_register_static (GTK_TYPE_MISC, I_("GtkArrow"),
&arrow_info, 0);
}
......
......@@ -82,7 +82,7 @@ gtk_aspect_frame_get_type (void)
};
aspect_frame_type =
g_type_register_static (GTK_TYPE_FRAME, g_intern_static_string ("GtkAspectFrame"),
g_type_register_static (GTK_TYPE_FRAME, I_("GtkAspectFrame"),
&aspect_frame_info, 0);
}
......
......@@ -89,7 +89,7 @@ gtk_button_box_get_type (void)
};
button_box_type =
g_type_register_static (GTK_TYPE_BOX, g_intern_static_string ("GtkButtonBox"),
g_type_register_static (GTK_TYPE_BOX, I_("GtkButtonBox"),
&button_box_info, G_TYPE_FLAG_ABSTRACT);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment