Improve Cedilla handling - based on a patch from Gustavo De Nardin,

Fri Aug 15 16:54:39 2003  Owen Taylor  <otaylor@redhat.com>

        Improve Cedilla handling - based on a patch from Gustavo
        De Nardin, #111334

        * modules/input/imcedilla.c po/POTFILES.in: Input method that
        produces C_WITH_CEDILLA rather than C_WITH_ACUTE for
        dead_acute+c combinations. Make this the default for
        fr and pt.

        * gtk/gtkimmulticontext.c (gtk_im_multicontext_get_slave):
        Use LC_CTYPE instead of LC_MESSAGES to pick the default
        input method.

Fri Aug 15 17:00:19 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkimcontextsimple.c: Fix missing compose sequence
        for Multi_key+c+apostrophe.
This commit is contained in:
Owen Taylor 2003-08-15 21:30:44 +00:00 committed by Owen Taylor
parent 4254bdbb67
commit d270a00d21
10 changed files with 229 additions and 4 deletions

View File

@ -1,3 +1,22 @@
Fri Aug 15 16:54:39 2003 Owen Taylor <otaylor@redhat.com>
Improve Cedilla handling - based on a patch from Gustavo
De Nardin, #111334
* modules/input/imcedilla.c po/POTFILES.in: Input method that
produces C_WITH_CEDILLA rather than C_WITH_ACUTE for
dead_acute+c combinations. Make this the default for
fr and pt.
* gtk/gtkimmulticontext.c (gtk_im_multicontext_get_slave):
Use LC_CTYPE instead of LC_MESSAGES to pick the default
input method.
Fri Aug 15 17:00:19 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtkimcontextsimple.c: Fix missing compose sequence
for Multi_key+c+apostrophe.
Fri Aug 15 21:57:34 2003 Kristian Rietveld <kris@gtk.org>
Merged from stable.

View File

@ -1,3 +1,22 @@
Fri Aug 15 16:54:39 2003 Owen Taylor <otaylor@redhat.com>
Improve Cedilla handling - based on a patch from Gustavo
De Nardin, #111334
* modules/input/imcedilla.c po/POTFILES.in: Input method that
produces C_WITH_CEDILLA rather than C_WITH_ACUTE for
dead_acute+c combinations. Make this the default for
fr and pt.
* gtk/gtkimmulticontext.c (gtk_im_multicontext_get_slave):
Use LC_CTYPE instead of LC_MESSAGES to pick the default
input method.
Fri Aug 15 17:00:19 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtkimcontextsimple.c: Fix missing compose sequence
for Multi_key+c+apostrophe.
Fri Aug 15 21:57:34 2003 Kristian Rietveld <kris@gtk.org>
Merged from stable.

View File

@ -1,3 +1,22 @@
Fri Aug 15 16:54:39 2003 Owen Taylor <otaylor@redhat.com>
Improve Cedilla handling - based on a patch from Gustavo
De Nardin, #111334
* modules/input/imcedilla.c po/POTFILES.in: Input method that
produces C_WITH_CEDILLA rather than C_WITH_ACUTE for
dead_acute+c combinations. Make this the default for
fr and pt.
* gtk/gtkimmulticontext.c (gtk_im_multicontext_get_slave):
Use LC_CTYPE instead of LC_MESSAGES to pick the default
input method.
Fri Aug 15 17:00:19 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtkimcontextsimple.c: Fix missing compose sequence
for Multi_key+c+apostrophe.
Fri Aug 15 21:57:34 2003 Kristian Rietveld <kris@gtk.org>
Merged from stable.

View File

@ -1,3 +1,22 @@
Fri Aug 15 16:54:39 2003 Owen Taylor <otaylor@redhat.com>
Improve Cedilla handling - based on a patch from Gustavo
De Nardin, #111334
* modules/input/imcedilla.c po/POTFILES.in: Input method that
produces C_WITH_CEDILLA rather than C_WITH_ACUTE for
dead_acute+c combinations. Make this the default for
fr and pt.
* gtk/gtkimmulticontext.c (gtk_im_multicontext_get_slave):
Use LC_CTYPE instead of LC_MESSAGES to pick the default
input method.
Fri Aug 15 17:00:19 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtkimcontextsimple.c: Fix missing compose sequence
for Multi_key+c+apostrophe.
Fri Aug 15 21:57:34 2003 Kristian Rietveld <kris@gtk.org>
Merged from stable.

View File

@ -1,3 +1,22 @@
Fri Aug 15 16:54:39 2003 Owen Taylor <otaylor@redhat.com>
Improve Cedilla handling - based on a patch from Gustavo
De Nardin, #111334
* modules/input/imcedilla.c po/POTFILES.in: Input method that
produces C_WITH_CEDILLA rather than C_WITH_ACUTE for
dead_acute+c combinations. Make this the default for
fr and pt.
* gtk/gtkimmulticontext.c (gtk_im_multicontext_get_slave):
Use LC_CTYPE instead of LC_MESSAGES to pick the default
input method.
Fri Aug 15 17:00:19 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtkimcontextsimple.c: Fix missing compose sequence
for Multi_key+c+apostrophe.
Fri Aug 15 21:57:34 2003 Kristian Rietveld <kris@gtk.org>
Merged from stable.

View File

@ -708,6 +708,7 @@ static const guint16 gtk_compose_seqs[] = {
GDK_Multi_key, GDK_a, GDK_diaeresis, 0, 0, 0x00E4, /* LATIN_SMALL_LETTER_A_WITH_DIAERESIS */
GDK_Multi_key, GDK_a, GDK_acute, 0, 0, 0x00E1, /* LATIN_SMALL_LETTER_A_WITH_ACUTE */
GDK_Multi_key, GDK_b, GDK_period, 0, 0, 0x1E03, /* LATIN_SMALL_LETTER_B_WITH_DOT_ABOVE */
GDK_Multi_key, GDK_c, GDK_apostrophe, 0, 0, 0x0107, /* LATIN_SMALL_LETTER_C_WITH_ACUTE */
GDK_Multi_key, GDK_c, GDK_comma, 0, 0, 0x00E7, /* LATIN_SMALL_LETTER_C_WITH_CEDILLA */
GDK_Multi_key, GDK_c, GDK_period, 0, 0, 0x010B, /* LATIN_SMALL_LETTER_C_WITH_DOT_ABOVE */
GDK_Multi_key, GDK_c, GDK_slash, 0, 0, 0x00A2, /* CENT_SIGN */

View File

@ -231,11 +231,8 @@ gtk_im_multicontext_get_slave (GtkIMMulticontext *multicontext)
{
const char *locale;
#ifdef HAVE_LC_MESSAGES
locale = setlocale (LC_MESSAGES, NULL);
#else
locale = setlocale (LC_CTYPE, NULL);
#endif
global_context_id = _gtk_im_module_get_default_context_id (locale);
}

View File

@ -43,6 +43,10 @@ im_am_et_la_LDFLAGS = -rpath $(moduledir) -avoid-version -module $(no_undefined)
im_am_et_la_SOURCES = imam-et.c
im_am_et_la_LIBADD = $(LDADDS)
im_cedilla_la_LDFLAGS = -rpath $(moduledir) -avoid-version -module $(no_undefined)
im_cedilla_la_SOURCES = imcedilla.c
im_cedilla_la_LIBADD = $(LDADDS)
im_cyrillic_translit_la_LDFLAGS = -rpath $(moduledir) -avoid-version -module $(no_undefined)
im_cyrillic_translit_la_SOURCES = imcyrillic-translit.c
im_cyrillic_translit_la_LIBADD = $(LDADDS)
@ -104,6 +108,7 @@ uninstall-local:
module_LTLIBRARIES = \
$(IM_XIM_MODULE) \
im-am-et.la \
im-cedilla.la \
im-cyrillic-translit.la \
im-hangul.la \
im-inuktitut.la \

126
modules/input/imcedilla.c Normal file
View File

@ -0,0 +1,126 @@
/* GTK - The GIMP Toolkit
* Copyright (C) 2000 Red Hat Software
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
* Author: Owen Taylor <otaylor@redhat.com>
*
*/
#include <string.h>
#include <gdk/gdkkeysyms.h>
#include "gtk/gtkintl.h"
#include "gtk/gtkimcontextsimple.h"
#include "gtk/gtkimmodule.h"
GType type_cedilla = 0;
static void cedilla_class_init (GtkIMContextSimpleClass *class);
static void cedilla_init (GtkIMContextSimple *im_context);
static void
cedilla_register_type (GTypeModule *module)
{
static const GTypeInfo object_info =
{
sizeof (GtkIMContextSimpleClass),
(GBaseInitFunc) NULL,
(GBaseFinalizeFunc) NULL,
(GClassInitFunc) cedilla_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof (GtkIMContextSimple),
0,
(GInstanceInitFunc) cedilla_init,
};
type_cedilla =
g_type_module_register_type (module,
GTK_TYPE_IM_CONTEXT_SIMPLE,
"GtkIMContextCedillaTranslit",
&object_info, 0);
}
/* The difference between this and the default input method is the handling
* of C+acute - this method produces C WITH CEDILLA rather than C WITH ACUTE.
* For languages that use CCedilla and not acute, this is the preferred mapping,
* and is particularly important for pt_BR, where the us-intl keyboard is
* used extensively.
*/
static guint16 cedilla_compose_seqs[] = {
GDK_dead_acute, GDK_C, 0, 0, 0, 0x00C7, /* LATIN_CAPITAL_LETTER_C_WITH_CEDILLA */
GDK_dead_acute, GDK_c, 0, 0, 0, 0x00E7, /* LATIN_SMALL_LETTER_C_WITH_CEDILLA */
GDK_Multi_key, GDK_apostrophe, GDK_C, 0, 0, 0x00C7, /* LATIN_CAPITAL_LETTER_C_WITH_CEDILLA */
GDK_Multi_key, GDK_apostrophe, GDK_c, 0, 0, 0x00E7, /* LATIN_SMALL_LETTER_C_WITH_CEDILLA */
GDK_Multi_key, GDK_C, GDK_apostrophe, 0, 0, 0x00C7, /* LATIN_CAPITAL_LETTER_C_WITH_CEDILLA */
GDK_Multi_key, GDK_c, GDK_apostrophe, 0, 0, 0x00E7, /* LATIN_SMALL_LETTER_C_WITH_CEDILLA */
};
static void
cedilla_class_init (GtkIMContextSimpleClass *class)
{
}
static void
cedilla_init (GtkIMContextSimple *im_context)
{
gtk_im_context_simple_add_table (im_context,
cedilla_compose_seqs,
4,
G_N_ELEMENTS (cedilla_compose_seqs) / (4 + 2));
}
static const GtkIMContextInfo cedilla_info = {
"cedilla", /* ID */
N_("Cedilla"), /* Human readable name */
"gtk+", /* Translation domain */
GTK_LOCALEDIR, /* Dir for bindtextdomain (not strictly needed for "gtk+") */
"fr:pt" /* Languages for which this module is the default */
};
static const GtkIMContextInfo *info_list[] = {
&cedilla_info
};
void
im_module_init (GTypeModule *module)
{
cedilla_register_type (module);
}
void
im_module_exit (void)
{
}
void
im_module_list (const GtkIMContextInfo ***contexts,
int *n_contexts)
{
*contexts = info_list;
*n_contexts = G_N_ELEMENTS (info_list);
}
GtkIMContext *
im_module_create (const gchar *context_id)
{
if (strcmp (context_id, "cedilla") == 0)
return GTK_IM_CONTEXT (g_object_new (type_cedilla, NULL));
else
return NULL;
}

View File

@ -102,6 +102,7 @@ gtk/gtkwidget.c
gtk/gtkwindow.c
modules/input/gtkimcontextxim.c
modules/input/imam-et.c
modules/input/imcedilla.c
modules/input/imcyrillic-translit.c
modules/input/imhangul.c
modules/input/iminuktitut.c