Commit Graph

122 Commits

Author SHA1 Message Date
Benjamin Otte
dda959332f imcontextsimple: Remove unused variable on win32 2016-02-11 03:44:47 +01:00
Matthias Clasen
6f74de5331 Don't include the builtin sequence table in multiple places
The table is defined as static const guint16 [], so it really
should only be included in one source file.
2016-01-30 22:52:13 -05:00
Matthias Clasen
b3b048906c im context simple: Protect shared data structures
Since a41f02f9b1, GtkIMContextSimple
uses threads to load X Compose files. It does that every time a new
im context object is initialized, so we can easily end up with multiple
threads accessing the shared global_tables list at the same time.

Use a lock to prevent that.

https://bugzilla.redhat.com/show_bug.cgi?id=1276432
2016-01-18 13:57:39 -05:00
Matthias Clasen
5cc6fb7644 Avoid an unused variable warning
This was introduced with the recent win32 build fix.
2015-11-16 07:20:18 -05:00
Chun-wei Fan
d01ea18dc3 gtkimcontextsimple.c: Use X11_DATA_PREFIX only on X11/Wayland
Only use the hard-coded build-time path given by X11_PREFIX on X11 and
Wayland where a X11 package is normally available.  On other platforms,
get the datadir of the running system and mimic the behavior by
constructing the path dynamically.  This avoids hardcoding the path for
searching for compose tables where we want to have relocatability.

This fixes the build on Windows/MSVC as well, where we don't normally have
any X11 packages available.

https://bugzilla.gnome.org/show_bug.cgi?id=757984
2015-11-13 07:39:54 -05:00
Matthias Clasen
5548665351 im context simple: Add documentation
Document that GtkIMContextSimple is loading additional compose
tables. Also document Ctrl-Shift-u.
2015-10-09 00:19:41 -04:00
Takao Fujiwara
a41f02f9b1 GtkIMContextSimple: Load locale compose tables dynamically.
Load /usr/share/X11/locale/$LOCALE/Compose and $HOME/.XCompose
dynamically.

https://bugzilla.gnome.org/show_bug.cgi?id=721120
2015-10-09 00:19:41 -04:00
Takao Fujiwara
4535d09bea GtkIMContextSimple: Change guint to guint16 in gtkimcontextsimple.c
GtkComposeTable and GtkComposeTableCompact use guint16 for the data.

https://bugzilla.gnome.org/show_bug.cgi?id=721120
2015-10-08 22:35:52 -04:00
Takao Fujiwara
48a2477f2d GtkIMContextSimple: export _gtk_check_compact_table() and GtkComposeTable
Some functions need to be exported if X11 compose files are loaded.

https://bugzilla.gnome.org/show_bug.cgi?id=721120
2015-10-08 22:35:52 -04:00
Paolo Borelli
ca8f6dd7f6 cleanup: do not set members to null in finalize 2015-08-01 21:31:49 +02:00
Matthias Clasen
9f24b54786 Code cleanup
Use g_slist_free_full more consistently. This commit just converts
the obvious cases where g_slist_forall is directly followed by
g_slist_free.
2015-07-31 22:23:35 -04:00
Matthias Clasen
6ee9281a24 im context: Fix compiler warnings
Fix warnings due to -Wdeclaration-after-statement and -Wshadow.
2015-06-02 09:08:15 -04:00
Matthias Clasen
25308477e7 Silence a compiler warning 2015-02-22 17:01:52 -05:00
Takao Fujiwara
9f1724b355 Update gtk_compose_seqs_compact[] table for French layout bepo variant.
fr(bepo) XKB keymap sends dead_stroke with AltGr+l keys
and gtk-im-simple-context should send '/' with
dead_stroke+dead_stroke keys but gtkimcontextsimpleseqs.h
was not sorted in the descending order and failed to get
dead_stroke.
Also need to add dead_currency for Shift+AltGr+e and
dead_belowcomma for Shift+AltGr+Cedilla.

https://bugzilla.gnome.org/show_bug.cgi?id=736250
2014-09-10 21:30:46 -04:00
Evan Nemerson
e596e58c51 gtk: port missing array annotations from Vala bindings
https://bugzilla.gnome.org/show_bug.cgi?id=730745
2014-05-27 21:10:32 -07:00
William Jon McCann
e34bd4137d docs: use apostrophes in *n't 2014-02-07 13:32:47 -05:00
Takao Fujiwara
4d6c509943 GtkIMContextSimple: Update compose table
This adds Multi_key + f + i, as well as other sequences,
mainly Greek.

https://bugzilla.gnome.org/show_bug.cgi?id=710510
2013-12-14 15:34:54 -05:00
Emmanuele Bassi
0899ef7cc9 gtk: Use new macros for defining private data
https://bugzilla.gnome.org/show_bug.cgi?id=702996
2013-07-09 09:30:02 +01:00
Michael Natterer
9eea724e3b gtk: convert keyvals to unicode before committing to the imcontext
(cherry picked from commit 1eb0d98d73)
2012-11-30 15:10:51 +01:00
Michael Natterer
f619f91a8f gtk: add more OSX special casing for the deadacute and deaddoubleacute keys
So " plus foo prduces foo-with-diaereses and ' plus c produces
c-with-cedilla.
(cherry picked from commit c0102b3089)
2012-11-30 15:09:46 +01:00
William Jon McCann
b3a65248f5 Fix a typo in the the comments
https://bugzilla.gnome.org/show_bug.cgi?id=682724
2012-08-26 22:54:55 +08:00
Michael Natterer
c1cfcd03a5 quartz: add a special case to GtkIMContextSimply for entering '"'
Turn dead_doubleacute plus space into '"' and not into a double
acute because that's the way to enter double quotes on the
US-International keyboard layout.
(cherry picked from commit 71164e57b9)
2012-05-10 11:06:09 +02:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Matthias Clasen
e2bde55277 Remove leftover debug spew 2012-02-14 13:08:27 -05:00
Matthias Clasen
3c70a12785 GtkImContextSimple: fix tentative match handling
When switching to the compact table format, we inadvertedly lost
the 'tentative match' handling which allows to complete longer
compose sequences even if a prefix is a complete sequence.
This was pointed out in bug 666710.
2011-12-29 23:42:03 -05:00
Matthias Clasen
694bbf4ac0 Cosmetic changes to comments 2011-12-29 23:42:03 -05:00
Michael Natterer
87cc0dc79f gtk: use the new modifier API instead of GTK_DEFAULT_ACCEL_MOD_MASK
in gtkimcontextsimple and gtktreeview, which are the easy places,
but also true bugfixes, because on OSX we can't use the virtual META
here, we needs MOD2 as delivered in key events.
2011-10-07 09:33:07 +02:00
Michael Natterer
0abe8ce27b gtk: remove the private GTK_NO_TEXT_INPUT_MOD_MASK
and use the new public modifier abstraction API.
2011-09-27 11:34:19 +02:00
Michael Natterer
2a8be23d17 gtk: fix entering of Option-foo symbols on the Mac
define GTK_NO_TEXT_INPUT_MOD_MASK in gtkprivate.h
and use it in the IM contexts, so Option-foo is no longer
filtered away.
2011-09-26 16:01:50 +02:00
Jasper St. Pierre
ff9eb56c6e Don't only use ch != 0 to check if a character is a control char.
https://bugzilla.gnome.org/show_bug.cgi?id=644976
2011-03-16 20:09:14 -04:00
Pavel Holejsovsky
374e76a19d [GI] Mark unintrospectable constructs as (skip)
Also adds 'Rename to:' annotation to some constructs replacing the
skipped ones.
2011-01-20 13:57:21 +01:00
Pavel Holejsovsky
a1c297a310 [GI] Cosmetic cleanups of annotations and doc comments
This change does not introduce any functionality change, mostly
cosmtic cleanups, like re-linebreak when introduced annotations messed
up indentation or whitespace errors fixes.
2011-01-18 17:31:59 +01:00
Matthias Clasen
b5c6904c2f Drop explicit includes of gdkkeysyms.h
These are no longer needed. At the same time, port gtkimcontextsimpleseqs.h
to use the new GDK_KEY_ symbols.
2011-01-04 12:21:41 -05:00
Benjamin Otte
a7e6d6c4b4 gtk: Avoid GdkDrawable usage, including needless casts 2010-12-02 20:21:02 +01:00
Ryan Lortie
56d2590b49 GtkIMContextSimple: avoid gdk_window_get_user_data
We lookup a widget to call a function on GtkWidget that ends up just
performing an operation directly on the GdkWindow again anyway
(beeping).  There's already fallback code at the point of the call that
does exactly that anyway, so just do that all of the time.
2010-10-20 23:58:20 +02:00
Matthias Clasen
f53ad33994 Remove GtkObject completely 2010-09-26 22:18:19 -04:00
Benjamin Otte
2ee8fdb79b gtk: gdk_drawable_get_display() => gdk_window_get_display() 2010-09-26 15:11:33 +02:00
Benjamin Otte
9f47be2216 gtk: gdk_drawable_get_screen/visual => gdk_window_get_screen/visual 2010-09-26 15:11:33 +02:00
Colin Walters
913cdf3be7 GDK: Prefix key names with KEY_
The keysyms create a lot of potential namespace conflicts for
C, and are especially problematic for introspection, where we take
constants into the namespace, so GDK_Display conflicts with GdkDisplay.

For C application compatiblity, add gdkkeysyms-compat.h which uses
the old names.

Just one user in GTK+ continues to use gdkkeysyms-compat.h, which is
the gtkimcontextsimple.c, since porting that requires porting more
custom Perl code.
2010-09-08 18:51:44 -04:00
Javier Jardón
a47e5483b6 gtkimcontextsimple: move documentation to inline comments 2010-09-01 20:37:39 +02:00
Javier Jardón
1e5d7c0225 Use GtkFooPrivate instead GtkFooPriv 2010-08-27 04:48:23 +02:00
Javier Jardón
47e824a5e4 GtkImageMenuItem: move public members to private structure 2010-07-13 19:40:48 +02:00
Javier Jardón
0a07e9733b gtk/: fully remove gtkalias hacks
https://bugzilla.gnome.org/show_bug.cgi?id=623845
2010-07-10 02:51:26 +02:00
Matthias Clasen
c08ed56f13 Allow holding compose key while entering a sequence
This broke when we started allowing Super, Hyper and Meta as
accel modifiers. See bug 601959.
2009-11-28 21:47:36 -05:00
Matthias Clasen
4c26d99d3e Update compose sequences
This patch includes additions to the X.org Compose file from the
last year. Patch by Peter Hutterer
2009-10-25 23:42:58 -04:00
Yevgen Muntyan
3c510f028f Use standard mac shortcuts
This changes Ctrl-X, Ctrl-C, etc. to Cmd-X, Cmd-C, etc. Also,
Alt-Left and Alt-Right in text widgets bound to Ctrl-Left and
Ctrl-Right actions

https://bugzilla.gnome.org/show_bug.cgi?id=530351
2009-10-26 00:03:05 +01:00
Tor Lillqvist
934014af3d Bug 145058 - Inputting "^^" requires four keystrokes on Win32, differs
2009-01-29  Tor Lillqvist  <tml@novell.com>

	Bug 145058 - Inputting "^^" requires four keystrokes on Win32,
	differs from platform default behaviour

	* gtk/gtkimcontextsimple.c
	(check_win32_special_case_after_compact_match): New
	function. Called from check_compact_table() after a table-based
	match has committed a character. In case there was two identical
	dead accents in the input, another copy of the spacing accent that
	was already committed is committed. This fixes #145058.

	(check_win32_special_cases): New function. Called first from
	gtk_im_context_simple_filter_keypress(). This fixes another
	problem: a dead accent followed by a space should commit the
	corresponding spacing accent. The compose tables from X commit
	another character in two cases and we want to override that on
	Windows.

	Add GTK_NOTE (MISC) debugging output to this code.


svn path=/trunk/; revision=22253
2009-01-29 13:43:42 +00:00
Simos Xenitellis
41639683d9 Closes #557420 – Some compose sequences don't work anymore
svn path=/trunk/; revision=21843
2008-12-03 16:19:45 +00:00
Simos Xenitellis
77a980ec79 Closed #555625 – Updated gtk_compose_seqs_compact table (gtkimcontextsimpleseqs.h)
svn path=/trunk/; revision=21634
2008-10-12 16:11:48 +00:00
Simos Xenitellis
a3fe407624 Fixed Bug 555000, check_algorithmically() applies to deadkey keysyms only.
svn path=/trunk/; revision=21623
2008-10-10 08:21:54 +00:00