Commit Graph

57 Commits

Author SHA1 Message Date
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
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
6590f32a3e set the popup to insensitive when we pop it down. hack to force it to lose
2003-03-26  Not Zed  <NotZed@Ximian.com>

	* gal/e-text/e-entry.c (e_entry_show_popup): set the popup to
	insensitive when we pop it down.  hack to force it to lose focus,
	fix for #39719.

svn path=/trunk/; revision=20531
2003-03-26 23:46:20 +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
fdabee2040 pass pango_context_get_language to pango_context_get_metrics.
2003-01-17  Chris Toshok  <toshok@ximian.com>

	* gal/e-text/e-entry.c (canvas_size_request): pass
	pango_context_get_language to pango_context_get_metrics.

svn path=/trunk/; revision=19507
2003-01-17 23:23:47 +00:00
09ea004d13 use PangoFontMetrics here instead of using the ascent/descent of the
2003-01-14  Chris Toshok  <toshok@ximian.com>

	* gal/e-text/e-entry.c (canvas_size_request): use PangoFontMetrics
	here instead of using the ascent/descent of the GtkStyle's font.

svn path=/trunk/; revision=19468
2003-01-14 22:33:46 +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
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
0a226a0483 Ansification patch from danw.
2002-04-25  Christopher James Lahey  <clahey@ximian.com>

	* gal/e-paned/e-paned.c, gal/e-text/e-entry.c,
	gal/util/e-bit-array.c, gal/util/e-sorter-array.c,
	gal/util/e-sorter.c, gal/util/e-text-event-processor.c,
	gal/widgets/color-group.c, gal/widgets/color-palette.c,
	gal/widgets/e-canvas-vbox.c, gal/widgets/e-canvas.c,
	gal/widgets/e-canvas.h,
	gal/widgets/e-categories-master-list-array.c,
	gal/widgets/e-categories-master-list-combo.c,
	gal/widgets/e-categories-master-list-dialog-model.c,
	gal/widgets/e-categories-master-list-dialog.c,
	gal/widgets/e-categories.c, gal/widgets/e-reflow-model.c,
	gal/widgets/e-reflow.c, gal/widgets/e-selection-model-array.c,
	gal/widgets/e-selection-model-simple.c,
	gal/widgets/e-selection-model.c, gal/widgets/e-selection-model.h,
	gal/widgets/gtk-combo-box.c, gal/widgets/gtk-combo-stack.c,
	gal/widgets/widget-color-combo.c,
	gal/widgets/widget-pixmap-combo.c: Ansification patch from danw.

svn path=/trunk/; revision=16589
2002-04-25 20:05:40 +00:00
78492a5deb Don't show the popup if the entry->item doesn't have focus.
* gal/e-text/e-entry.c (e_entry_show_popup): Don't show the popup
if the entry->item doesn't have focus.

svn path=/trunk/; revision=16345
2002-04-04 15:34:09 +00:00
335e0c6bf6 Only popup entries that have focus. Fixes the lingering completion popup
2001-11-08  Jon Trowbridge  <trow@ximian.com>

        * gal/e-text/e-entry.c (full_cb): Only popup entries that have
        focus.  Fixes the lingering completion popup bug.

svn path=/trunk/; revision=14626
2001-11-08 17:28:52 +00:00
b14590968a Added. Makes our popup window a transient of the toplevel.
2001-10-29  Jon Trowbridge  <trow@ximian.com>

	* gal/e-text/e-entry.c (e_entry_make_completion_window_transient):
	Added.  Makes our popup window a transient of the toplevel.
	(e_entry_enable_completion_full): Try to make our popup a
	transient.
	(e_entry_realize): Also try to make our popup a transient here, in
	case the entry wasn't packed before we enabled completion.  This
	is all an attempt to fix bug #13791.

svn path=/trunk/; revision=14390
2001-10-30 01:05:17 +00:00
0027f30446 destroy our completion_view_popup... we've been leaking them all of this
2001-10-29  Jon Trowbridge  <trow@ximian.com>

	* gal/e-text/e-entry.c (e_entry_destroy): destroy our
	completion_view_popup... we've been leaking them all of this time.
	This should fix the mysterious bug #13900.

svn path=/trunk/; revision=14381
2001-10-29 23:37:08 +00:00
0d56746e85 Bumped the version number to 0.15.99.6 for emulate_label_resize.
2001-10-27  Christopher James Lahey  <clahey@ximian.com>

	* configure.in: Bumped the version number to 0.15.99.6 for
	emulate_label_resize.

	* gal/e-text/e-entry.c: Added "emulate_label_resize" argument to
	make EEntry act like a label for width resizing purposes.

svn path=/trunk/; revision=14227
2001-10-27 21:01:42 +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
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
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
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
00368d2905 Unref the model after creating the ETable, since the table will hold a ref
* gal/e-text/e-completion-view.c (e_completion_view_construct):
	Unref the model after creating the ETable, since the table will
	hold a ref on it until we destroy it when we're destroyed.

	* gal/e-text/e-entry.c (e_entry_destroy): Unref the popup window
	rather than destroying it.

svn path=/trunk/; revision=12798
2001-09-13 15:37:59 +00:00
0c1a805875 bumped up to 0.10.99.3
2001-08-09  jacob berkman  <jacob@ximian.com>

	* configure.in: bumped up to 0.10.99.3

	* gal/e-text/e-completion-view.c (e_completion_view_init): init
	matches array
	(e_completion_view_destroy): free matches array
	(e_completion_view_disconnect): disconnect from the clear and
	lost_match signals
	(e_completion_view_clear_choices): fixup for ptr array
	(e_completion_view_set_cursor_row): ditto
	(e_completion_view_select): ditto
	(e_completion_view_key_press_handler): ditto
	(clear_completion_cb): handle the clear signal
	(lost_completion_cb): remove a row from the model
	(table_row_count): fixup for ptr array
	(table_value_at): ditto
	(e_completion_view_construct): connect to clear and lost
	completion signals
	(e_completion_view_set_width): ptr array fixup again

	* gal/e-text/e-completion.c (e_completion_class_init): add new
	clean / lost completion signals
	(e_completion_init): initialize the matches array
	(e_completion_destroy): free the matches array
	(e_completion_add_match): fixup for matches being a GPtrArray
	(e_completion_clear_matches): ditto
	(e_completion_clear): new function to clear the list of matches
	(e_completion_foreach_match): fixup for ptrarray
	(e_completion_restart): ditto
	(e_completion_found_match): if we are at the limit return first,
	rather than adding and then unreffing.  there very well could be
	some weird crashes this caused but it is kind of unlikely.
	(e_completion_lost_match): new function to forget about a match
	(e_completion_end_search): add a comment on why this is broken

	* gal/e-text/e-entry.c (e_entry_text_keypress): only start a
	delayed completion if our completion timeout is >= 0.  this
	provides a way for the completion starting / stopping to be
	controlled by something other than the EEntry (ie, file-sel)

svn path=/trunk/; revision=11843
2001-08-09 21:16:13 +00:00
9ca73ebd87 Bumped version up to 0.10.99.2.
2001-08-09  Jon Trowbridge  <trow@ximian.com>

	* configure.in: Bumped version up to 0.10.99.2.

	* gal/e-text/e-entry.c (e_entry_class_init): Added
	"completion_popup" signal.
	(e_entry_show_popup): Emit "completion_popup" signal if the popup
	has appeared or disappeared.
	(e_entry_enable_completion_full): Listen for "cancel_completion"
	signals from our model, and disable our completion if get one.
	(e_entry_completion_popup_is_visible): Added.  Returns TRUE if the
	completion popup is on the screen.

	* gal/e-text/e-text-model.c (e_text_model_class_init): Added
	"cancel_completion" signal.
	(e_text_model_cancel_completion): Added.  Emits
	"cancel_completion" signal.

svn path=/trunk/; revision=11824
2001-08-09 06:44:59 +00:00
2d4b0e2c4b Quintuple sigh. See below.
2001-08-09  Federico Mena Quintero  <federico@ximian.com>

	* gal/e-text/e-entry.c (e_entry_destroy): Quintuple sigh.  See below.

	* gal/util/e-bit-array.c (eba_destroy): Sextuple sigh.

svn path=/trunk/; revision=11815
2001-08-09 05:21:41 +00:00
efb34b1073 Change window policy to allow the completion window to shrink when the
2001-07-20  Jon Trowbridge  <trow@ximian.com>

	* gal/e-text/e-entry.c (e_entry_enable_completion_full): Change
	window policy to allow the completion window to shrink when the
	number of options decreases.

	* gal/e-text/e-completion-view.c (e_completion_view_construct):
	Removed some obsolete code.

svn path=/trunk/; revision=11292
2001-07-21 04:46:58 +00:00
011e2ddb2e we can ignore the border, as e-text takes care of that for us
2001-06-07  jacob berkman  <jacob@ximian.com>

	* gal/e-text/e-entry.c (canvas_size_allocate): we can ignore the
	border, as e-text takes care of that for us
	(canvas_size_request): correctly handle when borders should be
	drawn

	* gal/e-text/e-completion-view.c (e_completion_view_paint): fix a
	small bug in the drawing-2-pixel-border change to my patch

svn path=/trunk/; revision=10149
2001-06-07 15:50:51 +00:00
35e7e49201 Applied patch from Jacob Berkman to un-offset the completion popup and add
2001-06-06  Jon Trowbridge  <trow@ximian.com>

	* gal/e-text/e-entry.c:
	* gal/e-text/e-completion-view.c: Applied patch from Jacob Berkman
	to un-offset the completion popup and add a border around it.  I
	tweaked it slightly to make the border two pixels thick instead of
	one.  (Which I like, but might annoy everyone else.  We'll see.)

svn path=/trunk/; revision=10133
2001-06-06 17:57:19 +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
0213507193 set allow_newlines on the etext item to false, since we are like an entry
2001-05-31  jacob berkman  <jacob@ximian.com>

	* gal/e-text/e-entry.c (e_entry_init): set allow_newlines on the
	etext item to false, since we are like an entry

svn path=/trunk/; revision=10061
2001-05-31 16:54:28 +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
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
8940bcc90c Fix headers. Ditto. Ditto. Ditto. Ditto. Ditto. Ditto. Same. Ditto. Same
2001-04-04  Kjartan Maraas  <kmaraas@gnome.org>

	* gal/e-text/e-entry.c: Fix headers.
	* gal/e-text/e-table-text-model.[ch]: Ditto.
	* gal/e-text/e-table-text-model-uri.c: Ditto.
	* gal/e-text/e-text-model-uri.[ch]: Ditto.
	* gal/e-text/e-text-model.[ch]: Ditto.
	* gal/e-text/e-text.[ch]: Ditto.
	* gal/util/e-text-event-processor-emacs-like.[ch]: Ditto.
	* gal/util/e-text-event-processor.[ch]: Same.
	* gal/util/e-util.h: Ditto.
	* gal/util/e-xml-utils.[ch]: Same here.
	* gal/widgets/color-group.[ch]: Ditto.
	* gal/widgets/color-palette.[ch]: Ditto.
	* gal/widgets/e-canvas-utils.h: Ditto.
	* gal/widgets/e-canvas-vbox.[ch]: Ditto.
	* gal/widgets/e-canvas.[ch]: Ditto.
	* gal/widgets/e-categories.h: Ditto.
	* gal/widgets/e-colors.[ch]: Ditto.
	* gal/widgets/e-cursors.c: Ditto.
	* gal/widgets/e-gui-utils.c: Ditto
	* gal/widgets/e-popup-menu.[ch]: Same.
	* gal/widgets/e-reflow-sorted.c: Same.
	* gal/widgets/e-reflow.[ch]: Same.
	* gal/widgets/e-selection-model.c: Same
	* gal/widgets/e-unicode.[ch]: Same.
	* gal/widgets/gtk-combo-stack.[ch]: Same.
	* gal/widgets/widget-color-combo.[ch]: Same.
	* gal/widgets/widget-pixmap-combo.[ch]: Same.

svn path=/trunk/; revision=9168
2001-04-04 07:33:09 +00:00
b04c89fedd Set the size of the thing to a decent value that lets us test stuff.
2001-03-18  Miguel de Icaza  <miguel@ximian.com>

	* tests/test-tree-1.c (create_tree): Set the size of the thing to
	a decent value that lets us test stuff.

2001-03-16  Miguel de Icaza  <miguel@ximian.com>

	* gal/e-text/e-entry.h: Expose the canvas/item that used to be
	public and that were privatized.

svn path=/trunk/; revision=8802
2001-03-18 23:54:39 +00:00
10d0e730ec Added. This is part of a change of sematics that makes things much nicer
2001-03-06  Jon Trowbridge  <trow@gnu.org>

	* gal/e-text/e-entry.c (e_entry_text_keypress): Added.  This is
	part of a change of sematics that makes things much nicer for the
	user --- auto-activate the completion popup only on keypresses
	than also change the entry.
	(e_entry_proxy_changed): Record that the underlying EText has
	changed, and set up a timeout to clear the changed_since_keypress
	flag in a very short amount of time.
	(e_entry_init): Connect to the EText's "keypress" signal".
	(e_entry_destroy): If our completion_delay_tag timeout is still
	floating around out there when we are winding things down, remove
	it.

	* gal/e-text/e-text.c (e_text_class_init): Added keypress signal.
	(e_text_text_model_reposition): Removed some old cruft.
	(e_text_event): Emit our keypress signal after handling events of
	type GDK_KEY_PRESS.

svn path=/trunk/; revision=8566
2001-03-06 09:47:08 +00:00
1bdc6e147f Set version number to 0.5.99.5
2001-03-05  Jon Trowbridge  <trow@gnu.org>

        * configure.in: Set version number to 0.5.99.5

        * gal/e-text/e-entry.c (e_entry_class_init): Add a "popup" signal.
        If you have trepidations about this, see the technical argument
        below.
        (e_entry_init): Connect to the EText's popup signal.
        (e_entry_proxy_popup): Proxy emitter for popup signals from the
        EText.

        * gal/e-text/e-text.c (e_text_class_init): Added a "popup" signal.
        (e_text_event): Emit the "popup" signal on right-clicks.  Now you
        could ask yourself: "should there be a signal named 'popup' in
        EText that gets emitted on right-clicks?"  And this is a
        reasonable question, since... well, this has a funny feeling to
        it.  But the whole point of GNOME, or at least one of the original
        points of GNOME, was to impose policy in a reasonable way when it
        made sense in order to simplify the user's experience.  Convention
        dictates that popup menus are tied to right-clicks --- so rather
        than setting up some elaborate forwarding of button-press signals,
        why not just impose a little policy and set up a signal that is
        closely tied to a familiar set of semantics?  Maybe it isn't the
        best thing to do from a aesthetics-of-the-API point of view, but I
        doubt anyone could condemn it as being anything more than mostly
        harmless.

svn path=/trunk/; revision=8565
2001-03-06 00:13:23 +00:00
fae87e8d3d Boost version number to 0.5.99.3.
2001-03-01  Jon Trowbridge  <trow@ximian.com>

        * configure.in: Boost version number to 0.5.99.3.

        * gal/e-text/e-entry.c (e_entry_show_popup): Grab pointer when the
        popup is visible, and then hide the popup if any button press
        events occur outside of the popup.  This lets up avoid most of the
        worst "floating popup" cases that would occur if windows are
        moved, desktops changed, etc. with the mouse.  (Doing things like
        changing desktop w/ keybindings can still cause a "floating
        popup", but that is also true of Gtk's own combo box.)  Change
        popup positioning to slightly offset it from the entry, rather
        than just plopping it down directly below.
        (button_press_cb): Determine if a button press occured outside of
        the popup when the pointer was grabbed, and unbrowse accordingly.

        * gal/e-text/e-completion-view.c
        (e_completion_view_key_press_handler): Improve keystroke handling.
        Allow Tabs to pass through (after hiding the pop-up) in order to
        allow focus change requests to work properly.
        (e_completion_view_construct): Disable horizontal scrollbars.

        * gal/e-text/e-completion-test.c (main): Reworked to use signals
        instead of explicit callbacks.

        * gal/e-text/e-completion.h:
        * gal/e-text/e-completion.c: Fix the awkward mix of signals and
        explicitly-specified callbacks by taking out the explicit
        callbacks.  This approach is more gtk-ish, after all.

svn path=/trunk/; revision=8458
2001-03-01 20:59:42 +00:00
3fc425dee9 Fixed. (e_entry_select_region): Fixed. (e_entry_show_popup): Grab/ungrab
2001-02-23  Jon Trowbridge  <trow@ximian.com>

	* gal/e-text/e-entry.c (e_entry_set_position): Fixed.
	(e_entry_select_region): Fixed.
	(e_entry_show_popup): Grab/ungrab the pointer and keyboard when
	the popup appears/disappears.  This (mostly) solves the "floating
	popup" problem.
	(button_press_cb): Added.  We catch button presses outside of
	the popup, and hide the popup when they occur.

	* gal/e-text/e-completion-view.c (e_completion_view_get_type,
	e_completion_view_class_init): Changed base class to GtkEventBox.
	(e_completion_view_key_press_handler): Make Escape always cause an
	unbrowse, even wehen we are editting.

svn path=/trunk/; revision=8369
2001-02-23 17:27:51 +00:00
0e3e3e9914 Added. Allows you to attach an ECompletion to an EEntry, and have that
2001-02-19  Jon Trowbridge  <trow@ximian.com>

        * gal/e-text/e-entry.c (e_entry_enable_completion_full): Added.
        Allows you to attach an ECompletion to an EEntry, and have that
        ECompletion be used for (obviously enough) completions.

        * gal/e-text/e-completion-view.h, gal/e-text/e-completion-view.c:
        Added.  ECompletionView is a widget for displaying the results of
        a completion request in a format that is appropriate for a
        drop-down window.

        * gal/e-text/e-completion.h, gal/e-text/e-completion.c: Added.
        ECompletion is a "pure virtual base class" for completion-type
        operations.  It is implemented so that completions can be either
        synchronous or asynchronous.

        * gal/e-text/e-text.c: Lots of changes to accomodate the
        ETextModel changes.  First of all, we render embedded text objects
        as being underlined.  We also cause the model to emit the
        appropriate object activation signal when an embedded object is
        double-clicked.  Also, all of the code that moves the cursor in
        response to user input has been removed.  Instead, the EText now
        listens for "reposition" events from the underlying model, and
        bases all cursor motions on those.
        (get_bounds_item_relative): Fixed bug in the handling of
        differently-anchored text.  Being differently-anchored is not a
        crime or a perversion --- it is an alternative lifestyle that we
        have to respect.

        * gal/e-text/e-text-model-uri.h, gal/e-text/e-text-model-uri.c: A
        sample ETextModel that converts URIs into embedded objects that
        get opened in the browser when you double-click them.

        * gal/e-text/e-text-model-repos.h,
        gal/e-text/e-text-model-repos.c: Added.  A group of simple
        structures & functions for handling various cursor movement rules.
        These are the sorts of things that are passed as arguments to
        ETextModel "reposition" event handlers.

        * gal/e-text/e-text-model.h, gal/e-text/e-text-model.c: Privitized
        the ETextModel struct and "methodized" all of the operations, so
        that derived classes can do arbitrarily respond to get/set
        requests in arbitrarily strange ways.  Also added the concept of
        declaring regions of the text as "embedded text objects".
        Finally, caused operations that change the text to emit a
        "reposition" signal that passes information that can be used by a
        view (like an EText) to move the cursor or selection in an
        intelligent way in response to those changes.  This means that you
        can now open two ETexts that look at the same ETextModel, and have
        the cursor in one do the right thing when you edit the other.  (As
	opposed to producing a lot of potential segfaults, as it was
	before.)

svn path=/trunk/; revision=8280
2001-02-19 22:47:23 +00:00
500a985e34 Fixed allocation and placement of text for no bordered text.
2001-01-30  Christopher James Lahey  <clahey@ximian.com>

	* gal/e-text/e-entry.c (canvas_size_allocate, et_set_arg): Fixed
	allocation and placement of text for no bordered text.

svn path=/trunk/; revision=7922
2001-01-31 00:36:57 +00:00
1a2f7014e8 Fixed allocation and placement of text window.
2001-01-30  Christopher James Lahey  <clahey@ximian.com>

	* gal/e-text/e-entry.c (canvas_size_allocate, et_set_arg): Fixed
	allocation and placement of text window.

	* gal/e-text/e-text.c (e_text_draw): Fixed display of the text.

svn path=/trunk/; revision=7920
2001-01-31 00:00:27 +00:00
26f5efce64 Fixed text misplacement.
2001-01-18  Christopher James Lahey  <clahey@helixcode.com>

	* gal/e-text/e-entry.c: Fixed text misplacement.

svn path=/trunk/; revision=7632
2001-01-19 04:35:22 +00:00
4f70ba02f8 Center text vertically.
2001-01-18  Christopher James Lahey  <clahey@helixcode.com>

	* gal/e-text/e-entry.c (canvas_size_allocate, et_set_arg): Center
	text vertically.

svn path=/trunk/; revision=7619
2001-01-18 08:53:42 +00:00
d0a4946800 Made EEntry be shrinkable.
2001-01-17  Christopher James Lahey  <clahey@helixcode.com>

	* gal/e-text/e-entry.c (e_entry_init): Made EEntry be shrinkable.

svn path=/trunk/; revision=7604
2001-01-18 00:27:11 +00:00
d9734b1ec4 Make justification work properly for entries. Documented.
2001-01-17  Christopher James Lahey  <clahey@helixcode.com>

	* gal/e-text/e-entry.c, gal/e-text/e-entry.h (et_set_arg): Make
	justification work properly for entries.  Documented.

svn path=/trunk/; revision=7603
2001-01-18 00:07:18 +00:00
e6751a0011 Add support here for "cursor_pos". (et_get_arg): Handle ARG_CURSOR_POS.
2000-12-29  Miguel de Icaza  <miguel@helixcode.com>

	* gal/e-text/e-entry.c: Add support here for "cursor_pos".
	(et_get_arg): Handle ARG_CURSOR_POS.
	(et_set_arg): ditto.

	* gal/e-text/e-text.c: Add new argument: "cursor_pos".
	(e_text_get_arg): Handle ARG_CURSOR_POS.
	(e_text_set_arg): Handle ARG_CURSOR_POS.
	(e_text_class_init): Add.

svn path=/trunk/; revision=7192
2000-12-29 06:39:54 +00:00
c1527a0f74 Added a "draw_background" argument. Set the default for the
2000-12-26  Christopher James Lahey  <clahey@helixcode.com>

	* gal/e-text/e-entry.c: Added a "draw_background" argument.  Set
	the default for the "draw_background" argument to the contained
	EText to TRUE.

	* gal/e-text/e-text.c: Changed the default for the
	"draw_background" argument to FALSE.

svn path=/trunk/; revision=7176
2000-12-26 22:34:30 +00:00
68186009b2 Connect to the "changed" and "activate" signals on the EText to the proxy
2000-12-26  Miguel de Icaza  <miguel@helixcode.com>

	* gal/e-text/e-entry.c: Connect to the "changed" and "activate"
	signals on the EText to the proxy routines.
	(e_entry_proxy_changed): Proxy this to our signals.
	(e_entry_proxy_activate): ditto.

svn path=/trunk/; revision=7173
2000-12-26 08:15:56 +00:00
05217d5ace Always have some text. Fixes crash.
2000-12-25  Miguel de Icaza  <miguel@helixcode.com>

	* gal/e-text/e-text.c (e_text_init): Always have some text.  Fixes crash.

	* gal/widgets/e-reflow.c (set_empty): Set draw_background to FALSE.

svn path=/trunk/; revision=7172
2000-12-25 22:15:34 +00:00
b3e9bc2921 Always have some text. Fixes crash.
2000-12-25  Miguel de Icaza  <miguel@helixcode.com>

	* gal/e-text/e-text.c (e_text_init): Always have some text.  Fixes crash.

svn path=/trunk/; revision=7171
2000-12-25 22:06:45 +00:00
ac6661ee12 Handle draw background. (e_text_draw): Support both border drawing and
2000-12-24  Miguel de Icaza  <miguel@helixcode.com>

	* gal/e-text/e-text.c (e_text_set_arg): Handle draw background.
	(e_text_draw): Support both border drawing and background drawing.

	* gal/e-text/e-entry.c (et_get_arg, et_set_arg): Reduce code size by casting
	once.
	(et_set_arg, et_get_arg): Add ARG_DRAW_BORDERS handling.

svn path=/trunk/; revision=7159
2000-12-24 22:28:17 +00:00
dfdfa72ec5 Added an "allow_newlines" argument.
2000-10-27  Christopher James Lahey  <clahey@helixcode.com>

	* gal/e-text/e-entry.c,
	gal/e-text/e-text-event-processor-emacs-like.c,
	gal/e-text/e-text-event-processor-emacs-like.h,
	gal/e-text/e-text-event-processor.c,
	gal/e-text/e-text-event-processor.h, gal/e-text/e-text.c: Added an
	"allow_newlines" argument.

svn path=/trunk/; revision=6226
2000-10-27 14:48:20 +00:00