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().
This commit is contained in:
committed by
Matthias Clasen
parent
f4bbe8f0de
commit
94eec04267
@ -22,6 +22,7 @@
|
||||
#include "gtkimcontext.h"
|
||||
#include "gtkmain.h" /* For _gtk_boolean_handled_accumulator */
|
||||
#include "gtkmarshalers.h"
|
||||
#include "gtkintl.h"
|
||||
#include "gtkalias.h"
|
||||
|
||||
enum {
|
||||
@ -75,7 +76,7 @@ gtk_im_context_get_type (void)
|
||||
};
|
||||
|
||||
im_context_type =
|
||||
g_type_register_static (G_TYPE_OBJECT, g_intern_static_string ("GtkIMContext"),
|
||||
g_type_register_static (G_TYPE_OBJECT, I_("GtkIMContext"),
|
||||
&im_context_info, G_TYPE_FLAG_ABSTRACT);
|
||||
}
|
||||
|
||||
@ -91,7 +92,7 @@ gtk_im_context_class_init (GtkIMContextClass *klass)
|
||||
klass->set_surrounding = gtk_im_context_real_set_surrounding;
|
||||
|
||||
im_context_signals[PREEDIT_START] =
|
||||
g_signal_new ("preedit_start",
|
||||
g_signal_new (I_("preedit_start"),
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (GtkIMContextClass, preedit_start),
|
||||
@ -100,7 +101,7 @@ gtk_im_context_class_init (GtkIMContextClass *klass)
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
im_context_signals[PREEDIT_END] =
|
||||
g_signal_new ("preedit_end",
|
||||
g_signal_new (I_("preedit_end"),
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (GtkIMContextClass, preedit_end),
|
||||
@ -109,7 +110,7 @@ gtk_im_context_class_init (GtkIMContextClass *klass)
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
im_context_signals[PREEDIT_CHANGED] =
|
||||
g_signal_new ("preedit_changed",
|
||||
g_signal_new (I_("preedit_changed"),
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (GtkIMContextClass, preedit_changed),
|
||||
@ -118,7 +119,7 @@ gtk_im_context_class_init (GtkIMContextClass *klass)
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
im_context_signals[COMMIT] =
|
||||
g_signal_new ("commit",
|
||||
g_signal_new (I_("commit"),
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (GtkIMContextClass, commit),
|
||||
@ -128,7 +129,7 @@ gtk_im_context_class_init (GtkIMContextClass *klass)
|
||||
G_TYPE_STRING);
|
||||
|
||||
im_context_signals[RETRIEVE_SURROUNDING] =
|
||||
g_signal_new ("retrieve_surrounding",
|
||||
g_signal_new (I_("retrieve_surrounding"),
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (GtkIMContextClass, retrieve_surrounding),
|
||||
@ -136,7 +137,7 @@ gtk_im_context_class_init (GtkIMContextClass *klass)
|
||||
_gtk_marshal_BOOLEAN__VOID,
|
||||
G_TYPE_BOOLEAN, 0);
|
||||
im_context_signals[DELETE_SURROUNDING] =
|
||||
g_signal_new ("delete_surrounding",
|
||||
g_signal_new (I_("delete_surrounding"),
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (GtkIMContextClass, delete_surrounding),
|
||||
@ -209,7 +210,7 @@ gtk_im_context_real_get_surrounding (GtkIMContext *context,
|
||||
if (!info)
|
||||
{
|
||||
info = &local_info;
|
||||
g_object_set_data (G_OBJECT (context), g_intern_static_string ("gtk-im-surrounding-info"), info);
|
||||
g_object_set_data (G_OBJECT (context), I_("gtk-im-surrounding-info"), info);
|
||||
info_is_local = TRUE;
|
||||
}
|
||||
|
||||
@ -231,7 +232,7 @@ gtk_im_context_real_get_surrounding (GtkIMContext *context,
|
||||
if (info_is_local)
|
||||
{
|
||||
g_free (info->text);
|
||||
g_object_set_data (G_OBJECT (context), g_intern_static_string ("gtk-im-surrounding-info"), NULL);
|
||||
g_object_set_data (G_OBJECT (context), I_("gtk-im-surrounding-info"), NULL);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user