Commit Graph

134 Commits

Author SHA1 Message Date
9b5ba0524e Added prototype for show_pango_rectangle()
2003-03-10  Jeffrey Stedfast  <fejj@ximian.com>

	* gal/e-text/e-text.c: Added prototype for show_pango_rectangle()

svn path=/trunk/; revision=20233
2003-03-10 15:27:21 +00:00
c8a10fa6da fix drawing bugs, and disable the stupid looking focus rect, since I can't
2003-03-07  Chris Toshok  <toshok@ximian.com>

	* gal/e-text/e-text.c (e_text_draw): fix drawing bugs, and disable
	the stupid looking focus rect, since I can't find a theme that
	uses them.
	(e_text_event): force redraw in the focus-out case if the cursor
	is shown (so we can erase it), and also trick ourselves into
	drawing it immediately (by setting it to FALSE) in the focus-in
	case.

svn path=/trunk/; revision=20223
2003-03-07 22:57:40 +00:00
b6fadac1f1 Don't unref the GtkInvisible - instead, destroy it.
2003-02-24  Hans Petter Jansson  <hpj@ximian.com>

	* gal/e-text/e-text.c (e_text_dispose): Don't unref the GtkInvisible -
	instead, destroy it.

svn path=/trunk/; revision=20040
2003-02-24 19:07:09 +00:00
18d96c5ff3 ignore test-completion.
2003-02-09  Chris Toshok  <toshok@ximian.com>

	* tests/.cvsignore: ignore test-completion.

	* tests/test-completion.c: new program, completion test.

	* tests/Makefile.am (noinst_PROGRAMS): add test-completion.

	* gal/e-text/Makefile.am: remove e-completion-test from the build
	here, moving it to ../../tests.

	* gal/e-text/e-completion.c (e_completion_class_init): we've
	removed the restart, cancel, clear, and lost signals.  Also, we've
	renamed some so it's easier to tell from the name which it is
	(virtual func or signal.)
	(e_completion_dispose): remove call to clear_search_stack, as we
	don't do auto-refinement anymore.
	(e_completion_clear): gone.
	(e_completion_push_search): gone.
	(e_completion_pop_search): gone.
	(e_completion_clear_search_stack): gone.
	(e_completion_refine_search): gone.
	(e_completion_unrefine_search): gone.
	(e_completion_begin_search): substantially clear this up, since we
	don't have the refinement stuff anymore.  Also, the call to
	request_completion is a virtual function call, not a signal.
	(e_completion_match_count): always return matches->len here, never
	match_count, which is gone (with the refinement stuff)
	(e_completion_foreach_match): remove the hit_count stuff.
	(e_completion_restart): gone.
	(e_completion_lost_match): gone.
	(e_completion_end_search): remove the sorting stuff from here (and
	the call to restart.)  the etable sorting stuff will have to take
	up the slack, but for now there's no reason to restart the search
	here.

	* gal/e-text/e-completion.h (struct _ECompletionClass): straighten
	out what's a virtual function and what's a signal, instead of
	using signals for both.  Also, remove the auto_refine stuff, as
	it's not used.

	* gal/e-text/e-completion-view.c (e_completion_view_size_request):
	make the damn drop down window bigger (100 pixels, or the
	requisition height, whichever is bigger.)
	(e_completion_view_disconnect): remove handling for signals that
	are gone.
	(restart_completion_cb): gone.
	(cancel_completion_cb): gone.
	(clear_completion_cb): gone.
	(lost_completion_cb): gone.
	(e_completion_view_construct): track new names of ECompletion
	signals.

	* gal/e-text/e-completion-view.h (struct _ECompletionView): remove
	restart_signal_id, cancel_signal_id, clear_signal_id, and
	lost_signal_id.

	* gal/e-text/e-entry.c (get_borders): new function, ala gtkentry.
	(canvas_size_request): use get_borders instead of computing it
	here.
	(e_entry_init): remove duplicate assignment of
	emulate_label_resize.
	(e_entry_show_popup): remove some ifdef'ed crap.
	(e_entry_start_completion): don't cancel the completion before
	starting again.  This keeps the popup from disappearing.

	* gal/e-text/e-completion-match.c (e_completion_match_construct):
	no more hit_count.

	* gal/e-text/e-completion-match.h (struct _ECompletionMatch):
	remove hit_count.

	* gal/e-text/e-completion-callbacks.[ch]: new class so we can use
	callbacks instead of subclassing.

svn path=/trunk/; revision=19859
2003-02-10 02:21:47 +00:00
12a5962e32 (e_text_dispose): Renamed from
e_text_destroy; chain up to ::dispose instead of ::destroy.
(e_text_dispose, e_text_class_init): Override ::dispose, not
::destroy.

svn path=/trunk/; revision=19577
2003-01-22 22:54:17 +00:00
99df61da47 reverse part of the patch from 1/15.
2003-01-17  Chris Toshok  <toshok@ximian.com>

	* gal/e-text/e-text.c (show_pango_rectangle): reverse part of the
	patch from 1/15.

svn path=/trunk/; revision=19510
2003-01-17 23:31:36 +00:00
da621e5406 apply the patch NotZed and I came up with to fix the height of the
2003-01-15  Chris Toshok  <toshok@ximian.com>

	* gal/e-text/e-text.c (show_pango_rectangle): apply the patch
	NotZed and I came up with to fix the height of the evolution
	composer entries.

svn path=/trunk/; revision=19486
2003-01-15 21:45:51 +00:00
84fabde6ba lots of stuff, add 2 e-text widgets, 1 readonly, the other writable (that
2002-12-08  Chris Toshok  <toshok@ximian.com>

	* tests/test-text.c: lots of stuff, add 2 e-text widgets, 1
	readonly, the other writable (that uses the uri model..)

	* gal/e-text/e-text.[ch]: lots of pango changes.  we don't do
	*anything* with gdk/e fonts now.  everything is pango.  There are
	still some issues while editting but display should more or less
	work properly now, and without all the performance problems.

	* gal/e-text/e-completion-view.c (e_completion_view_expose_event):
	use gtk_widget_send_expose instead of gtk_widget_event so we don't
	get the annoying gtk warning.

	* gal/e-text/e-entry.c (e_entry_dispose): make sure both the gdk
	and gtk grabs are removed.
	(e_entry_class_init): fill_color_gdk is a boxed type, not pointer.

	* gal/e-text/e-text-model-uri.h (E_TYPE_TEXT_MODEL_URI): oops,
	this should be e_text_model_uri_get_type, not
	e_text_model_get_type.

svn path=/trunk/; revision=19054
2002-12-08 21:44:08 +00:00
42e49504cb rework this from the gal-2 branch, clahey's patch, and the stuff i'd done
2002-11-29  Chris Toshok  <toshok@ximian.com>

	* gal/e-text/e-text.c: rework this from the gal-2 branch, clahey's
	patch, and the stuff i'd done since.  it's working *MUCH* better
	now.

svn path=/trunk/; revision=18957
2002-11-30 06:14:58 +00:00
f5b3a0e2e5 commit clahey's original pango work.
2002-11-19  Chris Toshok  <toshok@ximian.com>

	* gal/e-text/e-text.[ch]: commit clahey's original pango work.

svn path=/trunk/; revision=18850
2002-11-19 23:59:20 +00:00
68b8639345 fix c&p typo.
2002-11-16  Chris Toshok  <toshok@ximian.com>

	* gal/widgets/e-reflow.c (e_reflow_class_init): fix c&p typo.

	* gal/widgets/e-categories-master-list-dialog.c: switch to
	GtkDialogism's.

	* gal/widgets/gal-categories.[ch]: same.

	* gal/widgets/e-categories-master-list-dialog.glade: libglade-convert.

	* gal/widgets/e-categories.glade: same.

	* gal/util/e-text-event-processor.[ch]: subclass this from
	GObject.

	* gal/util/e-text-event-processor-emacs-like.[ch]: clean up the
	gtk cruft a bit.

	* gal/e-text/e-text.c (_get_tep): remove the _sink call.
	(e_text_init): same.

	* gal/e-text/e-text-model.[ch]: subclass this from GObject instead
	of GtkObject.

svn path=/trunk/; revision=18808
2002-11-17 05:40:18 +00:00
d8e4ebebc3 Lots of GObject work.
2002-11-16  Chris Toshok  <toshok@ximian.com>

	* gal/e-text/e-completion-test.c: Lots of GObject work.

	* gal/e-text/e-completion-view.[ch]: same.

	* gal/e-text/e-completion.[ch]: same.

	* gal/e-text/e-entry.[ch]: same.

	* gal/e-text/e-table-text-model.[ch]: same.

	* gal/e-text/e-text-model-uri.[ch]: same.

	* gal/e-text/e-text-model.[ch]: same.

	* gal/e-text/e-text-test.c: same.

	* gal/e-text/e-text.[ch]: same.

svn path=/trunk/; revision=18800
2002-11-16 23:49:31 +00:00
613453b109 merging the gal-2 branch back to the trunk.
merging the gal-2 branch back to the trunk.

svn path=/trunk/; revision=18471
2002-10-31 21:30:57 +00:00
f533402ce6 take a clip_height and use it to set the maximum number of lines if
2002-09-10  JP Rosevear  <jpr@ximian.com>

	* gal/e-text/e-text.c (line_splitter): take a clip_height and use
	it to set the maximum number of lines if necessary
	(split_into_lines): pass clip_height arg

svn path=/trunk/; revision=18032
2002-09-10 17:24:50 +00:00
3146e7f80e Added debugging printfs. (e_text_request_paste): Fixed the order of
2002-06-05  Christopher James Lahey  <clahey@ximian.com>

	* gal/e-text/e-text.c: Added debugging printfs.
	(e_text_request_paste): Fixed the order of setting
	last_type_request before calling gtk_selection_convert due to a
	reentrancy bug.

svn path=/trunk/; revision=17119
2002-06-05 16:52:45 +00:00
1e3dc5a343 Reflow and redraw when the style gets set.
2002-06-03  Christopher James Lahey  <clahey@ximian.com>

	* gal/e-text/e-text.c, gal/e-text/e-text.h (e_text_style_set):
	Reflow and redraw when the style gets set.

svn path=/trunk/; revision=17086
2002-06-03 21:04:43 +00:00
57a8777026 Switch from gnome_canvas_item_grab to e_canvas_item_grab.
2002-05-09  Christopher James Lahey  <clahey@ximian.com>

	* gal/e-text/e-text.c: Switch from gnome_canvas_item_grab to
	e_canvas_item_grab.

	* gal/widgets/e-canvas.c, gal/widgets/e-canvas.h
	(e_canvas_item_grab, e_canvas_item_ungrab): Added these functions.

From gal/e-table/ChangeLog:

2002-05-09  Christopher James Lahey  <clahey@ximian.com>

	* e-table-item.c, e-table-item.h: Switched from
	gnome_canvas_item_grab to e_canvas_item_grab.

svn path=/trunk/; revision=16738
2002-05-09 22:12:01 +00:00
8c9242e061 Make the style here match the proper widget style to emulate a label or an
2002-05-02  Christopher James Lahey  <clahey@ximian.com>

	* gal/e-text/e-text.c (e_text_draw): Make the style here match the
	proper widget style to emulate a label or an entry.

svn path=/trunk/; revision=16670
2002-05-02 22:55:49 +00:00
9f1ac34671 Bumped the version number to 0.19.99.5.
2002-02-07  Christopher James Lahey  <clahey@ximian.com>

	* configure.in: Bumped the version number to 0.19.99.5.

	* gal/Makefile.am (libgal_la_LIBADD): Added
	menus/gal-view-instance-save-as-dialog.lo.

	* gal/e-text/e-text.c (next_word): Contains refactored code from
	the E_TEP_FORWARD_WORD case of e_text_command.
	(e_text_command): Implemented E_TEP_CAPS.

From gal/menus/ChangeLog:

2002-02-07  Christopher James Lahey  <clahey@ximian.com>

	* Makefile.am (glade_DATA): Added
	gal-view-instance-save-as-dialog.glade.
	(libgalmenus_la_SOURCES): Added
	gal-view-instance-save-as-dialog.c.
	(libgalmenusinclude_HEADERS): Added
	gal-view-instance-save-as-dialog.h.

	* gal-view-collection.c, gal-view-collection.h
	(gal_view_collection_append_with_title): Added this new version of
	the append function that sets the title and returns the new id as
	well.
	(gal_view_collection_set_nth_view): Added this function to save
	over another view.
	(gal_view_collection_get_default_view,
	gal_view_collection_set_default_view): Added the concept of a
	default view for GalViewCollections.

	* gal-view-etable.c, gal-view-etable.h
	(gal_view_etable_attach_table, gal_view_etable_attach_tree,
	gal_view_etable_detach): Added functions to set the state of a
	table or tree and then send GalView "changed" signals whenever
	that state changes.
	(gal_view_etable_set_state): New function to set the ETableState
	of a GalViewETable.

	* gal-view-instance-save-as-dialog.c,
	gal-view-instance-save-as-dialog.glade,
	gal-view-instance-save-as-dialog.h: New dialog to save the current
	custom view as a named view.

	* gal-view-instance.c, gal-view-instance.h
	(gal_view_instance_set_custom_view): New function to set the state
	of an instance to custom view and set the custom view to a
	particular GalView.
	(gal_view_instance_exists): New function to check if this
	particular instance has ever been opened before.  Use before
	gal_view_instance_load.
	(gal_view_instance_save_as): New function to open a save as
	dialog.
	(gal_view_instance_load): Added this function which used to be
	part of _construct.  This function can be called multiple times,
	and those extra times will be ignored.  This is so you can set a
	default view before loading.
	(gal_view_instance_get_default_view,
	gal_view_instance_set_default_view): Set the default view for this
	instance.  If unset, this falls back to the default view for the
	corresponding GalViewCollection.

svn path=/trunk/; revision=15590
2002-02-07 10:22:59 +00:00
994338982f Request a reflow and an update when the text model changes. Fixes Ximian
2002-01-20  Christopher James Lahey  <clahey@ximian.com>

	* gal/e-text/e-text.c (e_text_text_model_changed): Request a
	reflow and an update when the text model changes.  Fixes Ximian
	bug #16459.
	(e_text_set_arg): (ARG_TEXT) Don't set the number of lines to one
	here.

svn path=/trunk/; revision=15411
2002-01-21 01:57:23 +00:00
4e788c6fec Handle the case of a 0 length string properly here.
2002-01-14  Christopher James Lahey  <clahey@ximian.com>

	* gal/e-text/e-text.c (line_splitter): Handle the case of a 0
	length string properly here.

svn path=/trunk/; revision=15323
2002-01-14 21:28:42 +00:00
0336d7c12f Reworked to fix bugs related to breaking text on newlines. Some fairly
2001-12-27  Jon Trowbridge  <trow@ximian.com>

	* gal/e-text/e-text.c (split_into_lines): Reworked to fix bugs
	related to breaking text on newlines.  Some fairly substantial
	code duplication was removed in the process.

svn path=/trunk/; revision=15219
2001-12-28 02:24:27 +00:00
5f447101dd Don't crash if the text string is NULL. (text_draw_with_objects): Don't
2001-12-10  Jon Trowbridge  <trow@ximian.com>

        * gal/e-text/e-text.c (text_width_with_objects): Don't crash if
        the text string is NULL.
        (text_draw_with_objects): Don't crash if the text string is NULL.
        (Fixes #16359)

svn path=/trunk/; revision=14954
2001-12-10 17:50:14 +00:00
114411716d Calc height here if we need it to check the y position of the cursor.
2001-10-30  Christopher James Lahey  <clahey@ximian.com>

	* gal/e-text/e-text.c (e_text_reflow): Calc height here if we need
	it to check the y position of the cursor.

svn path=/trunk/; revision=14443
2001-10-30 08:22:21 +00:00
e3e57f4def Set text->revert = NULL here. (e_text_cancel_editing): Only revert if
2001-10-29  Christopher James Lahey  <clahey@ximian.com>

	* gal/e-text/e-text.c (e_text_stop_editing): Set text->revert =
	NULL here.
	(e_text_cancel_editing): Only revert if text->revert is non-null.

svn path=/trunk/; revision=14334
2001-10-29 12:24:38 +00:00
f2feef8356 Bumped version number here to 0.15.99.7.
2001-10-29  Christopher James Lahey  <clahey@ximian.com>

	* configure.in: Bumped version number here to 0.15.99.7.

	* gal/e-text/e-text.c, gal/e-text/e-text.h (e_text_stop_editing):
	Exported this function.
	(e_text_cancel_editing): New function.  Allows you to revert
	edits.

svn path=/trunk/; revision=14332
2001-10-29 11:52:22 +00:00
dc8927136a Changed the license announcement at the top of these files.
2001-10-26  Christopher James Lahey  <clahey@ximian.com>

	* gal/e-paned/e-hpaned.c, gal/e-paned/e-hpaned.h,
	gal/e-paned/e-paned.c, gal/e-paned/e-paned.h,
	gal/e-paned/e-vpaned.c, gal/e-paned/e-vpaned.h,
	gal/e-text/e-completion-match.c, gal/e-text/e-completion-match.h,
	gal/e-text/e-completion-test.c, gal/e-text/e-completion-view.c,
	gal/e-text/e-completion-view.h, gal/e-text/e-completion.c,
	gal/e-text/e-completion.h, gal/e-text/e-entry-test.c,
	gal/e-text/e-entry.c, gal/e-text/e-entry.h,
	gal/e-text/e-table-text-model.c, gal/e-text/e-table-text-model.h,
	gal/e-text/e-text-model-repos.c, gal/e-text/e-text-model-repos.h,
	gal/e-text/e-text-model-test.c, gal/e-text/e-text-model-uri.c,
	gal/e-text/e-text-model-uri.h, gal/e-text/e-text-model.c,
	gal/e-text/e-text-model.h, gal/e-text/e-text.c,
	gal/e-text/e-text.h, gal/util/e-bit-array.c,
	gal/util/e-bit-array.h, gal/util/e-cache.c, gal/util/e-cache.h,
	gal/util/e-iconv.c, gal/util/e-iconv.h, gal/util/e-sorter-array.c,
	gal/util/e-sorter-array.h, gal/util/e-sorter.c,
	gal/util/e-sorter.h, gal/util/e-text-event-processor-emacs-like.c,
	gal/util/e-text-event-processor-emacs-like.h,
	gal/util/e-text-event-processor-types.h,
	gal/util/e-text-event-processor.c,
	gal/util/e-text-event-processor.h, gal/util/e-util.c,
	gal/util/e-util.h, gal/util/e-xml-utils.c, gal/util/e-xml-utils.h,
	gal/widgets/color-group.c, gal/widgets/color-group.h,
	gal/widgets/color-palette.c, gal/widgets/color-palette.h,
	gal/widgets/e-canvas-utils.c, gal/widgets/e-canvas-utils.h,
	gal/widgets/e-canvas-vbox.c, gal/widgets/e-canvas-vbox.h,
	gal/widgets/e-canvas.c, gal/widgets/e-canvas.h,
	gal/widgets/e-categories-master-list-array.c,
	gal/widgets/e-categories-master-list-array.h,
	gal/widgets/e-categories-master-list-combo.c,
	gal/widgets/e-categories-master-list-combo.h,
	gal/widgets/e-categories-master-list-dialog-model.c,
	gal/widgets/e-categories-master-list-dialog-model.h,
	gal/widgets/e-categories-master-list-dialog.c,
	gal/widgets/e-categories-master-list-dialog.h,
	gal/widgets/e-categories-master-list.c,
	gal/widgets/e-categories-master-list.h,
	gal/widgets/e-categories.c, gal/widgets/e-categories.h,
	gal/widgets/e-colors.c, gal/widgets/e-colors.h,
	gal/widgets/e-cursors.c, gal/widgets/e-cursors.h,
	gal/widgets/e-font.c, gal/widgets/e-font.h,
	gal/widgets/e-gui-utils.c, gal/widgets/e-gui-utils.h,
	gal/widgets/e-hscrollbar.c, gal/widgets/e-hscrollbar.h,
	gal/widgets/e-popup-menu.c, gal/widgets/e-popup-menu.h,
	gal/widgets/e-printable.c, gal/widgets/e-printable.h,
	gal/widgets/e-reflow-model.c, gal/widgets/e-reflow-model.h,
	gal/widgets/e-reflow-sorted.c, gal/widgets/e-reflow-sorted.h,
	gal/widgets/e-reflow.c, gal/widgets/e-reflow.h,
	gal/widgets/e-scroll-frame.c, gal/widgets/e-scroll-frame.h,
	gal/widgets/e-selection-model-array.c,
	gal/widgets/e-selection-model-array.h,
	gal/widgets/e-selection-model-simple.c,
	gal/widgets/e-selection-model-simple.h,
	gal/widgets/e-selection-model.c, gal/widgets/e-selection-model.h,
	gal/widgets/e-unicode.c, gal/widgets/e-unicode.h,
	gal/widgets/e-vscrollbar.c, gal/widgets/e-vscrollbar.h,
	gal/widgets/gtk-combo-box.c, gal/widgets/gtk-combo-box.h,
	gal/widgets/gtk-combo-stack.c, gal/widgets/gtk-combo-stack.h,
	gal/widgets/gtk-combo-text.c, gal/widgets/gtk-combo-text.h,
	gal/widgets/test-color.c, gal/widgets/test-e-font.c,
	gal/widgets/test-e-font.h, gal/widgets/test-font-loading.c,
	gal/widgets/widget-color-combo.c,
	gal/widgets/widget-color-combo.h,
	gal/widgets/widget-pixmap-combo.c,
	gal/widgets/widget-pixmap-combo.h,
	src/e-table/e-table-sorted-variable.c, tests/test-define-views.c,
	tests/test-shortcut-bar.c, tests/test-table-1.c,
	tests/test-tree-1.c, tests/test-tree-2.c, tests/test-tree-3.c,
	tests/test-unicode.c: Changed the license announcement at the top
	of these files.

svn path=/trunk/; revision=14158
2001-10-26 18:33:33 +00:00
5
ac091e954d Bumped version to 0.15.99.4 for e-iconv changes.
2001-10-25    <NotZed@Ximian.com>

        * configure.in: Bumped version to 0.15.99.4 for e-iconv changes.

        * gal/widgets/e-unicode.c (e_utf8_from_iconv_string_sized): "
        (e_utf8_to_iconv_string_sized): "
        (e_utf8_from_gtk_string_sized): "
        (e_utf8_to_gtk_string_sized): "

        * gal/widgets/e-font.c (e_font_to_native): s/iconv/e_iconv/

        * gal/util/e-iconv.c (e_iconv): Implement a wrapper for iconv() to
        make sure we link with and execute the right iconv to match the
        right iconv_open.  (BLAH!)

svn path=/trunk/; revision=14111
2001-10-26 00:35:20 +00:00
c996010276 Use the widget's style's text_gc for drawing text if either
2001-10-23  Christopher James Lahey  <clahey@ximian.com>

	* gal/e-text/e-text.c (e_text_draw): Use the widget's style's
	text_gc for drawing text if either draw_background or draw_button
	is on.

svn path=/trunk/; revision=13937
2001-10-23 09:00:27 +00:00
4720ad36fa Bumped version to 0.15.99.3 for EText's "draw_button" argument.
2001-10-23  Christopher James Lahey  <clahey@ximian.com>

	* configure.in: Bumped version to 0.15.99.3 for EText's
	"draw_button" argument.

	* gal/e-text/e-entry.c: Forward the "draw_button" argument to the
	contained EText.

	* gal/e-text/e-text.c, gal/e-text/e-text.h (e_text_draw): Added
	new "draw_button" argument.  If this is turned on and the first
	widget that's a parent of the containing canvas with GTK_NO_WINDOW
	turned off above the current one is a button, EText draws a button
	underneath itself to match the containing button.

From gal/shortcut-bar/ChangeLog:

2001-10-23  Christopher James Lahey  <clahey@ximian.com>

	* e-shortcut-bar.c (e_shortcut_bar_add_group): Turn on
	"draw_button" argument to EEntry.

svn path=/trunk/; revision=13934
2001-10-23 06:30:54 +00:00
f22daae8e6 Accept UTF8_STRING, UTF-8, and STRING targets when getting the selection.
2001-10-22  Christopher James Lahey  <clahey@ximian.com>

	* gal/e-text/e-text.c, gal/e-text/e-text.h (e_text_get_selection):
	Accept UTF8_STRING, UTF-8, and STRING targets when getting the
	selection.

svn path=/trunk/; revision=13864
2001-10-22 04:16:03 +00:00
c4c8cf0390 Offer UTF8_STRING, UTF-8, COMPOUND_TEXT, STRING, and TEXT targets when we
2001-10-21  Christopher James Lahey  <clahey@ximian.com>

	* gal/e-text/e-text.c (e_text_get_invisible): Offer UTF8_STRING,
	UTF-8, COMPOUND_TEXT, STRING, and TEXT targets when we offer the
	selection.

svn path=/trunk/; revision=13847
2001-10-21 06:57:50 +00:00
35c8845807 Connect keys before we show the widget.
2001-10-18  Jon Trowbridge  <trow@ximian.com>

        * gal/e-text/e-entry.c (e_entry_enable_completion_full): Connect
        keys before we show the widget.

svn path=/trunk/; revision=13756
2001-10-18 17:34:26 +00:00
6b746897bf Based on patches from Dan Nguyen <dnn@austin.ibm.com>.
2001-10-10  Christopher James Lahey  <clahey@ximian.com>

	Based on patches from Dan Nguyen <dnn@austin.ibm.com>.

	* gal/Makefile.am (libgal_la_LDFLAGS): Added $(GTK_LIBS).

	* gal/e-text/e-text.c (e_text_event): Changed this from a C++
	comment to a C comment.

svn path=/trunk/; revision=13549
2001-10-10 12:49:34 +00:00
c5f392ca0e add E_OBJECT_CLASS_ADD_SIGNALS and E_OBJECT_CLASS_TYPE to ease migration
2001-10-05  Michael Meeks  <michael@ximian.com>

	* gal/util/e-util.h: add E_OBJECT_CLASS_ADD_SIGNALS and
	E_OBJECT_CLASS_TYPE to ease migration to Gnome 2.0 from
	a single source base.

	* All C files:
	s/object_class->type,/E_OBJECT_CLASS_TYPE (object_class),/g;
	s/gtk_object_class_add_signals([^\(]*)\(([^,]*),([^,]*),([^\)]*)/
	E_OBJECT_CLASS_ADD_SIGNALS\1(\2,\3,\4/;

svn path=/trunk/; revision=13428
2001-10-04 23:52:20 +00:00
20b8f6e7a7 Made it so that if allow_newlines is FALSE, pasting into ETexts doesn't
2001-09-26  Christopher James Lahey  <clahey@ximian.com>

	* gal/e-text/e-text.c, gal/e-text/e-text.h (_insert): Made it so
	that if allow_newlines is FALSE, pasting into ETexts doesn't
	insert carriage returns.  Fixes Ximian bug #5761 and Ximian bug
	#9067.

svn path=/trunk/; revision=13143
2001-09-26 10:03:25 +00:00
d8f6b5758f remove redundant NULL checks since g_free handles NULLs. (e_text_destroy):
2001-09-17  Larry Ewing  <lewing@ximian.com>

	* gal/e-text/e-text.c (e_text_supply_selection): remove redundant
	NULL checks since g_free handles NULLs.
	(e_text_destroy): free the selection.  It does appear to be a
	guarantee that we get a selection-clear event before we are
	destroyed.

svn path=/trunk/; revision=12934
2001-09-18 04:00:56 +00:00
e0cd01768a If our text shrinks, make sure that the selection doesn't spill off over
2001-09-09  Jon Trowbridge  <trow@ximian.com>

	* gal/e-text/e-text.c (e_text_text_model_changed): If our text shrinks,
	make sure that the selection doesn't spill off over the end of the
	reduced buffer.  (Related to bug #8535)

svn path=/trunk/; revision=12717
2001-09-09 22:59:02 +00:00
109c8d5aa6 Properly ref the font we pass in as an ARG_FONT_E. (_do_tooltip): Removed
2001-07-25  Jon Trowbridge  <trow@ximian.com>

	* gal/e-text/e-text.c (e_text_set_arg): Properly ref the font we
	pass in as an ARG_FONT_E.
	(_do_tooltip): Removed some crack.  We no longer have to manually
	ref the font. The ref-counting now happens inside the set_arg
	function, as it should.
	(e_text_destroy): Set text->font to NULL after unrefing it.

2001-07-25  Jon Trowbridge  <trow@ximian.com>

        * e-cell-text.c (ect_unrealize): Set text_view->font to NULL
        after we unref it.

svn path=/trunk/; revision=11393
2001-07-25 07:27:04 +00:00
8b8193e3c0 Start editing immediately on a button_press that grabs the focus.
2001-07-15  Christopher James Lahey  <clahey@ximian.com>

	* gal/e-text/e-text.c (e_text_event): Start editing immediately on
	a button_press that grabs the focus.  e_canvas_item_grab_focus
	doesn't seem to get us the focus event until the event loop.
	Fixes Ximian bug #1766.

svn path=/trunk/; revision=11111
2001-07-15 09:38:05 +00:00
8feacdf535 For E_TEP_END_OF_BUFFER, use the length in bytes, not the length in
2001-07-09  Federico Mena Quintero  <federico@ximian.com>

	* gal/e-text/e-text.c (_get_position): For E_TEP_END_OF_BUFFER,
	use the length in bytes, not the length in characters --- this
	function is supposed to return byte offsets.

svn path=/trunk/; revision=10941
2001-07-10 01:27:16 +00:00
23bb03e993 Destroy the tooltip if we're the owner when we're destroyed. Also, keep a
2001-07-07  Christopher James Lahey  <clahey@ximian.com>

	* gal/e-text/e-text.c, gal/e-text/e-text.h (e_text_destroy):
	Destroy the tooltip if we're the owner when we're destroyed.
	Also, keep a reference to the text object in case we get a signal
	on the window after the text object is destroyed.

	* gal/widgets/e-canvas.c (e_canvas_destroy): Hide the tooltip if
	there is one when the canvas is destroyed.

svn path=/trunk/; revision=10888
2001-07-07 22:21:12 +00:00
29344f2ea8 Don't scroll to the cursor on grab, ungrab, noop, and copy commands.
2001-07-05  Christopher James Lahey  <clahey@ximian.com>

	* gal/e-text/e-text.c (e_text_command): Don't scroll to the cursor
	on grab, ungrab, noop, and copy commands.

svn path=/trunk/; revision=10808
2001-07-05 15:31:23 +00:00
5847ef8566 If lines is NULL here split into lines and just return that the point is
2001-07-03  Christopher James Lahey  <clahey@ximian.com>

	* gal/e-text/e-text.c (e_text_point): If lines is NULL here split
	into lines and just return that the point is outside this text
	object.

svn path=/trunk/; revision=10730
2001-07-03 04:43:42 +00:00
dc04c9c3fa Small changes throughout to use ECompletionMatch.
2001-06-05  Jon Trowbridge  <trow@gnu.org>

	* gal/e-text/e-entry.c: Small changes throughout to use
	ECompletionMatch.

	* gal/e-text/e-completion-view.c: Small changes throughout
	to use ECompletionMatch.

	* gal/e-text/e-completion.c: Small changes throughout to use
	ECompletionMatch.

	* gal/e-text/e-completion-match.h:
	* gal/e-text/e-completion-match.c: Added.  A struct to contain
	completion matches.  This lets us more easily pass around
	information between the various bits of completion machinery.

svn path=/trunk/; revision=10118
2001-06-05 17:46:56 +00:00
b63edae65e Validate utf8 to avoid lock-ups. (_get_position): Validate utf8 to avoid
2001-05-14  Jon Trowbridge  <trow@ximian.com>

	* gal/e-text/e-text.c (calc_line_widths): Validate utf8 to avoid
        lock-ups.
   	(_get_position): Validate utf8 to avoid lock-ups.

svn path=/trunk/; revision=9797
2001-05-14 20:57:35 +00:00
36e820522e Request an update if just our line widths needed recalculation. This fixes
2001-05-07  Federico Mena Quintero  <federico@ximian.com>

	* gal/e-text/e-text.c (e_text_reflow): Request an update if just
	our line widths needed recalculation.  This fixes the bug where
	the text item would not repaint itself if the canvas lost the
	focus.

svn path=/trunk/; revision=9705
2001-05-08 00:08:19 +00:00
c4ff4d8239 Made fewer calls to functions like split_into_lines to save time when
2001-04-29  Christopher James Lahey  <clahey@ximian.com>

	* gal/e-text/e-text.c: Made fewer calls to functions like
	split_into_lines to save time when possible.

svn path=/trunk/; revision=9629
2001-04-29 19:06:24 +00:00
70353ea6c6 Remove UNICODE_CFLAGS (e_text_test_LDADD, e_entry_test_LDADD,
* gal/e-text/Makefile.am (INCLUDES): Remove UNICODE_CFLAGS
        (e_text_test_LDADD, e_entry_test_LDADD, e_text_model_test_LDADD,
        e_completion_test_LDADD): remove -lunicode, add libunicode.la

        * gal/e-text/e-text.c: Remove <unicode.h>, use gunicode functions.

svn path=/trunk/; revision=9516
2001-04-23 20:02:27 +00:00
7221bd79c2 Limit total matches, for better performance on slow machines. It is
2001-04-20  Jon Trowbridge  <trow@ximian.com>

	* gal/e-text/e-completion-test.c: Limit total matches, for better
	performance on slow machines.  It is supposed to be a test, so
	correctness of the completion operations isn't really a
	priority...

	* gal/e-text/e-completion-view.c (e_completion_view_construct):
	Set GTK_CAN_FOCUS flag.

	* gal/e-text/e-entry.c (e_entry_show_popup): Evil! Evil! Unclean!
	Unclean!  Manually check if the pointer is in the area where the
	popup is going to appear, and if it is, warp the pointer out of
	the way.  After days of fucking around, this horrible hack is the
	only way that I've been able to figure out to keep the focus from
	being taken away from the entry and ending up somewhere strange
	when the popup pops up.  (The main problem is with the case of
	focus-follows-cursor --- click-to-focus works fine.  Sawfish
	idiocincracies may also be causing problems, but I don't want to
	unjustly accuse the WM of anything, as tempting and appealing as
	that can be.)
	(key_press_cb): Proxy for forwarding the popup's key press events
	to the entry.
	(key_release_cb): Proxy for forwarding the popup's key release
	events to the entry.
	These proxies should be enough to take care of my focus problems.
	Unfortunately, they aren't, and the pointer-warping-focus-horror
	is required for reasons that I don't fully understand.

	* gal/e-text/e-text.c (_get_xy_from_position): Made
        _get_xy_from_position return a boolean.  It returns TRUE if the
		computation was successful
	(and if valid data is now in *xp and *yp), FALSE otherwise.  Make
	sure that text->lines is not NULL, and return FALSE if it is.
	(_get_position): Test that _get_xy_from_position returns TRUE
	before using the values in x and y.
	(_get_position): Test that _get_xy_from_position returns TRUE
	before using the values in x and y.
	Garbage values being returned in passed-in pointers created a race
	condition where you could hang an EText if you deleted the entire
	contents of the buffer really quickly.

svn path=/trunk/; revision=9468
2001-04-20 08:15:24 +00:00