Commit Graph

265 Commits

Author SHA1 Message Date
64977cb1bc Massive code cleanup (bug #429422)
svn path=/trunk/; revision=33432
2007-04-19 18:53:33 +00:00
cba3097cad ** Fixes bug #419524
2007-03-20  Matthew Barnes  <mbarnes@redhat.com>

	** Fixes bug #419524

	* Include <glib/gi18n.h> instead of <libgnome/gnome-i18n.h>.

	* e-util/e-xml-utils.c (e_xml_get_child_by_name_by_lang_list):
	* mail/em-migrate.c (emm_setup_initial):
	* shell/e-component-registry.c (query_components):
	* shell/e-shell-settings-dialog.c (load_pages):
	* shell/e-shell-window-commands.c (command_quick_reference):
	* tools/killev.c (main):
	Use g_get_language_names() instead of gnome_i18n_get_language_list().

	* e-util/e-util.c: Remove e_gettext().

	* e-util/Makefile.am: Remove e-i18n.h.


svn path=/trunk/; revision=33319
2007-03-20 17:23:58 +00:00
d328ab72d5 ** Fixes bug #357216
2006-02-08  Matthew Barnes  <mbarnes@redhat.com>

	** Fixes bug #357216

	* widgets/text/e-entry.c: Remove "font", "fontset", and "gdk_font"
	properties, since they forward gets and sets to non-existant
	properties in entry->item.

	* widgets/table/e-table-field-chooser-item.c:
	* widgets/table/e-table-field-chooser-item.h:
	* widgets/table/e-table-group-container.c:
	* widgets/table/e-table-group-container.h:
	Replace deprecated GdkFont with PangoFontDescription.

	* widgets/table/e-table-header-item.c:
	* widgets/table/e-table-header-item.h:
	Replace deprecated GdkFont with PangoFontDescription.
	Rename "fontset" property to "font-desc", and change the property
	type to a boxed PangoFontDescription.


svn path=/trunk/; revision=33185
2007-02-08 19:34:11 +00:00
16e935ac6a Fixes bug #357970
2006-09-27  Matthew Barnes  <mbarnes@redhat.com>

	Fixes bug #357970

	* text/e-text.c (e_text_unrealize): Don't call deprecated GLib / GDK
	functions.

svn path=/trunk/; revision=33050
2006-12-04 15:45:50 +00:00
7a205fe6d0 ** Fixes bug #352450
2006-08-23  Matthew Barnes  <mbarnes@redhat.com>

	** Fixes bug #352450

	* misc/e-canvas-background.c:
	* misc/e-cursors.c:
	* misc/e-map.c:
	* misc/e-reflow.c:
	* misc/e-task-widget.c:
	* misc/gal-combo-box.c:
	* table/e-cell-text.c:
	* table/e-cell-toggle.c:
	* table/e-table-field-chooser-item.c:
	* table/e-table-field-chooser.c:
	* table/e-table-header-item.c:
	* table/e-table-header-utils.c:
	* table/e-table-item.c:
	* table/e-table.c:
	* table/e-tree-memory.c:
	* table/e-tree-sorted.c:
	* table/e-tree.c:
	* table/e-text.c:
	Replace deprecated GLib and GDK function calls.

svn path=/trunk/; revision=32783
2006-09-18 13:06:49 +00:00
3bd80dbe0b ** Fixes 342313. Use GTK_CHECK_VERSION instead of GTK_2_2.
** Fixes 342313.
* text/e-text.c: Use GTK_CHECK_VERSION instead of GTK_2_2.

svn path=/trunk/; revision=32365
2006-07-21 05:47:37 +00:00
ee6d562880 Added cairo font rendering to ECell and EText.
svn path=/trunk/; revision=32359
2006-07-20 08:24:31 +00:00
accf651625 Revert the previous patch. Requires rework.
2006-07-10  Harish Krishnaswamy  <kharish@novell.com>

	* table/e-cell-text.c: (ect_unrealize), (build_layout):
	* text/e-text.c: (reset_layout): Revert the previous
	patch. Requires rework.

svn path=/trunk/; revision=32272
2006-07-10 15:16:42 +00:00
891d8bfc6a Added code for Resize Transparency with Cairo drawing. Added code to
2006-07-10  Rajeev ramanathan <rajeevramanathan_2004@yahoo.co.in>

Added code for Resize Transparency with Cairo drawing.
Added code to render ECell and EText text items with
antialiasing, hinting and sub-pixel ordering with cairo.

svn path=/trunk/; revision=32270
2006-07-10 14:02:36 +00:00
25909f3722 ** Fixes bug #341354. Plugged memory leak.
2006-07-06  Hiroyuki Ikezoe  <poincare@ikezoe.net>

	** Fixes bug #341354.
	* text/e-text.c: (e_text_preedit_changed_cb):
	Plugged memory leak.

svn path=/trunk/; revision=32252
2006-07-07 14:05:22 +00:00
f8176cb325 damned broken pipes! where's the plummer
svn path=/trunk/; revision=31372
2006-01-30 12:28:43 +00:00
64ba00a2b2 ** Fixes bug #220286
2006-01-15  Srinivasa Ragavan  <sragavan@novell.com>

	** Fixes bug #220286

	* text/e-text.c: (tooltip_ungrab), (_do_tooltip), (e_text_event):
	Added a ungrab for keyboard, so that it hides the tooltip.

svn path=/trunk/; revision=31185
2006-01-15 18:02:06 +00:00
97f475b2dd Fix code style cruft from the previous commit
2006-01-11  Harish Krishnaswamy  <kharish@novell.com>

* Fix code style cruft from the previous commit

svn path=/trunk/; revision=31140
2006-01-11 13:09:09 +00:00
dcaef2dcba Add the width to the pango layout.
2006-01-11  Johnny Jacob  <johnnyjacob@gmail.com>

* text/e-text.c (e_text_set_property): Add the width to
the pango layout.

svn path=/trunk/; revision=31138
2006-01-11 13:00:19 +00:00
aaf0cb36d6 On Win32, use bootstrap import library for libemiscwidgets, which hasn't
2005-09-28  Tor Lillqvist  <tml@novell.com>

	* text/Makefile.am: On Win32, use bootstrap import library for
	libemiscwidgets, which hasn't been built yet when we come
	here. Drop several overlapping CFLAGS. EXTRA_GNOME_CFLAGS
	should be enough. Install in privsolib instead of privlib (no
	difference on Unix). Use NO_UNDEFINED. Link with all needed
	libraries to satisfy the -no-undefined used on Windows.

svn path=/trunk/; revision=30409
2005-09-28 11:50:56 +00:00
e967f26d1a Resolve #309074
2005-08-21  Francisco Javier F. Serrador  <serrador@cvs.gnome.org>

	* Resolve #309074

svn path=/trunk/; revision=30179
2005-08-21 18:10:23 +00:00
df07f02cae Added widgets in INCLUDES.
2005-06-23  Kaushal Kumar  <kakumar@novell.com>

        * e-util/Makefile.am, widgets/e-timezone-dialog/Makefile.am,
        addressbook/gui/search/Makefile.am,
        plugins/groupwise-features/Makefile.am: Added widgets in INCLUDES.

        Updated the include paths to use misc instead of widgets/misc.

svn path=/trunk/; revision=29574
2005-06-23 09:11:11 +00:00
27a61acf27 Retired GAL from Head. The relevant files have moved inside evolution.
2005-06-17  Kaushal Kumar  <kakumar@novell.com>

        * Retired GAL from Head. The relevant files have moved inside
        evolution. Thanks to JP Rosevear for performing the cvs surgery. The
        files have been moved in the following order.

        evolution/e-util <- gal/gal/util
        evolution/a11y <-  gal/gal/a11y
        evolution/a11y/e-table <- gal/gal/a11y/e-table
        evolution/a11y/e-text <- gal/gal/a11y/e-text
        evolution/widgets/table <- gal/gal/e-table
        evolution/widgets/text <- gal/gal/e-text
        evolution/widgets/misc <- gal/gal/widgets
        evolution/widgets/misc/pixmaps <- gal/gal/widgets/pixmaps
        evolution/widgets/menus <- gal/gal/menus

        Following is the summary of changes done to fix the build:-
        - New files added to cvs repository,
                - a11y/e-table/Makefile.am
                - a11y/e-text/Makefile.am
                - widgets/table/Makefile.am
                - widgets/text/Makefile.am
                - widgets/misc/pixmaps/Makefile.am
                - iconv-detect.h
                - iconv-detect.c
        - Updated configure.in.
        - Updated all the relevant Makefile.am files.
        - Updated the include paths to replace all gal references.
        - Updated the marshal list to suit gal files requirements.

svn path=/trunk/; revision=29522
2005-06-17 15:20:35 +00:00
2decafb544 Port to Windows, initial commit:
2005-04-29  Tor Lillqvist  <tml@novell.com>

	Port to Windows, initial commit:

	* configure.in: Check for Win32, define Automake conditional
	OS_WIN32. Check for regexec() perhaps in separate -lregex, define
	REGEX_LIBS if so. Require glib-2.0 >= 2.6 (and thus also gtk+-2.0
	>= 2.6) so that we can use the gstdio wrappers for full support of
	non-ASCII filenames on Win32. Don't use -D_REENTRANT on Win32, has
	ne special meaning.

	* gal.pc.in: Require gtk+-2.0 >= 2.6 also here for consistency.

	* gal-zip.in: New file, used to build zipfile format distribution
	of gal for Win32.

	* configure.in
	* Makefile.am: Add gal-zip(.in).

	* */Makefile.am
	* */*.c: Harmonize -I and #include conventions. (Of course, this
	hasn't anything to do with Windows porting as such, I just got
	carried away...) Use only -I$(top_srcdir). Use paths to gal
	headers staring with "gal", except for headers from the same
	directory as the .c file, which are included as such. Include all
	gal headers using doublequotes. Sort #includes and remove
	duplicates and obvious redundancies. Include config.h first
	without any HAVE_CONFIG_H, then system headers, then other GNOME
	lib headers, than gal's own headers. Just include gtk.h instead of
	separate gtk*.h headers. Don't include gi18n.h, include e-i18n.h
	to use e_gettext() consistently.

	* gal/Makefile.am: Use -no-undefined on Win32 so that libtool
	agrees to build a shared library. Because of the bidirectional
	dependency between libgal and libgal-a11y we can build libgal-a11y
	sanely as a shared library on Win32, so we don't install any
	separate libgal-a11y at all. So, on Win32, link the stuff that
	goes into libgal-a11y also into libgal. Link with REGEX_LIBS.

	* gal/a11y/Makefile.am: See above. Just build a dummy static
	libgal-a11y on Win32 (can't convince Automake not to build the
	library at all on one platform using Automake ifdef,
	apparently). Then (this is a gross hack) explicitly remove the
	library after installation in the install-data-local rule.

	* gal/e-table/Makefile.am
	* gal/e-table/e-table-config.c: Rename ETABLE_GLADEDIR to
	GAL_GLADEDIR for consistency.

	* gal/e-table/e-cell-date.c: No localtime_r() in Microsoft's C
	library, but its localtime() *is* thread-safe.

	* gal/e-table/e-cell-text.c
	* gal/e-table/e-cell-tree.c
	* gal/e-table/e-cell-vbox.c
	* gal/e-text/e-text.c
	* gal/widgets/e-unicode.c: Remove unnecessary inclusion of gdkx.h.

	* gal/e-table/e-cell-tree.c (ect_realize): Instead of the Xlib
	macro None (whose value is zero), use the corresponding
	zero-valued enums from the appropriate GDK type.

	* gal/e-table/e-table-config.c
	* gal/e-table/e-table-field-chooser.c
	* gal/menus/gal-define-views-dialog.c
	* gal/menus/gal-view-instance-save-as-dialog.c
	* gal/menus/gal-view-new-dialog.c
	* gal/widgets/e-categories-master-list-array.c
	* gal/widgets/e-categories-master-list-dialog.c
	* gal/widgets/e-categories.c: Use g_build_filename() to construct
	pathnames at run-time instead of compile-time. On Windows the
	macros GAL_GLADEDIR and GAL_IMAGESDIR expand to function calls, in
	order to support installing in a freely chosen location.

	* gal/e-table/e-table-item.c
	* gal/e-table/e-cell-vbox.c: Instrad of the Xlib GrabSuccess, use
	GDK_GRAB_SUCCESS (which has the same value).

	* gal/e-table/e-table-specification.c (e_table_specification_load_from_file)
	* gal/e-table/e-table.c (e_table_load_specification)
	* gal/e-table/e-tree-table-adapter.c (open_file)
	* gal/menus/gal-view-instance.c (load_current_view)
	* gal/menus/gal-view-instance.c (load_current_view): On Win32,
	convert filename to the locale character set before passing to
	xmlParseFile() which doesn't use UTF-8 filenames. Use gstdio
	wrappers.

	* gal/util/Makefile.am: Define GAL_PREFIX as $prefix. Define
	GAL_LOCALEDIR, GAL_GLADEDIR and GAL_IMAGESDIR also here for
	e-win32-reloc.c. Include e-win32-reloc.c on Win32.

	* gal/util/e-iconv.c (e_iconv_init): Use g_win32_getlocale() on
	Windows.

	* gal/util/e-util.c
	* gal/util/e-xml-utils.c: Use g_mkstemp() instead of non-portable
	mkstemp(). Use GLib pathname manipulation functions. Use gstdio
	wrappers.

	* gal/util/e-util-private.h: New file. Contains just Win32 bits
	for now that redefine the directory names from the Makefile as
	functions calls.

	* gal/util/e-win32-reloc.c: New file. Contains a minimal DllMain()
	and functions to support freely chosen installation location on
	Windows.

	* gal/util/e-xml-utils.c: No fsync() in the Microsoft C library.

	* gal/windgets/Makefile.am: Add -I$(top_srcdir)/gal for
	consistency with the sibling Makefile.am files.

	* gal/widgets/e-canvas.c: Instead of the Xlib AlreadyGrabbed, use
	GDK_GRAB_ALREADY_GRABBED.

svn path=/trunk/; revision=29249
2005-04-29 14:18:18 +00:00
ee4ee504d8 bounds check the selection beginning.
2005-03-14  Theppitak Karoonboonyanan <theppitak@gmail.com>

        * gal/e-text/e-text.c (e_text_retrieve_surrounding_cb)
        (e_text_delete_surrounding_cb): bounds check the selection
        beginning.

svn path=/trunk/; revision=29008
2005-03-14 06:42:13 +00:00
ab13d05f6e Some code clean work.
2005-01-27  Harry Lu  <harry.lu@sun.com>

        Some code clean work.

        * gal/a11y/e-table/gal-a11y-e-table-click-to-add.c:
        (gal_a11y_e_table_click_to_add_init): new function to
        register type only when a11y is enabled.
        * gal/a11y/e-table/gal-a11y-e-table-click-to-add.h:
        * gal/a11y/e-table/gal-a11y-e-table-item.c:
        (gal_a11y_e_table_item_init): ditto.
        * gal/a11y/e-table/gal-a11y-e-table.c: (gal_a11y_e_table_init): ditto.
        * gal/a11y/e-table/gal-a11y-e-table.h:
        * gal/a11y/e-table/gal-a11y-e-tree.c: (gal_a11y_e_tree_init): ditto.
        * gal/a11y/e-table/gal-a11y-e-tree.h:
        * gal/a11y/e-text/gal-a11y-e-text.c: (gal_a11y_e_text_init): ditto.
        * gal/a11y/e-text/gal-a11y-e-text.h:
        * gal/a11y/factory.c: useless file removed.
        * gal/a11y/init.c: useless file removed.
        * gal/e-text/e-text.c: (e_text_class_init): move a11y registry
        call to a11y code.

svn path=/trunk/; revision=28702
2005-02-04 04:50:50 +00:00
2420ae32bd Don't pass in the "fill_color" property for creating the canvas item for
2005-01-21  Rodney Dawes  <dobey@novell.com>

	* gal/e-text/e-text.c (_do_tooltip): Don't pass in the "fill_color"
	property for creating the canvas item for the tooltip
	* gal/widgets/e-reflow.c (set_empty): Don't pass in the "fill_color"
	property for creating the EText canvas item

	Fixes #9413

svn path=/trunk/; revision=28501
2005-01-22 03:44:36 +00:00
e29711084f Bugzilla #63731
2004-08-29  Suresh Chandrasekharan <suresh.chandrasekharan@sun.com>

        Bugzilla #63731

        * gal/e-text/e-text.c (insert_preedit_text): For multilple ETexts
        sharing the same GnomeCanvas im_context, prevent updating all childern
        in case preedit for one changed.

        (e_text_event): Don't disconnect the signal to a EText if it is
        out of focus and still having preedit. Save it and disconnect it when
        another EText comes into focus.

svn path=/trunk/; revision=27085
2004-08-30 17:58:34 +00:00
033bc219ff Rollback for fix #63731
2004-08-25 Suresh Chandrasekharan <suresh.chandrasekharan@sun.com>
Rollback for fix #63731

svn path=/trunk/; revision=27028
2004-08-26 04:52:17 +00:00
38b06852ab Bugzilla #63731
2004-08-25  Suresh Chandrasekharan <suresh.chandrasekharan@sun.com>

        Bugzilla #63731

        * gal/e-text/e-text.h: Remove unneeded
        text->im_context_signals_registered.

        * gal/e-text/e-text.c (e_text_init): Removed
        text->im_context_signals_registered

        (e_text_event): Remove text->im_context
        signals handler connect/disconnect from here.

        (e_text_set_property): Added them here, now they will be invoked
        only @ text->im_context creation time, or re-set or at e_text_dispose.
        Also focus_out events does not affect the signals as they used to.

svn path=/trunk/; revision=27024
2004-08-25 17:32:23 +00:00
d17f89b2cd [ probable fix for the remaining portion of #45931 ]
2004-08-23  Chris Toshok  <toshok@ximian.com>

	[ probable fix for the remaining portion of #45931 ]

	* gal/e-text/e-entry.c (e_entry_show_popup): only return early if
	we're trying to pop up the view while the entry is unfocused.  if
	we're trying to pop it down, carry on as normal.

svn path=/trunk/; revision=27009
2004-08-24 22:22:19 +00:00
04de004511 nuke, unnecessary. (e_entry_start_completion): set item_chosen to FALSE.
2004-08-04  Chris Toshok  <toshok@ximian.com>

        * gal/e-text/e-entry.c (e_entry_refresh_popup): nuke, unnecessary.
        (e_entry_start_completion): set item_chosen to FALSE.
        (added_cb): nuke, unnecessary.
        (full_cb): only show the popup if the user hasn't chosen an entry.
        (activate_cb): set item_chosen to TRUE.

svn path=/trunk/; revision=26832
2004-08-05 18:26:55 +00:00
ff2a5e2ebf hardcode the border size. it is hardcoded in e-text as well. Even using
2004-06-11  Radek Doulik  <rodo@ximian.com>

	* gal/e-text/e-entry.c (canvas_size_request): hardcode the border
	size. it is hardcoded in e-text as well. Even using style values
	in e-text will not help as style values might differ between EText
	and EEntry. I think it will be best to rewrite EEntry for evo 2.1
	so that it derives from GtkEntry and only adds the auto completion
	feature

	Fixes part of #42864

svn path=/trunk/; revision=26309
2004-06-11 14:05:01 +00:00
8db565271c added cast
2004-06-10  Radek Doulik  <rodo@ximian.com>

	* gal/a11y/e-table/gal-a11y-e-table-click-to-add.c
	(idle_do_action): added cast

	* gal/a11y/e-table/gal-a11y-e-cell-tree.c
	(gal_a11y_e_cell_tree_new): added cast

	* gal/a11y/e-table/gal-a11y-e-cell.c: added #include
<gtk/gtkwindow.h>

	* gal/e-text/e-text.c (_get_position): removed unused variable

	* gal/e-text/e-completion.c: #if 0'ed e_completion_sort

	* tests/test-text.c (create_entry): removed unused variables
	added #include "gal/widgets/e-canvas-utils.h"
	added #include "gal/e-text/e-text-model.h"
	(create_text): removed unused variables
	(create_ro_text): ditto

	* tests/test-table-1.c (create_table): added cast

	* tests/test-completion.c (main): added cast

	* gal/a11y/e-text/gal-a11y-e-text.c (et_get_text): return NULL if
	check fails
	added #include <string.h> for strlen
	(et_get_text_after_offset): fixed typo defalut --> default
	(et_get_text_at_offset): ditto
	(et_get_character_extents): removed unused variables
	(et_set_selection): ditto
	(_et_command_cb): added default: label to quiet compiler

	* gal/a11y/e-table/gal-a11y-e-table-click-to-add-factory.c
	(gal_a11y_e_table_click_to_add_factory_create_accessible): return
	NULL if check fails

	* gal/a11y/e-table/gal-a11y-e-table-click-to-add.c
	(idle_do_action): fixed wrong cast
	(idle_do_action): removed unused variables
	(etcta_ref_child): return NULL if check fails
	(gal_a11y_e_table_click_to_add_new): ditto
	(gal_a11y_e_table_click_to_add_new): removed unused variable

	* gal/a11y/e-table/gal-a11y-e-table-item-factory.c
	(gal_a11y_e_table_item_factory_create_accessible): return NULL if
	fails
	(gal_a11y_e_table_item_factory_create_accessible): added cast
	(gal_a11y_e_table_item_factory_create_accessible): removed unused
	variable

	* gal/a11y/e-table/gal-a11y-e-table-item.c (eti_dispose): removed
	unused variable
	(eti_get_parent): ditto
	(eti_get_n_children): ditto
	(eti_ref_child): ditto
	(eti_get_index_in_parent): ditto
	(eti_ref_accessible_at_point): return value (NULL)
	(cell_destroyed): removed unused variable
	(cell_destroyed): ditto
	(table_add_row_selection): ditto
	added #inclued <string.h> for memset, memmove
	(eti_rows_inserted): removed unused variable
	(eti_rows_deleted): ditto
	(eti_header_structure_changed): ditto

	* gal/a11y/e-table/gal-a11y-e-cell-popup.c
	(gal_a11y_e_cell_popup_class_init): removed unused variable
	added #include "gal-a11y-e-cell-registry.h"
	(popup_cell_action): removed unused variable

	* gal/a11y/e-table/gal-a11y-e-cell-toggle.c (toggle_cell_action):
	removed unused variable

	* gal/a11y/e-table/gal-a11y-e-cell-tree.c: added #include
	"gal-a11y-e-cell-registry.h"
	(gal_a11y_e_cell_tree_new): add cast
	(gal_a11y_e_cell_tree_new): removed unused variable

	* gal/a11y/e-table/gal-a11y-e-cell-text.c: added #include
	<string.h>
	(ect_remove_selection): removed unused variable
	(ect_copy_text): added cast
	(ect_delete_text): ditto
	(ect_paste_text): ditto
	(ect_init): ditto

	* gal/a11y/e-table/gal-a11y-e-cell.c (eti_grab_focus): added cast
	(eti_grab_focus): ditto
	(eti_grab_focus): return TRUE (grab was successful)
	added #include <atk/atkstateset.h>

	* gal/a11y/e-table/gal-a11y-e-tree.c: added #include
	"gal-a11y-e-table-item.h"
	(gal_a11y_e_tree_new): removed unused variable

	* gal/e-text/e-text.c (_do_tooltip): removed unused variable
	(e_text_event): added cast
	(primary_clear_cb): removed unused variable
	(_get_position): ditto
	(_get_position): ditto
	#if 0'ed unused prototypes

	* gal/e-text/e-text-model.c (e_text_model_real_insert_length):
	removed unused variables

	* gal/e-text/e-completion.c (e_completion_sort): #if'0 ed, as it's
	not used anywhere

	* gal/widgets/e-reflow.c (items_inserted): remove unused variables

	* gal/widgets/e-categories.c (e_categories_get_property): remove
	unused variable

	* gal/widgets/e-categories-master-list-dialog.c
	(dialog_destroyed): added cast

	* gal/widgets/e-categories-master-list-combo.c
	(ecmlc_ecml_changed): remove unused variable

	* gal/widgets/color-palette.c: include string.h for memset
	prototype

svn path=/trunk/; revision=26289
2004-06-10 17:01:14 +00:00
1189f447dd process only if len > 0
2004-06-09  Radek Doulik  <rodo@ximian.com>

	* gal/e-text/e-text.c (capitalize): process only if len > 0

	Fixes #51078

svn path=/trunk/; revision=26270
2004-06-09 15:25:03 +00:00
70895bfdfd [ fixes bug #51897 ]
2004-04-01  Chris Toshok  <toshok@ximian.com>

	[ fixes bug #51897 ]

	* gal/e-text/e-text.c (insert_preedit_text): only reset the layout
	attrs if there is some preedit text to insert.  also, try getting
	text->layout's attributes before creating a new list.  this will
	keep us from overwriting existing attributes and wiping out the
	underlining for objects.

svn path=/trunk/; revision=25294
2004-04-02 07:17:36 +00:00
dd5a050770 it's possible to get to this function without the EText ever being
2004-02-03 Chris Toshok <toshok@ximian.com>

	* gal/e-text/e-text.c (e_text_command): it's possible to get to
	this function without the EText ever being realized.  Since we
	create the layout in realize(), let's just create it here too.
	Fixes crash bug 46165 (aka "The Bug with a million dups").

svn path=/trunk/; revision=24579
2004-02-03 15:24:40 +00:00
a91380ebe5 Use button->time for the mouse click event, so that the popup stays up on
2004-01-27  Rodney Dawes  <dobey@ximian.com>

	* gal/e-text/e-text.c (popup_targets_received): Use button->time for
	the mouse click event, so that the popup stays up on button release

	Fixes #47548

svn path=/trunk/; revision=24483
2004-01-27 22:58:06 +00:00
deaa622ca7 fix double free of the button event.
2004-01-27  Chris Toshok  <toshok@ximian.com>

	* gal/e-text/e-text.c (popup_targets_received): fix double free of
	the button event.

svn path=/trunk/; revision=24481
2004-01-27 22:47:15 +00:00
0651968c80 free event (e_text_do_popup): copy the event so we have good data
2004-01-06  JP Rosevear <jpr@ximian.com>

	* gal/e-text/e-text.c (popup_targets_received): free event
	(e_text_do_popup): copy the event so we have good data

	Fixes #51956

svn path=/trunk/; revision=24071
2004-01-06 18:21:11 +00:00
0517e6655c Support for preedit in e-text widgets.
2003-10-14  Suresh Chandrasekharan  <suresh.chandrasekharan@sun.com>

	* Support for preedit in e-text widgets.

	* gal/gal/e-text/e-text.c: Added e_text_preedit_changed_cb and
	insert_preedit_text.

	* Modified the following functions.
	(e_text_draw) Calls insert_preedit_text also cursor pos @ the end of
	text->selection_start + text->preedit_len

	(e_text_event) Added hooks for preedit_cb
	(e_text_init) Inits text->preedit_len
	(e_text_retrieve_surrounding_cb) Removed printf
	(e_text_delete_surrounding_cb) Correct params for
	gtk_editable_delete_text to make it work.

	* gal/gal/e-text/e-text.h: Added preedit_len in struct _EText


2003-09-25  Suresh Chandrasekharan  <suresh.chandrasekharan@sun.com>

	* Fix for "44222 task summary entry widget not i18ned". The following
	files are changed.

	* gal/gal/e-table/e-cell-text.c: Lots of changes for i18n
	selection/input support. Added these functions for input method support.

	(e_cell_text_preedit_changed_cb)
	(e_cell_text_commit_cb)
	(e_cell_text_retrieve_surrounding_cb)
	(e_cell_text_delete_surrounding_cb)

	(layout_with_preedit) This function inserts the preedit string
	with the right attribs to the layout text.

	(build_attr_list) Creates the PangoAttrList with bold/stikeout/underline
	as applicable for the current ECellText.

	The following functions are modified.

	(ect_stop_editing): disconnect signal handlers when editing stops

	(ect_draw): Changes for including the preedit only to the currently
	selected row/col. Also display the cursor at the end of preedit text.

	(ect_event): Connects the IM callbacks to the key press event.
	Disconnect when not in editing mode. Also a special flag to see
	when Enter key pressed in preedit mode, the text is committed only
	not a new row is created. This woks in conjunction with the changes
	made in the eti_event in e-table-item.c file and e-cell.h.

	(ect_height): Changes due to parameters changing for generate_layout

	(ect_enter_edit): Initialization of im_context for a cell text and
	assoociated flags.

	(ect_max_width):  Changes due to parameters changing for
	generate_layout.

	(ect_max_width_by_row):  Changes due to parameters changing for
	generate_layout.

	(ect_show_tooltip): Changes due to parameters changing for
	generate_layout.

	(e_cell_text_construct): check whether paramters are NULL.

	(get_position_from_xy): Changes due to parameters changing for
	generate_layout.

	(_insert): Set the selection_start as the minimum of strlen(edit->text)
	and selection_start. Used to correct the preedit_string length
	which may have added to the selection_start.

	(e_cell_text_view_command): When inserting, if in the preedit mode
	do not delete the selection.

	(_selection_get): Set utf8 data instead of string data.

	(_selection_received): Take in UTF8_ATOM inaddition to
	GDK_SELECTION_TYPE_STRING.

	(e_cell_text_view_get_selection): Make utf8 data when acting as a
	selection source.

	* gal/e-table/e-cell-text.h : Included <gtk/gtkmenu.h>

	* gal/e-table/e-cell.h: Added enum E_CELL_PREEDIT to ECellFlags

	* gal/e-table/e-table-item.c: (eti_event) Changes for not committing
	the edited text as a seperate row in preedit mode.

	* gal/e-table/e-table.c: (table_canvas_focus_event_cb) To have
	proper im_context focus for the ecanvas holding the e-table.

svn path=/trunk/; revision=22882
2003-10-14 18:20:18 +00:00
8b364a6d16 GalA11yETextFactory should inherit from AtkObjectFactory not AtkObject.
2003-09-08  Tim Wo <tim.wo@sun.com>

	* gal/a11y/e-text/gal-a11y-e-text-factory.h: GalA11yETextFactory
	should inherit from AtkObjectFactory not AtkObject. (#47097).
	* gal/a11y/e-text/gal-a11y-e-text.c (et_class_init): Set value
	for "component_parent_iface". (#47097)
	* gal/e-text/e-text.c (e_text_class_init): Added registration
	code for GalA11yETextFactory. (#47097)

svn path=/trunk/; revision=22551
2003-09-12 13:55:57 +00:00
a8ef795eb9 filter S-F10 key binding, and show popup menu. (popup_menu_placement_cb):
2003-08-10  Maxx Cao  <maxx.cao@sun.com>

       * gal/e-text/e-text.c (e_text_event): filter S-F10 key binding, and
       show popup menu.
       (popup_menu_placement_cb): function added to adjust popup menu position.+       (popup_targets_received): show popup menu in different ways, according
       to whether it's invoked by mouse click or key binding.

svn path=/trunk/; revision=22204
2003-08-13 06:00:20 +00:00
89cbf144bd add missing e_text_copy_clipboard() prototype
* gal/e-text/e-text.h: add missing e_text_copy_clipboard()
	  prototype

svn path=/trunk/; revision=21899
2003-07-23 14:44:57 +00:00
2579e70339 [ fixes several utf8/pango related problems, including bugs #41288,
2003-05-13  Chris Toshok  <toshok@ximian.com>

	[ fixes several utf8/pango related problems, including bugs
	#41288, #42596, #42604 ]

	* configure.in (GAL_CURRENT): bump to 3, per mkestner.
	(GAL_REVISION): drop to 0, per mkestner.

	* gal/e-text/e-text.c (reset_layout_attrs): we need to convert the
	start/end bounds of the object to byte indices for the attribute.
	(reset_layout): in the layout == NULL case don't create the layout
	then immediately set it again with the same text.  also, we need
	to convert selection_start to a byte index before calling
	pango_layout_get_cursor_pos.
	(e_text_draw): remove some #ifdef 0'd code, move the calculation
	of our initial clip_rect below the xpos/ypos assignments so we
	don't duplicate the expression.  Fix the selection drawing in the
	multiline case so that it actually works, instead of assuming that
	all ETexts only have 1 line *boggle*.
	(get_position_from_xy): this needs to return a utf8 offset.
	(e_text_copy_clipboard): convert sel_start/sel_end to byte indices
	before copying.
	(primary_get_cb): same.
	(paste_received): validate the input here, and drop the length
	parameter from e_text_insert.
	(next_word): convert from an utf8 offset on entry to this
	function, and return a utf8 offset when we're done.  also, remove
	the call the g_unichar_validate.  we validate at all points where
	text is inserted.
	(find_offset_into_line): new function used in the backward/forward
	line code.  find the utf8 offset into a line (the number of utf8
	characters from a prior \n or beginning of the string.)
	(_get_position): in general there are lots of changes here because
	text->selection_start/text->selection_end are utf8 offsets, not
	byte offsets. fix E_TEP_START_OF_LINE so that hitting Ctrl-a when
	you're at the beginning of a line doesn't take you to the
	beginning of the previous line.  fix E_TEP_END_OF_LINE in an
	analogous fashion. for E_TEP_FORWARD_CHARACTER we just increment
	by 1.  for E_TEP_BACKWARD_CHARACTER we just decrement by 1.  for
	E_TEP_BACKWARD_WORD we drop the g_unichar_validate call and
	simplify things a bit.  reimplement
	E_TEP_FORWARD_LINE/E_TEP_BACKWARD_LINE so they find the current
	offset into the line, then scan forward/backward for the next/prev
	line, and put us at the right offset on that line.  fix
	E_TEP_SELECT_WORD so double clicking in the space between words
	doesn't select both words - if you double click on the trailing
	edge of the space, it selects the next word.  leading edge selects
	the previous one.  for E_TEP_SELECT_ALL use g_utf8_strlen.
	(e_text_insert): everything that calls this passes a \0 terminated
	string, so we assume it's \0 terminated (the old code did as well,
	with calls to strlen) and drop the length parameter.  also make
	sure this is all utf8 happy.
	(capitalize): use g_utf8_offset_to_pointer instead of just adding
	text->text and start/end, and remove the validate call.  also fix
	the call to e_text_model_delete and use e_text_model_insert_length
	instead of e_text_model_insert.
	(e_text_command): for E_TEP_INSERT, validate the input.  for
	E_TEP_CAPS just use MAX instead of the neat little hack.  also,
	fix the scrolling so that it scrolls properly in both X and Y
	directions (there are still some hiccups but it's much much better
	than previously).
	(e_text_commit_cb): validate the input here.

	* gal/e-text/e-text-model.c (struct _ETextModelPrivate): just use
	a GString here and get rid of MAX_LENGTH.
	(e_text_model_dispose): free GString.
	(e_text_model_real_validate_position): clean this up a bit.
	(e_text_model_real_get_text): return the contents of the GString.
	(e_text_model_real_get_text_length): use g_utf8_strlen here.
	(e_text_model_real_set_text): convert to GString
	(e_text_model_real_insert): just call e_text_model_insert_length
	here instead of duplicating the function.
	(e_text_model_real_insert_length): convert to utf8/gstring.
	i.e. convert @position and @length to a bytes and use
	g_string_insert_len.
	(e_text_model_real_delete): same, with g_string_erase.
	(e_text_model_get_text_length): use g_utf8_strlen
	(e_text_model_strdup_nth_object): convert the length of the object
	to bytes before copying.
	(e_text_model_get_nth_object_bounds): calculate start/end properly
	for u

svn path=/trunk/; revision=21163
2003-05-14 00:42:36 +00:00
5ebb4e4fe6 Fix prototype. Likewise.
2003-05-05  Jeremy Katz  <katzj@redhat.com>

	* gal/e-text/e-completion-callbacks.c
	(e_completion_callbacks_new): Fix prototype.
	* gal/e-text/e-completion-callbacks.h: Likewise.

svn path=/trunk/; revision=21110
2003-05-06 04:56:21 +00:00
24cb028fe8 Fixed typo in gal/e-text/e-text.c.
svn path=/trunk/; revision=21105
2003-05-05 20:37:20 +00:00
cfd486fdd8 return the instantiated object. [bug #42156]
2003-05-01  Mike Kestner  <mkestner@ximian.com>

	* gal/e-text/e-completion-callbacks.c (e_completion_callbacks_new):
	return the instantiated object. [bug #42156]

2003-05-01  Mike Kestner  <mkestner@ximian.com>

	* e-cell-combo.c (e_cell_combo_selection_changed): new
	(e_cell_combo_init): connect to selection_changed on popup_list
	(e_cell_combo_do_popup): block selection_changed while popping up
	[bug #40996]

svn path=/trunk/; revision=21042
2003-05-01 18:21:35 +00:00
47c282f8c1 gal/e-text/e-text.[ch] : break EFont dependency
2003-04-08  Mike Kestner  <mkestner@ximian.com>

	gal/e-text/e-text.[ch] : break EFont dependency

svn path=/trunk/; revision=20763
2003-04-08 17:09:10 +00:00
708189441c set handle_popup to TRUE on the EText.
2003-04-03  Chris Toshok  <toshok@ximian.com>

	* gal/e-text/e-entry.c (e_entry_init): set handle_popup to TRUE on
	the EText.

	* gal/e-text/e-text.c (e_text_set_property): add setter for
	handle_popup.
	(e_text_get_property): add getter for handle_popup.
	(e_text_event): only do our special popup handling if handle_popup
	is true.  otherwise, pass the event along.
	(e_text_class_init): install the handle_popup property.
	(e_text_init): init handle_popup to FALSE, so we get default
	behavior in most cases.

	* gal/e-text/e-text.h: add "handle_popup" field, so the user of an
	EText can decide whether to handle popups themselves.

svn path=/trunk/; revision=20664
2003-04-03 23:31:22 +00:00
e2e058c6b4 emit a keypress signal. yes, i know this might not correspond to a single
2003-04-03  Chris Toshok  <toshok@ximian.com>

	* gal/e-text/e-text.c (e_text_commit_cb): emit a keypress signal.
	yes, i know this might not correspond to a single keypress, but..

svn path=/trunk/; revision=20659
2003-04-03 08:46:53 +00:00
8045179fe8 ifdef gtk_widget_get_clipboard since we need to build against gtk 2.0.
2003-04-02  Chris Toshok  <toshok@ximian.com>

	* gal/e-text/e-text.c (e_text_copy_clipboard): ifdef
	gtk_widget_get_clipboard since we need to build against gtk 2.0.
	(e_text_update_primary_selection): same.
	(e_text_paste): same.
	(e_text_do_popup): same.

svn path=/trunk/; revision=20657
2003-04-03 07:55:09 +00:00
edc0d3e040 only connect the signals if !im_context_signals_registered. (e_text_init):
2003-04-02  Chris Toshok  <toshok@ximian.com>

	* gal/e-text/e-text.c (e_text_event): only connect the signals if
	!im_context_signals_registered.
	(e_text_init): init im_context_signals_registered = FALSE.

	* gal/e-text/e-text.c (struct _EText): add
	im_context_signals_registered.

svn path=/trunk/; revision=20656
2003-04-03 06:44:40 +00:00
049c9cdaca just disconnect based on DATA, so we only need 1 call. (e_text_event):
2003-04-02  Chris Toshok  <toshok@ximian.com>

	* gal/e-text/e-text.c (e_text_dispose): just disconnect based on
	DATA, so we only need 1 call.
	(e_text_event): same.

svn path=/trunk/; revision=20655
2003-04-03 06:19:17 +00:00
d2af55db1a [ either fixes #39702 or comes damn, damn close. also, fixes EText to not
2003-04-02  Chris Toshok  <toshok@ximian.com>

	[ either fixes #39702 or comes damn, damn close.  also, fixes EText
	to not suck *nearly* as much. ]
	* gal/util/e-marshal.list: add NONE:POINTER,INT,OBJECT.

	* gal/e-text/e-entry.h: (struct _EEntryClass): popup ->
	populate_popup.

	* gal/e-text/e-entry.c (proxy_changed): rename, the old name was
	too damn long.
	(proxy_activate): same.
	(proxy_populate_popup): same, and change from popup to
	populate_popup.
	(e_entry_init): track change to cb names, and populate_popup.
	also, pass the ECanvas's im_context to the EText.
	(e_entry_class_init): POPUP -> POPULATE_POPUP.

	* gal/e-text/e-text.h (struct _EText): remove the old selection
	stuff, and add im_context/reset_im_context fields.
	(struct _ETextClass): popup -> populate_popup.

	* gal/e-text/e-text.c (e_text_dispose): remove all the
	GtkInvisible based selection stuff, and disconnect from/unref the
	im_context.
	(e_text_set_property): add "im_context" handling.
	(e_text_get_property): same.
	(e_text_event): connect/disconnect from the IM context's signals
	in the FOCUS_CHANGE handler.  in the KEY_PRESS/RELEASE handler,
	use gtk_im_context_filter_keypress if we have an im_context.
	also, use e_text_do_popup now instead of just emitting the "popup"
	signal.
	(e_text_copy_clipboard): new function.
	(e_text_delete_selection): new function.
	(e_text_cut_clipboard): new function.
	(e_text_paste_clipboard): new function.
	(e_text_select_all): new function.
	(primary_get_cb): new function, handle requests for the primary
	selection when we're the owner.
	(primary_clear_cb): new function, unfinished.
	(e_text_update_primary_selection): new function.
	(paste_received): new function, insert pasted text.
	(e_text_paste): new function,
	(popup_menu_detach): new function, not needed really.
	(popup_targets_received): new function, pop up the popup once we
	have the selection information necessary to sensitize the c/c/p
	buttons.
	(e_text_do_popup): new function, request the selection.
	(e_text_reset_im_context): new function.
	(e_text_command): for E_TEP_SELECT, call
	e_text_update_primary_selection.  for E_TEP_DELETE/INSERT,
	_delete_selection -> e_text_delete_selection.  for E_TEP_COPY,
	call e_text_copy_clipboard.  for E_TEP_PASTE/E_TEP_GET_SELECTION
	call e_text_paste.
	(e_text_class_init): change the "popup" signal to
	"populate_popup".  Also, add the "im_context" property.
	(e_text_commit_cb): new function. IM context callback.
	(e_text_retrieve_surrounding_cb): new function.  IM context
	callback.
	(e_text_delete_surrounding_cb): new function.  IM context
	callback.  unfinished.

svn path=/trunk/; revision=20653
2003-04-03 06:06:20 +00:00