Commit Graph

82 Commits

Author SHA1 Message Date
Rico Tzschichholz
f3bc6619eb Remove deprecated gtk_im_multicontext_append_menuitems 2016-10-23 18:23:59 +02:00
Benjamin Otte
c6219c913f immodule: Remove unused parameter 2015-08-20 14:42:04 +02:00
Matthias Clasen
913e10fe3b Fix the previous commit
The C_() macro only takes string literals.
Use g_dpgettext2() instead
2015-02-23 22:25:11 -05:00
Matthias Clasen
b0b38c106d Make gtk-im-context-none work
This was added a few years ago, as a way to have _no_ im context
at all. But it didn't actually work. Make it work, and streamline
the handling of none by moving it all to gtkimmodule.c.

As part of this, add context to the translated names of all
im modules we ship.
2015-02-23 22:06:02 -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
Christian Persch
781b85088f im: Deprecate gtk_im_multicontext_append_menuitems
Bug #701840.
2013-06-09 09:51:55 -04:00
Adel Gadllah
13a821e70b gkimmulticontext: Remove left over debug print
Remove the g_print debug statement from propagate_purpose.

https://bugzilla.gnome.org/show_bug.cgi?id=682747
2012-08-26 22:26:23 -04:00
Matthias Clasen
870c39fafe GtkIMMultcontext: Propagate input purpose and hints
The lack of this was pointed out by Carlos Garnacho in
https://bugzilla.gnome.org/show_bug.cgi?id=651244
2012-08-25 15:42:42 -04:00
Rui Matos
a0f155e839 immulticontext: Always check if the global context id changed
This makes sure that if the gtk-im-module setting changes we update
our internal state immediately on the next event whichever it is.

In particular this fixes the case of the gtk-im-module setting
changing while the user is typing and the slave context remaining the
same, effectively ignoring the setting change.

https://bugzilla.gnome.org/show_bug.cgi?id=675365
2012-05-08 00:35:30 +02:00
Benjamin Otte
7844e8089c types: Clean up gtkwidget.h includes
In particular gtksettings.h and gtkstylecontext.h needed to be included
in lots of places now.

Also, I order the includes alphabetically in a bunch of headers.
2012-03-03 19:45:03 +01:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Benjamin Otte
e1f4bd6495 gtk: Empty gtkimmodule.h
Move the remaining struct definition into gtkimcontextinfo.h and include
that header in gtk.h. gtkimmodule.h is now an empty header. We should
probably deprecate it somehow.

This is also necessary so headers used in gtk .c files don't include
gtk.h which in turn includes all the deprecated headers which we want to
avoid so we can include them with deprecation warnings turned off.
2011-11-08 21:14:05 +01:00
Benjamin Otte
c2da143aa6 immodule: Move private functions to a private header 2011-11-08 21:14:05 +01:00
Benjamin Otte
bd97127e6c immodule: Fix includes
Make includes not rely on gtkimmodule.h including gtk.h. This will be
important once we remove gtkimmodule from the include files.

That way, we can achieve not pulling deprecated headers automatically.
2011-11-08 21:14:05 +01:00
Michael Natterer
2688ccdbc4 gtk: clean up the private horror
- add gtkmodulesprivate.h and move stuff there from gtkprivate.h
- add gtkprivate.c and move stuff there from gtkmain.c
- add gtkwin32.c and move stuff there from gtkmain.c
- don't redefine GTK_DATADIR and friends in gtkprivate.h
- have _gtk_get_datadir() and friends on all platforms
- remove the horrid hacks where gtkprivate.h can't be included,
  or must be included later due to redefinition of the compile-time
  directories
2011-10-22 23:53:55 +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
Benjamin Otte
a7e6d6c4b4 gtk: Avoid GdkDrawable usage, including needless casts 2010-12-02 20:21:02 +01:00
Benjamin Otte
9f47be2216 gtk: gdk_drawable_get_screen/visual => gdk_window_get_screen/visual 2010-09-26 15:11:33 +02:00
Javier Jardón
3a752e03a8 gtkimmulticontext: move documentation to inline comments 2010-09-01 20:37:39 +02:00
Javier Jardón
e2a662b93d GtkIMMulticontext: move public members to private structure 2010-07-13 19:40:48 +02:00
Javier Jardón
94fd7a3502 Use accessor functions to access GtkCheckMenuItem 2010-07-13 19:40:46 +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
9fc642019e Allow running without any im context
Setting GtkSettings::im-module to gtk-im-context-none will make
GtkIMMultiContext just pass through.
2010-02-09 13:41:57 -05:00
Matthias Clasen
6b7fef09ca Don't forget to set the client window on the slave 2009-09-04 20:34:09 -04:00
Matthias Clasen
1c0ecc0380 Rework the way IM contexts are set
Add a function to obtain the effective context id, and reset the slave
only when the effective context id is different from the current context
id, when setting a client window and on focus in. This might fix
bug 593868 and bug 567124.
2009-09-04 18:09:44 -04:00
Matthias Clasen
b9905c8fb5 Revert changes for bug 567124. Instead of trying to avoid
setting up the im context before the widget is realized, just
        reset it when the client window is set.

        * gtk/gtkimmulticontext.c: Reset the slave when a client window
        is set.

        * gtk/gtkimmodule.c
        * gtk/gtktextview.c: Revert changes for bug 567124.

svn path=/trunk/; revision=22214
2009-01-25 03:38:27 +00:00
Matthias Clasen
5d4bb27b74 Bug 450716 – New API to change global IM
Requested by Daniel Elstner.

        * gtk/gtk.symbols:
        * gtk/gtkimmulticontext.[hc] (gtk_im_multicontext_set_context_id):
        New function to set the context id on a GtkIMMulticontext.

        * gtk/gtkentry.c:
        * gtk/gtktextview.c: Add a ::im-module property that can be
        set to override the global setting for the im module to be used.


svn path=/trunk/; revision=22113
2009-01-13 19:15:42 +00:00
Matthias Clasen
5cfd038335 Use C_() instead of Q_(). String change!
2008-10-26  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkaccellabel.c:
        * gtk/gtkcalendar.c:
        * gtk/gtkcellrendereraccel.c:
        * gtk/gtkcellrendererprogress.c:
        * gtk/gtkimmulticontext.c:
        * gtk/gtkrecentchoosermenu.c:
        * gtk/gtkvolumebutton.c: Use C_() instead of Q_(). String change!



svn path=/trunk/; revision=21716
2008-10-27 01:42:28 +00:00
Matthias Clasen
1c8da0ca75 Bug 553086 – hard to see current immodule
2008-09-29  Matthias Clasen  <mclasen@redhat.com>

        Bug 553086 – hard to see current immodule

        * gtk/gtkimmulticontext.c (gtk_im_multicontext_append_menuitems):
        Display the actually selected context in the system menuitem.
        Complaint by Akira Tagoh.


svn path=/trunk/; revision=21548
2008-09-30 00:58:39 +00:00
Matthias Clasen
680c460ff2 Add a getter for the the sealed context_id field.
2008-09-29  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtk.symbols:
        * gtk/gtkimmulticontext.[hc] (gtk_im_multicontext_get_context_id):
        Add a getter for the the sealed context_id field.


svn path=/trunk/; revision=21546
2008-09-29 20:55:31 +00:00
Christian Persch
34b3bb8c5f Bug 552837 – mem leak in gtkimmulticontext
* gtk/gtkimmulticontext.c: (gtk_im_multicontext_get_slave): Plug mem
 	leak.

svn path=/trunk/; revision=21445
2008-09-19 12:28:30 +00:00
Sven Neumann
4c33ae06be gtk/gtkdnd-quartz.c gtk/gtkdnd.c gtk/gtkentry.c gtk/gtkfilesel.c
2008-08-11  Sven Neumann  <sven@gimp.org>

	* gtk/gtkdnd-quartz.c
	* gtk/gtkdnd.c
	* gtk/gtkentry.c
	* gtk/gtkfilesel.c
	* gtk/gtkimcontextsimple.c
	* gtk/gtkimmulticontext.c
	* gtk/gtkoptionmenu.c
	* gtk/gtkplug.c
	* gtk/gtkrecentchooserdefault.c
	* gtk/gtkscrolledwindow.c
	* gtk/gtksocket-x11.c: use canonical signal names in some more
	places that I missed earlier.


svn path=/trunk/; revision=21069
2008-08-11 13:36:15 +00:00
Cody Russell
57223c9a05 Revert name change
svn path=/trunk/; revision=20724
2008-07-01 22:57:50 +00:00
Cody Russell
fce9c8b7d4 Practically everything changed.
2008-06-30  Cody Russell  <bratsche@gnome.org>

        * Practically everything changed.

        Change	all references	of GIMP	Toolkit	(and variations	of it)
        to GTK+	Toolkit, showing no mercy at all to our	beloved
	ancestry. (#540529)


svn path=/trunk/; revision=20709
2008-06-30 23:01:56 +00:00
Johan Dahlin
d97cdbdf53 Include "config.h" instead of <config.h> Command used: find -name
2008-06-21  Johan Dahlin  <jdahlin@async.com.br>

    * *.[ch]: Include "config.h" instead of <config.h>
    Command used:
    find -name \*.[ch]|xargs perl -p -i -e 's/^#include <config.h>/#include "config.h"/g'
    Rubberstamped by Mitch and Tim


svn path=/trunk/; revision=20669
2008-06-22 14:28:52 +00:00
Behdad Esfahbod
d76e3d552e Bug 503071 – Application direction changes to right to left even if
2008-06-11  Behdad Esfahbod  <behdad@gnome.org>

        Bug 503071 – Application direction changes to right to left even if
        theres no translation

        * configure.in: Bump glib requirement.

        * gtk/gtkaccellabel.c
        (_gtk_accel_label_class_get_accelerator_label):
        * gtk/gtkactiongroup.c (dgettext_swapped):
        * gtk/gtkbuilder.c (gtk_builder_class_init):
        * gtk/gtkbuilderparser.c (_dpgettext),
        (_gtk_builder_parser_translate):
        * gtk/gtkfilechooserdefault.c (list_size_data_func):
        * gtk/gtkimmulticontext.c (gtk_im_multicontext_append_menuitems):
        * gtk/gtkintl.h:
        * gtk/gtkmain.c (setlocale_initialization),
        (do_pre_parse_initialization), (gettext_initialization):
        * gtk/gtkstock.c (gtk_stock_lookup), (sgettext_swapped):
        Use g_dgettext() and g_dngettext().


svn path=/trunk/; revision=20358
2008-06-11 23:40:35 +00:00
14:27:34 Tim Janik
4d1892710f Bug 503071 - Application direction changes to right to left even if theres
2008-05-20 14:27:34  Tim Janik  <timj@imendio.com>

        * reverted recent unapproved changes by Yair Hershkovitz, regarding:
        Bug 503071 - Application direction changes to right to left even if theres no translation.



svn path=/trunk/; revision=20116
2008-05-20 13:03:41 +00:00
Yair Hershkovitz
670775d8d8 call g_i18n_init() in gettext_initialization(). do gettext_initialization
2008-05-11  Yair Hershkovitz  <yairhr@gmail.com>

        * gtk/gtkmain.c: call g_i18n_init() in gettext_initialization(). do
        gettext_initialization only once.

        *  gtk/gtkbuilderparser.c: use glib i18n api. removed dpgettext() as it
        duplicates g_dpgettext() and added _g_dpgettext() to wrap g_dpgettext 
        with the extended functionality that was in the removed dpgettext().

        * gtk/gtkaccellabelc:
        * gtk/gtkstock.c:
        * gtk/gtkimmulticontext.c:
        * gtk/gtkactiongroup.c:
        * gtk/gtkintl.h: use glib i18n api.


svn path=/trunk/; revision=20091
2008-05-11 09:49:30 +00:00
Matthias Clasen
f8a1be3a04 Add a gtk-im-module GTK setting
2007-12-17  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtksettings.c: Add a gtk-im-module GTK setting
        * gdk/win32/gdkproperty-win32.c:
        * gdk/x11/gdksettings.c: ...and back it by a Gtk/IMModule X setting.

        * gtk/gtkimmodule.[hc]:
        * gtk/gtkimmulticontext.[hc]: When determining the default context,
        look at the gtk-im-module setting, and listen for changes to the
        setting.  (#502446, Akira Tagoh)


svn path=/trunk/; revision=19195
2007-12-18 03:24:17 +00:00
Tor Lillqvist
e6a490588f Proper fix for #396175:
2007-01-17  Tor Lillqvist  <tml@novell.com>

	Proper fix for #396175:

	* gtk/gtkimmulticontext.c: Revert change by Hans Breuer below: Do
	include gtkprivate.h. On Win32 we do want to use the redefinition
	of GTK_LOCALEDIR as a call to the function _gtk_get_localedir().

	* gtk/gtkimmodule.c: Instead, correct the prefix also on
	simple_context_info.domain_dirname. Do the prefix corrections
	always on Win32, not just when GTK_LIBDIR is defined. i.e., until
	now they were done only in the autoconfiscated gcc builds. Hans
	needs to make sure GTK_LIBDIR and GTK_LOCALEDIR are defined also
	in MSVC builds now.
	(correct_localedir_prefix): New function, like
	correct_libdir_prefix(), but for GTK_LOCALEDIR.
	(_gtk_im_module_list): Call correct_localedir_prefix() on
	simple_context_info.domain_dirname.


svn path=/trunk/; revision=17161
2007-01-17 01:18:42 +00:00
Hans Breuer
3f403cde24 don't include "gtkprivate.h" to avoid differing definitions of
2007-01-13  Hans Breuer <hans@breuer.org>

	* gtk/gtkimmulticontext.c : don't include "gtkprivate.h" to avoid
	differing definitions of GTK_LOCALEDIR (bug #396175).

	* gtk/gtktreeview.c : use g_snprintf instead of snprintf, which is
	not available everywhere

	* gtk/makefile.msc.in : updated

svn path=/trunk/; revision=17137
2007-01-13 21:13:28 +00:00
Matthias Clasen
c851a85dc3 Be careful to not override GTK+ translations with the translations of the
2006-12-23  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkimmulticontext.c: Be careful to not override
        GTK+ translations with the translations of the input
        method.  (#317080, Tor Lillqvist)

        * modules/input/imcedilla.c: Use standard macros
        for translation domain and locale dir.
2006-12-23 21:25:16 +00:00
Matthias Clasen
113f364a37 More of the same 2006-05-14 04:25:34 +00:00
Matthias Clasen
f26aad1916 Boilerplate reduction 2006-05-02 23:56:43 +00:00
Matthias Clasen
0a314300cf Convert to use instance private data.
2006-01-10  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkimmulticontext.c:
	* gtk/gtkhsv.c:
	* gtk/gtkhandlebox.c: Convert to use instance private data.
2006-01-11 03:36:12 +00:00
Matthias Clasen
94eec04267 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().
2005-09-01 05:11:46 +00:00
Matthias Clasen
f4bbe8f0de Also intern static strings passed to g_object_set_data() 2005-08-31 17:58:55 +00:00
Matthias Clasen
c09cc89317 Intern type names in code generated by glib-mkenums, too.
2005-08-31  Matthias Clasen  <mclasen@redhat.com>

	* gdk/Makefile.am:
	* gtk/Makefile.am: Intern type names in code generated by
	glib-mkenums, too.

	* gtk/*.c:
	* gdk/x11/*.c:
	* gdk/*.c: Intern type names before registering the type to avoid
	unnecessary copies.
2005-08-31 16:53:43 +00:00